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 BOOTCYCLE_JVM_ARGS_BIG
 648 JAVA_FLAGS_BIG
 649 JAVA_FLAGS
 650 TEST_JOBS
 651 JOBS
 652 MEMORY_SIZE
 653 NUM_CORES
 654 ENABLE_GENERATE_CLASSLIST
 655 BUILD_FAILURE_HANDLER
 656 ENABLE_INTREE_EC
 657 VALID_JVM_FEATURES
 658 JVM_FEATURES_custom
 659 JVM_FEATURES_zero
 660 JVM_FEATURES_minimal
 661 JVM_FEATURES_core
 662 JVM_FEATURES_client
 663 JVM_FEATURES_server
 664 INCLUDE_GRAAL
 665 STLPORT_LIB
 666 LIBZIP_CAN_USE_MMAP
 667 LIBDL
 668 LIBM
 669 USE_EXTERNAL_LCMS
 670 LCMS_LIBS
 671 LCMS_CFLAGS
 672 USE_EXTERNAL_LIBZ
 673 USE_EXTERNAL_LIBPNG
 674 PNG_LIBS
 675 PNG_CFLAGS
 676 USE_EXTERNAL_LIBGIF
 677 USE_EXTERNAL_LIBJPEG
 678 LIBFFI_LIB_FILE
 679 ENABLE_LIBFFI_BUNDLING
 680 LIBFFI_LIBS
 681 LIBFFI_CFLAGS
 682 ALSA_LIBS
 683 ALSA_CFLAGS
 684 FREETYPE_LICENSE
 685 FREETYPE_BUNDLE_LIB_PATH
 686 FREETYPE_LIBS
 687 FREETYPE_CFLAGS
 688 FONTCONFIG_CFLAGS
 689 CUPS_CFLAGS
 690 X_EXTRA_LIBS
 691 X_LIBS
 692 X_PRE_LIBS
 693 X_CFLAGS
 694 XMKMF
 695 MSVCP_DLL
 696 MSVCR_DLL
 697 LIBCXX
 698 FIXPATH_DETACH_FLAG
 699 FIXPATH
 700 BUILD_GTEST
 701 ENABLE_CDS
 702 ENABLE_AOT
 703 ASAN_ENABLED
 704 GCOV_ENABLED
 705 ZIP_EXTERNAL_DEBUG_SYMBOLS
 706 COPY_DEBUG_SYMBOLS
 707 COMPILE_WITH_DEBUG_SYMBOLS
 708 CFLAGS_WARNINGS_ARE_ERRORS
 709 BUILD_CC_DISABLE_WARNING_PREFIX
 710 DISABLE_WARNING_PREFIX
 711 WARNINGS_AS_ERRORS
 712 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 713 LDFLAGS_TESTEXE
 714 LDFLAGS_TESTLIB
 715 CXXFLAGS_TESTEXE
 716 CXXFLAGS_TESTLIB
 717 CFLAGS_TESTEXE
 718 CFLAGS_TESTLIB
 719 OPENJDK_BUILD_JVM_LIBS
 720 OPENJDK_BUILD_JVM_ASFLAGS
 721 OPENJDK_BUILD_JVM_LDFLAGS
 722 OPENJDK_BUILD_JVM_CFLAGS
 723 OPENJDK_BUILD_LDFLAGS_NO_EXEC_STACK
 724 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 725 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 726 OPENJDK_BUILD_JDKEXE_LIBS
 727 OPENJDK_BUILD_JDKLIB_LIBS
 728 OPENJDK_BUILD_LDFLAGS_JDKEXE
 729 OPENJDK_BUILD_LDFLAGS_JDKLIB
 730 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 731 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 732 OPENJDK_BUILD_CFLAGS_JDKEXE
 733 OPENJDK_BUILD_CFLAGS_JDKLIB
 734 OPENJDK_BUILD_CXXSTD_CXXFLAG
 735 JVM_LIBS
 736 JVM_ASFLAGS
 737 JVM_LDFLAGS
 738 JVM_CFLAGS
 739 LDFLAGS_NO_EXEC_STACK
 740 LDFLAGS_HASH_STYLE
 741 LDFLAGS_CXX_JDK
 742 JDKEXE_LIBS
 743 JDKLIB_LIBS
 744 LDFLAGS_JDKEXE
 745 LDFLAGS_JDKLIB
 746 CXXFLAGS_JDKEXE
 747 CXXFLAGS_JDKLIB
 748 CFLAGS_JDKEXE
 749 CFLAGS_JDKLIB
 750 MACOSX_VERSION_MAX
 751 MACOSX_VERSION_MIN
 752 CXXSTD_CXXFLAG
 753 JDK_ARCH_ABI_PROP_NAME
 754 CXX_O_FLAG_SIZE
 755 CXX_O_FLAG_NONE
 756 CXX_O_FLAG_DEBUG
 757 CXX_O_FLAG_NORM
 758 CXX_O_FLAG_HI
 759 CXX_O_FLAG_HIGHEST
 760 CXX_O_FLAG_HIGHEST_JVM
 761 C_O_FLAG_SIZE
 762 C_O_FLAG_NONE
 763 C_O_FLAG_DEBUG
 764 C_O_FLAG_NORM
 765 C_O_FLAG_HI
 766 C_O_FLAG_HIGHEST
 767 C_O_FLAG_HIGHEST_JVM
 768 JVM_CFLAGS_SYMBOLS
 769 CXXFLAGS_DEBUG_SYMBOLS
 770 CFLAGS_DEBUG_SYMBOLS
 771 CXX_FLAG_DEPS
 772 C_FLAG_DEPS
 773 SHARED_LIBRARY_FLAGS
 774 SET_SHARED_LIBRARY_MAPFILE
 775 SET_SHARED_LIBRARY_NAME
 776 SET_SHARED_LIBRARY_ORIGIN
 777 SET_EXECUTABLE_ORIGIN
 778 CXX_FLAG_REORDER
 779 C_FLAG_REORDER
 780 JVM_RCFLAGS
 781 RC_FLAGS
 782 AR_OUT_OPTION
 783 LD_OUT_OPTION
 784 EXE_OUT_OPTION
 785 CC_OUT_OPTION
 786 STRIPFLAGS
 787 ARFLAGS
 788 COMPILER_BINDCMD_FILE_FLAG
 789 COMPILER_COMMAND_FILE_FLAG
 790 COMPILER_TARGET_BITS_FLAG
 791 JIB_JAR
 792 JT_HOME
 793 JTREGEXE
 794 HOTSPOT_TOOLCHAIN_TYPE
 795 USING_BROKEN_SUSE_LD
 796 PACKAGE_PATH
 797 BUILD_AS
 798 BUILD_LDCXX
 799 BUILD_LD
 800 BUILD_STRIP
 801 BUILD_OBJCOPY
 802 BUILD_AR
 803 BUILD_NM
 804 BUILD_CXX
 805 BUILD_CC
 806 BUILD_SYSROOT_LDFLAGS
 807 BUILD_SYSROOT_CFLAGS
 808 ac_ct_OBJDUMP
 809 OBJDUMP
 810 ac_ct_OBJCOPY
 811 OBJCOPY
 812 ac_ct_NM
 813 ac_ct_STRIP
 814 GNM
 815 NM
 816 STRIP
 817 MSBUILD
 818 DUMPBIN
 819 RC
 820 MT
 821 INSTALL_NAME_TOOL
 822 OTOOL
 823 LIPO
 824 ac_ct_AR
 825 AR
 826 AS
 827 LDCXX
 828 LD
 829 CXXCPP
 830 CPP
 831 CXX_VERSION_NUMBER
 832 CC_VERSION_NUMBER
 833 ac_ct_CXX
 834 CXXFLAGS
 835 CXX
 836 TOOLCHAIN_PATH_CXX
 837 POTENTIAL_CXX
 838 OBJEXT
 839 EXEEXT
 840 ac_ct_CC
 841 CPPFLAGS
 842 LDFLAGS
 843 CFLAGS
 844 CC
 845 TOOLCHAIN_PATH_CC
 846 POTENTIAL_CC
 847 TOOLCHAIN_VERSION
 848 VS_LIB
 849 VS_INCLUDE
 850 VS_PATH
 851 CYGWIN_LINK
 852 SYSROOT_LDFLAGS
 853 SYSROOT_CFLAGS
 854 EXTRA_LDFLAGS
 855 EXTRA_CXXFLAGS
 856 EXTRA_CFLAGS
 857 EXE_SUFFIX
 858 OBJ_SUFFIX
 859 STATIC_LIBRARY
 860 SHARED_LIBRARY
 861 STATIC_LIBRARY_SUFFIX
 862 SHARED_LIBRARY_SUFFIX
 863 LIBRARY_PREFIX
 864 TOOLCHAIN_TYPE
 865 STATIC_BUILD
 866 IMPORT_MODULES_MAKE
 867 IMPORT_MODULES_SRC
 868 IMPORT_MODULES_MAN
 869 IMPORT_MODULES_LEGAL
 870 IMPORT_MODULES_CONF
 871 IMPORT_MODULES_LIBS
 872 IMPORT_MODULES_CMDS
 873 IMPORT_MODULES_CLASSES
 874 EXTERNAL_BUILDJDK
 875 BUILD_JDK
 876 CREATE_BUILDJDK
 877 JLINK
 878 JMOD
 879 JAVAC_FLAGS
 880 BOOT_JDK_SOURCETARGET
 881 JARSIGNER
 882 JAR
 883 JAVADOC
 884 JAVAC
 885 JAVA
 886 BOOT_JDK
 887 JAVA_CHECK
 888 JAVAC_CHECK
 889 VERSION_CLASSFILE_MINOR
 890 VERSION_CLASSFILE_MAJOR
 891 VENDOR_VERSION_STRING
 892 VERSION_DATE
 893 VERSION_IS_GA
 894 VERSION_SHORT
 895 VERSION_STRING
 896 VERSION_NUMBER_FOUR_POSITIONS
 897 VERSION_NUMBER
 898 VERSION_OPT
 899 VERSION_BUILD
 900 VERSION_PRE
 901 VERSION_PATCH
 902 VERSION_UPDATE
 903 VERSION_INTERIM
 904 VERSION_FEATURE
 905 COMPANY_NAME
 906 MACOSX_BUNDLE_ID_BASE
 907 MACOSX_BUNDLE_NAME_BASE
 908 HOTSPOT_VM_DISTRO
 909 JDK_RC_PLATFORM_NAME
 910 PRODUCT_SUFFIX
 911 PRODUCT_NAME
 912 LAUNCHER_NAME
 913 JLINK_KEEP_PACKAGED_MODULES
 914 COPYRIGHT_YEAR
 915 COMPRESS_JARS
 916 INCLUDE_SA
 917 UNLIMITED_CRYPTO
 918 CACERTS_FILE
 919 ENABLE_FULL_DOCS
 920 ENABLE_HEADLESS_ONLY
 921 DEFAULT_MAKE_TARGET
 922 OS_VERSION_MICRO
 923 OS_VERSION_MINOR
 924 OS_VERSION_MAJOR
 925 PKG_CONFIG
 926 BASH_ARGS
 927 SETFILE
 928 CODESIGN
 929 XATTR
 930 DSYMUTIL
 931 IS_GNU_TIME
 932 PATCH
 933 DTRACE
 934 FLOCK
 935 TIME
 936 STAT
 937 HG
 938 DOT
 939 READELF
 940 LDD
 941 ZIPEXE
 942 UNZIP
 943 TAR_SUPPORTS_TRANSFORM
 944 TAR_INCLUDE_PARAM
 945 TAR_CREATE_EXTRA_PARAM
 946 TAR_TYPE
 947 FIND_DELETE
 948 OUTPUT_SYNC
 949 OUTPUT_SYNC_SUPPORTED
 950 CHECK_TOOLSDIR_MAKE
 951 CHECK_TOOLSDIR_GMAKE
 952 CHECK_MAKE
 953 CHECK_GMAKE
 954 MAKE
 955 PKGHANDLER
 956 CONFIGURESUPPORT_OUTPUTDIR
 957 OUTPUTDIR
 958 CONF_NAME
 959 SPEC
 960 SDKROOT
 961 XCODEBUILD
 962 DEVKIT_LIB_DIR
 963 JVM_VARIANT_MAIN
 964 VALID_JVM_VARIANTS
 965 JVM_VARIANTS
 966 DEBUG_LEVEL
 967 HOTSPOT_DEBUG_LEVEL
 968 JDK_VARIANT
 969 USERNAME
 970 TOPDIR
 971 PATH_SEP
 972 OPENJDK_BUILD_OS_INCLUDE_SUBDIR
 973 HOTSPOT_BUILD_CPU_DEFINE
 974 HOTSPOT_BUILD_CPU_ARCH
 975 HOTSPOT_BUILD_CPU
 976 HOTSPOT_BUILD_OS_TYPE
 977 HOTSPOT_BUILD_OS
 978 OPENJDK_BUILD_BUNDLE_PLATFORM
 979 OPENJDK_BUILD_CPU_OSARCH
 980 OPENJDK_BUILD_CPU_ISADIR
 981 OPENJDK_BUILD_CPU_LEGACY_LIB
 982 OPENJDK_BUILD_CPU_LEGACY
 983 OPENJDK_TARGET_OS_INCLUDE_SUBDIR
 984 HOTSPOT_TARGET_CPU_DEFINE
 985 HOTSPOT_TARGET_CPU_ARCH
 986 HOTSPOT_TARGET_CPU
 987 HOTSPOT_TARGET_OS_TYPE
 988 HOTSPOT_TARGET_OS
 989 DEFINE_CROSS_COMPILE_ARCH
 990 OPENJDK_TARGET_BUNDLE_PLATFORM
 991 OPENJDK_TARGET_CPU_OSARCH
 992 OPENJDK_TARGET_CPU_ISADIR
 993 OPENJDK_TARGET_CPU_LEGACY_LIB
 994 OPENJDK_TARGET_CPU_LEGACY
 995 RELEASE_FILE_OS_ARCH
 996 RELEASE_FILE_OS_NAME
 997 OPENJDK_MODULE_TARGET_PLATFORM
 998 COMPILE_TYPE
 999 OPENJDK_TARGET_CPU_ENDIAN
1000 OPENJDK_TARGET_CPU_BITS
1001 OPENJDK_TARGET_CPU_ARCH
1002 OPENJDK_TARGET_CPU
1003 OPENJDK_TARGET_OS_ENV
1004 OPENJDK_TARGET_OS_TYPE
1005 OPENJDK_TARGET_OS
1006 OPENJDK_BUILD_CPU_ENDIAN
1007 OPENJDK_BUILD_CPU_BITS
1008 OPENJDK_BUILD_CPU_ARCH
1009 OPENJDK_BUILD_CPU
1010 OPENJDK_BUILD_OS_ENV
1011 OPENJDK_BUILD_OS_TYPE
1012 OPENJDK_BUILD_OS
1013 OPENJDK_BUILD_AUTOCONF_NAME
1014 OPENJDK_TARGET_AUTOCONF_NAME
1015 target_os
1016 target_vendor
1017 target_cpu
1018 target
1019 host_os
1020 host_vendor
1021 host_cpu
1022 host
1023 build_os
1024 build_vendor
1025 build_cpu
1026 build
1027 PANDOC
1028 NICE
1029 CPIO
1030 DF
1031 READLINK
1032 CYGPATH
1033 SED
1034 FGREP
1035 EGREP
1036 GREP
1037 AWK
1038 XARGS
1039 WHICH
1040 WC
1041 UNIQ
1042 UNAME
1043 TR
1044 TOUCH
1045 TEE
1046 TAR
1047 TAIL
1048 SORT
1049 SH
1050 RMDIR
1051 RM
1052 PRINTF
1053 NAWK
1054 MV
1055 MKTEMP
1056 MKDIR
1057 LS
1058 LN
1059 GZIP
1060 GUNZIP
1061 HEAD
1062 FIND
1063 FILE
1064 EXPR
1065 ECHO
1066 DIRNAME
1067 DIFF
1068 DATE
1069 CUT
1070 CP
1071 COMM
1072 CMP
1073 CHMOD
1074 CAT
1075 BASH
1076 BASENAME
1077 DATE_WHEN_CONFIGURED
1078 ORIGINAL_PATH
1079 CONFIGURE_COMMAND_LINE
1080 target_alias
1081 host_alias
1082 build_alias
1083 LIBS
1084 ECHO_T
1085 ECHO_N
1086 ECHO_C
1087 DEFS
1088 mandir
1089 localedir
1090 libdir
1091 psdir
1092 pdfdir
1093 dvidir
1094 htmldir
1095 infodir
1096 docdir
1097 oldincludedir
1098 includedir
1099 localstatedir
1100 sharedstatedir
1101 sysconfdir
1102 datadir
1103 datarootdir
1104 libexecdir
1105 sbindir
1106 bindir
1107 program_transform_name
1108 prefix
1109 exec_prefix
1110 PACKAGE_URL
1111 PACKAGE_BUGREPORT
1112 PACKAGE_STRING
1113 PACKAGE_VERSION
1114 PACKAGE_TARNAME
1115 PACKAGE_NAME
1116 PATH_SEPARATOR
1117 SHELL'
1118 ac_subst_files=''
1119 ac_user_opts='
1120 enable_option_checking
1121 with_target_bits
1122 enable_openjdk_only
1123 with_custom_make_dir
1124 with_jdk_variant
1125 enable_debug
1126 with_debug_level
1127 with_jvm_variants
1128 with_cpu_port
1129 with_devkit
1130 with_sys_root
1131 with_sysroot
1132 with_tools_dir
1133 with_toolchain_path
1134 with_extra_path
1135 with_sdk_name
1136 with_conf_name
1137 with_output_sync
1138 with_default_make_target
1139 enable_headless_only
1140 enable_full_docs
1141 with_cacerts_file
1142 enable_unlimited_crypto
1143 with_copyright_year
1144 enable_keep_packaged_modules
1145 with_milestone
1146 with_update_version
1147 with_user_release_suffix
1148 with_build_number
1149 with_version_major
1150 with_version_minor
1151 with_version_security
1152 with_vendor_name
1153 with_version_string
1154 with_version_pre
1155 with_version_opt
1156 with_version_build
1157 with_version_feature
1158 with_version_interim
1159 with_version_update
1160 with_version_patch
1161 with_version_date
1162 with_vendor_version_string
1163 with_boot_jdk
1164 with_build_jdk
1165 with_import_modules
1166 enable_static_build
1167 with_toolchain_type
1168 with_extra_cflags
1169 with_extra_cxxflags
1170 with_extra_ldflags
1171 with_toolchain_version
1172 with_build_devkit
1173 with_jtreg
1174 with_jib
1175 with_abi_profile
1176 with_macosx_version_max
1177 enable_warnings_as_errors
1178 with_native_debug_symbols
1179 enable_debug_symbols
1180 enable_zip_debug_info
1181 enable_native_coverage
1182 enable_asan
1183 enable_dtrace
1184 enable_aot
1185 enable_cds
1186 enable_hotspot_gtest
1187 with_stdc__lib
1188 with_msvcr_dll
1189 with_msvcp_dll
1190 with_x
1191 with_cups
1192 with_cups_include
1193 with_fontconfig
1194 with_fontconfig_include
1195 with_freetype
1196 with_freetype_include
1197 with_freetype_lib
1198 with_freetype_src
1199 enable_freetype_bundling
1200 with_freetype_license
1201 with_alsa
1202 with_alsa_include
1203 with_alsa_lib
1204 with_libffi
1205 with_libffi_include
1206 with_libffi_lib
1207 enable_libffi_bundling
1208 with_libjpeg
1209 with_giflib
1210 with_libpng
1211 with_zlib
1212 with_lcms
1213 with_dxsdk
1214 with_dxsdk_lib
1215 with_dxsdk_include
1216 with_jvm_features
1217 with_jvm_interpreter
1218 enable_jtreg_failure_handler
1219 enable_generate_classlist
1220 with_num_cores
1221 with_memory_size
1222 with_jobs
1223 with_test_jobs
1224 with_boot_jdk_jvmargs
1225 with_sjavac_server_java
1226 enable_sjavac
1227 enable_javac_server
1228 enable_icecc
1229 enable_precompiled_headers
1230 enable_ccache
1231 with_ccache_dir
1232 '
1233       ac_precious_vars='build_alias
1234 host_alias
1235 target_alias
1236 BASENAME
1237 BASH
1238 CAT
1239 CHMOD
1240 CMP
1241 COMM
1242 CP
1243 CUT
1244 DATE
1245 DIFF
1246 DIRNAME
1247 ECHO
1248 EXPR
1249 FILE
1250 FIND
1251 HEAD
1252 GUNZIP
1253 GZIP
1254 LN
1255 LS
1256 MKDIR
1257 MKTEMP
1258 MV
1259 NAWK
1260 PRINTF
1261 RM
1262 RMDIR
1263 SH
1264 SORT
1265 TAIL
1266 TAR
1267 TEE
1268 TOUCH
1269 TR
1270 UNAME
1271 UNIQ
1272 WC
1273 WHICH
1274 XARGS
1275 AWK
1276 GREP
1277 EGREP
1278 FGREP
1279 SED
1280 CYGPATH
1281 READLINK
1282 DF
1283 CPIO
1284 NICE
1285 PANDOC
1286 MAKE
1287 UNZIP
1288 ZIPEXE
1289 LDD
1290 READELF
1291 DOT
1292 HG
1293 STAT
1294 TIME
1295 FLOCK
1296 DTRACE
1297 PATCH
1298 DSYMUTIL
1299 XATTR
1300 CODESIGN
1301 SETFILE
1302 PKG_CONFIG
1303 JAVA
1304 JAVAC
1305 JAVADOC
1306 JAR
1307 JARSIGNER
1308 CC
1309 CFLAGS
1310 LDFLAGS
1311 LIBS
1312 CPPFLAGS
1313 CXX
1314 CXXFLAGS
1315 CCC
1316 CPP
1317 CXXCPP
1318 AS
1319 AR
1320 LIPO
1321 OTOOL
1322 INSTALL_NAME_TOOL
1323 STRIP
1324 NM
1325 GNM
1326 OBJCOPY
1327 OBJDUMP
1328 BUILD_CC
1329 BUILD_CXX
1330 BUILD_NM
1331 BUILD_AR
1332 BUILD_OBJCOPY
1333 BUILD_STRIP
1334 JTREGEXE
1335 XMKMF
1336 FREETYPE_CFLAGS
1337 FREETYPE_LIBS
1338 ALSA_CFLAGS
1339 ALSA_LIBS
1340 LIBFFI_CFLAGS
1341 LIBFFI_LIBS
1342 PNG_CFLAGS
1343 PNG_LIBS
1344 LCMS_CFLAGS
1345 LCMS_LIBS
1346 ICECC_CMD
1347 ICECC_CREATE_ENV
1348 ICECC_WRAPPER
1349 CCACHE'
1350 
1351 
1352 # Initialize some variables set by options.
1353 ac_init_help=
1354 ac_init_version=false
1355 ac_unrecognized_opts=
1356 ac_unrecognized_sep=
1357 # The variables have the same names as the options, with
1358 # dashes changed to underlines.
1359 cache_file=/dev/null
1360 exec_prefix=NONE
1361 no_create=
1362 no_recursion=
1363 prefix=NONE
1364 program_prefix=NONE
1365 program_suffix=NONE
1366 program_transform_name=s,x,x,
1367 silent=
1368 site=
1369 srcdir=
1370 verbose=
1371 x_includes=NONE
1372 x_libraries=NONE
1373 
1374 # Installation directory options.
1375 # These are left unexpanded so users can "make install exec_prefix=/foo"
1376 # and all the variables that are supposed to be based on exec_prefix
1377 # by default will actually change.
1378 # Use braces instead of parens because sh, perl, etc. also accept them.
1379 # (The list follows the same order as the GNU Coding Standards.)
1380 bindir='${exec_prefix}/bin'
1381 sbindir='${exec_prefix}/sbin'
1382 libexecdir='${exec_prefix}/libexec'
1383 datarootdir='${prefix}/share'
1384 datadir='${datarootdir}'
1385 sysconfdir='${prefix}/etc'
1386 sharedstatedir='${prefix}/com'
1387 localstatedir='${prefix}/var'
1388 includedir='${prefix}/include'
1389 oldincludedir='/usr/include'
1390 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1391 infodir='${datarootdir}/info'
1392 htmldir='${docdir}'
1393 dvidir='${docdir}'
1394 pdfdir='${docdir}'
1395 psdir='${docdir}'
1396 libdir='${exec_prefix}/lib'
1397 localedir='${datarootdir}/locale'
1398 mandir='${datarootdir}/man'
1399 
1400 ac_prev=
1401 ac_dashdash=
1402 for ac_option
1403 do
1404   # If the previous option needs an argument, assign it.
1405   if test -n "$ac_prev"; then
1406     eval $ac_prev=\$ac_option
1407     ac_prev=
1408     continue
1409   fi
1410 
1411   case $ac_option in
1412   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1413   *=)   ac_optarg= ;;
1414   *)    ac_optarg=yes ;;
1415   esac
1416 
1417   # Accept the important Cygnus configure options, so we can diagnose typos.
1418 
1419   case $ac_dashdash$ac_option in
1420   --)
1421     ac_dashdash=yes ;;
1422 
1423   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1424     ac_prev=bindir ;;
1425   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1426     bindir=$ac_optarg ;;
1427 
1428   -build | --build | --buil | --bui | --bu)
1429     ac_prev=build_alias ;;
1430   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1431     build_alias=$ac_optarg ;;
1432 
1433   -cache-file | --cache-file | --cache-fil | --cache-fi \
1434   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1435     ac_prev=cache_file ;;
1436   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1437   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1438     cache_file=$ac_optarg ;;
1439 
1440   --config-cache | -C)
1441     cache_file=config.cache ;;
1442 
1443   -datadir | --datadir | --datadi | --datad)
1444     ac_prev=datadir ;;
1445   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1446     datadir=$ac_optarg ;;
1447 
1448   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1449   | --dataroo | --dataro | --datar)
1450     ac_prev=datarootdir ;;
1451   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1452   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1453     datarootdir=$ac_optarg ;;
1454 
1455   -disable-* | --disable-*)
1456     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1457     # Reject names that are not valid shell variable names.
1458     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1459       as_fn_error $? "invalid feature name: $ac_useropt"
1460     ac_useropt_orig=$ac_useropt
1461     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1462     case $ac_user_opts in
1463       *"
1464 "enable_$ac_useropt"
1465 "*) ;;
1466       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1467          ac_unrecognized_sep=', ';;
1468     esac
1469     eval enable_$ac_useropt=no ;;
1470 
1471   -docdir | --docdir | --docdi | --doc | --do)
1472     ac_prev=docdir ;;
1473   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1474     docdir=$ac_optarg ;;
1475 
1476   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1477     ac_prev=dvidir ;;
1478   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1479     dvidir=$ac_optarg ;;
1480 
1481   -enable-* | --enable-*)
1482     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1483     # Reject names that are not valid shell variable names.
1484     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1485       as_fn_error $? "invalid feature name: $ac_useropt"
1486     ac_useropt_orig=$ac_useropt
1487     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1488     case $ac_user_opts in
1489       *"
1490 "enable_$ac_useropt"
1491 "*) ;;
1492       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1493          ac_unrecognized_sep=', ';;
1494     esac
1495     eval enable_$ac_useropt=\$ac_optarg ;;
1496 
1497   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1498   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1499   | --exec | --exe | --ex)
1500     ac_prev=exec_prefix ;;
1501   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1502   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1503   | --exec=* | --exe=* | --ex=*)
1504     exec_prefix=$ac_optarg ;;
1505 
1506   -gas | --gas | --ga | --g)
1507     # Obsolete; use --with-gas.
1508     with_gas=yes ;;
1509 
1510   -help | --help | --hel | --he | -h)
1511     ac_init_help=long ;;
1512   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1513     ac_init_help=recursive ;;
1514   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1515     ac_init_help=short ;;
1516 
1517   -host | --host | --hos | --ho)
1518     ac_prev=host_alias ;;
1519   -host=* | --host=* | --hos=* | --ho=*)
1520     host_alias=$ac_optarg ;;
1521 
1522   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1523     ac_prev=htmldir ;;
1524   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1525   | --ht=*)
1526     htmldir=$ac_optarg ;;
1527 
1528   -includedir | --includedir | --includedi | --included | --include \
1529   | --includ | --inclu | --incl | --inc)
1530     ac_prev=includedir ;;
1531   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1532   | --includ=* | --inclu=* | --incl=* | --inc=*)
1533     includedir=$ac_optarg ;;
1534 
1535   -infodir | --infodir | --infodi | --infod | --info | --inf)
1536     ac_prev=infodir ;;
1537   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1538     infodir=$ac_optarg ;;
1539 
1540   -libdir | --libdir | --libdi | --libd)
1541     ac_prev=libdir ;;
1542   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1543     libdir=$ac_optarg ;;
1544 
1545   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1546   | --libexe | --libex | --libe)
1547     ac_prev=libexecdir ;;
1548   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1549   | --libexe=* | --libex=* | --libe=*)
1550     libexecdir=$ac_optarg ;;
1551 
1552   -localedir | --localedir | --localedi | --localed | --locale)
1553     ac_prev=localedir ;;
1554   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1555     localedir=$ac_optarg ;;
1556 
1557   -localstatedir | --localstatedir | --localstatedi | --localstated \
1558   | --localstate | --localstat | --localsta | --localst | --locals)
1559     ac_prev=localstatedir ;;
1560   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1561   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1562     localstatedir=$ac_optarg ;;
1563 
1564   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1565     ac_prev=mandir ;;
1566   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1567     mandir=$ac_optarg ;;
1568 
1569   -nfp | --nfp | --nf)
1570     # Obsolete; use --without-fp.
1571     with_fp=no ;;
1572 
1573   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1574   | --no-cr | --no-c | -n)
1575     no_create=yes ;;
1576 
1577   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1578   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1579     no_recursion=yes ;;
1580 
1581   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1582   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1583   | --oldin | --oldi | --old | --ol | --o)
1584     ac_prev=oldincludedir ;;
1585   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1586   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1587   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1588     oldincludedir=$ac_optarg ;;
1589 
1590   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1591     ac_prev=prefix ;;
1592   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1593     prefix=$ac_optarg ;;
1594 
1595   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1596   | --program-pre | --program-pr | --program-p)
1597     ac_prev=program_prefix ;;
1598   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1599   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1600     program_prefix=$ac_optarg ;;
1601 
1602   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1603   | --program-suf | --program-su | --program-s)
1604     ac_prev=program_suffix ;;
1605   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1606   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1607     program_suffix=$ac_optarg ;;
1608 
1609   -program-transform-name | --program-transform-name \
1610   | --program-transform-nam | --program-transform-na \
1611   | --program-transform-n | --program-transform- \
1612   | --program-transform | --program-transfor \
1613   | --program-transfo | --program-transf \
1614   | --program-trans | --program-tran \
1615   | --progr-tra | --program-tr | --program-t)
1616     ac_prev=program_transform_name ;;
1617   -program-transform-name=* | --program-transform-name=* \
1618   | --program-transform-nam=* | --program-transform-na=* \
1619   | --program-transform-n=* | --program-transform-=* \
1620   | --program-transform=* | --program-transfor=* \
1621   | --program-transfo=* | --program-transf=* \
1622   | --program-trans=* | --program-tran=* \
1623   | --progr-tra=* | --program-tr=* | --program-t=*)
1624     program_transform_name=$ac_optarg ;;
1625 
1626   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1627     ac_prev=pdfdir ;;
1628   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1629     pdfdir=$ac_optarg ;;
1630 
1631   -psdir | --psdir | --psdi | --psd | --ps)
1632     ac_prev=psdir ;;
1633   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1634     psdir=$ac_optarg ;;
1635 
1636   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1637   | -silent | --silent | --silen | --sile | --sil)
1638     silent=yes ;;
1639 
1640   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1641     ac_prev=sbindir ;;
1642   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1643   | --sbi=* | --sb=*)
1644     sbindir=$ac_optarg ;;
1645 
1646   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1647   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1648   | --sharedst | --shareds | --shared | --share | --shar \
1649   | --sha | --sh)
1650     ac_prev=sharedstatedir ;;
1651   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1652   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1653   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1654   | --sha=* | --sh=*)
1655     sharedstatedir=$ac_optarg ;;
1656 
1657   -site | --site | --sit)
1658     ac_prev=site ;;
1659   -site=* | --site=* | --sit=*)
1660     site=$ac_optarg ;;
1661 
1662   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1663     ac_prev=srcdir ;;
1664   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1665     srcdir=$ac_optarg ;;
1666 
1667   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1668   | --syscon | --sysco | --sysc | --sys | --sy)
1669     ac_prev=sysconfdir ;;
1670   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1671   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1672     sysconfdir=$ac_optarg ;;
1673 
1674   -target | --target | --targe | --targ | --tar | --ta | --t)
1675     ac_prev=target_alias ;;
1676   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1677     target_alias=$ac_optarg ;;
1678 
1679   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1680     verbose=yes ;;
1681 
1682   -version | --version | --versio | --versi | --vers | -V)
1683     ac_init_version=: ;;
1684 
1685   -with-* | --with-*)
1686     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1687     # Reject names that are not valid shell variable names.
1688     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1689       as_fn_error $? "invalid package name: $ac_useropt"
1690     ac_useropt_orig=$ac_useropt
1691     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1692     case $ac_user_opts in
1693       *"
1694 "with_$ac_useropt"
1695 "*) ;;
1696       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1697          ac_unrecognized_sep=', ';;
1698     esac
1699     eval with_$ac_useropt=\$ac_optarg ;;
1700 
1701   -without-* | --without-*)
1702     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1703     # Reject names that are not valid shell variable names.
1704     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1705       as_fn_error $? "invalid package name: $ac_useropt"
1706     ac_useropt_orig=$ac_useropt
1707     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1708     case $ac_user_opts in
1709       *"
1710 "with_$ac_useropt"
1711 "*) ;;
1712       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1713          ac_unrecognized_sep=', ';;
1714     esac
1715     eval with_$ac_useropt=no ;;
1716 
1717   --x)
1718     # Obsolete; use --with-x.
1719     with_x=yes ;;
1720 
1721   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1722   | --x-incl | --x-inc | --x-in | --x-i)
1723     ac_prev=x_includes ;;
1724   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1725   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1726     x_includes=$ac_optarg ;;
1727 
1728   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1729   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1730     ac_prev=x_libraries ;;
1731   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1732   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1733     x_libraries=$ac_optarg ;;
1734 
1735   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1736 Try \`$0 --help' for more information"
1737     ;;
1738 
1739   *=*)
1740     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1741     # Reject names that are not valid shell variable names.
1742     case $ac_envvar in #(
1743       '' | [0-9]* | *[!_$as_cr_alnum]* )
1744       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1745     esac
1746     eval $ac_envvar=\$ac_optarg
1747     export $ac_envvar ;;
1748 
1749   *)
1750     # FIXME: should be removed in autoconf 3.0.
1751     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1752     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1753       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1754     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1755     ;;
1756 
1757   esac
1758 done
1759 
1760 if test -n "$ac_prev"; then
1761   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1762   as_fn_error $? "missing argument to $ac_option"
1763 fi
1764 
1765 if test -n "$ac_unrecognized_opts"; then
1766   case $enable_option_checking in
1767     no) ;;
1768     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1769     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1770   esac
1771 fi
1772 
1773 # Check all directory arguments for consistency.
1774 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1775                 datadir sysconfdir sharedstatedir localstatedir includedir \
1776                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1777                 libdir localedir mandir
1778 do
1779   eval ac_val=\$$ac_var
1780   # Remove trailing slashes.
1781   case $ac_val in
1782     */ )
1783       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1784       eval $ac_var=\$ac_val;;
1785   esac
1786   # Be sure to have absolute directory names.
1787   case $ac_val in
1788     [\\/$]* | ?:[\\/]* )  continue;;
1789     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1790   esac
1791   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1792 done
1793 
1794 # There might be people who depend on the old broken behavior: `$host'
1795 # used to hold the argument of --host etc.
1796 # FIXME: To remove some day.
1797 build=$build_alias
1798 host=$host_alias
1799 target=$target_alias
1800 
1801 # FIXME: To remove some day.
1802 if test "x$host_alias" != x; then
1803   if test "x$build_alias" = x; then
1804     cross_compiling=maybe
1805   elif test "x$build_alias" != "x$host_alias"; then
1806     cross_compiling=yes
1807   fi
1808 fi
1809 
1810 ac_tool_prefix=
1811 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1812 
1813 test "$silent" = yes && exec 6>/dev/null
1814 
1815 
1816 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1817 ac_ls_di=`ls -di .` &&
1818 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1819   as_fn_error $? "working directory cannot be determined"
1820 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1821   as_fn_error $? "pwd does not report name of working directory"
1822 
1823 
1824 # Find the source files, if location was not specified.
1825 if test -z "$srcdir"; then
1826   ac_srcdir_defaulted=yes
1827   # Try the directory containing this script, then the parent directory.
1828   ac_confdir=`$as_dirname -- "$as_myself" ||
1829 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1830          X"$as_myself" : 'X\(//\)[^/]' \| \
1831          X"$as_myself" : 'X\(//\)$' \| \
1832          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1833 $as_echo X"$as_myself" |
1834     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1835             s//\1/
1836             q
1837           }
1838           /^X\(\/\/\)[^/].*/{
1839             s//\1/
1840             q
1841           }
1842           /^X\(\/\/\)$/{
1843             s//\1/
1844             q
1845           }
1846           /^X\(\/\).*/{
1847             s//\1/
1848             q
1849           }
1850           s/.*/./; q'`
1851   srcdir=$ac_confdir
1852   if test ! -r "$srcdir/$ac_unique_file"; then
1853     srcdir=..
1854   fi
1855 else
1856   ac_srcdir_defaulted=no
1857 fi
1858 if test ! -r "$srcdir/$ac_unique_file"; then
1859   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1860   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1861 fi
1862 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1863 ac_abs_confdir=`(
1864         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1865         pwd)`
1866 # When building in place, set srcdir=.
1867 if test "$ac_abs_confdir" = "$ac_pwd"; then
1868   srcdir=.
1869 fi
1870 # Remove unnecessary trailing slashes from srcdir.
1871 # Double slashes in file names in object file debugging info
1872 # mess up M-x gdb in Emacs.
1873 case $srcdir in
1874 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1875 esac
1876 for ac_var in $ac_precious_vars; do
1877   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1878   eval ac_env_${ac_var}_value=\$${ac_var}
1879   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1880   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1881 done
1882 
1883 #
1884 # Report the --help message.
1885 #
1886 if test "$ac_init_help" = "long"; then
1887   # Omit some internal or obsolete options to make the list less imposing.
1888   # This message is too long to be a string in the A/UX 3.1 sh.
1889   cat <<_ACEOF
1890 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1891 
1892 Usage: $0 [OPTION]... [VAR=VALUE]...
1893 
1894 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1895 VAR=VALUE.  See below for descriptions of some of the useful variables.
1896 
1897 Defaults for the options are specified in brackets.
1898 
1899 Configuration:
1900   -h, --help              display this help and exit
1901       --help=short        display options specific to this package
1902       --help=recursive    display the short help of all the included packages
1903   -V, --version           display version information and exit
1904   -q, --quiet, --silent   do not print \`checking ...' messages
1905       --cache-file=FILE   cache test results in FILE [disabled]
1906   -C, --config-cache      alias for \`--cache-file=config.cache'
1907   -n, --no-create         do not create output files
1908       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1909 
1910 Installation directories:
1911   --prefix=PREFIX         install architecture-independent files in PREFIX
1912                           [$ac_default_prefix]
1913   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1914                           [PREFIX]
1915 
1916 By default, \`make install' will install all the files in
1917 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1918 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1919 for instance \`--prefix=\$HOME'.
1920 
1921 For better control, use the options below.
1922 
1923 Fine tuning of the installation directories:
1924   --bindir=DIR            user executables [EPREFIX/bin]
1925   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1926   --libexecdir=DIR        program executables [EPREFIX/libexec]
1927   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1928   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1929   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1930   --libdir=DIR            object code libraries [EPREFIX/lib]
1931   --includedir=DIR        C header files [PREFIX/include]
1932   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1933   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1934   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1935   --infodir=DIR           info documentation [DATAROOTDIR/info]
1936   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1937   --mandir=DIR            man documentation [DATAROOTDIR/man]
1938   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1939   --htmldir=DIR           html documentation [DOCDIR]
1940   --dvidir=DIR            dvi documentation [DOCDIR]
1941   --pdfdir=DIR            pdf documentation [DOCDIR]
1942   --psdir=DIR             ps documentation [DOCDIR]
1943 _ACEOF
1944 
1945   cat <<\_ACEOF
1946 
1947 X features:
1948   --x-includes=DIR    X include files are in DIR
1949   --x-libraries=DIR   X library files are in DIR
1950 
1951 System types:
1952   --build=BUILD     configure for building on BUILD [guessed]
1953   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1954   --target=TARGET   configure for building compilers for TARGET [HOST]
1955 _ACEOF
1956 fi
1957 
1958 if test -n "$ac_init_help"; then
1959   case $ac_init_help in
1960      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1961    esac
1962   cat <<\_ACEOF
1963 
1964 Optional Features:
1965   --disable-option-checking  ignore unrecognized --enable/--with options
1966   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1967   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1968   --enable-openjdk-only   suppress building custom source even if present
1969                           [disabled]
1970   --enable-debug          set the debug level to fastdebug (shorthand for
1971                           --with-debug-level=fastdebug) [disabled]
1972   --enable-headless-only  only build headless (no GUI) support [disabled]
1973   --enable-full-docs      build complete documentation [enabled if all tools
1974                           found]
1975   --disable-unlimited-crypto
1976                           Disable unlimited crypto policy [enabled]
1977   --disable-keep-packaged-modules
1978                           Do not keep packaged modules in jdk image [enable]
1979   --enable-static-build   enable static library build [disabled]
1980   --disable-warnings-as-errors
1981                           do not consider native warnings to be an error
1982                           [enabled]
1983   --enable-debug-symbols  Deprecated. Option is kept for backwards
1984                           compatibility and is ignored
1985   --enable-zip-debug-info Deprecated. Option is kept for backwards
1986                           compatibility and is ignored
1987   --enable-native-coverage
1988                           enable native compilation with code coverage
1989                           data[disabled]
1990   --enable-asan           enable AddressSanitizer if possible [disabled]
1991   --enable-dtrace[=yes/no/auto]
1992                           enable dtrace. Default is auto, where dtrace is
1993                           enabled if all dependencies are present.
1994   --enable-aot[=yes/no/auto]
1995                           enable ahead of time compilation feature. Default is
1996                           auto, where aot is enabled if all dependencies are
1997                           present.
1998   --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
1999                           Default is yes.
2000   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2001                           [enabled]
2002   --disable-freetype-bundling
2003                           disable bundling of the freetype library with the
2004                           build result [enabled on Windows or when using
2005                           --with-freetype, disabled otherwise]
2006   --enable-libffi-bundling
2007                           enable bundling of libffi.so to make the built JDK
2008                           runnable on more systems
2009   --enable-jtreg-failure-handler
2010                           forces build of the jtreg failure handler to be
2011                           enabled, missing dependencies become fatal errors.
2012                           Default is auto, where the failure handler is built
2013                           if all dependencies are present and otherwise just
2014                           disabled.
2015   --disable-generate-classlist
2016                           forces enabling or disabling of the generation of a
2017                           CDS classlist at build time. Default is to generate
2018                           it when either the server or client JVMs are built
2019                           and enable-cds is true.
2020   --enable-sjavac         use sjavac to do fast incremental compiles
2021                           [disabled]
2022   --disable-javac-server  disable javac server [enabled]
2023   --enable-icecc          enable distribted compilation of native code using
2024                           icecc/icecream [disabled]
2025   --disable-precompiled-headers
2026                           disable using precompiled headers when compiling C++
2027                           [enabled]
2028   --enable-ccache         enable using ccache to speed up recompilations
2029                           [disabled]
2030 
2031 Optional Packages:
2032   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2033   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2034   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2035                           support it), e.g. --with-target-bits=32 [guessed]
2036   --with-custom-make-dir  Deprecated. Option is kept for backwards
2037                           compatibility and is ignored
2038   --with-jdk-variant      JDK variant to build (normal) [normal]
2039   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2040                           optimized) [release]
2041   --with-jvm-variants     JVM variants (separated by commas) to build
2042                           (server,client,minimal,core,zero,custom) [server]
2043   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2044                           (arm64,aarch64) [aarch64]
2045   --with-devkit           use this devkit for compilers, tools and resources
2046   --with-sys-root         alias for --with-sysroot for backwards compatability
2047   --with-sysroot          use this directory as sysroot
2048   --with-tools-dir        alias for --with-toolchain-path for backwards
2049                           compatibility
2050   --with-toolchain-path   prepend these directories when searching for
2051                           toolchain binaries (compilers etc)
2052   --with-extra-path       prepend these directories to the default path
2053   --with-sdk-name         use the platform SDK of the given name. [macosx]
2054   --with-conf-name        use this as the name of the configuration [generated
2055                           from important configuration options]
2056   --with-output-sync      set make output sync type if supported by make.
2057                           [recurse]
2058   --with-default-make-target
2059                           set the default make target [exploded-image]
2060   --with-cacerts-file     specify alternative cacerts file
2061   --with-copyright-year   Set copyright year value for build [current year]
2062   --with-milestone        Deprecated. Option is kept for backwards
2063                           compatibility and is ignored
2064   --with-update-version   Deprecated. Option is kept for backwards
2065                           compatibility and is ignored
2066   --with-user-release-suffix
2067                           Deprecated. Option is kept for backwards
2068                           compatibility and is ignored
2069   --with-build-number     Deprecated. Option is kept for backwards
2070                           compatibility and is ignored
2071   --with-version-major    Deprecated. Option is kept for backwards
2072                           compatibility and is ignored
2073   --with-version-minor    Deprecated. Option is kept for backwards
2074                           compatibility and is ignored
2075   --with-version-security Deprecated. Option is kept for backwards
2076                           compatibility and is ignored
2077   --with-vendor-name      Set vendor name [not specified]
2078   --with-version-string   Set version string [calculated]
2079   --with-version-pre      Set the base part of the version 'PRE' field
2080                           (pre-release identifier) ['internal']
2081   --with-version-opt      Set version 'OPT' field (build metadata)
2082                           [<timestamp>.<user>.<dirname>]
2083   --with-version-build    Set version 'BUILD' field (build number) [not
2084                           specified]
2085   --with-version-feature  Set version 'FEATURE' field (first number) [current
2086                           source value]
2087   --with-version-interim  Set version 'INTERIM' field (second number) [current
2088                           source value]
2089   --with-version-update   Set version 'UPDATE' field (third number) [current
2090                           source value]
2091   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2092                           specified]
2093   --with-version-date     Set version date [current source value]
2094   --with-vendor-version-string
2095                           Set vendor version string [not specified]
2096   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2097   --with-build-jdk        path to JDK of same version as is being built[the
2098                           newly built JDK]
2099   --with-import-modules   import a set of prebuilt modules either as a zip
2100                           file or an exploded directory
2101   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2102                           to show possible values [platform dependent]
2103   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2104   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2105   --with-extra-ldflags    extra flags to be used when linking jdk
2106   --with-toolchain-version
2107                           the version of the toolchain to look for, use
2108                           '--help' to show possible values [platform
2109                           dependent]
2110   --with-build-devkit     Devkit to use for the build platform toolchain
2111   --with-jtreg            Regression Test Harness [probed]
2112   --with-jib              Jib dependency management tool [not used]
2113   --with-abi-profile      specify ABI profile for ARM builds
2114                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2115                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2116                           [toolchain dependent]
2117   --with-macosx-version-max
2118                           error on use of newer functionality. [macosx]
2119   --with-native-debug-symbols
2120                           set the native debug symbol configuration (none,
2121                           internal, external, zipped) [varying]
2122   --with-stdc++lib=<static>,<dynamic>,<default>
2123                           force linking of the C++ runtime on Linux to either
2124                           static or dynamic, default is static with dynamic as
2125                           fallback
2126   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2127                           (Windows only) [probed]
2128   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2129                           (Windows only) [probed]
2130   --with-x                use the X Window System
2131   --with-cups             specify prefix directory for the cups package
2132                           (expecting the headers under PATH/include)
2133   --with-cups-include     specify directory for the cups include files
2134   --with-fontconfig       specify prefix directory for the fontconfig package
2135                           (expecting the headers under PATH/include)
2136   --with-fontconfig-include
2137                           specify directory for the fontconfig include files
2138   --with-freetype         specify prefix directory for the freetype package
2139                           (expecting the libraries under PATH/lib and the
2140                           headers under PATH/include)
2141   --with-freetype-include specify directory for the freetype include files
2142   --with-freetype-lib     specify directory for the freetype library
2143   --with-freetype-src     specify directory with freetype sources to
2144                           automatically build the library (experimental,
2145                           Windows-only)
2146   --with-freetype-license if bundling freetype, also bundle this license file
2147   --with-alsa             specify prefix directory for the alsa package
2148                           (expecting the libraries under PATH/lib and the
2149                           headers under PATH/include)
2150   --with-alsa-include     specify directory for the alsa include files
2151   --with-alsa-lib         specify directory for the alsa library
2152   --with-libffi           specify prefix directory for the libffi package
2153                           (expecting the libraries under PATH/lib and the
2154                           headers under PATH/include)
2155   --with-libffi-include   specify directory for the libffi include files
2156   --with-libffi-lib       specify directory for the libffi library
2157   --with-libjpeg          use libjpeg from build system or OpenJDK source
2158                           (system, bundled) [bundled]
2159   --with-giflib           use giflib from build system or OpenJDK source
2160                           (system, bundled) [bundled]
2161   --with-libpng           use libpng from build system or OpenJDK source
2162                           (system, bundled) [bundled]
2163   --with-zlib             use zlib from build system or OpenJDK source
2164                           (system, bundled) [bundled]
2165   --with-lcms             use lcms2 from build system or OpenJDK source
2166                           (system, bundled) [bundled]
2167   --with-dxsdk            Deprecated. Option is kept for backwards
2168                           compatibility and is ignored
2169   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2170                           compatibility and is ignored
2171   --with-dxsdk-include    Deprecated. Option is kept for backwards
2172                           compatibility and is ignored
2173   --with-jvm-features     additional JVM features to enable (separated by
2174                           comma), use '--help' to show possible values [none]
2175   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2176                           compatibility and is ignored
2177   --with-num-cores        number of cores in the build system, e.g.
2178                           --with-num-cores=8 [probed]
2179   --with-memory-size      memory (in MB) available in the build system, e.g.
2180                           --with-memory-size=1024 [probed]
2181   --with-jobs             number of parallel jobs to let make run [calculated
2182                           based on cores and memory]
2183   --with-test-jobs        number of parallel tests jobs to run [based on build
2184                           jobs]
2185   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2186                           invocations of boot JDK, overriding the default
2187                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2188                           -enableassertions"
2189   --with-sjavac-server-java
2190                           use this java binary for running the sjavac
2191                           background server [Boot JDK java]
2192   --with-ccache-dir       where to store ccache files [~/.ccache]
2193 
2194 Some influential environment variables:
2195   BASENAME    Override default value for BASENAME
2196   BASH        Override default value for BASH
2197   CAT         Override default value for CAT
2198   CHMOD       Override default value for CHMOD
2199   CMP         Override default value for CMP
2200   COMM        Override default value for COMM
2201   CP          Override default value for CP
2202   CUT         Override default value for CUT
2203   DATE        Override default value for DATE
2204   DIFF        Override default value for DIFF
2205   DIRNAME     Override default value for DIRNAME
2206   ECHO        Override default value for ECHO
2207   EXPR        Override default value for EXPR
2208   FILE        Override default value for FILE
2209   FIND        Override default value for FIND
2210   HEAD        Override default value for HEAD
2211   GUNZIP      Override default value for GUNZIP
2212   GZIP        Override default value for GZIP
2213   LN          Override default value for LN
2214   LS          Override default value for LS
2215   MKDIR       Override default value for MKDIR
2216   MKTEMP      Override default value for MKTEMP
2217   MV          Override default value for MV
2218   NAWK        Override default value for NAWK
2219   PRINTF      Override default value for PRINTF
2220   RM          Override default value for RM
2221   RMDIR       Override default value for RMDIR
2222   SH          Override default value for SH
2223   SORT        Override default value for SORT
2224   TAIL        Override default value for TAIL
2225   TAR         Override default value for TAR
2226   TEE         Override default value for TEE
2227   TOUCH       Override default value for TOUCH
2228   TR          Override default value for TR
2229   UNAME       Override default value for UNAME
2230   UNIQ        Override default value for UNIQ
2231   WC          Override default value for WC
2232   WHICH       Override default value for WHICH
2233   XARGS       Override default value for XARGS
2234   AWK         Override default value for AWK
2235   GREP        Override default value for GREP
2236   EGREP       Override default value for EGREP
2237   FGREP       Override default value for FGREP
2238   SED         Override default value for SED
2239   CYGPATH     Override default value for CYGPATH
2240   READLINK    Override default value for READLINK
2241   DF          Override default value for DF
2242   CPIO        Override default value for CPIO
2243   NICE        Override default value for NICE
2244   PANDOC      Override default value for PANDOC
2245   MAKE        Override default value for MAKE
2246   UNZIP       Override default value for UNZIP
2247   ZIPEXE      Override default value for ZIPEXE
2248   LDD         Override default value for LDD
2249   READELF     Override default value for READELF
2250   DOT         Override default value for DOT
2251   HG          Override default value for HG
2252   STAT        Override default value for STAT
2253   TIME        Override default value for TIME
2254   FLOCK       Override default value for FLOCK
2255   DTRACE      Override default value for DTRACE
2256   PATCH       Override default value for PATCH
2257   DSYMUTIL    Override default value for DSYMUTIL
2258   XATTR       Override default value for XATTR
2259   CODESIGN    Override default value for CODESIGN
2260   SETFILE     Override default value for SETFILE
2261   PKG_CONFIG  path to pkg-config utility
2262   JAVA        Override default value for JAVA
2263   JAVAC       Override default value for JAVAC
2264   JAVADOC     Override default value for JAVADOC
2265   JAR         Override default value for JAR
2266   JARSIGNER   Override default value for JARSIGNER
2267   CC          C compiler command
2268   CFLAGS      C compiler flags
2269   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2270               nonstandard directory <lib dir>
2271   LIBS        libraries to pass to the linker, e.g. -l<library>
2272   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2273               you have headers in a nonstandard directory <include dir>
2274   CXX         C++ compiler command
2275   CXXFLAGS    C++ compiler flags
2276   CPP         C preprocessor
2277   CXXCPP      C++ preprocessor
2278   AS          Override default value for AS
2279   AR          Override default value for AR
2280   LIPO        Override default value for LIPO
2281   OTOOL       Override default value for OTOOL
2282   INSTALL_NAME_TOOL
2283               Override default value for INSTALL_NAME_TOOL
2284   STRIP       Override default value for STRIP
2285   NM          Override default value for NM
2286   GNM         Override default value for GNM
2287   OBJCOPY     Override default value for OBJCOPY
2288   OBJDUMP     Override default value for OBJDUMP
2289   BUILD_CC    Override default value for BUILD_CC
2290   BUILD_CXX   Override default value for BUILD_CXX
2291   BUILD_NM    Override default value for BUILD_NM
2292   BUILD_AR    Override default value for BUILD_AR
2293   BUILD_OBJCOPY
2294               Override default value for BUILD_OBJCOPY
2295   BUILD_STRIP Override default value for BUILD_STRIP
2296   JTREGEXE    Override default value for JTREGEXE
2297   XMKMF       Path to xmkmf, Makefile generator for X Window System
2298   FREETYPE_CFLAGS
2299               C compiler flags for FREETYPE, overriding pkg-config
2300   FREETYPE_LIBS
2301               linker flags for FREETYPE, overriding pkg-config
2302   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2303   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2304   LIBFFI_CFLAGS
2305               C compiler flags for LIBFFI, overriding pkg-config
2306   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2307   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2308   PNG_LIBS    linker flags for PNG, overriding pkg-config
2309   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2310   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2311   ICECC_CMD   Override default value for ICECC_CMD
2312   ICECC_CREATE_ENV
2313               Override default value for ICECC_CREATE_ENV
2314   ICECC_WRAPPER
2315               Override default value for ICECC_WRAPPER
2316   CCACHE      Override default value for CCACHE
2317 
2318 Use these variables to override the choices made by `configure' or to help
2319 it to find libraries and programs with nonstandard names/locations.
2320 
2321 Report bugs to <build-dev@openjdk.java.net>.
2322 OpenJDK home page: <http://openjdk.java.net>.
2323 _ACEOF
2324 ac_status=$?
2325 fi
2326 
2327 if test "$ac_init_help" = "recursive"; then
2328   # If there are subdirs, report their specific --help.
2329   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2330     test -d "$ac_dir" ||
2331       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2332       continue
2333     ac_builddir=.
2334 
2335 case "$ac_dir" in
2336 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337 *)
2338   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2339   # A ".." for each directory in $ac_dir_suffix.
2340   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2341   case $ac_top_builddir_sub in
2342   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2343   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2344   esac ;;
2345 esac
2346 ac_abs_top_builddir=$ac_pwd
2347 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2348 # for backward compatibility:
2349 ac_top_builddir=$ac_top_build_prefix
2350 
2351 case $srcdir in
2352   .)  # We are building in place.
2353     ac_srcdir=.
2354     ac_top_srcdir=$ac_top_builddir_sub
2355     ac_abs_top_srcdir=$ac_pwd ;;
2356   [\\/]* | ?:[\\/]* )  # Absolute name.
2357     ac_srcdir=$srcdir$ac_dir_suffix;
2358     ac_top_srcdir=$srcdir
2359     ac_abs_top_srcdir=$srcdir ;;
2360   *) # Relative name.
2361     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2362     ac_top_srcdir=$ac_top_build_prefix$srcdir
2363     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2364 esac
2365 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2366 
2367     cd "$ac_dir" || { ac_status=$?; continue; }
2368     # Check for guested configure.
2369     if test -f "$ac_srcdir/configure.gnu"; then
2370       echo &&
2371       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2372     elif test -f "$ac_srcdir/configure"; then
2373       echo &&
2374       $SHELL "$ac_srcdir/configure" --help=recursive
2375     else
2376       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2377     fi || ac_status=$?
2378     cd "$ac_pwd" || { ac_status=$?; break; }
2379   done
2380 fi
2381 
2382 test -n "$ac_init_help" && exit $ac_status
2383 if $ac_init_version; then
2384   cat <<\_ACEOF
2385 OpenJDK configure jdk9
2386 generated by GNU Autoconf 2.69
2387 
2388 Copyright (C) 2012 Free Software Foundation, Inc.
2389 This configure script is free software; the Free Software Foundation
2390 gives unlimited permission to copy, distribute and modify it.
2391 _ACEOF
2392   exit
2393 fi
2394 
2395 ## ------------------------ ##
2396 ## Autoconf initialization. ##
2397 ## ------------------------ ##
2398 
2399 # ac_fn_c_try_compile LINENO
2400 # --------------------------
2401 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2402 ac_fn_c_try_compile ()
2403 {
2404   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2405   rm -f conftest.$ac_objext
2406   if { { ac_try="$ac_compile"
2407 case "(($ac_try" in
2408   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2409   *) ac_try_echo=$ac_try;;
2410 esac
2411 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2412 $as_echo "$ac_try_echo"; } >&5
2413   (eval "$ac_compile") 2>conftest.err
2414   ac_status=$?
2415   if test -s conftest.err; then
2416     grep -v '^ *+' conftest.err >conftest.er1
2417     cat conftest.er1 >&5
2418     mv -f conftest.er1 conftest.err
2419   fi
2420   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2421   test $ac_status = 0; } && {
2422          test -z "$ac_c_werror_flag" ||
2423          test ! -s conftest.err
2424        } && test -s conftest.$ac_objext; then :
2425   ac_retval=0
2426 else
2427   $as_echo "$as_me: failed program was:" >&5
2428 sed 's/^/| /' conftest.$ac_ext >&5
2429 
2430         ac_retval=1
2431 fi
2432   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2433   as_fn_set_status $ac_retval
2434 
2435 } # ac_fn_c_try_compile
2436 
2437 # ac_fn_cxx_try_compile LINENO
2438 # ----------------------------
2439 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2440 ac_fn_cxx_try_compile ()
2441 {
2442   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2443   rm -f conftest.$ac_objext
2444   if { { ac_try="$ac_compile"
2445 case "(($ac_try" in
2446   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2447   *) ac_try_echo=$ac_try;;
2448 esac
2449 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2450 $as_echo "$ac_try_echo"; } >&5
2451   (eval "$ac_compile") 2>conftest.err
2452   ac_status=$?
2453   if test -s conftest.err; then
2454     grep -v '^ *+' conftest.err >conftest.er1
2455     cat conftest.er1 >&5
2456     mv -f conftest.er1 conftest.err
2457   fi
2458   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2459   test $ac_status = 0; } && {
2460          test -z "$ac_cxx_werror_flag" ||
2461          test ! -s conftest.err
2462        } && test -s conftest.$ac_objext; then :
2463   ac_retval=0
2464 else
2465   $as_echo "$as_me: failed program was:" >&5
2466 sed 's/^/| /' conftest.$ac_ext >&5
2467 
2468         ac_retval=1
2469 fi
2470   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471   as_fn_set_status $ac_retval
2472 
2473 } # ac_fn_cxx_try_compile
2474 
2475 # ac_fn_c_try_cpp LINENO
2476 # ----------------------
2477 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2478 ac_fn_c_try_cpp ()
2479 {
2480   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2481   if { { ac_try="$ac_cpp conftest.$ac_ext"
2482 case "(($ac_try" in
2483   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484   *) ac_try_echo=$ac_try;;
2485 esac
2486 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487 $as_echo "$ac_try_echo"; } >&5
2488   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2489   ac_status=$?
2490   if test -s conftest.err; then
2491     grep -v '^ *+' conftest.err >conftest.er1
2492     cat conftest.er1 >&5
2493     mv -f conftest.er1 conftest.err
2494   fi
2495   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496   test $ac_status = 0; } > conftest.i && {
2497          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2498          test ! -s conftest.err
2499        }; then :
2500   ac_retval=0
2501 else
2502   $as_echo "$as_me: failed program was:" >&5
2503 sed 's/^/| /' conftest.$ac_ext >&5
2504 
2505     ac_retval=1
2506 fi
2507   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2508   as_fn_set_status $ac_retval
2509 
2510 } # ac_fn_c_try_cpp
2511 
2512 # ac_fn_cxx_try_cpp LINENO
2513 # ------------------------
2514 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2515 ac_fn_cxx_try_cpp ()
2516 {
2517   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2518   if { { ac_try="$ac_cpp conftest.$ac_ext"
2519 case "(($ac_try" in
2520   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2521   *) ac_try_echo=$ac_try;;
2522 esac
2523 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2524 $as_echo "$ac_try_echo"; } >&5
2525   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2526   ac_status=$?
2527   if test -s conftest.err; then
2528     grep -v '^ *+' conftest.err >conftest.er1
2529     cat conftest.er1 >&5
2530     mv -f conftest.er1 conftest.err
2531   fi
2532   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2533   test $ac_status = 0; } > conftest.i && {
2534          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2535          test ! -s conftest.err
2536        }; then :
2537   ac_retval=0
2538 else
2539   $as_echo "$as_me: failed program was:" >&5
2540 sed 's/^/| /' conftest.$ac_ext >&5
2541 
2542     ac_retval=1
2543 fi
2544   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2545   as_fn_set_status $ac_retval
2546 
2547 } # ac_fn_cxx_try_cpp
2548 
2549 # ac_fn_c_try_link LINENO
2550 # -----------------------
2551 # Try to link conftest.$ac_ext, and return whether this succeeded.
2552 ac_fn_c_try_link ()
2553 {
2554   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2555   rm -f conftest.$ac_objext conftest$ac_exeext
2556   if { { ac_try="$ac_link"
2557 case "(($ac_try" in
2558   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2559   *) ac_try_echo=$ac_try;;
2560 esac
2561 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2562 $as_echo "$ac_try_echo"; } >&5
2563   (eval "$ac_link") 2>conftest.err
2564   ac_status=$?
2565   if test -s conftest.err; then
2566     grep -v '^ *+' conftest.err >conftest.er1
2567     cat conftest.er1 >&5
2568     mv -f conftest.er1 conftest.err
2569   fi
2570   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2571   test $ac_status = 0; } && {
2572          test -z "$ac_c_werror_flag" ||
2573          test ! -s conftest.err
2574        } && test -s conftest$ac_exeext && {
2575          test "$cross_compiling" = yes ||
2576          test -x conftest$ac_exeext
2577        }; then :
2578   ac_retval=0
2579 else
2580   $as_echo "$as_me: failed program was:" >&5
2581 sed 's/^/| /' conftest.$ac_ext >&5
2582 
2583         ac_retval=1
2584 fi
2585   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2586   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2587   # interfere with the next link command; also delete a directory that is
2588   # left behind by Apple's compiler.  We do this before executing the actions.
2589   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2590   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2591   as_fn_set_status $ac_retval
2592 
2593 } # ac_fn_c_try_link
2594 
2595 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2596 # ---------------------------------------------------------
2597 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2598 # the include files in INCLUDES and setting the cache variable VAR
2599 # accordingly.
2600 ac_fn_cxx_check_header_mongrel ()
2601 {
2602   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2603   if eval \${$3+:} false; then :
2604   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2605 $as_echo_n "checking for $2... " >&6; }
2606 if eval \${$3+:} false; then :
2607   $as_echo_n "(cached) " >&6
2608 fi
2609 eval ac_res=\$$3
2610                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2611 $as_echo "$ac_res" >&6; }
2612 else
2613   # Is the header compilable?
2614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2615 $as_echo_n "checking $2 usability... " >&6; }
2616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2617 /* end confdefs.h.  */
2618 $4
2619 #include <$2>
2620 _ACEOF
2621 if ac_fn_cxx_try_compile "$LINENO"; then :
2622   ac_header_compiler=yes
2623 else
2624   ac_header_compiler=no
2625 fi
2626 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2627 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2628 $as_echo "$ac_header_compiler" >&6; }
2629 
2630 # Is the header present?
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2632 $as_echo_n "checking $2 presence... " >&6; }
2633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634 /* end confdefs.h.  */
2635 #include <$2>
2636 _ACEOF
2637 if ac_fn_cxx_try_cpp "$LINENO"; then :
2638   ac_header_preproc=yes
2639 else
2640   ac_header_preproc=no
2641 fi
2642 rm -f conftest.err conftest.i conftest.$ac_ext
2643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2644 $as_echo "$ac_header_preproc" >&6; }
2645 
2646 # So?  What about this header?
2647 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2648   yes:no: )
2649     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2650 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2651     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2652 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2653     ;;
2654   no:yes:* )
2655     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2656 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2657     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2658 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2659     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2660 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2661     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2662 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2663     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2664 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2665 ( $as_echo "## ----------------------------------------- ##
2666 ## Report this to build-dev@openjdk.java.net ##
2667 ## ----------------------------------------- ##"
2668      ) | sed "s/^/$as_me: WARNING:     /" >&2
2669     ;;
2670 esac
2671   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2672 $as_echo_n "checking for $2... " >&6; }
2673 if eval \${$3+:} false; then :
2674   $as_echo_n "(cached) " >&6
2675 else
2676   eval "$3=\$ac_header_compiler"
2677 fi
2678 eval ac_res=\$$3
2679                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2680 $as_echo "$ac_res" >&6; }
2681 fi
2682   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2683 
2684 } # ac_fn_cxx_check_header_mongrel
2685 
2686 # ac_fn_cxx_try_run LINENO
2687 # ------------------------
2688 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2689 # that executables *can* be run.
2690 ac_fn_cxx_try_run ()
2691 {
2692   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2693   if { { ac_try="$ac_link"
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_link") 2>&5
2701   ac_status=$?
2702   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2704   { { case "(($ac_try" in
2705   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2706   *) ac_try_echo=$ac_try;;
2707 esac
2708 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2709 $as_echo "$ac_try_echo"; } >&5
2710   (eval "$ac_try") 2>&5
2711   ac_status=$?
2712   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2713   test $ac_status = 0; }; }; then :
2714   ac_retval=0
2715 else
2716   $as_echo "$as_me: program exited with status $ac_status" >&5
2717        $as_echo "$as_me: failed program was:" >&5
2718 sed 's/^/| /' conftest.$ac_ext >&5
2719 
2720        ac_retval=$ac_status
2721 fi
2722   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2723   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2724   as_fn_set_status $ac_retval
2725 
2726 } # ac_fn_cxx_try_run
2727 
2728 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2729 # ---------------------------------------------------------
2730 # Tests whether HEADER exists and can be compiled using the include files in
2731 # INCLUDES, setting the cache variable VAR accordingly.
2732 ac_fn_cxx_check_header_compile ()
2733 {
2734   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2735   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2736 $as_echo_n "checking for $2... " >&6; }
2737 if eval \${$3+:} false; then :
2738   $as_echo_n "(cached) " >&6
2739 else
2740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2741 /* end confdefs.h.  */
2742 $4
2743 #include <$2>
2744 _ACEOF
2745 if ac_fn_cxx_try_compile "$LINENO"; then :
2746   eval "$3=yes"
2747 else
2748   eval "$3=no"
2749 fi
2750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2751 fi
2752 eval ac_res=\$$3
2753                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2754 $as_echo "$ac_res" >&6; }
2755   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2756 
2757 } # ac_fn_cxx_check_header_compile
2758 
2759 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2760 # ----------------------------------------------
2761 # Tries to find the compile-time value of EXPR in a program that includes
2762 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2763 # computed
2764 ac_fn_cxx_compute_int ()
2765 {
2766   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2767   if test "$cross_compiling" = yes; then
2768     # Depending upon the size, compute the lo and hi bounds.
2769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2770 /* end confdefs.h.  */
2771 $4
2772 int
2773 main ()
2774 {
2775 static int test_array [1 - 2 * !(($2) >= 0)];
2776 test_array [0] = 0;
2777 return test_array [0];
2778 
2779   ;
2780   return 0;
2781 }
2782 _ACEOF
2783 if ac_fn_cxx_try_compile "$LINENO"; then :
2784   ac_lo=0 ac_mid=0
2785   while :; do
2786     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787 /* end confdefs.h.  */
2788 $4
2789 int
2790 main ()
2791 {
2792 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2793 test_array [0] = 0;
2794 return test_array [0];
2795 
2796   ;
2797   return 0;
2798 }
2799 _ACEOF
2800 if ac_fn_cxx_try_compile "$LINENO"; then :
2801   ac_hi=$ac_mid; break
2802 else
2803   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2804                         if test $ac_lo -le $ac_mid; then
2805                           ac_lo= ac_hi=
2806                           break
2807                         fi
2808                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2809 fi
2810 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2811   done
2812 else
2813   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2814 /* end confdefs.h.  */
2815 $4
2816 int
2817 main ()
2818 {
2819 static int test_array [1 - 2 * !(($2) < 0)];
2820 test_array [0] = 0;
2821 return test_array [0];
2822 
2823   ;
2824   return 0;
2825 }
2826 _ACEOF
2827 if ac_fn_cxx_try_compile "$LINENO"; then :
2828   ac_hi=-1 ac_mid=-1
2829   while :; do
2830     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831 /* end confdefs.h.  */
2832 $4
2833 int
2834 main ()
2835 {
2836 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2837 test_array [0] = 0;
2838 return test_array [0];
2839 
2840   ;
2841   return 0;
2842 }
2843 _ACEOF
2844 if ac_fn_cxx_try_compile "$LINENO"; then :
2845   ac_lo=$ac_mid; break
2846 else
2847   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2848                         if test $ac_mid -le $ac_hi; then
2849                           ac_lo= ac_hi=
2850                           break
2851                         fi
2852                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2853 fi
2854 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2855   done
2856 else
2857   ac_lo= ac_hi=
2858 fi
2859 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2860 fi
2861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2862 # Binary search between lo and hi bounds.
2863 while test "x$ac_lo" != "x$ac_hi"; do
2864   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2865   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866 /* end confdefs.h.  */
2867 $4
2868 int
2869 main ()
2870 {
2871 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2872 test_array [0] = 0;
2873 return test_array [0];
2874 
2875   ;
2876   return 0;
2877 }
2878 _ACEOF
2879 if ac_fn_cxx_try_compile "$LINENO"; then :
2880   ac_hi=$ac_mid
2881 else
2882   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2883 fi
2884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885 done
2886 case $ac_lo in #((
2887 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2888 '') ac_retval=1 ;;
2889 esac
2890   else
2891     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2892 /* end confdefs.h.  */
2893 $4
2894 static long int longval () { return $2; }
2895 static unsigned long int ulongval () { return $2; }
2896 #include <stdio.h>
2897 #include <stdlib.h>
2898 int
2899 main ()
2900 {
2901 
2902   FILE *f = fopen ("conftest.val", "w");
2903   if (! f)
2904     return 1;
2905   if (($2) < 0)
2906     {
2907       long int i = longval ();
2908       if (i != ($2))
2909         return 1;
2910       fprintf (f, "%ld", i);
2911     }
2912   else
2913     {
2914       unsigned long int i = ulongval ();
2915       if (i != ($2))
2916         return 1;
2917       fprintf (f, "%lu", i);
2918     }
2919   /* Do not output a trailing newline, as this causes \r\n confusion
2920      on some platforms.  */
2921   return ferror (f) || fclose (f) != 0;
2922 
2923   ;
2924   return 0;
2925 }
2926 _ACEOF
2927 if ac_fn_cxx_try_run "$LINENO"; then :
2928   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2929 else
2930   ac_retval=1
2931 fi
2932 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2933   conftest.$ac_objext conftest.beam conftest.$ac_ext
2934 rm -f conftest.val
2935 
2936   fi
2937   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2938   as_fn_set_status $ac_retval
2939 
2940 } # ac_fn_cxx_compute_int
2941 
2942 # ac_fn_cxx_try_link LINENO
2943 # -------------------------
2944 # Try to link conftest.$ac_ext, and return whether this succeeded.
2945 ac_fn_cxx_try_link ()
2946 {
2947   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2948   rm -f conftest.$ac_objext conftest$ac_exeext
2949   if { { ac_try="$ac_link"
2950 case "(($ac_try" in
2951   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2952   *) ac_try_echo=$ac_try;;
2953 esac
2954 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2955 $as_echo "$ac_try_echo"; } >&5
2956   (eval "$ac_link") 2>conftest.err
2957   ac_status=$?
2958   if test -s conftest.err; then
2959     grep -v '^ *+' conftest.err >conftest.er1
2960     cat conftest.er1 >&5
2961     mv -f conftest.er1 conftest.err
2962   fi
2963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2964   test $ac_status = 0; } && {
2965          test -z "$ac_cxx_werror_flag" ||
2966          test ! -s conftest.err
2967        } && test -s conftest$ac_exeext && {
2968          test "$cross_compiling" = yes ||
2969          test -x conftest$ac_exeext
2970        }; then :
2971   ac_retval=0
2972 else
2973   $as_echo "$as_me: failed program was:" >&5
2974 sed 's/^/| /' conftest.$ac_ext >&5
2975 
2976         ac_retval=1
2977 fi
2978   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2979   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2980   # interfere with the next link command; also delete a directory that is
2981   # left behind by Apple's compiler.  We do this before executing the actions.
2982   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2983   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2984   as_fn_set_status $ac_retval
2985 
2986 } # ac_fn_cxx_try_link
2987 
2988 # ac_fn_cxx_check_func LINENO FUNC VAR
2989 # ------------------------------------
2990 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2991 ac_fn_cxx_check_func ()
2992 {
2993   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2994   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2995 $as_echo_n "checking for $2... " >&6; }
2996 if eval \${$3+:} false; then :
2997   $as_echo_n "(cached) " >&6
2998 else
2999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3000 /* end confdefs.h.  */
3001 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3002    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3003 #define $2 innocuous_$2
3004 
3005 /* System header to define __stub macros and hopefully few prototypes,
3006     which can conflict with char $2 (); below.
3007     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3008     <limits.h> exists even on freestanding compilers.  */
3009 
3010 #ifdef __STDC__
3011 # include <limits.h>
3012 #else
3013 # include <assert.h>
3014 #endif
3015 
3016 #undef $2
3017 
3018 /* Override any GCC internal prototype to avoid an error.
3019    Use char because int might match the return type of a GCC
3020    builtin and then its argument prototype would still apply.  */
3021 #ifdef __cplusplus
3022 extern "C"
3023 #endif
3024 char $2 ();
3025 /* The GNU C library defines this for functions which it implements
3026     to always fail with ENOSYS.  Some functions are actually named
3027     something starting with __ and the normal name is an alias.  */
3028 #if defined __stub_$2 || defined __stub___$2
3029 choke me
3030 #endif
3031 
3032 int
3033 main ()
3034 {
3035 return $2 ();
3036   ;
3037   return 0;
3038 }
3039 _ACEOF
3040 if ac_fn_cxx_try_link "$LINENO"; then :
3041   eval "$3=yes"
3042 else
3043   eval "$3=no"
3044 fi
3045 rm -f core conftest.err conftest.$ac_objext \
3046     conftest$ac_exeext conftest.$ac_ext
3047 fi
3048 eval ac_res=\$$3
3049                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3050 $as_echo "$ac_res" >&6; }
3051   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3052 
3053 } # ac_fn_cxx_check_func
3054 
3055 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3056 # -------------------------------------------------------
3057 # Tests whether HEADER exists and can be compiled using the include files in
3058 # INCLUDES, setting the cache variable VAR accordingly.
3059 ac_fn_c_check_header_compile ()
3060 {
3061   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3063 $as_echo_n "checking for $2... " >&6; }
3064 if eval \${$3+:} false; then :
3065   $as_echo_n "(cached) " >&6
3066 else
3067   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3068 /* end confdefs.h.  */
3069 $4
3070 #include <$2>
3071 _ACEOF
3072 if ac_fn_c_try_compile "$LINENO"; then :
3073   eval "$3=yes"
3074 else
3075   eval "$3=no"
3076 fi
3077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3078 fi
3079 eval ac_res=\$$3
3080                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3081 $as_echo "$ac_res" >&6; }
3082   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3083 
3084 } # ac_fn_c_check_header_compile
3085 cat >config.log <<_ACEOF
3086 This file contains any messages produced by compilers while
3087 running configure, to aid debugging if configure makes a mistake.
3088 
3089 It was created by OpenJDK $as_me jdk9, which was
3090 generated by GNU Autoconf 2.69.  Invocation command line was
3091 
3092   $ $0 $@
3093 
3094 _ACEOF
3095 exec 5>>config.log
3096 {
3097 cat <<_ASUNAME
3098 ## --------- ##
3099 ## Platform. ##
3100 ## --------- ##
3101 
3102 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3103 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3104 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3105 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3106 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3107 
3108 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3109 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3110 
3111 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3112 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3113 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3114 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3115 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3116 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3117 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3118 
3119 _ASUNAME
3120 
3121 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3122 for as_dir in $PATH
3123 do
3124   IFS=$as_save_IFS
3125   test -z "$as_dir" && as_dir=.
3126     $as_echo "PATH: $as_dir"
3127   done
3128 IFS=$as_save_IFS
3129 
3130 } >&5
3131 
3132 cat >&5 <<_ACEOF
3133 
3134 
3135 ## ----------- ##
3136 ## Core tests. ##
3137 ## ----------- ##
3138 
3139 _ACEOF
3140 
3141 
3142 # Keep a trace of the command line.
3143 # Strip out --no-create and --no-recursion so they do not pile up.
3144 # Strip out --silent because we don't want to record it for future runs.
3145 # Also quote any args containing shell meta-characters.
3146 # Make two passes to allow for proper duplicate-argument suppression.
3147 ac_configure_args=
3148 ac_configure_args0=
3149 ac_configure_args1=
3150 ac_must_keep_next=false
3151 for ac_pass in 1 2
3152 do
3153   for ac_arg
3154   do
3155     case $ac_arg in
3156     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3157     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3158     | -silent | --silent | --silen | --sile | --sil)
3159       continue ;;
3160     *\'*)
3161       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3162     esac
3163     case $ac_pass in
3164     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3165     2)
3166       as_fn_append ac_configure_args1 " '$ac_arg'"
3167       if test $ac_must_keep_next = true; then
3168         ac_must_keep_next=false # Got value, back to normal.
3169       else
3170         case $ac_arg in
3171           *=* | --config-cache | -C | -disable-* | --disable-* \
3172           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3173           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3174           | -with-* | --with-* | -without-* | --without-* | --x)
3175             case "$ac_configure_args0 " in
3176               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3177             esac
3178             ;;
3179           -* ) ac_must_keep_next=true ;;
3180         esac
3181       fi
3182       as_fn_append ac_configure_args " '$ac_arg'"
3183       ;;
3184     esac
3185   done
3186 done
3187 { ac_configure_args0=; unset ac_configure_args0;}
3188 { ac_configure_args1=; unset ac_configure_args1;}
3189 
3190 # When interrupted or exit'd, cleanup temporary files, and complete
3191 # config.log.  We remove comments because anyway the quotes in there
3192 # would cause problems or look ugly.
3193 # WARNING: Use '\'' to represent an apostrophe within the trap.
3194 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3195 trap 'exit_status=$?
3196   # Save into config.log some information that might help in debugging.
3197   {
3198     echo
3199 
3200     $as_echo "## ---------------- ##
3201 ## Cache variables. ##
3202 ## ---------------- ##"
3203     echo
3204     # The following way of writing the cache mishandles newlines in values,
3205 (
3206   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3207     eval ac_val=\$$ac_var
3208     case $ac_val in #(
3209     *${as_nl}*)
3210       case $ac_var in #(
3211       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3212 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3213       esac
3214       case $ac_var in #(
3215       _ | IFS | as_nl) ;; #(
3216       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3217       *) { eval $ac_var=; unset $ac_var;} ;;
3218       esac ;;
3219     esac
3220   done
3221   (set) 2>&1 |
3222     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3223     *${as_nl}ac_space=\ *)
3224       sed -n \
3225         "s/'\''/'\''\\\\'\'''\''/g;
3226           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3227       ;; #(
3228     *)
3229       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3230       ;;
3231     esac |
3232     sort
3233 )
3234     echo
3235 
3236     $as_echo "## ----------------- ##
3237 ## Output variables. ##
3238 ## ----------------- ##"
3239     echo
3240     for ac_var in $ac_subst_vars
3241     do
3242       eval ac_val=\$$ac_var
3243       case $ac_val in
3244       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3245       esac
3246       $as_echo "$ac_var='\''$ac_val'\''"
3247     done | sort
3248     echo
3249 
3250     if test -n "$ac_subst_files"; then
3251       $as_echo "## ------------------- ##
3252 ## File substitutions. ##
3253 ## ------------------- ##"
3254       echo
3255       for ac_var in $ac_subst_files
3256       do
3257         eval ac_val=\$$ac_var
3258         case $ac_val in
3259         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3260         esac
3261         $as_echo "$ac_var='\''$ac_val'\''"
3262       done | sort
3263       echo
3264     fi
3265 
3266     if test -s confdefs.h; then
3267       $as_echo "## ----------- ##
3268 ## confdefs.h. ##
3269 ## ----------- ##"
3270       echo
3271       cat confdefs.h
3272       echo
3273     fi
3274     test "$ac_signal" != 0 &&
3275       $as_echo "$as_me: caught signal $ac_signal"
3276     $as_echo "$as_me: exit $exit_status"
3277   } >&5
3278   rm -f core *.core core.conftest.* &&
3279     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3280     exit $exit_status
3281 ' 0
3282 for ac_signal in 1 2 13 15; do
3283   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3284 done
3285 ac_signal=0
3286 
3287 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3288 rm -f -r conftest* confdefs.h
3289 
3290 $as_echo "/* confdefs.h */" > confdefs.h
3291 
3292 # Predefined preprocessor variables.
3293 
3294 cat >>confdefs.h <<_ACEOF
3295 #define PACKAGE_NAME "$PACKAGE_NAME"
3296 _ACEOF
3297 
3298 cat >>confdefs.h <<_ACEOF
3299 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3300 _ACEOF
3301 
3302 cat >>confdefs.h <<_ACEOF
3303 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3304 _ACEOF
3305 
3306 cat >>confdefs.h <<_ACEOF
3307 #define PACKAGE_STRING "$PACKAGE_STRING"
3308 _ACEOF
3309 
3310 cat >>confdefs.h <<_ACEOF
3311 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3312 _ACEOF
3313 
3314 cat >>confdefs.h <<_ACEOF
3315 #define PACKAGE_URL "$PACKAGE_URL"
3316 _ACEOF
3317 
3318 
3319 # Let the site file select an alternate cache file if it wants to.
3320 # Prefer an explicitly selected file to automatically selected ones.
3321 ac_site_file1=NONE
3322 ac_site_file2=NONE
3323 if test -n "$CONFIG_SITE"; then
3324   # We do not want a PATH search for config.site.
3325   case $CONFIG_SITE in #((
3326     -*)  ac_site_file1=./$CONFIG_SITE;;
3327     */*) ac_site_file1=$CONFIG_SITE;;
3328     *)   ac_site_file1=./$CONFIG_SITE;;
3329   esac
3330 elif test "x$prefix" != xNONE; then
3331   ac_site_file1=$prefix/share/config.site
3332   ac_site_file2=$prefix/etc/config.site
3333 else
3334   ac_site_file1=$ac_default_prefix/share/config.site
3335   ac_site_file2=$ac_default_prefix/etc/config.site
3336 fi
3337 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3338 do
3339   test "x$ac_site_file" = xNONE && continue
3340   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3341     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3342 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3343     sed 's/^/| /' "$ac_site_file" >&5
3344     . "$ac_site_file" \
3345       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3346 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3347 as_fn_error $? "failed to load site script $ac_site_file
3348 See \`config.log' for more details" "$LINENO" 5; }
3349   fi
3350 done
3351 
3352 if test -r "$cache_file"; then
3353   # Some versions of bash will fail to source /dev/null (special files
3354   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3355   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3356     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3357 $as_echo "$as_me: loading cache $cache_file" >&6;}
3358     case $cache_file in
3359       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3360       *)                      . "./$cache_file";;
3361     esac
3362   fi
3363 else
3364   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3365 $as_echo "$as_me: creating cache $cache_file" >&6;}
3366   >$cache_file
3367 fi
3368 
3369 # Check that the precious variables saved in the cache have kept the same
3370 # value.
3371 ac_cache_corrupted=false
3372 for ac_var in $ac_precious_vars; do
3373   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3374   eval ac_new_set=\$ac_env_${ac_var}_set
3375   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3376   eval ac_new_val=\$ac_env_${ac_var}_value
3377   case $ac_old_set,$ac_new_set in
3378     set,)
3379       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3380 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3381       ac_cache_corrupted=: ;;
3382     ,set)
3383       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3384 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3385       ac_cache_corrupted=: ;;
3386     ,);;
3387     *)
3388       if test "x$ac_old_val" != "x$ac_new_val"; then
3389         # differences in whitespace do not lead to failure.
3390         ac_old_val_w=`echo x $ac_old_val`
3391         ac_new_val_w=`echo x $ac_new_val`
3392         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3393           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3394 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3395           ac_cache_corrupted=:
3396         else
3397           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3398 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3399           eval $ac_var=\$ac_old_val
3400         fi
3401         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3402 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3403         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3404 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3405       fi;;
3406   esac
3407   # Pass precious variables to config.status.
3408   if test "$ac_new_set" = set; then
3409     case $ac_new_val in
3410     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3411     *) ac_arg=$ac_var=$ac_new_val ;;
3412     esac
3413     case " $ac_configure_args " in
3414       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3415       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3416     esac
3417   fi
3418 done
3419 if $ac_cache_corrupted; then
3420   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3421 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3422   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3423 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3424   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3425 fi
3426 ## -------------------- ##
3427 ## Main body of script. ##
3428 ## -------------------- ##
3429 
3430 ac_ext=c
3431 ac_cpp='$CPP $CPPFLAGS'
3432 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3433 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3434 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3435 
3436 
3437 
3438 ac_aux_dir=
3439 for ac_dir in $TOPDIR/make/autoconf/build-aux "$srcdir"/$TOPDIR/make/autoconf/build-aux; do
3440   if test -f "$ac_dir/install-sh"; then
3441     ac_aux_dir=$ac_dir
3442     ac_install_sh="$ac_aux_dir/install-sh -c"
3443     break
3444   elif test -f "$ac_dir/install.sh"; then
3445     ac_aux_dir=$ac_dir
3446     ac_install_sh="$ac_aux_dir/install.sh -c"
3447     break
3448   elif test -f "$ac_dir/shtool"; then
3449     ac_aux_dir=$ac_dir
3450     ac_install_sh="$ac_aux_dir/shtool install -c"
3451     break
3452   fi
3453 done
3454 if test -z "$ac_aux_dir"; then
3455   as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/make/autoconf/build-aux \"$srcdir\"/$TOPDIR/make/autoconf/build-aux" "$LINENO" 5
3456 fi
3457 
3458 # These three variables are undocumented and unsupported,
3459 # and are intended to be withdrawn in a future Autoconf release.
3460 # They can cause serious problems if a builder's source tree is in a directory
3461 # whose full name contains unusual characters.
3462 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3463 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3464 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3465 
3466 
3467 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3468 
3469 #
3470 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3471 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3472 #
3473 # This code is free software; you can redistribute it and/or modify it
3474 # under the terms of the GNU General Public License version 2 only, as
3475 # published by the Free Software Foundation.  Oracle designates this
3476 # particular file as subject to the "Classpath" exception as provided
3477 # by Oracle in the LICENSE file that accompanied this code.
3478 #
3479 # This code is distributed in the hope that it will be useful, but WITHOUT
3480 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3481 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3482 # version 2 for more details (a copy is included in the LICENSE file that
3483 # accompanied this code).
3484 #
3485 # You should have received a copy of the GNU General Public License version
3486 # 2 along with this work; if not, write to the Free Software Foundation,
3487 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3488 #
3489 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3490 # or visit www.oracle.com if you need additional information or have any
3491 # questions.
3492 #
3493 
3494 #
3495 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3496 #
3497 # This program is free software; you can redistribute it and/or modify
3498 # it under the terms of the GNU General Public License as published by
3499 # the Free Software Foundation; either version 2 of the License, or
3500 # (at your option) any later version.
3501 #
3502 # This program is distributed in the hope that it will be useful, but
3503 # WITHOUT ANY WARRANTY; without even the implied warranty of
3504 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3505 # General Public License for more details.
3506 #
3507 # You should have received a copy of the GNU General Public License
3508 # along with this program; if not, write to the Free Software
3509 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3510 #
3511 # As a special exception to the GNU General Public License, if you
3512 # distribute this file as part of a program that contains a
3513 # configuration script generated by Autoconf, you may include it under
3514 # the same distribution terms that you use for the rest of that program.
3515 
3516 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3517 # ----------------------------------
3518 # PKG_PROG_PKG_CONFIG
3519 
3520 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3521 #
3522 # Check to see whether a particular set of modules exists.  Similar
3523 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3524 #
3525 #
3526 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3527 # this or PKG_CHECK_MODULES is called, or make sure to call
3528 # PKG_CHECK_EXISTS manually
3529 # --------------------------------------------------------------
3530 
3531 
3532 
3533 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3534 # ---------------------------------------------
3535 # _PKG_CONFIG
3536 
3537 # _PKG_SHORT_ERRORS_SUPPORTED
3538 # -----------------------------
3539 # _PKG_SHORT_ERRORS_SUPPORTED
3540 
3541 
3542 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3543 # [ACTION-IF-NOT-FOUND])
3544 #
3545 #
3546 # Note that if there is a possibility the first call to
3547 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3548 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3549 #
3550 #
3551 # --------------------------------------------------------------
3552 # PKG_CHECK_MODULES
3553 
3554 
3555 # Include these first...
3556 #
3557 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3558 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3559 #
3560 # This code is free software; you can redistribute it and/or modify it
3561 # under the terms of the GNU General Public License version 2 only, as
3562 # published by the Free Software Foundation.  Oracle designates this
3563 # particular file as subject to the "Classpath" exception as provided
3564 # by Oracle in the LICENSE file that accompanied this code.
3565 #
3566 # This code is distributed in the hope that it will be useful, but WITHOUT
3567 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3568 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3569 # version 2 for more details (a copy is included in the LICENSE file that
3570 # accompanied this code).
3571 #
3572 # You should have received a copy of the GNU General Public License version
3573 # 2 along with this work; if not, write to the Free Software Foundation,
3574 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3575 #
3576 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3577 # or visit www.oracle.com if you need additional information or have any
3578 # questions.
3579 #
3580 
3581 # Create a function/macro that takes a series of named arguments. The call is
3582 # similar to AC_DEFUN, but the setup of the function looks like this:
3583 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3584 # ... do something
3585 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3586 # ])
3587 # A star (*) in front of a named argument means that it is required and it's
3588 # presence will be verified. To pass e.g. the first value as a normal indexed
3589 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3590 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3591 # "ARG_FOO".
3592 #
3593 # The generated function can be called like this:
3594 # MYFUNC(FOO: [foo-val],
3595 #     BAR: [
3596 #         $ECHO hello world
3597 #     ])
3598 # Note that the argument value must start on the same line as the argument name.
3599 #
3600 # Argument 1: Name of the function to define
3601 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3602 # Argument 3: Argument array to treat as named, typically $@
3603 # Argument 4: The main function body
3604 
3605 
3606 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3607 # If so, then append $1 to $2 \
3608 # Also set JVM_ARG_OK to true/false depending on outcome.
3609 
3610 
3611 # Appends a string to a path variable, only adding the : when needed.
3612 
3613 
3614 # Prepends a string to a path variable, only adding the : when needed.
3615 
3616 
3617 # This will make sure the given variable points to a full and proper
3618 # 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 # $1: The name of the variable to fix
3625 
3626 
3627 # This will make sure the given variable points to a executable
3628 # with a full and proper path. This means:
3629 # 1) There will be no spaces in the path. On unix platforms,
3630 #    spaces in the path will result in an error. On Windows,
3631 #    the path will be rewritten using short-style to be space-free.
3632 # 2) The path will be absolute, and it will be in unix-style (on
3633 #     cygwin).
3634 # Any arguments given to the executable is preserved.
3635 # If the input variable does not have a directory specification, then
3636 # it need to be in the PATH.
3637 # $1: The name of the variable to fix
3638 
3639 
3640 
3641 
3642 # Register a --with argument but mark it as deprecated
3643 # $1: The name of the with argument to deprecate, not including --with-
3644 
3645 
3646 # Register a --enable argument but mark it as deprecated
3647 # $1: The name of the with argument to deprecate, not including --enable-
3648 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3649 # $3: Messages to user.
3650 
3651 
3652 
3653 
3654 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3655 # $1: variable to check
3656 
3657 
3658 # Check that there are no unprocessed overridden variables left.
3659 # If so, they are an incorrect argument and we will exit with an error.
3660 
3661 
3662 # Setup a tool for the given variable. If correctly specified by the user,
3663 # use that value, otherwise search for the tool using the supplied code snippet.
3664 # $1: variable to set
3665 # $2: code snippet to call to look for the tool
3666 # $3: code snippet to call if variable was used to find tool
3667 
3668 
3669 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3670 # $1: variable to set
3671 # $2: executable name (or list of names) to look for
3672 # $3: [path]
3673 
3674 
3675 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3676 # $1: variable to set
3677 # $2: executable name (or list of names) to look for
3678 
3679 
3680 # Like BASIC_PATH_PROGS but fails if no tool was found.
3681 # $1: variable to set
3682 # $2: executable name (or list of names) to look for
3683 # $3: [path]
3684 
3685 
3686 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3687 # $1: variable to set
3688 # $2: autoconf macro to call to look for the special tool
3689 
3690 
3691 # Setup the most fundamental tools that relies on not much else to set up,
3692 # but is used by much of the early bootstrap code.
3693 
3694 
3695 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3696 
3697 
3698 # Evaluates platform specific overrides for devkit variables.
3699 # $1: Name of variable
3700 
3701 
3702 
3703 
3704 
3705 
3706 #%%% Simple tools %%%
3707 
3708 # Check if we have found a usable version of make
3709 # $1: the path to a potential make binary (or empty)
3710 # $2: the description on how we found this
3711 
3712 
3713 
3714 
3715 # Goes looking for a usable version of GNU make.
3716 
3717 
3718 
3719 
3720 
3721 
3722 
3723 
3724 
3725 
3726 # Check if build directory is on local disk. If not possible to determine,
3727 # we prefer to claim it's local.
3728 # Argument 1: directory to test
3729 # Argument 2: what to do if it is on local disk
3730 # Argument 3: what to do otherwise (remote disk or failure)
3731 
3732 
3733 # Check that source files have basic read permissions set. This might
3734 # not be the case in cygwin in certain conditions.
3735 
3736 
3737 
3738 
3739 # Check for support for specific options in bash
3740 
3741 
3742 ################################################################################
3743 #
3744 # Default make target
3745 #
3746 
3747 
3748 # Code to run after AC_OUTPUT
3749 
3750 
3751 #
3752 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3753 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3754 #
3755 # This code is free software; you can redistribute it and/or modify it
3756 # under the terms of the GNU General Public License version 2 only, as
3757 # published by the Free Software Foundation.  Oracle designates this
3758 # particular file as subject to the "Classpath" exception as provided
3759 # by Oracle in the LICENSE file that accompanied this code.
3760 #
3761 # This code is distributed in the hope that it will be useful, but WITHOUT
3762 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3763 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3764 # version 2 for more details (a copy is included in the LICENSE file that
3765 # accompanied this code).
3766 #
3767 # You should have received a copy of the GNU General Public License version
3768 # 2 along with this work; if not, write to the Free Software Foundation,
3769 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3770 #
3771 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3772 # or visit www.oracle.com if you need additional information or have any
3773 # questions.
3774 #
3775 
3776 
3777 
3778 
3779 
3780 # Helper function which possibly converts a path using DOS-style short mode.
3781 # If so, the updated path is stored in $new_path.
3782 # $1: The path to check
3783 
3784 
3785 # Helper function which possibly converts a path using DOS-style short mode.
3786 # If so, the updated path is stored in $new_path.
3787 # $1: The path to check
3788 
3789 
3790 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3791 # and could probably be heavily simplified. However, all changes in this
3792 # area tend to need lot of testing in different scenarios, and in lack of
3793 # proper unit testing, cleaning this up has not been deemed worth the effort
3794 # at the moment.
3795 
3796 
3797 
3798 
3799 
3800 
3801 
3802 
3803 
3804 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3805 
3806 
3807 
3808 
3809 # ... then the rest
3810 #
3811 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3812 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3813 #
3814 # This code is free software; you can redistribute it and/or modify it
3815 # under the terms of the GNU General Public License version 2 only, as
3816 # published by the Free Software Foundation.  Oracle designates this
3817 # particular file as subject to the "Classpath" exception as provided
3818 # by Oracle in the LICENSE file that accompanied this code.
3819 #
3820 # This code is distributed in the hope that it will be useful, but WITHOUT
3821 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3822 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3823 # version 2 for more details (a copy is included in the LICENSE file that
3824 # accompanied this code).
3825 #
3826 # You should have received a copy of the GNU General Public License version
3827 # 2 along with this work; if not, write to the Free Software Foundation,
3828 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3829 #
3830 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3831 # or visit www.oracle.com if you need additional information or have any
3832 # questions.
3833 #
3834 
3835 ########################################################################
3836 # This file handles detection of the Boot JDK. The Boot JDK detection
3837 # process has been developed as a response to solve a complex real-world
3838 # problem. Initially, it was simple, but it has grown as platform after
3839 # platform, idiosyncracy after idiosyncracy has been supported.
3840 #
3841 # The basic idea is this:
3842 # 1) You need an acceptable *) JDK to use as a Boot JDK
3843 # 2) There are several ways to locate a JDK, that are mostly platform
3844 #    dependent **)
3845 # 3) You can have multiple JDKs installed
3846 # 4) If possible, configure should try to dig out an acceptable JDK
3847 #    automatically, without having to resort to command-line options
3848 #
3849 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3850 #     javac) and not a JRE, etc.
3851 #
3852 # **) On Windows we typically use a well-known path.
3853 #     On MacOSX we typically use the tool java_home.
3854 #     On Linux we typically find javac in the $PATH, and then follow a
3855 #     chain of symlinks that often ends up in a real JDK.
3856 #
3857 # This leads to the code where we check in different ways to locate a
3858 # JDK, and if one is found, check if it is acceptable. If not, we print
3859 # our reasons for rejecting it (useful when debugging non-working
3860 # configure situations) and continue checking the next one.
3861 ########################################################################
3862 
3863 # Execute the check given as argument, and verify the result
3864 # If the Boot JDK was previously found, do nothing
3865 # $1 A command line (typically autoconf macro) to execute
3866 
3867 
3868 # Test: Is bootjdk explicitly set by command line arguments?
3869 
3870 
3871 # Test: Is $JAVA_HOME set?
3872 
3873 
3874 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3875 
3876 
3877 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3878 # $1: Argument to the java_home binary (optional)
3879 
3880 
3881 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3882 
3883 
3884 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3885 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3886 # $1 = Path to directory containing jdk installations.
3887 # $2 = String to append to the found JDK directory to get the proper JDK home
3888 
3889 
3890 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3891 # environmental variable as base for where to look.
3892 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3893 
3894 
3895 # Test: Is there a JDK installed in default, well-known locations?
3896 
3897 
3898 # Check that a command-line tool in the Boot JDK is correct
3899 # $1 = name of variable to assign
3900 # $2 = name of binary
3901 
3902 
3903 ###############################################################################
3904 #
3905 # We need a Boot JDK to bootstrap the build.
3906 #
3907 
3908 
3909 
3910 
3911 
3912 # BUILD_JDK: the location of the latest JDK that can run
3913 #   on the host system and supports the target class file version
3914 #   generated in this JDK build.  This variable should only be
3915 #   used after the launchers are built.
3916 #
3917 
3918 # Execute the check given as argument, and verify the result.
3919 # If the JDK was previously found, do nothing.
3920 # $1 A command line (typically autoconf macro) to execute
3921 
3922 
3923 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3924 # is different than the host system doing the build (e.g. cross-compilation),
3925 # a special BUILD_JDK is built as part of the build process.  An external
3926 # prebuilt BUILD_JDK can also be supplied.
3927 
3928 
3929 #
3930 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3931 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3932 #
3933 # This code is free software; you can redistribute it and/or modify it
3934 # under the terms of the GNU General Public License version 2 only, as
3935 # published by the Free Software Foundation.  Oracle designates this
3936 # particular file as subject to the "Classpath" exception as provided
3937 # by Oracle in the LICENSE file that accompanied this code.
3938 #
3939 # This code is distributed in the hope that it will be useful, but WITHOUT
3940 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3941 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3942 # version 2 for more details (a copy is included in the LICENSE file that
3943 # accompanied this code).
3944 #
3945 # You should have received a copy of the GNU General Public License version
3946 # 2 along with this work; if not, write to the Free Software Foundation,
3947 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3948 #
3949 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3950 # or visit www.oracle.com if you need additional information or have any
3951 # questions.
3952 #
3953 
3954 
3955 
3956 
3957 
3958 
3959 
3960 
3961 
3962 
3963 
3964 
3965 
3966 
3967 
3968 
3969 
3970 ################################################################################
3971 #
3972 # Runs icecc-create-env once and prints the error if it fails
3973 #
3974 # $1: arguments to icecc-create-env
3975 # $2: log file
3976 #
3977 
3978 
3979 ################################################################################
3980 #
3981 # Optionally enable distributed compilation of native code using icecc/icecream
3982 #
3983 
3984 
3985 
3986 
3987 
3988 
3989 
3990 #
3991 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3992 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3993 #
3994 # This code is free software; you can redistribute it and/or modify it
3995 # under the terms of the GNU General Public License version 2 only, as
3996 # published by the Free Software Foundation.  Oracle designates this
3997 # particular file as subject to the "Classpath" exception as provided
3998 # by Oracle in the LICENSE file that accompanied this code.
3999 #
4000 # This code is distributed in the hope that it will be useful, but WITHOUT
4001 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4002 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4003 # version 2 for more details (a copy is included in the LICENSE file that
4004 # accompanied this code).
4005 #
4006 # You should have received a copy of the GNU General Public License version
4007 # 2 along with this work; if not, write to the Free Software Foundation,
4008 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4009 #
4010 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4011 # or visit www.oracle.com if you need additional information or have any
4012 # questions.
4013 #
4014 
4015 ################################################################################
4016 #
4017 # Setup ABI profile (for arm)
4018 #
4019 
4020 
4021 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4022 # corresponding configure arguments instead
4023 
4024 
4025 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4026 # that configure can use them while detecting compilers.
4027 # TOOLCHAIN_TYPE is available here.
4028 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4029 
4030 
4031 
4032 
4033 
4034 
4035 # Documentation on common flags used for solstudio in HIGHEST.
4036 #
4037 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4038 #          done with care, there are some assumptions below that need to
4039 #          be understood about the use of pointers, and IEEE behavior.
4040 #
4041 # -fns: Use non-standard floating point mode (not IEEE 754)
4042 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4043 # -fsingle: Use single precision floating point with 'float'
4044 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4045 #   (Source with excessing pointer casting and data access with mixed
4046 #    pointer types are not recommended)
4047 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4048 #   (If you expect perfect errno behavior, do not use this)
4049 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4050 # -xrestrict: Pointer parameters to functions do not overlap
4051 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4052 #    If you pass in multiple pointers to the same data, do not use this)
4053 # -xlibmil: Inline some library routines
4054 #   (If you expect perfect errno behavior, do not use this)
4055 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4056 #   (If you expect perfect errno behavior, do not use this)
4057 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4058 
4059     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4060     # Bug?
4061     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4062     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4063     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4064     #fi
4065 
4066 
4067 
4068 
4069 
4070 
4071 ################################################################################
4072 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4073 #      conditionals against.
4074 # $2 - Optional prefix for each variable defined.
4075 
4076 
4077 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078 #                                  IF_FALSE: [RUN-IF-FALSE])
4079 # ------------------------------------------------------------
4080 # Check that the C compiler supports an argument
4081 
4082 
4083 
4084 
4085 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086 #                                    IF_FALSE: [RUN-IF-FALSE])
4087 # ------------------------------------------------------------
4088 # Check that the C++ compiler supports an argument
4089 
4090 
4091 
4092 
4093 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094 #                                IF_FALSE: [RUN-IF-FALSE])
4095 # ------------------------------------------------------------
4096 # Check that the C and C++ compilers support an argument
4097 
4098 
4099 
4100 
4101 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4102 #                                   IF_FALSE: [RUN-IF-FALSE])
4103 # ------------------------------------------------------------
4104 # Check that the linker support an argument
4105 
4106 
4107 
4108 
4109 
4110 
4111 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4112 # Arguments:
4113 # $1 - Optional prefix for each variable defined.
4114 
4115 
4116 #
4117 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4118 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4119 #
4120 # This code is free software; you can redistribute it and/or modify it
4121 # under the terms of the GNU General Public License version 2 only, as
4122 # published by the Free Software Foundation.  Oracle designates this
4123 # particular file as subject to the "Classpath" exception as provided
4124 # by Oracle in the LICENSE file that accompanied this code.
4125 #
4126 # This code is distributed in the hope that it will be useful, but WITHOUT
4127 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4128 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4129 # version 2 for more details (a copy is included in the LICENSE file that
4130 # accompanied this code).
4131 #
4132 # You should have received a copy of the GNU General Public License version
4133 # 2 along with this work; if not, write to the Free Software Foundation,
4134 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4135 #
4136 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4137 # or visit www.oracle.com if you need additional information or have any
4138 # questions.
4139 #
4140 
4141 
4142 
4143 
4144 
4145 cygwin_help() {
4146   case $1 in
4147     unzip)
4148       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4149       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4150       ;;
4151     zip)
4152       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4153       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4154       ;;
4155     make)
4156       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4157       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4158       ;;
4159     freetype)
4160       HELP_MSG="
4161 The freetype library can now be build during the configure process.
4162 Download the freetype sources and unpack them into an arbitrary directory:
4163 
4164 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4165 tar -xzf freetype-2.5.3.tar.gz
4166 
4167 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4168 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4169 builds or into '<freetype_src>/lib32' for 32-bit builds.
4170 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4171 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4172 
4173 Alternatively you can unpack the sources like this to use the default directory:
4174 
4175 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4176       ;;
4177   esac
4178 }
4179 
4180 msys_help() {
4181   PKGHANDLER_COMMAND=""
4182 }
4183 
4184 apt_help() {
4185   case $1 in
4186     reduced)
4187       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4188     devkit)
4189       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4190     openjdk)
4191       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4192     alsa)
4193       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4194     cups)
4195       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4196     fontconfig)
4197       PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
4198     freetype)
4199       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4200     ffi)
4201       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4202     x11)
4203       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4204     ccache)
4205       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4206     dtrace)
4207       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4208   esac
4209 }
4210 
4211 yum_help() {
4212   case $1 in
4213     devkit)
4214       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4215     openjdk)
4216       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4217     alsa)
4218       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4219     cups)
4220       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4221     fontconfig)
4222       PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
4223     freetype)
4224       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4225     x11)
4226       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4227     ccache)
4228       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4229   esac
4230 }
4231 
4232 brew_help() {
4233   case $1 in
4234     openjdk)
4235       PKGHANDLER_COMMAND="brew cask install java" ;;
4236     freetype)
4237       PKGHANDLER_COMMAND="brew install freetype" ;;
4238     ccache)
4239       PKGHANDLER_COMMAND="brew install ccache" ;;
4240   esac
4241 }
4242 
4243 port_help() {
4244   PKGHANDLER_COMMAND=""
4245 }
4246 
4247 pkgutil_help() {
4248   PKGHANDLER_COMMAND=""
4249 }
4250 
4251 pkgadd_help() {
4252   PKGHANDLER_COMMAND=""
4253 }
4254 
4255 # This function will check if we're called from the "configure" wrapper while
4256 # printing --help. If so, we will print out additional information that can
4257 # only be extracted within the autoconf script, and then exit. This must be
4258 # called at the very beginning in configure.ac.
4259 
4260 
4261 
4262 
4263 
4264 
4265 #
4266 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4267 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4268 #
4269 # This code is free software; you can redistribute it and/or modify it
4270 # under the terms of the GNU General Public License version 2 only, as
4271 # published by the Free Software Foundation.  Oracle designates this
4272 # particular file as subject to the "Classpath" exception as provided
4273 # by Oracle in the LICENSE file that accompanied this code.
4274 #
4275 # This code is distributed in the hope that it will be useful, but WITHOUT
4276 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4277 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4278 # version 2 for more details (a copy is included in the LICENSE file that
4279 # accompanied this code).
4280 #
4281 # You should have received a copy of the GNU General Public License version
4282 # 2 along with this work; if not, write to the Free Software Foundation,
4283 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4284 #
4285 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4286 # or visit www.oracle.com if you need additional information or have any
4287 # questions.
4288 #
4289 
4290 # All valid JVM features, regardless of platform
4291 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
4292     graal vm-structs jni-check services management all-gcs nmt cds \
4293     static-build link-time-opt aot"
4294 
4295 # All valid JVM variants
4296 VALID_JVM_VARIANTS="server client minimal core zero custom"
4297 
4298 ###############################################################################
4299 # Check if the specified JVM variant should be built. To be used in shell if
4300 # constructs, like this:
4301 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4302 #
4303 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4304 
4305 # Definition kept in one line to allow inlining in if statements.
4306 # Additional [] needed to keep m4 from mangling shell constructs.
4307 
4308 
4309 ###############################################################################
4310 # Check if the specified JVM features are explicitly enabled. To be used in
4311 # shell if constructs, like this:
4312 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4313 #
4314 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4315 
4316 # Definition kept in one line to allow inlining in if statements.
4317 # Additional [] needed to keep m4 from mangling shell constructs.
4318 
4319 
4320 ###############################################################################
4321 # Check which variants of the JVM that we want to build. Available variants are:
4322 #   server: normal interpreter, and a tiered C1/C2 compiler
4323 #   client: normal interpreter, and C1 (no C2 compiler)
4324 #   minimal: reduced form of client with optional features stripped out
4325 #   core: normal interpreter only, no compiler
4326 #   zero: C++ based interpreter only, no compiler
4327 #   custom: baseline JVM with no default features
4328 #
4329 
4330 
4331 ###############################################################################
4332 # Check if dtrace should be enabled and has all prerequisites present.
4333 #
4334 
4335 
4336 ################################################################################
4337 # Check if AOT should be enabled
4338 #
4339 
4340 
4341 ################################################################################
4342 # Allow to disable CDS
4343 #
4344 
4345 
4346 ###############################################################################
4347 # Set up all JVM features for each JVM variant.
4348 #
4349 
4350 
4351 ###############################################################################
4352 # Validate JVM features once all setup is complete, including custom setup.
4353 #
4354 
4355 
4356 ################################################################################
4357 #
4358 # Specify which sources will be used to build the 64-bit ARM port
4359 #
4360 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4361 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4362 #
4363 
4364 
4365 
4366 ################################################################################
4367 # Check if gtest should be built
4368 #
4369 
4370 
4371 #
4372 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4373 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4374 #
4375 # This code is free software; you can redistribute it and/or modify it
4376 # under the terms of the GNU General Public License version 2 only, as
4377 # published by the Free Software Foundation.  Oracle designates this
4378 # particular file as subject to the "Classpath" exception as provided
4379 # by Oracle in the LICENSE file that accompanied this code.
4380 #
4381 # This code is distributed in the hope that it will be useful, but WITHOUT
4382 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4383 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4384 # version 2 for more details (a copy is included in the LICENSE file that
4385 # accompanied this code).
4386 #
4387 # You should have received a copy of the GNU General Public License version
4388 # 2 along with this work; if not, write to the Free Software Foundation,
4389 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4390 #
4391 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4392 # or visit www.oracle.com if you need additional information or have any
4393 # questions.
4394 #
4395 
4396 ###############################################################################
4397 # Check which variant of the JDK that we want to build.
4398 # Currently we have:
4399 #    normal:   standard edition
4400 # but the custom make system may add other variants
4401 #
4402 # Effectively the JDK variant gives a name to a specific set of
4403 # modules to compile into the JDK.
4404 
4405 
4406 ###############################################################################
4407 # Set the debug level
4408 #    release: no debug information, all optimizations, no asserts.
4409 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4410 #    fastdebug: debug information (-g), all optimizations, all asserts
4411 #    slowdebug: debug information (-g), no optimizations, all asserts
4412 
4413 
4414 ###############################################################################
4415 #
4416 # Should we build only OpenJDK even if closed sources are present?
4417 #
4418 
4419 
4420 
4421 
4422 ###############################################################################
4423 #
4424 # Enable or disable the elliptic curve crypto implementation
4425 #
4426 
4427 
4428 
4429 
4430 ################################################################################
4431 #
4432 # Gcov coverage data for hotspot
4433 #
4434 
4435 
4436 ###############################################################################
4437 #
4438 # AddressSanitizer
4439 #
4440 
4441 
4442 ################################################################################
4443 #
4444 # Static build support.  When enabled will generate static
4445 # libraries instead of shared libraries for all JDK libs.
4446 #
4447 
4448 
4449 ################################################################################
4450 #
4451 # jlink options.
4452 # We always keep packaged modules in JDK image.
4453 #
4454 
4455 
4456 ################################################################################
4457 #
4458 # Check if building of the jtreg failure handler should be enabled.
4459 #
4460 
4461 
4462 ################################################################################
4463 #
4464 # Enable or disable generation of the classlist at build time
4465 #
4466 
4467 
4468 #
4469 # Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
4470 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4471 #
4472 # This code is free software; you can redistribute it and/or modify it
4473 # under the terms of the GNU General Public License version 2 only, as
4474 # published by the Free Software Foundation.  Oracle designates this
4475 # particular file as subject to the "Classpath" exception as provided
4476 # by Oracle in the LICENSE file that accompanied this code.
4477 #
4478 # This code is distributed in the hope that it will be useful, but WITHOUT
4479 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4480 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4481 # version 2 for more details (a copy is included in the LICENSE file that
4482 # accompanied this code).
4483 #
4484 # You should have received a copy of the GNU General Public License version
4485 # 2 along with this work; if not, write to the Free Software Foundation,
4486 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4487 #
4488 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4489 # or visit www.oracle.com if you need additional information or have any
4490 # questions.
4491 #
4492 
4493 ###############################################################################
4494 #
4495 # Setup version numbers
4496 #
4497 
4498 # Verify that a given string represents a valid version number, and assign it
4499 # to a variable.
4500 
4501 # Argument 1: the variable to assign to
4502 # Argument 2: the value given by the user
4503 
4504 
4505 
4506 
4507 #
4508 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4509 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4510 #
4511 # This code is free software; you can redistribute it and/or modify it
4512 # under the terms of the GNU General Public License version 2 only, as
4513 # published by the Free Software Foundation.  Oracle designates this
4514 # particular file as subject to the "Classpath" exception as provided
4515 # by Oracle in the LICENSE file that accompanied this code.
4516 #
4517 # This code is distributed in the hope that it will be useful, but WITHOUT
4518 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4519 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4520 # version 2 for more details (a copy is included in the LICENSE file that
4521 # accompanied this code).
4522 #
4523 # You should have received a copy of the GNU General Public License version
4524 # 2 along with this work; if not, write to the Free Software Foundation,
4525 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4526 #
4527 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4528 # or visit www.oracle.com if you need additional information or have any
4529 # questions.
4530 #
4531 
4532 # Major library component reside in separate files.
4533 #
4534 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4535 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4536 #
4537 # This code is free software; you can redistribute it and/or modify it
4538 # under the terms of the GNU General Public License version 2 only, as
4539 # published by the Free Software Foundation.  Oracle designates this
4540 # particular file as subject to the "Classpath" exception as provided
4541 # by Oracle in the LICENSE file that accompanied this code.
4542 #
4543 # This code is distributed in the hope that it will be useful, but WITHOUT
4544 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4545 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4546 # version 2 for more details (a copy is included in the LICENSE file that
4547 # accompanied this code).
4548 #
4549 # You should have received a copy of the GNU General Public License version
4550 # 2 along with this work; if not, write to the Free Software Foundation,
4551 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4552 #
4553 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4554 # or visit www.oracle.com if you need additional information or have any
4555 # questions.
4556 #
4557 
4558 ################################################################################
4559 # Setup alsa (Advanced Linux Sound Architecture)
4560 ################################################################################
4561 
4562 
4563 #
4564 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4565 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4566 #
4567 # This code is free software; you can redistribute it and/or modify it
4568 # under the terms of the GNU General Public License version 2 only, as
4569 # published by the Free Software Foundation.  Oracle designates this
4570 # particular file as subject to the "Classpath" exception as provided
4571 # by Oracle in the LICENSE file that accompanied this code.
4572 #
4573 # This code is distributed in the hope that it will be useful, but WITHOUT
4574 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4575 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4576 # version 2 for more details (a copy is included in the LICENSE file that
4577 # accompanied this code).
4578 #
4579 # You should have received a copy of the GNU General Public License version
4580 # 2 along with this work; if not, write to the Free Software Foundation,
4581 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4582 #
4583 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4584 # or visit www.oracle.com if you need additional information or have any
4585 # questions.
4586 #
4587 
4588 ################################################################################
4589 # Setup bundled libraries.
4590 #
4591 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4592 # OpenJDK repository. Default is to use these libraries as bundled, but they
4593 # might be replaced by en external version by the user.
4594 ################################################################################
4595 
4596 
4597 ################################################################################
4598 # Setup libjpeg
4599 ################################################################################
4600 
4601 
4602 ################################################################################
4603 # Setup giflib
4604 ################################################################################
4605 
4606 
4607 ################################################################################
4608 # Setup libpng
4609 ################################################################################
4610 
4611 
4612 ################################################################################
4613 # Setup zlib
4614 ################################################################################
4615 
4616 
4617 ################################################################################
4618 # Setup lcms (Little CMS)
4619 ################################################################################
4620 
4621 
4622 #
4623 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4624 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625 #
4626 # This code is free software; you can redistribute it and/or modify it
4627 # under the terms of the GNU General Public License version 2 only, as
4628 # published by the Free Software Foundation.  Oracle designates this
4629 # particular file as subject to the "Classpath" exception as provided
4630 # by Oracle in the LICENSE file that accompanied this code.
4631 #
4632 # This code is distributed in the hope that it will be useful, but WITHOUT
4633 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635 # version 2 for more details (a copy is included in the LICENSE file that
4636 # accompanied this code).
4637 #
4638 # You should have received a copy of the GNU General Public License version
4639 # 2 along with this work; if not, write to the Free Software Foundation,
4640 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641 #
4642 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643 # or visit www.oracle.com if you need additional information or have any
4644 # questions.
4645 #
4646 
4647 ################################################################################
4648 # Setup cups (Common Unix Printing System)
4649 ################################################################################
4650 
4651 
4652 #
4653 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4654 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4655 #
4656 # This code is free software; you can redistribute it and/or modify it
4657 # under the terms of the GNU General Public License version 2 only, as
4658 # published by the Free Software Foundation.  Oracle designates this
4659 # particular file as subject to the "Classpath" exception as provided
4660 # by Oracle in the LICENSE file that accompanied this code.
4661 #
4662 # This code is distributed in the hope that it will be useful, but WITHOUT
4663 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4664 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4665 # version 2 for more details (a copy is included in the LICENSE file that
4666 # accompanied this code).
4667 #
4668 # You should have received a copy of the GNU General Public License version
4669 # 2 along with this work; if not, write to the Free Software Foundation,
4670 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4671 #
4672 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4673 # or visit www.oracle.com if you need additional information or have any
4674 # questions.
4675 #
4676 
4677 ################################################################################
4678 # Setup libffi (Foreign Function Interface)
4679 ################################################################################
4680 
4681 
4682 #
4683 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4684 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4685 #
4686 # This code is free software; you can redistribute it and/or modify it
4687 # under the terms of the GNU General Public License version 2 only, as
4688 # published by the Free Software Foundation.  Oracle designates this
4689 # particular file as subject to the "Classpath" exception as provided
4690 # by Oracle in the LICENSE file that accompanied this code.
4691 #
4692 # This code is distributed in the hope that it will be useful, but WITHOUT
4693 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4694 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4695 # version 2 for more details (a copy is included in the LICENSE file that
4696 # accompanied this code).
4697 #
4698 # You should have received a copy of the GNU General Public License version
4699 # 2 along with this work; if not, write to the Free Software Foundation,
4700 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4701 #
4702 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4703 # or visit www.oracle.com if you need additional information or have any
4704 # questions.
4705 #
4706 
4707 ################################################################################
4708 # Build the freetype lib from source
4709 ################################################################################
4710 
4711 
4712 ################################################################################
4713 # Check if a potential freeype library match is correct and usable
4714 ################################################################################
4715 
4716 
4717 ################################################################################
4718 # Setup freetype (The FreeType2 font rendering library)
4719 ################################################################################
4720 
4721 
4722 #
4723 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4724 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4725 #
4726 # This code is free software; you can redistribute it and/or modify it
4727 # under the terms of the GNU General Public License version 2 only, as
4728 # published by the Free Software Foundation.  Oracle designates this
4729 # particular file as subject to the "Classpath" exception as provided
4730 # by Oracle in the LICENSE file that accompanied this code.
4731 #
4732 # This code is distributed in the hope that it will be useful, but WITHOUT
4733 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4734 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4735 # version 2 for more details (a copy is included in the LICENSE file that
4736 # accompanied this code).
4737 #
4738 # You should have received a copy of the GNU General Public License version
4739 # 2 along with this work; if not, write to the Free Software Foundation,
4740 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4741 #
4742 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4743 # or visit www.oracle.com if you need additional information or have any
4744 # questions.
4745 #
4746 
4747 ################################################################################
4748 # Setup the standard C/C++ runtime libraries.
4749 #
4750 # Most importantly, determine if stdc++ should be linked statically or
4751 # dynamically.
4752 ################################################################################
4753 
4754 
4755 #
4756 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4757 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4758 #
4759 # This code is free software; you can redistribute it and/or modify it
4760 # under the terms of the GNU General Public License version 2 only, as
4761 # published by the Free Software Foundation.  Oracle designates this
4762 # particular file as subject to the "Classpath" exception as provided
4763 # by Oracle in the LICENSE file that accompanied this code.
4764 #
4765 # This code is distributed in the hope that it will be useful, but WITHOUT
4766 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4767 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4768 # version 2 for more details (a copy is included in the LICENSE file that
4769 # accompanied this code).
4770 #
4771 # You should have received a copy of the GNU General Public License version
4772 # 2 along with this work; if not, write to the Free Software Foundation,
4773 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4774 #
4775 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4776 # or visit www.oracle.com if you need additional information or have any
4777 # questions.
4778 #
4779 
4780 ################################################################################
4781 # Setup X11 Windows system
4782 ################################################################################
4783 
4784 
4785 #
4786 # Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4787 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4788 #
4789 # This code is free software; you can redistribute it and/or modify it
4790 # under the terms of the GNU General Public License version 2 only, as
4791 # published by the Free Software Foundation.  Oracle designates this
4792 # particular file as subject to the "Classpath" exception as provided
4793 # by Oracle in the LICENSE file that accompanied this code.
4794 #
4795 # This code is distributed in the hope that it will be useful, but WITHOUT
4796 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4797 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4798 # version 2 for more details (a copy is included in the LICENSE file that
4799 # accompanied this code).
4800 #
4801 # You should have received a copy of the GNU General Public License version
4802 # 2 along with this work; if not, write to the Free Software Foundation,
4803 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4804 #
4805 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4806 # or visit www.oracle.com if you need additional information or have any
4807 # questions.
4808 #
4809 
4810 ################################################################################
4811 # Setup fontconfig
4812 ################################################################################
4813 
4814 
4815 
4816 ################################################################################
4817 # Determine which libraries are needed for this configuration
4818 ################################################################################
4819 
4820 
4821 ################################################################################
4822 # Parse library options, and setup needed libraries
4823 ################################################################################
4824 
4825 
4826 ################################################################################
4827 # Setup various libraries, typically small system libraries
4828 ################################################################################
4829 
4830 
4831 ################################################################################
4832 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4833 # redistribute it in the test image.
4834 ################################################################################
4835 
4836 
4837 
4838 #
4839 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4840 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4841 #
4842 # This code is free software; you can redistribute it and/or modify it
4843 # under the terms of the GNU General Public License version 2 only, as
4844 # published by the Free Software Foundation.  Oracle designates this
4845 # particular file as subject to the "Classpath" exception as provided
4846 # by Oracle in the LICENSE file that accompanied this code.
4847 #
4848 # This code is distributed in the hope that it will be useful, but WITHOUT
4849 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4850 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4851 # version 2 for more details (a copy is included in the LICENSE file that
4852 # accompanied this code).
4853 #
4854 # You should have received a copy of the GNU General Public License version
4855 # 2 along with this work; if not, write to the Free Software Foundation,
4856 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4857 #
4858 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4859 # or visit www.oracle.com if you need additional information or have any
4860 # questions.
4861 #
4862 
4863 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4864 # Converts autoconf style CPU name to OpenJDK style, into
4865 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4866 
4867 
4868 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4869 # Converts autoconf style OS name to OpenJDK style, into
4870 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4871 
4872 
4873 # Expects $host_os $host_cpu $build_os and $build_cpu
4874 # and $with_target_bits to have been setup!
4875 #
4876 # Translate the standard triplet(quadruplet) definition
4877 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4878 # OPENJDK_BUILD_OS, etc.
4879 
4880 
4881 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4882 # accordingly. Must be done after setting up build and target system, but before
4883 # doing anything else with these values.
4884 
4885 
4886 # Setup the legacy variables, for controlling the old makefiles.
4887 #
4888 
4889 
4890 # $1 - Either TARGET or BUILD to setup the variables for.
4891 
4892 
4893 
4894 
4895 
4896 
4897 #%%% Build and target systems %%%
4898 
4899 
4900 
4901 
4902 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4903 # Add -mX to various FLAGS variables.
4904 
4905 
4906 
4907 
4908 
4909 
4910 #
4911 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4912 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4913 #
4914 # This code is free software; you can redistribute it and/or modify it
4915 # under the terms of the GNU General Public License version 2 only, as
4916 # published by the Free Software Foundation.  Oracle designates this
4917 # particular file as subject to the "Classpath" exception as provided
4918 # by Oracle in the LICENSE file that accompanied this code.
4919 #
4920 # This code is distributed in the hope that it will be useful, but WITHOUT
4921 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4922 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4923 # version 2 for more details (a copy is included in the LICENSE file that
4924 # accompanied this code).
4925 #
4926 # You should have received a copy of the GNU General Public License version
4927 # 2 along with this work; if not, write to the Free Software Foundation,
4928 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4929 #
4930 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4931 # or visit www.oracle.com if you need additional information or have any
4932 # questions.
4933 #
4934 
4935 
4936 
4937 ################################################################################
4938 # Define a mechanism for importing extra prebuilt modules
4939 #
4940 
4941 
4942 
4943 #
4944 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4945 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4946 #
4947 # This code is free software; you can redistribute it and/or modify it
4948 # under the terms of the GNU General Public License version 2 only, as
4949 # published by the Free Software Foundation.  Oracle designates this
4950 # particular file as subject to the "Classpath" exception as provided
4951 # by Oracle in the LICENSE file that accompanied this code.
4952 #
4953 # This code is distributed in the hope that it will be useful, but WITHOUT
4954 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4955 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4956 # version 2 for more details (a copy is included in the LICENSE file that
4957 # accompanied this code).
4958 #
4959 # You should have received a copy of the GNU General Public License version
4960 # 2 along with this work; if not, write to the Free Software Foundation,
4961 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4962 #
4963 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4964 # or visit www.oracle.com if you need additional information or have any
4965 # questions.
4966 #
4967 
4968 ########################################################################
4969 # This file is responsible for detecting, verifying and setting up the
4970 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4971 # proper paths to the binaries, but it will not setup any flags.
4972 #
4973 # The binaries used is determined by the toolchain type, which is the family of
4974 # compilers and related tools that are used.
4975 ########################################################################
4976 
4977 
4978 # All valid toolchains, regardless of platform (used by help.m4)
4979 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4980 
4981 # These toolchains are valid on different platforms
4982 VALID_TOOLCHAINS_linux="gcc clang"
4983 VALID_TOOLCHAINS_solaris="solstudio"
4984 VALID_TOOLCHAINS_macosx="gcc clang"
4985 VALID_TOOLCHAINS_aix="xlc"
4986 VALID_TOOLCHAINS_windows="microsoft"
4987 
4988 # Toolchain descriptions
4989 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4990 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4991 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4992 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4993 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4994 
4995 # Minimum supported versions, empty means unspecified
4996 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4997 TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
4998 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4999 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5000 TOOLCHAIN_MINIMUM_VERSION_xlc=""
5001 
5002 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5003 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5004 # $1 - optional variable prefix for compiler and version variables (BUILD_)
5005 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5006 
5007 
5008 # Check if the configured compiler (C and C++) is of a specific version or
5009 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5010 #
5011 # Arguments:
5012 #   VERSION:   The version string to check against the found version
5013 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5014 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5015 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5016 
5017 
5018 
5019 
5020 # Setup a number of variables describing how native output files are
5021 # named on this platform/toolchain.
5022 
5023 
5024 # Determine which toolchain type to use, and make sure it is valid for this
5025 # platform. Setup various information about the selected toolchain.
5026 
5027 
5028 # Before we start detecting the toolchain executables, we might need some
5029 # special setup, e.g. additional paths etc.
5030 
5031 
5032 # Restore path, etc
5033 
5034 
5035 # Check if a compiler is of the toolchain type we expect, and save the version
5036 # information from it. If the compiler does not match the expected type,
5037 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5038 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5039 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5040 #
5041 # $1 = compiler to test (CC or CXX)
5042 # $2 = human readable name of compiler (C or C++)
5043 
5044 
5045 # Try to locate the given C or C++ compiler in the path, or otherwise.
5046 #
5047 # $1 = compiler to test (CC or CXX)
5048 # $2 = human readable name of compiler (C or C++)
5049 # $3 = compiler name to search for
5050 
5051 
5052 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5053 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5054 # archiver (AR). Verify that the compilers are correct according to the
5055 # toolchain type.
5056 
5057 
5058 # Setup additional tools that is considered a part of the toolchain, but not the
5059 # core part. Many of these are highly platform-specific and do not exist,
5060 # and/or are not needed on all platforms.
5061 
5062 
5063 # Setup the build tools (i.e, the compiler and linker used to build programs
5064 # that should be run on the build platform, not the target platform, as a build
5065 # helper). Since the non-cross-compile case uses the normal, target compilers
5066 # for this, we can only do this after these have been setup.
5067 
5068 
5069 # Do some additional checks on the detected tools.
5070 
5071 
5072 # Setup the JTReg Regression Test Harness.
5073 
5074 
5075 # Setup the JIB dependency resolver
5076 
5077 
5078 #
5079 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5080 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5081 #
5082 # This code is free software; you can redistribute it and/or modify it
5083 # under the terms of the GNU General Public License version 2 only, as
5084 # published by the Free Software Foundation.  Oracle designates this
5085 # particular file as subject to the "Classpath" exception as provided
5086 # by Oracle in the LICENSE file that accompanied this code.
5087 #
5088 # This code is distributed in the hope that it will be useful, but WITHOUT
5089 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5090 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5091 # version 2 for more details (a copy is included in the LICENSE file that
5092 # accompanied this code).
5093 #
5094 # You should have received a copy of the GNU General Public License version
5095 # 2 along with this work; if not, write to the Free Software Foundation,
5096 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5097 #
5098 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5099 # or visit www.oracle.com if you need additional information or have any
5100 # questions.
5101 #
5102 
5103 ################################################################################
5104 # The order of these defines the priority by which we try to find them.
5105 VALID_VS_VERSIONS="2013 2012 2010"
5106 
5107 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5108 VS_VERSION_INTERNAL_2010=100
5109 VS_MSVCR_2010=msvcr100.dll
5110 # We don't use msvcp on Visual Studio 2010
5111 #VS_MSVCP_2010=msvcp100.dll
5112 VS_ENVVAR_2010="VS100COMNTOOLS"
5113 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5114 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5115 VS_VS_PLATFORM_NAME_2010="v100"
5116 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5117 
5118 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5119 VS_VERSION_INTERNAL_2012=110
5120 VS_MSVCR_2012=msvcr110.dll
5121 VS_MSVCP_2012=msvcp110.dll
5122 VS_ENVVAR_2012="VS110COMNTOOLS"
5123 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5124 VS_SDK_INSTALLDIR_2012=
5125 VS_VS_PLATFORM_NAME_2012="v110"
5126 VS_SDK_PLATFORM_NAME_2012=
5127 
5128 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5129 VS_VERSION_INTERNAL_2013=120
5130 VS_MSVCR_2013=msvcr120.dll
5131 VS_MSVCP_2013=msvcp120.dll
5132 VS_ENVVAR_2013="VS120COMNTOOLS"
5133 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5134 VS_SDK_INSTALLDIR_2013=
5135 VS_VS_PLATFORM_NAME_2013="v120"
5136 VS_SDK_PLATFORM_NAME_2013=
5137 
5138 ################################################################################
5139 
5140 
5141 
5142 ################################################################################
5143 
5144 
5145 
5146 ################################################################################
5147 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5148 # build environment and assigns it to VS_ENV_CMD
5149 
5150 
5151 ################################################################################
5152 
5153 
5154 
5155 ################################################################################
5156 # Check if the VS env variables were setup prior to running configure.
5157 # If not, then find vcvarsall.bat and run it automatically, and integrate
5158 # the set env variables into the spec file.
5159 
5160 
5161 
5162 
5163 
5164 
5165 
5166 
5167 
5168 
5169 
5170 
5171 
5172 
5173 # This line needs to be here, verbatim, after all includes and the dummy hook
5174 # definitions. It is replaced with custom functionality when building
5175 # custom sources.
5176 #CUSTOM_AUTOCONF_INCLUDE
5177 
5178 # Do not change or remove the following line, it is needed for consistency checks:
5179 DATE_WHEN_GENERATED=1513805283
5180 
5181 ###############################################################################
5182 #
5183 # Initialization / Boot-strapping
5184 #
5185 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5186 # thus it jumps back and forth, each time gaining something needed later on.
5187 #
5188 ###############################################################################
5189 
5190 # If we are requested to print additional help, do that and then exit.
5191 # This must be the very first call.
5192 
5193   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5194 
5195     # Print available toolchains
5196     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5197     $PRINTF "Which are valid to use depends on the build platform.\n"
5198     for toolchain in $VALID_TOOLCHAINS_all; do
5199       # Use indirect variable referencing
5200       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5201       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5202       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5203     done
5204     $PRINTF "\n"
5205 
5206     # Print available jvm features
5207     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5208     $PRINTF "Which are valid to use depends on the target platform.\n  "
5209     $PRINTF "%s " $VALID_JVM_FEATURES
5210     $PRINTF "\n"
5211 
5212     # And now exit directly
5213     exit 0
5214   fi
5215 
5216 
5217 # Basic initialization that must happen first of all in the normal process.
5218 
5219   # Save the original command line. This is passed to us by the wrapper configure script.
5220 
5221   # Save the path variable before it gets changed
5222   ORIGINAL_PATH="$PATH"
5223 
5224   DATE_WHEN_CONFIGURED=`LANG=C date`
5225 
5226   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5227 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5228   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5229 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5230 
5231 
5232   # Start with tools that do not need have cross compilation support
5233   # and can be expected to be found in the default PATH. These tools are
5234   # used by configure.
5235 
5236   # First are all the simple required tools.
5237 
5238 
5239 
5240   # Publish this variable in the help.
5241 
5242 
5243   if [ -z "${BASENAME+x}" ]; then
5244     # The variable is not set by user, try to locate tool using the code snippet
5245     for ac_prog in basename
5246 do
5247   # Extract the first word of "$ac_prog", so it can be a program name with args.
5248 set dummy $ac_prog; ac_word=$2
5249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5250 $as_echo_n "checking for $ac_word... " >&6; }
5251 if ${ac_cv_path_BASENAME+:} false; then :
5252   $as_echo_n "(cached) " >&6
5253 else
5254   case $BASENAME in
5255   [\\/]* | ?:[\\/]*)
5256   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5257   ;;
5258   *)
5259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260 for as_dir in $PATH
5261 do
5262   IFS=$as_save_IFS
5263   test -z "$as_dir" && as_dir=.
5264     for ac_exec_ext in '' $ac_executable_extensions; do
5265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268     break 2
5269   fi
5270 done
5271   done
5272 IFS=$as_save_IFS
5273 
5274   ;;
5275 esac
5276 fi
5277 BASENAME=$ac_cv_path_BASENAME
5278 if test -n "$BASENAME"; then
5279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5280 $as_echo "$BASENAME" >&6; }
5281 else
5282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283 $as_echo "no" >&6; }
5284 fi
5285 
5286 
5287   test -n "$BASENAME" && break
5288 done
5289 
5290   else
5291     # The variable is set, but is it from the command line or the environment?
5292 
5293     # Try to remove the string !BASENAME! from our list.
5294     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5295     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5296       # If it failed, the variable was not from the command line. Ignore it,
5297       # but warn the user (except for BASH, which is always set by the calling BASH).
5298       if test "xBASENAME" != xBASH; then
5299         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5300 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5301       fi
5302       # Try to locate tool using the code snippet
5303       for ac_prog in basename
5304 do
5305   # Extract the first word of "$ac_prog", so it can be a program name with args.
5306 set dummy $ac_prog; ac_word=$2
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5308 $as_echo_n "checking for $ac_word... " >&6; }
5309 if ${ac_cv_path_BASENAME+:} false; then :
5310   $as_echo_n "(cached) " >&6
5311 else
5312   case $BASENAME in
5313   [\\/]* | ?:[\\/]*)
5314   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5315   ;;
5316   *)
5317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5318 for as_dir in $PATH
5319 do
5320   IFS=$as_save_IFS
5321   test -z "$as_dir" && as_dir=.
5322     for ac_exec_ext in '' $ac_executable_extensions; do
5323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5324     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5326     break 2
5327   fi
5328 done
5329   done
5330 IFS=$as_save_IFS
5331 
5332   ;;
5333 esac
5334 fi
5335 BASENAME=$ac_cv_path_BASENAME
5336 if test -n "$BASENAME"; then
5337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5338 $as_echo "$BASENAME" >&6; }
5339 else
5340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5341 $as_echo "no" >&6; }
5342 fi
5343 
5344 
5345   test -n "$BASENAME" && break
5346 done
5347 
5348     else
5349       # If it succeeded, then it was overridden by the user. We will use it
5350       # for the tool.
5351 
5352       # First remove it from the list of overridden variables, so we can test
5353       # for unknown variables in the end.
5354       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5355 
5356       # Check if we try to supply an empty value
5357       if test "x$BASENAME" = x; then
5358         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5359 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5360         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5361 $as_echo_n "checking for BASENAME... " >&6; }
5362         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5363 $as_echo "disabled" >&6; }
5364       else
5365         # Check if the provided tool contains a complete path.
5366         tool_specified="$BASENAME"
5367         tool_basename="${tool_specified##*/}"
5368         if test "x$tool_basename" = "x$tool_specified"; then
5369           # A command without a complete path is provided, search $PATH.
5370           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5371 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5372           # Extract the first word of "$tool_basename", so it can be a program name with args.
5373 set dummy $tool_basename; ac_word=$2
5374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5375 $as_echo_n "checking for $ac_word... " >&6; }
5376 if ${ac_cv_path_BASENAME+:} false; then :
5377   $as_echo_n "(cached) " >&6
5378 else
5379   case $BASENAME in
5380   [\\/]* | ?:[\\/]*)
5381   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5382   ;;
5383   *)
5384   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385 for as_dir in $PATH
5386 do
5387   IFS=$as_save_IFS
5388   test -z "$as_dir" && as_dir=.
5389     for ac_exec_ext in '' $ac_executable_extensions; do
5390   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5391     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5392     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5393     break 2
5394   fi
5395 done
5396   done
5397 IFS=$as_save_IFS
5398 
5399   ;;
5400 esac
5401 fi
5402 BASENAME=$ac_cv_path_BASENAME
5403 if test -n "$BASENAME"; then
5404   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5405 $as_echo "$BASENAME" >&6; }
5406 else
5407   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5408 $as_echo "no" >&6; }
5409 fi
5410 
5411 
5412           if test "x$BASENAME" = x; then
5413             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5414           fi
5415         else
5416           # Otherwise we believe it is a complete path. Use it as it is.
5417           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5418 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5419           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5420 $as_echo_n "checking for BASENAME... " >&6; }
5421           if test ! -x "$tool_specified"; then
5422             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5423 $as_echo "not found" >&6; }
5424             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5425           fi
5426           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5427 $as_echo "$tool_specified" >&6; }
5428         fi
5429       fi
5430     fi
5431 
5432   fi
5433 
5434 
5435 
5436   if test "x$BASENAME" = x; then
5437     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5438   fi
5439 
5440 
5441 
5442 
5443 
5444   # Publish this variable in the help.
5445 
5446 
5447   if [ -z "${BASH+x}" ]; then
5448     # The variable is not set by user, try to locate tool using the code snippet
5449     for ac_prog in bash
5450 do
5451   # Extract the first word of "$ac_prog", so it can be a program name with args.
5452 set dummy $ac_prog; ac_word=$2
5453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5454 $as_echo_n "checking for $ac_word... " >&6; }
5455 if ${ac_cv_path_BASH+:} false; then :
5456   $as_echo_n "(cached) " >&6
5457 else
5458   case $BASH in
5459   [\\/]* | ?:[\\/]*)
5460   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5461   ;;
5462   *)
5463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5464 for as_dir in $PATH
5465 do
5466   IFS=$as_save_IFS
5467   test -z "$as_dir" && as_dir=.
5468     for ac_exec_ext in '' $ac_executable_extensions; do
5469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5470     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5472     break 2
5473   fi
5474 done
5475   done
5476 IFS=$as_save_IFS
5477 
5478   ;;
5479 esac
5480 fi
5481 BASH=$ac_cv_path_BASH
5482 if test -n "$BASH"; then
5483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5484 $as_echo "$BASH" >&6; }
5485 else
5486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5487 $as_echo "no" >&6; }
5488 fi
5489 
5490 
5491   test -n "$BASH" && break
5492 done
5493 
5494   else
5495     # The variable is set, but is it from the command line or the environment?
5496 
5497     # Try to remove the string !BASH! from our list.
5498     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5499     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5500       # If it failed, the variable was not from the command line. Ignore it,
5501       # but warn the user (except for BASH, which is always set by the calling BASH).
5502       if test "xBASH" != xBASH; then
5503         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5504 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5505       fi
5506       # Try to locate tool using the code snippet
5507       for ac_prog in bash
5508 do
5509   # Extract the first word of "$ac_prog", so it can be a program name with args.
5510 set dummy $ac_prog; ac_word=$2
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5512 $as_echo_n "checking for $ac_word... " >&6; }
5513 if ${ac_cv_path_BASH+:} false; then :
5514   $as_echo_n "(cached) " >&6
5515 else
5516   case $BASH in
5517   [\\/]* | ?:[\\/]*)
5518   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5519   ;;
5520   *)
5521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5522 for as_dir in $PATH
5523 do
5524   IFS=$as_save_IFS
5525   test -z "$as_dir" && as_dir=.
5526     for ac_exec_ext in '' $ac_executable_extensions; do
5527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5528     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5530     break 2
5531   fi
5532 done
5533   done
5534 IFS=$as_save_IFS
5535 
5536   ;;
5537 esac
5538 fi
5539 BASH=$ac_cv_path_BASH
5540 if test -n "$BASH"; then
5541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5542 $as_echo "$BASH" >&6; }
5543 else
5544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5545 $as_echo "no" >&6; }
5546 fi
5547 
5548 
5549   test -n "$BASH" && break
5550 done
5551 
5552     else
5553       # If it succeeded, then it was overridden by the user. We will use it
5554       # for the tool.
5555 
5556       # First remove it from the list of overridden variables, so we can test
5557       # for unknown variables in the end.
5558       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5559 
5560       # Check if we try to supply an empty value
5561       if test "x$BASH" = x; then
5562         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5563 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5564         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5565 $as_echo_n "checking for BASH... " >&6; }
5566         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5567 $as_echo "disabled" >&6; }
5568       else
5569         # Check if the provided tool contains a complete path.
5570         tool_specified="$BASH"
5571         tool_basename="${tool_specified##*/}"
5572         if test "x$tool_basename" = "x$tool_specified"; then
5573           # A command without a complete path is provided, search $PATH.
5574           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5575 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5576           # Extract the first word of "$tool_basename", so it can be a program name with args.
5577 set dummy $tool_basename; ac_word=$2
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5579 $as_echo_n "checking for $ac_word... " >&6; }
5580 if ${ac_cv_path_BASH+:} false; then :
5581   $as_echo_n "(cached) " >&6
5582 else
5583   case $BASH in
5584   [\\/]* | ?:[\\/]*)
5585   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5586   ;;
5587   *)
5588   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5589 for as_dir in $PATH
5590 do
5591   IFS=$as_save_IFS
5592   test -z "$as_dir" && as_dir=.
5593     for ac_exec_ext in '' $ac_executable_extensions; do
5594   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5595     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5596     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5597     break 2
5598   fi
5599 done
5600   done
5601 IFS=$as_save_IFS
5602 
5603   ;;
5604 esac
5605 fi
5606 BASH=$ac_cv_path_BASH
5607 if test -n "$BASH"; then
5608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5609 $as_echo "$BASH" >&6; }
5610 else
5611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5612 $as_echo "no" >&6; }
5613 fi
5614 
5615 
5616           if test "x$BASH" = x; then
5617             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5618           fi
5619         else
5620           # Otherwise we believe it is a complete path. Use it as it is.
5621           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5622 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5623           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5624 $as_echo_n "checking for BASH... " >&6; }
5625           if test ! -x "$tool_specified"; then
5626             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5627 $as_echo "not found" >&6; }
5628             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5629           fi
5630           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5631 $as_echo "$tool_specified" >&6; }
5632         fi
5633       fi
5634     fi
5635 
5636   fi
5637 
5638 
5639 
5640   if test "x$BASH" = x; then
5641     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5642   fi
5643 
5644 
5645 
5646 
5647 
5648   # Publish this variable in the help.
5649 
5650 
5651   if [ -z "${CAT+x}" ]; then
5652     # The variable is not set by user, try to locate tool using the code snippet
5653     for ac_prog in cat
5654 do
5655   # Extract the first word of "$ac_prog", so it can be a program name with args.
5656 set dummy $ac_prog; ac_word=$2
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5658 $as_echo_n "checking for $ac_word... " >&6; }
5659 if ${ac_cv_path_CAT+:} false; then :
5660   $as_echo_n "(cached) " >&6
5661 else
5662   case $CAT in
5663   [\\/]* | ?:[\\/]*)
5664   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5665   ;;
5666   *)
5667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5668 for as_dir in $PATH
5669 do
5670   IFS=$as_save_IFS
5671   test -z "$as_dir" && as_dir=.
5672     for ac_exec_ext in '' $ac_executable_extensions; do
5673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5674     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5676     break 2
5677   fi
5678 done
5679   done
5680 IFS=$as_save_IFS
5681 
5682   ;;
5683 esac
5684 fi
5685 CAT=$ac_cv_path_CAT
5686 if test -n "$CAT"; then
5687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5688 $as_echo "$CAT" >&6; }
5689 else
5690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5691 $as_echo "no" >&6; }
5692 fi
5693 
5694 
5695   test -n "$CAT" && break
5696 done
5697 
5698   else
5699     # The variable is set, but is it from the command line or the environment?
5700 
5701     # Try to remove the string !CAT! from our list.
5702     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5703     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5704       # If it failed, the variable was not from the command line. Ignore it,
5705       # but warn the user (except for BASH, which is always set by the calling BASH).
5706       if test "xCAT" != xBASH; then
5707         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5708 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5709       fi
5710       # Try to locate tool using the code snippet
5711       for ac_prog in cat
5712 do
5713   # Extract the first word of "$ac_prog", so it can be a program name with args.
5714 set dummy $ac_prog; ac_word=$2
5715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5716 $as_echo_n "checking for $ac_word... " >&6; }
5717 if ${ac_cv_path_CAT+:} false; then :
5718   $as_echo_n "(cached) " >&6
5719 else
5720   case $CAT in
5721   [\\/]* | ?:[\\/]*)
5722   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5723   ;;
5724   *)
5725   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5726 for as_dir in $PATH
5727 do
5728   IFS=$as_save_IFS
5729   test -z "$as_dir" && as_dir=.
5730     for ac_exec_ext in '' $ac_executable_extensions; do
5731   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5732     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5733     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5734     break 2
5735   fi
5736 done
5737   done
5738 IFS=$as_save_IFS
5739 
5740   ;;
5741 esac
5742 fi
5743 CAT=$ac_cv_path_CAT
5744 if test -n "$CAT"; then
5745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5746 $as_echo "$CAT" >&6; }
5747 else
5748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5749 $as_echo "no" >&6; }
5750 fi
5751 
5752 
5753   test -n "$CAT" && break
5754 done
5755 
5756     else
5757       # If it succeeded, then it was overridden by the user. We will use it
5758       # for the tool.
5759 
5760       # First remove it from the list of overridden variables, so we can test
5761       # for unknown variables in the end.
5762       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5763 
5764       # Check if we try to supply an empty value
5765       if test "x$CAT" = x; then
5766         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5767 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5768         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5769 $as_echo_n "checking for CAT... " >&6; }
5770         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5771 $as_echo "disabled" >&6; }
5772       else
5773         # Check if the provided tool contains a complete path.
5774         tool_specified="$CAT"
5775         tool_basename="${tool_specified##*/}"
5776         if test "x$tool_basename" = "x$tool_specified"; then
5777           # A command without a complete path is provided, search $PATH.
5778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5779 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5780           # Extract the first word of "$tool_basename", so it can be a program name with args.
5781 set dummy $tool_basename; ac_word=$2
5782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5783 $as_echo_n "checking for $ac_word... " >&6; }
5784 if ${ac_cv_path_CAT+:} false; then :
5785   $as_echo_n "(cached) " >&6
5786 else
5787   case $CAT in
5788   [\\/]* | ?:[\\/]*)
5789   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5790   ;;
5791   *)
5792   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5793 for as_dir in $PATH
5794 do
5795   IFS=$as_save_IFS
5796   test -z "$as_dir" && as_dir=.
5797     for ac_exec_ext in '' $ac_executable_extensions; do
5798   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5799     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5801     break 2
5802   fi
5803 done
5804   done
5805 IFS=$as_save_IFS
5806 
5807   ;;
5808 esac
5809 fi
5810 CAT=$ac_cv_path_CAT
5811 if test -n "$CAT"; then
5812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5813 $as_echo "$CAT" >&6; }
5814 else
5815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816 $as_echo "no" >&6; }
5817 fi
5818 
5819 
5820           if test "x$CAT" = x; then
5821             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5822           fi
5823         else
5824           # Otherwise we believe it is a complete path. Use it as it is.
5825           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5826 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5827           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5828 $as_echo_n "checking for CAT... " >&6; }
5829           if test ! -x "$tool_specified"; then
5830             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5831 $as_echo "not found" >&6; }
5832             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5833           fi
5834           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5835 $as_echo "$tool_specified" >&6; }
5836         fi
5837       fi
5838     fi
5839 
5840   fi
5841 
5842 
5843 
5844   if test "x$CAT" = x; then
5845     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5846   fi
5847 
5848 
5849 
5850 
5851 
5852   # Publish this variable in the help.
5853 
5854 
5855   if [ -z "${CHMOD+x}" ]; then
5856     # The variable is not set by user, try to locate tool using the code snippet
5857     for ac_prog in chmod
5858 do
5859   # Extract the first word of "$ac_prog", so it can be a program name with args.
5860 set dummy $ac_prog; ac_word=$2
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5862 $as_echo_n "checking for $ac_word... " >&6; }
5863 if ${ac_cv_path_CHMOD+:} false; then :
5864   $as_echo_n "(cached) " >&6
5865 else
5866   case $CHMOD in
5867   [\\/]* | ?:[\\/]*)
5868   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5869   ;;
5870   *)
5871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5872 for as_dir in $PATH
5873 do
5874   IFS=$as_save_IFS
5875   test -z "$as_dir" && as_dir=.
5876     for ac_exec_ext in '' $ac_executable_extensions; do
5877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5878     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5880     break 2
5881   fi
5882 done
5883   done
5884 IFS=$as_save_IFS
5885 
5886   ;;
5887 esac
5888 fi
5889 CHMOD=$ac_cv_path_CHMOD
5890 if test -n "$CHMOD"; then
5891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5892 $as_echo "$CHMOD" >&6; }
5893 else
5894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5895 $as_echo "no" >&6; }
5896 fi
5897 
5898 
5899   test -n "$CHMOD" && break
5900 done
5901 
5902   else
5903     # The variable is set, but is it from the command line or the environment?
5904 
5905     # Try to remove the string !CHMOD! from our list.
5906     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5907     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5908       # If it failed, the variable was not from the command line. Ignore it,
5909       # but warn the user (except for BASH, which is always set by the calling BASH).
5910       if test "xCHMOD" != xBASH; then
5911         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5912 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5913       fi
5914       # Try to locate tool using the code snippet
5915       for ac_prog in chmod
5916 do
5917   # Extract the first word of "$ac_prog", so it can be a program name with args.
5918 set dummy $ac_prog; ac_word=$2
5919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5920 $as_echo_n "checking for $ac_word... " >&6; }
5921 if ${ac_cv_path_CHMOD+:} false; then :
5922   $as_echo_n "(cached) " >&6
5923 else
5924   case $CHMOD in
5925   [\\/]* | ?:[\\/]*)
5926   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5927   ;;
5928   *)
5929   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5930 for as_dir in $PATH
5931 do
5932   IFS=$as_save_IFS
5933   test -z "$as_dir" && as_dir=.
5934     for ac_exec_ext in '' $ac_executable_extensions; do
5935   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5936     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5937     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5938     break 2
5939   fi
5940 done
5941   done
5942 IFS=$as_save_IFS
5943 
5944   ;;
5945 esac
5946 fi
5947 CHMOD=$ac_cv_path_CHMOD
5948 if test -n "$CHMOD"; then
5949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5950 $as_echo "$CHMOD" >&6; }
5951 else
5952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5953 $as_echo "no" >&6; }
5954 fi
5955 
5956 
5957   test -n "$CHMOD" && break
5958 done
5959 
5960     else
5961       # If it succeeded, then it was overridden by the user. We will use it
5962       # for the tool.
5963 
5964       # First remove it from the list of overridden variables, so we can test
5965       # for unknown variables in the end.
5966       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5967 
5968       # Check if we try to supply an empty value
5969       if test "x$CHMOD" = x; then
5970         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5971 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5972         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5973 $as_echo_n "checking for CHMOD... " >&6; }
5974         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5975 $as_echo "disabled" >&6; }
5976       else
5977         # Check if the provided tool contains a complete path.
5978         tool_specified="$CHMOD"
5979         tool_basename="${tool_specified##*/}"
5980         if test "x$tool_basename" = "x$tool_specified"; then
5981           # A command without a complete path is provided, search $PATH.
5982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5983 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5984           # Extract the first word of "$tool_basename", so it can be a program name with args.
5985 set dummy $tool_basename; ac_word=$2
5986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5987 $as_echo_n "checking for $ac_word... " >&6; }
5988 if ${ac_cv_path_CHMOD+:} false; then :
5989   $as_echo_n "(cached) " >&6
5990 else
5991   case $CHMOD in
5992   [\\/]* | ?:[\\/]*)
5993   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5994   ;;
5995   *)
5996   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5997 for as_dir in $PATH
5998 do
5999   IFS=$as_save_IFS
6000   test -z "$as_dir" && as_dir=.
6001     for ac_exec_ext in '' $ac_executable_extensions; do
6002   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6003     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6004     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6005     break 2
6006   fi
6007 done
6008   done
6009 IFS=$as_save_IFS
6010 
6011   ;;
6012 esac
6013 fi
6014 CHMOD=$ac_cv_path_CHMOD
6015 if test -n "$CHMOD"; then
6016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6017 $as_echo "$CHMOD" >&6; }
6018 else
6019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020 $as_echo "no" >&6; }
6021 fi
6022 
6023 
6024           if test "x$CHMOD" = x; then
6025             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6026           fi
6027         else
6028           # Otherwise we believe it is a complete path. Use it as it is.
6029           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6030 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6031           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6032 $as_echo_n "checking for CHMOD... " >&6; }
6033           if test ! -x "$tool_specified"; then
6034             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6035 $as_echo "not found" >&6; }
6036             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6037           fi
6038           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6039 $as_echo "$tool_specified" >&6; }
6040         fi
6041       fi
6042     fi
6043 
6044   fi
6045 
6046 
6047 
6048   if test "x$CHMOD" = x; then
6049     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6050   fi
6051 
6052 
6053 
6054 
6055 
6056   # Publish this variable in the help.
6057 
6058 
6059   if [ -z "${CMP+x}" ]; then
6060     # The variable is not set by user, try to locate tool using the code snippet
6061     for ac_prog in cmp
6062 do
6063   # Extract the first word of "$ac_prog", so it can be a program name with args.
6064 set dummy $ac_prog; ac_word=$2
6065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6066 $as_echo_n "checking for $ac_word... " >&6; }
6067 if ${ac_cv_path_CMP+:} false; then :
6068   $as_echo_n "(cached) " >&6
6069 else
6070   case $CMP in
6071   [\\/]* | ?:[\\/]*)
6072   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6073   ;;
6074   *)
6075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6076 for as_dir in $PATH
6077 do
6078   IFS=$as_save_IFS
6079   test -z "$as_dir" && as_dir=.
6080     for ac_exec_ext in '' $ac_executable_extensions; do
6081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6082     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6084     break 2
6085   fi
6086 done
6087   done
6088 IFS=$as_save_IFS
6089 
6090   ;;
6091 esac
6092 fi
6093 CMP=$ac_cv_path_CMP
6094 if test -n "$CMP"; then
6095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6096 $as_echo "$CMP" >&6; }
6097 else
6098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6099 $as_echo "no" >&6; }
6100 fi
6101 
6102 
6103   test -n "$CMP" && break
6104 done
6105 
6106   else
6107     # The variable is set, but is it from the command line or the environment?
6108 
6109     # Try to remove the string !CMP! from our list.
6110     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6111     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6112       # If it failed, the variable was not from the command line. Ignore it,
6113       # but warn the user (except for BASH, which is always set by the calling BASH).
6114       if test "xCMP" != xBASH; then
6115         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6116 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6117       fi
6118       # Try to locate tool using the code snippet
6119       for ac_prog in cmp
6120 do
6121   # Extract the first word of "$ac_prog", so it can be a program name with args.
6122 set dummy $ac_prog; ac_word=$2
6123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6124 $as_echo_n "checking for $ac_word... " >&6; }
6125 if ${ac_cv_path_CMP+:} false; then :
6126   $as_echo_n "(cached) " >&6
6127 else
6128   case $CMP in
6129   [\\/]* | ?:[\\/]*)
6130   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6131   ;;
6132   *)
6133   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6134 for as_dir in $PATH
6135 do
6136   IFS=$as_save_IFS
6137   test -z "$as_dir" && as_dir=.
6138     for ac_exec_ext in '' $ac_executable_extensions; do
6139   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6140     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6141     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6142     break 2
6143   fi
6144 done
6145   done
6146 IFS=$as_save_IFS
6147 
6148   ;;
6149 esac
6150 fi
6151 CMP=$ac_cv_path_CMP
6152 if test -n "$CMP"; then
6153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6154 $as_echo "$CMP" >&6; }
6155 else
6156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6157 $as_echo "no" >&6; }
6158 fi
6159 
6160 
6161   test -n "$CMP" && break
6162 done
6163 
6164     else
6165       # If it succeeded, then it was overridden by the user. We will use it
6166       # for the tool.
6167 
6168       # First remove it from the list of overridden variables, so we can test
6169       # for unknown variables in the end.
6170       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6171 
6172       # Check if we try to supply an empty value
6173       if test "x$CMP" = x; then
6174         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6175 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6176         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6177 $as_echo_n "checking for CMP... " >&6; }
6178         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6179 $as_echo "disabled" >&6; }
6180       else
6181         # Check if the provided tool contains a complete path.
6182         tool_specified="$CMP"
6183         tool_basename="${tool_specified##*/}"
6184         if test "x$tool_basename" = "x$tool_specified"; then
6185           # A command without a complete path is provided, search $PATH.
6186           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6187 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6188           # Extract the first word of "$tool_basename", so it can be a program name with args.
6189 set dummy $tool_basename; ac_word=$2
6190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6191 $as_echo_n "checking for $ac_word... " >&6; }
6192 if ${ac_cv_path_CMP+:} false; then :
6193   $as_echo_n "(cached) " >&6
6194 else
6195   case $CMP in
6196   [\\/]* | ?:[\\/]*)
6197   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6198   ;;
6199   *)
6200   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6201 for as_dir in $PATH
6202 do
6203   IFS=$as_save_IFS
6204   test -z "$as_dir" && as_dir=.
6205     for ac_exec_ext in '' $ac_executable_extensions; do
6206   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6207     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6208     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6209     break 2
6210   fi
6211 done
6212   done
6213 IFS=$as_save_IFS
6214 
6215   ;;
6216 esac
6217 fi
6218 CMP=$ac_cv_path_CMP
6219 if test -n "$CMP"; then
6220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6221 $as_echo "$CMP" >&6; }
6222 else
6223   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6224 $as_echo "no" >&6; }
6225 fi
6226 
6227 
6228           if test "x$CMP" = x; then
6229             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6230           fi
6231         else
6232           # Otherwise we believe it is a complete path. Use it as it is.
6233           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6234 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6235           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6236 $as_echo_n "checking for CMP... " >&6; }
6237           if test ! -x "$tool_specified"; then
6238             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6239 $as_echo "not found" >&6; }
6240             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6241           fi
6242           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6243 $as_echo "$tool_specified" >&6; }
6244         fi
6245       fi
6246     fi
6247 
6248   fi
6249 
6250 
6251 
6252   if test "x$CMP" = x; then
6253     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6254   fi
6255 
6256 
6257 
6258 
6259 
6260   # Publish this variable in the help.
6261 
6262 
6263   if [ -z "${COMM+x}" ]; then
6264     # The variable is not set by user, try to locate tool using the code snippet
6265     for ac_prog in comm
6266 do
6267   # Extract the first word of "$ac_prog", so it can be a program name with args.
6268 set dummy $ac_prog; ac_word=$2
6269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6270 $as_echo_n "checking for $ac_word... " >&6; }
6271 if ${ac_cv_path_COMM+:} false; then :
6272   $as_echo_n "(cached) " >&6
6273 else
6274   case $COMM in
6275   [\\/]* | ?:[\\/]*)
6276   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6277   ;;
6278   *)
6279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6280 for as_dir in $PATH
6281 do
6282   IFS=$as_save_IFS
6283   test -z "$as_dir" && as_dir=.
6284     for ac_exec_ext in '' $ac_executable_extensions; do
6285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6286     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6288     break 2
6289   fi
6290 done
6291   done
6292 IFS=$as_save_IFS
6293 
6294   ;;
6295 esac
6296 fi
6297 COMM=$ac_cv_path_COMM
6298 if test -n "$COMM"; then
6299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6300 $as_echo "$COMM" >&6; }
6301 else
6302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6303 $as_echo "no" >&6; }
6304 fi
6305 
6306 
6307   test -n "$COMM" && break
6308 done
6309 
6310   else
6311     # The variable is set, but is it from the command line or the environment?
6312 
6313     # Try to remove the string !COMM! from our list.
6314     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6315     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6316       # If it failed, the variable was not from the command line. Ignore it,
6317       # but warn the user (except for BASH, which is always set by the calling BASH).
6318       if test "xCOMM" != xBASH; then
6319         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6320 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6321       fi
6322       # Try to locate tool using the code snippet
6323       for ac_prog in comm
6324 do
6325   # Extract the first word of "$ac_prog", so it can be a program name with args.
6326 set dummy $ac_prog; ac_word=$2
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6328 $as_echo_n "checking for $ac_word... " >&6; }
6329 if ${ac_cv_path_COMM+:} false; then :
6330   $as_echo_n "(cached) " >&6
6331 else
6332   case $COMM in
6333   [\\/]* | ?:[\\/]*)
6334   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6335   ;;
6336   *)
6337   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6338 for as_dir in $PATH
6339 do
6340   IFS=$as_save_IFS
6341   test -z "$as_dir" && as_dir=.
6342     for ac_exec_ext in '' $ac_executable_extensions; do
6343   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6344     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6345     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6346     break 2
6347   fi
6348 done
6349   done
6350 IFS=$as_save_IFS
6351 
6352   ;;
6353 esac
6354 fi
6355 COMM=$ac_cv_path_COMM
6356 if test -n "$COMM"; then
6357   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6358 $as_echo "$COMM" >&6; }
6359 else
6360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6361 $as_echo "no" >&6; }
6362 fi
6363 
6364 
6365   test -n "$COMM" && break
6366 done
6367 
6368     else
6369       # If it succeeded, then it was overridden by the user. We will use it
6370       # for the tool.
6371 
6372       # First remove it from the list of overridden variables, so we can test
6373       # for unknown variables in the end.
6374       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6375 
6376       # Check if we try to supply an empty value
6377       if test "x$COMM" = x; then
6378         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6379 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6380         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6381 $as_echo_n "checking for COMM... " >&6; }
6382         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6383 $as_echo "disabled" >&6; }
6384       else
6385         # Check if the provided tool contains a complete path.
6386         tool_specified="$COMM"
6387         tool_basename="${tool_specified##*/}"
6388         if test "x$tool_basename" = "x$tool_specified"; then
6389           # A command without a complete path is provided, search $PATH.
6390           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6391 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6392           # Extract the first word of "$tool_basename", so it can be a program name with args.
6393 set dummy $tool_basename; ac_word=$2
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6395 $as_echo_n "checking for $ac_word... " >&6; }
6396 if ${ac_cv_path_COMM+:} false; then :
6397   $as_echo_n "(cached) " >&6
6398 else
6399   case $COMM in
6400   [\\/]* | ?:[\\/]*)
6401   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6402   ;;
6403   *)
6404   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6405 for as_dir in $PATH
6406 do
6407   IFS=$as_save_IFS
6408   test -z "$as_dir" && as_dir=.
6409     for ac_exec_ext in '' $ac_executable_extensions; do
6410   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6411     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6412     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6413     break 2
6414   fi
6415 done
6416   done
6417 IFS=$as_save_IFS
6418 
6419   ;;
6420 esac
6421 fi
6422 COMM=$ac_cv_path_COMM
6423 if test -n "$COMM"; then
6424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6425 $as_echo "$COMM" >&6; }
6426 else
6427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428 $as_echo "no" >&6; }
6429 fi
6430 
6431 
6432           if test "x$COMM" = x; then
6433             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6434           fi
6435         else
6436           # Otherwise we believe it is a complete path. Use it as it is.
6437           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6438 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6439           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6440 $as_echo_n "checking for COMM... " >&6; }
6441           if test ! -x "$tool_specified"; then
6442             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6443 $as_echo "not found" >&6; }
6444             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6445           fi
6446           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6447 $as_echo "$tool_specified" >&6; }
6448         fi
6449       fi
6450     fi
6451 
6452   fi
6453 
6454 
6455 
6456   if test "x$COMM" = x; then
6457     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6458   fi
6459 
6460 
6461 
6462 
6463 
6464   # Publish this variable in the help.
6465 
6466 
6467   if [ -z "${CP+x}" ]; then
6468     # The variable is not set by user, try to locate tool using the code snippet
6469     for ac_prog in cp
6470 do
6471   # Extract the first word of "$ac_prog", so it can be a program name with args.
6472 set dummy $ac_prog; ac_word=$2
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6474 $as_echo_n "checking for $ac_word... " >&6; }
6475 if ${ac_cv_path_CP+:} false; then :
6476   $as_echo_n "(cached) " >&6
6477 else
6478   case $CP in
6479   [\\/]* | ?:[\\/]*)
6480   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6481   ;;
6482   *)
6483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6484 for as_dir in $PATH
6485 do
6486   IFS=$as_save_IFS
6487   test -z "$as_dir" && as_dir=.
6488     for ac_exec_ext in '' $ac_executable_extensions; do
6489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6490     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6492     break 2
6493   fi
6494 done
6495   done
6496 IFS=$as_save_IFS
6497 
6498   ;;
6499 esac
6500 fi
6501 CP=$ac_cv_path_CP
6502 if test -n "$CP"; then
6503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6504 $as_echo "$CP" >&6; }
6505 else
6506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6507 $as_echo "no" >&6; }
6508 fi
6509 
6510 
6511   test -n "$CP" && break
6512 done
6513 
6514   else
6515     # The variable is set, but is it from the command line or the environment?
6516 
6517     # Try to remove the string !CP! from our list.
6518     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6519     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6520       # If it failed, the variable was not from the command line. Ignore it,
6521       # but warn the user (except for BASH, which is always set by the calling BASH).
6522       if test "xCP" != xBASH; then
6523         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6524 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6525       fi
6526       # Try to locate tool using the code snippet
6527       for ac_prog in cp
6528 do
6529   # Extract the first word of "$ac_prog", so it can be a program name with args.
6530 set dummy $ac_prog; ac_word=$2
6531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6532 $as_echo_n "checking for $ac_word... " >&6; }
6533 if ${ac_cv_path_CP+:} false; then :
6534   $as_echo_n "(cached) " >&6
6535 else
6536   case $CP in
6537   [\\/]* | ?:[\\/]*)
6538   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6539   ;;
6540   *)
6541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6542 for as_dir in $PATH
6543 do
6544   IFS=$as_save_IFS
6545   test -z "$as_dir" && as_dir=.
6546     for ac_exec_ext in '' $ac_executable_extensions; do
6547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6548     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6550     break 2
6551   fi
6552 done
6553   done
6554 IFS=$as_save_IFS
6555 
6556   ;;
6557 esac
6558 fi
6559 CP=$ac_cv_path_CP
6560 if test -n "$CP"; then
6561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6562 $as_echo "$CP" >&6; }
6563 else
6564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6565 $as_echo "no" >&6; }
6566 fi
6567 
6568 
6569   test -n "$CP" && break
6570 done
6571 
6572     else
6573       # If it succeeded, then it was overridden by the user. We will use it
6574       # for the tool.
6575 
6576       # First remove it from the list of overridden variables, so we can test
6577       # for unknown variables in the end.
6578       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6579 
6580       # Check if we try to supply an empty value
6581       if test "x$CP" = x; then
6582         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6583 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6584         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6585 $as_echo_n "checking for CP... " >&6; }
6586         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6587 $as_echo "disabled" >&6; }
6588       else
6589         # Check if the provided tool contains a complete path.
6590         tool_specified="$CP"
6591         tool_basename="${tool_specified##*/}"
6592         if test "x$tool_basename" = "x$tool_specified"; then
6593           # A command without a complete path is provided, search $PATH.
6594           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6595 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6596           # Extract the first word of "$tool_basename", so it can be a program name with args.
6597 set dummy $tool_basename; ac_word=$2
6598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6599 $as_echo_n "checking for $ac_word... " >&6; }
6600 if ${ac_cv_path_CP+:} false; then :
6601   $as_echo_n "(cached) " >&6
6602 else
6603   case $CP in
6604   [\\/]* | ?:[\\/]*)
6605   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6606   ;;
6607   *)
6608   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6609 for as_dir in $PATH
6610 do
6611   IFS=$as_save_IFS
6612   test -z "$as_dir" && as_dir=.
6613     for ac_exec_ext in '' $ac_executable_extensions; do
6614   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6615     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6616     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6617     break 2
6618   fi
6619 done
6620   done
6621 IFS=$as_save_IFS
6622 
6623   ;;
6624 esac
6625 fi
6626 CP=$ac_cv_path_CP
6627 if test -n "$CP"; then
6628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6629 $as_echo "$CP" >&6; }
6630 else
6631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6632 $as_echo "no" >&6; }
6633 fi
6634 
6635 
6636           if test "x$CP" = x; then
6637             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6638           fi
6639         else
6640           # Otherwise we believe it is a complete path. Use it as it is.
6641           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6642 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6643           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6644 $as_echo_n "checking for CP... " >&6; }
6645           if test ! -x "$tool_specified"; then
6646             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6647 $as_echo "not found" >&6; }
6648             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6649           fi
6650           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6651 $as_echo "$tool_specified" >&6; }
6652         fi
6653       fi
6654     fi
6655 
6656   fi
6657 
6658 
6659 
6660   if test "x$CP" = x; then
6661     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6662   fi
6663 
6664 
6665 
6666 
6667 
6668   # Publish this variable in the help.
6669 
6670 
6671   if [ -z "${CUT+x}" ]; then
6672     # The variable is not set by user, try to locate tool using the code snippet
6673     for ac_prog in cut
6674 do
6675   # Extract the first word of "$ac_prog", so it can be a program name with args.
6676 set dummy $ac_prog; ac_word=$2
6677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6678 $as_echo_n "checking for $ac_word... " >&6; }
6679 if ${ac_cv_path_CUT+:} false; then :
6680   $as_echo_n "(cached) " >&6
6681 else
6682   case $CUT in
6683   [\\/]* | ?:[\\/]*)
6684   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6685   ;;
6686   *)
6687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6688 for as_dir in $PATH
6689 do
6690   IFS=$as_save_IFS
6691   test -z "$as_dir" && as_dir=.
6692     for ac_exec_ext in '' $ac_executable_extensions; do
6693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6694     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6696     break 2
6697   fi
6698 done
6699   done
6700 IFS=$as_save_IFS
6701 
6702   ;;
6703 esac
6704 fi
6705 CUT=$ac_cv_path_CUT
6706 if test -n "$CUT"; then
6707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6708 $as_echo "$CUT" >&6; }
6709 else
6710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6711 $as_echo "no" >&6; }
6712 fi
6713 
6714 
6715   test -n "$CUT" && break
6716 done
6717 
6718   else
6719     # The variable is set, but is it from the command line or the environment?
6720 
6721     # Try to remove the string !CUT! from our list.
6722     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6723     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6724       # If it failed, the variable was not from the command line. Ignore it,
6725       # but warn the user (except for BASH, which is always set by the calling BASH).
6726       if test "xCUT" != xBASH; then
6727         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6728 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6729       fi
6730       # Try to locate tool using the code snippet
6731       for ac_prog in cut
6732 do
6733   # Extract the first word of "$ac_prog", so it can be a program name with args.
6734 set dummy $ac_prog; ac_word=$2
6735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6736 $as_echo_n "checking for $ac_word... " >&6; }
6737 if ${ac_cv_path_CUT+:} false; then :
6738   $as_echo_n "(cached) " >&6
6739 else
6740   case $CUT in
6741   [\\/]* | ?:[\\/]*)
6742   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6743   ;;
6744   *)
6745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6746 for as_dir in $PATH
6747 do
6748   IFS=$as_save_IFS
6749   test -z "$as_dir" && as_dir=.
6750     for ac_exec_ext in '' $ac_executable_extensions; do
6751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6752     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6754     break 2
6755   fi
6756 done
6757   done
6758 IFS=$as_save_IFS
6759 
6760   ;;
6761 esac
6762 fi
6763 CUT=$ac_cv_path_CUT
6764 if test -n "$CUT"; then
6765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6766 $as_echo "$CUT" >&6; }
6767 else
6768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6769 $as_echo "no" >&6; }
6770 fi
6771 
6772 
6773   test -n "$CUT" && break
6774 done
6775 
6776     else
6777       # If it succeeded, then it was overridden by the user. We will use it
6778       # for the tool.
6779 
6780       # First remove it from the list of overridden variables, so we can test
6781       # for unknown variables in the end.
6782       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6783 
6784       # Check if we try to supply an empty value
6785       if test "x$CUT" = x; then
6786         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6787 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6788         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6789 $as_echo_n "checking for CUT... " >&6; }
6790         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6791 $as_echo "disabled" >&6; }
6792       else
6793         # Check if the provided tool contains a complete path.
6794         tool_specified="$CUT"
6795         tool_basename="${tool_specified##*/}"
6796         if test "x$tool_basename" = "x$tool_specified"; then
6797           # A command without a complete path is provided, search $PATH.
6798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6799 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6800           # Extract the first word of "$tool_basename", so it can be a program name with args.
6801 set dummy $tool_basename; ac_word=$2
6802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803 $as_echo_n "checking for $ac_word... " >&6; }
6804 if ${ac_cv_path_CUT+:} false; then :
6805   $as_echo_n "(cached) " >&6
6806 else
6807   case $CUT in
6808   [\\/]* | ?:[\\/]*)
6809   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6810   ;;
6811   *)
6812   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813 for as_dir in $PATH
6814 do
6815   IFS=$as_save_IFS
6816   test -z "$as_dir" && as_dir=.
6817     for ac_exec_ext in '' $ac_executable_extensions; do
6818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6819     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6821     break 2
6822   fi
6823 done
6824   done
6825 IFS=$as_save_IFS
6826 
6827   ;;
6828 esac
6829 fi
6830 CUT=$ac_cv_path_CUT
6831 if test -n "$CUT"; then
6832   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6833 $as_echo "$CUT" >&6; }
6834 else
6835   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836 $as_echo "no" >&6; }
6837 fi
6838 
6839 
6840           if test "x$CUT" = x; then
6841             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6842           fi
6843         else
6844           # Otherwise we believe it is a complete path. Use it as it is.
6845           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6846 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6847           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6848 $as_echo_n "checking for CUT... " >&6; }
6849           if test ! -x "$tool_specified"; then
6850             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6851 $as_echo "not found" >&6; }
6852             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6853           fi
6854           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6855 $as_echo "$tool_specified" >&6; }
6856         fi
6857       fi
6858     fi
6859 
6860   fi
6861 
6862 
6863 
6864   if test "x$CUT" = x; then
6865     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6866   fi
6867 
6868 
6869 
6870 
6871 
6872   # Publish this variable in the help.
6873 
6874 
6875   if [ -z "${DATE+x}" ]; then
6876     # The variable is not set by user, try to locate tool using the code snippet
6877     for ac_prog in date
6878 do
6879   # Extract the first word of "$ac_prog", so it can be a program name with args.
6880 set dummy $ac_prog; ac_word=$2
6881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6882 $as_echo_n "checking for $ac_word... " >&6; }
6883 if ${ac_cv_path_DATE+:} false; then :
6884   $as_echo_n "(cached) " >&6
6885 else
6886   case $DATE in
6887   [\\/]* | ?:[\\/]*)
6888   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6889   ;;
6890   *)
6891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6892 for as_dir in $PATH
6893 do
6894   IFS=$as_save_IFS
6895   test -z "$as_dir" && as_dir=.
6896     for ac_exec_ext in '' $ac_executable_extensions; do
6897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6898     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6900     break 2
6901   fi
6902 done
6903   done
6904 IFS=$as_save_IFS
6905 
6906   ;;
6907 esac
6908 fi
6909 DATE=$ac_cv_path_DATE
6910 if test -n "$DATE"; then
6911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6912 $as_echo "$DATE" >&6; }
6913 else
6914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6915 $as_echo "no" >&6; }
6916 fi
6917 
6918 
6919   test -n "$DATE" && break
6920 done
6921 
6922   else
6923     # The variable is set, but is it from the command line or the environment?
6924 
6925     # Try to remove the string !DATE! from our list.
6926     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6927     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6928       # If it failed, the variable was not from the command line. Ignore it,
6929       # but warn the user (except for BASH, which is always set by the calling BASH).
6930       if test "xDATE" != xBASH; then
6931         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6932 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6933       fi
6934       # Try to locate tool using the code snippet
6935       for ac_prog in date
6936 do
6937   # Extract the first word of "$ac_prog", so it can be a program name with args.
6938 set dummy $ac_prog; ac_word=$2
6939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6940 $as_echo_n "checking for $ac_word... " >&6; }
6941 if ${ac_cv_path_DATE+:} false; then :
6942   $as_echo_n "(cached) " >&6
6943 else
6944   case $DATE in
6945   [\\/]* | ?:[\\/]*)
6946   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6947   ;;
6948   *)
6949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6950 for as_dir in $PATH
6951 do
6952   IFS=$as_save_IFS
6953   test -z "$as_dir" && as_dir=.
6954     for ac_exec_ext in '' $ac_executable_extensions; do
6955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6956     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6958     break 2
6959   fi
6960 done
6961   done
6962 IFS=$as_save_IFS
6963 
6964   ;;
6965 esac
6966 fi
6967 DATE=$ac_cv_path_DATE
6968 if test -n "$DATE"; then
6969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6970 $as_echo "$DATE" >&6; }
6971 else
6972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6973 $as_echo "no" >&6; }
6974 fi
6975 
6976 
6977   test -n "$DATE" && break
6978 done
6979 
6980     else
6981       # If it succeeded, then it was overridden by the user. We will use it
6982       # for the tool.
6983 
6984       # First remove it from the list of overridden variables, so we can test
6985       # for unknown variables in the end.
6986       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6987 
6988       # Check if we try to supply an empty value
6989       if test "x$DATE" = x; then
6990         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6991 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6993 $as_echo_n "checking for DATE... " >&6; }
6994         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6995 $as_echo "disabled" >&6; }
6996       else
6997         # Check if the provided tool contains a complete path.
6998         tool_specified="$DATE"
6999         tool_basename="${tool_specified##*/}"
7000         if test "x$tool_basename" = "x$tool_specified"; then
7001           # A command without a complete path is provided, search $PATH.
7002           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7003 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7004           # Extract the first word of "$tool_basename", so it can be a program name with args.
7005 set dummy $tool_basename; ac_word=$2
7006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7007 $as_echo_n "checking for $ac_word... " >&6; }
7008 if ${ac_cv_path_DATE+:} false; then :
7009   $as_echo_n "(cached) " >&6
7010 else
7011   case $DATE in
7012   [\\/]* | ?:[\\/]*)
7013   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7014   ;;
7015   *)
7016   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7017 for as_dir in $PATH
7018 do
7019   IFS=$as_save_IFS
7020   test -z "$as_dir" && as_dir=.
7021     for ac_exec_ext in '' $ac_executable_extensions; do
7022   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7023     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7024     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7025     break 2
7026   fi
7027 done
7028   done
7029 IFS=$as_save_IFS
7030 
7031   ;;
7032 esac
7033 fi
7034 DATE=$ac_cv_path_DATE
7035 if test -n "$DATE"; then
7036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7037 $as_echo "$DATE" >&6; }
7038 else
7039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7040 $as_echo "no" >&6; }
7041 fi
7042 
7043 
7044           if test "x$DATE" = x; then
7045             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7046           fi
7047         else
7048           # Otherwise we believe it is a complete path. Use it as it is.
7049           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7050 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7051           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7052 $as_echo_n "checking for DATE... " >&6; }
7053           if test ! -x "$tool_specified"; then
7054             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7055 $as_echo "not found" >&6; }
7056             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7057           fi
7058           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7059 $as_echo "$tool_specified" >&6; }
7060         fi
7061       fi
7062     fi
7063 
7064   fi
7065 
7066 
7067 
7068   if test "x$DATE" = x; then
7069     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7070   fi
7071 
7072 
7073 
7074 
7075 
7076   # Publish this variable in the help.
7077 
7078 
7079   if [ -z "${DIFF+x}" ]; then
7080     # The variable is not set by user, try to locate tool using the code snippet
7081     for ac_prog in gdiff diff
7082 do
7083   # Extract the first word of "$ac_prog", so it can be a program name with args.
7084 set dummy $ac_prog; ac_word=$2
7085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7086 $as_echo_n "checking for $ac_word... " >&6; }
7087 if ${ac_cv_path_DIFF+:} false; then :
7088   $as_echo_n "(cached) " >&6
7089 else
7090   case $DIFF in
7091   [\\/]* | ?:[\\/]*)
7092   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7093   ;;
7094   *)
7095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7096 for as_dir in $PATH
7097 do
7098   IFS=$as_save_IFS
7099   test -z "$as_dir" && as_dir=.
7100     for ac_exec_ext in '' $ac_executable_extensions; do
7101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7102     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7104     break 2
7105   fi
7106 done
7107   done
7108 IFS=$as_save_IFS
7109 
7110   ;;
7111 esac
7112 fi
7113 DIFF=$ac_cv_path_DIFF
7114 if test -n "$DIFF"; then
7115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7116 $as_echo "$DIFF" >&6; }
7117 else
7118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7119 $as_echo "no" >&6; }
7120 fi
7121 
7122 
7123   test -n "$DIFF" && break
7124 done
7125 
7126   else
7127     # The variable is set, but is it from the command line or the environment?
7128 
7129     # Try to remove the string !DIFF! from our list.
7130     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7131     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7132       # If it failed, the variable was not from the command line. Ignore it,
7133       # but warn the user (except for BASH, which is always set by the calling BASH).
7134       if test "xDIFF" != xBASH; then
7135         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7136 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7137       fi
7138       # Try to locate tool using the code snippet
7139       for ac_prog in gdiff diff
7140 do
7141   # Extract the first word of "$ac_prog", so it can be a program name with args.
7142 set dummy $ac_prog; ac_word=$2
7143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7144 $as_echo_n "checking for $ac_word... " >&6; }
7145 if ${ac_cv_path_DIFF+:} false; then :
7146   $as_echo_n "(cached) " >&6
7147 else
7148   case $DIFF in
7149   [\\/]* | ?:[\\/]*)
7150   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7151   ;;
7152   *)
7153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7154 for as_dir in $PATH
7155 do
7156   IFS=$as_save_IFS
7157   test -z "$as_dir" && as_dir=.
7158     for ac_exec_ext in '' $ac_executable_extensions; do
7159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7160     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7162     break 2
7163   fi
7164 done
7165   done
7166 IFS=$as_save_IFS
7167 
7168   ;;
7169 esac
7170 fi
7171 DIFF=$ac_cv_path_DIFF
7172 if test -n "$DIFF"; then
7173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7174 $as_echo "$DIFF" >&6; }
7175 else
7176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7177 $as_echo "no" >&6; }
7178 fi
7179 
7180 
7181   test -n "$DIFF" && break
7182 done
7183 
7184     else
7185       # If it succeeded, then it was overridden by the user. We will use it
7186       # for the tool.
7187 
7188       # First remove it from the list of overridden variables, so we can test
7189       # for unknown variables in the end.
7190       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7191 
7192       # Check if we try to supply an empty value
7193       if test "x$DIFF" = x; then
7194         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7195 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7197 $as_echo_n "checking for DIFF... " >&6; }
7198         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7199 $as_echo "disabled" >&6; }
7200       else
7201         # Check if the provided tool contains a complete path.
7202         tool_specified="$DIFF"
7203         tool_basename="${tool_specified##*/}"
7204         if test "x$tool_basename" = "x$tool_specified"; then
7205           # A command without a complete path is provided, search $PATH.
7206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7207 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7208           # Extract the first word of "$tool_basename", so it can be a program name with args.
7209 set dummy $tool_basename; ac_word=$2
7210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7211 $as_echo_n "checking for $ac_word... " >&6; }
7212 if ${ac_cv_path_DIFF+:} false; then :
7213   $as_echo_n "(cached) " >&6
7214 else
7215   case $DIFF in
7216   [\\/]* | ?:[\\/]*)
7217   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7218   ;;
7219   *)
7220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7221 for as_dir in $PATH
7222 do
7223   IFS=$as_save_IFS
7224   test -z "$as_dir" && as_dir=.
7225     for ac_exec_ext in '' $ac_executable_extensions; do
7226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7227     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7229     break 2
7230   fi
7231 done
7232   done
7233 IFS=$as_save_IFS
7234 
7235   ;;
7236 esac
7237 fi
7238 DIFF=$ac_cv_path_DIFF
7239 if test -n "$DIFF"; then
7240   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7241 $as_echo "$DIFF" >&6; }
7242 else
7243   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7244 $as_echo "no" >&6; }
7245 fi
7246 
7247 
7248           if test "x$DIFF" = x; then
7249             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7250           fi
7251         else
7252           # Otherwise we believe it is a complete path. Use it as it is.
7253           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7254 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7255           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7256 $as_echo_n "checking for DIFF... " >&6; }
7257           if test ! -x "$tool_specified"; then
7258             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7259 $as_echo "not found" >&6; }
7260             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7261           fi
7262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7263 $as_echo "$tool_specified" >&6; }
7264         fi
7265       fi
7266     fi
7267 
7268   fi
7269 
7270 
7271 
7272   if test "x$DIFF" = x; then
7273     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7274   fi
7275 
7276 
7277 
7278 
7279 
7280   # Publish this variable in the help.
7281 
7282 
7283   if [ -z "${DIRNAME+x}" ]; then
7284     # The variable is not set by user, try to locate tool using the code snippet
7285     for ac_prog in dirname
7286 do
7287   # Extract the first word of "$ac_prog", so it can be a program name with args.
7288 set dummy $ac_prog; ac_word=$2
7289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7290 $as_echo_n "checking for $ac_word... " >&6; }
7291 if ${ac_cv_path_DIRNAME+:} false; then :
7292   $as_echo_n "(cached) " >&6
7293 else
7294   case $DIRNAME in
7295   [\\/]* | ?:[\\/]*)
7296   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7297   ;;
7298   *)
7299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7300 for as_dir in $PATH
7301 do
7302   IFS=$as_save_IFS
7303   test -z "$as_dir" && as_dir=.
7304     for ac_exec_ext in '' $ac_executable_extensions; do
7305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7306     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7308     break 2
7309   fi
7310 done
7311   done
7312 IFS=$as_save_IFS
7313 
7314   ;;
7315 esac
7316 fi
7317 DIRNAME=$ac_cv_path_DIRNAME
7318 if test -n "$DIRNAME"; then
7319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7320 $as_echo "$DIRNAME" >&6; }
7321 else
7322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7323 $as_echo "no" >&6; }
7324 fi
7325 
7326 
7327   test -n "$DIRNAME" && break
7328 done
7329 
7330   else
7331     # The variable is set, but is it from the command line or the environment?
7332 
7333     # Try to remove the string !DIRNAME! from our list.
7334     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7335     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7336       # If it failed, the variable was not from the command line. Ignore it,
7337       # but warn the user (except for BASH, which is always set by the calling BASH).
7338       if test "xDIRNAME" != xBASH; then
7339         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7340 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7341       fi
7342       # Try to locate tool using the code snippet
7343       for ac_prog in dirname
7344 do
7345   # Extract the first word of "$ac_prog", so it can be a program name with args.
7346 set dummy $ac_prog; ac_word=$2
7347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7348 $as_echo_n "checking for $ac_word... " >&6; }
7349 if ${ac_cv_path_DIRNAME+:} false; then :
7350   $as_echo_n "(cached) " >&6
7351 else
7352   case $DIRNAME in
7353   [\\/]* | ?:[\\/]*)
7354   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7355   ;;
7356   *)
7357   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7358 for as_dir in $PATH
7359 do
7360   IFS=$as_save_IFS
7361   test -z "$as_dir" && as_dir=.
7362     for ac_exec_ext in '' $ac_executable_extensions; do
7363   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7364     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7365     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7366     break 2
7367   fi
7368 done
7369   done
7370 IFS=$as_save_IFS
7371 
7372   ;;
7373 esac
7374 fi
7375 DIRNAME=$ac_cv_path_DIRNAME
7376 if test -n "$DIRNAME"; then
7377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7378 $as_echo "$DIRNAME" >&6; }
7379 else
7380   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7381 $as_echo "no" >&6; }
7382 fi
7383 
7384 
7385   test -n "$DIRNAME" && break
7386 done
7387 
7388     else
7389       # If it succeeded, then it was overridden by the user. We will use it
7390       # for the tool.
7391 
7392       # First remove it from the list of overridden variables, so we can test
7393       # for unknown variables in the end.
7394       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7395 
7396       # Check if we try to supply an empty value
7397       if test "x$DIRNAME" = x; then
7398         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7399 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7400         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7401 $as_echo_n "checking for DIRNAME... " >&6; }
7402         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7403 $as_echo "disabled" >&6; }
7404       else
7405         # Check if the provided tool contains a complete path.
7406         tool_specified="$DIRNAME"
7407         tool_basename="${tool_specified##*/}"
7408         if test "x$tool_basename" = "x$tool_specified"; then
7409           # A command without a complete path is provided, search $PATH.
7410           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7411 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7412           # Extract the first word of "$tool_basename", so it can be a program name with args.
7413 set dummy $tool_basename; ac_word=$2
7414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7415 $as_echo_n "checking for $ac_word... " >&6; }
7416 if ${ac_cv_path_DIRNAME+:} false; then :
7417   $as_echo_n "(cached) " >&6
7418 else
7419   case $DIRNAME in
7420   [\\/]* | ?:[\\/]*)
7421   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7422   ;;
7423   *)
7424   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7425 for as_dir in $PATH
7426 do
7427   IFS=$as_save_IFS
7428   test -z "$as_dir" && as_dir=.
7429     for ac_exec_ext in '' $ac_executable_extensions; do
7430   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7431     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7432     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7433     break 2
7434   fi
7435 done
7436   done
7437 IFS=$as_save_IFS
7438 
7439   ;;
7440 esac
7441 fi
7442 DIRNAME=$ac_cv_path_DIRNAME
7443 if test -n "$DIRNAME"; then
7444   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7445 $as_echo "$DIRNAME" >&6; }
7446 else
7447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7448 $as_echo "no" >&6; }
7449 fi
7450 
7451 
7452           if test "x$DIRNAME" = x; then
7453             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7454           fi
7455         else
7456           # Otherwise we believe it is a complete path. Use it as it is.
7457           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7458 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7459           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7460 $as_echo_n "checking for DIRNAME... " >&6; }
7461           if test ! -x "$tool_specified"; then
7462             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7463 $as_echo "not found" >&6; }
7464             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7465           fi
7466           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7467 $as_echo "$tool_specified" >&6; }
7468         fi
7469       fi
7470     fi
7471 
7472   fi
7473 
7474 
7475 
7476   if test "x$DIRNAME" = x; then
7477     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7478   fi
7479 
7480 
7481 
7482 
7483 
7484   # Publish this variable in the help.
7485 
7486 
7487   if [ -z "${ECHO+x}" ]; then
7488     # The variable is not set by user, try to locate tool using the code snippet
7489     for ac_prog in echo
7490 do
7491   # Extract the first word of "$ac_prog", so it can be a program name with args.
7492 set dummy $ac_prog; ac_word=$2
7493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7494 $as_echo_n "checking for $ac_word... " >&6; }
7495 if ${ac_cv_path_ECHO+:} false; then :
7496   $as_echo_n "(cached) " >&6
7497 else
7498   case $ECHO in
7499   [\\/]* | ?:[\\/]*)
7500   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7501   ;;
7502   *)
7503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7504 for as_dir in $PATH
7505 do
7506   IFS=$as_save_IFS
7507   test -z "$as_dir" && as_dir=.
7508     for ac_exec_ext in '' $ac_executable_extensions; do
7509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7510     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7512     break 2
7513   fi
7514 done
7515   done
7516 IFS=$as_save_IFS
7517 
7518   ;;
7519 esac
7520 fi
7521 ECHO=$ac_cv_path_ECHO
7522 if test -n "$ECHO"; then
7523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7524 $as_echo "$ECHO" >&6; }
7525 else
7526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7527 $as_echo "no" >&6; }
7528 fi
7529 
7530 
7531   test -n "$ECHO" && break
7532 done
7533 
7534   else
7535     # The variable is set, but is it from the command line or the environment?
7536 
7537     # Try to remove the string !ECHO! from our list.
7538     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7539     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7540       # If it failed, the variable was not from the command line. Ignore it,
7541       # but warn the user (except for BASH, which is always set by the calling BASH).
7542       if test "xECHO" != xBASH; then
7543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7544 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7545       fi
7546       # Try to locate tool using the code snippet
7547       for ac_prog in echo
7548 do
7549   # Extract the first word of "$ac_prog", so it can be a program name with args.
7550 set dummy $ac_prog; ac_word=$2
7551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7552 $as_echo_n "checking for $ac_word... " >&6; }
7553 if ${ac_cv_path_ECHO+:} false; then :
7554   $as_echo_n "(cached) " >&6
7555 else
7556   case $ECHO in
7557   [\\/]* | ?:[\\/]*)
7558   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7559   ;;
7560   *)
7561   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7562 for as_dir in $PATH
7563 do
7564   IFS=$as_save_IFS
7565   test -z "$as_dir" && as_dir=.
7566     for ac_exec_ext in '' $ac_executable_extensions; do
7567   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7568     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7569     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7570     break 2
7571   fi
7572 done
7573   done
7574 IFS=$as_save_IFS
7575 
7576   ;;
7577 esac
7578 fi
7579 ECHO=$ac_cv_path_ECHO
7580 if test -n "$ECHO"; then
7581   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7582 $as_echo "$ECHO" >&6; }
7583 else
7584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7585 $as_echo "no" >&6; }
7586 fi
7587 
7588 
7589   test -n "$ECHO" && break
7590 done
7591 
7592     else
7593       # If it succeeded, then it was overridden by the user. We will use it
7594       # for the tool.
7595 
7596       # First remove it from the list of overridden variables, so we can test
7597       # for unknown variables in the end.
7598       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7599 
7600       # Check if we try to supply an empty value
7601       if test "x$ECHO" = x; then
7602         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7603 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7604         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7605 $as_echo_n "checking for ECHO... " >&6; }
7606         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7607 $as_echo "disabled" >&6; }
7608       else
7609         # Check if the provided tool contains a complete path.
7610         tool_specified="$ECHO"
7611         tool_basename="${tool_specified##*/}"
7612         if test "x$tool_basename" = "x$tool_specified"; then
7613           # A command without a complete path is provided, search $PATH.
7614           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7615 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7616           # Extract the first word of "$tool_basename", so it can be a program name with args.
7617 set dummy $tool_basename; ac_word=$2
7618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7619 $as_echo_n "checking for $ac_word... " >&6; }
7620 if ${ac_cv_path_ECHO+:} false; then :
7621   $as_echo_n "(cached) " >&6
7622 else
7623   case $ECHO in
7624   [\\/]* | ?:[\\/]*)
7625   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7626   ;;
7627   *)
7628   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7629 for as_dir in $PATH
7630 do
7631   IFS=$as_save_IFS
7632   test -z "$as_dir" && as_dir=.
7633     for ac_exec_ext in '' $ac_executable_extensions; do
7634   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7635     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7636     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7637     break 2
7638   fi
7639 done
7640   done
7641 IFS=$as_save_IFS
7642 
7643   ;;
7644 esac
7645 fi
7646 ECHO=$ac_cv_path_ECHO
7647 if test -n "$ECHO"; then
7648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7649 $as_echo "$ECHO" >&6; }
7650 else
7651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7652 $as_echo "no" >&6; }
7653 fi
7654 
7655 
7656           if test "x$ECHO" = x; then
7657             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7658           fi
7659         else
7660           # Otherwise we believe it is a complete path. Use it as it is.
7661           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7662 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7663           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7664 $as_echo_n "checking for ECHO... " >&6; }
7665           if test ! -x "$tool_specified"; then
7666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7667 $as_echo "not found" >&6; }
7668             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7669           fi
7670           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7671 $as_echo "$tool_specified" >&6; }
7672         fi
7673       fi
7674     fi
7675 
7676   fi
7677 
7678 
7679 
7680   if test "x$ECHO" = x; then
7681     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7682   fi
7683 
7684 
7685 
7686 
7687 
7688   # Publish this variable in the help.
7689 
7690 
7691   if [ -z "${EXPR+x}" ]; then
7692     # The variable is not set by user, try to locate tool using the code snippet
7693     for ac_prog in expr
7694 do
7695   # Extract the first word of "$ac_prog", so it can be a program name with args.
7696 set dummy $ac_prog; ac_word=$2
7697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7698 $as_echo_n "checking for $ac_word... " >&6; }
7699 if ${ac_cv_path_EXPR+:} false; then :
7700   $as_echo_n "(cached) " >&6
7701 else
7702   case $EXPR in
7703   [\\/]* | ?:[\\/]*)
7704   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7705   ;;
7706   *)
7707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7708 for as_dir in $PATH
7709 do
7710   IFS=$as_save_IFS
7711   test -z "$as_dir" && as_dir=.
7712     for ac_exec_ext in '' $ac_executable_extensions; do
7713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7714     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7716     break 2
7717   fi
7718 done
7719   done
7720 IFS=$as_save_IFS
7721 
7722   ;;
7723 esac
7724 fi
7725 EXPR=$ac_cv_path_EXPR
7726 if test -n "$EXPR"; then
7727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7728 $as_echo "$EXPR" >&6; }
7729 else
7730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7731 $as_echo "no" >&6; }
7732 fi
7733 
7734 
7735   test -n "$EXPR" && break
7736 done
7737 
7738   else
7739     # The variable is set, but is it from the command line or the environment?
7740 
7741     # Try to remove the string !EXPR! from our list.
7742     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7743     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7744       # If it failed, the variable was not from the command line. Ignore it,
7745       # but warn the user (except for BASH, which is always set by the calling BASH).
7746       if test "xEXPR" != xBASH; then
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7748 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7749       fi
7750       # Try to locate tool using the code snippet
7751       for ac_prog in expr
7752 do
7753   # Extract the first word of "$ac_prog", so it can be a program name with args.
7754 set dummy $ac_prog; ac_word=$2
7755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7756 $as_echo_n "checking for $ac_word... " >&6; }
7757 if ${ac_cv_path_EXPR+:} false; then :
7758   $as_echo_n "(cached) " >&6
7759 else
7760   case $EXPR in
7761   [\\/]* | ?:[\\/]*)
7762   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7763   ;;
7764   *)
7765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7766 for as_dir in $PATH
7767 do
7768   IFS=$as_save_IFS
7769   test -z "$as_dir" && as_dir=.
7770     for ac_exec_ext in '' $ac_executable_extensions; do
7771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7772     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7774     break 2
7775   fi
7776 done
7777   done
7778 IFS=$as_save_IFS
7779 
7780   ;;
7781 esac
7782 fi
7783 EXPR=$ac_cv_path_EXPR
7784 if test -n "$EXPR"; then
7785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7786 $as_echo "$EXPR" >&6; }
7787 else
7788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7789 $as_echo "no" >&6; }
7790 fi
7791 
7792 
7793   test -n "$EXPR" && break
7794 done
7795 
7796     else
7797       # If it succeeded, then it was overridden by the user. We will use it
7798       # for the tool.
7799 
7800       # First remove it from the list of overridden variables, so we can test
7801       # for unknown variables in the end.
7802       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7803 
7804       # Check if we try to supply an empty value
7805       if test "x$EXPR" = x; then
7806         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7807 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7809 $as_echo_n "checking for EXPR... " >&6; }
7810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7811 $as_echo "disabled" >&6; }
7812       else
7813         # Check if the provided tool contains a complete path.
7814         tool_specified="$EXPR"
7815         tool_basename="${tool_specified##*/}"
7816         if test "x$tool_basename" = "x$tool_specified"; then
7817           # A command without a complete path is provided, search $PATH.
7818           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7819 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7820           # Extract the first word of "$tool_basename", so it can be a program name with args.
7821 set dummy $tool_basename; ac_word=$2
7822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7823 $as_echo_n "checking for $ac_word... " >&6; }
7824 if ${ac_cv_path_EXPR+:} false; then :
7825   $as_echo_n "(cached) " >&6
7826 else
7827   case $EXPR in
7828   [\\/]* | ?:[\\/]*)
7829   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7830   ;;
7831   *)
7832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7833 for as_dir in $PATH
7834 do
7835   IFS=$as_save_IFS
7836   test -z "$as_dir" && as_dir=.
7837     for ac_exec_ext in '' $ac_executable_extensions; do
7838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7839     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7841     break 2
7842   fi
7843 done
7844   done
7845 IFS=$as_save_IFS
7846 
7847   ;;
7848 esac
7849 fi
7850 EXPR=$ac_cv_path_EXPR
7851 if test -n "$EXPR"; then
7852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7853 $as_echo "$EXPR" >&6; }
7854 else
7855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7856 $as_echo "no" >&6; }
7857 fi
7858 
7859 
7860           if test "x$EXPR" = x; then
7861             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7862           fi
7863         else
7864           # Otherwise we believe it is a complete path. Use it as it is.
7865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7866 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7867           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7868 $as_echo_n "checking for EXPR... " >&6; }
7869           if test ! -x "$tool_specified"; then
7870             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7871 $as_echo "not found" >&6; }
7872             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7873           fi
7874           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7875 $as_echo "$tool_specified" >&6; }
7876         fi
7877       fi
7878     fi
7879 
7880   fi
7881 
7882 
7883 
7884   if test "x$EXPR" = x; then
7885     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7886   fi
7887 
7888 
7889 
7890 
7891 
7892   # Publish this variable in the help.
7893 
7894 
7895   if [ -z "${FILE+x}" ]; then
7896     # The variable is not set by user, try to locate tool using the code snippet
7897     for ac_prog in file
7898 do
7899   # Extract the first word of "$ac_prog", so it can be a program name with args.
7900 set dummy $ac_prog; ac_word=$2
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7902 $as_echo_n "checking for $ac_word... " >&6; }
7903 if ${ac_cv_path_FILE+:} false; then :
7904   $as_echo_n "(cached) " >&6
7905 else
7906   case $FILE in
7907   [\\/]* | ?:[\\/]*)
7908   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7909   ;;
7910   *)
7911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7912 for as_dir in $PATH
7913 do
7914   IFS=$as_save_IFS
7915   test -z "$as_dir" && as_dir=.
7916     for ac_exec_ext in '' $ac_executable_extensions; do
7917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7918     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7920     break 2
7921   fi
7922 done
7923   done
7924 IFS=$as_save_IFS
7925 
7926   ;;
7927 esac
7928 fi
7929 FILE=$ac_cv_path_FILE
7930 if test -n "$FILE"; then
7931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7932 $as_echo "$FILE" >&6; }
7933 else
7934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7935 $as_echo "no" >&6; }
7936 fi
7937 
7938 
7939   test -n "$FILE" && break
7940 done
7941 
7942   else
7943     # The variable is set, but is it from the command line or the environment?
7944 
7945     # Try to remove the string !FILE! from our list.
7946     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7947     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7948       # If it failed, the variable was not from the command line. Ignore it,
7949       # but warn the user (except for BASH, which is always set by the calling BASH).
7950       if test "xFILE" != xBASH; then
7951         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7952 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7953       fi
7954       # Try to locate tool using the code snippet
7955       for ac_prog in file
7956 do
7957   # Extract the first word of "$ac_prog", so it can be a program name with args.
7958 set dummy $ac_prog; ac_word=$2
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7960 $as_echo_n "checking for $ac_word... " >&6; }
7961 if ${ac_cv_path_FILE+:} false; then :
7962   $as_echo_n "(cached) " >&6
7963 else
7964   case $FILE in
7965   [\\/]* | ?:[\\/]*)
7966   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7967   ;;
7968   *)
7969   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7970 for as_dir in $PATH
7971 do
7972   IFS=$as_save_IFS
7973   test -z "$as_dir" && as_dir=.
7974     for ac_exec_ext in '' $ac_executable_extensions; do
7975   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7976     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7977     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7978     break 2
7979   fi
7980 done
7981   done
7982 IFS=$as_save_IFS
7983 
7984   ;;
7985 esac
7986 fi
7987 FILE=$ac_cv_path_FILE
7988 if test -n "$FILE"; then
7989   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7990 $as_echo "$FILE" >&6; }
7991 else
7992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7993 $as_echo "no" >&6; }
7994 fi
7995 
7996 
7997   test -n "$FILE" && break
7998 done
7999 
8000     else
8001       # If it succeeded, then it was overridden by the user. We will use it
8002       # for the tool.
8003 
8004       # First remove it from the list of overridden variables, so we can test
8005       # for unknown variables in the end.
8006       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8007 
8008       # Check if we try to supply an empty value
8009       if test "x$FILE" = x; then
8010         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8011 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8013 $as_echo_n "checking for FILE... " >&6; }
8014         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8015 $as_echo "disabled" >&6; }
8016       else
8017         # Check if the provided tool contains a complete path.
8018         tool_specified="$FILE"
8019         tool_basename="${tool_specified##*/}"
8020         if test "x$tool_basename" = "x$tool_specified"; then
8021           # A command without a complete path is provided, search $PATH.
8022           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8023 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8024           # Extract the first word of "$tool_basename", so it can be a program name with args.
8025 set dummy $tool_basename; ac_word=$2
8026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8027 $as_echo_n "checking for $ac_word... " >&6; }
8028 if ${ac_cv_path_FILE+:} false; then :
8029   $as_echo_n "(cached) " >&6
8030 else
8031   case $FILE in
8032   [\\/]* | ?:[\\/]*)
8033   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8034   ;;
8035   *)
8036   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8037 for as_dir in $PATH
8038 do
8039   IFS=$as_save_IFS
8040   test -z "$as_dir" && as_dir=.
8041     for ac_exec_ext in '' $ac_executable_extensions; do
8042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8043     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8045     break 2
8046   fi
8047 done
8048   done
8049 IFS=$as_save_IFS
8050 
8051   ;;
8052 esac
8053 fi
8054 FILE=$ac_cv_path_FILE
8055 if test -n "$FILE"; then
8056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8057 $as_echo "$FILE" >&6; }
8058 else
8059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8060 $as_echo "no" >&6; }
8061 fi
8062 
8063 
8064           if test "x$FILE" = x; then
8065             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8066           fi
8067         else
8068           # Otherwise we believe it is a complete path. Use it as it is.
8069           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8070 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8071           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8072 $as_echo_n "checking for FILE... " >&6; }
8073           if test ! -x "$tool_specified"; then
8074             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8075 $as_echo "not found" >&6; }
8076             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8077           fi
8078           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8079 $as_echo "$tool_specified" >&6; }
8080         fi
8081       fi
8082     fi
8083 
8084   fi
8085 
8086 
8087 
8088   if test "x$FILE" = x; then
8089     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8090   fi
8091 
8092 
8093 
8094 
8095 
8096   # Publish this variable in the help.
8097 
8098 
8099   if [ -z "${FIND+x}" ]; then
8100     # The variable is not set by user, try to locate tool using the code snippet
8101     for ac_prog in find
8102 do
8103   # Extract the first word of "$ac_prog", so it can be a program name with args.
8104 set dummy $ac_prog; ac_word=$2
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8106 $as_echo_n "checking for $ac_word... " >&6; }
8107 if ${ac_cv_path_FIND+:} false; then :
8108   $as_echo_n "(cached) " >&6
8109 else
8110   case $FIND in
8111   [\\/]* | ?:[\\/]*)
8112   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8113   ;;
8114   *)
8115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8116 for as_dir in $PATH
8117 do
8118   IFS=$as_save_IFS
8119   test -z "$as_dir" && as_dir=.
8120     for ac_exec_ext in '' $ac_executable_extensions; do
8121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8122     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8124     break 2
8125   fi
8126 done
8127   done
8128 IFS=$as_save_IFS
8129 
8130   ;;
8131 esac
8132 fi
8133 FIND=$ac_cv_path_FIND
8134 if test -n "$FIND"; then
8135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8136 $as_echo "$FIND" >&6; }
8137 else
8138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8139 $as_echo "no" >&6; }
8140 fi
8141 
8142 
8143   test -n "$FIND" && break
8144 done
8145 
8146   else
8147     # The variable is set, but is it from the command line or the environment?
8148 
8149     # Try to remove the string !FIND! from our list.
8150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8152       # If it failed, the variable was not from the command line. Ignore it,
8153       # but warn the user (except for BASH, which is always set by the calling BASH).
8154       if test "xFIND" != xBASH; then
8155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8156 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8157       fi
8158       # Try to locate tool using the code snippet
8159       for ac_prog in find
8160 do
8161   # Extract the first word of "$ac_prog", so it can be a program name with args.
8162 set dummy $ac_prog; ac_word=$2
8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8164 $as_echo_n "checking for $ac_word... " >&6; }
8165 if ${ac_cv_path_FIND+:} false; then :
8166   $as_echo_n "(cached) " >&6
8167 else
8168   case $FIND in
8169   [\\/]* | ?:[\\/]*)
8170   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8171   ;;
8172   *)
8173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8174 for as_dir in $PATH
8175 do
8176   IFS=$as_save_IFS
8177   test -z "$as_dir" && as_dir=.
8178     for ac_exec_ext in '' $ac_executable_extensions; do
8179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8180     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8182     break 2
8183   fi
8184 done
8185   done
8186 IFS=$as_save_IFS
8187 
8188   ;;
8189 esac
8190 fi
8191 FIND=$ac_cv_path_FIND
8192 if test -n "$FIND"; then
8193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8194 $as_echo "$FIND" >&6; }
8195 else
8196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8197 $as_echo "no" >&6; }
8198 fi
8199 
8200 
8201   test -n "$FIND" && break
8202 done
8203 
8204     else
8205       # If it succeeded, then it was overridden by the user. We will use it
8206       # for the tool.
8207 
8208       # First remove it from the list of overridden variables, so we can test
8209       # for unknown variables in the end.
8210       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8211 
8212       # Check if we try to supply an empty value
8213       if test "x$FIND" = x; then
8214         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8215 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8217 $as_echo_n "checking for FIND... " >&6; }
8218         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8219 $as_echo "disabled" >&6; }
8220       else
8221         # Check if the provided tool contains a complete path.
8222         tool_specified="$FIND"
8223         tool_basename="${tool_specified##*/}"
8224         if test "x$tool_basename" = "x$tool_specified"; then
8225           # A command without a complete path is provided, search $PATH.
8226           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8227 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8228           # Extract the first word of "$tool_basename", so it can be a program name with args.
8229 set dummy $tool_basename; ac_word=$2
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8231 $as_echo_n "checking for $ac_word... " >&6; }
8232 if ${ac_cv_path_FIND+:} false; then :
8233   $as_echo_n "(cached) " >&6
8234 else
8235   case $FIND in
8236   [\\/]* | ?:[\\/]*)
8237   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8238   ;;
8239   *)
8240   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8241 for as_dir in $PATH
8242 do
8243   IFS=$as_save_IFS
8244   test -z "$as_dir" && as_dir=.
8245     for ac_exec_ext in '' $ac_executable_extensions; do
8246   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8247     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8248     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8249     break 2
8250   fi
8251 done
8252   done
8253 IFS=$as_save_IFS
8254 
8255   ;;
8256 esac
8257 fi
8258 FIND=$ac_cv_path_FIND
8259 if test -n "$FIND"; then
8260   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8261 $as_echo "$FIND" >&6; }
8262 else
8263   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8264 $as_echo "no" >&6; }
8265 fi
8266 
8267 
8268           if test "x$FIND" = x; then
8269             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8270           fi
8271         else
8272           # Otherwise we believe it is a complete path. Use it as it is.
8273           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8274 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8275           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8276 $as_echo_n "checking for FIND... " >&6; }
8277           if test ! -x "$tool_specified"; then
8278             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8279 $as_echo "not found" >&6; }
8280             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8281           fi
8282           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8283 $as_echo "$tool_specified" >&6; }
8284         fi
8285       fi
8286     fi
8287 
8288   fi
8289 
8290 
8291 
8292   if test "x$FIND" = x; then
8293     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8294   fi
8295 
8296 
8297 
8298 
8299 
8300   # Publish this variable in the help.
8301 
8302 
8303   if [ -z "${HEAD+x}" ]; then
8304     # The variable is not set by user, try to locate tool using the code snippet
8305     for ac_prog in head
8306 do
8307   # Extract the first word of "$ac_prog", so it can be a program name with args.
8308 set dummy $ac_prog; ac_word=$2
8309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8310 $as_echo_n "checking for $ac_word... " >&6; }
8311 if ${ac_cv_path_HEAD+:} false; then :
8312   $as_echo_n "(cached) " >&6
8313 else
8314   case $HEAD in
8315   [\\/]* | ?:[\\/]*)
8316   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8317   ;;
8318   *)
8319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8320 for as_dir in $PATH
8321 do
8322   IFS=$as_save_IFS
8323   test -z "$as_dir" && as_dir=.
8324     for ac_exec_ext in '' $ac_executable_extensions; do
8325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8326     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8328     break 2
8329   fi
8330 done
8331   done
8332 IFS=$as_save_IFS
8333 
8334   ;;
8335 esac
8336 fi
8337 HEAD=$ac_cv_path_HEAD
8338 if test -n "$HEAD"; then
8339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8340 $as_echo "$HEAD" >&6; }
8341 else
8342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8343 $as_echo "no" >&6; }
8344 fi
8345 
8346 
8347   test -n "$HEAD" && break
8348 done
8349 
8350   else
8351     # The variable is set, but is it from the command line or the environment?
8352 
8353     # Try to remove the string !HEAD! from our list.
8354     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8355     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8356       # If it failed, the variable was not from the command line. Ignore it,
8357       # but warn the user (except for BASH, which is always set by the calling BASH).
8358       if test "xHEAD" != xBASH; then
8359         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8360 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8361       fi
8362       # Try to locate tool using the code snippet
8363       for ac_prog in head
8364 do
8365   # Extract the first word of "$ac_prog", so it can be a program name with args.
8366 set dummy $ac_prog; ac_word=$2
8367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8368 $as_echo_n "checking for $ac_word... " >&6; }
8369 if ${ac_cv_path_HEAD+:} false; then :
8370   $as_echo_n "(cached) " >&6
8371 else
8372   case $HEAD in
8373   [\\/]* | ?:[\\/]*)
8374   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8375   ;;
8376   *)
8377   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8378 for as_dir in $PATH
8379 do
8380   IFS=$as_save_IFS
8381   test -z "$as_dir" && as_dir=.
8382     for ac_exec_ext in '' $ac_executable_extensions; do
8383   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8384     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8385     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8386     break 2
8387   fi
8388 done
8389   done
8390 IFS=$as_save_IFS
8391 
8392   ;;
8393 esac
8394 fi
8395 HEAD=$ac_cv_path_HEAD
8396 if test -n "$HEAD"; then
8397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8398 $as_echo "$HEAD" >&6; }
8399 else
8400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8401 $as_echo "no" >&6; }
8402 fi
8403 
8404 
8405   test -n "$HEAD" && break
8406 done
8407 
8408     else
8409       # If it succeeded, then it was overridden by the user. We will use it
8410       # for the tool.
8411 
8412       # First remove it from the list of overridden variables, so we can test
8413       # for unknown variables in the end.
8414       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8415 
8416       # Check if we try to supply an empty value
8417       if test "x$HEAD" = x; then
8418         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8419 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8420         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8421 $as_echo_n "checking for HEAD... " >&6; }
8422         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8423 $as_echo "disabled" >&6; }
8424       else
8425         # Check if the provided tool contains a complete path.
8426         tool_specified="$HEAD"
8427         tool_basename="${tool_specified##*/}"
8428         if test "x$tool_basename" = "x$tool_specified"; then
8429           # A command without a complete path is provided, search $PATH.
8430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8431 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8432           # Extract the first word of "$tool_basename", so it can be a program name with args.
8433 set dummy $tool_basename; ac_word=$2
8434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8435 $as_echo_n "checking for $ac_word... " >&6; }
8436 if ${ac_cv_path_HEAD+:} false; then :
8437   $as_echo_n "(cached) " >&6
8438 else
8439   case $HEAD in
8440   [\\/]* | ?:[\\/]*)
8441   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8442   ;;
8443   *)
8444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8445 for as_dir in $PATH
8446 do
8447   IFS=$as_save_IFS
8448   test -z "$as_dir" && as_dir=.
8449     for ac_exec_ext in '' $ac_executable_extensions; do
8450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8451     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8453     break 2
8454   fi
8455 done
8456   done
8457 IFS=$as_save_IFS
8458 
8459   ;;
8460 esac
8461 fi
8462 HEAD=$ac_cv_path_HEAD
8463 if test -n "$HEAD"; then
8464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8465 $as_echo "$HEAD" >&6; }
8466 else
8467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8468 $as_echo "no" >&6; }
8469 fi
8470 
8471 
8472           if test "x$HEAD" = x; then
8473             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8474           fi
8475         else
8476           # Otherwise we believe it is a complete path. Use it as it is.
8477           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8478 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8479           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8480 $as_echo_n "checking for HEAD... " >&6; }
8481           if test ! -x "$tool_specified"; then
8482             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8483 $as_echo "not found" >&6; }
8484             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8485           fi
8486           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8487 $as_echo "$tool_specified" >&6; }
8488         fi
8489       fi
8490     fi
8491 
8492   fi
8493 
8494 
8495 
8496   if test "x$HEAD" = x; then
8497     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8498   fi
8499 
8500 
8501 
8502 
8503 
8504   # Publish this variable in the help.
8505 
8506 
8507   if [ -z "${GUNZIP+x}" ]; then
8508     # The variable is not set by user, try to locate tool using the code snippet
8509     for ac_prog in gunzip
8510 do
8511   # Extract the first word of "$ac_prog", so it can be a program name with args.
8512 set dummy $ac_prog; ac_word=$2
8513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8514 $as_echo_n "checking for $ac_word... " >&6; }
8515 if ${ac_cv_path_GUNZIP+:} false; then :
8516   $as_echo_n "(cached) " >&6
8517 else
8518   case $GUNZIP in
8519   [\\/]* | ?:[\\/]*)
8520   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8521   ;;
8522   *)
8523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8524 for as_dir in $PATH
8525 do
8526   IFS=$as_save_IFS
8527   test -z "$as_dir" && as_dir=.
8528     for ac_exec_ext in '' $ac_executable_extensions; do
8529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8530     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8532     break 2
8533   fi
8534 done
8535   done
8536 IFS=$as_save_IFS
8537 
8538   ;;
8539 esac
8540 fi
8541 GUNZIP=$ac_cv_path_GUNZIP
8542 if test -n "$GUNZIP"; then
8543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8544 $as_echo "$GUNZIP" >&6; }
8545 else
8546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8547 $as_echo "no" >&6; }
8548 fi
8549 
8550 
8551   test -n "$GUNZIP" && break
8552 done
8553 
8554   else
8555     # The variable is set, but is it from the command line or the environment?
8556 
8557     # Try to remove the string !GUNZIP! from our list.
8558     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8559     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8560       # If it failed, the variable was not from the command line. Ignore it,
8561       # but warn the user (except for BASH, which is always set by the calling BASH).
8562       if test "xGUNZIP" != xBASH; then
8563         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8564 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8565       fi
8566       # Try to locate tool using the code snippet
8567       for ac_prog in gunzip
8568 do
8569   # Extract the first word of "$ac_prog", so it can be a program name with args.
8570 set dummy $ac_prog; ac_word=$2
8571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8572 $as_echo_n "checking for $ac_word... " >&6; }
8573 if ${ac_cv_path_GUNZIP+:} false; then :
8574   $as_echo_n "(cached) " >&6
8575 else
8576   case $GUNZIP in
8577   [\\/]* | ?:[\\/]*)
8578   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8579   ;;
8580   *)
8581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8582 for as_dir in $PATH
8583 do
8584   IFS=$as_save_IFS
8585   test -z "$as_dir" && as_dir=.
8586     for ac_exec_ext in '' $ac_executable_extensions; do
8587   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8588     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8590     break 2
8591   fi
8592 done
8593   done
8594 IFS=$as_save_IFS
8595 
8596   ;;
8597 esac
8598 fi
8599 GUNZIP=$ac_cv_path_GUNZIP
8600 if test -n "$GUNZIP"; then
8601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8602 $as_echo "$GUNZIP" >&6; }
8603 else
8604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8605 $as_echo "no" >&6; }
8606 fi
8607 
8608 
8609   test -n "$GUNZIP" && break
8610 done
8611 
8612     else
8613       # If it succeeded, then it was overridden by the user. We will use it
8614       # for the tool.
8615 
8616       # First remove it from the list of overridden variables, so we can test
8617       # for unknown variables in the end.
8618       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8619 
8620       # Check if we try to supply an empty value
8621       if test "x$GUNZIP" = x; then
8622         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8623 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8624         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8625 $as_echo_n "checking for GUNZIP... " >&6; }
8626         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8627 $as_echo "disabled" >&6; }
8628       else
8629         # Check if the provided tool contains a complete path.
8630         tool_specified="$GUNZIP"
8631         tool_basename="${tool_specified##*/}"
8632         if test "x$tool_basename" = "x$tool_specified"; then
8633           # A command without a complete path is provided, search $PATH.
8634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8635 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8636           # Extract the first word of "$tool_basename", so it can be a program name with args.
8637 set dummy $tool_basename; ac_word=$2
8638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8639 $as_echo_n "checking for $ac_word... " >&6; }
8640 if ${ac_cv_path_GUNZIP+:} false; then :
8641   $as_echo_n "(cached) " >&6
8642 else
8643   case $GUNZIP in
8644   [\\/]* | ?:[\\/]*)
8645   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8646   ;;
8647   *)
8648   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8649 for as_dir in $PATH
8650 do
8651   IFS=$as_save_IFS
8652   test -z "$as_dir" && as_dir=.
8653     for ac_exec_ext in '' $ac_executable_extensions; do
8654   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8655     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8656     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8657     break 2
8658   fi
8659 done
8660   done
8661 IFS=$as_save_IFS
8662 
8663   ;;
8664 esac
8665 fi
8666 GUNZIP=$ac_cv_path_GUNZIP
8667 if test -n "$GUNZIP"; then
8668   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8669 $as_echo "$GUNZIP" >&6; }
8670 else
8671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8672 $as_echo "no" >&6; }
8673 fi
8674 
8675 
8676           if test "x$GUNZIP" = x; then
8677             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8678           fi
8679         else
8680           # Otherwise we believe it is a complete path. Use it as it is.
8681           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8682 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8683           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8684 $as_echo_n "checking for GUNZIP... " >&6; }
8685           if test ! -x "$tool_specified"; then
8686             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8687 $as_echo "not found" >&6; }
8688             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8689           fi
8690           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8691 $as_echo "$tool_specified" >&6; }
8692         fi
8693       fi
8694     fi
8695 
8696   fi
8697 
8698 
8699 
8700   if test "x$GUNZIP" = x; then
8701     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8702   fi
8703 
8704 
8705 
8706 
8707 
8708   # Publish this variable in the help.
8709 
8710 
8711   if [ -z "${GZIP+x}" ]; then
8712     # The variable is not set by user, try to locate tool using the code snippet
8713     for ac_prog in pigz gzip
8714 do
8715   # Extract the first word of "$ac_prog", so it can be a program name with args.
8716 set dummy $ac_prog; ac_word=$2
8717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8718 $as_echo_n "checking for $ac_word... " >&6; }
8719 if ${ac_cv_path_GZIP+:} false; then :
8720   $as_echo_n "(cached) " >&6
8721 else
8722   case $GZIP in
8723   [\\/]* | ?:[\\/]*)
8724   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8725   ;;
8726   *)
8727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8728 for as_dir in $PATH
8729 do
8730   IFS=$as_save_IFS
8731   test -z "$as_dir" && as_dir=.
8732     for ac_exec_ext in '' $ac_executable_extensions; do
8733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8734     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8736     break 2
8737   fi
8738 done
8739   done
8740 IFS=$as_save_IFS
8741 
8742   ;;
8743 esac
8744 fi
8745 GZIP=$ac_cv_path_GZIP
8746 if test -n "$GZIP"; then
8747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8748 $as_echo "$GZIP" >&6; }
8749 else
8750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8751 $as_echo "no" >&6; }
8752 fi
8753 
8754 
8755   test -n "$GZIP" && break
8756 done
8757 
8758   else
8759     # The variable is set, but is it from the command line or the environment?
8760 
8761     # Try to remove the string !GZIP! from our list.
8762     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8763     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8764       # If it failed, the variable was not from the command line. Ignore it,
8765       # but warn the user (except for BASH, which is always set by the calling BASH).
8766       if test "xGZIP" != xBASH; then
8767         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8768 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8769       fi
8770       # Try to locate tool using the code snippet
8771       for ac_prog in pigz gzip
8772 do
8773   # Extract the first word of "$ac_prog", so it can be a program name with args.
8774 set dummy $ac_prog; ac_word=$2
8775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8776 $as_echo_n "checking for $ac_word... " >&6; }
8777 if ${ac_cv_path_GZIP+:} false; then :
8778   $as_echo_n "(cached) " >&6
8779 else
8780   case $GZIP in
8781   [\\/]* | ?:[\\/]*)
8782   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8783   ;;
8784   *)
8785   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8786 for as_dir in $PATH
8787 do
8788   IFS=$as_save_IFS
8789   test -z "$as_dir" && as_dir=.
8790     for ac_exec_ext in '' $ac_executable_extensions; do
8791   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8792     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8793     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8794     break 2
8795   fi
8796 done
8797   done
8798 IFS=$as_save_IFS
8799 
8800   ;;
8801 esac
8802 fi
8803 GZIP=$ac_cv_path_GZIP
8804 if test -n "$GZIP"; then
8805   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8806 $as_echo "$GZIP" >&6; }
8807 else
8808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8809 $as_echo "no" >&6; }
8810 fi
8811 
8812 
8813   test -n "$GZIP" && break
8814 done
8815 
8816     else
8817       # If it succeeded, then it was overridden by the user. We will use it
8818       # for the tool.
8819 
8820       # First remove it from the list of overridden variables, so we can test
8821       # for unknown variables in the end.
8822       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8823 
8824       # Check if we try to supply an empty value
8825       if test "x$GZIP" = x; then
8826         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8827 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8828         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8829 $as_echo_n "checking for GZIP... " >&6; }
8830         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8831 $as_echo "disabled" >&6; }
8832       else
8833         # Check if the provided tool contains a complete path.
8834         tool_specified="$GZIP"
8835         tool_basename="${tool_specified##*/}"
8836         if test "x$tool_basename" = "x$tool_specified"; then
8837           # A command without a complete path is provided, search $PATH.
8838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8839 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8840           # Extract the first word of "$tool_basename", so it can be a program name with args.
8841 set dummy $tool_basename; ac_word=$2
8842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8843 $as_echo_n "checking for $ac_word... " >&6; }
8844 if ${ac_cv_path_GZIP+:} false; then :
8845   $as_echo_n "(cached) " >&6
8846 else
8847   case $GZIP in
8848   [\\/]* | ?:[\\/]*)
8849   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8850   ;;
8851   *)
8852   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8853 for as_dir in $PATH
8854 do
8855   IFS=$as_save_IFS
8856   test -z "$as_dir" && as_dir=.
8857     for ac_exec_ext in '' $ac_executable_extensions; do
8858   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8859     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8860     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8861     break 2
8862   fi
8863 done
8864   done
8865 IFS=$as_save_IFS
8866 
8867   ;;
8868 esac
8869 fi
8870 GZIP=$ac_cv_path_GZIP
8871 if test -n "$GZIP"; then
8872   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8873 $as_echo "$GZIP" >&6; }
8874 else
8875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8876 $as_echo "no" >&6; }
8877 fi
8878 
8879 
8880           if test "x$GZIP" = x; then
8881             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8882           fi
8883         else
8884           # Otherwise we believe it is a complete path. Use it as it is.
8885           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8886 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8887           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8888 $as_echo_n "checking for GZIP... " >&6; }
8889           if test ! -x "$tool_specified"; then
8890             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8891 $as_echo "not found" >&6; }
8892             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8893           fi
8894           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8895 $as_echo "$tool_specified" >&6; }
8896         fi
8897       fi
8898     fi
8899 
8900   fi
8901 
8902 
8903 
8904   if test "x$GZIP" = x; then
8905     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8906   fi
8907 
8908 
8909 
8910 
8911 
8912   # Publish this variable in the help.
8913 
8914 
8915   if [ -z "${LN+x}" ]; then
8916     # The variable is not set by user, try to locate tool using the code snippet
8917     for ac_prog in ln
8918 do
8919   # Extract the first word of "$ac_prog", so it can be a program name with args.
8920 set dummy $ac_prog; ac_word=$2
8921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8922 $as_echo_n "checking for $ac_word... " >&6; }
8923 if ${ac_cv_path_LN+:} false; then :
8924   $as_echo_n "(cached) " >&6
8925 else
8926   case $LN in
8927   [\\/]* | ?:[\\/]*)
8928   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8929   ;;
8930   *)
8931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8932 for as_dir in $PATH
8933 do
8934   IFS=$as_save_IFS
8935   test -z "$as_dir" && as_dir=.
8936     for ac_exec_ext in '' $ac_executable_extensions; do
8937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8938     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8940     break 2
8941   fi
8942 done
8943   done
8944 IFS=$as_save_IFS
8945 
8946   ;;
8947 esac
8948 fi
8949 LN=$ac_cv_path_LN
8950 if test -n "$LN"; then
8951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8952 $as_echo "$LN" >&6; }
8953 else
8954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8955 $as_echo "no" >&6; }
8956 fi
8957 
8958 
8959   test -n "$LN" && break
8960 done
8961 
8962   else
8963     # The variable is set, but is it from the command line or the environment?
8964 
8965     # Try to remove the string !LN! from our list.
8966     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8967     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8968       # If it failed, the variable was not from the command line. Ignore it,
8969       # but warn the user (except for BASH, which is always set by the calling BASH).
8970       if test "xLN" != xBASH; then
8971         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8972 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8973       fi
8974       # Try to locate tool using the code snippet
8975       for ac_prog in ln
8976 do
8977   # Extract the first word of "$ac_prog", so it can be a program name with args.
8978 set dummy $ac_prog; ac_word=$2
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8980 $as_echo_n "checking for $ac_word... " >&6; }
8981 if ${ac_cv_path_LN+:} false; then :
8982   $as_echo_n "(cached) " >&6
8983 else
8984   case $LN in
8985   [\\/]* | ?:[\\/]*)
8986   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8987   ;;
8988   *)
8989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8990 for as_dir in $PATH
8991 do
8992   IFS=$as_save_IFS
8993   test -z "$as_dir" && as_dir=.
8994     for ac_exec_ext in '' $ac_executable_extensions; do
8995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8996     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8998     break 2
8999   fi
9000 done
9001   done
9002 IFS=$as_save_IFS
9003 
9004   ;;
9005 esac
9006 fi
9007 LN=$ac_cv_path_LN
9008 if test -n "$LN"; then
9009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9010 $as_echo "$LN" >&6; }
9011 else
9012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9013 $as_echo "no" >&6; }
9014 fi
9015 
9016 
9017   test -n "$LN" && break
9018 done
9019 
9020     else
9021       # If it succeeded, then it was overridden by the user. We will use it
9022       # for the tool.
9023 
9024       # First remove it from the list of overridden variables, so we can test
9025       # for unknown variables in the end.
9026       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9027 
9028       # Check if we try to supply an empty value
9029       if test "x$LN" = x; then
9030         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9031 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9032         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9033 $as_echo_n "checking for LN... " >&6; }
9034         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9035 $as_echo "disabled" >&6; }
9036       else
9037         # Check if the provided tool contains a complete path.
9038         tool_specified="$LN"
9039         tool_basename="${tool_specified##*/}"
9040         if test "x$tool_basename" = "x$tool_specified"; then
9041           # A command without a complete path is provided, search $PATH.
9042           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9043 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9044           # Extract the first word of "$tool_basename", so it can be a program name with args.
9045 set dummy $tool_basename; ac_word=$2
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9047 $as_echo_n "checking for $ac_word... " >&6; }
9048 if ${ac_cv_path_LN+:} false; then :
9049   $as_echo_n "(cached) " >&6
9050 else
9051   case $LN in
9052   [\\/]* | ?:[\\/]*)
9053   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9054   ;;
9055   *)
9056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9057 for as_dir in $PATH
9058 do
9059   IFS=$as_save_IFS
9060   test -z "$as_dir" && as_dir=.
9061     for ac_exec_ext in '' $ac_executable_extensions; do
9062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9063     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9065     break 2
9066   fi
9067 done
9068   done
9069 IFS=$as_save_IFS
9070 
9071   ;;
9072 esac
9073 fi
9074 LN=$ac_cv_path_LN
9075 if test -n "$LN"; then
9076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9077 $as_echo "$LN" >&6; }
9078 else
9079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080 $as_echo "no" >&6; }
9081 fi
9082 
9083 
9084           if test "x$LN" = x; then
9085             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9086           fi
9087         else
9088           # Otherwise we believe it is a complete path. Use it as it is.
9089           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9090 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9091           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9092 $as_echo_n "checking for LN... " >&6; }
9093           if test ! -x "$tool_specified"; then
9094             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9095 $as_echo "not found" >&6; }
9096             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9097           fi
9098           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9099 $as_echo "$tool_specified" >&6; }
9100         fi
9101       fi
9102     fi
9103 
9104   fi
9105 
9106 
9107 
9108   if test "x$LN" = x; then
9109     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9110   fi
9111 
9112 
9113 
9114 
9115 
9116   # Publish this variable in the help.
9117 
9118 
9119   if [ -z "${LS+x}" ]; then
9120     # The variable is not set by user, try to locate tool using the code snippet
9121     for ac_prog in ls
9122 do
9123   # Extract the first word of "$ac_prog", so it can be a program name with args.
9124 set dummy $ac_prog; ac_word=$2
9125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9126 $as_echo_n "checking for $ac_word... " >&6; }
9127 if ${ac_cv_path_LS+:} false; then :
9128   $as_echo_n "(cached) " >&6
9129 else
9130   case $LS in
9131   [\\/]* | ?:[\\/]*)
9132   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9133   ;;
9134   *)
9135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9136 for as_dir in $PATH
9137 do
9138   IFS=$as_save_IFS
9139   test -z "$as_dir" && as_dir=.
9140     for ac_exec_ext in '' $ac_executable_extensions; do
9141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9142     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9144     break 2
9145   fi
9146 done
9147   done
9148 IFS=$as_save_IFS
9149 
9150   ;;
9151 esac
9152 fi
9153 LS=$ac_cv_path_LS
9154 if test -n "$LS"; then
9155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9156 $as_echo "$LS" >&6; }
9157 else
9158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9159 $as_echo "no" >&6; }
9160 fi
9161 
9162 
9163   test -n "$LS" && break
9164 done
9165 
9166   else
9167     # The variable is set, but is it from the command line or the environment?
9168 
9169     # Try to remove the string !LS! from our list.
9170     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9171     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9172       # If it failed, the variable was not from the command line. Ignore it,
9173       # but warn the user (except for BASH, which is always set by the calling BASH).
9174       if test "xLS" != xBASH; then
9175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9176 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9177       fi
9178       # Try to locate tool using the code snippet
9179       for ac_prog in ls
9180 do
9181   # Extract the first word of "$ac_prog", so it can be a program name with args.
9182 set dummy $ac_prog; ac_word=$2
9183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9184 $as_echo_n "checking for $ac_word... " >&6; }
9185 if ${ac_cv_path_LS+:} false; then :
9186   $as_echo_n "(cached) " >&6
9187 else
9188   case $LS in
9189   [\\/]* | ?:[\\/]*)
9190   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9191   ;;
9192   *)
9193   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9194 for as_dir in $PATH
9195 do
9196   IFS=$as_save_IFS
9197   test -z "$as_dir" && as_dir=.
9198     for ac_exec_ext in '' $ac_executable_extensions; do
9199   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9200     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9201     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9202     break 2
9203   fi
9204 done
9205   done
9206 IFS=$as_save_IFS
9207 
9208   ;;
9209 esac
9210 fi
9211 LS=$ac_cv_path_LS
9212 if test -n "$LS"; then
9213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9214 $as_echo "$LS" >&6; }
9215 else
9216   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217 $as_echo "no" >&6; }
9218 fi
9219 
9220 
9221   test -n "$LS" && break
9222 done
9223 
9224     else
9225       # If it succeeded, then it was overridden by the user. We will use it
9226       # for the tool.
9227 
9228       # First remove it from the list of overridden variables, so we can test
9229       # for unknown variables in the end.
9230       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9231 
9232       # Check if we try to supply an empty value
9233       if test "x$LS" = x; then
9234         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9235 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9236         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9237 $as_echo_n "checking for LS... " >&6; }
9238         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9239 $as_echo "disabled" >&6; }
9240       else
9241         # Check if the provided tool contains a complete path.
9242         tool_specified="$LS"
9243         tool_basename="${tool_specified##*/}"
9244         if test "x$tool_basename" = "x$tool_specified"; then
9245           # A command without a complete path is provided, search $PATH.
9246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9247 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9248           # Extract the first word of "$tool_basename", so it can be a program name with args.
9249 set dummy $tool_basename; ac_word=$2
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9251 $as_echo_n "checking for $ac_word... " >&6; }
9252 if ${ac_cv_path_LS+:} false; then :
9253   $as_echo_n "(cached) " >&6
9254 else
9255   case $LS in
9256   [\\/]* | ?:[\\/]*)
9257   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9258   ;;
9259   *)
9260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9261 for as_dir in $PATH
9262 do
9263   IFS=$as_save_IFS
9264   test -z "$as_dir" && as_dir=.
9265     for ac_exec_ext in '' $ac_executable_extensions; do
9266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9267     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9269     break 2
9270   fi
9271 done
9272   done
9273 IFS=$as_save_IFS
9274 
9275   ;;
9276 esac
9277 fi
9278 LS=$ac_cv_path_LS
9279 if test -n "$LS"; then
9280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9281 $as_echo "$LS" >&6; }
9282 else
9283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9284 $as_echo "no" >&6; }
9285 fi
9286 
9287 
9288           if test "x$LS" = x; then
9289             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9290           fi
9291         else
9292           # Otherwise we believe it is a complete path. Use it as it is.
9293           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9294 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9295           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9296 $as_echo_n "checking for LS... " >&6; }
9297           if test ! -x "$tool_specified"; then
9298             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9299 $as_echo "not found" >&6; }
9300             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9301           fi
9302           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9303 $as_echo "$tool_specified" >&6; }
9304         fi
9305       fi
9306     fi
9307 
9308   fi
9309 
9310 
9311 
9312   if test "x$LS" = x; then
9313     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9314   fi
9315 
9316 
9317 
9318 
9319 
9320   # Publish this variable in the help.
9321 
9322 
9323   if [ -z "${MKDIR+x}" ]; then
9324     # The variable is not set by user, try to locate tool using the code snippet
9325     for ac_prog in mkdir
9326 do
9327   # Extract the first word of "$ac_prog", so it can be a program name with args.
9328 set dummy $ac_prog; ac_word=$2
9329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9330 $as_echo_n "checking for $ac_word... " >&6; }
9331 if ${ac_cv_path_MKDIR+:} false; then :
9332   $as_echo_n "(cached) " >&6
9333 else
9334   case $MKDIR in
9335   [\\/]* | ?:[\\/]*)
9336   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9337   ;;
9338   *)
9339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9340 for as_dir in $PATH
9341 do
9342   IFS=$as_save_IFS
9343   test -z "$as_dir" && as_dir=.
9344     for ac_exec_ext in '' $ac_executable_extensions; do
9345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9346     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9348     break 2
9349   fi
9350 done
9351   done
9352 IFS=$as_save_IFS
9353 
9354   ;;
9355 esac
9356 fi
9357 MKDIR=$ac_cv_path_MKDIR
9358 if test -n "$MKDIR"; then
9359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9360 $as_echo "$MKDIR" >&6; }
9361 else
9362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9363 $as_echo "no" >&6; }
9364 fi
9365 
9366 
9367   test -n "$MKDIR" && break
9368 done
9369 
9370   else
9371     # The variable is set, but is it from the command line or the environment?
9372 
9373     # Try to remove the string !MKDIR! from our list.
9374     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9375     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9376       # If it failed, the variable was not from the command line. Ignore it,
9377       # but warn the user (except for BASH, which is always set by the calling BASH).
9378       if test "xMKDIR" != xBASH; then
9379         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9380 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9381       fi
9382       # Try to locate tool using the code snippet
9383       for ac_prog in mkdir
9384 do
9385   # Extract the first word of "$ac_prog", so it can be a program name with args.
9386 set dummy $ac_prog; ac_word=$2
9387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9388 $as_echo_n "checking for $ac_word... " >&6; }
9389 if ${ac_cv_path_MKDIR+:} false; then :
9390   $as_echo_n "(cached) " >&6
9391 else
9392   case $MKDIR in
9393   [\\/]* | ?:[\\/]*)
9394   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9395   ;;
9396   *)
9397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9398 for as_dir in $PATH
9399 do
9400   IFS=$as_save_IFS
9401   test -z "$as_dir" && as_dir=.
9402     for ac_exec_ext in '' $ac_executable_extensions; do
9403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9404     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9406     break 2
9407   fi
9408 done
9409   done
9410 IFS=$as_save_IFS
9411 
9412   ;;
9413 esac
9414 fi
9415 MKDIR=$ac_cv_path_MKDIR
9416 if test -n "$MKDIR"; then
9417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9418 $as_echo "$MKDIR" >&6; }
9419 else
9420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9421 $as_echo "no" >&6; }
9422 fi
9423 
9424 
9425   test -n "$MKDIR" && break
9426 done
9427 
9428     else
9429       # If it succeeded, then it was overridden by the user. We will use it
9430       # for the tool.
9431 
9432       # First remove it from the list of overridden variables, so we can test
9433       # for unknown variables in the end.
9434       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9435 
9436       # Check if we try to supply an empty value
9437       if test "x$MKDIR" = x; then
9438         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9439 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9440         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9441 $as_echo_n "checking for MKDIR... " >&6; }
9442         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9443 $as_echo "disabled" >&6; }
9444       else
9445         # Check if the provided tool contains a complete path.
9446         tool_specified="$MKDIR"
9447         tool_basename="${tool_specified##*/}"
9448         if test "x$tool_basename" = "x$tool_specified"; then
9449           # A command without a complete path is provided, search $PATH.
9450           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9451 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9452           # Extract the first word of "$tool_basename", so it can be a program name with args.
9453 set dummy $tool_basename; ac_word=$2
9454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9455 $as_echo_n "checking for $ac_word... " >&6; }
9456 if ${ac_cv_path_MKDIR+:} false; then :
9457   $as_echo_n "(cached) " >&6
9458 else
9459   case $MKDIR in
9460   [\\/]* | ?:[\\/]*)
9461   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9462   ;;
9463   *)
9464   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9465 for as_dir in $PATH
9466 do
9467   IFS=$as_save_IFS
9468   test -z "$as_dir" && as_dir=.
9469     for ac_exec_ext in '' $ac_executable_extensions; do
9470   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9471     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9472     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9473     break 2
9474   fi
9475 done
9476   done
9477 IFS=$as_save_IFS
9478 
9479   ;;
9480 esac
9481 fi
9482 MKDIR=$ac_cv_path_MKDIR
9483 if test -n "$MKDIR"; then
9484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9485 $as_echo "$MKDIR" >&6; }
9486 else
9487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9488 $as_echo "no" >&6; }
9489 fi
9490 
9491 
9492           if test "x$MKDIR" = x; then
9493             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9494           fi
9495         else
9496           # Otherwise we believe it is a complete path. Use it as it is.
9497           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9498 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9499           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9500 $as_echo_n "checking for MKDIR... " >&6; }
9501           if test ! -x "$tool_specified"; then
9502             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9503 $as_echo "not found" >&6; }
9504             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9505           fi
9506           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9507 $as_echo "$tool_specified" >&6; }
9508         fi
9509       fi
9510     fi
9511 
9512   fi
9513 
9514 
9515 
9516   if test "x$MKDIR" = x; then
9517     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9518   fi
9519 
9520 
9521 
9522 
9523 
9524   # Publish this variable in the help.
9525 
9526 
9527   if [ -z "${MKTEMP+x}" ]; then
9528     # The variable is not set by user, try to locate tool using the code snippet
9529     for ac_prog in mktemp
9530 do
9531   # Extract the first word of "$ac_prog", so it can be a program name with args.
9532 set dummy $ac_prog; ac_word=$2
9533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9534 $as_echo_n "checking for $ac_word... " >&6; }
9535 if ${ac_cv_path_MKTEMP+:} false; then :
9536   $as_echo_n "(cached) " >&6
9537 else
9538   case $MKTEMP in
9539   [\\/]* | ?:[\\/]*)
9540   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9541   ;;
9542   *)
9543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9544 for as_dir in $PATH
9545 do
9546   IFS=$as_save_IFS
9547   test -z "$as_dir" && as_dir=.
9548     for ac_exec_ext in '' $ac_executable_extensions; do
9549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9550     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9552     break 2
9553   fi
9554 done
9555   done
9556 IFS=$as_save_IFS
9557 
9558   ;;
9559 esac
9560 fi
9561 MKTEMP=$ac_cv_path_MKTEMP
9562 if test -n "$MKTEMP"; then
9563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9564 $as_echo "$MKTEMP" >&6; }
9565 else
9566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9567 $as_echo "no" >&6; }
9568 fi
9569 
9570 
9571   test -n "$MKTEMP" && break
9572 done
9573 
9574   else
9575     # The variable is set, but is it from the command line or the environment?
9576 
9577     # Try to remove the string !MKTEMP! from our list.
9578     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9579     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9580       # If it failed, the variable was not from the command line. Ignore it,
9581       # but warn the user (except for BASH, which is always set by the calling BASH).
9582       if test "xMKTEMP" != xBASH; then
9583         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9584 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9585       fi
9586       # Try to locate tool using the code snippet
9587       for ac_prog in mktemp
9588 do
9589   # Extract the first word of "$ac_prog", so it can be a program name with args.
9590 set dummy $ac_prog; ac_word=$2
9591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9592 $as_echo_n "checking for $ac_word... " >&6; }
9593 if ${ac_cv_path_MKTEMP+:} false; then :
9594   $as_echo_n "(cached) " >&6
9595 else
9596   case $MKTEMP in
9597   [\\/]* | ?:[\\/]*)
9598   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9599   ;;
9600   *)
9601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9602 for as_dir in $PATH
9603 do
9604   IFS=$as_save_IFS
9605   test -z "$as_dir" && as_dir=.
9606     for ac_exec_ext in '' $ac_executable_extensions; do
9607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9608     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9610     break 2
9611   fi
9612 done
9613   done
9614 IFS=$as_save_IFS
9615 
9616   ;;
9617 esac
9618 fi
9619 MKTEMP=$ac_cv_path_MKTEMP
9620 if test -n "$MKTEMP"; then
9621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9622 $as_echo "$MKTEMP" >&6; }
9623 else
9624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9625 $as_echo "no" >&6; }
9626 fi
9627 
9628 
9629   test -n "$MKTEMP" && break
9630 done
9631 
9632     else
9633       # If it succeeded, then it was overridden by the user. We will use it
9634       # for the tool.
9635 
9636       # First remove it from the list of overridden variables, so we can test
9637       # for unknown variables in the end.
9638       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9639 
9640       # Check if we try to supply an empty value
9641       if test "x$MKTEMP" = x; then
9642         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9643 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9644         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9645 $as_echo_n "checking for MKTEMP... " >&6; }
9646         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9647 $as_echo "disabled" >&6; }
9648       else
9649         # Check if the provided tool contains a complete path.
9650         tool_specified="$MKTEMP"
9651         tool_basename="${tool_specified##*/}"
9652         if test "x$tool_basename" = "x$tool_specified"; then
9653           # A command without a complete path is provided, search $PATH.
9654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9655 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9656           # Extract the first word of "$tool_basename", so it can be a program name with args.
9657 set dummy $tool_basename; ac_word=$2
9658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9659 $as_echo_n "checking for $ac_word... " >&6; }
9660 if ${ac_cv_path_MKTEMP+:} false; then :
9661   $as_echo_n "(cached) " >&6
9662 else
9663   case $MKTEMP in
9664   [\\/]* | ?:[\\/]*)
9665   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9666   ;;
9667   *)
9668   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9669 for as_dir in $PATH
9670 do
9671   IFS=$as_save_IFS
9672   test -z "$as_dir" && as_dir=.
9673     for ac_exec_ext in '' $ac_executable_extensions; do
9674   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9675     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9676     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9677     break 2
9678   fi
9679 done
9680   done
9681 IFS=$as_save_IFS
9682 
9683   ;;
9684 esac
9685 fi
9686 MKTEMP=$ac_cv_path_MKTEMP
9687 if test -n "$MKTEMP"; then
9688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9689 $as_echo "$MKTEMP" >&6; }
9690 else
9691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9692 $as_echo "no" >&6; }
9693 fi
9694 
9695 
9696           if test "x$MKTEMP" = x; then
9697             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9698           fi
9699         else
9700           # Otherwise we believe it is a complete path. Use it as it is.
9701           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9702 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9703           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9704 $as_echo_n "checking for MKTEMP... " >&6; }
9705           if test ! -x "$tool_specified"; then
9706             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9707 $as_echo "not found" >&6; }
9708             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9709           fi
9710           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9711 $as_echo "$tool_specified" >&6; }
9712         fi
9713       fi
9714     fi
9715 
9716   fi
9717 
9718 
9719 
9720   if test "x$MKTEMP" = x; then
9721     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9722   fi
9723 
9724 
9725 
9726 
9727 
9728   # Publish this variable in the help.
9729 
9730 
9731   if [ -z "${MV+x}" ]; then
9732     # The variable is not set by user, try to locate tool using the code snippet
9733     for ac_prog in mv
9734 do
9735   # Extract the first word of "$ac_prog", so it can be a program name with args.
9736 set dummy $ac_prog; ac_word=$2
9737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9738 $as_echo_n "checking for $ac_word... " >&6; }
9739 if ${ac_cv_path_MV+:} false; then :
9740   $as_echo_n "(cached) " >&6
9741 else
9742   case $MV in
9743   [\\/]* | ?:[\\/]*)
9744   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9745   ;;
9746   *)
9747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9748 for as_dir in $PATH
9749 do
9750   IFS=$as_save_IFS
9751   test -z "$as_dir" && as_dir=.
9752     for ac_exec_ext in '' $ac_executable_extensions; do
9753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9754     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9756     break 2
9757   fi
9758 done
9759   done
9760 IFS=$as_save_IFS
9761 
9762   ;;
9763 esac
9764 fi
9765 MV=$ac_cv_path_MV
9766 if test -n "$MV"; then
9767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9768 $as_echo "$MV" >&6; }
9769 else
9770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9771 $as_echo "no" >&6; }
9772 fi
9773 
9774 
9775   test -n "$MV" && break
9776 done
9777 
9778   else
9779     # The variable is set, but is it from the command line or the environment?
9780 
9781     # Try to remove the string !MV! from our list.
9782     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9783     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9784       # If it failed, the variable was not from the command line. Ignore it,
9785       # but warn the user (except for BASH, which is always set by the calling BASH).
9786       if test "xMV" != xBASH; then
9787         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9788 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9789       fi
9790       # Try to locate tool using the code snippet
9791       for ac_prog in mv
9792 do
9793   # Extract the first word of "$ac_prog", so it can be a program name with args.
9794 set dummy $ac_prog; ac_word=$2
9795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9796 $as_echo_n "checking for $ac_word... " >&6; }
9797 if ${ac_cv_path_MV+:} false; then :
9798   $as_echo_n "(cached) " >&6
9799 else
9800   case $MV in
9801   [\\/]* | ?:[\\/]*)
9802   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9803   ;;
9804   *)
9805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9806 for as_dir in $PATH
9807 do
9808   IFS=$as_save_IFS
9809   test -z "$as_dir" && as_dir=.
9810     for ac_exec_ext in '' $ac_executable_extensions; do
9811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9812     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9814     break 2
9815   fi
9816 done
9817   done
9818 IFS=$as_save_IFS
9819 
9820   ;;
9821 esac
9822 fi
9823 MV=$ac_cv_path_MV
9824 if test -n "$MV"; then
9825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9826 $as_echo "$MV" >&6; }
9827 else
9828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9829 $as_echo "no" >&6; }
9830 fi
9831 
9832 
9833   test -n "$MV" && break
9834 done
9835 
9836     else
9837       # If it succeeded, then it was overridden by the user. We will use it
9838       # for the tool.
9839 
9840       # First remove it from the list of overridden variables, so we can test
9841       # for unknown variables in the end.
9842       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9843 
9844       # Check if we try to supply an empty value
9845       if test "x$MV" = x; then
9846         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9847 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9848         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9849 $as_echo_n "checking for MV... " >&6; }
9850         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9851 $as_echo "disabled" >&6; }
9852       else
9853         # Check if the provided tool contains a complete path.
9854         tool_specified="$MV"
9855         tool_basename="${tool_specified##*/}"
9856         if test "x$tool_basename" = "x$tool_specified"; then
9857           # A command without a complete path is provided, search $PATH.
9858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9859 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9860           # Extract the first word of "$tool_basename", so it can be a program name with args.
9861 set dummy $tool_basename; ac_word=$2
9862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9863 $as_echo_n "checking for $ac_word... " >&6; }
9864 if ${ac_cv_path_MV+:} false; then :
9865   $as_echo_n "(cached) " >&6
9866 else
9867   case $MV in
9868   [\\/]* | ?:[\\/]*)
9869   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9870   ;;
9871   *)
9872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9873 for as_dir in $PATH
9874 do
9875   IFS=$as_save_IFS
9876   test -z "$as_dir" && as_dir=.
9877     for ac_exec_ext in '' $ac_executable_extensions; do
9878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9879     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9881     break 2
9882   fi
9883 done
9884   done
9885 IFS=$as_save_IFS
9886 
9887   ;;
9888 esac
9889 fi
9890 MV=$ac_cv_path_MV
9891 if test -n "$MV"; then
9892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9893 $as_echo "$MV" >&6; }
9894 else
9895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9896 $as_echo "no" >&6; }
9897 fi
9898 
9899 
9900           if test "x$MV" = x; then
9901             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9902           fi
9903         else
9904           # Otherwise we believe it is a complete path. Use it as it is.
9905           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9906 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9907           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9908 $as_echo_n "checking for MV... " >&6; }
9909           if test ! -x "$tool_specified"; then
9910             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9911 $as_echo "not found" >&6; }
9912             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9913           fi
9914           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9915 $as_echo "$tool_specified" >&6; }
9916         fi
9917       fi
9918     fi
9919 
9920   fi
9921 
9922 
9923 
9924   if test "x$MV" = x; then
9925     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9926   fi
9927 
9928 
9929 
9930 
9931 
9932   # Publish this variable in the help.
9933 
9934 
9935   if [ -z "${NAWK+x}" ]; then
9936     # The variable is not set by user, try to locate tool using the code snippet
9937     for ac_prog in nawk gawk awk
9938 do
9939   # Extract the first word of "$ac_prog", so it can be a program name with args.
9940 set dummy $ac_prog; ac_word=$2
9941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9942 $as_echo_n "checking for $ac_word... " >&6; }
9943 if ${ac_cv_path_NAWK+:} false; then :
9944   $as_echo_n "(cached) " >&6
9945 else
9946   case $NAWK in
9947   [\\/]* | ?:[\\/]*)
9948   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9949   ;;
9950   *)
9951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9952 for as_dir in $PATH
9953 do
9954   IFS=$as_save_IFS
9955   test -z "$as_dir" && as_dir=.
9956     for ac_exec_ext in '' $ac_executable_extensions; do
9957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9958     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9960     break 2
9961   fi
9962 done
9963   done
9964 IFS=$as_save_IFS
9965 
9966   ;;
9967 esac
9968 fi
9969 NAWK=$ac_cv_path_NAWK
9970 if test -n "$NAWK"; then
9971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9972 $as_echo "$NAWK" >&6; }
9973 else
9974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9975 $as_echo "no" >&6; }
9976 fi
9977 
9978 
9979   test -n "$NAWK" && break
9980 done
9981 
9982   else
9983     # The variable is set, but is it from the command line or the environment?
9984 
9985     # Try to remove the string !NAWK! from our list.
9986     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9987     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9988       # If it failed, the variable was not from the command line. Ignore it,
9989       # but warn the user (except for BASH, which is always set by the calling BASH).
9990       if test "xNAWK" != xBASH; then
9991         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9992 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9993       fi
9994       # Try to locate tool using the code snippet
9995       for ac_prog in nawk gawk awk
9996 do
9997   # Extract the first word of "$ac_prog", so it can be a program name with args.
9998 set dummy $ac_prog; ac_word=$2
9999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10000 $as_echo_n "checking for $ac_word... " >&6; }
10001 if ${ac_cv_path_NAWK+:} false; then :
10002   $as_echo_n "(cached) " >&6
10003 else
10004   case $NAWK in
10005   [\\/]* | ?:[\\/]*)
10006   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10007   ;;
10008   *)
10009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10010 for as_dir in $PATH
10011 do
10012   IFS=$as_save_IFS
10013   test -z "$as_dir" && as_dir=.
10014     for ac_exec_ext in '' $ac_executable_extensions; do
10015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10016     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10018     break 2
10019   fi
10020 done
10021   done
10022 IFS=$as_save_IFS
10023 
10024   ;;
10025 esac
10026 fi
10027 NAWK=$ac_cv_path_NAWK
10028 if test -n "$NAWK"; then
10029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10030 $as_echo "$NAWK" >&6; }
10031 else
10032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10033 $as_echo "no" >&6; }
10034 fi
10035 
10036 
10037   test -n "$NAWK" && break
10038 done
10039 
10040     else
10041       # If it succeeded, then it was overridden by the user. We will use it
10042       # for the tool.
10043 
10044       # First remove it from the list of overridden variables, so we can test
10045       # for unknown variables in the end.
10046       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10047 
10048       # Check if we try to supply an empty value
10049       if test "x$NAWK" = x; then
10050         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10051 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10052         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10053 $as_echo_n "checking for NAWK... " >&6; }
10054         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10055 $as_echo "disabled" >&6; }
10056       else
10057         # Check if the provided tool contains a complete path.
10058         tool_specified="$NAWK"
10059         tool_basename="${tool_specified##*/}"
10060         if test "x$tool_basename" = "x$tool_specified"; then
10061           # A command without a complete path is provided, search $PATH.
10062           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10063 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10064           # Extract the first word of "$tool_basename", so it can be a program name with args.
10065 set dummy $tool_basename; ac_word=$2
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10067 $as_echo_n "checking for $ac_word... " >&6; }
10068 if ${ac_cv_path_NAWK+:} false; then :
10069   $as_echo_n "(cached) " >&6
10070 else
10071   case $NAWK in
10072   [\\/]* | ?:[\\/]*)
10073   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10074   ;;
10075   *)
10076   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10077 for as_dir in $PATH
10078 do
10079   IFS=$as_save_IFS
10080   test -z "$as_dir" && as_dir=.
10081     for ac_exec_ext in '' $ac_executable_extensions; do
10082   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10083     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10084     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10085     break 2
10086   fi
10087 done
10088   done
10089 IFS=$as_save_IFS
10090 
10091   ;;
10092 esac
10093 fi
10094 NAWK=$ac_cv_path_NAWK
10095 if test -n "$NAWK"; then
10096   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10097 $as_echo "$NAWK" >&6; }
10098 else
10099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10100 $as_echo "no" >&6; }
10101 fi
10102 
10103 
10104           if test "x$NAWK" = x; then
10105             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10106           fi
10107         else
10108           # Otherwise we believe it is a complete path. Use it as it is.
10109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10110 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10111           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10112 $as_echo_n "checking for NAWK... " >&6; }
10113           if test ! -x "$tool_specified"; then
10114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10115 $as_echo "not found" >&6; }
10116             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10117           fi
10118           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10119 $as_echo "$tool_specified" >&6; }
10120         fi
10121       fi
10122     fi
10123 
10124   fi
10125 
10126 
10127 
10128   if test "x$NAWK" = x; then
10129     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10130   fi
10131 
10132 
10133 
10134 
10135 
10136   # Publish this variable in the help.
10137 
10138 
10139   if [ -z "${PRINTF+x}" ]; then
10140     # The variable is not set by user, try to locate tool using the code snippet
10141     for ac_prog in printf
10142 do
10143   # Extract the first word of "$ac_prog", so it can be a program name with args.
10144 set dummy $ac_prog; ac_word=$2
10145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10146 $as_echo_n "checking for $ac_word... " >&6; }
10147 if ${ac_cv_path_PRINTF+:} false; then :
10148   $as_echo_n "(cached) " >&6
10149 else
10150   case $PRINTF in
10151   [\\/]* | ?:[\\/]*)
10152   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10153   ;;
10154   *)
10155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10156 for as_dir in $PATH
10157 do
10158   IFS=$as_save_IFS
10159   test -z "$as_dir" && as_dir=.
10160     for ac_exec_ext in '' $ac_executable_extensions; do
10161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10162     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10164     break 2
10165   fi
10166 done
10167   done
10168 IFS=$as_save_IFS
10169 
10170   ;;
10171 esac
10172 fi
10173 PRINTF=$ac_cv_path_PRINTF
10174 if test -n "$PRINTF"; then
10175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10176 $as_echo "$PRINTF" >&6; }
10177 else
10178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10179 $as_echo "no" >&6; }
10180 fi
10181 
10182 
10183   test -n "$PRINTF" && break
10184 done
10185 
10186   else
10187     # The variable is set, but is it from the command line or the environment?
10188 
10189     # Try to remove the string !PRINTF! from our list.
10190     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10191     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10192       # If it failed, the variable was not from the command line. Ignore it,
10193       # but warn the user (except for BASH, which is always set by the calling BASH).
10194       if test "xPRINTF" != xBASH; then
10195         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10196 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10197       fi
10198       # Try to locate tool using the code snippet
10199       for ac_prog in printf
10200 do
10201   # Extract the first word of "$ac_prog", so it can be a program name with args.
10202 set dummy $ac_prog; ac_word=$2
10203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10204 $as_echo_n "checking for $ac_word... " >&6; }
10205 if ${ac_cv_path_PRINTF+:} false; then :
10206   $as_echo_n "(cached) " >&6
10207 else
10208   case $PRINTF in
10209   [\\/]* | ?:[\\/]*)
10210   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10211   ;;
10212   *)
10213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10214 for as_dir in $PATH
10215 do
10216   IFS=$as_save_IFS
10217   test -z "$as_dir" && as_dir=.
10218     for ac_exec_ext in '' $ac_executable_extensions; do
10219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10220     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10222     break 2
10223   fi
10224 done
10225   done
10226 IFS=$as_save_IFS
10227 
10228   ;;
10229 esac
10230 fi
10231 PRINTF=$ac_cv_path_PRINTF
10232 if test -n "$PRINTF"; then
10233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10234 $as_echo "$PRINTF" >&6; }
10235 else
10236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237 $as_echo "no" >&6; }
10238 fi
10239 
10240 
10241   test -n "$PRINTF" && break
10242 done
10243 
10244     else
10245       # If it succeeded, then it was overridden by the user. We will use it
10246       # for the tool.
10247 
10248       # First remove it from the list of overridden variables, so we can test
10249       # for unknown variables in the end.
10250       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10251 
10252       # Check if we try to supply an empty value
10253       if test "x$PRINTF" = x; then
10254         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10255 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10257 $as_echo_n "checking for PRINTF... " >&6; }
10258         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10259 $as_echo "disabled" >&6; }
10260       else
10261         # Check if the provided tool contains a complete path.
10262         tool_specified="$PRINTF"
10263         tool_basename="${tool_specified##*/}"
10264         if test "x$tool_basename" = "x$tool_specified"; then
10265           # A command without a complete path is provided, search $PATH.
10266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10267 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10268           # Extract the first word of "$tool_basename", so it can be a program name with args.
10269 set dummy $tool_basename; ac_word=$2
10270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10271 $as_echo_n "checking for $ac_word... " >&6; }
10272 if ${ac_cv_path_PRINTF+:} false; then :
10273   $as_echo_n "(cached) " >&6
10274 else
10275   case $PRINTF in
10276   [\\/]* | ?:[\\/]*)
10277   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10278   ;;
10279   *)
10280   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10281 for as_dir in $PATH
10282 do
10283   IFS=$as_save_IFS
10284   test -z "$as_dir" && as_dir=.
10285     for ac_exec_ext in '' $ac_executable_extensions; do
10286   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10287     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10288     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10289     break 2
10290   fi
10291 done
10292   done
10293 IFS=$as_save_IFS
10294 
10295   ;;
10296 esac
10297 fi
10298 PRINTF=$ac_cv_path_PRINTF
10299 if test -n "$PRINTF"; then
10300   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10301 $as_echo "$PRINTF" >&6; }
10302 else
10303   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10304 $as_echo "no" >&6; }
10305 fi
10306 
10307 
10308           if test "x$PRINTF" = x; then
10309             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10310           fi
10311         else
10312           # Otherwise we believe it is a complete path. Use it as it is.
10313           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10314 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10315           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10316 $as_echo_n "checking for PRINTF... " >&6; }
10317           if test ! -x "$tool_specified"; then
10318             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10319 $as_echo "not found" >&6; }
10320             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10321           fi
10322           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10323 $as_echo "$tool_specified" >&6; }
10324         fi
10325       fi
10326     fi
10327 
10328   fi
10329 
10330 
10331 
10332   if test "x$PRINTF" = x; then
10333     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10334   fi
10335 
10336 
10337 
10338 
10339 
10340   # Publish this variable in the help.
10341 
10342 
10343   if [ -z "${RM+x}" ]; then
10344     # The variable is not set by user, try to locate tool using the code snippet
10345     for ac_prog in rm
10346 do
10347   # Extract the first word of "$ac_prog", so it can be a program name with args.
10348 set dummy $ac_prog; ac_word=$2
10349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10350 $as_echo_n "checking for $ac_word... " >&6; }
10351 if ${ac_cv_path_RM+:} false; then :
10352   $as_echo_n "(cached) " >&6
10353 else
10354   case $RM in
10355   [\\/]* | ?:[\\/]*)
10356   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10357   ;;
10358   *)
10359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10360 for as_dir in $PATH
10361 do
10362   IFS=$as_save_IFS
10363   test -z "$as_dir" && as_dir=.
10364     for ac_exec_ext in '' $ac_executable_extensions; do
10365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10366     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10368     break 2
10369   fi
10370 done
10371   done
10372 IFS=$as_save_IFS
10373 
10374   ;;
10375 esac
10376 fi
10377 RM=$ac_cv_path_RM
10378 if test -n "$RM"; then
10379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10380 $as_echo "$RM" >&6; }
10381 else
10382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10383 $as_echo "no" >&6; }
10384 fi
10385 
10386 
10387   test -n "$RM" && break
10388 done
10389 
10390   else
10391     # The variable is set, but is it from the command line or the environment?
10392 
10393     # Try to remove the string !RM! from our list.
10394     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10395     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10396       # If it failed, the variable was not from the command line. Ignore it,
10397       # but warn the user (except for BASH, which is always set by the calling BASH).
10398       if test "xRM" != xBASH; then
10399         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10400 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10401       fi
10402       # Try to locate tool using the code snippet
10403       for ac_prog in rm
10404 do
10405   # Extract the first word of "$ac_prog", so it can be a program name with args.
10406 set dummy $ac_prog; ac_word=$2
10407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10408 $as_echo_n "checking for $ac_word... " >&6; }
10409 if ${ac_cv_path_RM+:} false; then :
10410   $as_echo_n "(cached) " >&6
10411 else
10412   case $RM in
10413   [\\/]* | ?:[\\/]*)
10414   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10415   ;;
10416   *)
10417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10418 for as_dir in $PATH
10419 do
10420   IFS=$as_save_IFS
10421   test -z "$as_dir" && as_dir=.
10422     for ac_exec_ext in '' $ac_executable_extensions; do
10423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10424     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10426     break 2
10427   fi
10428 done
10429   done
10430 IFS=$as_save_IFS
10431 
10432   ;;
10433 esac
10434 fi
10435 RM=$ac_cv_path_RM
10436 if test -n "$RM"; then
10437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10438 $as_echo "$RM" >&6; }
10439 else
10440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10441 $as_echo "no" >&6; }
10442 fi
10443 
10444 
10445   test -n "$RM" && break
10446 done
10447 
10448     else
10449       # If it succeeded, then it was overridden by the user. We will use it
10450       # for the tool.
10451 
10452       # First remove it from the list of overridden variables, so we can test
10453       # for unknown variables in the end.
10454       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10455 
10456       # Check if we try to supply an empty value
10457       if test "x$RM" = x; then
10458         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10459 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10460         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10461 $as_echo_n "checking for RM... " >&6; }
10462         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10463 $as_echo "disabled" >&6; }
10464       else
10465         # Check if the provided tool contains a complete path.
10466         tool_specified="$RM"
10467         tool_basename="${tool_specified##*/}"
10468         if test "x$tool_basename" = "x$tool_specified"; then
10469           # A command without a complete path is provided, search $PATH.
10470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10471 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10472           # Extract the first word of "$tool_basename", so it can be a program name with args.
10473 set dummy $tool_basename; ac_word=$2
10474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10475 $as_echo_n "checking for $ac_word... " >&6; }
10476 if ${ac_cv_path_RM+:} false; then :
10477   $as_echo_n "(cached) " >&6
10478 else
10479   case $RM in
10480   [\\/]* | ?:[\\/]*)
10481   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10482   ;;
10483   *)
10484   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10485 for as_dir in $PATH
10486 do
10487   IFS=$as_save_IFS
10488   test -z "$as_dir" && as_dir=.
10489     for ac_exec_ext in '' $ac_executable_extensions; do
10490   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10491     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10492     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10493     break 2
10494   fi
10495 done
10496   done
10497 IFS=$as_save_IFS
10498 
10499   ;;
10500 esac
10501 fi
10502 RM=$ac_cv_path_RM
10503 if test -n "$RM"; then
10504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10505 $as_echo "$RM" >&6; }
10506 else
10507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10508 $as_echo "no" >&6; }
10509 fi
10510 
10511 
10512           if test "x$RM" = x; then
10513             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10514           fi
10515         else
10516           # Otherwise we believe it is a complete path. Use it as it is.
10517           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10518 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10519           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10520 $as_echo_n "checking for RM... " >&6; }
10521           if test ! -x "$tool_specified"; then
10522             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10523 $as_echo "not found" >&6; }
10524             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10525           fi
10526           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10527 $as_echo "$tool_specified" >&6; }
10528         fi
10529       fi
10530     fi
10531 
10532   fi
10533 
10534 
10535 
10536   if test "x$RM" = x; then
10537     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10538   fi
10539 
10540 
10541 
10542 
10543 
10544   # Publish this variable in the help.
10545 
10546 
10547   if [ -z "${RMDIR+x}" ]; then
10548     # The variable is not set by user, try to locate tool using the code snippet
10549     for ac_prog in rmdir
10550 do
10551   # Extract the first word of "$ac_prog", so it can be a program name with args.
10552 set dummy $ac_prog; ac_word=$2
10553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10554 $as_echo_n "checking for $ac_word... " >&6; }
10555 if ${ac_cv_path_RMDIR+:} false; then :
10556   $as_echo_n "(cached) " >&6
10557 else
10558   case $RMDIR in
10559   [\\/]* | ?:[\\/]*)
10560   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10561   ;;
10562   *)
10563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10564 for as_dir in $PATH
10565 do
10566   IFS=$as_save_IFS
10567   test -z "$as_dir" && as_dir=.
10568     for ac_exec_ext in '' $ac_executable_extensions; do
10569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10570     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10572     break 2
10573   fi
10574 done
10575   done
10576 IFS=$as_save_IFS
10577 
10578   ;;
10579 esac
10580 fi
10581 RMDIR=$ac_cv_path_RMDIR
10582 if test -n "$RMDIR"; then
10583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10584 $as_echo "$RMDIR" >&6; }
10585 else
10586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10587 $as_echo "no" >&6; }
10588 fi
10589 
10590 
10591   test -n "$RMDIR" && break
10592 done
10593 
10594   else
10595     # The variable is set, but is it from the command line or the environment?
10596 
10597     # Try to remove the string !RMDIR! from our list.
10598     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10599     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10600       # If it failed, the variable was not from the command line. Ignore it,
10601       # but warn the user (except for BASH, which is always set by the calling BASH).
10602       if test "xRMDIR" != xBASH; then
10603         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10604 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10605       fi
10606       # Try to locate tool using the code snippet
10607       for ac_prog in rmdir
10608 do
10609   # Extract the first word of "$ac_prog", so it can be a program name with args.
10610 set dummy $ac_prog; ac_word=$2
10611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10612 $as_echo_n "checking for $ac_word... " >&6; }
10613 if ${ac_cv_path_RMDIR+:} false; then :
10614   $as_echo_n "(cached) " >&6
10615 else
10616   case $RMDIR in
10617   [\\/]* | ?:[\\/]*)
10618   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10619   ;;
10620   *)
10621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10622 for as_dir in $PATH
10623 do
10624   IFS=$as_save_IFS
10625   test -z "$as_dir" && as_dir=.
10626     for ac_exec_ext in '' $ac_executable_extensions; do
10627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10628     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10630     break 2
10631   fi
10632 done
10633   done
10634 IFS=$as_save_IFS
10635 
10636   ;;
10637 esac
10638 fi
10639 RMDIR=$ac_cv_path_RMDIR
10640 if test -n "$RMDIR"; then
10641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10642 $as_echo "$RMDIR" >&6; }
10643 else
10644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10645 $as_echo "no" >&6; }
10646 fi
10647 
10648 
10649   test -n "$RMDIR" && break
10650 done
10651 
10652     else
10653       # If it succeeded, then it was overridden by the user. We will use it
10654       # for the tool.
10655 
10656       # First remove it from the list of overridden variables, so we can test
10657       # for unknown variables in the end.
10658       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10659 
10660       # Check if we try to supply an empty value
10661       if test "x$RMDIR" = x; then
10662         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10663 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10664         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10665 $as_echo_n "checking for RMDIR... " >&6; }
10666         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10667 $as_echo "disabled" >&6; }
10668       else
10669         # Check if the provided tool contains a complete path.
10670         tool_specified="$RMDIR"
10671         tool_basename="${tool_specified##*/}"
10672         if test "x$tool_basename" = "x$tool_specified"; then
10673           # A command without a complete path is provided, search $PATH.
10674           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10675 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10676           # Extract the first word of "$tool_basename", so it can be a program name with args.
10677 set dummy $tool_basename; ac_word=$2
10678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10679 $as_echo_n "checking for $ac_word... " >&6; }
10680 if ${ac_cv_path_RMDIR+:} false; then :
10681   $as_echo_n "(cached) " >&6
10682 else
10683   case $RMDIR in
10684   [\\/]* | ?:[\\/]*)
10685   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10686   ;;
10687   *)
10688   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10689 for as_dir in $PATH
10690 do
10691   IFS=$as_save_IFS
10692   test -z "$as_dir" && as_dir=.
10693     for ac_exec_ext in '' $ac_executable_extensions; do
10694   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10695     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10696     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10697     break 2
10698   fi
10699 done
10700   done
10701 IFS=$as_save_IFS
10702 
10703   ;;
10704 esac
10705 fi
10706 RMDIR=$ac_cv_path_RMDIR
10707 if test -n "$RMDIR"; then
10708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10709 $as_echo "$RMDIR" >&6; }
10710 else
10711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10712 $as_echo "no" >&6; }
10713 fi
10714 
10715 
10716           if test "x$RMDIR" = x; then
10717             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10718           fi
10719         else
10720           # Otherwise we believe it is a complete path. Use it as it is.
10721           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10722 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10723           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10724 $as_echo_n "checking for RMDIR... " >&6; }
10725           if test ! -x "$tool_specified"; then
10726             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10727 $as_echo "not found" >&6; }
10728             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10729           fi
10730           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10731 $as_echo "$tool_specified" >&6; }
10732         fi
10733       fi
10734     fi
10735 
10736   fi
10737 
10738 
10739 
10740   if test "x$RMDIR" = x; then
10741     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10742   fi
10743 
10744 
10745 
10746 
10747 
10748   # Publish this variable in the help.
10749 
10750 
10751   if [ -z "${SH+x}" ]; then
10752     # The variable is not set by user, try to locate tool using the code snippet
10753     for ac_prog in sh
10754 do
10755   # Extract the first word of "$ac_prog", so it can be a program name with args.
10756 set dummy $ac_prog; ac_word=$2
10757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10758 $as_echo_n "checking for $ac_word... " >&6; }
10759 if ${ac_cv_path_SH+:} false; then :
10760   $as_echo_n "(cached) " >&6
10761 else
10762   case $SH in
10763   [\\/]* | ?:[\\/]*)
10764   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10765   ;;
10766   *)
10767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10768 for as_dir in $PATH
10769 do
10770   IFS=$as_save_IFS
10771   test -z "$as_dir" && as_dir=.
10772     for ac_exec_ext in '' $ac_executable_extensions; do
10773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10774     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10776     break 2
10777   fi
10778 done
10779   done
10780 IFS=$as_save_IFS
10781 
10782   ;;
10783 esac
10784 fi
10785 SH=$ac_cv_path_SH
10786 if test -n "$SH"; then
10787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10788 $as_echo "$SH" >&6; }
10789 else
10790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10791 $as_echo "no" >&6; }
10792 fi
10793 
10794 
10795   test -n "$SH" && break
10796 done
10797 
10798   else
10799     # The variable is set, but is it from the command line or the environment?
10800 
10801     # Try to remove the string !SH! from our list.
10802     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10803     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10804       # If it failed, the variable was not from the command line. Ignore it,
10805       # but warn the user (except for BASH, which is always set by the calling BASH).
10806       if test "xSH" != xBASH; then
10807         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10808 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10809       fi
10810       # Try to locate tool using the code snippet
10811       for ac_prog in sh
10812 do
10813   # Extract the first word of "$ac_prog", so it can be a program name with args.
10814 set dummy $ac_prog; ac_word=$2
10815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10816 $as_echo_n "checking for $ac_word... " >&6; }
10817 if ${ac_cv_path_SH+:} false; then :
10818   $as_echo_n "(cached) " >&6
10819 else
10820   case $SH in
10821   [\\/]* | ?:[\\/]*)
10822   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10823   ;;
10824   *)
10825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10826 for as_dir in $PATH
10827 do
10828   IFS=$as_save_IFS
10829   test -z "$as_dir" && as_dir=.
10830     for ac_exec_ext in '' $ac_executable_extensions; do
10831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10832     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10834     break 2
10835   fi
10836 done
10837   done
10838 IFS=$as_save_IFS
10839 
10840   ;;
10841 esac
10842 fi
10843 SH=$ac_cv_path_SH
10844 if test -n "$SH"; then
10845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10846 $as_echo "$SH" >&6; }
10847 else
10848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10849 $as_echo "no" >&6; }
10850 fi
10851 
10852 
10853   test -n "$SH" && break
10854 done
10855 
10856     else
10857       # If it succeeded, then it was overridden by the user. We will use it
10858       # for the tool.
10859 
10860       # First remove it from the list of overridden variables, so we can test
10861       # for unknown variables in the end.
10862       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10863 
10864       # Check if we try to supply an empty value
10865       if test "x$SH" = x; then
10866         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10867 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10868         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10869 $as_echo_n "checking for SH... " >&6; }
10870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10871 $as_echo "disabled" >&6; }
10872       else
10873         # Check if the provided tool contains a complete path.
10874         tool_specified="$SH"
10875         tool_basename="${tool_specified##*/}"
10876         if test "x$tool_basename" = "x$tool_specified"; then
10877           # A command without a complete path is provided, search $PATH.
10878           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10879 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10880           # Extract the first word of "$tool_basename", so it can be a program name with args.
10881 set dummy $tool_basename; ac_word=$2
10882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10883 $as_echo_n "checking for $ac_word... " >&6; }
10884 if ${ac_cv_path_SH+:} false; then :
10885   $as_echo_n "(cached) " >&6
10886 else
10887   case $SH in
10888   [\\/]* | ?:[\\/]*)
10889   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10890   ;;
10891   *)
10892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10893 for as_dir in $PATH
10894 do
10895   IFS=$as_save_IFS
10896   test -z "$as_dir" && as_dir=.
10897     for ac_exec_ext in '' $ac_executable_extensions; do
10898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10899     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10901     break 2
10902   fi
10903 done
10904   done
10905 IFS=$as_save_IFS
10906 
10907   ;;
10908 esac
10909 fi
10910 SH=$ac_cv_path_SH
10911 if test -n "$SH"; then
10912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10913 $as_echo "$SH" >&6; }
10914 else
10915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10916 $as_echo "no" >&6; }
10917 fi
10918 
10919 
10920           if test "x$SH" = x; then
10921             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10922           fi
10923         else
10924           # Otherwise we believe it is a complete path. Use it as it is.
10925           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10926 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10927           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10928 $as_echo_n "checking for SH... " >&6; }
10929           if test ! -x "$tool_specified"; then
10930             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10931 $as_echo "not found" >&6; }
10932             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10933           fi
10934           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10935 $as_echo "$tool_specified" >&6; }
10936         fi
10937       fi
10938     fi
10939 
10940   fi
10941 
10942 
10943 
10944   if test "x$SH" = x; then
10945     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10946   fi
10947 
10948 
10949 
10950 
10951 
10952   # Publish this variable in the help.
10953 
10954 
10955   if [ -z "${SORT+x}" ]; then
10956     # The variable is not set by user, try to locate tool using the code snippet
10957     for ac_prog in sort
10958 do
10959   # Extract the first word of "$ac_prog", so it can be a program name with args.
10960 set dummy $ac_prog; ac_word=$2
10961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10962 $as_echo_n "checking for $ac_word... " >&6; }
10963 if ${ac_cv_path_SORT+:} false; then :
10964   $as_echo_n "(cached) " >&6
10965 else
10966   case $SORT in
10967   [\\/]* | ?:[\\/]*)
10968   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10969   ;;
10970   *)
10971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10972 for as_dir in $PATH
10973 do
10974   IFS=$as_save_IFS
10975   test -z "$as_dir" && as_dir=.
10976     for ac_exec_ext in '' $ac_executable_extensions; do
10977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10978     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10980     break 2
10981   fi
10982 done
10983   done
10984 IFS=$as_save_IFS
10985 
10986   ;;
10987 esac
10988 fi
10989 SORT=$ac_cv_path_SORT
10990 if test -n "$SORT"; then
10991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10992 $as_echo "$SORT" >&6; }
10993 else
10994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995 $as_echo "no" >&6; }
10996 fi
10997 
10998 
10999   test -n "$SORT" && break
11000 done
11001 
11002   else
11003     # The variable is set, but is it from the command line or the environment?
11004 
11005     # Try to remove the string !SORT! from our list.
11006     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11007     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11008       # If it failed, the variable was not from the command line. Ignore it,
11009       # but warn the user (except for BASH, which is always set by the calling BASH).
11010       if test "xSORT" != xBASH; then
11011         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11012 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11013       fi
11014       # Try to locate tool using the code snippet
11015       for ac_prog in sort
11016 do
11017   # Extract the first word of "$ac_prog", so it can be a program name with args.
11018 set dummy $ac_prog; ac_word=$2
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11020 $as_echo_n "checking for $ac_word... " >&6; }
11021 if ${ac_cv_path_SORT+:} false; then :
11022   $as_echo_n "(cached) " >&6
11023 else
11024   case $SORT in
11025   [\\/]* | ?:[\\/]*)
11026   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11027   ;;
11028   *)
11029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11030 for as_dir in $PATH
11031 do
11032   IFS=$as_save_IFS
11033   test -z "$as_dir" && as_dir=.
11034     for ac_exec_ext in '' $ac_executable_extensions; do
11035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11036     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11038     break 2
11039   fi
11040 done
11041   done
11042 IFS=$as_save_IFS
11043 
11044   ;;
11045 esac
11046 fi
11047 SORT=$ac_cv_path_SORT
11048 if test -n "$SORT"; then
11049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11050 $as_echo "$SORT" >&6; }
11051 else
11052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11053 $as_echo "no" >&6; }
11054 fi
11055 
11056 
11057   test -n "$SORT" && break
11058 done
11059 
11060     else
11061       # If it succeeded, then it was overridden by the user. We will use it
11062       # for the tool.
11063 
11064       # First remove it from the list of overridden variables, so we can test
11065       # for unknown variables in the end.
11066       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11067 
11068       # Check if we try to supply an empty value
11069       if test "x$SORT" = x; then
11070         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11071 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11072         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11073 $as_echo_n "checking for SORT... " >&6; }
11074         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11075 $as_echo "disabled" >&6; }
11076       else
11077         # Check if the provided tool contains a complete path.
11078         tool_specified="$SORT"
11079         tool_basename="${tool_specified##*/}"
11080         if test "x$tool_basename" = "x$tool_specified"; then
11081           # A command without a complete path is provided, search $PATH.
11082           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11083 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11084           # Extract the first word of "$tool_basename", so it can be a program name with args.
11085 set dummy $tool_basename; ac_word=$2
11086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11087 $as_echo_n "checking for $ac_word... " >&6; }
11088 if ${ac_cv_path_SORT+:} false; then :
11089   $as_echo_n "(cached) " >&6
11090 else
11091   case $SORT in
11092   [\\/]* | ?:[\\/]*)
11093   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11094   ;;
11095   *)
11096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11097 for as_dir in $PATH
11098 do
11099   IFS=$as_save_IFS
11100   test -z "$as_dir" && as_dir=.
11101     for ac_exec_ext in '' $ac_executable_extensions; do
11102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11103     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11105     break 2
11106   fi
11107 done
11108   done
11109 IFS=$as_save_IFS
11110 
11111   ;;
11112 esac
11113 fi
11114 SORT=$ac_cv_path_SORT
11115 if test -n "$SORT"; then
11116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11117 $as_echo "$SORT" >&6; }
11118 else
11119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11120 $as_echo "no" >&6; }
11121 fi
11122 
11123 
11124           if test "x$SORT" = x; then
11125             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11126           fi
11127         else
11128           # Otherwise we believe it is a complete path. Use it as it is.
11129           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11130 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11131           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11132 $as_echo_n "checking for SORT... " >&6; }
11133           if test ! -x "$tool_specified"; then
11134             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11135 $as_echo "not found" >&6; }
11136             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11137           fi
11138           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11139 $as_echo "$tool_specified" >&6; }
11140         fi
11141       fi
11142     fi
11143 
11144   fi
11145 
11146 
11147 
11148   if test "x$SORT" = x; then
11149     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11150   fi
11151 
11152 
11153 
11154 
11155 
11156   # Publish this variable in the help.
11157 
11158 
11159   if [ -z "${TAIL+x}" ]; then
11160     # The variable is not set by user, try to locate tool using the code snippet
11161     for ac_prog in tail
11162 do
11163   # Extract the first word of "$ac_prog", so it can be a program name with args.
11164 set dummy $ac_prog; ac_word=$2
11165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11166 $as_echo_n "checking for $ac_word... " >&6; }
11167 if ${ac_cv_path_TAIL+:} false; then :
11168   $as_echo_n "(cached) " >&6
11169 else
11170   case $TAIL in
11171   [\\/]* | ?:[\\/]*)
11172   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11173   ;;
11174   *)
11175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11176 for as_dir in $PATH
11177 do
11178   IFS=$as_save_IFS
11179   test -z "$as_dir" && as_dir=.
11180     for ac_exec_ext in '' $ac_executable_extensions; do
11181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11182     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11184     break 2
11185   fi
11186 done
11187   done
11188 IFS=$as_save_IFS
11189 
11190   ;;
11191 esac
11192 fi
11193 TAIL=$ac_cv_path_TAIL
11194 if test -n "$TAIL"; then
11195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11196 $as_echo "$TAIL" >&6; }
11197 else
11198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11199 $as_echo "no" >&6; }
11200 fi
11201 
11202 
11203   test -n "$TAIL" && break
11204 done
11205 
11206   else
11207     # The variable is set, but is it from the command line or the environment?
11208 
11209     # Try to remove the string !TAIL! from our list.
11210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11212       # If it failed, the variable was not from the command line. Ignore it,
11213       # but warn the user (except for BASH, which is always set by the calling BASH).
11214       if test "xTAIL" != xBASH; then
11215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11216 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11217       fi
11218       # Try to locate tool using the code snippet
11219       for ac_prog in tail
11220 do
11221   # Extract the first word of "$ac_prog", so it can be a program name with args.
11222 set dummy $ac_prog; ac_word=$2
11223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11224 $as_echo_n "checking for $ac_word... " >&6; }
11225 if ${ac_cv_path_TAIL+:} false; then :
11226   $as_echo_n "(cached) " >&6
11227 else
11228   case $TAIL in
11229   [\\/]* | ?:[\\/]*)
11230   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11231   ;;
11232   *)
11233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11234 for as_dir in $PATH
11235 do
11236   IFS=$as_save_IFS
11237   test -z "$as_dir" && as_dir=.
11238     for ac_exec_ext in '' $ac_executable_extensions; do
11239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11240     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11242     break 2
11243   fi
11244 done
11245   done
11246 IFS=$as_save_IFS
11247 
11248   ;;
11249 esac
11250 fi
11251 TAIL=$ac_cv_path_TAIL
11252 if test -n "$TAIL"; then
11253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11254 $as_echo "$TAIL" >&6; }
11255 else
11256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11257 $as_echo "no" >&6; }
11258 fi
11259 
11260 
11261   test -n "$TAIL" && break
11262 done
11263 
11264     else
11265       # If it succeeded, then it was overridden by the user. We will use it
11266       # for the tool.
11267 
11268       # First remove it from the list of overridden variables, so we can test
11269       # for unknown variables in the end.
11270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11271 
11272       # Check if we try to supply an empty value
11273       if test "x$TAIL" = x; then
11274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11275 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11277 $as_echo_n "checking for TAIL... " >&6; }
11278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11279 $as_echo "disabled" >&6; }
11280       else
11281         # Check if the provided tool contains a complete path.
11282         tool_specified="$TAIL"
11283         tool_basename="${tool_specified##*/}"
11284         if test "x$tool_basename" = "x$tool_specified"; then
11285           # A command without a complete path is provided, search $PATH.
11286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11287 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11288           # Extract the first word of "$tool_basename", so it can be a program name with args.
11289 set dummy $tool_basename; ac_word=$2
11290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11291 $as_echo_n "checking for $ac_word... " >&6; }
11292 if ${ac_cv_path_TAIL+:} false; then :
11293   $as_echo_n "(cached) " >&6
11294 else
11295   case $TAIL in
11296   [\\/]* | ?:[\\/]*)
11297   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11298   ;;
11299   *)
11300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11301 for as_dir in $PATH
11302 do
11303   IFS=$as_save_IFS
11304   test -z "$as_dir" && as_dir=.
11305     for ac_exec_ext in '' $ac_executable_extensions; do
11306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11307     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11309     break 2
11310   fi
11311 done
11312   done
11313 IFS=$as_save_IFS
11314 
11315   ;;
11316 esac
11317 fi
11318 TAIL=$ac_cv_path_TAIL
11319 if test -n "$TAIL"; then
11320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11321 $as_echo "$TAIL" >&6; }
11322 else
11323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11324 $as_echo "no" >&6; }
11325 fi
11326 
11327 
11328           if test "x$TAIL" = x; then
11329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11330           fi
11331         else
11332           # Otherwise we believe it is a complete path. Use it as it is.
11333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11334 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11336 $as_echo_n "checking for TAIL... " >&6; }
11337           if test ! -x "$tool_specified"; then
11338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11339 $as_echo "not found" >&6; }
11340             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11341           fi
11342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11343 $as_echo "$tool_specified" >&6; }
11344         fi
11345       fi
11346     fi
11347 
11348   fi
11349 
11350 
11351 
11352   if test "x$TAIL" = x; then
11353     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11354   fi
11355 
11356 
11357 
11358 
11359 
11360   # Publish this variable in the help.
11361 
11362 
11363   if [ -z "${TAR+x}" ]; then
11364     # The variable is not set by user, try to locate tool using the code snippet
11365     for ac_prog in gtar tar
11366 do
11367   # Extract the first word of "$ac_prog", so it can be a program name with args.
11368 set dummy $ac_prog; ac_word=$2
11369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11370 $as_echo_n "checking for $ac_word... " >&6; }
11371 if ${ac_cv_path_TAR+:} false; then :
11372   $as_echo_n "(cached) " >&6
11373 else
11374   case $TAR in
11375   [\\/]* | ?:[\\/]*)
11376   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11377   ;;
11378   *)
11379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11380 for as_dir in $PATH
11381 do
11382   IFS=$as_save_IFS
11383   test -z "$as_dir" && as_dir=.
11384     for ac_exec_ext in '' $ac_executable_extensions; do
11385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11386     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11388     break 2
11389   fi
11390 done
11391   done
11392 IFS=$as_save_IFS
11393 
11394   ;;
11395 esac
11396 fi
11397 TAR=$ac_cv_path_TAR
11398 if test -n "$TAR"; then
11399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11400 $as_echo "$TAR" >&6; }
11401 else
11402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11403 $as_echo "no" >&6; }
11404 fi
11405 
11406 
11407   test -n "$TAR" && break
11408 done
11409 
11410   else
11411     # The variable is set, but is it from the command line or the environment?
11412 
11413     # Try to remove the string !TAR! from our list.
11414     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11415     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11416       # If it failed, the variable was not from the command line. Ignore it,
11417       # but warn the user (except for BASH, which is always set by the calling BASH).
11418       if test "xTAR" != xBASH; then
11419         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11420 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11421       fi
11422       # Try to locate tool using the code snippet
11423       for ac_prog in gtar tar
11424 do
11425   # Extract the first word of "$ac_prog", so it can be a program name with args.
11426 set dummy $ac_prog; ac_word=$2
11427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11428 $as_echo_n "checking for $ac_word... " >&6; }
11429 if ${ac_cv_path_TAR+:} false; then :
11430   $as_echo_n "(cached) " >&6
11431 else
11432   case $TAR in
11433   [\\/]* | ?:[\\/]*)
11434   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11435   ;;
11436   *)
11437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11438 for as_dir in $PATH
11439 do
11440   IFS=$as_save_IFS
11441   test -z "$as_dir" && as_dir=.
11442     for ac_exec_ext in '' $ac_executable_extensions; do
11443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11444     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11446     break 2
11447   fi
11448 done
11449   done
11450 IFS=$as_save_IFS
11451 
11452   ;;
11453 esac
11454 fi
11455 TAR=$ac_cv_path_TAR
11456 if test -n "$TAR"; then
11457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11458 $as_echo "$TAR" >&6; }
11459 else
11460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11461 $as_echo "no" >&6; }
11462 fi
11463 
11464 
11465   test -n "$TAR" && break
11466 done
11467 
11468     else
11469       # If it succeeded, then it was overridden by the user. We will use it
11470       # for the tool.
11471 
11472       # First remove it from the list of overridden variables, so we can test
11473       # for unknown variables in the end.
11474       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11475 
11476       # Check if we try to supply an empty value
11477       if test "x$TAR" = x; then
11478         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11479 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11480         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11481 $as_echo_n "checking for TAR... " >&6; }
11482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11483 $as_echo "disabled" >&6; }
11484       else
11485         # Check if the provided tool contains a complete path.
11486         tool_specified="$TAR"
11487         tool_basename="${tool_specified##*/}"
11488         if test "x$tool_basename" = "x$tool_specified"; then
11489           # A command without a complete path is provided, search $PATH.
11490           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11491 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11492           # Extract the first word of "$tool_basename", so it can be a program name with args.
11493 set dummy $tool_basename; ac_word=$2
11494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11495 $as_echo_n "checking for $ac_word... " >&6; }
11496 if ${ac_cv_path_TAR+:} false; then :
11497   $as_echo_n "(cached) " >&6
11498 else
11499   case $TAR in
11500   [\\/]* | ?:[\\/]*)
11501   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11502   ;;
11503   *)
11504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11505 for as_dir in $PATH
11506 do
11507   IFS=$as_save_IFS
11508   test -z "$as_dir" && as_dir=.
11509     for ac_exec_ext in '' $ac_executable_extensions; do
11510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11511     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11513     break 2
11514   fi
11515 done
11516   done
11517 IFS=$as_save_IFS
11518 
11519   ;;
11520 esac
11521 fi
11522 TAR=$ac_cv_path_TAR
11523 if test -n "$TAR"; then
11524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11525 $as_echo "$TAR" >&6; }
11526 else
11527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528 $as_echo "no" >&6; }
11529 fi
11530 
11531 
11532           if test "x$TAR" = x; then
11533             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11534           fi
11535         else
11536           # Otherwise we believe it is a complete path. Use it as it is.
11537           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11538 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11539           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11540 $as_echo_n "checking for TAR... " >&6; }
11541           if test ! -x "$tool_specified"; then
11542             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11543 $as_echo "not found" >&6; }
11544             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11545           fi
11546           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11547 $as_echo "$tool_specified" >&6; }
11548         fi
11549       fi
11550     fi
11551 
11552   fi
11553 
11554 
11555 
11556   if test "x$TAR" = x; then
11557     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11558   fi
11559 
11560 
11561 
11562 
11563 
11564   # Publish this variable in the help.
11565 
11566 
11567   if [ -z "${TEE+x}" ]; then
11568     # The variable is not set by user, try to locate tool using the code snippet
11569     for ac_prog in tee
11570 do
11571   # Extract the first word of "$ac_prog", so it can be a program name with args.
11572 set dummy $ac_prog; ac_word=$2
11573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11574 $as_echo_n "checking for $ac_word... " >&6; }
11575 if ${ac_cv_path_TEE+:} false; then :
11576   $as_echo_n "(cached) " >&6
11577 else
11578   case $TEE in
11579   [\\/]* | ?:[\\/]*)
11580   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11581   ;;
11582   *)
11583   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11584 for as_dir in $PATH
11585 do
11586   IFS=$as_save_IFS
11587   test -z "$as_dir" && as_dir=.
11588     for ac_exec_ext in '' $ac_executable_extensions; do
11589   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11590     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11592     break 2
11593   fi
11594 done
11595   done
11596 IFS=$as_save_IFS
11597 
11598   ;;
11599 esac
11600 fi
11601 TEE=$ac_cv_path_TEE
11602 if test -n "$TEE"; then
11603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11604 $as_echo "$TEE" >&6; }
11605 else
11606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11607 $as_echo "no" >&6; }
11608 fi
11609 
11610 
11611   test -n "$TEE" && break
11612 done
11613 
11614   else
11615     # The variable is set, but is it from the command line or the environment?
11616 
11617     # Try to remove the string !TEE! from our list.
11618     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11619     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11620       # If it failed, the variable was not from the command line. Ignore it,
11621       # but warn the user (except for BASH, which is always set by the calling BASH).
11622       if test "xTEE" != xBASH; then
11623         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11624 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11625       fi
11626       # Try to locate tool using the code snippet
11627       for ac_prog in tee
11628 do
11629   # Extract the first word of "$ac_prog", so it can be a program name with args.
11630 set dummy $ac_prog; ac_word=$2
11631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11632 $as_echo_n "checking for $ac_word... " >&6; }
11633 if ${ac_cv_path_TEE+:} false; then :
11634   $as_echo_n "(cached) " >&6
11635 else
11636   case $TEE in
11637   [\\/]* | ?:[\\/]*)
11638   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11639   ;;
11640   *)
11641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11642 for as_dir in $PATH
11643 do
11644   IFS=$as_save_IFS
11645   test -z "$as_dir" && as_dir=.
11646     for ac_exec_ext in '' $ac_executable_extensions; do
11647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11648     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11650     break 2
11651   fi
11652 done
11653   done
11654 IFS=$as_save_IFS
11655 
11656   ;;
11657 esac
11658 fi
11659 TEE=$ac_cv_path_TEE
11660 if test -n "$TEE"; then
11661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11662 $as_echo "$TEE" >&6; }
11663 else
11664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11665 $as_echo "no" >&6; }
11666 fi
11667 
11668 
11669   test -n "$TEE" && break
11670 done
11671 
11672     else
11673       # If it succeeded, then it was overridden by the user. We will use it
11674       # for the tool.
11675 
11676       # First remove it from the list of overridden variables, so we can test
11677       # for unknown variables in the end.
11678       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11679 
11680       # Check if we try to supply an empty value
11681       if test "x$TEE" = x; then
11682         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11683 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11684         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11685 $as_echo_n "checking for TEE... " >&6; }
11686         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11687 $as_echo "disabled" >&6; }
11688       else
11689         # Check if the provided tool contains a complete path.
11690         tool_specified="$TEE"
11691         tool_basename="${tool_specified##*/}"
11692         if test "x$tool_basename" = "x$tool_specified"; then
11693           # A command without a complete path is provided, search $PATH.
11694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11695 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11696           # Extract the first word of "$tool_basename", so it can be a program name with args.
11697 set dummy $tool_basename; ac_word=$2
11698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11699 $as_echo_n "checking for $ac_word... " >&6; }
11700 if ${ac_cv_path_TEE+:} false; then :
11701   $as_echo_n "(cached) " >&6
11702 else
11703   case $TEE in
11704   [\\/]* | ?:[\\/]*)
11705   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11706   ;;
11707   *)
11708   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11709 for as_dir in $PATH
11710 do
11711   IFS=$as_save_IFS
11712   test -z "$as_dir" && as_dir=.
11713     for ac_exec_ext in '' $ac_executable_extensions; do
11714   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11715     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11716     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11717     break 2
11718   fi
11719 done
11720   done
11721 IFS=$as_save_IFS
11722 
11723   ;;
11724 esac
11725 fi
11726 TEE=$ac_cv_path_TEE
11727 if test -n "$TEE"; then
11728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11729 $as_echo "$TEE" >&6; }
11730 else
11731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11732 $as_echo "no" >&6; }
11733 fi
11734 
11735 
11736           if test "x$TEE" = x; then
11737             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11738           fi
11739         else
11740           # Otherwise we believe it is a complete path. Use it as it is.
11741           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11742 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11743           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11744 $as_echo_n "checking for TEE... " >&6; }
11745           if test ! -x "$tool_specified"; then
11746             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11747 $as_echo "not found" >&6; }
11748             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11749           fi
11750           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11751 $as_echo "$tool_specified" >&6; }
11752         fi
11753       fi
11754     fi
11755 
11756   fi
11757 
11758 
11759 
11760   if test "x$TEE" = x; then
11761     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11762   fi
11763 
11764 
11765 
11766 
11767 
11768   # Publish this variable in the help.
11769 
11770 
11771   if [ -z "${TOUCH+x}" ]; then
11772     # The variable is not set by user, try to locate tool using the code snippet
11773     for ac_prog in touch
11774 do
11775   # Extract the first word of "$ac_prog", so it can be a program name with args.
11776 set dummy $ac_prog; ac_word=$2
11777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11778 $as_echo_n "checking for $ac_word... " >&6; }
11779 if ${ac_cv_path_TOUCH+:} false; then :
11780   $as_echo_n "(cached) " >&6
11781 else
11782   case $TOUCH in
11783   [\\/]* | ?:[\\/]*)
11784   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11785   ;;
11786   *)
11787   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11788 for as_dir in $PATH
11789 do
11790   IFS=$as_save_IFS
11791   test -z "$as_dir" && as_dir=.
11792     for ac_exec_ext in '' $ac_executable_extensions; do
11793   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11794     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11795     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11796     break 2
11797   fi
11798 done
11799   done
11800 IFS=$as_save_IFS
11801 
11802   ;;
11803 esac
11804 fi
11805 TOUCH=$ac_cv_path_TOUCH
11806 if test -n "$TOUCH"; then
11807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11808 $as_echo "$TOUCH" >&6; }
11809 else
11810   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11811 $as_echo "no" >&6; }
11812 fi
11813 
11814 
11815   test -n "$TOUCH" && break
11816 done
11817 
11818   else
11819     # The variable is set, but is it from the command line or the environment?
11820 
11821     # Try to remove the string !TOUCH! from our list.
11822     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11823     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11824       # If it failed, the variable was not from the command line. Ignore it,
11825       # but warn the user (except for BASH, which is always set by the calling BASH).
11826       if test "xTOUCH" != xBASH; then
11827         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11828 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11829       fi
11830       # Try to locate tool using the code snippet
11831       for ac_prog in touch
11832 do
11833   # Extract the first word of "$ac_prog", so it can be a program name with args.
11834 set dummy $ac_prog; ac_word=$2
11835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11836 $as_echo_n "checking for $ac_word... " >&6; }
11837 if ${ac_cv_path_TOUCH+:} false; then :
11838   $as_echo_n "(cached) " >&6
11839 else
11840   case $TOUCH in
11841   [\\/]* | ?:[\\/]*)
11842   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11843   ;;
11844   *)
11845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11846 for as_dir in $PATH
11847 do
11848   IFS=$as_save_IFS
11849   test -z "$as_dir" && as_dir=.
11850     for ac_exec_ext in '' $ac_executable_extensions; do
11851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11852     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11854     break 2
11855   fi
11856 done
11857   done
11858 IFS=$as_save_IFS
11859 
11860   ;;
11861 esac
11862 fi
11863 TOUCH=$ac_cv_path_TOUCH
11864 if test -n "$TOUCH"; then
11865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11866 $as_echo "$TOUCH" >&6; }
11867 else
11868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11869 $as_echo "no" >&6; }
11870 fi
11871 
11872 
11873   test -n "$TOUCH" && break
11874 done
11875 
11876     else
11877       # If it succeeded, then it was overridden by the user. We will use it
11878       # for the tool.
11879 
11880       # First remove it from the list of overridden variables, so we can test
11881       # for unknown variables in the end.
11882       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11883 
11884       # Check if we try to supply an empty value
11885       if test "x$TOUCH" = x; then
11886         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11887 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11888         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11889 $as_echo_n "checking for TOUCH... " >&6; }
11890         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11891 $as_echo "disabled" >&6; }
11892       else
11893         # Check if the provided tool contains a complete path.
11894         tool_specified="$TOUCH"
11895         tool_basename="${tool_specified##*/}"
11896         if test "x$tool_basename" = "x$tool_specified"; then
11897           # A command without a complete path is provided, search $PATH.
11898           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11899 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11900           # Extract the first word of "$tool_basename", so it can be a program name with args.
11901 set dummy $tool_basename; ac_word=$2
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11903 $as_echo_n "checking for $ac_word... " >&6; }
11904 if ${ac_cv_path_TOUCH+:} false; then :
11905   $as_echo_n "(cached) " >&6
11906 else
11907   case $TOUCH in
11908   [\\/]* | ?:[\\/]*)
11909   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11910   ;;
11911   *)
11912   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11913 for as_dir in $PATH
11914 do
11915   IFS=$as_save_IFS
11916   test -z "$as_dir" && as_dir=.
11917     for ac_exec_ext in '' $ac_executable_extensions; do
11918   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11919     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11920     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11921     break 2
11922   fi
11923 done
11924   done
11925 IFS=$as_save_IFS
11926 
11927   ;;
11928 esac
11929 fi
11930 TOUCH=$ac_cv_path_TOUCH
11931 if test -n "$TOUCH"; then
11932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11933 $as_echo "$TOUCH" >&6; }
11934 else
11935   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11936 $as_echo "no" >&6; }
11937 fi
11938 
11939 
11940           if test "x$TOUCH" = x; then
11941             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11942           fi
11943         else
11944           # Otherwise we believe it is a complete path. Use it as it is.
11945           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11946 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11947           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11948 $as_echo_n "checking for TOUCH... " >&6; }
11949           if test ! -x "$tool_specified"; then
11950             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11951 $as_echo "not found" >&6; }
11952             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11953           fi
11954           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11955 $as_echo "$tool_specified" >&6; }
11956         fi
11957       fi
11958     fi
11959 
11960   fi
11961 
11962 
11963 
11964   if test "x$TOUCH" = x; then
11965     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11966   fi
11967 
11968 
11969 
11970 
11971 
11972   # Publish this variable in the help.
11973 
11974 
11975   if [ -z "${TR+x}" ]; then
11976     # The variable is not set by user, try to locate tool using the code snippet
11977     for ac_prog in tr
11978 do
11979   # Extract the first word of "$ac_prog", so it can be a program name with args.
11980 set dummy $ac_prog; ac_word=$2
11981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11982 $as_echo_n "checking for $ac_word... " >&6; }
11983 if ${ac_cv_path_TR+:} false; then :
11984   $as_echo_n "(cached) " >&6
11985 else
11986   case $TR in
11987   [\\/]* | ?:[\\/]*)
11988   ac_cv_path_TR="$TR" # Let the user override the test with a path.
11989   ;;
11990   *)
11991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11992 for as_dir in $PATH
11993 do
11994   IFS=$as_save_IFS
11995   test -z "$as_dir" && as_dir=.
11996     for ac_exec_ext in '' $ac_executable_extensions; do
11997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11998     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12000     break 2
12001   fi
12002 done
12003   done
12004 IFS=$as_save_IFS
12005 
12006   ;;
12007 esac
12008 fi
12009 TR=$ac_cv_path_TR
12010 if test -n "$TR"; then
12011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12012 $as_echo "$TR" >&6; }
12013 else
12014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12015 $as_echo "no" >&6; }
12016 fi
12017 
12018 
12019   test -n "$TR" && break
12020 done
12021 
12022   else
12023     # The variable is set, but is it from the command line or the environment?
12024 
12025     # Try to remove the string !TR! from our list.
12026     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12027     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12028       # If it failed, the variable was not from the command line. Ignore it,
12029       # but warn the user (except for BASH, which is always set by the calling BASH).
12030       if test "xTR" != xBASH; then
12031         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12032 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12033       fi
12034       # Try to locate tool using the code snippet
12035       for ac_prog in tr
12036 do
12037   # Extract the first word of "$ac_prog", so it can be a program name with args.
12038 set dummy $ac_prog; ac_word=$2
12039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12040 $as_echo_n "checking for $ac_word... " >&6; }
12041 if ${ac_cv_path_TR+:} false; then :
12042   $as_echo_n "(cached) " >&6
12043 else
12044   case $TR in
12045   [\\/]* | ?:[\\/]*)
12046   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12047   ;;
12048   *)
12049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12050 for as_dir in $PATH
12051 do
12052   IFS=$as_save_IFS
12053   test -z "$as_dir" && as_dir=.
12054     for ac_exec_ext in '' $ac_executable_extensions; do
12055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12056     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12058     break 2
12059   fi
12060 done
12061   done
12062 IFS=$as_save_IFS
12063 
12064   ;;
12065 esac
12066 fi
12067 TR=$ac_cv_path_TR
12068 if test -n "$TR"; then
12069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12070 $as_echo "$TR" >&6; }
12071 else
12072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12073 $as_echo "no" >&6; }
12074 fi
12075 
12076 
12077   test -n "$TR" && break
12078 done
12079 
12080     else
12081       # If it succeeded, then it was overridden by the user. We will use it
12082       # for the tool.
12083 
12084       # First remove it from the list of overridden variables, so we can test
12085       # for unknown variables in the end.
12086       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12087 
12088       # Check if we try to supply an empty value
12089       if test "x$TR" = x; then
12090         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12091 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12092         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12093 $as_echo_n "checking for TR... " >&6; }
12094         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12095 $as_echo "disabled" >&6; }
12096       else
12097         # Check if the provided tool contains a complete path.
12098         tool_specified="$TR"
12099         tool_basename="${tool_specified##*/}"
12100         if test "x$tool_basename" = "x$tool_specified"; then
12101           # A command without a complete path is provided, search $PATH.
12102           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12103 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12104           # Extract the first word of "$tool_basename", so it can be a program name with args.
12105 set dummy $tool_basename; ac_word=$2
12106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12107 $as_echo_n "checking for $ac_word... " >&6; }
12108 if ${ac_cv_path_TR+:} false; then :
12109   $as_echo_n "(cached) " >&6
12110 else
12111   case $TR in
12112   [\\/]* | ?:[\\/]*)
12113   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12114   ;;
12115   *)
12116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12117 for as_dir in $PATH
12118 do
12119   IFS=$as_save_IFS
12120   test -z "$as_dir" && as_dir=.
12121     for ac_exec_ext in '' $ac_executable_extensions; do
12122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12123     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12125     break 2
12126   fi
12127 done
12128   done
12129 IFS=$as_save_IFS
12130 
12131   ;;
12132 esac
12133 fi
12134 TR=$ac_cv_path_TR
12135 if test -n "$TR"; then
12136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12137 $as_echo "$TR" >&6; }
12138 else
12139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12140 $as_echo "no" >&6; }
12141 fi
12142 
12143 
12144           if test "x$TR" = x; then
12145             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12146           fi
12147         else
12148           # Otherwise we believe it is a complete path. Use it as it is.
12149           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12150 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12151           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12152 $as_echo_n "checking for TR... " >&6; }
12153           if test ! -x "$tool_specified"; then
12154             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12155 $as_echo "not found" >&6; }
12156             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12157           fi
12158           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12159 $as_echo "$tool_specified" >&6; }
12160         fi
12161       fi
12162     fi
12163 
12164   fi
12165 
12166 
12167 
12168   if test "x$TR" = x; then
12169     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12170   fi
12171 
12172 
12173 
12174 
12175 
12176   # Publish this variable in the help.
12177 
12178 
12179   if [ -z "${UNAME+x}" ]; then
12180     # The variable is not set by user, try to locate tool using the code snippet
12181     for ac_prog in uname
12182 do
12183   # Extract the first word of "$ac_prog", so it can be a program name with args.
12184 set dummy $ac_prog; ac_word=$2
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12186 $as_echo_n "checking for $ac_word... " >&6; }
12187 if ${ac_cv_path_UNAME+:} false; then :
12188   $as_echo_n "(cached) " >&6
12189 else
12190   case $UNAME in
12191   [\\/]* | ?:[\\/]*)
12192   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12193   ;;
12194   *)
12195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12196 for as_dir in $PATH
12197 do
12198   IFS=$as_save_IFS
12199   test -z "$as_dir" && as_dir=.
12200     for ac_exec_ext in '' $ac_executable_extensions; do
12201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12202     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12204     break 2
12205   fi
12206 done
12207   done
12208 IFS=$as_save_IFS
12209 
12210   ;;
12211 esac
12212 fi
12213 UNAME=$ac_cv_path_UNAME
12214 if test -n "$UNAME"; then
12215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12216 $as_echo "$UNAME" >&6; }
12217 else
12218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12219 $as_echo "no" >&6; }
12220 fi
12221 
12222 
12223   test -n "$UNAME" && break
12224 done
12225 
12226   else
12227     # The variable is set, but is it from the command line or the environment?
12228 
12229     # Try to remove the string !UNAME! from our list.
12230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12232       # If it failed, the variable was not from the command line. Ignore it,
12233       # but warn the user (except for BASH, which is always set by the calling BASH).
12234       if test "xUNAME" != xBASH; then
12235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12236 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12237       fi
12238       # Try to locate tool using the code snippet
12239       for ac_prog in uname
12240 do
12241   # Extract the first word of "$ac_prog", so it can be a program name with args.
12242 set dummy $ac_prog; ac_word=$2
12243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12244 $as_echo_n "checking for $ac_word... " >&6; }
12245 if ${ac_cv_path_UNAME+:} false; then :
12246   $as_echo_n "(cached) " >&6
12247 else
12248   case $UNAME in
12249   [\\/]* | ?:[\\/]*)
12250   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12251   ;;
12252   *)
12253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12254 for as_dir in $PATH
12255 do
12256   IFS=$as_save_IFS
12257   test -z "$as_dir" && as_dir=.
12258     for ac_exec_ext in '' $ac_executable_extensions; do
12259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12260     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12262     break 2
12263   fi
12264 done
12265   done
12266 IFS=$as_save_IFS
12267 
12268   ;;
12269 esac
12270 fi
12271 UNAME=$ac_cv_path_UNAME
12272 if test -n "$UNAME"; then
12273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12274 $as_echo "$UNAME" >&6; }
12275 else
12276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12277 $as_echo "no" >&6; }
12278 fi
12279 
12280 
12281   test -n "$UNAME" && break
12282 done
12283 
12284     else
12285       # If it succeeded, then it was overridden by the user. We will use it
12286       # for the tool.
12287 
12288       # First remove it from the list of overridden variables, so we can test
12289       # for unknown variables in the end.
12290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12291 
12292       # Check if we try to supply an empty value
12293       if test "x$UNAME" = x; then
12294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12295 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12297 $as_echo_n "checking for UNAME... " >&6; }
12298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12299 $as_echo "disabled" >&6; }
12300       else
12301         # Check if the provided tool contains a complete path.
12302         tool_specified="$UNAME"
12303         tool_basename="${tool_specified##*/}"
12304         if test "x$tool_basename" = "x$tool_specified"; then
12305           # A command without a complete path is provided, search $PATH.
12306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12307 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12308           # Extract the first word of "$tool_basename", so it can be a program name with args.
12309 set dummy $tool_basename; ac_word=$2
12310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12311 $as_echo_n "checking for $ac_word... " >&6; }
12312 if ${ac_cv_path_UNAME+:} false; then :
12313   $as_echo_n "(cached) " >&6
12314 else
12315   case $UNAME in
12316   [\\/]* | ?:[\\/]*)
12317   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12318   ;;
12319   *)
12320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12321 for as_dir in $PATH
12322 do
12323   IFS=$as_save_IFS
12324   test -z "$as_dir" && as_dir=.
12325     for ac_exec_ext in '' $ac_executable_extensions; do
12326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12327     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12329     break 2
12330   fi
12331 done
12332   done
12333 IFS=$as_save_IFS
12334 
12335   ;;
12336 esac
12337 fi
12338 UNAME=$ac_cv_path_UNAME
12339 if test -n "$UNAME"; then
12340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12341 $as_echo "$UNAME" >&6; }
12342 else
12343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344 $as_echo "no" >&6; }
12345 fi
12346 
12347 
12348           if test "x$UNAME" = x; then
12349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12350           fi
12351         else
12352           # Otherwise we believe it is a complete path. Use it as it is.
12353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12354 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12356 $as_echo_n "checking for UNAME... " >&6; }
12357           if test ! -x "$tool_specified"; then
12358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12359 $as_echo "not found" >&6; }
12360             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12361           fi
12362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12363 $as_echo "$tool_specified" >&6; }
12364         fi
12365       fi
12366     fi
12367 
12368   fi
12369 
12370 
12371 
12372   if test "x$UNAME" = x; then
12373     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12374   fi
12375 
12376 
12377 
12378 
12379 
12380   # Publish this variable in the help.
12381 
12382 
12383   if [ -z "${UNIQ+x}" ]; then
12384     # The variable is not set by user, try to locate tool using the code snippet
12385     for ac_prog in uniq
12386 do
12387   # Extract the first word of "$ac_prog", so it can be a program name with args.
12388 set dummy $ac_prog; ac_word=$2
12389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12390 $as_echo_n "checking for $ac_word... " >&6; }
12391 if ${ac_cv_path_UNIQ+:} false; then :
12392   $as_echo_n "(cached) " >&6
12393 else
12394   case $UNIQ in
12395   [\\/]* | ?:[\\/]*)
12396   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12397   ;;
12398   *)
12399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12400 for as_dir in $PATH
12401 do
12402   IFS=$as_save_IFS
12403   test -z "$as_dir" && as_dir=.
12404     for ac_exec_ext in '' $ac_executable_extensions; do
12405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12406     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12408     break 2
12409   fi
12410 done
12411   done
12412 IFS=$as_save_IFS
12413 
12414   ;;
12415 esac
12416 fi
12417 UNIQ=$ac_cv_path_UNIQ
12418 if test -n "$UNIQ"; then
12419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12420 $as_echo "$UNIQ" >&6; }
12421 else
12422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12423 $as_echo "no" >&6; }
12424 fi
12425 
12426 
12427   test -n "$UNIQ" && break
12428 done
12429 
12430   else
12431     # The variable is set, but is it from the command line or the environment?
12432 
12433     # Try to remove the string !UNIQ! from our list.
12434     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12435     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12436       # If it failed, the variable was not from the command line. Ignore it,
12437       # but warn the user (except for BASH, which is always set by the calling BASH).
12438       if test "xUNIQ" != xBASH; then
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12440 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12441       fi
12442       # Try to locate tool using the code snippet
12443       for ac_prog in uniq
12444 do
12445   # Extract the first word of "$ac_prog", so it can be a program name with args.
12446 set dummy $ac_prog; ac_word=$2
12447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12448 $as_echo_n "checking for $ac_word... " >&6; }
12449 if ${ac_cv_path_UNIQ+:} false; then :
12450   $as_echo_n "(cached) " >&6
12451 else
12452   case $UNIQ in
12453   [\\/]* | ?:[\\/]*)
12454   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12455   ;;
12456   *)
12457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12458 for as_dir in $PATH
12459 do
12460   IFS=$as_save_IFS
12461   test -z "$as_dir" && as_dir=.
12462     for ac_exec_ext in '' $ac_executable_extensions; do
12463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12464     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12466     break 2
12467   fi
12468 done
12469   done
12470 IFS=$as_save_IFS
12471 
12472   ;;
12473 esac
12474 fi
12475 UNIQ=$ac_cv_path_UNIQ
12476 if test -n "$UNIQ"; then
12477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12478 $as_echo "$UNIQ" >&6; }
12479 else
12480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12481 $as_echo "no" >&6; }
12482 fi
12483 
12484 
12485   test -n "$UNIQ" && break
12486 done
12487 
12488     else
12489       # If it succeeded, then it was overridden by the user. We will use it
12490       # for the tool.
12491 
12492       # First remove it from the list of overridden variables, so we can test
12493       # for unknown variables in the end.
12494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12495 
12496       # Check if we try to supply an empty value
12497       if test "x$UNIQ" = x; then
12498         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12499 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12501 $as_echo_n "checking for UNIQ... " >&6; }
12502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12503 $as_echo "disabled" >&6; }
12504       else
12505         # Check if the provided tool contains a complete path.
12506         tool_specified="$UNIQ"
12507         tool_basename="${tool_specified##*/}"
12508         if test "x$tool_basename" = "x$tool_specified"; then
12509           # A command without a complete path is provided, search $PATH.
12510           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12511 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12512           # Extract the first word of "$tool_basename", so it can be a program name with args.
12513 set dummy $tool_basename; ac_word=$2
12514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12515 $as_echo_n "checking for $ac_word... " >&6; }
12516 if ${ac_cv_path_UNIQ+:} false; then :
12517   $as_echo_n "(cached) " >&6
12518 else
12519   case $UNIQ in
12520   [\\/]* | ?:[\\/]*)
12521   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12522   ;;
12523   *)
12524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12525 for as_dir in $PATH
12526 do
12527   IFS=$as_save_IFS
12528   test -z "$as_dir" && as_dir=.
12529     for ac_exec_ext in '' $ac_executable_extensions; do
12530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12531     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12533     break 2
12534   fi
12535 done
12536   done
12537 IFS=$as_save_IFS
12538 
12539   ;;
12540 esac
12541 fi
12542 UNIQ=$ac_cv_path_UNIQ
12543 if test -n "$UNIQ"; then
12544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12545 $as_echo "$UNIQ" >&6; }
12546 else
12547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548 $as_echo "no" >&6; }
12549 fi
12550 
12551 
12552           if test "x$UNIQ" = x; then
12553             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12554           fi
12555         else
12556           # Otherwise we believe it is a complete path. Use it as it is.
12557           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12558 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12559           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12560 $as_echo_n "checking for UNIQ... " >&6; }
12561           if test ! -x "$tool_specified"; then
12562             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12563 $as_echo "not found" >&6; }
12564             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12565           fi
12566           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12567 $as_echo "$tool_specified" >&6; }
12568         fi
12569       fi
12570     fi
12571 
12572   fi
12573 
12574 
12575 
12576   if test "x$UNIQ" = x; then
12577     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12578   fi
12579 
12580 
12581 
12582 
12583 
12584   # Publish this variable in the help.
12585 
12586 
12587   if [ -z "${WC+x}" ]; then
12588     # The variable is not set by user, try to locate tool using the code snippet
12589     for ac_prog in wc
12590 do
12591   # Extract the first word of "$ac_prog", so it can be a program name with args.
12592 set dummy $ac_prog; ac_word=$2
12593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12594 $as_echo_n "checking for $ac_word... " >&6; }
12595 if ${ac_cv_path_WC+:} false; then :
12596   $as_echo_n "(cached) " >&6
12597 else
12598   case $WC in
12599   [\\/]* | ?:[\\/]*)
12600   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12601   ;;
12602   *)
12603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12604 for as_dir in $PATH
12605 do
12606   IFS=$as_save_IFS
12607   test -z "$as_dir" && as_dir=.
12608     for ac_exec_ext in '' $ac_executable_extensions; do
12609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12610     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12612     break 2
12613   fi
12614 done
12615   done
12616 IFS=$as_save_IFS
12617 
12618   ;;
12619 esac
12620 fi
12621 WC=$ac_cv_path_WC
12622 if test -n "$WC"; then
12623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12624 $as_echo "$WC" >&6; }
12625 else
12626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12627 $as_echo "no" >&6; }
12628 fi
12629 
12630 
12631   test -n "$WC" && break
12632 done
12633 
12634   else
12635     # The variable is set, but is it from the command line or the environment?
12636 
12637     # Try to remove the string !WC! from our list.
12638     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12639     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12640       # If it failed, the variable was not from the command line. Ignore it,
12641       # but warn the user (except for BASH, which is always set by the calling BASH).
12642       if test "xWC" != xBASH; then
12643         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12644 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12645       fi
12646       # Try to locate tool using the code snippet
12647       for ac_prog in wc
12648 do
12649   # Extract the first word of "$ac_prog", so it can be a program name with args.
12650 set dummy $ac_prog; ac_word=$2
12651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12652 $as_echo_n "checking for $ac_word... " >&6; }
12653 if ${ac_cv_path_WC+:} false; then :
12654   $as_echo_n "(cached) " >&6
12655 else
12656   case $WC in
12657   [\\/]* | ?:[\\/]*)
12658   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12659   ;;
12660   *)
12661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12662 for as_dir in $PATH
12663 do
12664   IFS=$as_save_IFS
12665   test -z "$as_dir" && as_dir=.
12666     for ac_exec_ext in '' $ac_executable_extensions; do
12667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12668     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12670     break 2
12671   fi
12672 done
12673   done
12674 IFS=$as_save_IFS
12675 
12676   ;;
12677 esac
12678 fi
12679 WC=$ac_cv_path_WC
12680 if test -n "$WC"; then
12681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12682 $as_echo "$WC" >&6; }
12683 else
12684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12685 $as_echo "no" >&6; }
12686 fi
12687 
12688 
12689   test -n "$WC" && break
12690 done
12691 
12692     else
12693       # If it succeeded, then it was overridden by the user. We will use it
12694       # for the tool.
12695 
12696       # First remove it from the list of overridden variables, so we can test
12697       # for unknown variables in the end.
12698       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12699 
12700       # Check if we try to supply an empty value
12701       if test "x$WC" = x; then
12702         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12703 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12704         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12705 $as_echo_n "checking for WC... " >&6; }
12706         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12707 $as_echo "disabled" >&6; }
12708       else
12709         # Check if the provided tool contains a complete path.
12710         tool_specified="$WC"
12711         tool_basename="${tool_specified##*/}"
12712         if test "x$tool_basename" = "x$tool_specified"; then
12713           # A command without a complete path is provided, search $PATH.
12714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12715 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12716           # Extract the first word of "$tool_basename", so it can be a program name with args.
12717 set dummy $tool_basename; ac_word=$2
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12719 $as_echo_n "checking for $ac_word... " >&6; }
12720 if ${ac_cv_path_WC+:} false; then :
12721   $as_echo_n "(cached) " >&6
12722 else
12723   case $WC in
12724   [\\/]* | ?:[\\/]*)
12725   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12726   ;;
12727   *)
12728   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12729 for as_dir in $PATH
12730 do
12731   IFS=$as_save_IFS
12732   test -z "$as_dir" && as_dir=.
12733     for ac_exec_ext in '' $ac_executable_extensions; do
12734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12735     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12737     break 2
12738   fi
12739 done
12740   done
12741 IFS=$as_save_IFS
12742 
12743   ;;
12744 esac
12745 fi
12746 WC=$ac_cv_path_WC
12747 if test -n "$WC"; then
12748   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12749 $as_echo "$WC" >&6; }
12750 else
12751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12752 $as_echo "no" >&6; }
12753 fi
12754 
12755 
12756           if test "x$WC" = x; then
12757             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12758           fi
12759         else
12760           # Otherwise we believe it is a complete path. Use it as it is.
12761           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12762 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12763           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12764 $as_echo_n "checking for WC... " >&6; }
12765           if test ! -x "$tool_specified"; then
12766             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12767 $as_echo "not found" >&6; }
12768             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12769           fi
12770           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12771 $as_echo "$tool_specified" >&6; }
12772         fi
12773       fi
12774     fi
12775 
12776   fi
12777 
12778 
12779 
12780   if test "x$WC" = x; then
12781     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12782   fi
12783 
12784 
12785 
12786 
12787 
12788   # Publish this variable in the help.
12789 
12790 
12791   if [ -z "${WHICH+x}" ]; then
12792     # The variable is not set by user, try to locate tool using the code snippet
12793     for ac_prog in which
12794 do
12795   # Extract the first word of "$ac_prog", so it can be a program name with args.
12796 set dummy $ac_prog; ac_word=$2
12797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12798 $as_echo_n "checking for $ac_word... " >&6; }
12799 if ${ac_cv_path_WHICH+:} false; then :
12800   $as_echo_n "(cached) " >&6
12801 else
12802   case $WHICH in
12803   [\\/]* | ?:[\\/]*)
12804   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12805   ;;
12806   *)
12807   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12808 for as_dir in $PATH
12809 do
12810   IFS=$as_save_IFS
12811   test -z "$as_dir" && as_dir=.
12812     for ac_exec_ext in '' $ac_executable_extensions; do
12813   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12814     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12815     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12816     break 2
12817   fi
12818 done
12819   done
12820 IFS=$as_save_IFS
12821 
12822   ;;
12823 esac
12824 fi
12825 WHICH=$ac_cv_path_WHICH
12826 if test -n "$WHICH"; then
12827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12828 $as_echo "$WHICH" >&6; }
12829 else
12830   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12831 $as_echo "no" >&6; }
12832 fi
12833 
12834 
12835   test -n "$WHICH" && break
12836 done
12837 
12838   else
12839     # The variable is set, but is it from the command line or the environment?
12840 
12841     # Try to remove the string !WHICH! from our list.
12842     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12843     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12844       # If it failed, the variable was not from the command line. Ignore it,
12845       # but warn the user (except for BASH, which is always set by the calling BASH).
12846       if test "xWHICH" != xBASH; then
12847         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12848 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12849       fi
12850       # Try to locate tool using the code snippet
12851       for ac_prog in which
12852 do
12853   # Extract the first word of "$ac_prog", so it can be a program name with args.
12854 set dummy $ac_prog; ac_word=$2
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12856 $as_echo_n "checking for $ac_word... " >&6; }
12857 if ${ac_cv_path_WHICH+:} false; then :
12858   $as_echo_n "(cached) " >&6
12859 else
12860   case $WHICH in
12861   [\\/]* | ?:[\\/]*)
12862   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12863   ;;
12864   *)
12865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12866 for as_dir in $PATH
12867 do
12868   IFS=$as_save_IFS
12869   test -z "$as_dir" && as_dir=.
12870     for ac_exec_ext in '' $ac_executable_extensions; do
12871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12872     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12874     break 2
12875   fi
12876 done
12877   done
12878 IFS=$as_save_IFS
12879 
12880   ;;
12881 esac
12882 fi
12883 WHICH=$ac_cv_path_WHICH
12884 if test -n "$WHICH"; then
12885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12886 $as_echo "$WHICH" >&6; }
12887 else
12888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12889 $as_echo "no" >&6; }
12890 fi
12891 
12892 
12893   test -n "$WHICH" && break
12894 done
12895 
12896     else
12897       # If it succeeded, then it was overridden by the user. We will use it
12898       # for the tool.
12899 
12900       # First remove it from the list of overridden variables, so we can test
12901       # for unknown variables in the end.
12902       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12903 
12904       # Check if we try to supply an empty value
12905       if test "x$WHICH" = x; then
12906         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12907 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12908         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12909 $as_echo_n "checking for WHICH... " >&6; }
12910         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12911 $as_echo "disabled" >&6; }
12912       else
12913         # Check if the provided tool contains a complete path.
12914         tool_specified="$WHICH"
12915         tool_basename="${tool_specified##*/}"
12916         if test "x$tool_basename" = "x$tool_specified"; then
12917           # A command without a complete path is provided, search $PATH.
12918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12919 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12920           # Extract the first word of "$tool_basename", so it can be a program name with args.
12921 set dummy $tool_basename; ac_word=$2
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12923 $as_echo_n "checking for $ac_word... " >&6; }
12924 if ${ac_cv_path_WHICH+:} false; then :
12925   $as_echo_n "(cached) " >&6
12926 else
12927   case $WHICH in
12928   [\\/]* | ?:[\\/]*)
12929   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12930   ;;
12931   *)
12932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12933 for as_dir in $PATH
12934 do
12935   IFS=$as_save_IFS
12936   test -z "$as_dir" && as_dir=.
12937     for ac_exec_ext in '' $ac_executable_extensions; do
12938   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12939     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12940     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12941     break 2
12942   fi
12943 done
12944   done
12945 IFS=$as_save_IFS
12946 
12947   ;;
12948 esac
12949 fi
12950 WHICH=$ac_cv_path_WHICH
12951 if test -n "$WHICH"; then
12952   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12953 $as_echo "$WHICH" >&6; }
12954 else
12955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12956 $as_echo "no" >&6; }
12957 fi
12958 
12959 
12960           if test "x$WHICH" = x; then
12961             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12962           fi
12963         else
12964           # Otherwise we believe it is a complete path. Use it as it is.
12965           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12966 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12967           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12968 $as_echo_n "checking for WHICH... " >&6; }
12969           if test ! -x "$tool_specified"; then
12970             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12971 $as_echo "not found" >&6; }
12972             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12973           fi
12974           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12975 $as_echo "$tool_specified" >&6; }
12976         fi
12977       fi
12978     fi
12979 
12980   fi
12981 
12982 
12983 
12984   if test "x$WHICH" = x; then
12985     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12986   fi
12987 
12988 
12989 
12990 
12991 
12992   # Publish this variable in the help.
12993 
12994 
12995   if [ -z "${XARGS+x}" ]; then
12996     # The variable is not set by user, try to locate tool using the code snippet
12997     for ac_prog in xargs
12998 do
12999   # Extract the first word of "$ac_prog", so it can be a program name with args.
13000 set dummy $ac_prog; ac_word=$2
13001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13002 $as_echo_n "checking for $ac_word... " >&6; }
13003 if ${ac_cv_path_XARGS+:} false; then :
13004   $as_echo_n "(cached) " >&6
13005 else
13006   case $XARGS in
13007   [\\/]* | ?:[\\/]*)
13008   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13009   ;;
13010   *)
13011   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13012 for as_dir in $PATH
13013 do
13014   IFS=$as_save_IFS
13015   test -z "$as_dir" && as_dir=.
13016     for ac_exec_ext in '' $ac_executable_extensions; do
13017   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13018     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13019     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13020     break 2
13021   fi
13022 done
13023   done
13024 IFS=$as_save_IFS
13025 
13026   ;;
13027 esac
13028 fi
13029 XARGS=$ac_cv_path_XARGS
13030 if test -n "$XARGS"; then
13031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13032 $as_echo "$XARGS" >&6; }
13033 else
13034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13035 $as_echo "no" >&6; }
13036 fi
13037 
13038 
13039   test -n "$XARGS" && break
13040 done
13041 
13042   else
13043     # The variable is set, but is it from the command line or the environment?
13044 
13045     # Try to remove the string !XARGS! from our list.
13046     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13047     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13048       # If it failed, the variable was not from the command line. Ignore it,
13049       # but warn the user (except for BASH, which is always set by the calling BASH).
13050       if test "xXARGS" != xBASH; then
13051         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13052 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13053       fi
13054       # Try to locate tool using the code snippet
13055       for ac_prog in xargs
13056 do
13057   # Extract the first word of "$ac_prog", so it can be a program name with args.
13058 set dummy $ac_prog; ac_word=$2
13059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13060 $as_echo_n "checking for $ac_word... " >&6; }
13061 if ${ac_cv_path_XARGS+:} false; then :
13062   $as_echo_n "(cached) " >&6
13063 else
13064   case $XARGS in
13065   [\\/]* | ?:[\\/]*)
13066   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13067   ;;
13068   *)
13069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13070 for as_dir in $PATH
13071 do
13072   IFS=$as_save_IFS
13073   test -z "$as_dir" && as_dir=.
13074     for ac_exec_ext in '' $ac_executable_extensions; do
13075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13076     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13078     break 2
13079   fi
13080 done
13081   done
13082 IFS=$as_save_IFS
13083 
13084   ;;
13085 esac
13086 fi
13087 XARGS=$ac_cv_path_XARGS
13088 if test -n "$XARGS"; then
13089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13090 $as_echo "$XARGS" >&6; }
13091 else
13092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13093 $as_echo "no" >&6; }
13094 fi
13095 
13096 
13097   test -n "$XARGS" && break
13098 done
13099 
13100     else
13101       # If it succeeded, then it was overridden by the user. We will use it
13102       # for the tool.
13103 
13104       # First remove it from the list of overridden variables, so we can test
13105       # for unknown variables in the end.
13106       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13107 
13108       # Check if we try to supply an empty value
13109       if test "x$XARGS" = x; then
13110         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13111 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13112         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13113 $as_echo_n "checking for XARGS... " >&6; }
13114         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13115 $as_echo "disabled" >&6; }
13116       else
13117         # Check if the provided tool contains a complete path.
13118         tool_specified="$XARGS"
13119         tool_basename="${tool_specified##*/}"
13120         if test "x$tool_basename" = "x$tool_specified"; then
13121           # A command without a complete path is provided, search $PATH.
13122           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13123 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13124           # Extract the first word of "$tool_basename", so it can be a program name with args.
13125 set dummy $tool_basename; ac_word=$2
13126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13127 $as_echo_n "checking for $ac_word... " >&6; }
13128 if ${ac_cv_path_XARGS+:} false; then :
13129   $as_echo_n "(cached) " >&6
13130 else
13131   case $XARGS in
13132   [\\/]* | ?:[\\/]*)
13133   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13134   ;;
13135   *)
13136   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13137 for as_dir in $PATH
13138 do
13139   IFS=$as_save_IFS
13140   test -z "$as_dir" && as_dir=.
13141     for ac_exec_ext in '' $ac_executable_extensions; do
13142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13143     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13145     break 2
13146   fi
13147 done
13148   done
13149 IFS=$as_save_IFS
13150 
13151   ;;
13152 esac
13153 fi
13154 XARGS=$ac_cv_path_XARGS
13155 if test -n "$XARGS"; then
13156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13157 $as_echo "$XARGS" >&6; }
13158 else
13159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13160 $as_echo "no" >&6; }
13161 fi
13162 
13163 
13164           if test "x$XARGS" = x; then
13165             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13166           fi
13167         else
13168           # Otherwise we believe it is a complete path. Use it as it is.
13169           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13170 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13171           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13172 $as_echo_n "checking for XARGS... " >&6; }
13173           if test ! -x "$tool_specified"; then
13174             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13175 $as_echo "not found" >&6; }
13176             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13177           fi
13178           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13179 $as_echo "$tool_specified" >&6; }
13180         fi
13181       fi
13182     fi
13183 
13184   fi
13185 
13186 
13187 
13188   if test "x$XARGS" = x; then
13189     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13190   fi
13191 
13192 
13193 
13194   # Then required tools that require some special treatment.
13195 
13196 
13197   # Publish this variable in the help.
13198 
13199 
13200   if [ -z "${AWK+x}" ]; then
13201     # The variable is not set by user, try to locate tool using the code snippet
13202     for ac_prog in gawk mawk nawk awk
13203 do
13204   # Extract the first word of "$ac_prog", so it can be a program name with args.
13205 set dummy $ac_prog; ac_word=$2
13206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13207 $as_echo_n "checking for $ac_word... " >&6; }
13208 if ${ac_cv_prog_AWK+:} false; then :
13209   $as_echo_n "(cached) " >&6
13210 else
13211   if test -n "$AWK"; then
13212   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13213 else
13214 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215 for as_dir in $PATH
13216 do
13217   IFS=$as_save_IFS
13218   test -z "$as_dir" && as_dir=.
13219     for ac_exec_ext in '' $ac_executable_extensions; do
13220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13221     ac_cv_prog_AWK="$ac_prog"
13222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13223     break 2
13224   fi
13225 done
13226   done
13227 IFS=$as_save_IFS
13228 
13229 fi
13230 fi
13231 AWK=$ac_cv_prog_AWK
13232 if test -n "$AWK"; then
13233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13234 $as_echo "$AWK" >&6; }
13235 else
13236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13237 $as_echo "no" >&6; }
13238 fi
13239 
13240 
13241   test -n "$AWK" && break
13242 done
13243 
13244   else
13245     # The variable is set, but is it from the command line or the environment?
13246 
13247     # Try to remove the string !AWK! from our list.
13248     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13249     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13250       # If it failed, the variable was not from the command line. Ignore it,
13251       # but warn the user (except for BASH, which is always set by the calling BASH).
13252       if test "xAWK" != xBASH; then
13253         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13254 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13255       fi
13256       # Try to locate tool using the code snippet
13257       for ac_prog in gawk mawk nawk awk
13258 do
13259   # Extract the first word of "$ac_prog", so it can be a program name with args.
13260 set dummy $ac_prog; ac_word=$2
13261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13262 $as_echo_n "checking for $ac_word... " >&6; }
13263 if ${ac_cv_prog_AWK+:} false; then :
13264   $as_echo_n "(cached) " >&6
13265 else
13266   if test -n "$AWK"; then
13267   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13268 else
13269 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13270 for as_dir in $PATH
13271 do
13272   IFS=$as_save_IFS
13273   test -z "$as_dir" && as_dir=.
13274     for ac_exec_ext in '' $ac_executable_extensions; do
13275   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13276     ac_cv_prog_AWK="$ac_prog"
13277     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13278     break 2
13279   fi
13280 done
13281   done
13282 IFS=$as_save_IFS
13283 
13284 fi
13285 fi
13286 AWK=$ac_cv_prog_AWK
13287 if test -n "$AWK"; then
13288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13289 $as_echo "$AWK" >&6; }
13290 else
13291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13292 $as_echo "no" >&6; }
13293 fi
13294 
13295 
13296   test -n "$AWK" && break
13297 done
13298 
13299     else
13300       # If it succeeded, then it was overridden by the user. We will use it
13301       # for the tool.
13302 
13303       # First remove it from the list of overridden variables, so we can test
13304       # for unknown variables in the end.
13305       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13306 
13307       # Check if we try to supply an empty value
13308       if test "x$AWK" = x; then
13309         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13310 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13312 $as_echo_n "checking for AWK... " >&6; }
13313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13314 $as_echo "disabled" >&6; }
13315       else
13316         # Check if the provided tool contains a complete path.
13317         tool_specified="$AWK"
13318         tool_basename="${tool_specified##*/}"
13319         if test "x$tool_basename" = "x$tool_specified"; then
13320           # A command without a complete path is provided, search $PATH.
13321           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13322 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13323           # Extract the first word of "$tool_basename", so it can be a program name with args.
13324 set dummy $tool_basename; ac_word=$2
13325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13326 $as_echo_n "checking for $ac_word... " >&6; }
13327 if ${ac_cv_path_AWK+:} false; then :
13328   $as_echo_n "(cached) " >&6
13329 else
13330   case $AWK in
13331   [\\/]* | ?:[\\/]*)
13332   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13333   ;;
13334   *)
13335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13336 for as_dir in $PATH
13337 do
13338   IFS=$as_save_IFS
13339   test -z "$as_dir" && as_dir=.
13340     for ac_exec_ext in '' $ac_executable_extensions; do
13341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13342     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13344     break 2
13345   fi
13346 done
13347   done
13348 IFS=$as_save_IFS
13349 
13350   ;;
13351 esac
13352 fi
13353 AWK=$ac_cv_path_AWK
13354 if test -n "$AWK"; then
13355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13356 $as_echo "$AWK" >&6; }
13357 else
13358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13359 $as_echo "no" >&6; }
13360 fi
13361 
13362 
13363           if test "x$AWK" = x; then
13364             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13365           fi
13366         else
13367           # Otherwise we believe it is a complete path. Use it as it is.
13368           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13369 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13370           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13371 $as_echo_n "checking for AWK... " >&6; }
13372           if test ! -x "$tool_specified"; then
13373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13374 $as_echo "not found" >&6; }
13375             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13376           fi
13377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13378 $as_echo "$tool_specified" >&6; }
13379         fi
13380       fi
13381     fi
13382 
13383   fi
13384 
13385 
13386   if test "x$AWK" = x; then
13387     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13388   fi
13389 
13390 
13391 
13392 
13393   # Publish this variable in the help.
13394 
13395 
13396   if [ -z "${GREP+x}" ]; then
13397     # The variable is not set by user, try to locate tool using the code snippet
13398     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13399 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13400 if ${ac_cv_path_GREP+:} false; then :
13401   $as_echo_n "(cached) " >&6
13402 else
13403   if test -z "$GREP"; then
13404   ac_path_GREP_found=false
13405   # Loop through the user's path and test for each of PROGNAME-LIST
13406   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13407 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13408 do
13409   IFS=$as_save_IFS
13410   test -z "$as_dir" && as_dir=.
13411     for ac_prog in grep ggrep; do
13412     for ac_exec_ext in '' $ac_executable_extensions; do
13413       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13414       as_fn_executable_p "$ac_path_GREP" || continue
13415 # Check for GNU ac_path_GREP and select it if it is found.
13416   # Check for GNU $ac_path_GREP
13417 case `"$ac_path_GREP" --version 2>&1` in
13418 *GNU*)
13419   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13420 *)
13421   ac_count=0
13422   $as_echo_n 0123456789 >"conftest.in"
13423   while :
13424   do
13425     cat "conftest.in" "conftest.in" >"conftest.tmp"
13426     mv "conftest.tmp" "conftest.in"
13427     cp "conftest.in" "conftest.nl"
13428     $as_echo 'GREP' >> "conftest.nl"
13429     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13430     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13431     as_fn_arith $ac_count + 1 && ac_count=$as_val
13432     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13433       # Best one so far, save it but keep looking for a better one
13434       ac_cv_path_GREP="$ac_path_GREP"
13435       ac_path_GREP_max=$ac_count
13436     fi
13437     # 10*(2^10) chars as input seems more than enough
13438     test $ac_count -gt 10 && break
13439   done
13440   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13441 esac
13442 
13443       $ac_path_GREP_found && break 3
13444     done
13445   done
13446   done
13447 IFS=$as_save_IFS
13448   if test -z "$ac_cv_path_GREP"; then
13449     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13450   fi
13451 else
13452   ac_cv_path_GREP=$GREP
13453 fi
13454 
13455 fi
13456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13457 $as_echo "$ac_cv_path_GREP" >&6; }
13458  GREP="$ac_cv_path_GREP"
13459 
13460 
13461   else
13462     # The variable is set, but is it from the command line or the environment?
13463 
13464     # Try to remove the string !GREP! from our list.
13465     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13466     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13467       # If it failed, the variable was not from the command line. Ignore it,
13468       # but warn the user (except for BASH, which is always set by the calling BASH).
13469       if test "xGREP" != xBASH; then
13470         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13471 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13472       fi
13473       # Try to locate tool using the code snippet
13474       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13475 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13476 if ${ac_cv_path_GREP+:} false; then :
13477   $as_echo_n "(cached) " >&6
13478 else
13479   if test -z "$GREP"; then
13480   ac_path_GREP_found=false
13481   # Loop through the user's path and test for each of PROGNAME-LIST
13482   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13483 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13484 do
13485   IFS=$as_save_IFS
13486   test -z "$as_dir" && as_dir=.
13487     for ac_prog in grep ggrep; do
13488     for ac_exec_ext in '' $ac_executable_extensions; do
13489       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13490       as_fn_executable_p "$ac_path_GREP" || continue
13491 # Check for GNU ac_path_GREP and select it if it is found.
13492   # Check for GNU $ac_path_GREP
13493 case `"$ac_path_GREP" --version 2>&1` in
13494 *GNU*)
13495   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13496 *)
13497   ac_count=0
13498   $as_echo_n 0123456789 >"conftest.in"
13499   while :
13500   do
13501     cat "conftest.in" "conftest.in" >"conftest.tmp"
13502     mv "conftest.tmp" "conftest.in"
13503     cp "conftest.in" "conftest.nl"
13504     $as_echo 'GREP' >> "conftest.nl"
13505     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13506     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13507     as_fn_arith $ac_count + 1 && ac_count=$as_val
13508     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13509       # Best one so far, save it but keep looking for a better one
13510       ac_cv_path_GREP="$ac_path_GREP"
13511       ac_path_GREP_max=$ac_count
13512     fi
13513     # 10*(2^10) chars as input seems more than enough
13514     test $ac_count -gt 10 && break
13515   done
13516   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13517 esac
13518 
13519       $ac_path_GREP_found && break 3
13520     done
13521   done
13522   done
13523 IFS=$as_save_IFS
13524   if test -z "$ac_cv_path_GREP"; then
13525     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13526   fi
13527 else
13528   ac_cv_path_GREP=$GREP
13529 fi
13530 
13531 fi
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13533 $as_echo "$ac_cv_path_GREP" >&6; }
13534  GREP="$ac_cv_path_GREP"
13535 
13536 
13537     else
13538       # If it succeeded, then it was overridden by the user. We will use it
13539       # for the tool.
13540 
13541       # First remove it from the list of overridden variables, so we can test
13542       # for unknown variables in the end.
13543       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13544 
13545       # Check if we try to supply an empty value
13546       if test "x$GREP" = x; then
13547         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13548 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13549         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13550 $as_echo_n "checking for GREP... " >&6; }
13551         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13552 $as_echo "disabled" >&6; }
13553       else
13554         # Check if the provided tool contains a complete path.
13555         tool_specified="$GREP"
13556         tool_basename="${tool_specified##*/}"
13557         if test "x$tool_basename" = "x$tool_specified"; then
13558           # A command without a complete path is provided, search $PATH.
13559           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13560 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13561           # Extract the first word of "$tool_basename", so it can be a program name with args.
13562 set dummy $tool_basename; ac_word=$2
13563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13564 $as_echo_n "checking for $ac_word... " >&6; }
13565 if ${ac_cv_path_GREP+:} false; then :
13566   $as_echo_n "(cached) " >&6
13567 else
13568   case $GREP in
13569   [\\/]* | ?:[\\/]*)
13570   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13571   ;;
13572   *)
13573   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13574 for as_dir in $PATH
13575 do
13576   IFS=$as_save_IFS
13577   test -z "$as_dir" && as_dir=.
13578     for ac_exec_ext in '' $ac_executable_extensions; do
13579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13580     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13582     break 2
13583   fi
13584 done
13585   done
13586 IFS=$as_save_IFS
13587 
13588   ;;
13589 esac
13590 fi
13591 GREP=$ac_cv_path_GREP
13592 if test -n "$GREP"; then
13593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13594 $as_echo "$GREP" >&6; }
13595 else
13596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13597 $as_echo "no" >&6; }
13598 fi
13599 
13600 
13601           if test "x$GREP" = x; then
13602             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13603           fi
13604         else
13605           # Otherwise we believe it is a complete path. Use it as it is.
13606           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13607 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13608           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13609 $as_echo_n "checking for GREP... " >&6; }
13610           if test ! -x "$tool_specified"; then
13611             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13612 $as_echo "not found" >&6; }
13613             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13614           fi
13615           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13616 $as_echo "$tool_specified" >&6; }
13617         fi
13618       fi
13619     fi
13620 
13621   fi
13622 
13623 
13624   if test "x$GREP" = x; then
13625     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13626   fi
13627 
13628 
13629 
13630 
13631   # Publish this variable in the help.
13632 
13633 
13634   if [ -z "${EGREP+x}" ]; then
13635     # The variable is not set by user, try to locate tool using the code snippet
13636     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13637 $as_echo_n "checking for egrep... " >&6; }
13638 if ${ac_cv_path_EGREP+:} false; then :
13639   $as_echo_n "(cached) " >&6
13640 else
13641   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13642    then ac_cv_path_EGREP="$GREP -E"
13643    else
13644      if test -z "$EGREP"; then
13645   ac_path_EGREP_found=false
13646   # Loop through the user's path and test for each of PROGNAME-LIST
13647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13648 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13649 do
13650   IFS=$as_save_IFS
13651   test -z "$as_dir" && as_dir=.
13652     for ac_prog in egrep; do
13653     for ac_exec_ext in '' $ac_executable_extensions; do
13654       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13655       as_fn_executable_p "$ac_path_EGREP" || continue
13656 # Check for GNU ac_path_EGREP and select it if it is found.
13657   # Check for GNU $ac_path_EGREP
13658 case `"$ac_path_EGREP" --version 2>&1` in
13659 *GNU*)
13660   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13661 *)
13662   ac_count=0
13663   $as_echo_n 0123456789 >"conftest.in"
13664   while :
13665   do
13666     cat "conftest.in" "conftest.in" >"conftest.tmp"
13667     mv "conftest.tmp" "conftest.in"
13668     cp "conftest.in" "conftest.nl"
13669     $as_echo 'EGREP' >> "conftest.nl"
13670     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13671     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13672     as_fn_arith $ac_count + 1 && ac_count=$as_val
13673     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13674       # Best one so far, save it but keep looking for a better one
13675       ac_cv_path_EGREP="$ac_path_EGREP"
13676       ac_path_EGREP_max=$ac_count
13677     fi
13678     # 10*(2^10) chars as input seems more than enough
13679     test $ac_count -gt 10 && break
13680   done
13681   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13682 esac
13683 
13684       $ac_path_EGREP_found && break 3
13685     done
13686   done
13687   done
13688 IFS=$as_save_IFS
13689   if test -z "$ac_cv_path_EGREP"; then
13690     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13691   fi
13692 else
13693   ac_cv_path_EGREP=$EGREP
13694 fi
13695 
13696    fi
13697 fi
13698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13699 $as_echo "$ac_cv_path_EGREP" >&6; }
13700  EGREP="$ac_cv_path_EGREP"
13701 
13702 
13703   else
13704     # The variable is set, but is it from the command line or the environment?
13705 
13706     # Try to remove the string !EGREP! from our list.
13707     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13708     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13709       # If it failed, the variable was not from the command line. Ignore it,
13710       # but warn the user (except for BASH, which is always set by the calling BASH).
13711       if test "xEGREP" != xBASH; then
13712         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13713 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13714       fi
13715       # Try to locate tool using the code snippet
13716       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13717 $as_echo_n "checking for egrep... " >&6; }
13718 if ${ac_cv_path_EGREP+:} false; then :
13719   $as_echo_n "(cached) " >&6
13720 else
13721   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13722    then ac_cv_path_EGREP="$GREP -E"
13723    else
13724      if test -z "$EGREP"; then
13725   ac_path_EGREP_found=false
13726   # Loop through the user's path and test for each of PROGNAME-LIST
13727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13728 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13729 do
13730   IFS=$as_save_IFS
13731   test -z "$as_dir" && as_dir=.
13732     for ac_prog in egrep; do
13733     for ac_exec_ext in '' $ac_executable_extensions; do
13734       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13735       as_fn_executable_p "$ac_path_EGREP" || continue
13736 # Check for GNU ac_path_EGREP and select it if it is found.
13737   # Check for GNU $ac_path_EGREP
13738 case `"$ac_path_EGREP" --version 2>&1` in
13739 *GNU*)
13740   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13741 *)
13742   ac_count=0
13743   $as_echo_n 0123456789 >"conftest.in"
13744   while :
13745   do
13746     cat "conftest.in" "conftest.in" >"conftest.tmp"
13747     mv "conftest.tmp" "conftest.in"
13748     cp "conftest.in" "conftest.nl"
13749     $as_echo 'EGREP' >> "conftest.nl"
13750     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13751     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13752     as_fn_arith $ac_count + 1 && ac_count=$as_val
13753     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13754       # Best one so far, save it but keep looking for a better one
13755       ac_cv_path_EGREP="$ac_path_EGREP"
13756       ac_path_EGREP_max=$ac_count
13757     fi
13758     # 10*(2^10) chars as input seems more than enough
13759     test $ac_count -gt 10 && break
13760   done
13761   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13762 esac
13763 
13764       $ac_path_EGREP_found && break 3
13765     done
13766   done
13767   done
13768 IFS=$as_save_IFS
13769   if test -z "$ac_cv_path_EGREP"; then
13770     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13771   fi
13772 else
13773   ac_cv_path_EGREP=$EGREP
13774 fi
13775 
13776    fi
13777 fi
13778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13779 $as_echo "$ac_cv_path_EGREP" >&6; }
13780  EGREP="$ac_cv_path_EGREP"
13781 
13782 
13783     else
13784       # If it succeeded, then it was overridden by the user. We will use it
13785       # for the tool.
13786 
13787       # First remove it from the list of overridden variables, so we can test
13788       # for unknown variables in the end.
13789       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13790 
13791       # Check if we try to supply an empty value
13792       if test "x$EGREP" = x; then
13793         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13794 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13796 $as_echo_n "checking for EGREP... " >&6; }
13797         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13798 $as_echo "disabled" >&6; }
13799       else
13800         # Check if the provided tool contains a complete path.
13801         tool_specified="$EGREP"
13802         tool_basename="${tool_specified##*/}"
13803         if test "x$tool_basename" = "x$tool_specified"; then
13804           # A command without a complete path is provided, search $PATH.
13805           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13806 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13807           # Extract the first word of "$tool_basename", so it can be a program name with args.
13808 set dummy $tool_basename; ac_word=$2
13809 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13810 $as_echo_n "checking for $ac_word... " >&6; }
13811 if ${ac_cv_path_EGREP+:} false; then :
13812   $as_echo_n "(cached) " >&6
13813 else
13814   case $EGREP in
13815   [\\/]* | ?:[\\/]*)
13816   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13817   ;;
13818   *)
13819   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13820 for as_dir in $PATH
13821 do
13822   IFS=$as_save_IFS
13823   test -z "$as_dir" && as_dir=.
13824     for ac_exec_ext in '' $ac_executable_extensions; do
13825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13826     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13828     break 2
13829   fi
13830 done
13831   done
13832 IFS=$as_save_IFS
13833 
13834   ;;
13835 esac
13836 fi
13837 EGREP=$ac_cv_path_EGREP
13838 if test -n "$EGREP"; then
13839   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13840 $as_echo "$EGREP" >&6; }
13841 else
13842   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13843 $as_echo "no" >&6; }
13844 fi
13845 
13846 
13847           if test "x$EGREP" = x; then
13848             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13849           fi
13850         else
13851           # Otherwise we believe it is a complete path. Use it as it is.
13852           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13853 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13854           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13855 $as_echo_n "checking for EGREP... " >&6; }
13856           if test ! -x "$tool_specified"; then
13857             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13858 $as_echo "not found" >&6; }
13859             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13860           fi
13861           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13862 $as_echo "$tool_specified" >&6; }
13863         fi
13864       fi
13865     fi
13866 
13867   fi
13868 
13869 
13870   if test "x$EGREP" = x; then
13871     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13872   fi
13873 
13874 
13875 
13876 
13877   # Publish this variable in the help.
13878 
13879 
13880   if [ -z "${FGREP+x}" ]; then
13881     # The variable is not set by user, try to locate tool using the code snippet
13882     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13883 $as_echo_n "checking for fgrep... " >&6; }
13884 if ${ac_cv_path_FGREP+:} false; then :
13885   $as_echo_n "(cached) " >&6
13886 else
13887   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13888    then ac_cv_path_FGREP="$GREP -F"
13889    else
13890      if test -z "$FGREP"; then
13891   ac_path_FGREP_found=false
13892   # Loop through the user's path and test for each of PROGNAME-LIST
13893   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13894 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13895 do
13896   IFS=$as_save_IFS
13897   test -z "$as_dir" && as_dir=.
13898     for ac_prog in fgrep; do
13899     for ac_exec_ext in '' $ac_executable_extensions; do
13900       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13901       as_fn_executable_p "$ac_path_FGREP" || continue
13902 # Check for GNU ac_path_FGREP and select it if it is found.
13903   # Check for GNU $ac_path_FGREP
13904 case `"$ac_path_FGREP" --version 2>&1` in
13905 *GNU*)
13906   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13907 *)
13908   ac_count=0
13909   $as_echo_n 0123456789 >"conftest.in"
13910   while :
13911   do
13912     cat "conftest.in" "conftest.in" >"conftest.tmp"
13913     mv "conftest.tmp" "conftest.in"
13914     cp "conftest.in" "conftest.nl"
13915     $as_echo 'FGREP' >> "conftest.nl"
13916     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13917     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13918     as_fn_arith $ac_count + 1 && ac_count=$as_val
13919     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13920       # Best one so far, save it but keep looking for a better one
13921       ac_cv_path_FGREP="$ac_path_FGREP"
13922       ac_path_FGREP_max=$ac_count
13923     fi
13924     # 10*(2^10) chars as input seems more than enough
13925     test $ac_count -gt 10 && break
13926   done
13927   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13928 esac
13929 
13930       $ac_path_FGREP_found && break 3
13931     done
13932   done
13933   done
13934 IFS=$as_save_IFS
13935   if test -z "$ac_cv_path_FGREP"; then
13936     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13937   fi
13938 else
13939   ac_cv_path_FGREP=$FGREP
13940 fi
13941 
13942    fi
13943 fi
13944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13945 $as_echo "$ac_cv_path_FGREP" >&6; }
13946  FGREP="$ac_cv_path_FGREP"
13947 
13948 
13949   else
13950     # The variable is set, but is it from the command line or the environment?
13951 
13952     # Try to remove the string !FGREP! from our list.
13953     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13954     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13955       # If it failed, the variable was not from the command line. Ignore it,
13956       # but warn the user (except for BASH, which is always set by the calling BASH).
13957       if test "xFGREP" != xBASH; then
13958         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13959 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13960       fi
13961       # Try to locate tool using the code snippet
13962       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13963 $as_echo_n "checking for fgrep... " >&6; }
13964 if ${ac_cv_path_FGREP+:} false; then :
13965   $as_echo_n "(cached) " >&6
13966 else
13967   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13968    then ac_cv_path_FGREP="$GREP -F"
13969    else
13970      if test -z "$FGREP"; then
13971   ac_path_FGREP_found=false
13972   # Loop through the user's path and test for each of PROGNAME-LIST
13973   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13974 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13975 do
13976   IFS=$as_save_IFS
13977   test -z "$as_dir" && as_dir=.
13978     for ac_prog in fgrep; do
13979     for ac_exec_ext in '' $ac_executable_extensions; do
13980       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13981       as_fn_executable_p "$ac_path_FGREP" || continue
13982 # Check for GNU ac_path_FGREP and select it if it is found.
13983   # Check for GNU $ac_path_FGREP
13984 case `"$ac_path_FGREP" --version 2>&1` in
13985 *GNU*)
13986   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13987 *)
13988   ac_count=0
13989   $as_echo_n 0123456789 >"conftest.in"
13990   while :
13991   do
13992     cat "conftest.in" "conftest.in" >"conftest.tmp"
13993     mv "conftest.tmp" "conftest.in"
13994     cp "conftest.in" "conftest.nl"
13995     $as_echo 'FGREP' >> "conftest.nl"
13996     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13997     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13998     as_fn_arith $ac_count + 1 && ac_count=$as_val
13999     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14000       # Best one so far, save it but keep looking for a better one
14001       ac_cv_path_FGREP="$ac_path_FGREP"
14002       ac_path_FGREP_max=$ac_count
14003     fi
14004     # 10*(2^10) chars as input seems more than enough
14005     test $ac_count -gt 10 && break
14006   done
14007   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14008 esac
14009 
14010       $ac_path_FGREP_found && break 3
14011     done
14012   done
14013   done
14014 IFS=$as_save_IFS
14015   if test -z "$ac_cv_path_FGREP"; then
14016     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14017   fi
14018 else
14019   ac_cv_path_FGREP=$FGREP
14020 fi
14021 
14022    fi
14023 fi
14024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14025 $as_echo "$ac_cv_path_FGREP" >&6; }
14026  FGREP="$ac_cv_path_FGREP"
14027 
14028 
14029     else
14030       # If it succeeded, then it was overridden by the user. We will use it
14031       # for the tool.
14032 
14033       # First remove it from the list of overridden variables, so we can test
14034       # for unknown variables in the end.
14035       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14036 
14037       # Check if we try to supply an empty value
14038       if test "x$FGREP" = x; then
14039         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14040 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14041         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14042 $as_echo_n "checking for FGREP... " >&6; }
14043         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14044 $as_echo "disabled" >&6; }
14045       else
14046         # Check if the provided tool contains a complete path.
14047         tool_specified="$FGREP"
14048         tool_basename="${tool_specified##*/}"
14049         if test "x$tool_basename" = "x$tool_specified"; then
14050           # A command without a complete path is provided, search $PATH.
14051           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14052 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14053           # Extract the first word of "$tool_basename", so it can be a program name with args.
14054 set dummy $tool_basename; ac_word=$2
14055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14056 $as_echo_n "checking for $ac_word... " >&6; }
14057 if ${ac_cv_path_FGREP+:} false; then :
14058   $as_echo_n "(cached) " >&6
14059 else
14060   case $FGREP in
14061   [\\/]* | ?:[\\/]*)
14062   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14063   ;;
14064   *)
14065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14066 for as_dir in $PATH
14067 do
14068   IFS=$as_save_IFS
14069   test -z "$as_dir" && as_dir=.
14070     for ac_exec_ext in '' $ac_executable_extensions; do
14071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14072     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14074     break 2
14075   fi
14076 done
14077   done
14078 IFS=$as_save_IFS
14079 
14080   ;;
14081 esac
14082 fi
14083 FGREP=$ac_cv_path_FGREP
14084 if test -n "$FGREP"; then
14085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14086 $as_echo "$FGREP" >&6; }
14087 else
14088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14089 $as_echo "no" >&6; }
14090 fi
14091 
14092 
14093           if test "x$FGREP" = x; then
14094             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14095           fi
14096         else
14097           # Otherwise we believe it is a complete path. Use it as it is.
14098           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14099 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14100           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14101 $as_echo_n "checking for FGREP... " >&6; }
14102           if test ! -x "$tool_specified"; then
14103             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14104 $as_echo "not found" >&6; }
14105             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14106           fi
14107           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14108 $as_echo "$tool_specified" >&6; }
14109         fi
14110       fi
14111     fi
14112 
14113   fi
14114 
14115 
14116   if test "x$FGREP" = x; then
14117     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14118   fi
14119 
14120 
14121 
14122 
14123   # Publish this variable in the help.
14124 
14125 
14126   if [ -z "${SED+x}" ]; then
14127     # The variable is not set by user, try to locate tool using the code snippet
14128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14129 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14130 if ${ac_cv_path_SED+:} false; then :
14131   $as_echo_n "(cached) " >&6
14132 else
14133             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14134      for ac_i in 1 2 3 4 5 6 7; do
14135        ac_script="$ac_script$as_nl$ac_script"
14136      done
14137      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14138      { ac_script=; unset ac_script;}
14139      if test -z "$SED"; then
14140   ac_path_SED_found=false
14141   # Loop through the user's path and test for each of PROGNAME-LIST
14142   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143 for as_dir in $PATH
14144 do
14145   IFS=$as_save_IFS
14146   test -z "$as_dir" && as_dir=.
14147     for ac_prog in sed gsed; do
14148     for ac_exec_ext in '' $ac_executable_extensions; do
14149       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14150       as_fn_executable_p "$ac_path_SED" || continue
14151 # Check for GNU ac_path_SED and select it if it is found.
14152   # Check for GNU $ac_path_SED
14153 case `"$ac_path_SED" --version 2>&1` in
14154 *GNU*)
14155   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14156 *)
14157   ac_count=0
14158   $as_echo_n 0123456789 >"conftest.in"
14159   while :
14160   do
14161     cat "conftest.in" "conftest.in" >"conftest.tmp"
14162     mv "conftest.tmp" "conftest.in"
14163     cp "conftest.in" "conftest.nl"
14164     $as_echo '' >> "conftest.nl"
14165     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14166     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14167     as_fn_arith $ac_count + 1 && ac_count=$as_val
14168     if test $ac_count -gt ${ac_path_SED_max-0}; then
14169       # Best one so far, save it but keep looking for a better one
14170       ac_cv_path_SED="$ac_path_SED"
14171       ac_path_SED_max=$ac_count
14172     fi
14173     # 10*(2^10) chars as input seems more than enough
14174     test $ac_count -gt 10 && break
14175   done
14176   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14177 esac
14178 
14179       $ac_path_SED_found && break 3
14180     done
14181   done
14182   done
14183 IFS=$as_save_IFS
14184   if test -z "$ac_cv_path_SED"; then
14185     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14186   fi
14187 else
14188   ac_cv_path_SED=$SED
14189 fi
14190 
14191 fi
14192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14193 $as_echo "$ac_cv_path_SED" >&6; }
14194  SED="$ac_cv_path_SED"
14195   rm -f conftest.sed
14196 
14197   else
14198     # The variable is set, but is it from the command line or the environment?
14199 
14200     # Try to remove the string !SED! from our list.
14201     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14202     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14203       # If it failed, the variable was not from the command line. Ignore it,
14204       # but warn the user (except for BASH, which is always set by the calling BASH).
14205       if test "xSED" != xBASH; then
14206         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14207 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14208       fi
14209       # Try to locate tool using the code snippet
14210       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14211 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14212 if ${ac_cv_path_SED+:} false; then :
14213   $as_echo_n "(cached) " >&6
14214 else
14215             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14216      for ac_i in 1 2 3 4 5 6 7; do
14217        ac_script="$ac_script$as_nl$ac_script"
14218      done
14219      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14220      { ac_script=; unset ac_script;}
14221      if test -z "$SED"; then
14222   ac_path_SED_found=false
14223   # Loop through the user's path and test for each of PROGNAME-LIST
14224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14225 for as_dir in $PATH
14226 do
14227   IFS=$as_save_IFS
14228   test -z "$as_dir" && as_dir=.
14229     for ac_prog in sed gsed; do
14230     for ac_exec_ext in '' $ac_executable_extensions; do
14231       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14232       as_fn_executable_p "$ac_path_SED" || continue
14233 # Check for GNU ac_path_SED and select it if it is found.
14234   # Check for GNU $ac_path_SED
14235 case `"$ac_path_SED" --version 2>&1` in
14236 *GNU*)
14237   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14238 *)
14239   ac_count=0
14240   $as_echo_n 0123456789 >"conftest.in"
14241   while :
14242   do
14243     cat "conftest.in" "conftest.in" >"conftest.tmp"
14244     mv "conftest.tmp" "conftest.in"
14245     cp "conftest.in" "conftest.nl"
14246     $as_echo '' >> "conftest.nl"
14247     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14248     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14249     as_fn_arith $ac_count + 1 && ac_count=$as_val
14250     if test $ac_count -gt ${ac_path_SED_max-0}; then
14251       # Best one so far, save it but keep looking for a better one
14252       ac_cv_path_SED="$ac_path_SED"
14253       ac_path_SED_max=$ac_count
14254     fi
14255     # 10*(2^10) chars as input seems more than enough
14256     test $ac_count -gt 10 && break
14257   done
14258   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14259 esac
14260 
14261       $ac_path_SED_found && break 3
14262     done
14263   done
14264   done
14265 IFS=$as_save_IFS
14266   if test -z "$ac_cv_path_SED"; then
14267     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14268   fi
14269 else
14270   ac_cv_path_SED=$SED
14271 fi
14272 
14273 fi
14274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14275 $as_echo "$ac_cv_path_SED" >&6; }
14276  SED="$ac_cv_path_SED"
14277   rm -f conftest.sed
14278 
14279     else
14280       # If it succeeded, then it was overridden by the user. We will use it
14281       # for the tool.
14282 
14283       # First remove it from the list of overridden variables, so we can test
14284       # for unknown variables in the end.
14285       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14286 
14287       # Check if we try to supply an empty value
14288       if test "x$SED" = x; then
14289         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14290 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14291         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14292 $as_echo_n "checking for SED... " >&6; }
14293         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14294 $as_echo "disabled" >&6; }
14295       else
14296         # Check if the provided tool contains a complete path.
14297         tool_specified="$SED"
14298         tool_basename="${tool_specified##*/}"
14299         if test "x$tool_basename" = "x$tool_specified"; then
14300           # A command without a complete path is provided, search $PATH.
14301           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14302 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14303           # Extract the first word of "$tool_basename", so it can be a program name with args.
14304 set dummy $tool_basename; ac_word=$2
14305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14306 $as_echo_n "checking for $ac_word... " >&6; }
14307 if ${ac_cv_path_SED+:} false; then :
14308   $as_echo_n "(cached) " >&6
14309 else
14310   case $SED in
14311   [\\/]* | ?:[\\/]*)
14312   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14313   ;;
14314   *)
14315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14316 for as_dir in $PATH
14317 do
14318   IFS=$as_save_IFS
14319   test -z "$as_dir" && as_dir=.
14320     for ac_exec_ext in '' $ac_executable_extensions; do
14321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14322     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14324     break 2
14325   fi
14326 done
14327   done
14328 IFS=$as_save_IFS
14329 
14330   ;;
14331 esac
14332 fi
14333 SED=$ac_cv_path_SED
14334 if test -n "$SED"; then
14335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14336 $as_echo "$SED" >&6; }
14337 else
14338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14339 $as_echo "no" >&6; }
14340 fi
14341 
14342 
14343           if test "x$SED" = x; then
14344             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14345           fi
14346         else
14347           # Otherwise we believe it is a complete path. Use it as it is.
14348           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14349 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14350           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14351 $as_echo_n "checking for SED... " >&6; }
14352           if test ! -x "$tool_specified"; then
14353             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14354 $as_echo "not found" >&6; }
14355             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14356           fi
14357           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14358 $as_echo "$tool_specified" >&6; }
14359         fi
14360       fi
14361     fi
14362 
14363   fi
14364 
14365 
14366   if test "x$SED" = x; then
14367     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14368   fi
14369 
14370 
14371 
14372   # Always force rm.
14373   RM="$RM -f"
14374 
14375   # pwd behaves differently on various platforms and some don't support the -L flag.
14376   # Always use the bash builtin pwd to get uniform behavior.
14377   THEPWDCMD=pwd
14378 
14379   # These are not required on all platforms
14380 
14381 
14382   # Publish this variable in the help.
14383 
14384 
14385   if [ -z "${CYGPATH+x}" ]; then
14386     # The variable is not set by user, try to locate tool using the code snippet
14387     for ac_prog in cygpath
14388 do
14389   # Extract the first word of "$ac_prog", so it can be a program name with args.
14390 set dummy $ac_prog; ac_word=$2
14391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14392 $as_echo_n "checking for $ac_word... " >&6; }
14393 if ${ac_cv_path_CYGPATH+:} false; then :
14394   $as_echo_n "(cached) " >&6
14395 else
14396   case $CYGPATH in
14397   [\\/]* | ?:[\\/]*)
14398   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14399   ;;
14400   *)
14401   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14402 for as_dir in $PATH
14403 do
14404   IFS=$as_save_IFS
14405   test -z "$as_dir" && as_dir=.
14406     for ac_exec_ext in '' $ac_executable_extensions; do
14407   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14408     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14409     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14410     break 2
14411   fi
14412 done
14413   done
14414 IFS=$as_save_IFS
14415 
14416   ;;
14417 esac
14418 fi
14419 CYGPATH=$ac_cv_path_CYGPATH
14420 if test -n "$CYGPATH"; then
14421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14422 $as_echo "$CYGPATH" >&6; }
14423 else
14424   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14425 $as_echo "no" >&6; }
14426 fi
14427 
14428 
14429   test -n "$CYGPATH" && break
14430 done
14431 
14432   else
14433     # The variable is set, but is it from the command line or the environment?
14434 
14435     # Try to remove the string !CYGPATH! from our list.
14436     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14437     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14438       # If it failed, the variable was not from the command line. Ignore it,
14439       # but warn the user (except for BASH, which is always set by the calling BASH).
14440       if test "xCYGPATH" != xBASH; then
14441         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14442 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14443       fi
14444       # Try to locate tool using the code snippet
14445       for ac_prog in cygpath
14446 do
14447   # Extract the first word of "$ac_prog", so it can be a program name with args.
14448 set dummy $ac_prog; ac_word=$2
14449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14450 $as_echo_n "checking for $ac_word... " >&6; }
14451 if ${ac_cv_path_CYGPATH+:} false; then :
14452   $as_echo_n "(cached) " >&6
14453 else
14454   case $CYGPATH in
14455   [\\/]* | ?:[\\/]*)
14456   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14457   ;;
14458   *)
14459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14460 for as_dir in $PATH
14461 do
14462   IFS=$as_save_IFS
14463   test -z "$as_dir" && as_dir=.
14464     for ac_exec_ext in '' $ac_executable_extensions; do
14465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14466     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14468     break 2
14469   fi
14470 done
14471   done
14472 IFS=$as_save_IFS
14473 
14474   ;;
14475 esac
14476 fi
14477 CYGPATH=$ac_cv_path_CYGPATH
14478 if test -n "$CYGPATH"; then
14479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14480 $as_echo "$CYGPATH" >&6; }
14481 else
14482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14483 $as_echo "no" >&6; }
14484 fi
14485 
14486 
14487   test -n "$CYGPATH" && break
14488 done
14489 
14490     else
14491       # If it succeeded, then it was overridden by the user. We will use it
14492       # for the tool.
14493 
14494       # First remove it from the list of overridden variables, so we can test
14495       # for unknown variables in the end.
14496       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14497 
14498       # Check if we try to supply an empty value
14499       if test "x$CYGPATH" = x; then
14500         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14501 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14502         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14503 $as_echo_n "checking for CYGPATH... " >&6; }
14504         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14505 $as_echo "disabled" >&6; }
14506       else
14507         # Check if the provided tool contains a complete path.
14508         tool_specified="$CYGPATH"
14509         tool_basename="${tool_specified##*/}"
14510         if test "x$tool_basename" = "x$tool_specified"; then
14511           # A command without a complete path is provided, search $PATH.
14512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14513 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14514           # Extract the first word of "$tool_basename", so it can be a program name with args.
14515 set dummy $tool_basename; ac_word=$2
14516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14517 $as_echo_n "checking for $ac_word... " >&6; }
14518 if ${ac_cv_path_CYGPATH+:} false; then :
14519   $as_echo_n "(cached) " >&6
14520 else
14521   case $CYGPATH in
14522   [\\/]* | ?:[\\/]*)
14523   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14524   ;;
14525   *)
14526   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14527 for as_dir in $PATH
14528 do
14529   IFS=$as_save_IFS
14530   test -z "$as_dir" && as_dir=.
14531     for ac_exec_ext in '' $ac_executable_extensions; do
14532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14533     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14535     break 2
14536   fi
14537 done
14538   done
14539 IFS=$as_save_IFS
14540 
14541   ;;
14542 esac
14543 fi
14544 CYGPATH=$ac_cv_path_CYGPATH
14545 if test -n "$CYGPATH"; then
14546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14547 $as_echo "$CYGPATH" >&6; }
14548 else
14549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14550 $as_echo "no" >&6; }
14551 fi
14552 
14553 
14554           if test "x$CYGPATH" = x; then
14555             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14556           fi
14557         else
14558           # Otherwise we believe it is a complete path. Use it as it is.
14559           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14560 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14561           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14562 $as_echo_n "checking for CYGPATH... " >&6; }
14563           if test ! -x "$tool_specified"; then
14564             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14565 $as_echo "not found" >&6; }
14566             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14567           fi
14568           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14569 $as_echo "$tool_specified" >&6; }
14570         fi
14571       fi
14572     fi
14573 
14574   fi
14575 
14576 
14577 
14578 
14579   # Publish this variable in the help.
14580 
14581 
14582   if [ -z "${READLINK+x}" ]; then
14583     # The variable is not set by user, try to locate tool using the code snippet
14584     for ac_prog in greadlink readlink
14585 do
14586   # Extract the first word of "$ac_prog", so it can be a program name with args.
14587 set dummy $ac_prog; ac_word=$2
14588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14589 $as_echo_n "checking for $ac_word... " >&6; }
14590 if ${ac_cv_path_READLINK+:} false; then :
14591   $as_echo_n "(cached) " >&6
14592 else
14593   case $READLINK in
14594   [\\/]* | ?:[\\/]*)
14595   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14596   ;;
14597   *)
14598   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14599 for as_dir in $PATH
14600 do
14601   IFS=$as_save_IFS
14602   test -z "$as_dir" && as_dir=.
14603     for ac_exec_ext in '' $ac_executable_extensions; do
14604   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14605     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14606     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14607     break 2
14608   fi
14609 done
14610   done
14611 IFS=$as_save_IFS
14612 
14613   ;;
14614 esac
14615 fi
14616 READLINK=$ac_cv_path_READLINK
14617 if test -n "$READLINK"; then
14618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14619 $as_echo "$READLINK" >&6; }
14620 else
14621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14622 $as_echo "no" >&6; }
14623 fi
14624 
14625 
14626   test -n "$READLINK" && break
14627 done
14628 
14629   else
14630     # The variable is set, but is it from the command line or the environment?
14631 
14632     # Try to remove the string !READLINK! from our list.
14633     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14634     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14635       # If it failed, the variable was not from the command line. Ignore it,
14636       # but warn the user (except for BASH, which is always set by the calling BASH).
14637       if test "xREADLINK" != xBASH; then
14638         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14639 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14640       fi
14641       # Try to locate tool using the code snippet
14642       for ac_prog in greadlink readlink
14643 do
14644   # Extract the first word of "$ac_prog", so it can be a program name with args.
14645 set dummy $ac_prog; ac_word=$2
14646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14647 $as_echo_n "checking for $ac_word... " >&6; }
14648 if ${ac_cv_path_READLINK+:} false; then :
14649   $as_echo_n "(cached) " >&6
14650 else
14651   case $READLINK in
14652   [\\/]* | ?:[\\/]*)
14653   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14654   ;;
14655   *)
14656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14657 for as_dir in $PATH
14658 do
14659   IFS=$as_save_IFS
14660   test -z "$as_dir" && as_dir=.
14661     for ac_exec_ext in '' $ac_executable_extensions; do
14662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14663     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14665     break 2
14666   fi
14667 done
14668   done
14669 IFS=$as_save_IFS
14670 
14671   ;;
14672 esac
14673 fi
14674 READLINK=$ac_cv_path_READLINK
14675 if test -n "$READLINK"; then
14676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14677 $as_echo "$READLINK" >&6; }
14678 else
14679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14680 $as_echo "no" >&6; }
14681 fi
14682 
14683 
14684   test -n "$READLINK" && break
14685 done
14686 
14687     else
14688       # If it succeeded, then it was overridden by the user. We will use it
14689       # for the tool.
14690 
14691       # First remove it from the list of overridden variables, so we can test
14692       # for unknown variables in the end.
14693       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14694 
14695       # Check if we try to supply an empty value
14696       if test "x$READLINK" = x; then
14697         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14698 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14699         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14700 $as_echo_n "checking for READLINK... " >&6; }
14701         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14702 $as_echo "disabled" >&6; }
14703       else
14704         # Check if the provided tool contains a complete path.
14705         tool_specified="$READLINK"
14706         tool_basename="${tool_specified##*/}"
14707         if test "x$tool_basename" = "x$tool_specified"; then
14708           # A command without a complete path is provided, search $PATH.
14709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14710 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14711           # Extract the first word of "$tool_basename", so it can be a program name with args.
14712 set dummy $tool_basename; ac_word=$2
14713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14714 $as_echo_n "checking for $ac_word... " >&6; }
14715 if ${ac_cv_path_READLINK+:} false; then :
14716   $as_echo_n "(cached) " >&6
14717 else
14718   case $READLINK in
14719   [\\/]* | ?:[\\/]*)
14720   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14721   ;;
14722   *)
14723   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14724 for as_dir in $PATH
14725 do
14726   IFS=$as_save_IFS
14727   test -z "$as_dir" && as_dir=.
14728     for ac_exec_ext in '' $ac_executable_extensions; do
14729   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14730     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14731     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14732     break 2
14733   fi
14734 done
14735   done
14736 IFS=$as_save_IFS
14737 
14738   ;;
14739 esac
14740 fi
14741 READLINK=$ac_cv_path_READLINK
14742 if test -n "$READLINK"; then
14743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14744 $as_echo "$READLINK" >&6; }
14745 else
14746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14747 $as_echo "no" >&6; }
14748 fi
14749 
14750 
14751           if test "x$READLINK" = x; then
14752             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14753           fi
14754         else
14755           # Otherwise we believe it is a complete path. Use it as it is.
14756           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14757 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14758           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14759 $as_echo_n "checking for READLINK... " >&6; }
14760           if test ! -x "$tool_specified"; then
14761             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14762 $as_echo "not found" >&6; }
14763             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14764           fi
14765           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14766 $as_echo "$tool_specified" >&6; }
14767         fi
14768       fi
14769     fi
14770 
14771   fi
14772 
14773 
14774 
14775 
14776   # Publish this variable in the help.
14777 
14778 
14779   if [ -z "${DF+x}" ]; then
14780     # The variable is not set by user, try to locate tool using the code snippet
14781     for ac_prog in df
14782 do
14783   # Extract the first word of "$ac_prog", so it can be a program name with args.
14784 set dummy $ac_prog; ac_word=$2
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14786 $as_echo_n "checking for $ac_word... " >&6; }
14787 if ${ac_cv_path_DF+:} false; then :
14788   $as_echo_n "(cached) " >&6
14789 else
14790   case $DF in
14791   [\\/]* | ?:[\\/]*)
14792   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14793   ;;
14794   *)
14795   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14796 for as_dir in $PATH
14797 do
14798   IFS=$as_save_IFS
14799   test -z "$as_dir" && as_dir=.
14800     for ac_exec_ext in '' $ac_executable_extensions; do
14801   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14802     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14803     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14804     break 2
14805   fi
14806 done
14807   done
14808 IFS=$as_save_IFS
14809 
14810   ;;
14811 esac
14812 fi
14813 DF=$ac_cv_path_DF
14814 if test -n "$DF"; then
14815   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14816 $as_echo "$DF" >&6; }
14817 else
14818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14819 $as_echo "no" >&6; }
14820 fi
14821 
14822 
14823   test -n "$DF" && break
14824 done
14825 
14826   else
14827     # The variable is set, but is it from the command line or the environment?
14828 
14829     # Try to remove the string !DF! from our list.
14830     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14831     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14832       # If it failed, the variable was not from the command line. Ignore it,
14833       # but warn the user (except for BASH, which is always set by the calling BASH).
14834       if test "xDF" != xBASH; then
14835         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14836 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14837       fi
14838       # Try to locate tool using the code snippet
14839       for ac_prog in df
14840 do
14841   # Extract the first word of "$ac_prog", so it can be a program name with args.
14842 set dummy $ac_prog; ac_word=$2
14843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14844 $as_echo_n "checking for $ac_word... " >&6; }
14845 if ${ac_cv_path_DF+:} false; then :
14846   $as_echo_n "(cached) " >&6
14847 else
14848   case $DF in
14849   [\\/]* | ?:[\\/]*)
14850   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14851   ;;
14852   *)
14853   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14854 for as_dir in $PATH
14855 do
14856   IFS=$as_save_IFS
14857   test -z "$as_dir" && as_dir=.
14858     for ac_exec_ext in '' $ac_executable_extensions; do
14859   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14860     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14861     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14862     break 2
14863   fi
14864 done
14865   done
14866 IFS=$as_save_IFS
14867 
14868   ;;
14869 esac
14870 fi
14871 DF=$ac_cv_path_DF
14872 if test -n "$DF"; then
14873   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14874 $as_echo "$DF" >&6; }
14875 else
14876   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14877 $as_echo "no" >&6; }
14878 fi
14879 
14880 
14881   test -n "$DF" && break
14882 done
14883 
14884     else
14885       # If it succeeded, then it was overridden by the user. We will use it
14886       # for the tool.
14887 
14888       # First remove it from the list of overridden variables, so we can test
14889       # for unknown variables in the end.
14890       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14891 
14892       # Check if we try to supply an empty value
14893       if test "x$DF" = x; then
14894         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14895 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14897 $as_echo_n "checking for DF... " >&6; }
14898         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14899 $as_echo "disabled" >&6; }
14900       else
14901         # Check if the provided tool contains a complete path.
14902         tool_specified="$DF"
14903         tool_basename="${tool_specified##*/}"
14904         if test "x$tool_basename" = "x$tool_specified"; then
14905           # A command without a complete path is provided, search $PATH.
14906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14907 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14908           # Extract the first word of "$tool_basename", so it can be a program name with args.
14909 set dummy $tool_basename; ac_word=$2
14910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14911 $as_echo_n "checking for $ac_word... " >&6; }
14912 if ${ac_cv_path_DF+:} false; then :
14913   $as_echo_n "(cached) " >&6
14914 else
14915   case $DF in
14916   [\\/]* | ?:[\\/]*)
14917   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14918   ;;
14919   *)
14920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14921 for as_dir in $PATH
14922 do
14923   IFS=$as_save_IFS
14924   test -z "$as_dir" && as_dir=.
14925     for ac_exec_ext in '' $ac_executable_extensions; do
14926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14927     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14929     break 2
14930   fi
14931 done
14932   done
14933 IFS=$as_save_IFS
14934 
14935   ;;
14936 esac
14937 fi
14938 DF=$ac_cv_path_DF
14939 if test -n "$DF"; then
14940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14941 $as_echo "$DF" >&6; }
14942 else
14943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14944 $as_echo "no" >&6; }
14945 fi
14946 
14947 
14948           if test "x$DF" = x; then
14949             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14950           fi
14951         else
14952           # Otherwise we believe it is a complete path. Use it as it is.
14953           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14954 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14955           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14956 $as_echo_n "checking for DF... " >&6; }
14957           if test ! -x "$tool_specified"; then
14958             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14959 $as_echo "not found" >&6; }
14960             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14961           fi
14962           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14963 $as_echo "$tool_specified" >&6; }
14964         fi
14965       fi
14966     fi
14967 
14968   fi
14969 
14970 
14971 
14972 
14973   # Publish this variable in the help.
14974 
14975 
14976   if [ -z "${CPIO+x}" ]; then
14977     # The variable is not set by user, try to locate tool using the code snippet
14978     for ac_prog in cpio bsdcpio
14979 do
14980   # Extract the first word of "$ac_prog", so it can be a program name with args.
14981 set dummy $ac_prog; ac_word=$2
14982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14983 $as_echo_n "checking for $ac_word... " >&6; }
14984 if ${ac_cv_path_CPIO+:} false; then :
14985   $as_echo_n "(cached) " >&6
14986 else
14987   case $CPIO in
14988   [\\/]* | ?:[\\/]*)
14989   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14990   ;;
14991   *)
14992   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14993 for as_dir in $PATH
14994 do
14995   IFS=$as_save_IFS
14996   test -z "$as_dir" && as_dir=.
14997     for ac_exec_ext in '' $ac_executable_extensions; do
14998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14999     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15001     break 2
15002   fi
15003 done
15004   done
15005 IFS=$as_save_IFS
15006 
15007   ;;
15008 esac
15009 fi
15010 CPIO=$ac_cv_path_CPIO
15011 if test -n "$CPIO"; then
15012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15013 $as_echo "$CPIO" >&6; }
15014 else
15015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15016 $as_echo "no" >&6; }
15017 fi
15018 
15019 
15020   test -n "$CPIO" && break
15021 done
15022 
15023   else
15024     # The variable is set, but is it from the command line or the environment?
15025 
15026     # Try to remove the string !CPIO! from our list.
15027     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15028     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15029       # If it failed, the variable was not from the command line. Ignore it,
15030       # but warn the user (except for BASH, which is always set by the calling BASH).
15031       if test "xCPIO" != xBASH; then
15032         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15033 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15034       fi
15035       # Try to locate tool using the code snippet
15036       for ac_prog in cpio bsdcpio
15037 do
15038   # Extract the first word of "$ac_prog", so it can be a program name with args.
15039 set dummy $ac_prog; ac_word=$2
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15041 $as_echo_n "checking for $ac_word... " >&6; }
15042 if ${ac_cv_path_CPIO+:} false; then :
15043   $as_echo_n "(cached) " >&6
15044 else
15045   case $CPIO in
15046   [\\/]* | ?:[\\/]*)
15047   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15048   ;;
15049   *)
15050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15051 for as_dir in $PATH
15052 do
15053   IFS=$as_save_IFS
15054   test -z "$as_dir" && as_dir=.
15055     for ac_exec_ext in '' $ac_executable_extensions; do
15056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15057     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15059     break 2
15060   fi
15061 done
15062   done
15063 IFS=$as_save_IFS
15064 
15065   ;;
15066 esac
15067 fi
15068 CPIO=$ac_cv_path_CPIO
15069 if test -n "$CPIO"; then
15070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15071 $as_echo "$CPIO" >&6; }
15072 else
15073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15074 $as_echo "no" >&6; }
15075 fi
15076 
15077 
15078   test -n "$CPIO" && break
15079 done
15080 
15081     else
15082       # If it succeeded, then it was overridden by the user. We will use it
15083       # for the tool.
15084 
15085       # First remove it from the list of overridden variables, so we can test
15086       # for unknown variables in the end.
15087       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15088 
15089       # Check if we try to supply an empty value
15090       if test "x$CPIO" = x; then
15091         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15092 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15094 $as_echo_n "checking for CPIO... " >&6; }
15095         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15096 $as_echo "disabled" >&6; }
15097       else
15098         # Check if the provided tool contains a complete path.
15099         tool_specified="$CPIO"
15100         tool_basename="${tool_specified##*/}"
15101         if test "x$tool_basename" = "x$tool_specified"; then
15102           # A command without a complete path is provided, search $PATH.
15103           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15104 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15105           # Extract the first word of "$tool_basename", so it can be a program name with args.
15106 set dummy $tool_basename; ac_word=$2
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15108 $as_echo_n "checking for $ac_word... " >&6; }
15109 if ${ac_cv_path_CPIO+:} false; then :
15110   $as_echo_n "(cached) " >&6
15111 else
15112   case $CPIO in
15113   [\\/]* | ?:[\\/]*)
15114   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15115   ;;
15116   *)
15117   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15118 for as_dir in $PATH
15119 do
15120   IFS=$as_save_IFS
15121   test -z "$as_dir" && as_dir=.
15122     for ac_exec_ext in '' $ac_executable_extensions; do
15123   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15124     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15125     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15126     break 2
15127   fi
15128 done
15129   done
15130 IFS=$as_save_IFS
15131 
15132   ;;
15133 esac
15134 fi
15135 CPIO=$ac_cv_path_CPIO
15136 if test -n "$CPIO"; then
15137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15138 $as_echo "$CPIO" >&6; }
15139 else
15140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15141 $as_echo "no" >&6; }
15142 fi
15143 
15144 
15145           if test "x$CPIO" = x; then
15146             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15147           fi
15148         else
15149           # Otherwise we believe it is a complete path. Use it as it is.
15150           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15151 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15152           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15153 $as_echo_n "checking for CPIO... " >&6; }
15154           if test ! -x "$tool_specified"; then
15155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15156 $as_echo "not found" >&6; }
15157             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15158           fi
15159           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15160 $as_echo "$tool_specified" >&6; }
15161         fi
15162       fi
15163     fi
15164 
15165   fi
15166 
15167 
15168 
15169 
15170   # Publish this variable in the help.
15171 
15172 
15173   if [ -z "${NICE+x}" ]; then
15174     # The variable is not set by user, try to locate tool using the code snippet
15175     for ac_prog in nice
15176 do
15177   # Extract the first word of "$ac_prog", so it can be a program name with args.
15178 set dummy $ac_prog; ac_word=$2
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15180 $as_echo_n "checking for $ac_word... " >&6; }
15181 if ${ac_cv_path_NICE+:} false; then :
15182   $as_echo_n "(cached) " >&6
15183 else
15184   case $NICE in
15185   [\\/]* | ?:[\\/]*)
15186   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15187   ;;
15188   *)
15189   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15190 for as_dir in $PATH
15191 do
15192   IFS=$as_save_IFS
15193   test -z "$as_dir" && as_dir=.
15194     for ac_exec_ext in '' $ac_executable_extensions; do
15195   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15196     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15197     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15198     break 2
15199   fi
15200 done
15201   done
15202 IFS=$as_save_IFS
15203 
15204   ;;
15205 esac
15206 fi
15207 NICE=$ac_cv_path_NICE
15208 if test -n "$NICE"; then
15209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15210 $as_echo "$NICE" >&6; }
15211 else
15212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15213 $as_echo "no" >&6; }
15214 fi
15215 
15216 
15217   test -n "$NICE" && break
15218 done
15219 
15220   else
15221     # The variable is set, but is it from the command line or the environment?
15222 
15223     # Try to remove the string !NICE! from our list.
15224     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15225     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15226       # If it failed, the variable was not from the command line. Ignore it,
15227       # but warn the user (except for BASH, which is always set by the calling BASH).
15228       if test "xNICE" != xBASH; then
15229         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15230 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15231       fi
15232       # Try to locate tool using the code snippet
15233       for ac_prog in nice
15234 do
15235   # Extract the first word of "$ac_prog", so it can be a program name with args.
15236 set dummy $ac_prog; ac_word=$2
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15238 $as_echo_n "checking for $ac_word... " >&6; }
15239 if ${ac_cv_path_NICE+:} false; then :
15240   $as_echo_n "(cached) " >&6
15241 else
15242   case $NICE in
15243   [\\/]* | ?:[\\/]*)
15244   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15245   ;;
15246   *)
15247   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15248 for as_dir in $PATH
15249 do
15250   IFS=$as_save_IFS
15251   test -z "$as_dir" && as_dir=.
15252     for ac_exec_ext in '' $ac_executable_extensions; do
15253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15254     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15256     break 2
15257   fi
15258 done
15259   done
15260 IFS=$as_save_IFS
15261 
15262   ;;
15263 esac
15264 fi
15265 NICE=$ac_cv_path_NICE
15266 if test -n "$NICE"; then
15267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15268 $as_echo "$NICE" >&6; }
15269 else
15270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15271 $as_echo "no" >&6; }
15272 fi
15273 
15274 
15275   test -n "$NICE" && break
15276 done
15277 
15278     else
15279       # If it succeeded, then it was overridden by the user. We will use it
15280       # for the tool.
15281 
15282       # First remove it from the list of overridden variables, so we can test
15283       # for unknown variables in the end.
15284       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15285 
15286       # Check if we try to supply an empty value
15287       if test "x$NICE" = x; then
15288         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15289 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15290         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15291 $as_echo_n "checking for NICE... " >&6; }
15292         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15293 $as_echo "disabled" >&6; }
15294       else
15295         # Check if the provided tool contains a complete path.
15296         tool_specified="$NICE"
15297         tool_basename="${tool_specified##*/}"
15298         if test "x$tool_basename" = "x$tool_specified"; then
15299           # A command without a complete path is provided, search $PATH.
15300           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15301 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15302           # Extract the first word of "$tool_basename", so it can be a program name with args.
15303 set dummy $tool_basename; ac_word=$2
15304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15305 $as_echo_n "checking for $ac_word... " >&6; }
15306 if ${ac_cv_path_NICE+:} false; then :
15307   $as_echo_n "(cached) " >&6
15308 else
15309   case $NICE in
15310   [\\/]* | ?:[\\/]*)
15311   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15312   ;;
15313   *)
15314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15315 for as_dir in $PATH
15316 do
15317   IFS=$as_save_IFS
15318   test -z "$as_dir" && as_dir=.
15319     for ac_exec_ext in '' $ac_executable_extensions; do
15320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15321     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15323     break 2
15324   fi
15325 done
15326   done
15327 IFS=$as_save_IFS
15328 
15329   ;;
15330 esac
15331 fi
15332 NICE=$ac_cv_path_NICE
15333 if test -n "$NICE"; then
15334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15335 $as_echo "$NICE" >&6; }
15336 else
15337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15338 $as_echo "no" >&6; }
15339 fi
15340 
15341 
15342           if test "x$NICE" = x; then
15343             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15344           fi
15345         else
15346           # Otherwise we believe it is a complete path. Use it as it is.
15347           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15348 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15349           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15350 $as_echo_n "checking for NICE... " >&6; }
15351           if test ! -x "$tool_specified"; then
15352             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15353 $as_echo "not found" >&6; }
15354             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15355           fi
15356           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15357 $as_echo "$tool_specified" >&6; }
15358         fi
15359       fi
15360     fi
15361 
15362   fi
15363 
15364 
15365 
15366 
15367   # Publish this variable in the help.
15368 
15369 
15370   if [ -z "${PANDOC+x}" ]; then
15371     # The variable is not set by user, try to locate tool using the code snippet
15372     for ac_prog in pandoc
15373 do
15374   # Extract the first word of "$ac_prog", so it can be a program name with args.
15375 set dummy $ac_prog; ac_word=$2
15376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15377 $as_echo_n "checking for $ac_word... " >&6; }
15378 if ${ac_cv_path_PANDOC+:} false; then :
15379   $as_echo_n "(cached) " >&6
15380 else
15381   case $PANDOC in
15382   [\\/]* | ?:[\\/]*)
15383   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15384   ;;
15385   *)
15386   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15387 for as_dir in $PATH
15388 do
15389   IFS=$as_save_IFS
15390   test -z "$as_dir" && as_dir=.
15391     for ac_exec_ext in '' $ac_executable_extensions; do
15392   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15393     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15394     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15395     break 2
15396   fi
15397 done
15398   done
15399 IFS=$as_save_IFS
15400 
15401   ;;
15402 esac
15403 fi
15404 PANDOC=$ac_cv_path_PANDOC
15405 if test -n "$PANDOC"; then
15406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15407 $as_echo "$PANDOC" >&6; }
15408 else
15409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15410 $as_echo "no" >&6; }
15411 fi
15412 
15413 
15414   test -n "$PANDOC" && break
15415 done
15416 
15417   else
15418     # The variable is set, but is it from the command line or the environment?
15419 
15420     # Try to remove the string !PANDOC! from our list.
15421     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15422     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15423       # If it failed, the variable was not from the command line. Ignore it,
15424       # but warn the user (except for BASH, which is always set by the calling BASH).
15425       if test "xPANDOC" != xBASH; then
15426         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15427 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15428       fi
15429       # Try to locate tool using the code snippet
15430       for ac_prog in pandoc
15431 do
15432   # Extract the first word of "$ac_prog", so it can be a program name with args.
15433 set dummy $ac_prog; ac_word=$2
15434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15435 $as_echo_n "checking for $ac_word... " >&6; }
15436 if ${ac_cv_path_PANDOC+:} false; then :
15437   $as_echo_n "(cached) " >&6
15438 else
15439   case $PANDOC in
15440   [\\/]* | ?:[\\/]*)
15441   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15442   ;;
15443   *)
15444   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15445 for as_dir in $PATH
15446 do
15447   IFS=$as_save_IFS
15448   test -z "$as_dir" && as_dir=.
15449     for ac_exec_ext in '' $ac_executable_extensions; do
15450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15451     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15453     break 2
15454   fi
15455 done
15456   done
15457 IFS=$as_save_IFS
15458 
15459   ;;
15460 esac
15461 fi
15462 PANDOC=$ac_cv_path_PANDOC
15463 if test -n "$PANDOC"; then
15464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15465 $as_echo "$PANDOC" >&6; }
15466 else
15467   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15468 $as_echo "no" >&6; }
15469 fi
15470 
15471 
15472   test -n "$PANDOC" && break
15473 done
15474 
15475     else
15476       # If it succeeded, then it was overridden by the user. We will use it
15477       # for the tool.
15478 
15479       # First remove it from the list of overridden variables, so we can test
15480       # for unknown variables in the end.
15481       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15482 
15483       # Check if we try to supply an empty value
15484       if test "x$PANDOC" = x; then
15485         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15486 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15487         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15488 $as_echo_n "checking for PANDOC... " >&6; }
15489         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15490 $as_echo "disabled" >&6; }
15491       else
15492         # Check if the provided tool contains a complete path.
15493         tool_specified="$PANDOC"
15494         tool_basename="${tool_specified##*/}"
15495         if test "x$tool_basename" = "x$tool_specified"; then
15496           # A command without a complete path is provided, search $PATH.
15497           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15498 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15499           # Extract the first word of "$tool_basename", so it can be a program name with args.
15500 set dummy $tool_basename; ac_word=$2
15501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15502 $as_echo_n "checking for $ac_word... " >&6; }
15503 if ${ac_cv_path_PANDOC+:} false; then :
15504   $as_echo_n "(cached) " >&6
15505 else
15506   case $PANDOC in
15507   [\\/]* | ?:[\\/]*)
15508   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15509   ;;
15510   *)
15511   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15512 for as_dir in $PATH
15513 do
15514   IFS=$as_save_IFS
15515   test -z "$as_dir" && as_dir=.
15516     for ac_exec_ext in '' $ac_executable_extensions; do
15517   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15518     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15519     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15520     break 2
15521   fi
15522 done
15523   done
15524 IFS=$as_save_IFS
15525 
15526   ;;
15527 esac
15528 fi
15529 PANDOC=$ac_cv_path_PANDOC
15530 if test -n "$PANDOC"; then
15531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15532 $as_echo "$PANDOC" >&6; }
15533 else
15534   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15535 $as_echo "no" >&6; }
15536 fi
15537 
15538 
15539           if test "x$PANDOC" = x; then
15540             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15541           fi
15542         else
15543           # Otherwise we believe it is a complete path. Use it as it is.
15544           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15545 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15546           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15547 $as_echo_n "checking for PANDOC... " >&6; }
15548           if test ! -x "$tool_specified"; then
15549             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15550 $as_echo "not found" >&6; }
15551             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15552           fi
15553           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15554 $as_echo "$tool_specified" >&6; }
15555         fi
15556       fi
15557     fi
15558 
15559   fi
15560 
15561 
15562 
15563 
15564 # Now we can determine OpenJDK build and target platforms. This is required to
15565 # have early on.
15566 # Make sure we can run config.sub.
15567 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15568   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15569 
15570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15571 $as_echo_n "checking build system type... " >&6; }
15572 if ${ac_cv_build+:} false; then :
15573   $as_echo_n "(cached) " >&6
15574 else
15575   ac_build_alias=$build_alias
15576 test "x$ac_build_alias" = x &&
15577   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15578 test "x$ac_build_alias" = x &&
15579   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15580 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15581   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15582 
15583 fi
15584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15585 $as_echo "$ac_cv_build" >&6; }
15586 case $ac_cv_build in
15587 *-*-*) ;;
15588 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15589 esac
15590 build=$ac_cv_build
15591 ac_save_IFS=$IFS; IFS='-'
15592 set x $ac_cv_build
15593 shift
15594 build_cpu=$1
15595 build_vendor=$2
15596 shift; shift
15597 # Remember, the first character of IFS is used to create $*,
15598 # except with old shells:
15599 build_os=$*
15600 IFS=$ac_save_IFS
15601 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15602 
15603 
15604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15605 $as_echo_n "checking host system type... " >&6; }
15606 if ${ac_cv_host+:} false; then :
15607   $as_echo_n "(cached) " >&6
15608 else
15609   if test "x$host_alias" = x; then
15610   ac_cv_host=$ac_cv_build
15611 else
15612   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15613     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15614 fi
15615 
15616 fi
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15618 $as_echo "$ac_cv_host" >&6; }
15619 case $ac_cv_host in
15620 *-*-*) ;;
15621 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15622 esac
15623 host=$ac_cv_host
15624 ac_save_IFS=$IFS; IFS='-'
15625 set x $ac_cv_host
15626 shift
15627 host_cpu=$1
15628 host_vendor=$2
15629 shift; shift
15630 # Remember, the first character of IFS is used to create $*,
15631 # except with old shells:
15632 host_os=$*
15633 IFS=$ac_save_IFS
15634 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15635 
15636 
15637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15638 $as_echo_n "checking target system type... " >&6; }
15639 if ${ac_cv_target+:} false; then :
15640   $as_echo_n "(cached) " >&6
15641 else
15642   if test "x$target_alias" = x; then
15643   ac_cv_target=$ac_cv_host
15644 else
15645   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15646     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15647 fi
15648 
15649 fi
15650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15651 $as_echo "$ac_cv_target" >&6; }
15652 case $ac_cv_target in
15653 *-*-*) ;;
15654 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15655 esac
15656 target=$ac_cv_target
15657 ac_save_IFS=$IFS; IFS='-'
15658 set x $ac_cv_target
15659 shift
15660 target_cpu=$1
15661 target_vendor=$2
15662 shift; shift
15663 # Remember, the first character of IFS is used to create $*,
15664 # except with old shells:
15665 target_os=$*
15666 IFS=$ac_save_IFS
15667 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15668 
15669 
15670 # The aliases save the names the user supplied, while $host etc.
15671 # will get canonicalized.
15672 test -n "$target_alias" &&
15673   test "$program_prefix$program_suffix$program_transform_name" = \
15674     NONENONEs,x,x, &&
15675   program_prefix=${target_alias}-
15676 
15677   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15678   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15679   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15680   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15681   # to use the configure naming style.
15682 
15683 
15684 
15685 
15686 
15687   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15688   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15689   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15690   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15691   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15692   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15693 
15694 
15695 
15696   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15697 
15698   case "$build_os" in
15699     *linux*)
15700       VAR_OS=linux
15701       VAR_OS_TYPE=unix
15702       ;;
15703     *solaris*)
15704       VAR_OS=solaris
15705       VAR_OS_TYPE=unix
15706       ;;
15707     *darwin*)
15708       VAR_OS=macosx
15709       VAR_OS_TYPE=unix
15710       ;;
15711     *bsd*)
15712       VAR_OS=bsd
15713       VAR_OS_TYPE=unix
15714       ;;
15715     *cygwin*)
15716       VAR_OS=windows
15717       VAR_OS_ENV=windows.cygwin
15718       ;;
15719     *mingw*)
15720       VAR_OS=windows
15721       VAR_OS_ENV=windows.msys
15722       ;;
15723     *aix*)
15724       VAR_OS=aix
15725       VAR_OS_TYPE=unix
15726       ;;
15727     *)
15728       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15729       ;;
15730   esac
15731 
15732 
15733   # First argument is the cpu name from the trip/quad
15734   case "$build_cpu" in
15735     x86_64)
15736       VAR_CPU=x86_64
15737       VAR_CPU_ARCH=x86
15738       VAR_CPU_BITS=64
15739       VAR_CPU_ENDIAN=little
15740       ;;
15741     i?86)
15742       VAR_CPU=x86
15743       VAR_CPU_ARCH=x86
15744       VAR_CPU_BITS=32
15745       VAR_CPU_ENDIAN=little
15746       ;;
15747     alpha*)
15748       VAR_CPU=alpha
15749       VAR_CPU_ARCH=alpha
15750       VAR_CPU_BITS=64
15751       VAR_CPU_ENDIAN=little
15752       ;;
15753     arm*)
15754       VAR_CPU=arm
15755       VAR_CPU_ARCH=arm
15756       VAR_CPU_BITS=32
15757       VAR_CPU_ENDIAN=little
15758       ;;
15759     aarch64)
15760       VAR_CPU=aarch64
15761       VAR_CPU_ARCH=aarch64
15762       VAR_CPU_BITS=64
15763       VAR_CPU_ENDIAN=little
15764       ;;
15765     m68k)
15766       VAR_CPU=m68k
15767       VAR_CPU_ARCH=m68k
15768       VAR_CPU_BITS=32
15769       VAR_CPU_ENDIAN=big
15770       ;;
15771     mips)
15772       VAR_CPU=mips
15773       VAR_CPU_ARCH=mips
15774       VAR_CPU_BITS=32
15775       VAR_CPU_ENDIAN=big
15776       ;;
15777     mipsel)
15778       VAR_CPU=mipsel
15779       VAR_CPU_ARCH=mipsel
15780       VAR_CPU_BITS=32
15781       VAR_CPU_ENDIAN=little
15782       ;;
15783     mips64)
15784       VAR_CPU=mips64
15785       VAR_CPU_ARCH=mips64
15786       VAR_CPU_BITS=64
15787       VAR_CPU_ENDIAN=big
15788       ;;
15789     mips64el)
15790       VAR_CPU=mips64el
15791       VAR_CPU_ARCH=mips64el
15792       VAR_CPU_BITS=64
15793       VAR_CPU_ENDIAN=little
15794       ;;
15795     powerpc)
15796       VAR_CPU=ppc
15797       VAR_CPU_ARCH=ppc
15798       VAR_CPU_BITS=32
15799       VAR_CPU_ENDIAN=big
15800       ;;
15801     powerpc64)
15802       VAR_CPU=ppc64
15803       VAR_CPU_ARCH=ppc
15804       VAR_CPU_BITS=64
15805       VAR_CPU_ENDIAN=big
15806       ;;
15807     powerpc64le)
15808       VAR_CPU=ppc64le
15809       VAR_CPU_ARCH=ppc
15810       VAR_CPU_BITS=64
15811       VAR_CPU_ENDIAN=little
15812       ;;
15813     s390)
15814       VAR_CPU=s390
15815       VAR_CPU_ARCH=s390
15816       VAR_CPU_BITS=32
15817       VAR_CPU_ENDIAN=big
15818       ;;
15819     s390x)
15820       VAR_CPU=s390x
15821       VAR_CPU_ARCH=s390
15822       VAR_CPU_BITS=64
15823       VAR_CPU_ENDIAN=big
15824       ;;
15825     sh*eb)
15826       VAR_CPU=sh
15827       VAR_CPU_ARCH=sh
15828       VAR_CPU_BITS=32
15829       VAR_CPU_ENDIAN=big
15830       ;;
15831     sh*)
15832       VAR_CPU=sh
15833       VAR_CPU_ARCH=sh
15834       VAR_CPU_BITS=32
15835       VAR_CPU_ENDIAN=little
15836       ;;
15837     sparc)
15838       VAR_CPU=sparc
15839       VAR_CPU_ARCH=sparc
15840       VAR_CPU_BITS=32
15841       VAR_CPU_ENDIAN=big
15842       ;;
15843     sparcv9|sparc64)
15844       VAR_CPU=sparcv9
15845       VAR_CPU_ARCH=sparc
15846       VAR_CPU_BITS=64
15847       VAR_CPU_ENDIAN=big
15848       ;;
15849     *)
15850       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15851       ;;
15852   esac
15853 
15854   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15855   OPENJDK_BUILD_OS="$VAR_OS"
15856   if test "x$VAR_OS_TYPE" != x; then
15857     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15858   else
15859     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15860   fi
15861   if test "x$VAR_OS_ENV" != x; then
15862     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15863   else
15864     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15865   fi
15866   OPENJDK_BUILD_CPU="$VAR_CPU"
15867   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15868   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15869   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15870 
15871 
15872 
15873 
15874 
15875 
15876 
15877 
15878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15879 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15880   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15881 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15882 
15883   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15884 
15885   case "$host_os" in
15886     *linux*)
15887       VAR_OS=linux
15888       VAR_OS_TYPE=unix
15889       ;;
15890     *solaris*)
15891       VAR_OS=solaris
15892       VAR_OS_TYPE=unix
15893       ;;
15894     *darwin*)
15895       VAR_OS=macosx
15896       VAR_OS_TYPE=unix
15897       ;;
15898     *bsd*)
15899       VAR_OS=bsd
15900       VAR_OS_TYPE=unix
15901       ;;
15902     *cygwin*)
15903       VAR_OS=windows
15904       VAR_OS_ENV=windows.cygwin
15905       ;;
15906     *mingw*)
15907       VAR_OS=windows
15908       VAR_OS_ENV=windows.msys
15909       ;;
15910     *aix*)
15911       VAR_OS=aix
15912       VAR_OS_TYPE=unix
15913       ;;
15914     *)
15915       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15916       ;;
15917   esac
15918 
15919 
15920   # First argument is the cpu name from the trip/quad
15921   case "$host_cpu" in
15922     x86_64)
15923       VAR_CPU=x86_64
15924       VAR_CPU_ARCH=x86
15925       VAR_CPU_BITS=64
15926       VAR_CPU_ENDIAN=little
15927       ;;
15928     i?86)
15929       VAR_CPU=x86
15930       VAR_CPU_ARCH=x86
15931       VAR_CPU_BITS=32
15932       VAR_CPU_ENDIAN=little
15933       ;;
15934     alpha*)
15935       VAR_CPU=alpha
15936       VAR_CPU_ARCH=alpha
15937       VAR_CPU_BITS=64
15938       VAR_CPU_ENDIAN=little
15939       ;;
15940     arm*)
15941       VAR_CPU=arm
15942       VAR_CPU_ARCH=arm
15943       VAR_CPU_BITS=32
15944       VAR_CPU_ENDIAN=little
15945       ;;
15946     aarch64)
15947       VAR_CPU=aarch64
15948       VAR_CPU_ARCH=aarch64
15949       VAR_CPU_BITS=64
15950       VAR_CPU_ENDIAN=little
15951       ;;
15952     m68k)
15953       VAR_CPU=m68k
15954       VAR_CPU_ARCH=m68k
15955       VAR_CPU_BITS=32
15956       VAR_CPU_ENDIAN=big
15957       ;;
15958     mips)
15959       VAR_CPU=mips
15960       VAR_CPU_ARCH=mips
15961       VAR_CPU_BITS=32
15962       VAR_CPU_ENDIAN=big
15963       ;;
15964     mipsel)
15965       VAR_CPU=mipsel
15966       VAR_CPU_ARCH=mipsel
15967       VAR_CPU_BITS=32
15968       VAR_CPU_ENDIAN=little
15969       ;;
15970     mips64)
15971       VAR_CPU=mips64
15972       VAR_CPU_ARCH=mips64
15973       VAR_CPU_BITS=64
15974       VAR_CPU_ENDIAN=big
15975       ;;
15976     mips64el)
15977       VAR_CPU=mips64el
15978       VAR_CPU_ARCH=mips64el
15979       VAR_CPU_BITS=64
15980       VAR_CPU_ENDIAN=little
15981       ;;
15982     powerpc)
15983       VAR_CPU=ppc
15984       VAR_CPU_ARCH=ppc
15985       VAR_CPU_BITS=32
15986       VAR_CPU_ENDIAN=big
15987       ;;
15988     powerpc64)
15989       VAR_CPU=ppc64
15990       VAR_CPU_ARCH=ppc
15991       VAR_CPU_BITS=64
15992       VAR_CPU_ENDIAN=big
15993       ;;
15994     powerpc64le)
15995       VAR_CPU=ppc64le
15996       VAR_CPU_ARCH=ppc
15997       VAR_CPU_BITS=64
15998       VAR_CPU_ENDIAN=little
15999       ;;
16000     s390)
16001       VAR_CPU=s390
16002       VAR_CPU_ARCH=s390
16003       VAR_CPU_BITS=32
16004       VAR_CPU_ENDIAN=big
16005       ;;
16006     s390x)
16007       VAR_CPU=s390x
16008       VAR_CPU_ARCH=s390
16009       VAR_CPU_BITS=64
16010       VAR_CPU_ENDIAN=big
16011       ;;
16012     sh*eb)
16013       VAR_CPU=sh
16014       VAR_CPU_ARCH=sh
16015       VAR_CPU_BITS=32
16016       VAR_CPU_ENDIAN=big
16017       ;;
16018     sh*)
16019       VAR_CPU=sh
16020       VAR_CPU_ARCH=sh
16021       VAR_CPU_BITS=32
16022       VAR_CPU_ENDIAN=little
16023       ;;
16024     sparc)
16025       VAR_CPU=sparc
16026       VAR_CPU_ARCH=sparc
16027       VAR_CPU_BITS=32
16028       VAR_CPU_ENDIAN=big
16029       ;;
16030     sparcv9|sparc64)
16031       VAR_CPU=sparcv9
16032       VAR_CPU_ARCH=sparc
16033       VAR_CPU_BITS=64
16034       VAR_CPU_ENDIAN=big
16035       ;;
16036     *)
16037       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
16038       ;;
16039   esac
16040 
16041   # ... and setup our own variables. (Do this explicitly to facilitate searching)
16042   OPENJDK_TARGET_OS="$VAR_OS"
16043   if test "x$VAR_OS_TYPE" != x; then
16044     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
16045   else
16046     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
16047   fi
16048   if test "x$VAR_OS_ENV" != x; then
16049     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
16050   else
16051     OPENJDK_TARGET_OS_ENV="$VAR_OS"
16052   fi
16053   OPENJDK_TARGET_CPU="$VAR_CPU"
16054   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
16055   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
16056   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
16057 
16058 
16059 
16060 
16061 
16062 
16063 
16064 
16065   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16066 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
16067   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16068 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16069 
16070 
16071 
16072 # Check whether --with-target-bits was given.
16073 if test "${with_target_bits+set}" = set; then :
16074   withval=$with_target_bits;
16075 fi
16076 
16077 
16078   # We have three types of compiles:
16079   # native  == normal compilation, target system == build system
16080   # cross   == traditional cross compilation, target system != build system; special toolchain needed
16081   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16082   #
16083   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16084     # We're doing a proper cross-compilation
16085     COMPILE_TYPE="cross"
16086   else
16087     COMPILE_TYPE="native"
16088   fi
16089 
16090   if test "x$with_target_bits" != x; then
16091     if test "x$COMPILE_TYPE" = "xcross"; then
16092       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16093     fi
16094 
16095     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16096       # A reduced build is requested
16097       COMPILE_TYPE="reduced"
16098       OPENJDK_TARGET_CPU_BITS=32
16099       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16100         OPENJDK_TARGET_CPU=x86
16101       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16102         OPENJDK_TARGET_CPU=sparc
16103       else
16104         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16105       fi
16106     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16107       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
16108     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16109       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16110 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16111     else
16112       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16113     fi
16114   fi
16115 
16116 
16117   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16118 $as_echo_n "checking compilation type... " >&6; }
16119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16120 $as_echo "$COMPILE_TYPE" >&6; }
16121 
16122 
16123   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16124     OPENJDK_MODULE_TARGET_OS_NAME="macos"
16125   else
16126     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16127   fi
16128 
16129   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16130     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16131   else
16132     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16133   fi
16134 
16135   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16136 
16137 
16138 
16139   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16140     RELEASE_FILE_OS_NAME=SunOS
16141   fi
16142   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16143     RELEASE_FILE_OS_NAME=Linux
16144   fi
16145   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16146     RELEASE_FILE_OS_NAME=Windows
16147   fi
16148   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16149     RELEASE_FILE_OS_NAME="Darwin"
16150   fi
16151   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16152     RELEASE_FILE_OS_NAME="AIX"
16153   fi
16154   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16155 
16156 
16157 
16158 
16159 
16160 
16161   # Also store the legacy naming of the cpu.
16162   # Ie i586 and amd64 instead of x86 and x86_64
16163   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16164   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16165     OPENJDK_TARGET_CPU_LEGACY="i586"
16166   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16167     # On all platforms except MacOSX replace x86_64 with amd64.
16168     OPENJDK_TARGET_CPU_LEGACY="amd64"
16169   elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
16170     # Avoid name collisions with variables named alpha
16171     OPENJDK_TARGET_CPU_LEGACY="_alpha_"
16172   elif test "x$OPENJDK_TARGET_CPU" = xsh; then
16173     # Avoid name collisions with variables named sh
16174     OPENJDK_TARGET_CPU_LEGACY="_sh_"
16175   fi
16176 
16177 
16178   # And the second legacy naming of the cpu.
16179   # Ie i386 and amd64 instead of x86 and x86_64.
16180   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16181   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16182     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16183   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16184     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16185   fi
16186 
16187 
16188   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16189   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16190   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16191   OPENJDK_TARGET_CPU_ISADIR=""
16192   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16193     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16194       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16195     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16196       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16197     fi
16198   fi
16199 
16200 
16201   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16202   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16203   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16204     # On linux only, we replace x86 with i386.
16205     OPENJDK_TARGET_CPU_OSARCH="i386"
16206   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16207     # On all platforms except macosx, we replace x86_64 with amd64.
16208     OPENJDK_TARGET_CPU_OSARCH="amd64"
16209   fi
16210 
16211 
16212   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16213   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16214     OPENJDK_TARGET_CPU_JLI="i386"
16215   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16216     # On all platforms except macosx, we replace x86_64 with amd64.
16217     OPENJDK_TARGET_CPU_JLI="amd64"
16218   fi
16219 
16220   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16221   # Macosx is osx and x86_64 is x64
16222   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16223     OPENJDK_TARGET_OS_BUNDLE="osx"
16224   else
16225     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16226   fi
16227   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16228     OPENJDK_TARGET_CPU_BUNDLE="x64"
16229   else
16230     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16231   fi
16232   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16233 
16234 
16235   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16236     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16237     # unpack200.exe. This variable is used in
16238     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16239     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16240       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16241     fi
16242   fi
16243 
16244   if test "x$COMPILE_TYPE" = "xcross"; then
16245     # FIXME: ... or should this include reduced builds..?
16246     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16247   else
16248     DEFINE_CROSS_COMPILE_ARCH=""
16249   fi
16250 
16251 
16252   # Convert openjdk platform names to hotspot names
16253 
16254   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16255   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16256     HOTSPOT_TARGET_OS=bsd
16257   fi
16258 
16259 
16260   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16261   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16262     HOTSPOT_TARGET_OS_TYPE=posix
16263   fi
16264 
16265 
16266   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16267   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16268     HOTSPOT_TARGET_CPU=x86_32
16269   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16270     HOTSPOT_TARGET_CPU=sparc
16271   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16272     HOTSPOT_TARGET_CPU=ppc_64
16273   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16274     HOTSPOT_TARGET_CPU=ppc_64
16275   fi
16276 
16277 
16278   # This is identical with OPENJDK_*, but define anyway for consistency.
16279   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16280 
16281 
16282   # Setup HOTSPOT_TARGET_CPU_DEFINE
16283   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16284     HOTSPOT_TARGET_CPU_DEFINE=IA32
16285   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16286     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16287   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16288     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16289   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16290     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16291   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16292     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16293   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16294     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16295 
16296   # The cpu defines below are for zero, we don't support them directly.
16297   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16298     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16299   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16300     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16301   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16302     HOTSPOT_TARGET_CPU_DEFINE=S390
16303   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16304     HOTSPOT_TARGET_CPU_DEFINE=S390
16305   elif test "x$OPENJDK_TARGET_CPU" != x; then
16306     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16307   fi
16308 
16309 
16310   # For historical reasons, the OS include directories have odd names.
16311   OPENJDK_TARGET_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
16312   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16313     OPENJDK_TARGET_OS_INCLUDE_SUBDIR="win32"
16314   elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16315     OPENJDK_TARGET_OS_INCLUDE_SUBDIR="darwin"
16316   fi
16317 
16318 
16319 
16320   # Also store the legacy naming of the cpu.
16321   # Ie i586 and amd64 instead of x86 and x86_64
16322   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16323   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16324     OPENJDK_BUILD_CPU_LEGACY="i586"
16325   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16326     # On all platforms except MacOSX replace x86_64 with amd64.
16327     OPENJDK_BUILD_CPU_LEGACY="amd64"
16328   elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
16329     # Avoid name collisions with variables named alpha
16330     OPENJDK_BUILD_CPU_LEGACY="_alpha_"
16331   elif test "x$OPENJDK_BUILD_CPU" = xsh; then
16332     # Avoid name collisions with variables named sh
16333     OPENJDK_BUILD_CPU_LEGACY="_sh_"
16334   fi
16335 
16336 
16337   # And the second legacy naming of the cpu.
16338   # Ie i386 and amd64 instead of x86 and x86_64.
16339   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16340   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16341     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16342   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16343     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16344   fi
16345 
16346 
16347   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16348   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16349   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16350   OPENJDK_BUILD_CPU_ISADIR=""
16351   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16352     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16353       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16354     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16355       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16356     fi
16357   fi
16358 
16359 
16360   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16361   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16362   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16363     # On linux only, we replace x86 with i386.
16364     OPENJDK_BUILD_CPU_OSARCH="i386"
16365   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16366     # On all platforms except macosx, we replace x86_64 with amd64.
16367     OPENJDK_BUILD_CPU_OSARCH="amd64"
16368   fi
16369 
16370 
16371   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16372   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16373     OPENJDK_BUILD_CPU_JLI="i386"
16374   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16375     # On all platforms except macosx, we replace x86_64 with amd64.
16376     OPENJDK_BUILD_CPU_JLI="amd64"
16377   fi
16378 
16379   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16380   # Macosx is osx and x86_64 is x64
16381   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16382     OPENJDK_BUILD_OS_BUNDLE="osx"
16383   else
16384     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16385   fi
16386   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16387     OPENJDK_BUILD_CPU_BUNDLE="x64"
16388   else
16389     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16390   fi
16391   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16392 
16393 
16394   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16395     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16396     # unpack200.exe. This variable is used in
16397     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16398     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16399       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16400     fi
16401   fi
16402 
16403   if test "x$COMPILE_TYPE" = "xcross"; then
16404     # FIXME: ... or should this include reduced builds..?
16405     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16406   else
16407     DEFINE_CROSS_COMPILE_ARCH=""
16408   fi
16409 
16410 
16411   # Convert openjdk platform names to hotspot names
16412 
16413   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16414   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16415     HOTSPOT_BUILD_OS=bsd
16416   fi
16417 
16418 
16419   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16420   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16421     HOTSPOT_BUILD_OS_TYPE=posix
16422   fi
16423 
16424 
16425   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16426   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16427     HOTSPOT_BUILD_CPU=x86_32
16428   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16429     HOTSPOT_BUILD_CPU=sparc
16430   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16431     HOTSPOT_BUILD_CPU=ppc_64
16432   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16433     HOTSPOT_BUILD_CPU=ppc_64
16434   fi
16435 
16436 
16437   # This is identical with OPENJDK_*, but define anyway for consistency.
16438   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16439 
16440 
16441   # Setup HOTSPOT_BUILD_CPU_DEFINE
16442   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16443     HOTSPOT_BUILD_CPU_DEFINE=IA32
16444   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16445     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16446   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16447     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16448   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16449     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16450   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16451     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16452   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16453     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16454 
16455   # The cpu defines below are for zero, we don't support them directly.
16456   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16457     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16458   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16459     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16460   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16461     HOTSPOT_BUILD_CPU_DEFINE=S390
16462   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16463     HOTSPOT_BUILD_CPU_DEFINE=S390
16464   elif test "x$OPENJDK_BUILD_CPU" != x; then
16465     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16466   fi
16467 
16468 
16469   # For historical reasons, the OS include directories have odd names.
16470   OPENJDK_BUILD_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
16471   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16472     OPENJDK_BUILD_OS_INCLUDE_SUBDIR="win32"
16473   elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16474     OPENJDK_BUILD_OS_INCLUDE_SUBDIR="darwin"
16475   fi
16476 
16477 
16478 
16479 
16480 
16481 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16482 
16483   # Save the current directory this script was started from
16484   CURDIR="$PWD"
16485 
16486   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16487   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16488   # was not available at that time.
16489   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16490   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16491     ORIGINAL_PATH="$REWRITTEN_PATH"
16492     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16493 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16494   fi
16495 
16496   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16497     PATH_SEP=";"
16498 
16499   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16500   if test $SRC_ROOT_LENGTH -gt 100; then
16501     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16502   fi
16503 
16504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16505     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16506 $as_echo_n "checking cygwin release... " >&6; }
16507     CYGWIN_VERSION=`$UNAME -r`
16508     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16509 $as_echo "$CYGWIN_VERSION" >&6; }
16510     WINDOWS_ENV_VENDOR='cygwin'
16511     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16512 
16513     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16514     if test "x$CYGWIN_VERSION_OLD" != x; then
16515       { $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
16516 $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;}
16517       as_fn_error $? "Cannot continue" "$LINENO" 5
16518     fi
16519     if test "x$CYGPATH" = x; then
16520       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16521     fi
16522     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16523 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16524     # The cmd output ends with Windows line endings (CR/LF)
16525     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16526     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16527     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16528     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16529 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16530     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16531     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16532     if test "x$test_cygdrive_prefix" = x; then
16533       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16534     fi
16535   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16536     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16537 $as_echo_n "checking msys release... " >&6; }
16538     MSYS_VERSION=`$UNAME -r`
16539     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16540 $as_echo "$MSYS_VERSION" >&6; }
16541 
16542     WINDOWS_ENV_VENDOR='msys'
16543     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16544 
16545     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16546 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16547     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16548     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16549 
16550   windows_path="$MSYS_ROOT_PATH"
16551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16552     unix_path=`$CYGPATH -u "$windows_path"`
16553     MSYS_ROOT_PATH="$unix_path"
16554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16556     MSYS_ROOT_PATH="$unix_path"
16557   fi
16558 
16559     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16560 $as_echo "$MSYS_ROOT_PATH" >&6; }
16561     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16562   else
16563     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16564   fi
16565 
16566   # Test if windows or unix (cygwin/msys) find is first in path.
16567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16568 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16569   FIND_BINARY_OUTPUT=`find --version 2>&1`
16570   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16571     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16572 $as_echo "unix style" >&6; }
16573   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16574     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16575 $as_echo "Windows" >&6; }
16576     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16577 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16578     { $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
16579 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16580     as_fn_error $? "Cannot continue" "$LINENO" 5
16581   else
16582     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16583 $as_echo "unknown" >&6; }
16584     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16585 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16586   fi
16587 
16588   else
16589     PATH_SEP=":"
16590   fi
16591 
16592 
16593   # We get the top-level directory from the supporting wrappers.
16594   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16595 $as_echo_n "checking for top-level directory... " >&6; }
16596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16597 $as_echo "$TOPDIR" >&6; }
16598 
16599 
16600   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16601 
16602   # Only process if variable expands to non-empty
16603 
16604   if test "x$CURDIR" != x; then
16605     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16606 
16607   # Input might be given as Windows format, start by converting to
16608   # unix format.
16609   path="$CURDIR"
16610   new_path=`$CYGPATH -u "$path"`
16611 
16612   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16613   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16614   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16615   # "foo.exe" is OK but "foo" is an error.
16616   #
16617   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16618   # It is also a way to make sure we got the proper file name for the real test later on.
16619   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16620   if test "x$test_shortpath" = x; then
16621     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16622 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16623     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16624   fi
16625 
16626   # Call helper function which possibly converts this using DOS-style short mode.
16627   # If so, the updated path is stored in $new_path.
16628 
16629   input_path="$new_path"
16630   # Check if we need to convert this using DOS-style short mode. If the path
16631   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16632   # take no chances and rewrite it.
16633   # Note: m4 eats our [], so we need to use [ and ] instead.
16634   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16635   if test "x$has_forbidden_chars" != x; then
16636     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16637     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16638     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16639     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16640       # Going to short mode and back again did indeed matter. Since short mode is
16641       # case insensitive, let's make it lowercase to improve readability.
16642       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16643       # Now convert it back to Unix-style (cygpath)
16644       input_path=`$CYGPATH -u "$shortmode_path"`
16645       new_path="$input_path"
16646     fi
16647   fi
16648 
16649   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16650   if test "x$test_cygdrive_prefix" = x; then
16651     # As a simple fix, exclude /usr/bin since it's not a real path.
16652     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16653       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16654       # a path prefixed by /cygdrive for fixpath to work.
16655       new_path="$CYGWIN_ROOT_PATH$input_path"
16656     fi
16657   fi
16658 
16659 
16660   if test "x$path" != "x$new_path"; then
16661     CURDIR="$new_path"
16662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16663 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16664   fi
16665 
16666     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16667 
16668   path="$CURDIR"
16669   has_colon=`$ECHO $path | $GREP ^.:`
16670   new_path="$path"
16671   if test "x$has_colon" = x; then
16672     # Not in mixed or Windows style, start by that.
16673     new_path=`cmd //c echo $path`
16674   fi
16675 
16676 
16677   input_path="$new_path"
16678   # Check if we need to convert this using DOS-style short mode. If the path
16679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16680   # take no chances and rewrite it.
16681   # Note: m4 eats our [], so we need to use [ and ] instead.
16682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16683   if test "x$has_forbidden_chars" != x; then
16684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16685     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16686   fi
16687 
16688 
16689   windows_path="$new_path"
16690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16691     unix_path=`$CYGPATH -u "$windows_path"`
16692     new_path="$unix_path"
16693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16695     new_path="$unix_path"
16696   fi
16697 
16698   if test "x$path" != "x$new_path"; then
16699     CURDIR="$new_path"
16700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16701 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16702   fi
16703 
16704   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16705   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16706 
16707     else
16708       # We're on a unix platform. Hooray! :)
16709       path="$CURDIR"
16710       has_space=`$ECHO "$path" | $GREP " "`
16711       if test "x$has_space" != x; then
16712         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16713 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16714         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16715       fi
16716 
16717       # Use eval to expand a potential ~
16718       eval path="$path"
16719       if test ! -f "$path" && test ! -d "$path"; then
16720         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16721       fi
16722 
16723       if test -d "$path"; then
16724         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16725       else
16726         dir="`$DIRNAME "$path"`"
16727         base="`$BASENAME "$path"`"
16728         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16729       fi
16730     fi
16731   fi
16732 
16733 
16734   # Only process if variable expands to non-empty
16735 
16736   if test "x$TOPDIR" != x; then
16737     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16738 
16739   # Input might be given as Windows format, start by converting to
16740   # unix format.
16741   path="$TOPDIR"
16742   new_path=`$CYGPATH -u "$path"`
16743 
16744   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16745   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16746   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16747   # "foo.exe" is OK but "foo" is an error.
16748   #
16749   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16750   # It is also a way to make sure we got the proper file name for the real test later on.
16751   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16752   if test "x$test_shortpath" = x; then
16753     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16754 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16755     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16756   fi
16757 
16758   # Call helper function which possibly converts this using DOS-style short mode.
16759   # If so, the updated path is stored in $new_path.
16760 
16761   input_path="$new_path"
16762   # Check if we need to convert this using DOS-style short mode. If the path
16763   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16764   # take no chances and rewrite it.
16765   # Note: m4 eats our [], so we need to use [ and ] instead.
16766   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16767   if test "x$has_forbidden_chars" != x; then
16768     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16769     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16770     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16771     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16772       # Going to short mode and back again did indeed matter. Since short mode is
16773       # case insensitive, let's make it lowercase to improve readability.
16774       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16775       # Now convert it back to Unix-style (cygpath)
16776       input_path=`$CYGPATH -u "$shortmode_path"`
16777       new_path="$input_path"
16778     fi
16779   fi
16780 
16781   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16782   if test "x$test_cygdrive_prefix" = x; then
16783     # As a simple fix, exclude /usr/bin since it's not a real path.
16784     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16785       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16786       # a path prefixed by /cygdrive for fixpath to work.
16787       new_path="$CYGWIN_ROOT_PATH$input_path"
16788     fi
16789   fi
16790 
16791 
16792   if test "x$path" != "x$new_path"; then
16793     TOPDIR="$new_path"
16794     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16795 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16796   fi
16797 
16798     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16799 
16800   path="$TOPDIR"
16801   has_colon=`$ECHO $path | $GREP ^.:`
16802   new_path="$path"
16803   if test "x$has_colon" = x; then
16804     # Not in mixed or Windows style, start by that.
16805     new_path=`cmd //c echo $path`
16806   fi
16807 
16808 
16809   input_path="$new_path"
16810   # Check if we need to convert this using DOS-style short mode. If the path
16811   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16812   # take no chances and rewrite it.
16813   # Note: m4 eats our [], so we need to use [ and ] instead.
16814   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16815   if test "x$has_forbidden_chars" != x; then
16816     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16817     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16818   fi
16819 
16820 
16821   windows_path="$new_path"
16822   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823     unix_path=`$CYGPATH -u "$windows_path"`
16824     new_path="$unix_path"
16825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827     new_path="$unix_path"
16828   fi
16829 
16830   if test "x$path" != "x$new_path"; then
16831     TOPDIR="$new_path"
16832     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16833 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16834   fi
16835 
16836   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16837   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16838 
16839     else
16840       # We're on a unix platform. Hooray! :)
16841       path="$TOPDIR"
16842       has_space=`$ECHO "$path" | $GREP " "`
16843       if test "x$has_space" != x; then
16844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16845 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16846         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16847       fi
16848 
16849       # Use eval to expand a potential ~
16850       eval path="$path"
16851       if test ! -f "$path" && test ! -d "$path"; then
16852         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16853       fi
16854 
16855       if test -d "$path"; then
16856         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16857       else
16858         dir="`$DIRNAME "$path"`"
16859         base="`$BASENAME "$path"`"
16860         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16861       fi
16862     fi
16863   fi
16864 
16865 
16866   # Locate the directory of this script.
16867   AUTOCONF_DIR=$TOPDIR/make/autoconf
16868 
16869   # Setup username (for use in adhoc version strings etc)
16870   # Outer [ ] to quote m4.
16871    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16872 
16873 
16874 
16875 # Check if it's a pure open build or if custom sources are to be used.
16876 
16877   # Check whether --enable-openjdk-only was given.
16878 if test "${enable_openjdk_only+set}" = set; then :
16879   enableval=$enable_openjdk_only;
16880 else
16881   enable_openjdk_only="no"
16882 fi
16883 
16884 
16885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16886 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16888 $as_echo "$enable_openjdk_only" >&6; }
16889   if test "x$enable_openjdk_only" = "xyes"; then
16890     SUPPRESS_CUSTOM_EXTENSIONS="true"
16891   elif test "x$enable_openjdk_only" = "xno"; then
16892     SUPPRESS_CUSTOM_EXTENSIONS="false"
16893   else
16894     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16895   fi
16896 
16897   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16898   # the IncludeCustomExtension macro.
16899 
16900 
16901 # Check whether --with-custom-make-dir was given.
16902 if test "${with_custom_make_dir+set}" = set; then :
16903   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
16904 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16905 fi
16906 
16907 
16908 
16909 
16910 # These are needed to be able to create a configuration name (and thus the output directory)
16911 
16912   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16913 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16914 
16915 # Check whether --with-jdk-variant was given.
16916 if test "${with_jdk_variant+set}" = set; then :
16917   withval=$with_jdk_variant;
16918 fi
16919 
16920 
16921   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16922     JDK_VARIANT="normal"
16923   else
16924     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16925   fi
16926 
16927 
16928 
16929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16930 $as_echo "$JDK_VARIANT" >&6; }
16931 
16932 
16933   DEBUG_LEVEL="release"
16934   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16935 $as_echo_n "checking which debug level to use... " >&6; }
16936   # Check whether --enable-debug was given.
16937 if test "${enable_debug+set}" = set; then :
16938   enableval=$enable_debug;
16939         ENABLE_DEBUG="${enableval}"
16940         DEBUG_LEVEL="fastdebug"
16941 
16942 else
16943   ENABLE_DEBUG="no"
16944 fi
16945 
16946 
16947 
16948 # Check whether --with-debug-level was given.
16949 if test "${with_debug_level+set}" = set; then :
16950   withval=$with_debug_level;
16951         DEBUG_LEVEL="${withval}"
16952         if test "x$ENABLE_DEBUG" = xyes; then
16953           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16954         fi
16955 
16956 fi
16957 
16958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16959 $as_echo "$DEBUG_LEVEL" >&6; }
16960 
16961   if test "x$DEBUG_LEVEL" != xrelease && \
16962       test "x$DEBUG_LEVEL" != xoptimized && \
16963       test "x$DEBUG_LEVEL" != xfastdebug && \
16964       test "x$DEBUG_LEVEL" != xslowdebug; then
16965     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16966   fi
16967 
16968   # Translate DEBUG_LEVEL to debug level used by Hotspot
16969   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16970   if test "x$DEBUG_LEVEL" = xrelease; then
16971     HOTSPOT_DEBUG_LEVEL="product"
16972   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16973     HOTSPOT_DEBUG_LEVEL="debug"
16974   fi
16975 
16976   if test "x$DEBUG_LEVEL" = xoptimized; then
16977     # The debug level 'optimized' is a little special because it is currently only
16978     # applicable to the HotSpot build where it means to build a completely
16979     # optimized version of the VM without any debugging code (like for the
16980     # 'release' debug level which is called 'product' in the HotSpot build) but
16981     # with the exception that it can contain additional code which is otherwise
16982     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16983     # test new and/or experimental features which are not intended for customer
16984     # shipment. Because these new features need to be tested and benchmarked in
16985     # real world scenarios, we want to build the containing JDK at the 'release'
16986     # debug level.
16987     DEBUG_LEVEL="release"
16988   fi
16989 
16990 
16991 
16992 
16993 
16994 
16995 # Check whether --with-jvm-variants was given.
16996 if test "${with_jvm_variants+set}" = set; then :
16997   withval=$with_jvm_variants;
16998 fi
16999 
17000 
17001 
17002 
17003 # Check whether --with-cpu-port was given.
17004 if test "${with_cpu_port+set}" = set; then :
17005   withval=$with_cpu_port;
17006 fi
17007 
17008 
17009   if test "x$with_cpu_port" != x; then
17010     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17011       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17012     fi
17013     if test "x$with_cpu_port" != xarm64 && \
17014         test "x$with_cpu_port" != xaarch64; then
17015       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17016     fi
17017     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17018   fi
17019 
17020 
17021   if test "x$with_jvm_variants" = x; then
17022     with_jvm_variants="server"
17023   fi
17024   JVM_VARIANTS_OPT="$with_jvm_variants"
17025 
17026   # Has the user listed more than one variant?
17027   # Additional [] needed to keep m4 from mangling shell constructs.
17028   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17029     BUILDING_MULTIPLE_JVM_VARIANTS=true
17030   else
17031     BUILDING_MULTIPLE_JVM_VARIANTS=false
17032   fi
17033   # Replace the commas with AND for use in the build directory name.
17034   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17035 
17036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17037 $as_echo_n "checking which variants of the JVM to build... " >&6; }
17038   # JVM_VARIANTS is a space-separated list.
17039   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17040   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17042 $as_echo "$JVM_VARIANTS" >&6; }
17043 
17044   # Check that the selected variants are valid
17045 
17046   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17047   # Notice that the original variant failes on SLES 10 and 11
17048   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17049   STACK=${JVM_VARIANTS// /$'\n'}
17050   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17051   if test "x$INVALID_VARIANTS" != x; then
17052     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17053 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17054     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17055   fi
17056 
17057   # All "special" variants share the same output directory ("server")
17058   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17059   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17060   STACK=${JVM_VARIANTS// /$'\n'}
17061   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17062   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17063     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17064   fi
17065 
17066   # The "main" variant is the one used by other libs to link against during the
17067   # build.
17068   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17069     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17070     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17071       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17072         JVM_VARIANT_MAIN="$variant"
17073         break
17074       fi
17075     done
17076   else
17077     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17078   fi
17079 
17080 
17081 
17082 
17083 
17084   if   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
17085     # zero behaves as a platform and rewrites these values. This is really weird. :(
17086     # We are guaranteed that we do not build any other variants when building zero.
17087     HOTSPOT_TARGET_CPU=zero
17088     HOTSPOT_TARGET_CPU_ARCH=zero
17089   fi
17090 
17091 
17092 # With basic setup done, call the custom early hook.
17093 
17094 
17095 # Check if we have devkits, extra paths or sysroot set.
17096 
17097 
17098 # Check whether --with-devkit was given.
17099 if test "${with_devkit+set}" = set; then :
17100   withval=$with_devkit;
17101 
17102   # Only process if variable expands to non-empty
17103 
17104   if test "x$with_devkit" != x; then
17105     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17106 
17107   # Input might be given as Windows format, start by converting to
17108   # unix format.
17109   path="$with_devkit"
17110   new_path=`$CYGPATH -u "$path"`
17111 
17112   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17113   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17114   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17115   # "foo.exe" is OK but "foo" is an error.
17116   #
17117   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17118   # It is also a way to make sure we got the proper file name for the real test later on.
17119   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17120   if test "x$test_shortpath" = x; then
17121     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17122 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17123     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17124   fi
17125 
17126   # Call helper function which possibly converts this using DOS-style short mode.
17127   # If so, the updated path is stored in $new_path.
17128 
17129   input_path="$new_path"
17130   # Check if we need to convert this using DOS-style short mode. If the path
17131   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17132   # take no chances and rewrite it.
17133   # Note: m4 eats our [], so we need to use [ and ] instead.
17134   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17135   if test "x$has_forbidden_chars" != x; then
17136     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17137     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17138     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17139     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17140       # Going to short mode and back again did indeed matter. Since short mode is
17141       # case insensitive, let's make it lowercase to improve readability.
17142       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17143       # Now convert it back to Unix-style (cygpath)
17144       input_path=`$CYGPATH -u "$shortmode_path"`
17145       new_path="$input_path"
17146     fi
17147   fi
17148 
17149   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17150   if test "x$test_cygdrive_prefix" = x; then
17151     # As a simple fix, exclude /usr/bin since it's not a real path.
17152     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17153       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17154       # a path prefixed by /cygdrive for fixpath to work.
17155       new_path="$CYGWIN_ROOT_PATH$input_path"
17156     fi
17157   fi
17158 
17159 
17160   if test "x$path" != "x$new_path"; then
17161     with_devkit="$new_path"
17162     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17163 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17164   fi
17165 
17166     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17167 
17168   path="$with_devkit"
17169   has_colon=`$ECHO $path | $GREP ^.:`
17170   new_path="$path"
17171   if test "x$has_colon" = x; then
17172     # Not in mixed or Windows style, start by that.
17173     new_path=`cmd //c echo $path`
17174   fi
17175 
17176 
17177   input_path="$new_path"
17178   # Check if we need to convert this using DOS-style short mode. If the path
17179   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17180   # take no chances and rewrite it.
17181   # Note: m4 eats our [], so we need to use [ and ] instead.
17182   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17183   if test "x$has_forbidden_chars" != x; then
17184     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17185     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17186   fi
17187 
17188 
17189   windows_path="$new_path"
17190   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17191     unix_path=`$CYGPATH -u "$windows_path"`
17192     new_path="$unix_path"
17193   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17194     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17195     new_path="$unix_path"
17196   fi
17197 
17198   if test "x$path" != "x$new_path"; then
17199     with_devkit="$new_path"
17200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17201 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17202   fi
17203 
17204   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17205   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17206 
17207     else
17208       # We're on a unix platform. Hooray! :)
17209       path="$with_devkit"
17210       has_space=`$ECHO "$path" | $GREP " "`
17211       if test "x$has_space" != x; then
17212         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17213 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17214         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17215       fi
17216 
17217       # Use eval to expand a potential ~
17218       eval path="$path"
17219       if test ! -f "$path" && test ! -d "$path"; then
17220         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17221       fi
17222 
17223       if test -d "$path"; then
17224         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17225       else
17226         dir="`$DIRNAME "$path"`"
17227         base="`$BASENAME "$path"`"
17228         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17229       fi
17230     fi
17231   fi
17232 
17233         DEVKIT_ROOT="$with_devkit"
17234         # Check for a meta data info file in the root of the devkit
17235         if test -f "$DEVKIT_ROOT/devkit.info"; then
17236           . $DEVKIT_ROOT/devkit.info
17237           # This potentially sets the following:
17238           # A descriptive name of the devkit
17239 
17240   if test "x$DEVKIT_NAME" = x; then
17241     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17242   fi
17243 
17244           # Corresponds to --with-extra-path
17245 
17246   if test "x$DEVKIT_EXTRA_PATH" = x; then
17247     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17248   fi
17249 
17250           # Corresponds to --with-toolchain-path
17251 
17252   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17253     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17254   fi
17255 
17256           # Corresponds to --with-sysroot
17257 
17258   if test "x$DEVKIT_SYSROOT" = x; then
17259     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17260   fi
17261 
17262 
17263           # Identifies the Visual Studio version in the devkit
17264 
17265   if test "x$DEVKIT_VS_VERSION" = x; then
17266     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17267   fi
17268 
17269           # The Visual Studio include environment variable
17270 
17271   if test "x$DEVKIT_VS_INCLUDE" = x; then
17272     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17273   fi
17274 
17275           # The Visual Studio lib environment variable
17276 
17277   if test "x$DEVKIT_VS_LIB" = x; then
17278     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17279   fi
17280 
17281           # Corresponds to --with-msvcr-dll
17282 
17283   if test "x$DEVKIT_MSVCR_DLL" = x; then
17284     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17285   fi
17286 
17287           # Corresponds to --with-msvcp-dll
17288 
17289   if test "x$DEVKIT_MSVCP_DLL" = x; then
17290     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17291   fi
17292 
17293         fi
17294 
17295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17296 $as_echo_n "checking for devkit... " >&6; }
17297         if test "x$DEVKIT_NAME" != x; then
17298           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17299 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17300         else
17301           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17302 $as_echo "$DEVKIT_ROOT" >&6; }
17303         fi
17304 
17305 
17306   if test "x$DEVKIT_EXTRA_PATH" != x; then
17307     if test "x$EXTRA_PATH" = x; then
17308       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17309     else
17310       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17311     fi
17312   fi
17313 
17314 
17315         # Fallback default of just /bin if DEVKIT_PATH is not defined
17316         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17317           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17318         fi
17319 
17320   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17321     if test "x$TOOLCHAIN_PATH" = x; then
17322       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17323     else
17324       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17325     fi
17326   fi
17327 
17328 
17329         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17330         # places for backwards compatiblity.
17331         if test "x$DEVKIT_SYSROOT" != x; then
17332           SYSROOT="$DEVKIT_SYSROOT"
17333         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17334           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17335         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17336           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17337         fi
17338 
17339         if test "x$DEVKIT_ROOT" != x; then
17340           DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
17341           if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17342             DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
17343           fi
17344 
17345         fi
17346 
17347 
17348 fi
17349 
17350 
17351   # You can force the sysroot if the sysroot encoded into the compiler tools
17352   # is not correct.
17353 
17354 # Check whether --with-sys-root was given.
17355 if test "${with_sys_root+set}" = set; then :
17356   withval=$with_sys_root; SYSROOT=$with_sys_root
17357 
17358 fi
17359 
17360 
17361 
17362 # Check whether --with-sysroot was given.
17363 if test "${with_sysroot+set}" = set; then :
17364   withval=$with_sysroot; SYSROOT=$with_sysroot
17365 
17366 fi
17367 
17368 
17369 
17370 # Check whether --with-tools-dir was given.
17371 if test "${with_tools_dir+set}" = set; then :
17372   withval=$with_tools_dir;
17373   if test "x$with_tools_dir" != x; then
17374     if test "x$TOOLCHAIN_PATH" = x; then
17375       TOOLCHAIN_PATH="$with_tools_dir"
17376     else
17377       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17378     fi
17379   fi
17380 
17381 
17382 fi
17383 
17384 
17385 
17386 # Check whether --with-toolchain-path was given.
17387 if test "${with_toolchain_path+set}" = set; then :
17388   withval=$with_toolchain_path;
17389   if test "x$with_toolchain_path" != x; then
17390     if test "x$TOOLCHAIN_PATH" = x; then
17391       TOOLCHAIN_PATH="$with_toolchain_path"
17392     else
17393       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17394     fi
17395   fi
17396 
17397 
17398 fi
17399 
17400 
17401 
17402 # Check whether --with-extra-path was given.
17403 if test "${with_extra_path+set}" = set; then :
17404   withval=$with_extra_path;
17405   if test "x$with_extra_path" != x; then
17406     if test "x$EXTRA_PATH" = x; then
17407       EXTRA_PATH="$with_extra_path"
17408     else
17409       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17410     fi
17411   fi
17412 
17413 
17414 fi
17415 
17416 
17417   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17418     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17419     # If not, detect if Xcode is installed by running xcodebuild -version
17420     # if no Xcode installed, xcodebuild exits with 1
17421     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17422     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17423       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17424       # fall back on the stub binary in /usr/bin/xcodebuild
17425       # Extract the first word of "xcodebuild", so it can be a program name with args.
17426 set dummy xcodebuild; ac_word=$2
17427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17428 $as_echo_n "checking for $ac_word... " >&6; }
17429 if ${ac_cv_path_XCODEBUILD+:} false; then :
17430   $as_echo_n "(cached) " >&6
17431 else
17432   case $XCODEBUILD in
17433   [\\/]* | ?:[\\/]*)
17434   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17435   ;;
17436   *)
17437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17438 for as_dir in $TOOLCHAIN_PATH
17439 do
17440   IFS=$as_save_IFS
17441   test -z "$as_dir" && as_dir=.
17442     for ac_exec_ext in '' $ac_executable_extensions; do
17443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17444     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17446     break 2
17447   fi
17448 done
17449   done
17450 IFS=$as_save_IFS
17451 
17452   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17453   ;;
17454 esac
17455 fi
17456 XCODEBUILD=$ac_cv_path_XCODEBUILD
17457 if test -n "$XCODEBUILD"; then
17458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17459 $as_echo "$XCODEBUILD" >&6; }
17460 else
17461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17462 $as_echo "no" >&6; }
17463 fi
17464 
17465 
17466     else
17467       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17468       # when only the command line tools are installed there are no SDKs, so headers
17469       # are copied into the system frameworks
17470       XCODEBUILD=
17471 
17472     fi
17473 
17474     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17475 $as_echo_n "checking for sdk name... " >&6; }
17476 
17477 # Check whether --with-sdk-name was given.
17478 if test "${with_sdk_name+set}" = set; then :
17479   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17480 
17481 fi
17482 
17483     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17484 $as_echo "$SDKNAME" >&6; }
17485 
17486     # if toolchain path is specified then don't rely on system headers, they may not compile
17487     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17488     test -z "$TOOLCHAIN_PATH" && \
17489       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17490 
17491     if test -z "$SYSROOT"; then
17492       if test -n "$XCODEBUILD"; then
17493         # if we don't have system headers, use default SDK name (last resort)
17494         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17495           SDKNAME=${SDKNAME:-macosx}
17496         fi
17497 
17498         if test -n "$SDKNAME"; then
17499           # Call xcodebuild to determine SYSROOT
17500           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17501         fi
17502       else
17503         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17504           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
17505         fi
17506       fi
17507     else
17508       # warn user if --with-sdk-name was also set
17509       if test -n "$with_sdk_name"; then
17510         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17511 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17512       fi
17513     fi
17514 
17515     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17516       # If no system framework headers, then SYSROOT must be set, or we won't build
17517       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
17518     fi
17519 
17520     # Perform a basic sanity test
17521     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17522       if test -z "$SYSROOT"; then
17523         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
17524       else
17525         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17526       fi
17527     fi
17528 
17529     # set SDKROOT too, Xcode tools will pick it up
17530     SDKROOT="$SYSROOT"
17531 
17532   fi
17533 
17534   # Prepend the extra path to the global path
17535 
17536   if test "x$EXTRA_PATH" != x; then
17537     if test "x$PATH" = x; then
17538       PATH="$EXTRA_PATH"
17539     else
17540       PATH="$EXTRA_PATH:$PATH"
17541     fi
17542   fi
17543 
17544 
17545   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17546 $as_echo_n "checking for sysroot... " >&6; }
17547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17548 $as_echo "$SYSROOT" >&6; }
17549   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17550 $as_echo_n "checking for toolchain path... " >&6; }
17551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17552 $as_echo "$TOOLCHAIN_PATH" >&6; }
17553   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17554 $as_echo_n "checking for extra path... " >&6; }
17555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17556 $as_echo "$EXTRA_PATH" >&6; }
17557 
17558 
17559 # To properly create a configuration name, we need to have the OpenJDK target
17560 # and options (variants and debug level) parsed.
17561 
17562 
17563 
17564 # Check whether --with-conf-name was given.
17565 if test "${with_conf_name+set}" = set; then :
17566   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17567 fi
17568 
17569 
17570   # Test from where we are running configure, in or outside of src root.
17571   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17572 $as_echo_n "checking where to store configuration... " >&6; }
17573   if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
17574       || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
17575       || test "x$CURDIR" = "x$TOPDIR/make" ; then
17576     # We are running configure from the src root.
17577     # Create a default ./build/target-variant-debuglevel output root.
17578     if test "x${CONF_NAME}" = x; then
17579       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17580 $as_echo "in default location" >&6; }
17581       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17582     else
17583       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17584 $as_echo "in build directory with custom name" >&6; }
17585     fi
17586 
17587     if test "x$CUSTOM_ROOT" != x; then
17588       OUTPUTDIR="${CUSTOM_ROOT}/build/${CONF_NAME}"
17589     else
17590       OUTPUTDIR="${TOPDIR}/build/${CONF_NAME}"
17591     fi
17592     $MKDIR -p "$OUTPUTDIR"
17593     if test ! -d "$OUTPUTDIR"; then
17594       as_fn_error $? "Could not create build directory $OUTPUTDIR" "$LINENO" 5
17595     fi
17596   else
17597     # We are running configure from outside of the src dir.
17598     # Then use the current directory as output dir!
17599     # If configuration is situated in normal build directory, just use the build
17600     # directory name as configuration name, otherwise use the complete path.
17601     if test "x${CONF_NAME}" = x; then
17602       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
17603     fi
17604     OUTPUTDIR="$CURDIR"
17605     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17606 $as_echo "in current directory" >&6; }
17607 
17608     # WARNING: This might be a bad thing to do. You need to be sure you want to
17609     # have a configuration in this directory. Do some sanity checks!
17610 
17611     if test ! -e "$OUTPUTDIR/spec.gmk"; then
17612       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17613       # other files
17614       files_present=`$LS $OUTPUTDIR`
17615       # Configure has already touched config.log and confdefs.h in the current dir when this check
17616       # is performed.
17617       filtered_files=`$ECHO "$files_present" \
17618           | $SED -e 's/config.log//g' \
17619               -e 's/configure.log//g' \
17620               -e 's/confdefs.h//g' \
17621               -e 's/ //g' \
17622           | $TR -d '\n'`
17623       if test "x$filtered_files" != x; then
17624         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17625 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17626         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17627 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17628         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17629 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17630         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17631 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17632         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17633 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17634         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $TOPDIR' and restart configure" >&5
17635 $as_echo "$as_me: Try 'cd $TOPDIR' and restart configure" >&6;}
17636         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17637 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17638         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17639       fi
17640     fi
17641   fi
17642   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17643 $as_echo_n "checking what configuration name to use... " >&6; }
17644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17645 $as_echo "$CONF_NAME" >&6; }
17646 
17647 
17648   # Only process if variable expands to non-empty
17649 
17650   if test "x$OUTPUTDIR" != x; then
17651     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17652 
17653   # Input might be given as Windows format, start by converting to
17654   # unix format.
17655   path="$OUTPUTDIR"
17656   new_path=`$CYGPATH -u "$path"`
17657 
17658   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17659   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17660   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17661   # "foo.exe" is OK but "foo" is an error.
17662   #
17663   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17664   # It is also a way to make sure we got the proper file name for the real test later on.
17665   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17666   if test "x$test_shortpath" = x; then
17667     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17668 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17669     as_fn_error $? "Cannot locate the the path of OUTPUTDIR" "$LINENO" 5
17670   fi
17671 
17672   # Call helper function which possibly converts this using DOS-style short mode.
17673   # If so, the updated path is stored in $new_path.
17674 
17675   input_path="$new_path"
17676   # Check if we need to convert this using DOS-style short mode. If the path
17677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17678   # take no chances and rewrite it.
17679   # Note: m4 eats our [], so we need to use [ and ] instead.
17680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17681   if test "x$has_forbidden_chars" != x; then
17682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17683     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17684     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17685     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17686       # Going to short mode and back again did indeed matter. Since short mode is
17687       # case insensitive, let's make it lowercase to improve readability.
17688       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17689       # Now convert it back to Unix-style (cygpath)
17690       input_path=`$CYGPATH -u "$shortmode_path"`
17691       new_path="$input_path"
17692     fi
17693   fi
17694 
17695   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17696   if test "x$test_cygdrive_prefix" = x; then
17697     # As a simple fix, exclude /usr/bin since it's not a real path.
17698     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17699       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17700       # a path prefixed by /cygdrive for fixpath to work.
17701       new_path="$CYGWIN_ROOT_PATH$input_path"
17702     fi
17703   fi
17704 
17705 
17706   if test "x$path" != "x$new_path"; then
17707     OUTPUTDIR="$new_path"
17708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17709 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17710   fi
17711 
17712     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17713 
17714   path="$OUTPUTDIR"
17715   has_colon=`$ECHO $path | $GREP ^.:`
17716   new_path="$path"
17717   if test "x$has_colon" = x; then
17718     # Not in mixed or Windows style, start by that.
17719     new_path=`cmd //c echo $path`
17720   fi
17721 
17722 
17723   input_path="$new_path"
17724   # Check if we need to convert this using DOS-style short mode. If the path
17725   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17726   # take no chances and rewrite it.
17727   # Note: m4 eats our [], so we need to use [ and ] instead.
17728   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17729   if test "x$has_forbidden_chars" != x; then
17730     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17731     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17732   fi
17733 
17734 
17735   windows_path="$new_path"
17736   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17737     unix_path=`$CYGPATH -u "$windows_path"`
17738     new_path="$unix_path"
17739   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17740     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17741     new_path="$unix_path"
17742   fi
17743 
17744   if test "x$path" != "x$new_path"; then
17745     OUTPUTDIR="$new_path"
17746     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17747 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17748   fi
17749 
17750   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17751   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17752 
17753     else
17754       # We're on a unix platform. Hooray! :)
17755       path="$OUTPUTDIR"
17756       has_space=`$ECHO "$path" | $GREP " "`
17757       if test "x$has_space" != x; then
17758         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17759 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17760         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17761       fi
17762 
17763       # Use eval to expand a potential ~
17764       eval path="$path"
17765       if test ! -f "$path" && test ! -d "$path"; then
17766         as_fn_error $? "The path of OUTPUTDIR, which resolves as \"$path\", is not found." "$LINENO" 5
17767       fi
17768 
17769       if test -d "$path"; then
17770         OUTPUTDIR="`cd "$path"; $THEPWDCMD -L`"
17771       else
17772         dir="`$DIRNAME "$path"`"
17773         base="`$BASENAME "$path"`"
17774         OUTPUTDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
17775       fi
17776     fi
17777   fi
17778 
17779 
17780   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
17781   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17782 
17783   SPEC="$OUTPUTDIR/spec.gmk"
17784 
17785 
17786 
17787 
17788 
17789   # The spec.gmk file contains all variables for the make system.
17790   ac_config_files="$ac_config_files $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17791 
17792   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17793   ac_config_files="$ac_config_files $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17794 
17795   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17796   ac_config_files="$ac_config_files $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17797 
17798   # The compare.sh is used to compare the build output to other builds.
17799   ac_config_files="$ac_config_files $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17800 
17801   # The generated Makefile knows where the spec.gmk is and where the source is.
17802   # You can run make from the OUTPUTDIR, or from the top-level Makefile
17803   # which will look for generated configurations
17804   ac_config_files="$ac_config_files $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in"
17805 
17806 
17807 
17808 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17809 
17810   for ac_prog in apt-get yum brew port pkgutil pkgadd
17811 do
17812   # Extract the first word of "$ac_prog", so it can be a program name with args.
17813 set dummy $ac_prog; ac_word=$2
17814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17815 $as_echo_n "checking for $ac_word... " >&6; }
17816 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17817   $as_echo_n "(cached) " >&6
17818 else
17819   if test -n "$PKGHANDLER"; then
17820   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17821 else
17822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17823 for as_dir in $PATH
17824 do
17825   IFS=$as_save_IFS
17826   test -z "$as_dir" && as_dir=.
17827     for ac_exec_ext in '' $ac_executable_extensions; do
17828   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17829     ac_cv_prog_PKGHANDLER="$ac_prog"
17830     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17831     break 2
17832   fi
17833 done
17834   done
17835 IFS=$as_save_IFS
17836 
17837 fi
17838 fi
17839 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17840 if test -n "$PKGHANDLER"; then
17841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17842 $as_echo "$PKGHANDLER" >&6; }
17843 else
17844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17845 $as_echo "no" >&6; }
17846 fi
17847 
17848 
17849   test -n "$PKGHANDLER" && break
17850 done
17851 
17852 
17853 
17854 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17855 
17856 
17857 
17858   # Publish this variable in the help.
17859 
17860 
17861   if [ -z "${MAKE+x}" ]; then
17862     # The variable is not set by user, try to locate tool using the code snippet
17863 
17864     # Try our hardest to locate a correct version of GNU make
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_GMAKE+:} false; then :
17872   $as_echo_n "(cached) " >&6
17873 else
17874   case $CHECK_GMAKE in
17875   [\\/]* | ?:[\\/]*)
17876   ac_cv_path_CHECK_GMAKE="$CHECK_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_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_GMAKE=$ac_cv_path_CHECK_GMAKE
17898 if test -n "$CHECK_GMAKE"; then
17899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17900 $as_echo "$CHECK_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_GMAKE" && break
17908 done
17909 
17910 
17911   MAKE_CANDIDATE=""$CHECK_GMAKE""
17912   DESCRIPTION="gmake in PATH"
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 
18248     if test "x$FOUND_MAKE" = x; then
18249       for ac_prog in make
18250 do
18251   # Extract the first word of "$ac_prog", so it can be a program name with args.
18252 set dummy $ac_prog; ac_word=$2
18253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18254 $as_echo_n "checking for $ac_word... " >&6; }
18255 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18256   $as_echo_n "(cached) " >&6
18257 else
18258   case $CHECK_MAKE in
18259   [\\/]* | ?:[\\/]*)
18260   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18261   ;;
18262   *)
18263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18264 for as_dir in $PATH
18265 do
18266   IFS=$as_save_IFS
18267   test -z "$as_dir" && as_dir=.
18268     for ac_exec_ext in '' $ac_executable_extensions; do
18269   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18270     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18271     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18272     break 2
18273   fi
18274 done
18275   done
18276 IFS=$as_save_IFS
18277 
18278   ;;
18279 esac
18280 fi
18281 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18282 if test -n "$CHECK_MAKE"; then
18283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18284 $as_echo "$CHECK_MAKE" >&6; }
18285 else
18286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18287 $as_echo "no" >&6; }
18288 fi
18289 
18290 
18291   test -n "$CHECK_MAKE" && break
18292 done
18293 
18294 
18295   MAKE_CANDIDATE=""$CHECK_MAKE""
18296   DESCRIPTION="make in PATH"
18297 
18298   # On Cygwin, we require a newer version of make than on other platforms
18299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18300     MAKE_VERSION_EXPR="-e 4\."
18301     MAKE_REQUIRED_VERSION="4.0"
18302    else
18303     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18304     MAKE_REQUIRED_VERSION="3.81"
18305   fi
18306 
18307   if test "x$MAKE_CANDIDATE" != x; then
18308     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18309 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18310     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18311     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18312     if test "x$IS_GNU_MAKE" = x; then
18313       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18314 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18315     else
18316       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18317       if test "x$IS_MODERN_MAKE" = x; then
18318         { $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
18319 $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;}
18320       else
18321         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18322           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18323             MAKE_EXPECTED_ENV='cygwin'
18324           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18325             MAKE_EXPECTED_ENV='msys'
18326           else
18327             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18328           fi
18329           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18330           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18331         else
18332           # Not relevant for non-Windows
18333           IS_MAKE_CORRECT_ENV=true
18334         fi
18335         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18336           { $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
18337 $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;}
18338         else
18339           FOUND_MAKE=$MAKE_CANDIDATE
18340 
18341   # Only process if variable expands to non-empty
18342 
18343   if test "x$FOUND_MAKE" != x; then
18344     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18345 
18346   # First separate the path from the arguments. This will split at the first
18347   # space.
18348   complete="$FOUND_MAKE"
18349   path="${complete%% *}"
18350   tmp="$complete EOL"
18351   arguments="${tmp#* }"
18352 
18353   # Input might be given as Windows format, start by converting to
18354   # unix format.
18355   new_path=`$CYGPATH -u "$path"`
18356 
18357   # Now try to locate executable using which
18358   new_path=`$WHICH "$new_path" 2> /dev/null`
18359   # bat and cmd files are not always considered executable in cygwin causing which
18360   # to not find them
18361   if test "x$new_path" = x \
18362       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18363       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18364     new_path=`$CYGPATH -u "$path"`
18365   fi
18366   if test "x$new_path" = x; then
18367     # Oops. Which didn't find the executable.
18368     # The splitting of arguments from the executable at a space might have been incorrect,
18369     # since paths with space are more likely in Windows. Give it another try with the whole
18370     # argument.
18371     path="$complete"
18372     arguments="EOL"
18373     new_path=`$CYGPATH -u "$path"`
18374     new_path=`$WHICH "$new_path" 2> /dev/null`
18375     # bat and cmd files are not always considered executable in cygwin causing which
18376     # to not find them
18377     if test "x$new_path" = x \
18378         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18379         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18380       new_path=`$CYGPATH -u "$path"`
18381     fi
18382     if test "x$new_path" = x; then
18383       # It's still not found. Now this is an unrecoverable error.
18384       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18385 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18386       has_space=`$ECHO "$complete" | $GREP " "`
18387       if test "x$has_space" != x; then
18388         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18389 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18390       fi
18391       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18392     fi
18393   fi
18394 
18395   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18396   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18397   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18398   # "foo.exe" is OK but "foo" is an error.
18399   #
18400   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18401   # It is also a way to make sure we got the proper file name for the real test later on.
18402   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18403   if test "x$test_shortpath" = x; then
18404     # Short path failed, file does not exist as specified.
18405     # Try adding .exe or .cmd
18406     if test -f "${new_path}.exe"; then
18407       input_to_shortpath="${new_path}.exe"
18408     elif test -f "${new_path}.cmd"; then
18409       input_to_shortpath="${new_path}.cmd"
18410     else
18411       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18412 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18413       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18414 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18415       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18416     fi
18417   else
18418     input_to_shortpath="$new_path"
18419   fi
18420 
18421   # Call helper function which possibly converts this using DOS-style short mode.
18422   # If so, the updated path is stored in $new_path.
18423   new_path="$input_to_shortpath"
18424 
18425   input_path="$input_to_shortpath"
18426   # Check if we need to convert this using DOS-style short mode. If the path
18427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18428   # take no chances and rewrite it.
18429   # Note: m4 eats our [], so we need to use [ and ] instead.
18430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18431   if test "x$has_forbidden_chars" != x; then
18432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18433     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18434     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18435     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18436       # Going to short mode and back again did indeed matter. Since short mode is
18437       # case insensitive, let's make it lowercase to improve readability.
18438       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18439       # Now convert it back to Unix-style (cygpath)
18440       input_path=`$CYGPATH -u "$shortmode_path"`
18441       new_path="$input_path"
18442     fi
18443   fi
18444 
18445   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18446   if test "x$test_cygdrive_prefix" = x; then
18447     # As a simple fix, exclude /usr/bin since it's not a real path.
18448     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18449       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18450       # a path prefixed by /cygdrive for fixpath to work.
18451       new_path="$CYGWIN_ROOT_PATH$input_path"
18452     fi
18453   fi
18454 
18455   # remove trailing .exe if any
18456   new_path="${new_path/%.exe/}"
18457 
18458     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18459 
18460   # First separate the path from the arguments. This will split at the first
18461   # space.
18462   complete="$FOUND_MAKE"
18463   path="${complete%% *}"
18464   tmp="$complete EOL"
18465   arguments="${tmp#* }"
18466 
18467   # Input might be given as Windows format, start by converting to
18468   # unix format.
18469   new_path="$path"
18470 
18471   windows_path="$new_path"
18472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18473     unix_path=`$CYGPATH -u "$windows_path"`
18474     new_path="$unix_path"
18475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18477     new_path="$unix_path"
18478   fi
18479 
18480 
18481   # Now try to locate executable using which
18482   new_path=`$WHICH "$new_path" 2> /dev/null`
18483 
18484   if test "x$new_path" = x; then
18485     # Oops. Which didn't find the executable.
18486     # The splitting of arguments from the executable at a space might have been incorrect,
18487     # since paths with space are more likely in Windows. Give it another try with the whole
18488     # argument.
18489     path="$complete"
18490     arguments="EOL"
18491     new_path="$path"
18492 
18493   windows_path="$new_path"
18494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18495     unix_path=`$CYGPATH -u "$windows_path"`
18496     new_path="$unix_path"
18497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18499     new_path="$unix_path"
18500   fi
18501 
18502 
18503     new_path=`$WHICH "$new_path" 2> /dev/null`
18504     # bat and cmd files are not always considered executable in MSYS causing which
18505     # to not find them
18506     if test "x$new_path" = x \
18507         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18508         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18509       new_path="$path"
18510 
18511   windows_path="$new_path"
18512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18513     unix_path=`$CYGPATH -u "$windows_path"`
18514     new_path="$unix_path"
18515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18517     new_path="$unix_path"
18518   fi
18519 
18520     fi
18521 
18522     if test "x$new_path" = x; then
18523       # It's still not found. Now this is an unrecoverable error.
18524       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18525 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18526       has_space=`$ECHO "$complete" | $GREP " "`
18527       if test "x$has_space" != x; then
18528         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18529 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18530       fi
18531       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18532     fi
18533   fi
18534 
18535   # Now new_path has a complete unix path to the binary
18536   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18537     # Keep paths in /bin as-is, but remove trailing .exe if any
18538     new_path="${new_path/%.exe/}"
18539     # Do not save /bin paths to all_fixpath_prefixes!
18540   else
18541     # Not in mixed or Windows style, start by that.
18542     new_path=`cmd //c echo $new_path`
18543 
18544   input_path="$new_path"
18545   # Check if we need to convert this using DOS-style short mode. If the path
18546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18547   # take no chances and rewrite it.
18548   # Note: m4 eats our [], so we need to use [ and ] instead.
18549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18550   if test "x$has_forbidden_chars" != x; then
18551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18553   fi
18554 
18555     # Output is in $new_path
18556 
18557   windows_path="$new_path"
18558   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18559     unix_path=`$CYGPATH -u "$windows_path"`
18560     new_path="$unix_path"
18561   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18562     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18563     new_path="$unix_path"
18564   fi
18565 
18566     # remove trailing .exe if any
18567     new_path="${new_path/%.exe/}"
18568 
18569     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18570     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18571   fi
18572 
18573     else
18574       # We're on a unix platform. Hooray! :)
18575       # First separate the path from the arguments. This will split at the first
18576       # space.
18577       complete="$FOUND_MAKE"
18578       path="${complete%% *}"
18579       tmp="$complete EOL"
18580       arguments="${tmp#* }"
18581 
18582       # Cannot rely on the command "which" here since it doesn't always work.
18583       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18584       if test -z "$is_absolute_path"; then
18585         # Path to executable is not absolute. Find it.
18586         IFS_save="$IFS"
18587         IFS=:
18588         for p in $PATH; do
18589           if test -f "$p/$path" && test -x "$p/$path"; then
18590             new_path="$p/$path"
18591             break
18592           fi
18593         done
18594         IFS="$IFS_save"
18595       else
18596         # This is an absolute path, we can use it without further modifications.
18597         new_path="$path"
18598       fi
18599 
18600       if test "x$new_path" = x; then
18601         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18602 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18603         has_space=`$ECHO "$complete" | $GREP " "`
18604         if test "x$has_space" != x; then
18605           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18606 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18607         fi
18608         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18609       fi
18610     fi
18611 
18612     # Now join together the path and the arguments once again
18613     if test "x$arguments" != xEOL; then
18614       new_complete="$new_path ${arguments% *}"
18615     else
18616       new_complete="$new_path"
18617     fi
18618 
18619     if test "x$complete" != "x$new_complete"; then
18620       FOUND_MAKE="$new_complete"
18621       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18622 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18623     fi
18624   fi
18625 
18626         fi
18627       fi
18628     fi
18629   fi
18630 
18631     fi
18632 
18633     if test "x$FOUND_MAKE" = x; then
18634       if test "x$TOOLCHAIN_PATH" != x; then
18635         # We have a toolchain path, check that as well before giving up.
18636         OLD_PATH=$PATH
18637         PATH=$TOOLCHAIN_PATH:$PATH
18638         for ac_prog in gmake
18639 do
18640   # Extract the first word of "$ac_prog", so it can be a program name with args.
18641 set dummy $ac_prog; ac_word=$2
18642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18643 $as_echo_n "checking for $ac_word... " >&6; }
18644 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18645   $as_echo_n "(cached) " >&6
18646 else
18647   case $CHECK_TOOLSDIR_GMAKE in
18648   [\\/]* | ?:[\\/]*)
18649   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18650   ;;
18651   *)
18652   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18653 for as_dir in $PATH
18654 do
18655   IFS=$as_save_IFS
18656   test -z "$as_dir" && as_dir=.
18657     for ac_exec_ext in '' $ac_executable_extensions; do
18658   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18659     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18660     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18661     break 2
18662   fi
18663 done
18664   done
18665 IFS=$as_save_IFS
18666 
18667   ;;
18668 esac
18669 fi
18670 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18671 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18673 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18674 else
18675   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18676 $as_echo "no" >&6; }
18677 fi
18678 
18679 
18680   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18681 done
18682 
18683 
18684   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18685   DESCRIPTION="gmake in tools-dir"
18686 
18687   # On Cygwin, we require a newer version of make than on other platforms
18688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18689     MAKE_VERSION_EXPR="-e 4\."
18690     MAKE_REQUIRED_VERSION="4.0"
18691    else
18692     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18693     MAKE_REQUIRED_VERSION="3.81"
18694   fi
18695 
18696   if test "x$MAKE_CANDIDATE" != x; then
18697     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18698 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18699     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18700     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18701     if test "x$IS_GNU_MAKE" = x; then
18702       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18703 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18704     else
18705       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18706       if test "x$IS_MODERN_MAKE" = x; then
18707         { $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
18708 $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;}
18709       else
18710         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18711           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18712             MAKE_EXPECTED_ENV='cygwin'
18713           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18714             MAKE_EXPECTED_ENV='msys'
18715           else
18716             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18717           fi
18718           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18719           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18720         else
18721           # Not relevant for non-Windows
18722           IS_MAKE_CORRECT_ENV=true
18723         fi
18724         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18725           { $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
18726 $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;}
18727         else
18728           FOUND_MAKE=$MAKE_CANDIDATE
18729 
18730   # Only process if variable expands to non-empty
18731 
18732   if test "x$FOUND_MAKE" != x; then
18733     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18734 
18735   # First separate the path from the arguments. This will split at the first
18736   # space.
18737   complete="$FOUND_MAKE"
18738   path="${complete%% *}"
18739   tmp="$complete EOL"
18740   arguments="${tmp#* }"
18741 
18742   # Input might be given as Windows format, start by converting to
18743   # unix format.
18744   new_path=`$CYGPATH -u "$path"`
18745 
18746   # Now try to locate executable using which
18747   new_path=`$WHICH "$new_path" 2> /dev/null`
18748   # bat and cmd files are not always considered executable in cygwin causing which
18749   # to not find them
18750   if test "x$new_path" = x \
18751       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18752       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18753     new_path=`$CYGPATH -u "$path"`
18754   fi
18755   if test "x$new_path" = x; then
18756     # Oops. Which didn't find the executable.
18757     # The splitting of arguments from the executable at a space might have been incorrect,
18758     # since paths with space are more likely in Windows. Give it another try with the whole
18759     # argument.
18760     path="$complete"
18761     arguments="EOL"
18762     new_path=`$CYGPATH -u "$path"`
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       # It's still not found. Now this is an unrecoverable error.
18773       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18774 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18775       has_space=`$ECHO "$complete" | $GREP " "`
18776       if test "x$has_space" != x; then
18777         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18778 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18779       fi
18780       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18781     fi
18782   fi
18783 
18784   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18785   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18786   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18787   # "foo.exe" is OK but "foo" is an error.
18788   #
18789   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18790   # It is also a way to make sure we got the proper file name for the real test later on.
18791   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18792   if test "x$test_shortpath" = x; then
18793     # Short path failed, file does not exist as specified.
18794     # Try adding .exe or .cmd
18795     if test -f "${new_path}.exe"; then
18796       input_to_shortpath="${new_path}.exe"
18797     elif test -f "${new_path}.cmd"; then
18798       input_to_shortpath="${new_path}.cmd"
18799     else
18800       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18801 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18802       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18803 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18804       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18805     fi
18806   else
18807     input_to_shortpath="$new_path"
18808   fi
18809 
18810   # Call helper function which possibly converts this using DOS-style short mode.
18811   # If so, the updated path is stored in $new_path.
18812   new_path="$input_to_shortpath"
18813 
18814   input_path="$input_to_shortpath"
18815   # Check if we need to convert this using DOS-style short mode. If the path
18816   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18817   # take no chances and rewrite it.
18818   # Note: m4 eats our [], so we need to use [ and ] instead.
18819   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18820   if test "x$has_forbidden_chars" != x; then
18821     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18822     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18823     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18824     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18825       # Going to short mode and back again did indeed matter. Since short mode is
18826       # case insensitive, let's make it lowercase to improve readability.
18827       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18828       # Now convert it back to Unix-style (cygpath)
18829       input_path=`$CYGPATH -u "$shortmode_path"`
18830       new_path="$input_path"
18831     fi
18832   fi
18833 
18834   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18835   if test "x$test_cygdrive_prefix" = x; then
18836     # As a simple fix, exclude /usr/bin since it's not a real path.
18837     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18838       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18839       # a path prefixed by /cygdrive for fixpath to work.
18840       new_path="$CYGWIN_ROOT_PATH$input_path"
18841     fi
18842   fi
18843 
18844   # remove trailing .exe if any
18845   new_path="${new_path/%.exe/}"
18846 
18847     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18848 
18849   # First separate the path from the arguments. This will split at the first
18850   # space.
18851   complete="$FOUND_MAKE"
18852   path="${complete%% *}"
18853   tmp="$complete EOL"
18854   arguments="${tmp#* }"
18855 
18856   # Input might be given as Windows format, start by converting to
18857   # unix format.
18858   new_path="$path"
18859 
18860   windows_path="$new_path"
18861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18862     unix_path=`$CYGPATH -u "$windows_path"`
18863     new_path="$unix_path"
18864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18866     new_path="$unix_path"
18867   fi
18868 
18869 
18870   # Now try to locate executable using which
18871   new_path=`$WHICH "$new_path" 2> /dev/null`
18872 
18873   if test "x$new_path" = x; then
18874     # Oops. Which didn't find the executable.
18875     # The splitting of arguments from the executable at a space might have been incorrect,
18876     # since paths with space are more likely in Windows. Give it another try with the whole
18877     # argument.
18878     path="$complete"
18879     arguments="EOL"
18880     new_path="$path"
18881 
18882   windows_path="$new_path"
18883   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18884     unix_path=`$CYGPATH -u "$windows_path"`
18885     new_path="$unix_path"
18886   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18887     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18888     new_path="$unix_path"
18889   fi
18890 
18891 
18892     new_path=`$WHICH "$new_path" 2> /dev/null`
18893     # bat and cmd files are not always considered executable in MSYS causing which
18894     # to not find them
18895     if test "x$new_path" = x \
18896         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18897         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18898       new_path="$path"
18899 
18900   windows_path="$new_path"
18901   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18902     unix_path=`$CYGPATH -u "$windows_path"`
18903     new_path="$unix_path"
18904   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18905     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18906     new_path="$unix_path"
18907   fi
18908 
18909     fi
18910 
18911     if test "x$new_path" = x; then
18912       # It's still not found. Now this is an unrecoverable error.
18913       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18914 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18915       has_space=`$ECHO "$complete" | $GREP " "`
18916       if test "x$has_space" != x; then
18917         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18918 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18919       fi
18920       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18921     fi
18922   fi
18923 
18924   # Now new_path has a complete unix path to the binary
18925   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18926     # Keep paths in /bin as-is, but remove trailing .exe if any
18927     new_path="${new_path/%.exe/}"
18928     # Do not save /bin paths to all_fixpath_prefixes!
18929   else
18930     # Not in mixed or Windows style, start by that.
18931     new_path=`cmd //c echo $new_path`
18932 
18933   input_path="$new_path"
18934   # Check if we need to convert this using DOS-style short mode. If the path
18935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18936   # take no chances and rewrite it.
18937   # Note: m4 eats our [], so we need to use [ and ] instead.
18938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18939   if test "x$has_forbidden_chars" != x; then
18940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18941     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18942   fi
18943 
18944     # Output is in $new_path
18945 
18946   windows_path="$new_path"
18947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18948     unix_path=`$CYGPATH -u "$windows_path"`
18949     new_path="$unix_path"
18950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18952     new_path="$unix_path"
18953   fi
18954 
18955     # remove trailing .exe if any
18956     new_path="${new_path/%.exe/}"
18957 
18958     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18959     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18960   fi
18961 
18962     else
18963       # We're on a unix platform. Hooray! :)
18964       # First separate the path from the arguments. This will split at the first
18965       # space.
18966       complete="$FOUND_MAKE"
18967       path="${complete%% *}"
18968       tmp="$complete EOL"
18969       arguments="${tmp#* }"
18970 
18971       # Cannot rely on the command "which" here since it doesn't always work.
18972       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18973       if test -z "$is_absolute_path"; then
18974         # Path to executable is not absolute. Find it.
18975         IFS_save="$IFS"
18976         IFS=:
18977         for p in $PATH; do
18978           if test -f "$p/$path" && test -x "$p/$path"; then
18979             new_path="$p/$path"
18980             break
18981           fi
18982         done
18983         IFS="$IFS_save"
18984       else
18985         # This is an absolute path, we can use it without further modifications.
18986         new_path="$path"
18987       fi
18988 
18989       if test "x$new_path" = x; then
18990         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18991 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18992         has_space=`$ECHO "$complete" | $GREP " "`
18993         if test "x$has_space" != x; then
18994           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18995 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18996         fi
18997         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18998       fi
18999     fi
19000 
19001     # Now join together the path and the arguments once again
19002     if test "x$arguments" != xEOL; then
19003       new_complete="$new_path ${arguments% *}"
19004     else
19005       new_complete="$new_path"
19006     fi
19007 
19008     if test "x$complete" != "x$new_complete"; then
19009       FOUND_MAKE="$new_complete"
19010       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19011 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19012     fi
19013   fi
19014 
19015         fi
19016       fi
19017     fi
19018   fi
19019 
19020         if test "x$FOUND_MAKE" = x; then
19021           for ac_prog in make
19022 do
19023   # Extract the first word of "$ac_prog", so it can be a program name with args.
19024 set dummy $ac_prog; ac_word=$2
19025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19026 $as_echo_n "checking for $ac_word... " >&6; }
19027 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19028   $as_echo_n "(cached) " >&6
19029 else
19030   case $CHECK_TOOLSDIR_MAKE in
19031   [\\/]* | ?:[\\/]*)
19032   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19033   ;;
19034   *)
19035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19036 for as_dir in $PATH
19037 do
19038   IFS=$as_save_IFS
19039   test -z "$as_dir" && as_dir=.
19040     for ac_exec_ext in '' $ac_executable_extensions; do
19041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19042     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19044     break 2
19045   fi
19046 done
19047   done
19048 IFS=$as_save_IFS
19049 
19050   ;;
19051 esac
19052 fi
19053 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19054 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19056 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19057 else
19058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19059 $as_echo "no" >&6; }
19060 fi
19061 
19062 
19063   test -n "$CHECK_TOOLSDIR_MAKE" && break
19064 done
19065 
19066 
19067   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19068   DESCRIPTION="make in tools-dir"
19069 
19070   # On Cygwin, we require a newer version of make than on other platforms
19071   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19072     MAKE_VERSION_EXPR="-e 4\."
19073     MAKE_REQUIRED_VERSION="4.0"
19074    else
19075     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19076     MAKE_REQUIRED_VERSION="3.81"
19077   fi
19078 
19079   if test "x$MAKE_CANDIDATE" != x; then
19080     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19081 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19082     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19083     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19084     if test "x$IS_GNU_MAKE" = x; then
19085       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19086 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19087     else
19088       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19089       if test "x$IS_MODERN_MAKE" = x; then
19090         { $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
19091 $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;}
19092       else
19093         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19094           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19095             MAKE_EXPECTED_ENV='cygwin'
19096           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19097             MAKE_EXPECTED_ENV='msys'
19098           else
19099             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19100           fi
19101           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19102           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19103         else
19104           # Not relevant for non-Windows
19105           IS_MAKE_CORRECT_ENV=true
19106         fi
19107         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19108           { $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
19109 $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;}
19110         else
19111           FOUND_MAKE=$MAKE_CANDIDATE
19112 
19113   # Only process if variable expands to non-empty
19114 
19115   if test "x$FOUND_MAKE" != x; then
19116     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19117 
19118   # First separate the path from the arguments. This will split at the first
19119   # space.
19120   complete="$FOUND_MAKE"
19121   path="${complete%% *}"
19122   tmp="$complete EOL"
19123   arguments="${tmp#* }"
19124 
19125   # Input might be given as Windows format, start by converting to
19126   # unix format.
19127   new_path=`$CYGPATH -u "$path"`
19128 
19129   # Now try to locate executable using which
19130   new_path=`$WHICH "$new_path" 2> /dev/null`
19131   # bat and cmd files are not always considered executable in cygwin causing which
19132   # to not find them
19133   if test "x$new_path" = x \
19134       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19135       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19136     new_path=`$CYGPATH -u "$path"`
19137   fi
19138   if test "x$new_path" = x; then
19139     # Oops. Which didn't find the executable.
19140     # The splitting of arguments from the executable at a space might have been incorrect,
19141     # since paths with space are more likely in Windows. Give it another try with the whole
19142     # argument.
19143     path="$complete"
19144     arguments="EOL"
19145     new_path=`$CYGPATH -u "$path"`
19146     new_path=`$WHICH "$new_path" 2> /dev/null`
19147     # bat and cmd files are not always considered executable in cygwin causing which
19148     # to not find them
19149     if test "x$new_path" = x \
19150         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19151         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19152       new_path=`$CYGPATH -u "$path"`
19153     fi
19154     if test "x$new_path" = x; then
19155       # It's still not found. Now this is an unrecoverable error.
19156       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19157 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19158       has_space=`$ECHO "$complete" | $GREP " "`
19159       if test "x$has_space" != x; then
19160         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19161 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19162       fi
19163       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19164     fi
19165   fi
19166 
19167   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19168   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19169   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19170   # "foo.exe" is OK but "foo" is an error.
19171   #
19172   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19173   # It is also a way to make sure we got the proper file name for the real test later on.
19174   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19175   if test "x$test_shortpath" = x; then
19176     # Short path failed, file does not exist as specified.
19177     # Try adding .exe or .cmd
19178     if test -f "${new_path}.exe"; then
19179       input_to_shortpath="${new_path}.exe"
19180     elif test -f "${new_path}.cmd"; then
19181       input_to_shortpath="${new_path}.cmd"
19182     else
19183       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19184 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19185       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19186 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19187       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19188     fi
19189   else
19190     input_to_shortpath="$new_path"
19191   fi
19192 
19193   # Call helper function which possibly converts this using DOS-style short mode.
19194   # If so, the updated path is stored in $new_path.
19195   new_path="$input_to_shortpath"
19196 
19197   input_path="$input_to_shortpath"
19198   # Check if we need to convert this using DOS-style short mode. If the path
19199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19200   # take no chances and rewrite it.
19201   # Note: m4 eats our [], so we need to use [ and ] instead.
19202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19203   if test "x$has_forbidden_chars" != x; then
19204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19205     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19206     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19207     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19208       # Going to short mode and back again did indeed matter. Since short mode is
19209       # case insensitive, let's make it lowercase to improve readability.
19210       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19211       # Now convert it back to Unix-style (cygpath)
19212       input_path=`$CYGPATH -u "$shortmode_path"`
19213       new_path="$input_path"
19214     fi
19215   fi
19216 
19217   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19218   if test "x$test_cygdrive_prefix" = x; then
19219     # As a simple fix, exclude /usr/bin since it's not a real path.
19220     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19221       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19222       # a path prefixed by /cygdrive for fixpath to work.
19223       new_path="$CYGWIN_ROOT_PATH$input_path"
19224     fi
19225   fi
19226 
19227   # remove trailing .exe if any
19228   new_path="${new_path/%.exe/}"
19229 
19230     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19231 
19232   # First separate the path from the arguments. This will split at the first
19233   # space.
19234   complete="$FOUND_MAKE"
19235   path="${complete%% *}"
19236   tmp="$complete EOL"
19237   arguments="${tmp#* }"
19238 
19239   # Input might be given as Windows format, start by converting to
19240   # unix format.
19241   new_path="$path"
19242 
19243   windows_path="$new_path"
19244   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19245     unix_path=`$CYGPATH -u "$windows_path"`
19246     new_path="$unix_path"
19247   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19248     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19249     new_path="$unix_path"
19250   fi
19251 
19252 
19253   # Now try to locate executable using which
19254   new_path=`$WHICH "$new_path" 2> /dev/null`
19255 
19256   if test "x$new_path" = x; then
19257     # Oops. Which didn't find the executable.
19258     # The splitting of arguments from the executable at a space might have been incorrect,
19259     # since paths with space are more likely in Windows. Give it another try with the whole
19260     # argument.
19261     path="$complete"
19262     arguments="EOL"
19263     new_path="$path"
19264 
19265   windows_path="$new_path"
19266   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19267     unix_path=`$CYGPATH -u "$windows_path"`
19268     new_path="$unix_path"
19269   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19270     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19271     new_path="$unix_path"
19272   fi
19273 
19274 
19275     new_path=`$WHICH "$new_path" 2> /dev/null`
19276     # bat and cmd files are not always considered executable in MSYS causing which
19277     # to not find them
19278     if test "x$new_path" = x \
19279         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19280         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19281       new_path="$path"
19282 
19283   windows_path="$new_path"
19284   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19285     unix_path=`$CYGPATH -u "$windows_path"`
19286     new_path="$unix_path"
19287   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19288     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19289     new_path="$unix_path"
19290   fi
19291 
19292     fi
19293 
19294     if test "x$new_path" = x; then
19295       # It's still not found. Now this is an unrecoverable error.
19296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19297 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19298       has_space=`$ECHO "$complete" | $GREP " "`
19299       if test "x$has_space" != x; then
19300         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19301 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19302       fi
19303       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19304     fi
19305   fi
19306 
19307   # Now new_path has a complete unix path to the binary
19308   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19309     # Keep paths in /bin as-is, but remove trailing .exe if any
19310     new_path="${new_path/%.exe/}"
19311     # Do not save /bin paths to all_fixpath_prefixes!
19312   else
19313     # Not in mixed or Windows style, start by that.
19314     new_path=`cmd //c echo $new_path`
19315 
19316   input_path="$new_path"
19317   # Check if we need to convert this using DOS-style short mode. If the path
19318   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19319   # take no chances and rewrite it.
19320   # Note: m4 eats our [], so we need to use [ and ] instead.
19321   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19322   if test "x$has_forbidden_chars" != x; then
19323     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19324     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19325   fi
19326 
19327     # Output is in $new_path
19328 
19329   windows_path="$new_path"
19330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19331     unix_path=`$CYGPATH -u "$windows_path"`
19332     new_path="$unix_path"
19333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19334     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19335     new_path="$unix_path"
19336   fi
19337 
19338     # remove trailing .exe if any
19339     new_path="${new_path/%.exe/}"
19340 
19341     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19342     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19343   fi
19344 
19345     else
19346       # We're on a unix platform. Hooray! :)
19347       # First separate the path from the arguments. This will split at the first
19348       # space.
19349       complete="$FOUND_MAKE"
19350       path="${complete%% *}"
19351       tmp="$complete EOL"
19352       arguments="${tmp#* }"
19353 
19354       # Cannot rely on the command "which" here since it doesn't always work.
19355       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19356       if test -z "$is_absolute_path"; then
19357         # Path to executable is not absolute. Find it.
19358         IFS_save="$IFS"
19359         IFS=:
19360         for p in $PATH; do
19361           if test -f "$p/$path" && test -x "$p/$path"; then
19362             new_path="$p/$path"
19363             break
19364           fi
19365         done
19366         IFS="$IFS_save"
19367       else
19368         # This is an absolute path, we can use it without further modifications.
19369         new_path="$path"
19370       fi
19371 
19372       if test "x$new_path" = x; then
19373         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19374 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19375         has_space=`$ECHO "$complete" | $GREP " "`
19376         if test "x$has_space" != x; then
19377           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19378 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19379         fi
19380         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19381       fi
19382     fi
19383 
19384     # Now join together the path and the arguments once again
19385     if test "x$arguments" != xEOL; then
19386       new_complete="$new_path ${arguments% *}"
19387     else
19388       new_complete="$new_path"
19389     fi
19390 
19391     if test "x$complete" != "x$new_complete"; then
19392       FOUND_MAKE="$new_complete"
19393       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19394 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19395     fi
19396   fi
19397 
19398         fi
19399       fi
19400     fi
19401   fi
19402 
19403         fi
19404         PATH=$OLD_PATH
19405       fi
19406     fi
19407 
19408     if test "x$FOUND_MAKE" = x; then
19409       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
19410     fi
19411 
19412   else
19413     # The variable is set, but is it from the command line or the environment?
19414 
19415     # Try to remove the string !MAKE! from our list.
19416     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19417     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19418       # If it failed, the variable was not from the command line. Ignore it,
19419       # but warn the user (except for BASH, which is always set by the calling BASH).
19420       if test "xMAKE" != xBASH; then
19421         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19422 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19423       fi
19424       # Try to locate tool using the code snippet
19425 
19426     # Try our hardest to locate a correct version of GNU make
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_GMAKE+:} false; then :
19434   $as_echo_n "(cached) " >&6
19435 else
19436   case $CHECK_GMAKE in
19437   [\\/]* | ?:[\\/]*)
19438   ac_cv_path_CHECK_GMAKE="$CHECK_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_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_GMAKE=$ac_cv_path_CHECK_GMAKE
19460 if test -n "$CHECK_GMAKE"; then
19461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19462 $as_echo "$CHECK_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_GMAKE" && break
19470 done
19471 
19472 
19473   MAKE_CANDIDATE=""$CHECK_GMAKE""
19474   DESCRIPTION="gmake in PATH"
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 
19810     if test "x$FOUND_MAKE" = x; then
19811       for ac_prog in make
19812 do
19813   # Extract the first word of "$ac_prog", so it can be a program name with args.
19814 set dummy $ac_prog; ac_word=$2
19815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19816 $as_echo_n "checking for $ac_word... " >&6; }
19817 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19818   $as_echo_n "(cached) " >&6
19819 else
19820   case $CHECK_MAKE in
19821   [\\/]* | ?:[\\/]*)
19822   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19823   ;;
19824   *)
19825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19826 for as_dir in $PATH
19827 do
19828   IFS=$as_save_IFS
19829   test -z "$as_dir" && as_dir=.
19830     for ac_exec_ext in '' $ac_executable_extensions; do
19831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19832     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19834     break 2
19835   fi
19836 done
19837   done
19838 IFS=$as_save_IFS
19839 
19840   ;;
19841 esac
19842 fi
19843 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19844 if test -n "$CHECK_MAKE"; then
19845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19846 $as_echo "$CHECK_MAKE" >&6; }
19847 else
19848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19849 $as_echo "no" >&6; }
19850 fi
19851 
19852 
19853   test -n "$CHECK_MAKE" && break
19854 done
19855 
19856 
19857   MAKE_CANDIDATE=""$CHECK_MAKE""
19858   DESCRIPTION="make in PATH"
19859 
19860   # On Cygwin, we require a newer version of make than on other platforms
19861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19862     MAKE_VERSION_EXPR="-e 4\."
19863     MAKE_REQUIRED_VERSION="4.0"
19864    else
19865     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19866     MAKE_REQUIRED_VERSION="3.81"
19867   fi
19868 
19869   if test "x$MAKE_CANDIDATE" != x; then
19870     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19871 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19872     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19873     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19874     if test "x$IS_GNU_MAKE" = x; then
19875       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19876 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19877     else
19878       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19879       if test "x$IS_MODERN_MAKE" = x; then
19880         { $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
19881 $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;}
19882       else
19883         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19884           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19885             MAKE_EXPECTED_ENV='cygwin'
19886           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19887             MAKE_EXPECTED_ENV='msys'
19888           else
19889             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19890           fi
19891           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19892           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19893         else
19894           # Not relevant for non-Windows
19895           IS_MAKE_CORRECT_ENV=true
19896         fi
19897         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19898           { $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
19899 $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;}
19900         else
19901           FOUND_MAKE=$MAKE_CANDIDATE
19902 
19903   # Only process if variable expands to non-empty
19904 
19905   if test "x$FOUND_MAKE" != x; then
19906     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19907 
19908   # First separate the path from the arguments. This will split at the first
19909   # space.
19910   complete="$FOUND_MAKE"
19911   path="${complete%% *}"
19912   tmp="$complete EOL"
19913   arguments="${tmp#* }"
19914 
19915   # Input might be given as Windows format, start by converting to
19916   # unix format.
19917   new_path=`$CYGPATH -u "$path"`
19918 
19919   # Now try to locate executable using which
19920   new_path=`$WHICH "$new_path" 2> /dev/null`
19921   # bat and cmd files are not always considered executable in cygwin causing which
19922   # to not find them
19923   if test "x$new_path" = x \
19924       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19925       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19926     new_path=`$CYGPATH -u "$path"`
19927   fi
19928   if test "x$new_path" = x; then
19929     # Oops. Which didn't find the executable.
19930     # The splitting of arguments from the executable at a space might have been incorrect,
19931     # since paths with space are more likely in Windows. Give it another try with the whole
19932     # argument.
19933     path="$complete"
19934     arguments="EOL"
19935     new_path=`$CYGPATH -u "$path"`
19936     new_path=`$WHICH "$new_path" 2> /dev/null`
19937     # bat and cmd files are not always considered executable in cygwin causing which
19938     # to not find them
19939     if test "x$new_path" = x \
19940         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19941         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19942       new_path=`$CYGPATH -u "$path"`
19943     fi
19944     if test "x$new_path" = x; then
19945       # It's still not found. Now this is an unrecoverable error.
19946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19947 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19948       has_space=`$ECHO "$complete" | $GREP " "`
19949       if test "x$has_space" != x; then
19950         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19951 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19952       fi
19953       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19954     fi
19955   fi
19956 
19957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19960   # "foo.exe" is OK but "foo" is an error.
19961   #
19962   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19963   # It is also a way to make sure we got the proper file name for the real test later on.
19964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19965   if test "x$test_shortpath" = x; then
19966     # Short path failed, file does not exist as specified.
19967     # Try adding .exe or .cmd
19968     if test -f "${new_path}.exe"; then
19969       input_to_shortpath="${new_path}.exe"
19970     elif test -f "${new_path}.cmd"; then
19971       input_to_shortpath="${new_path}.cmd"
19972     else
19973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19974 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19975       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19976 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19977       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19978     fi
19979   else
19980     input_to_shortpath="$new_path"
19981   fi
19982 
19983   # Call helper function which possibly converts this using DOS-style short mode.
19984   # If so, the updated path is stored in $new_path.
19985   new_path="$input_to_shortpath"
19986 
19987   input_path="$input_to_shortpath"
19988   # Check if we need to convert this using DOS-style short mode. If the path
19989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19990   # take no chances and rewrite it.
19991   # Note: m4 eats our [], so we need to use [ and ] instead.
19992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19993   if test "x$has_forbidden_chars" != x; then
19994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19998       # Going to short mode and back again did indeed matter. Since short mode is
19999       # case insensitive, let's make it lowercase to improve readability.
20000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20001       # Now convert it back to Unix-style (cygpath)
20002       input_path=`$CYGPATH -u "$shortmode_path"`
20003       new_path="$input_path"
20004     fi
20005   fi
20006 
20007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20008   if test "x$test_cygdrive_prefix" = x; then
20009     # As a simple fix, exclude /usr/bin since it's not a real path.
20010     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20012       # a path prefixed by /cygdrive for fixpath to work.
20013       new_path="$CYGWIN_ROOT_PATH$input_path"
20014     fi
20015   fi
20016 
20017   # remove trailing .exe if any
20018   new_path="${new_path/%.exe/}"
20019 
20020     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20021 
20022   # First separate the path from the arguments. This will split at the first
20023   # space.
20024   complete="$FOUND_MAKE"
20025   path="${complete%% *}"
20026   tmp="$complete EOL"
20027   arguments="${tmp#* }"
20028 
20029   # Input might be given as Windows format, start by converting to
20030   # unix format.
20031   new_path="$path"
20032 
20033   windows_path="$new_path"
20034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20035     unix_path=`$CYGPATH -u "$windows_path"`
20036     new_path="$unix_path"
20037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20039     new_path="$unix_path"
20040   fi
20041 
20042 
20043   # Now try to locate executable using which
20044   new_path=`$WHICH "$new_path" 2> /dev/null`
20045 
20046   if test "x$new_path" = x; then
20047     # Oops. Which didn't find the executable.
20048     # The splitting of arguments from the executable at a space might have been incorrect,
20049     # since paths with space are more likely in Windows. Give it another try with the whole
20050     # argument.
20051     path="$complete"
20052     arguments="EOL"
20053     new_path="$path"
20054 
20055   windows_path="$new_path"
20056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20057     unix_path=`$CYGPATH -u "$windows_path"`
20058     new_path="$unix_path"
20059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20061     new_path="$unix_path"
20062   fi
20063 
20064 
20065     new_path=`$WHICH "$new_path" 2> /dev/null`
20066     # bat and cmd files are not always considered executable in MSYS causing which
20067     # to not find them
20068     if test "x$new_path" = x \
20069         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20070         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20071       new_path="$path"
20072 
20073   windows_path="$new_path"
20074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20075     unix_path=`$CYGPATH -u "$windows_path"`
20076     new_path="$unix_path"
20077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20079     new_path="$unix_path"
20080   fi
20081 
20082     fi
20083 
20084     if test "x$new_path" = x; then
20085       # It's still not found. Now this is an unrecoverable error.
20086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20087 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20088       has_space=`$ECHO "$complete" | $GREP " "`
20089       if test "x$has_space" != x; then
20090         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20091 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20092       fi
20093       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20094     fi
20095   fi
20096 
20097   # Now new_path has a complete unix path to the binary
20098   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20099     # Keep paths in /bin as-is, but remove trailing .exe if any
20100     new_path="${new_path/%.exe/}"
20101     # Do not save /bin paths to all_fixpath_prefixes!
20102   else
20103     # Not in mixed or Windows style, start by that.
20104     new_path=`cmd //c echo $new_path`
20105 
20106   input_path="$new_path"
20107   # Check if we need to convert this using DOS-style short mode. If the path
20108   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20109   # take no chances and rewrite it.
20110   # Note: m4 eats our [], so we need to use [ and ] instead.
20111   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20112   if test "x$has_forbidden_chars" != x; then
20113     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20114     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20115   fi
20116 
20117     # Output is in $new_path
20118 
20119   windows_path="$new_path"
20120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20121     unix_path=`$CYGPATH -u "$windows_path"`
20122     new_path="$unix_path"
20123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20125     new_path="$unix_path"
20126   fi
20127 
20128     # remove trailing .exe if any
20129     new_path="${new_path/%.exe/}"
20130 
20131     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20132     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20133   fi
20134 
20135     else
20136       # We're on a unix platform. Hooray! :)
20137       # First separate the path from the arguments. This will split at the first
20138       # space.
20139       complete="$FOUND_MAKE"
20140       path="${complete%% *}"
20141       tmp="$complete EOL"
20142       arguments="${tmp#* }"
20143 
20144       # Cannot rely on the command "which" here since it doesn't always work.
20145       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20146       if test -z "$is_absolute_path"; then
20147         # Path to executable is not absolute. Find it.
20148         IFS_save="$IFS"
20149         IFS=:
20150         for p in $PATH; do
20151           if test -f "$p/$path" && test -x "$p/$path"; then
20152             new_path="$p/$path"
20153             break
20154           fi
20155         done
20156         IFS="$IFS_save"
20157       else
20158         # This is an absolute path, we can use it without further modifications.
20159         new_path="$path"
20160       fi
20161 
20162       if test "x$new_path" = x; then
20163         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20164 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20165         has_space=`$ECHO "$complete" | $GREP " "`
20166         if test "x$has_space" != x; then
20167           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20168 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20169         fi
20170         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20171       fi
20172     fi
20173 
20174     # Now join together the path and the arguments once again
20175     if test "x$arguments" != xEOL; then
20176       new_complete="$new_path ${arguments% *}"
20177     else
20178       new_complete="$new_path"
20179     fi
20180 
20181     if test "x$complete" != "x$new_complete"; then
20182       FOUND_MAKE="$new_complete"
20183       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20184 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20185     fi
20186   fi
20187 
20188         fi
20189       fi
20190     fi
20191   fi
20192 
20193     fi
20194 
20195     if test "x$FOUND_MAKE" = x; then
20196       if test "x$TOOLCHAIN_PATH" != x; then
20197         # We have a toolchain path, check that as well before giving up.
20198         OLD_PATH=$PATH
20199         PATH=$TOOLCHAIN_PATH:$PATH
20200         for ac_prog in gmake
20201 do
20202   # Extract the first word of "$ac_prog", so it can be a program name with args.
20203 set dummy $ac_prog; ac_word=$2
20204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20205 $as_echo_n "checking for $ac_word... " >&6; }
20206 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20207   $as_echo_n "(cached) " >&6
20208 else
20209   case $CHECK_TOOLSDIR_GMAKE in
20210   [\\/]* | ?:[\\/]*)
20211   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20212   ;;
20213   *)
20214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20215 for as_dir in $PATH
20216 do
20217   IFS=$as_save_IFS
20218   test -z "$as_dir" && as_dir=.
20219     for ac_exec_ext in '' $ac_executable_extensions; do
20220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20221     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20223     break 2
20224   fi
20225 done
20226   done
20227 IFS=$as_save_IFS
20228 
20229   ;;
20230 esac
20231 fi
20232 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20233 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20235 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20236 else
20237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20238 $as_echo "no" >&6; }
20239 fi
20240 
20241 
20242   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20243 done
20244 
20245 
20246   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20247   DESCRIPTION="gmake in tools-dir"
20248 
20249   # On Cygwin, we require a newer version of make than on other platforms
20250   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20251     MAKE_VERSION_EXPR="-e 4\."
20252     MAKE_REQUIRED_VERSION="4.0"
20253    else
20254     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20255     MAKE_REQUIRED_VERSION="3.81"
20256   fi
20257 
20258   if test "x$MAKE_CANDIDATE" != x; then
20259     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20260 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20261     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20262     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20263     if test "x$IS_GNU_MAKE" = x; then
20264       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20265 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20266     else
20267       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20268       if test "x$IS_MODERN_MAKE" = x; then
20269         { $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
20270 $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;}
20271       else
20272         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20273           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20274             MAKE_EXPECTED_ENV='cygwin'
20275           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20276             MAKE_EXPECTED_ENV='msys'
20277           else
20278             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20279           fi
20280           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20281           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20282         else
20283           # Not relevant for non-Windows
20284           IS_MAKE_CORRECT_ENV=true
20285         fi
20286         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20287           { $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
20288 $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;}
20289         else
20290           FOUND_MAKE=$MAKE_CANDIDATE
20291 
20292   # Only process if variable expands to non-empty
20293 
20294   if test "x$FOUND_MAKE" != x; then
20295     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20296 
20297   # First separate the path from the arguments. This will split at the first
20298   # space.
20299   complete="$FOUND_MAKE"
20300   path="${complete%% *}"
20301   tmp="$complete EOL"
20302   arguments="${tmp#* }"
20303 
20304   # Input might be given as Windows format, start by converting to
20305   # unix format.
20306   new_path=`$CYGPATH -u "$path"`
20307 
20308   # Now try to locate executable using which
20309   new_path=`$WHICH "$new_path" 2> /dev/null`
20310   # bat and cmd files are not always considered executable in cygwin causing which
20311   # to not find them
20312   if test "x$new_path" = x \
20313       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20314       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20315     new_path=`$CYGPATH -u "$path"`
20316   fi
20317   if test "x$new_path" = x; then
20318     # Oops. Which didn't find the executable.
20319     # The splitting of arguments from the executable at a space might have been incorrect,
20320     # since paths with space are more likely in Windows. Give it another try with the whole
20321     # argument.
20322     path="$complete"
20323     arguments="EOL"
20324     new_path=`$CYGPATH -u "$path"`
20325     new_path=`$WHICH "$new_path" 2> /dev/null`
20326     # bat and cmd files are not always considered executable in cygwin causing which
20327     # to not find them
20328     if test "x$new_path" = x \
20329         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20330         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20331       new_path=`$CYGPATH -u "$path"`
20332     fi
20333     if test "x$new_path" = x; then
20334       # It's still not found. Now this is an unrecoverable error.
20335       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20336 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20337       has_space=`$ECHO "$complete" | $GREP " "`
20338       if test "x$has_space" != x; then
20339         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20340 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20341       fi
20342       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20343     fi
20344   fi
20345 
20346   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20347   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20348   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20349   # "foo.exe" is OK but "foo" is an error.
20350   #
20351   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20352   # It is also a way to make sure we got the proper file name for the real test later on.
20353   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20354   if test "x$test_shortpath" = x; then
20355     # Short path failed, file does not exist as specified.
20356     # Try adding .exe or .cmd
20357     if test -f "${new_path}.exe"; then
20358       input_to_shortpath="${new_path}.exe"
20359     elif test -f "${new_path}.cmd"; then
20360       input_to_shortpath="${new_path}.cmd"
20361     else
20362       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20363 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20364       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20365 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20366       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20367     fi
20368   else
20369     input_to_shortpath="$new_path"
20370   fi
20371 
20372   # Call helper function which possibly converts this using DOS-style short mode.
20373   # If so, the updated path is stored in $new_path.
20374   new_path="$input_to_shortpath"
20375 
20376   input_path="$input_to_shortpath"
20377   # Check if we need to convert this using DOS-style short mode. If the path
20378   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20379   # take no chances and rewrite it.
20380   # Note: m4 eats our [], so we need to use [ and ] instead.
20381   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20382   if test "x$has_forbidden_chars" != x; then
20383     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20384     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20385     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20386     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20387       # Going to short mode and back again did indeed matter. Since short mode is
20388       # case insensitive, let's make it lowercase to improve readability.
20389       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20390       # Now convert it back to Unix-style (cygpath)
20391       input_path=`$CYGPATH -u "$shortmode_path"`
20392       new_path="$input_path"
20393     fi
20394   fi
20395 
20396   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20397   if test "x$test_cygdrive_prefix" = x; then
20398     # As a simple fix, exclude /usr/bin since it's not a real path.
20399     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20400       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20401       # a path prefixed by /cygdrive for fixpath to work.
20402       new_path="$CYGWIN_ROOT_PATH$input_path"
20403     fi
20404   fi
20405 
20406   # remove trailing .exe if any
20407   new_path="${new_path/%.exe/}"
20408 
20409     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20410 
20411   # First separate the path from the arguments. This will split at the first
20412   # space.
20413   complete="$FOUND_MAKE"
20414   path="${complete%% *}"
20415   tmp="$complete EOL"
20416   arguments="${tmp#* }"
20417 
20418   # Input might be given as Windows format, start by converting to
20419   # unix format.
20420   new_path="$path"
20421 
20422   windows_path="$new_path"
20423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20424     unix_path=`$CYGPATH -u "$windows_path"`
20425     new_path="$unix_path"
20426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20428     new_path="$unix_path"
20429   fi
20430 
20431 
20432   # Now try to locate executable using which
20433   new_path=`$WHICH "$new_path" 2> /dev/null`
20434 
20435   if test "x$new_path" = x; then
20436     # Oops. Which didn't find the executable.
20437     # The splitting of arguments from the executable at a space might have been incorrect,
20438     # since paths with space are more likely in Windows. Give it another try with the whole
20439     # argument.
20440     path="$complete"
20441     arguments="EOL"
20442     new_path="$path"
20443 
20444   windows_path="$new_path"
20445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20446     unix_path=`$CYGPATH -u "$windows_path"`
20447     new_path="$unix_path"
20448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20450     new_path="$unix_path"
20451   fi
20452 
20453 
20454     new_path=`$WHICH "$new_path" 2> /dev/null`
20455     # bat and cmd files are not always considered executable in MSYS causing which
20456     # to not find them
20457     if test "x$new_path" = x \
20458         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20459         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20460       new_path="$path"
20461 
20462   windows_path="$new_path"
20463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20464     unix_path=`$CYGPATH -u "$windows_path"`
20465     new_path="$unix_path"
20466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20468     new_path="$unix_path"
20469   fi
20470 
20471     fi
20472 
20473     if test "x$new_path" = x; then
20474       # It's still not found. Now this is an unrecoverable error.
20475       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20476 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20477       has_space=`$ECHO "$complete" | $GREP " "`
20478       if test "x$has_space" != x; then
20479         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20480 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20481       fi
20482       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20483     fi
20484   fi
20485 
20486   # Now new_path has a complete unix path to the binary
20487   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20488     # Keep paths in /bin as-is, but remove trailing .exe if any
20489     new_path="${new_path/%.exe/}"
20490     # Do not save /bin paths to all_fixpath_prefixes!
20491   else
20492     # Not in mixed or Windows style, start by that.
20493     new_path=`cmd //c echo $new_path`
20494 
20495   input_path="$new_path"
20496   # Check if we need to convert this using DOS-style short mode. If the path
20497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20498   # take no chances and rewrite it.
20499   # Note: m4 eats our [], so we need to use [ and ] instead.
20500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20501   if test "x$has_forbidden_chars" != x; then
20502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20503     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20504   fi
20505 
20506     # Output is in $new_path
20507 
20508   windows_path="$new_path"
20509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20510     unix_path=`$CYGPATH -u "$windows_path"`
20511     new_path="$unix_path"
20512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20513     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20514     new_path="$unix_path"
20515   fi
20516 
20517     # remove trailing .exe if any
20518     new_path="${new_path/%.exe/}"
20519 
20520     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20521     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20522   fi
20523 
20524     else
20525       # We're on a unix platform. Hooray! :)
20526       # First separate the path from the arguments. This will split at the first
20527       # space.
20528       complete="$FOUND_MAKE"
20529       path="${complete%% *}"
20530       tmp="$complete EOL"
20531       arguments="${tmp#* }"
20532 
20533       # Cannot rely on the command "which" here since it doesn't always work.
20534       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20535       if test -z "$is_absolute_path"; then
20536         # Path to executable is not absolute. Find it.
20537         IFS_save="$IFS"
20538         IFS=:
20539         for p in $PATH; do
20540           if test -f "$p/$path" && test -x "$p/$path"; then
20541             new_path="$p/$path"
20542             break
20543           fi
20544         done
20545         IFS="$IFS_save"
20546       else
20547         # This is an absolute path, we can use it without further modifications.
20548         new_path="$path"
20549       fi
20550 
20551       if test "x$new_path" = x; then
20552         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20553 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20554         has_space=`$ECHO "$complete" | $GREP " "`
20555         if test "x$has_space" != x; then
20556           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20557 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20558         fi
20559         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20560       fi
20561     fi
20562 
20563     # Now join together the path and the arguments once again
20564     if test "x$arguments" != xEOL; then
20565       new_complete="$new_path ${arguments% *}"
20566     else
20567       new_complete="$new_path"
20568     fi
20569 
20570     if test "x$complete" != "x$new_complete"; then
20571       FOUND_MAKE="$new_complete"
20572       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20573 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20574     fi
20575   fi
20576 
20577         fi
20578       fi
20579     fi
20580   fi
20581 
20582         if test "x$FOUND_MAKE" = x; then
20583           for ac_prog in make
20584 do
20585   # Extract the first word of "$ac_prog", so it can be a program name with args.
20586 set dummy $ac_prog; ac_word=$2
20587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20588 $as_echo_n "checking for $ac_word... " >&6; }
20589 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20590   $as_echo_n "(cached) " >&6
20591 else
20592   case $CHECK_TOOLSDIR_MAKE in
20593   [\\/]* | ?:[\\/]*)
20594   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20595   ;;
20596   *)
20597   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20598 for as_dir in $PATH
20599 do
20600   IFS=$as_save_IFS
20601   test -z "$as_dir" && as_dir=.
20602     for ac_exec_ext in '' $ac_executable_extensions; do
20603   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20604     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20605     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20606     break 2
20607   fi
20608 done
20609   done
20610 IFS=$as_save_IFS
20611 
20612   ;;
20613 esac
20614 fi
20615 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20616 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20618 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20619 else
20620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20621 $as_echo "no" >&6; }
20622 fi
20623 
20624 
20625   test -n "$CHECK_TOOLSDIR_MAKE" && break
20626 done
20627 
20628 
20629   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20630   DESCRIPTION="make in tools-dir"
20631 
20632   # On Cygwin, we require a newer version of make than on other platforms
20633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20634     MAKE_VERSION_EXPR="-e 4\."
20635     MAKE_REQUIRED_VERSION="4.0"
20636    else
20637     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20638     MAKE_REQUIRED_VERSION="3.81"
20639   fi
20640 
20641   if test "x$MAKE_CANDIDATE" != x; then
20642     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20643 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20644     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20645     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20646     if test "x$IS_GNU_MAKE" = x; then
20647       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20648 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20649     else
20650       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20651       if test "x$IS_MODERN_MAKE" = x; then
20652         { $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
20653 $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;}
20654       else
20655         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20656           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20657             MAKE_EXPECTED_ENV='cygwin'
20658           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20659             MAKE_EXPECTED_ENV='msys'
20660           else
20661             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20662           fi
20663           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20664           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20665         else
20666           # Not relevant for non-Windows
20667           IS_MAKE_CORRECT_ENV=true
20668         fi
20669         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20670           { $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
20671 $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;}
20672         else
20673           FOUND_MAKE=$MAKE_CANDIDATE
20674 
20675   # Only process if variable expands to non-empty
20676 
20677   if test "x$FOUND_MAKE" != x; then
20678     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20679 
20680   # First separate the path from the arguments. This will split at the first
20681   # space.
20682   complete="$FOUND_MAKE"
20683   path="${complete%% *}"
20684   tmp="$complete EOL"
20685   arguments="${tmp#* }"
20686 
20687   # Input might be given as Windows format, start by converting to
20688   # unix format.
20689   new_path=`$CYGPATH -u "$path"`
20690 
20691   # Now try to locate executable using which
20692   new_path=`$WHICH "$new_path" 2> /dev/null`
20693   # bat and cmd files are not always considered executable in cygwin causing which
20694   # to not find them
20695   if test "x$new_path" = x \
20696       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20697       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20698     new_path=`$CYGPATH -u "$path"`
20699   fi
20700   if test "x$new_path" = x; then
20701     # Oops. Which didn't find the executable.
20702     # The splitting of arguments from the executable at a space might have been incorrect,
20703     # since paths with space are more likely in Windows. Give it another try with the whole
20704     # argument.
20705     path="$complete"
20706     arguments="EOL"
20707     new_path=`$CYGPATH -u "$path"`
20708     new_path=`$WHICH "$new_path" 2> /dev/null`
20709     # bat and cmd files are not always considered executable in cygwin causing which
20710     # to not find them
20711     if test "x$new_path" = x \
20712         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20713         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20714       new_path=`$CYGPATH -u "$path"`
20715     fi
20716     if test "x$new_path" = x; then
20717       # It's still not found. Now this is an unrecoverable error.
20718       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20719 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20720       has_space=`$ECHO "$complete" | $GREP " "`
20721       if test "x$has_space" != x; then
20722         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20723 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20724       fi
20725       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20726     fi
20727   fi
20728 
20729   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20730   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20731   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20732   # "foo.exe" is OK but "foo" is an error.
20733   #
20734   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20735   # It is also a way to make sure we got the proper file name for the real test later on.
20736   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20737   if test "x$test_shortpath" = x; then
20738     # Short path failed, file does not exist as specified.
20739     # Try adding .exe or .cmd
20740     if test -f "${new_path}.exe"; then
20741       input_to_shortpath="${new_path}.exe"
20742     elif test -f "${new_path}.cmd"; then
20743       input_to_shortpath="${new_path}.cmd"
20744     else
20745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20746 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20747       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20748 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20749       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20750     fi
20751   else
20752     input_to_shortpath="$new_path"
20753   fi
20754 
20755   # Call helper function which possibly converts this using DOS-style short mode.
20756   # If so, the updated path is stored in $new_path.
20757   new_path="$input_to_shortpath"
20758 
20759   input_path="$input_to_shortpath"
20760   # Check if we need to convert this using DOS-style short mode. If the path
20761   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20762   # take no chances and rewrite it.
20763   # Note: m4 eats our [], so we need to use [ and ] instead.
20764   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20765   if test "x$has_forbidden_chars" != x; then
20766     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20767     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20768     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20769     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20770       # Going to short mode and back again did indeed matter. Since short mode is
20771       # case insensitive, let's make it lowercase to improve readability.
20772       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20773       # Now convert it back to Unix-style (cygpath)
20774       input_path=`$CYGPATH -u "$shortmode_path"`
20775       new_path="$input_path"
20776     fi
20777   fi
20778 
20779   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20780   if test "x$test_cygdrive_prefix" = x; then
20781     # As a simple fix, exclude /usr/bin since it's not a real path.
20782     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20783       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20784       # a path prefixed by /cygdrive for fixpath to work.
20785       new_path="$CYGWIN_ROOT_PATH$input_path"
20786     fi
20787   fi
20788 
20789   # remove trailing .exe if any
20790   new_path="${new_path/%.exe/}"
20791 
20792     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20793 
20794   # First separate the path from the arguments. This will split at the first
20795   # space.
20796   complete="$FOUND_MAKE"
20797   path="${complete%% *}"
20798   tmp="$complete EOL"
20799   arguments="${tmp#* }"
20800 
20801   # Input might be given as Windows format, start by converting to
20802   # unix format.
20803   new_path="$path"
20804 
20805   windows_path="$new_path"
20806   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20807     unix_path=`$CYGPATH -u "$windows_path"`
20808     new_path="$unix_path"
20809   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20810     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20811     new_path="$unix_path"
20812   fi
20813 
20814 
20815   # Now try to locate executable using which
20816   new_path=`$WHICH "$new_path" 2> /dev/null`
20817 
20818   if test "x$new_path" = x; then
20819     # Oops. Which didn't find the executable.
20820     # The splitting of arguments from the executable at a space might have been incorrect,
20821     # since paths with space are more likely in Windows. Give it another try with the whole
20822     # argument.
20823     path="$complete"
20824     arguments="EOL"
20825     new_path="$path"
20826 
20827   windows_path="$new_path"
20828   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20829     unix_path=`$CYGPATH -u "$windows_path"`
20830     new_path="$unix_path"
20831   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20832     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20833     new_path="$unix_path"
20834   fi
20835 
20836 
20837     new_path=`$WHICH "$new_path" 2> /dev/null`
20838     # bat and cmd files are not always considered executable in MSYS causing which
20839     # to not find them
20840     if test "x$new_path" = x \
20841         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20842         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20843       new_path="$path"
20844 
20845   windows_path="$new_path"
20846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20847     unix_path=`$CYGPATH -u "$windows_path"`
20848     new_path="$unix_path"
20849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20851     new_path="$unix_path"
20852   fi
20853 
20854     fi
20855 
20856     if test "x$new_path" = x; then
20857       # It's still not found. Now this is an unrecoverable error.
20858       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20859 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20860       has_space=`$ECHO "$complete" | $GREP " "`
20861       if test "x$has_space" != x; then
20862         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20863 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20864       fi
20865       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20866     fi
20867   fi
20868 
20869   # Now new_path has a complete unix path to the binary
20870   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20871     # Keep paths in /bin as-is, but remove trailing .exe if any
20872     new_path="${new_path/%.exe/}"
20873     # Do not save /bin paths to all_fixpath_prefixes!
20874   else
20875     # Not in mixed or Windows style, start by that.
20876     new_path=`cmd //c echo $new_path`
20877 
20878   input_path="$new_path"
20879   # Check if we need to convert this using DOS-style short mode. If the path
20880   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20881   # take no chances and rewrite it.
20882   # Note: m4 eats our [], so we need to use [ and ] instead.
20883   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20884   if test "x$has_forbidden_chars" != x; then
20885     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20886     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20887   fi
20888 
20889     # Output is in $new_path
20890 
20891   windows_path="$new_path"
20892   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20893     unix_path=`$CYGPATH -u "$windows_path"`
20894     new_path="$unix_path"
20895   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20896     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20897     new_path="$unix_path"
20898   fi
20899 
20900     # remove trailing .exe if any
20901     new_path="${new_path/%.exe/}"
20902 
20903     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20904     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20905   fi
20906 
20907     else
20908       # We're on a unix platform. Hooray! :)
20909       # First separate the path from the arguments. This will split at the first
20910       # space.
20911       complete="$FOUND_MAKE"
20912       path="${complete%% *}"
20913       tmp="$complete EOL"
20914       arguments="${tmp#* }"
20915 
20916       # Cannot rely on the command "which" here since it doesn't always work.
20917       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20918       if test -z "$is_absolute_path"; then
20919         # Path to executable is not absolute. Find it.
20920         IFS_save="$IFS"
20921         IFS=:
20922         for p in $PATH; do
20923           if test -f "$p/$path" && test -x "$p/$path"; then
20924             new_path="$p/$path"
20925             break
20926           fi
20927         done
20928         IFS="$IFS_save"
20929       else
20930         # This is an absolute path, we can use it without further modifications.
20931         new_path="$path"
20932       fi
20933 
20934       if test "x$new_path" = x; then
20935         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20936 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20937         has_space=`$ECHO "$complete" | $GREP " "`
20938         if test "x$has_space" != x; then
20939           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20940 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20941         fi
20942         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20943       fi
20944     fi
20945 
20946     # Now join together the path and the arguments once again
20947     if test "x$arguments" != xEOL; then
20948       new_complete="$new_path ${arguments% *}"
20949     else
20950       new_complete="$new_path"
20951     fi
20952 
20953     if test "x$complete" != "x$new_complete"; then
20954       FOUND_MAKE="$new_complete"
20955       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20956 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20957     fi
20958   fi
20959 
20960         fi
20961       fi
20962     fi
20963   fi
20964 
20965         fi
20966         PATH=$OLD_PATH
20967       fi
20968     fi
20969 
20970     if test "x$FOUND_MAKE" = x; then
20971       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
20972     fi
20973 
20974     else
20975       # If it succeeded, then it was overridden by the user. We will use it
20976       # for the tool.
20977 
20978       # First remove it from the list of overridden variables, so we can test
20979       # for unknown variables in the end.
20980       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20981 
20982       # Check if we try to supply an empty value
20983       if test "x$MAKE" = x; then
20984         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20985 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20986         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20987 $as_echo_n "checking for MAKE... " >&6; }
20988         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20989 $as_echo "disabled" >&6; }
20990       else
20991         # Check if the provided tool contains a complete path.
20992         tool_specified="$MAKE"
20993         tool_basename="${tool_specified##*/}"
20994         if test "x$tool_basename" = "x$tool_specified"; then
20995           # A command without a complete path is provided, search $PATH.
20996           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20997 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20998           # Extract the first word of "$tool_basename", so it can be a program name with args.
20999 set dummy $tool_basename; ac_word=$2
21000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21001 $as_echo_n "checking for $ac_word... " >&6; }
21002 if ${ac_cv_path_MAKE+:} false; then :
21003   $as_echo_n "(cached) " >&6
21004 else
21005   case $MAKE in
21006   [\\/]* | ?:[\\/]*)
21007   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
21008   ;;
21009   *)
21010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21011 for as_dir in $PATH
21012 do
21013   IFS=$as_save_IFS
21014   test -z "$as_dir" && as_dir=.
21015     for ac_exec_ext in '' $ac_executable_extensions; do
21016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21017     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21019     break 2
21020   fi
21021 done
21022   done
21023 IFS=$as_save_IFS
21024 
21025   ;;
21026 esac
21027 fi
21028 MAKE=$ac_cv_path_MAKE
21029 if test -n "$MAKE"; then
21030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21031 $as_echo "$MAKE" >&6; }
21032 else
21033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21034 $as_echo "no" >&6; }
21035 fi
21036 
21037 
21038           if test "x$MAKE" = x; then
21039             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21040           fi
21041         else
21042           # Otherwise we believe it is a complete path. Use it as it is.
21043           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21044 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21045           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21046 $as_echo_n "checking for MAKE... " >&6; }
21047           if test ! -x "$tool_specified"; then
21048             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21049 $as_echo "not found" >&6; }
21050             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21051           fi
21052           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21053 $as_echo "$tool_specified" >&6; }
21054         fi
21055       fi
21056     fi
21057 
21058     # If MAKE was set by user, verify the version
21059 
21060   MAKE_CANDIDATE=""$MAKE""
21061   DESCRIPTION="user supplied MAKE=$MAKE"
21062 
21063   # On Cygwin, we require a newer version of make than on other platforms
21064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21065     MAKE_VERSION_EXPR="-e 4\."
21066     MAKE_REQUIRED_VERSION="4.0"
21067    else
21068     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21069     MAKE_REQUIRED_VERSION="3.81"
21070   fi
21071 
21072   if test "x$MAKE_CANDIDATE" != x; then
21073     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21074 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21075     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21076     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21077     if test "x$IS_GNU_MAKE" = x; then
21078       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21079 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21080     else
21081       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21082       if test "x$IS_MODERN_MAKE" = x; then
21083         { $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
21084 $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;}
21085       else
21086         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21087           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21088             MAKE_EXPECTED_ENV='cygwin'
21089           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21090             MAKE_EXPECTED_ENV='msys'
21091           else
21092             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21093           fi
21094           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21095           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21096         else
21097           # Not relevant for non-Windows
21098           IS_MAKE_CORRECT_ENV=true
21099         fi
21100         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21101           { $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
21102 $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;}
21103         else
21104           FOUND_MAKE=$MAKE_CANDIDATE
21105 
21106   # Only process if variable expands to non-empty
21107 
21108   if test "x$FOUND_MAKE" != x; then
21109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21110 
21111   # First separate the path from the arguments. This will split at the first
21112   # space.
21113   complete="$FOUND_MAKE"
21114   path="${complete%% *}"
21115   tmp="$complete EOL"
21116   arguments="${tmp#* }"
21117 
21118   # Input might be given as Windows format, start by converting to
21119   # unix format.
21120   new_path=`$CYGPATH -u "$path"`
21121 
21122   # Now try to locate executable using which
21123   new_path=`$WHICH "$new_path" 2> /dev/null`
21124   # bat and cmd files are not always considered executable in cygwin causing which
21125   # to not find them
21126   if test "x$new_path" = x \
21127       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21128       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21129     new_path=`$CYGPATH -u "$path"`
21130   fi
21131   if test "x$new_path" = x; then
21132     # Oops. Which didn't find the executable.
21133     # The splitting of arguments from the executable at a space might have been incorrect,
21134     # since paths with space are more likely in Windows. Give it another try with the whole
21135     # argument.
21136     path="$complete"
21137     arguments="EOL"
21138     new_path=`$CYGPATH -u "$path"`
21139     new_path=`$WHICH "$new_path" 2> /dev/null`
21140     # bat and cmd files are not always considered executable in cygwin causing which
21141     # to not find them
21142     if test "x$new_path" = x \
21143         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21144         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21145       new_path=`$CYGPATH -u "$path"`
21146     fi
21147     if test "x$new_path" = x; then
21148       # It's still not found. Now this is an unrecoverable error.
21149       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21150 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21151       has_space=`$ECHO "$complete" | $GREP " "`
21152       if test "x$has_space" != x; then
21153         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21154 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21155       fi
21156       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21157     fi
21158   fi
21159 
21160   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21161   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21162   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21163   # "foo.exe" is OK but "foo" is an error.
21164   #
21165   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21166   # It is also a way to make sure we got the proper file name for the real test later on.
21167   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21168   if test "x$test_shortpath" = x; then
21169     # Short path failed, file does not exist as specified.
21170     # Try adding .exe or .cmd
21171     if test -f "${new_path}.exe"; then
21172       input_to_shortpath="${new_path}.exe"
21173     elif test -f "${new_path}.cmd"; then
21174       input_to_shortpath="${new_path}.cmd"
21175     else
21176       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21177 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21178       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21179 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21180       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21181     fi
21182   else
21183     input_to_shortpath="$new_path"
21184   fi
21185 
21186   # Call helper function which possibly converts this using DOS-style short mode.
21187   # If so, the updated path is stored in $new_path.
21188   new_path="$input_to_shortpath"
21189 
21190   input_path="$input_to_shortpath"
21191   # Check if we need to convert this using DOS-style short mode. If the path
21192   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21193   # take no chances and rewrite it.
21194   # Note: m4 eats our [], so we need to use [ and ] instead.
21195   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21196   if test "x$has_forbidden_chars" != x; then
21197     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21198     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21199     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21200     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21201       # Going to short mode and back again did indeed matter. Since short mode is
21202       # case insensitive, let's make it lowercase to improve readability.
21203       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21204       # Now convert it back to Unix-style (cygpath)
21205       input_path=`$CYGPATH -u "$shortmode_path"`
21206       new_path="$input_path"
21207     fi
21208   fi
21209 
21210   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21211   if test "x$test_cygdrive_prefix" = x; then
21212     # As a simple fix, exclude /usr/bin since it's not a real path.
21213     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21214       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21215       # a path prefixed by /cygdrive for fixpath to work.
21216       new_path="$CYGWIN_ROOT_PATH$input_path"
21217     fi
21218   fi
21219 
21220   # remove trailing .exe if any
21221   new_path="${new_path/%.exe/}"
21222 
21223     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21224 
21225   # First separate the path from the arguments. This will split at the first
21226   # space.
21227   complete="$FOUND_MAKE"
21228   path="${complete%% *}"
21229   tmp="$complete EOL"
21230   arguments="${tmp#* }"
21231 
21232   # Input might be given as Windows format, start by converting to
21233   # unix format.
21234   new_path="$path"
21235 
21236   windows_path="$new_path"
21237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21238     unix_path=`$CYGPATH -u "$windows_path"`
21239     new_path="$unix_path"
21240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21242     new_path="$unix_path"
21243   fi
21244 
21245 
21246   # Now try to locate executable using which
21247   new_path=`$WHICH "$new_path" 2> /dev/null`
21248 
21249   if test "x$new_path" = x; then
21250     # Oops. Which didn't find the executable.
21251     # The splitting of arguments from the executable at a space might have been incorrect,
21252     # since paths with space are more likely in Windows. Give it another try with the whole
21253     # argument.
21254     path="$complete"
21255     arguments="EOL"
21256     new_path="$path"
21257 
21258   windows_path="$new_path"
21259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21260     unix_path=`$CYGPATH -u "$windows_path"`
21261     new_path="$unix_path"
21262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21263     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21264     new_path="$unix_path"
21265   fi
21266 
21267 
21268     new_path=`$WHICH "$new_path" 2> /dev/null`
21269     # bat and cmd files are not always considered executable in MSYS causing which
21270     # to not find them
21271     if test "x$new_path" = x \
21272         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21273         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21274       new_path="$path"
21275 
21276   windows_path="$new_path"
21277   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21278     unix_path=`$CYGPATH -u "$windows_path"`
21279     new_path="$unix_path"
21280   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21281     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21282     new_path="$unix_path"
21283   fi
21284 
21285     fi
21286 
21287     if test "x$new_path" = x; then
21288       # It's still not found. Now this is an unrecoverable error.
21289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21290 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21291       has_space=`$ECHO "$complete" | $GREP " "`
21292       if test "x$has_space" != x; then
21293         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21294 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21295       fi
21296       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21297     fi
21298   fi
21299 
21300   # Now new_path has a complete unix path to the binary
21301   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21302     # Keep paths in /bin as-is, but remove trailing .exe if any
21303     new_path="${new_path/%.exe/}"
21304     # Do not save /bin paths to all_fixpath_prefixes!
21305   else
21306     # Not in mixed or Windows style, start by that.
21307     new_path=`cmd //c echo $new_path`
21308 
21309   input_path="$new_path"
21310   # Check if we need to convert this using DOS-style short mode. If the path
21311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21312   # take no chances and rewrite it.
21313   # Note: m4 eats our [], so we need to use [ and ] instead.
21314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21315   if test "x$has_forbidden_chars" != x; then
21316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21317     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21318   fi
21319 
21320     # Output is in $new_path
21321 
21322   windows_path="$new_path"
21323   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21324     unix_path=`$CYGPATH -u "$windows_path"`
21325     new_path="$unix_path"
21326   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21327     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21328     new_path="$unix_path"
21329   fi
21330 
21331     # remove trailing .exe if any
21332     new_path="${new_path/%.exe/}"
21333 
21334     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21335     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21336   fi
21337 
21338     else
21339       # We're on a unix platform. Hooray! :)
21340       # First separate the path from the arguments. This will split at the first
21341       # space.
21342       complete="$FOUND_MAKE"
21343       path="${complete%% *}"
21344       tmp="$complete EOL"
21345       arguments="${tmp#* }"
21346 
21347       # Cannot rely on the command "which" here since it doesn't always work.
21348       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21349       if test -z "$is_absolute_path"; then
21350         # Path to executable is not absolute. Find it.
21351         IFS_save="$IFS"
21352         IFS=:
21353         for p in $PATH; do
21354           if test -f "$p/$path" && test -x "$p/$path"; then
21355             new_path="$p/$path"
21356             break
21357           fi
21358         done
21359         IFS="$IFS_save"
21360       else
21361         # This is an absolute path, we can use it without further modifications.
21362         new_path="$path"
21363       fi
21364 
21365       if test "x$new_path" = x; then
21366         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21367 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21368         has_space=`$ECHO "$complete" | $GREP " "`
21369         if test "x$has_space" != x; then
21370           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21371 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21372         fi
21373         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21374       fi
21375     fi
21376 
21377     # Now join together the path and the arguments once again
21378     if test "x$arguments" != xEOL; then
21379       new_complete="$new_path ${arguments% *}"
21380     else
21381       new_complete="$new_path"
21382     fi
21383 
21384     if test "x$complete" != "x$new_complete"; then
21385       FOUND_MAKE="$new_complete"
21386       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21387 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21388     fi
21389   fi
21390 
21391         fi
21392       fi
21393     fi
21394   fi
21395 
21396     if test "x$FOUND_MAKE" = x; then
21397       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21398     fi
21399 
21400   fi
21401 
21402 
21403   MAKE=$FOUND_MAKE
21404 
21405   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21406 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21407 
21408 
21409   # Check if make supports the output sync option and if so, setup using it.
21410   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21411 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21412   if $MAKE --version -O > /dev/null 2>&1; then
21413     OUTPUT_SYNC_SUPPORTED=true
21414     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21415 $as_echo "yes" >&6; }
21416     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21417 $as_echo_n "checking for output-sync value... " >&6; }
21418 
21419 # Check whether --with-output-sync was given.
21420 if test "${with_output_sync+set}" = set; then :
21421   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21422 fi
21423 
21424     if test "x$OUTPUT_SYNC" = "x"; then
21425       OUTPUT_SYNC=none
21426     fi
21427     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21428 $as_echo "$OUTPUT_SYNC" >&6; }
21429     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21430       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21431     fi
21432   else
21433     OUTPUT_SYNC_SUPPORTED=false
21434     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21435 $as_echo "no" >&6; }
21436   fi
21437 
21438 
21439 
21440 
21441 
21442 
21443   # Test if find supports -delete
21444   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21445 $as_echo_n "checking if find supports -delete... " >&6; }
21446   FIND_DELETE="-delete"
21447 
21448   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21449 
21450   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21451 
21452   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21453   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21454     # No, it does not.
21455     $RM $DELETEDIR/TestIfFindSupportsDelete
21456     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21457       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21458       FIND_DELETE="-print | $XARGS $RM"
21459     else
21460       FIND_DELETE="-exec $RM \{\} \+"
21461     fi
21462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21463 $as_echo "no" >&6; }
21464   else
21465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21466 $as_echo "yes" >&6; }
21467   fi
21468   $RMDIR $DELETEDIR
21469 
21470 
21471 
21472   # Test which kind of tar was found
21473   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21474     TAR_TYPE="gnu"
21475   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21476     TAR_TYPE="bsd"
21477   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21478     TAR_TYPE="bsd"
21479   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21480     TAR_TYPE="solaris"
21481   fi
21482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21483 $as_echo_n "checking what type of tar was found... " >&6; }
21484   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21485 $as_echo "$TAR_TYPE" >&6; }
21486 
21487   TAR_CREATE_FILE_PARAM=""
21488 
21489   if test "x$TAR_TYPE" = "xgnu"; then
21490     TAR_INCLUDE_PARAM="T"
21491     TAR_SUPPORTS_TRANSFORM="true"
21492     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21493       # When using gnu tar for Solaris targets, need to use compatibility mode
21494       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21495     fi
21496   else
21497     TAR_INCLUDE_PARAM="I"
21498     TAR_SUPPORTS_TRANSFORM="false"
21499   fi
21500 
21501 
21502 
21503 
21504 
21505 
21506   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21507   # This is a problem for the grep resident on AIX.
21508   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21509 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21510   # Multiple subsequent spaces..
21511   STACK_SPACES='aaa   bbb   ccc'
21512   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21513   # patterns in it.
21514   STACK_LIST=${STACK_SPACES// /$'\n'}
21515   NEEDLE_SPACES='ccc bbb aaa'
21516   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21517   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21518   if test "x$RESULT" == "x"; then
21519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21520 $as_echo "yes" >&6; }
21521   else
21522     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21523       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21524     fi
21525     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21526   fi
21527 
21528 
21529   # These tools might not be installed by default,
21530   # need hint on how to install them.
21531 
21532 
21533 
21534   # Publish this variable in the help.
21535 
21536 
21537   if [ -z "${UNZIP+x}" ]; then
21538     # The variable is not set by user, try to locate tool using the code snippet
21539     for ac_prog in unzip
21540 do
21541   # Extract the first word of "$ac_prog", so it can be a program name with args.
21542 set dummy $ac_prog; ac_word=$2
21543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21544 $as_echo_n "checking for $ac_word... " >&6; }
21545 if ${ac_cv_path_UNZIP+:} false; then :
21546   $as_echo_n "(cached) " >&6
21547 else
21548   case $UNZIP in
21549   [\\/]* | ?:[\\/]*)
21550   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21551   ;;
21552   *)
21553   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21554 for as_dir in $PATH
21555 do
21556   IFS=$as_save_IFS
21557   test -z "$as_dir" && as_dir=.
21558     for ac_exec_ext in '' $ac_executable_extensions; do
21559   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21560     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21561     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21562     break 2
21563   fi
21564 done
21565   done
21566 IFS=$as_save_IFS
21567 
21568   ;;
21569 esac
21570 fi
21571 UNZIP=$ac_cv_path_UNZIP
21572 if test -n "$UNZIP"; then
21573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21574 $as_echo "$UNZIP" >&6; }
21575 else
21576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21577 $as_echo "no" >&6; }
21578 fi
21579 
21580 
21581   test -n "$UNZIP" && break
21582 done
21583 
21584   else
21585     # The variable is set, but is it from the command line or the environment?
21586 
21587     # Try to remove the string !UNZIP! from our list.
21588     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21589     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21590       # If it failed, the variable was not from the command line. Ignore it,
21591       # but warn the user (except for BASH, which is always set by the calling BASH).
21592       if test "xUNZIP" != xBASH; then
21593         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21594 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21595       fi
21596       # Try to locate tool using the code snippet
21597       for ac_prog in unzip
21598 do
21599   # Extract the first word of "$ac_prog", so it can be a program name with args.
21600 set dummy $ac_prog; ac_word=$2
21601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21602 $as_echo_n "checking for $ac_word... " >&6; }
21603 if ${ac_cv_path_UNZIP+:} false; then :
21604   $as_echo_n "(cached) " >&6
21605 else
21606   case $UNZIP in
21607   [\\/]* | ?:[\\/]*)
21608   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21609   ;;
21610   *)
21611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21612 for as_dir in $PATH
21613 do
21614   IFS=$as_save_IFS
21615   test -z "$as_dir" && as_dir=.
21616     for ac_exec_ext in '' $ac_executable_extensions; do
21617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21618     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21620     break 2
21621   fi
21622 done
21623   done
21624 IFS=$as_save_IFS
21625 
21626   ;;
21627 esac
21628 fi
21629 UNZIP=$ac_cv_path_UNZIP
21630 if test -n "$UNZIP"; then
21631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21632 $as_echo "$UNZIP" >&6; }
21633 else
21634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21635 $as_echo "no" >&6; }
21636 fi
21637 
21638 
21639   test -n "$UNZIP" && break
21640 done
21641 
21642     else
21643       # If it succeeded, then it was overridden by the user. We will use it
21644       # for the tool.
21645 
21646       # First remove it from the list of overridden variables, so we can test
21647       # for unknown variables in the end.
21648       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21649 
21650       # Check if we try to supply an empty value
21651       if test "x$UNZIP" = x; then
21652         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21653 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21655 $as_echo_n "checking for UNZIP... " >&6; }
21656         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21657 $as_echo "disabled" >&6; }
21658       else
21659         # Check if the provided tool contains a complete path.
21660         tool_specified="$UNZIP"
21661         tool_basename="${tool_specified##*/}"
21662         if test "x$tool_basename" = "x$tool_specified"; then
21663           # A command without a complete path is provided, search $PATH.
21664           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21665 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21666           # Extract the first word of "$tool_basename", so it can be a program name with args.
21667 set dummy $tool_basename; ac_word=$2
21668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21669 $as_echo_n "checking for $ac_word... " >&6; }
21670 if ${ac_cv_path_UNZIP+:} false; then :
21671   $as_echo_n "(cached) " >&6
21672 else
21673   case $UNZIP in
21674   [\\/]* | ?:[\\/]*)
21675   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21676   ;;
21677   *)
21678   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21679 for as_dir in $PATH
21680 do
21681   IFS=$as_save_IFS
21682   test -z "$as_dir" && as_dir=.
21683     for ac_exec_ext in '' $ac_executable_extensions; do
21684   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21685     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21686     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21687     break 2
21688   fi
21689 done
21690   done
21691 IFS=$as_save_IFS
21692 
21693   ;;
21694 esac
21695 fi
21696 UNZIP=$ac_cv_path_UNZIP
21697 if test -n "$UNZIP"; then
21698   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21699 $as_echo "$UNZIP" >&6; }
21700 else
21701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21702 $as_echo "no" >&6; }
21703 fi
21704 
21705 
21706           if test "x$UNZIP" = x; then
21707             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21708           fi
21709         else
21710           # Otherwise we believe it is a complete path. Use it as it is.
21711           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21712 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21713           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21714 $as_echo_n "checking for UNZIP... " >&6; }
21715           if test ! -x "$tool_specified"; then
21716             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21717 $as_echo "not found" >&6; }
21718             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21719           fi
21720           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21721 $as_echo "$tool_specified" >&6; }
21722         fi
21723       fi
21724     fi
21725 
21726   fi
21727 
21728 
21729 
21730   if test "x$UNZIP" = x; then
21731     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21732   fi
21733 
21734 
21735   # Since zip uses "ZIP" as a environment variable for passing options, we need
21736   # to name our variable differently, hence ZIPEXE.
21737 
21738 
21739 
21740   # Publish this variable in the help.
21741 
21742 
21743   if [ -z "${ZIPEXE+x}" ]; then
21744     # The variable is not set by user, try to locate tool using the code snippet
21745     for ac_prog in zip
21746 do
21747   # Extract the first word of "$ac_prog", so it can be a program name with args.
21748 set dummy $ac_prog; ac_word=$2
21749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21750 $as_echo_n "checking for $ac_word... " >&6; }
21751 if ${ac_cv_path_ZIPEXE+:} false; then :
21752   $as_echo_n "(cached) " >&6
21753 else
21754   case $ZIPEXE in
21755   [\\/]* | ?:[\\/]*)
21756   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21757   ;;
21758   *)
21759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21760 for as_dir in $PATH
21761 do
21762   IFS=$as_save_IFS
21763   test -z "$as_dir" && as_dir=.
21764     for ac_exec_ext in '' $ac_executable_extensions; do
21765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21766     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21768     break 2
21769   fi
21770 done
21771   done
21772 IFS=$as_save_IFS
21773 
21774   ;;
21775 esac
21776 fi
21777 ZIPEXE=$ac_cv_path_ZIPEXE
21778 if test -n "$ZIPEXE"; then
21779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21780 $as_echo "$ZIPEXE" >&6; }
21781 else
21782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21783 $as_echo "no" >&6; }
21784 fi
21785 
21786 
21787   test -n "$ZIPEXE" && break
21788 done
21789 
21790   else
21791     # The variable is set, but is it from the command line or the environment?
21792 
21793     # Try to remove the string !ZIPEXE! from our list.
21794     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21795     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21796       # If it failed, the variable was not from the command line. Ignore it,
21797       # but warn the user (except for BASH, which is always set by the calling BASH).
21798       if test "xZIPEXE" != xBASH; then
21799         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21800 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21801       fi
21802       # Try to locate tool using the code snippet
21803       for ac_prog in zip
21804 do
21805   # Extract the first word of "$ac_prog", so it can be a program name with args.
21806 set dummy $ac_prog; ac_word=$2
21807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21808 $as_echo_n "checking for $ac_word... " >&6; }
21809 if ${ac_cv_path_ZIPEXE+:} false; then :
21810   $as_echo_n "(cached) " >&6
21811 else
21812   case $ZIPEXE in
21813   [\\/]* | ?:[\\/]*)
21814   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21815   ;;
21816   *)
21817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21818 for as_dir in $PATH
21819 do
21820   IFS=$as_save_IFS
21821   test -z "$as_dir" && as_dir=.
21822     for ac_exec_ext in '' $ac_executable_extensions; do
21823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21824     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21826     break 2
21827   fi
21828 done
21829   done
21830 IFS=$as_save_IFS
21831 
21832   ;;
21833 esac
21834 fi
21835 ZIPEXE=$ac_cv_path_ZIPEXE
21836 if test -n "$ZIPEXE"; then
21837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21838 $as_echo "$ZIPEXE" >&6; }
21839 else
21840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21841 $as_echo "no" >&6; }
21842 fi
21843 
21844 
21845   test -n "$ZIPEXE" && break
21846 done
21847 
21848     else
21849       # If it succeeded, then it was overridden by the user. We will use it
21850       # for the tool.
21851 
21852       # First remove it from the list of overridden variables, so we can test
21853       # for unknown variables in the end.
21854       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21855 
21856       # Check if we try to supply an empty value
21857       if test "x$ZIPEXE" = x; then
21858         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21859 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21861 $as_echo_n "checking for ZIPEXE... " >&6; }
21862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21863 $as_echo "disabled" >&6; }
21864       else
21865         # Check if the provided tool contains a complete path.
21866         tool_specified="$ZIPEXE"
21867         tool_basename="${tool_specified##*/}"
21868         if test "x$tool_basename" = "x$tool_specified"; then
21869           # A command without a complete path is provided, search $PATH.
21870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21871 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21872           # Extract the first word of "$tool_basename", so it can be a program name with args.
21873 set dummy $tool_basename; ac_word=$2
21874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21875 $as_echo_n "checking for $ac_word... " >&6; }
21876 if ${ac_cv_path_ZIPEXE+:} false; then :
21877   $as_echo_n "(cached) " >&6
21878 else
21879   case $ZIPEXE in
21880   [\\/]* | ?:[\\/]*)
21881   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21882   ;;
21883   *)
21884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21885 for as_dir in $PATH
21886 do
21887   IFS=$as_save_IFS
21888   test -z "$as_dir" && as_dir=.
21889     for ac_exec_ext in '' $ac_executable_extensions; do
21890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21891     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21893     break 2
21894   fi
21895 done
21896   done
21897 IFS=$as_save_IFS
21898 
21899   ;;
21900 esac
21901 fi
21902 ZIPEXE=$ac_cv_path_ZIPEXE
21903 if test -n "$ZIPEXE"; then
21904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21905 $as_echo "$ZIPEXE" >&6; }
21906 else
21907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21908 $as_echo "no" >&6; }
21909 fi
21910 
21911 
21912           if test "x$ZIPEXE" = x; then
21913             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21914           fi
21915         else
21916           # Otherwise we believe it is a complete path. Use it as it is.
21917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21918 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21919           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21920 $as_echo_n "checking for ZIPEXE... " >&6; }
21921           if test ! -x "$tool_specified"; then
21922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21923 $as_echo "not found" >&6; }
21924             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21925           fi
21926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21927 $as_echo "$tool_specified" >&6; }
21928         fi
21929       fi
21930     fi
21931 
21932   fi
21933 
21934 
21935 
21936   if test "x$ZIPEXE" = x; then
21937     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21938   fi
21939 
21940 
21941 
21942   # Non-required basic tools
21943 
21944 
21945 
21946   # Publish this variable in the help.
21947 
21948 
21949   if [ -z "${LDD+x}" ]; then
21950     # The variable is not set by user, try to locate tool using the code snippet
21951     for ac_prog in ldd
21952 do
21953   # Extract the first word of "$ac_prog", so it can be a program name with args.
21954 set dummy $ac_prog; ac_word=$2
21955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21956 $as_echo_n "checking for $ac_word... " >&6; }
21957 if ${ac_cv_path_LDD+:} false; then :
21958   $as_echo_n "(cached) " >&6
21959 else
21960   case $LDD in
21961   [\\/]* | ?:[\\/]*)
21962   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21963   ;;
21964   *)
21965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21966 for as_dir in $PATH
21967 do
21968   IFS=$as_save_IFS
21969   test -z "$as_dir" && as_dir=.
21970     for ac_exec_ext in '' $ac_executable_extensions; do
21971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21972     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21974     break 2
21975   fi
21976 done
21977   done
21978 IFS=$as_save_IFS
21979 
21980   ;;
21981 esac
21982 fi
21983 LDD=$ac_cv_path_LDD
21984 if test -n "$LDD"; then
21985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21986 $as_echo "$LDD" >&6; }
21987 else
21988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21989 $as_echo "no" >&6; }
21990 fi
21991 
21992 
21993   test -n "$LDD" && break
21994 done
21995 
21996   else
21997     # The variable is set, but is it from the command line or the environment?
21998 
21999     # Try to remove the string !LDD! from our list.
22000     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
22001     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22002       # If it failed, the variable was not from the command line. Ignore it,
22003       # but warn the user (except for BASH, which is always set by the calling BASH).
22004       if test "xLDD" != xBASH; then
22005         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
22006 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
22007       fi
22008       # Try to locate tool using the code snippet
22009       for ac_prog in ldd
22010 do
22011   # Extract the first word of "$ac_prog", so it can be a program name with args.
22012 set dummy $ac_prog; ac_word=$2
22013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22014 $as_echo_n "checking for $ac_word... " >&6; }
22015 if ${ac_cv_path_LDD+:} false; then :
22016   $as_echo_n "(cached) " >&6
22017 else
22018   case $LDD in
22019   [\\/]* | ?:[\\/]*)
22020   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22021   ;;
22022   *)
22023   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22024 for as_dir in $PATH
22025 do
22026   IFS=$as_save_IFS
22027   test -z "$as_dir" && as_dir=.
22028     for ac_exec_ext in '' $ac_executable_extensions; do
22029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22030     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22032     break 2
22033   fi
22034 done
22035   done
22036 IFS=$as_save_IFS
22037 
22038   ;;
22039 esac
22040 fi
22041 LDD=$ac_cv_path_LDD
22042 if test -n "$LDD"; then
22043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22044 $as_echo "$LDD" >&6; }
22045 else
22046   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22047 $as_echo "no" >&6; }
22048 fi
22049 
22050 
22051   test -n "$LDD" && break
22052 done
22053 
22054     else
22055       # If it succeeded, then it was overridden by the user. We will use it
22056       # for the tool.
22057 
22058       # First remove it from the list of overridden variables, so we can test
22059       # for unknown variables in the end.
22060       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22061 
22062       # Check if we try to supply an empty value
22063       if test "x$LDD" = x; then
22064         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22065 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22066         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22067 $as_echo_n "checking for LDD... " >&6; }
22068         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22069 $as_echo "disabled" >&6; }
22070       else
22071         # Check if the provided tool contains a complete path.
22072         tool_specified="$LDD"
22073         tool_basename="${tool_specified##*/}"
22074         if test "x$tool_basename" = "x$tool_specified"; then
22075           # A command without a complete path is provided, search $PATH.
22076           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22077 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22078           # Extract the first word of "$tool_basename", so it can be a program name with args.
22079 set dummy $tool_basename; ac_word=$2
22080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22081 $as_echo_n "checking for $ac_word... " >&6; }
22082 if ${ac_cv_path_LDD+:} false; then :
22083   $as_echo_n "(cached) " >&6
22084 else
22085   case $LDD in
22086   [\\/]* | ?:[\\/]*)
22087   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22088   ;;
22089   *)
22090   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22091 for as_dir in $PATH
22092 do
22093   IFS=$as_save_IFS
22094   test -z "$as_dir" && as_dir=.
22095     for ac_exec_ext in '' $ac_executable_extensions; do
22096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22097     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22099     break 2
22100   fi
22101 done
22102   done
22103 IFS=$as_save_IFS
22104 
22105   ;;
22106 esac
22107 fi
22108 LDD=$ac_cv_path_LDD
22109 if test -n "$LDD"; then
22110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22111 $as_echo "$LDD" >&6; }
22112 else
22113   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22114 $as_echo "no" >&6; }
22115 fi
22116 
22117 
22118           if test "x$LDD" = x; then
22119             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22120           fi
22121         else
22122           # Otherwise we believe it is a complete path. Use it as it is.
22123           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22124 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22125           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22126 $as_echo_n "checking for LDD... " >&6; }
22127           if test ! -x "$tool_specified"; then
22128             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22129 $as_echo "not found" >&6; }
22130             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22131           fi
22132           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22133 $as_echo "$tool_specified" >&6; }
22134         fi
22135       fi
22136     fi
22137 
22138   fi
22139 
22140 
22141   if test "x$LDD" = "x"; then
22142     # List shared lib dependencies is used for
22143     # debug output and checking for forbidden dependencies.
22144     # We can build without it.
22145     LDD="true"
22146   fi
22147 
22148 
22149   # Publish this variable in the help.
22150 
22151 
22152   if [ -z "${READELF+x}" ]; then
22153     # The variable is not set by user, try to locate tool using the code snippet
22154     for ac_prog in greadelf readelf
22155 do
22156   # Extract the first word of "$ac_prog", so it can be a program name with args.
22157 set dummy $ac_prog; ac_word=$2
22158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22159 $as_echo_n "checking for $ac_word... " >&6; }
22160 if ${ac_cv_path_READELF+:} false; then :
22161   $as_echo_n "(cached) " >&6
22162 else
22163   case $READELF in
22164   [\\/]* | ?:[\\/]*)
22165   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22166   ;;
22167   *)
22168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22169 for as_dir in $PATH
22170 do
22171   IFS=$as_save_IFS
22172   test -z "$as_dir" && as_dir=.
22173     for ac_exec_ext in '' $ac_executable_extensions; do
22174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22175     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22177     break 2
22178   fi
22179 done
22180   done
22181 IFS=$as_save_IFS
22182 
22183   ;;
22184 esac
22185 fi
22186 READELF=$ac_cv_path_READELF
22187 if test -n "$READELF"; then
22188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22189 $as_echo "$READELF" >&6; }
22190 else
22191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22192 $as_echo "no" >&6; }
22193 fi
22194 
22195 
22196   test -n "$READELF" && break
22197 done
22198 
22199   else
22200     # The variable is set, but is it from the command line or the environment?
22201 
22202     # Try to remove the string !READELF! from our list.
22203     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22204     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22205       # If it failed, the variable was not from the command line. Ignore it,
22206       # but warn the user (except for BASH, which is always set by the calling BASH).
22207       if test "xREADELF" != xBASH; then
22208         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22209 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22210       fi
22211       # Try to locate tool using the code snippet
22212       for ac_prog in greadelf readelf
22213 do
22214   # Extract the first word of "$ac_prog", so it can be a program name with args.
22215 set dummy $ac_prog; ac_word=$2
22216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22217 $as_echo_n "checking for $ac_word... " >&6; }
22218 if ${ac_cv_path_READELF+:} false; then :
22219   $as_echo_n "(cached) " >&6
22220 else
22221   case $READELF in
22222   [\\/]* | ?:[\\/]*)
22223   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22224   ;;
22225   *)
22226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22227 for as_dir in $PATH
22228 do
22229   IFS=$as_save_IFS
22230   test -z "$as_dir" && as_dir=.
22231     for ac_exec_ext in '' $ac_executable_extensions; do
22232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22233     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22235     break 2
22236   fi
22237 done
22238   done
22239 IFS=$as_save_IFS
22240 
22241   ;;
22242 esac
22243 fi
22244 READELF=$ac_cv_path_READELF
22245 if test -n "$READELF"; then
22246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22247 $as_echo "$READELF" >&6; }
22248 else
22249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22250 $as_echo "no" >&6; }
22251 fi
22252 
22253 
22254   test -n "$READELF" && break
22255 done
22256 
22257     else
22258       # If it succeeded, then it was overridden by the user. We will use it
22259       # for the tool.
22260 
22261       # First remove it from the list of overridden variables, so we can test
22262       # for unknown variables in the end.
22263       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22264 
22265       # Check if we try to supply an empty value
22266       if test "x$READELF" = x; then
22267         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22268 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22270 $as_echo_n "checking for READELF... " >&6; }
22271         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22272 $as_echo "disabled" >&6; }
22273       else
22274         # Check if the provided tool contains a complete path.
22275         tool_specified="$READELF"
22276         tool_basename="${tool_specified##*/}"
22277         if test "x$tool_basename" = "x$tool_specified"; then
22278           # A command without a complete path is provided, search $PATH.
22279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22280 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22281           # Extract the first word of "$tool_basename", so it can be a program name with args.
22282 set dummy $tool_basename; ac_word=$2
22283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22284 $as_echo_n "checking for $ac_word... " >&6; }
22285 if ${ac_cv_path_READELF+:} false; then :
22286   $as_echo_n "(cached) " >&6
22287 else
22288   case $READELF in
22289   [\\/]* | ?:[\\/]*)
22290   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22291   ;;
22292   *)
22293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22294 for as_dir in $PATH
22295 do
22296   IFS=$as_save_IFS
22297   test -z "$as_dir" && as_dir=.
22298     for ac_exec_ext in '' $ac_executable_extensions; do
22299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22300     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22302     break 2
22303   fi
22304 done
22305   done
22306 IFS=$as_save_IFS
22307 
22308   ;;
22309 esac
22310 fi
22311 READELF=$ac_cv_path_READELF
22312 if test -n "$READELF"; then
22313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22314 $as_echo "$READELF" >&6; }
22315 else
22316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22317 $as_echo "no" >&6; }
22318 fi
22319 
22320 
22321           if test "x$READELF" = x; then
22322             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22323           fi
22324         else
22325           # Otherwise we believe it is a complete path. Use it as it is.
22326           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22327 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22328           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22329 $as_echo_n "checking for READELF... " >&6; }
22330           if test ! -x "$tool_specified"; then
22331             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22332 $as_echo "not found" >&6; }
22333             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22334           fi
22335           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22336 $as_echo "$tool_specified" >&6; }
22337         fi
22338       fi
22339     fi
22340 
22341   fi
22342 
22343 
22344 
22345 
22346   # Publish this variable in the help.
22347 
22348 
22349   if [ -z "${DOT+x}" ]; then
22350     # The variable is not set by user, try to locate tool using the code snippet
22351     for ac_prog in dot
22352 do
22353   # Extract the first word of "$ac_prog", so it can be a program name with args.
22354 set dummy $ac_prog; ac_word=$2
22355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22356 $as_echo_n "checking for $ac_word... " >&6; }
22357 if ${ac_cv_path_DOT+:} false; then :
22358   $as_echo_n "(cached) " >&6
22359 else
22360   case $DOT in
22361   [\\/]* | ?:[\\/]*)
22362   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22363   ;;
22364   *)
22365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22366 for as_dir in $PATH
22367 do
22368   IFS=$as_save_IFS
22369   test -z "$as_dir" && as_dir=.
22370     for ac_exec_ext in '' $ac_executable_extensions; do
22371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22372     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22374     break 2
22375   fi
22376 done
22377   done
22378 IFS=$as_save_IFS
22379 
22380   ;;
22381 esac
22382 fi
22383 DOT=$ac_cv_path_DOT
22384 if test -n "$DOT"; then
22385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22386 $as_echo "$DOT" >&6; }
22387 else
22388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22389 $as_echo "no" >&6; }
22390 fi
22391 
22392 
22393   test -n "$DOT" && break
22394 done
22395 
22396   else
22397     # The variable is set, but is it from the command line or the environment?
22398 
22399     # Try to remove the string !DOT! from our list.
22400     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22401     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22402       # If it failed, the variable was not from the command line. Ignore it,
22403       # but warn the user (except for BASH, which is always set by the calling BASH).
22404       if test "xDOT" != xBASH; then
22405         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22406 $as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22407       fi
22408       # Try to locate tool using the code snippet
22409       for ac_prog in dot
22410 do
22411   # Extract the first word of "$ac_prog", so it can be a program name with args.
22412 set dummy $ac_prog; ac_word=$2
22413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22414 $as_echo_n "checking for $ac_word... " >&6; }
22415 if ${ac_cv_path_DOT+:} false; then :
22416   $as_echo_n "(cached) " >&6
22417 else
22418   case $DOT in
22419   [\\/]* | ?:[\\/]*)
22420   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22421   ;;
22422   *)
22423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22424 for as_dir in $PATH
22425 do
22426   IFS=$as_save_IFS
22427   test -z "$as_dir" && as_dir=.
22428     for ac_exec_ext in '' $ac_executable_extensions; do
22429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22430     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22432     break 2
22433   fi
22434 done
22435   done
22436 IFS=$as_save_IFS
22437 
22438   ;;
22439 esac
22440 fi
22441 DOT=$ac_cv_path_DOT
22442 if test -n "$DOT"; then
22443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22444 $as_echo "$DOT" >&6; }
22445 else
22446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22447 $as_echo "no" >&6; }
22448 fi
22449 
22450 
22451   test -n "$DOT" && break
22452 done
22453 
22454     else
22455       # If it succeeded, then it was overridden by the user. We will use it
22456       # for the tool.
22457 
22458       # First remove it from the list of overridden variables, so we can test
22459       # for unknown variables in the end.
22460       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22461 
22462       # Check if we try to supply an empty value
22463       if test "x$DOT" = x; then
22464         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22465 $as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22466         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22467 $as_echo_n "checking for DOT... " >&6; }
22468         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22469 $as_echo "disabled" >&6; }
22470       else
22471         # Check if the provided tool contains a complete path.
22472         tool_specified="$DOT"
22473         tool_basename="${tool_specified##*/}"
22474         if test "x$tool_basename" = "x$tool_specified"; then
22475           # A command without a complete path is provided, search $PATH.
22476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22477 $as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22478           # Extract the first word of "$tool_basename", so it can be a program name with args.
22479 set dummy $tool_basename; ac_word=$2
22480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22481 $as_echo_n "checking for $ac_word... " >&6; }
22482 if ${ac_cv_path_DOT+:} false; then :
22483   $as_echo_n "(cached) " >&6
22484 else
22485   case $DOT in
22486   [\\/]* | ?:[\\/]*)
22487   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22488   ;;
22489   *)
22490   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22491 for as_dir in $PATH
22492 do
22493   IFS=$as_save_IFS
22494   test -z "$as_dir" && as_dir=.
22495     for ac_exec_ext in '' $ac_executable_extensions; do
22496   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22497     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22498     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22499     break 2
22500   fi
22501 done
22502   done
22503 IFS=$as_save_IFS
22504 
22505   ;;
22506 esac
22507 fi
22508 DOT=$ac_cv_path_DOT
22509 if test -n "$DOT"; then
22510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22511 $as_echo "$DOT" >&6; }
22512 else
22513   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22514 $as_echo "no" >&6; }
22515 fi
22516 
22517 
22518           if test "x$DOT" = x; then
22519             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22520           fi
22521         else
22522           # Otherwise we believe it is a complete path. Use it as it is.
22523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22524 $as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22525           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22526 $as_echo_n "checking for DOT... " >&6; }
22527           if test ! -x "$tool_specified"; then
22528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22529 $as_echo "not found" >&6; }
22530             as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22531           fi
22532           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22533 $as_echo "$tool_specified" >&6; }
22534         fi
22535       fi
22536     fi
22537 
22538   fi
22539 
22540 
22541 
22542 
22543   # Publish this variable in the help.
22544 
22545 
22546   if [ -z "${HG+x}" ]; then
22547     # The variable is not set by user, try to locate tool using the code snippet
22548     for ac_prog in hg
22549 do
22550   # Extract the first word of "$ac_prog", so it can be a program name with args.
22551 set dummy $ac_prog; ac_word=$2
22552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22553 $as_echo_n "checking for $ac_word... " >&6; }
22554 if ${ac_cv_path_HG+:} false; then :
22555   $as_echo_n "(cached) " >&6
22556 else
22557   case $HG in
22558   [\\/]* | ?:[\\/]*)
22559   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22560   ;;
22561   *)
22562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22563 for as_dir in $PATH
22564 do
22565   IFS=$as_save_IFS
22566   test -z "$as_dir" && as_dir=.
22567     for ac_exec_ext in '' $ac_executable_extensions; do
22568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22569     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22571     break 2
22572   fi
22573 done
22574   done
22575 IFS=$as_save_IFS
22576 
22577   ;;
22578 esac
22579 fi
22580 HG=$ac_cv_path_HG
22581 if test -n "$HG"; then
22582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22583 $as_echo "$HG" >&6; }
22584 else
22585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22586 $as_echo "no" >&6; }
22587 fi
22588 
22589 
22590   test -n "$HG" && break
22591 done
22592 
22593   else
22594     # The variable is set, but is it from the command line or the environment?
22595 
22596     # Try to remove the string !HG! from our list.
22597     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22598     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22599       # If it failed, the variable was not from the command line. Ignore it,
22600       # but warn the user (except for BASH, which is always set by the calling BASH).
22601       if test "xHG" != xBASH; then
22602         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22603 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22604       fi
22605       # Try to locate tool using the code snippet
22606       for ac_prog in hg
22607 do
22608   # Extract the first word of "$ac_prog", so it can be a program name with args.
22609 set dummy $ac_prog; ac_word=$2
22610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22611 $as_echo_n "checking for $ac_word... " >&6; }
22612 if ${ac_cv_path_HG+:} false; then :
22613   $as_echo_n "(cached) " >&6
22614 else
22615   case $HG in
22616   [\\/]* | ?:[\\/]*)
22617   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22618   ;;
22619   *)
22620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22621 for as_dir in $PATH
22622 do
22623   IFS=$as_save_IFS
22624   test -z "$as_dir" && as_dir=.
22625     for ac_exec_ext in '' $ac_executable_extensions; do
22626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22627     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22629     break 2
22630   fi
22631 done
22632   done
22633 IFS=$as_save_IFS
22634 
22635   ;;
22636 esac
22637 fi
22638 HG=$ac_cv_path_HG
22639 if test -n "$HG"; then
22640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22641 $as_echo "$HG" >&6; }
22642 else
22643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22644 $as_echo "no" >&6; }
22645 fi
22646 
22647 
22648   test -n "$HG" && break
22649 done
22650 
22651     else
22652       # If it succeeded, then it was overridden by the user. We will use it
22653       # for the tool.
22654 
22655       # First remove it from the list of overridden variables, so we can test
22656       # for unknown variables in the end.
22657       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22658 
22659       # Check if we try to supply an empty value
22660       if test "x$HG" = x; then
22661         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22662 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22663         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22664 $as_echo_n "checking for HG... " >&6; }
22665         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22666 $as_echo "disabled" >&6; }
22667       else
22668         # Check if the provided tool contains a complete path.
22669         tool_specified="$HG"
22670         tool_basename="${tool_specified##*/}"
22671         if test "x$tool_basename" = "x$tool_specified"; then
22672           # A command without a complete path is provided, search $PATH.
22673           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22674 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22675           # Extract the first word of "$tool_basename", so it can be a program name with args.
22676 set dummy $tool_basename; ac_word=$2
22677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22678 $as_echo_n "checking for $ac_word... " >&6; }
22679 if ${ac_cv_path_HG+:} false; then :
22680   $as_echo_n "(cached) " >&6
22681 else
22682   case $HG in
22683   [\\/]* | ?:[\\/]*)
22684   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22685   ;;
22686   *)
22687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22688 for as_dir in $PATH
22689 do
22690   IFS=$as_save_IFS
22691   test -z "$as_dir" && as_dir=.
22692     for ac_exec_ext in '' $ac_executable_extensions; do
22693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22694     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22696     break 2
22697   fi
22698 done
22699   done
22700 IFS=$as_save_IFS
22701 
22702   ;;
22703 esac
22704 fi
22705 HG=$ac_cv_path_HG
22706 if test -n "$HG"; then
22707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22708 $as_echo "$HG" >&6; }
22709 else
22710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22711 $as_echo "no" >&6; }
22712 fi
22713 
22714 
22715           if test "x$HG" = x; then
22716             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22717           fi
22718         else
22719           # Otherwise we believe it is a complete path. Use it as it is.
22720           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22721 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22722           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22723 $as_echo_n "checking for HG... " >&6; }
22724           if test ! -x "$tool_specified"; then
22725             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22726 $as_echo "not found" >&6; }
22727             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22728           fi
22729           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22730 $as_echo "$tool_specified" >&6; }
22731         fi
22732       fi
22733     fi
22734 
22735   fi
22736 
22737 
22738 
22739 
22740   # Publish this variable in the help.
22741 
22742 
22743   if [ -z "${STAT+x}" ]; then
22744     # The variable is not set by user, try to locate tool using the code snippet
22745     for ac_prog in stat
22746 do
22747   # Extract the first word of "$ac_prog", so it can be a program name with args.
22748 set dummy $ac_prog; ac_word=$2
22749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22750 $as_echo_n "checking for $ac_word... " >&6; }
22751 if ${ac_cv_path_STAT+:} false; then :
22752   $as_echo_n "(cached) " >&6
22753 else
22754   case $STAT in
22755   [\\/]* | ?:[\\/]*)
22756   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22757   ;;
22758   *)
22759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22760 for as_dir in $PATH
22761 do
22762   IFS=$as_save_IFS
22763   test -z "$as_dir" && as_dir=.
22764     for ac_exec_ext in '' $ac_executable_extensions; do
22765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22766     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22768     break 2
22769   fi
22770 done
22771   done
22772 IFS=$as_save_IFS
22773 
22774   ;;
22775 esac
22776 fi
22777 STAT=$ac_cv_path_STAT
22778 if test -n "$STAT"; then
22779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22780 $as_echo "$STAT" >&6; }
22781 else
22782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22783 $as_echo "no" >&6; }
22784 fi
22785 
22786 
22787   test -n "$STAT" && break
22788 done
22789 
22790   else
22791     # The variable is set, but is it from the command line or the environment?
22792 
22793     # Try to remove the string !STAT! from our list.
22794     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22795     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22796       # If it failed, the variable was not from the command line. Ignore it,
22797       # but warn the user (except for BASH, which is always set by the calling BASH).
22798       if test "xSTAT" != xBASH; then
22799         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22800 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22801       fi
22802       # Try to locate tool using the code snippet
22803       for ac_prog in stat
22804 do
22805   # Extract the first word of "$ac_prog", so it can be a program name with args.
22806 set dummy $ac_prog; ac_word=$2
22807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22808 $as_echo_n "checking for $ac_word... " >&6; }
22809 if ${ac_cv_path_STAT+:} false; then :
22810   $as_echo_n "(cached) " >&6
22811 else
22812   case $STAT in
22813   [\\/]* | ?:[\\/]*)
22814   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22815   ;;
22816   *)
22817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22818 for as_dir in $PATH
22819 do
22820   IFS=$as_save_IFS
22821   test -z "$as_dir" && as_dir=.
22822     for ac_exec_ext in '' $ac_executable_extensions; do
22823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22824     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22826     break 2
22827   fi
22828 done
22829   done
22830 IFS=$as_save_IFS
22831 
22832   ;;
22833 esac
22834 fi
22835 STAT=$ac_cv_path_STAT
22836 if test -n "$STAT"; then
22837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22838 $as_echo "$STAT" >&6; }
22839 else
22840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22841 $as_echo "no" >&6; }
22842 fi
22843 
22844 
22845   test -n "$STAT" && break
22846 done
22847 
22848     else
22849       # If it succeeded, then it was overridden by the user. We will use it
22850       # for the tool.
22851 
22852       # First remove it from the list of overridden variables, so we can test
22853       # for unknown variables in the end.
22854       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22855 
22856       # Check if we try to supply an empty value
22857       if test "x$STAT" = x; then
22858         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22859 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22861 $as_echo_n "checking for STAT... " >&6; }
22862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22863 $as_echo "disabled" >&6; }
22864       else
22865         # Check if the provided tool contains a complete path.
22866         tool_specified="$STAT"
22867         tool_basename="${tool_specified##*/}"
22868         if test "x$tool_basename" = "x$tool_specified"; then
22869           # A command without a complete path is provided, search $PATH.
22870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22871 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22872           # Extract the first word of "$tool_basename", so it can be a program name with args.
22873 set dummy $tool_basename; ac_word=$2
22874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22875 $as_echo_n "checking for $ac_word... " >&6; }
22876 if ${ac_cv_path_STAT+:} false; then :
22877   $as_echo_n "(cached) " >&6
22878 else
22879   case $STAT in
22880   [\\/]* | ?:[\\/]*)
22881   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22882   ;;
22883   *)
22884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22885 for as_dir in $PATH
22886 do
22887   IFS=$as_save_IFS
22888   test -z "$as_dir" && as_dir=.
22889     for ac_exec_ext in '' $ac_executable_extensions; do
22890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22891     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22893     break 2
22894   fi
22895 done
22896   done
22897 IFS=$as_save_IFS
22898 
22899   ;;
22900 esac
22901 fi
22902 STAT=$ac_cv_path_STAT
22903 if test -n "$STAT"; then
22904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22905 $as_echo "$STAT" >&6; }
22906 else
22907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22908 $as_echo "no" >&6; }
22909 fi
22910 
22911 
22912           if test "x$STAT" = x; then
22913             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22914           fi
22915         else
22916           # Otherwise we believe it is a complete path. Use it as it is.
22917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22918 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22919           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22920 $as_echo_n "checking for STAT... " >&6; }
22921           if test ! -x "$tool_specified"; then
22922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22923 $as_echo "not found" >&6; }
22924             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22925           fi
22926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22927 $as_echo "$tool_specified" >&6; }
22928         fi
22929       fi
22930     fi
22931 
22932   fi
22933 
22934 
22935 
22936 
22937   # Publish this variable in the help.
22938 
22939 
22940   if [ -z "${TIME+x}" ]; then
22941     # The variable is not set by user, try to locate tool using the code snippet
22942     for ac_prog in time
22943 do
22944   # Extract the first word of "$ac_prog", so it can be a program name with args.
22945 set dummy $ac_prog; ac_word=$2
22946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22947 $as_echo_n "checking for $ac_word... " >&6; }
22948 if ${ac_cv_path_TIME+:} false; then :
22949   $as_echo_n "(cached) " >&6
22950 else
22951   case $TIME in
22952   [\\/]* | ?:[\\/]*)
22953   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22954   ;;
22955   *)
22956   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22957 for as_dir in $PATH
22958 do
22959   IFS=$as_save_IFS
22960   test -z "$as_dir" && as_dir=.
22961     for ac_exec_ext in '' $ac_executable_extensions; do
22962   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22963     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22964     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22965     break 2
22966   fi
22967 done
22968   done
22969 IFS=$as_save_IFS
22970 
22971   ;;
22972 esac
22973 fi
22974 TIME=$ac_cv_path_TIME
22975 if test -n "$TIME"; then
22976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22977 $as_echo "$TIME" >&6; }
22978 else
22979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22980 $as_echo "no" >&6; }
22981 fi
22982 
22983 
22984   test -n "$TIME" && break
22985 done
22986 
22987   else
22988     # The variable is set, but is it from the command line or the environment?
22989 
22990     # Try to remove the string !TIME! from our list.
22991     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22992     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22993       # If it failed, the variable was not from the command line. Ignore it,
22994       # but warn the user (except for BASH, which is always set by the calling BASH).
22995       if test "xTIME" != xBASH; then
22996         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22997 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22998       fi
22999       # Try to locate tool using the code snippet
23000       for ac_prog in time
23001 do
23002   # Extract the first word of "$ac_prog", so it can be a program name with args.
23003 set dummy $ac_prog; ac_word=$2
23004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23005 $as_echo_n "checking for $ac_word... " >&6; }
23006 if ${ac_cv_path_TIME+:} false; then :
23007   $as_echo_n "(cached) " >&6
23008 else
23009   case $TIME in
23010   [\\/]* | ?:[\\/]*)
23011   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23012   ;;
23013   *)
23014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23015 for as_dir in $PATH
23016 do
23017   IFS=$as_save_IFS
23018   test -z "$as_dir" && as_dir=.
23019     for ac_exec_ext in '' $ac_executable_extensions; do
23020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23021     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23023     break 2
23024   fi
23025 done
23026   done
23027 IFS=$as_save_IFS
23028 
23029   ;;
23030 esac
23031 fi
23032 TIME=$ac_cv_path_TIME
23033 if test -n "$TIME"; then
23034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23035 $as_echo "$TIME" >&6; }
23036 else
23037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23038 $as_echo "no" >&6; }
23039 fi
23040 
23041 
23042   test -n "$TIME" && break
23043 done
23044 
23045     else
23046       # If it succeeded, then it was overridden by the user. We will use it
23047       # for the tool.
23048 
23049       # First remove it from the list of overridden variables, so we can test
23050       # for unknown variables in the end.
23051       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23052 
23053       # Check if we try to supply an empty value
23054       if test "x$TIME" = x; then
23055         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23056 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23057         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23058 $as_echo_n "checking for TIME... " >&6; }
23059         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23060 $as_echo "disabled" >&6; }
23061       else
23062         # Check if the provided tool contains a complete path.
23063         tool_specified="$TIME"
23064         tool_basename="${tool_specified##*/}"
23065         if test "x$tool_basename" = "x$tool_specified"; then
23066           # A command without a complete path is provided, search $PATH.
23067           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23068 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23069           # Extract the first word of "$tool_basename", so it can be a program name with args.
23070 set dummy $tool_basename; ac_word=$2
23071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23072 $as_echo_n "checking for $ac_word... " >&6; }
23073 if ${ac_cv_path_TIME+:} false; then :
23074   $as_echo_n "(cached) " >&6
23075 else
23076   case $TIME in
23077   [\\/]* | ?:[\\/]*)
23078   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23079   ;;
23080   *)
23081   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23082 for as_dir in $PATH
23083 do
23084   IFS=$as_save_IFS
23085   test -z "$as_dir" && as_dir=.
23086     for ac_exec_ext in '' $ac_executable_extensions; do
23087   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23088     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23089     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23090     break 2
23091   fi
23092 done
23093   done
23094 IFS=$as_save_IFS
23095 
23096   ;;
23097 esac
23098 fi
23099 TIME=$ac_cv_path_TIME
23100 if test -n "$TIME"; then
23101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23102 $as_echo "$TIME" >&6; }
23103 else
23104   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23105 $as_echo "no" >&6; }
23106 fi
23107 
23108 
23109           if test "x$TIME" = x; then
23110             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23111           fi
23112         else
23113           # Otherwise we believe it is a complete path. Use it as it is.
23114           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23115 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23116           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23117 $as_echo_n "checking for TIME... " >&6; }
23118           if test ! -x "$tool_specified"; then
23119             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23120 $as_echo "not found" >&6; }
23121             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23122           fi
23123           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23124 $as_echo "$tool_specified" >&6; }
23125         fi
23126       fi
23127     fi
23128 
23129   fi
23130 
23131 
23132 
23133 
23134   # Publish this variable in the help.
23135 
23136 
23137   if [ -z "${FLOCK+x}" ]; then
23138     # The variable is not set by user, try to locate tool using the code snippet
23139     for ac_prog in flock
23140 do
23141   # Extract the first word of "$ac_prog", so it can be a program name with args.
23142 set dummy $ac_prog; ac_word=$2
23143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23144 $as_echo_n "checking for $ac_word... " >&6; }
23145 if ${ac_cv_path_FLOCK+:} false; then :
23146   $as_echo_n "(cached) " >&6
23147 else
23148   case $FLOCK in
23149   [\\/]* | ?:[\\/]*)
23150   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23151   ;;
23152   *)
23153   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23154 for as_dir in $PATH
23155 do
23156   IFS=$as_save_IFS
23157   test -z "$as_dir" && as_dir=.
23158     for ac_exec_ext in '' $ac_executable_extensions; do
23159   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23160     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23161     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23162     break 2
23163   fi
23164 done
23165   done
23166 IFS=$as_save_IFS
23167 
23168   ;;
23169 esac
23170 fi
23171 FLOCK=$ac_cv_path_FLOCK
23172 if test -n "$FLOCK"; then
23173   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23174 $as_echo "$FLOCK" >&6; }
23175 else
23176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23177 $as_echo "no" >&6; }
23178 fi
23179 
23180 
23181   test -n "$FLOCK" && break
23182 done
23183 
23184   else
23185     # The variable is set, but is it from the command line or the environment?
23186 
23187     # Try to remove the string !FLOCK! from our list.
23188     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23189     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23190       # If it failed, the variable was not from the command line. Ignore it,
23191       # but warn the user (except for BASH, which is always set by the calling BASH).
23192       if test "xFLOCK" != xBASH; then
23193         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23194 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23195       fi
23196       # Try to locate tool using the code snippet
23197       for ac_prog in flock
23198 do
23199   # Extract the first word of "$ac_prog", so it can be a program name with args.
23200 set dummy $ac_prog; ac_word=$2
23201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23202 $as_echo_n "checking for $ac_word... " >&6; }
23203 if ${ac_cv_path_FLOCK+:} false; then :
23204   $as_echo_n "(cached) " >&6
23205 else
23206   case $FLOCK in
23207   [\\/]* | ?:[\\/]*)
23208   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23209   ;;
23210   *)
23211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23212 for as_dir in $PATH
23213 do
23214   IFS=$as_save_IFS
23215   test -z "$as_dir" && as_dir=.
23216     for ac_exec_ext in '' $ac_executable_extensions; do
23217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23218     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23220     break 2
23221   fi
23222 done
23223   done
23224 IFS=$as_save_IFS
23225 
23226   ;;
23227 esac
23228 fi
23229 FLOCK=$ac_cv_path_FLOCK
23230 if test -n "$FLOCK"; then
23231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23232 $as_echo "$FLOCK" >&6; }
23233 else
23234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23235 $as_echo "no" >&6; }
23236 fi
23237 
23238 
23239   test -n "$FLOCK" && break
23240 done
23241 
23242     else
23243       # If it succeeded, then it was overridden by the user. We will use it
23244       # for the tool.
23245 
23246       # First remove it from the list of overridden variables, so we can test
23247       # for unknown variables in the end.
23248       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23249 
23250       # Check if we try to supply an empty value
23251       if test "x$FLOCK" = x; then
23252         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23253 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23254         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23255 $as_echo_n "checking for FLOCK... " >&6; }
23256         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23257 $as_echo "disabled" >&6; }
23258       else
23259         # Check if the provided tool contains a complete path.
23260         tool_specified="$FLOCK"
23261         tool_basename="${tool_specified##*/}"
23262         if test "x$tool_basename" = "x$tool_specified"; then
23263           # A command without a complete path is provided, search $PATH.
23264           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23265 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23266           # Extract the first word of "$tool_basename", so it can be a program name with args.
23267 set dummy $tool_basename; ac_word=$2
23268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23269 $as_echo_n "checking for $ac_word... " >&6; }
23270 if ${ac_cv_path_FLOCK+:} false; then :
23271   $as_echo_n "(cached) " >&6
23272 else
23273   case $FLOCK in
23274   [\\/]* | ?:[\\/]*)
23275   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23276   ;;
23277   *)
23278   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23279 for as_dir in $PATH
23280 do
23281   IFS=$as_save_IFS
23282   test -z "$as_dir" && as_dir=.
23283     for ac_exec_ext in '' $ac_executable_extensions; do
23284   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23285     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23286     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23287     break 2
23288   fi
23289 done
23290   done
23291 IFS=$as_save_IFS
23292 
23293   ;;
23294 esac
23295 fi
23296 FLOCK=$ac_cv_path_FLOCK
23297 if test -n "$FLOCK"; then
23298   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23299 $as_echo "$FLOCK" >&6; }
23300 else
23301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23302 $as_echo "no" >&6; }
23303 fi
23304 
23305 
23306           if test "x$FLOCK" = x; then
23307             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23308           fi
23309         else
23310           # Otherwise we believe it is a complete path. Use it as it is.
23311           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23312 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23313           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23314 $as_echo_n "checking for FLOCK... " >&6; }
23315           if test ! -x "$tool_specified"; then
23316             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23317 $as_echo "not found" >&6; }
23318             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23319           fi
23320           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23321 $as_echo "$tool_specified" >&6; }
23322         fi
23323       fi
23324     fi
23325 
23326   fi
23327 
23328 
23329   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23330   # be in the user path.
23331 
23332 
23333   # Publish this variable in the help.
23334 
23335 
23336   if [ -z "${DTRACE+x}" ]; then
23337     # The variable is not set by user, try to locate tool using the code snippet
23338     for ac_prog in dtrace
23339 do
23340   # Extract the first word of "$ac_prog", so it can be a program name with args.
23341 set dummy $ac_prog; ac_word=$2
23342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23343 $as_echo_n "checking for $ac_word... " >&6; }
23344 if ${ac_cv_path_DTRACE+:} false; then :
23345   $as_echo_n "(cached) " >&6
23346 else
23347   case $DTRACE in
23348   [\\/]* | ?:[\\/]*)
23349   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23350   ;;
23351   *)
23352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23353 as_dummy="$PATH:/usr/sbin"
23354 for as_dir in $as_dummy
23355 do
23356   IFS=$as_save_IFS
23357   test -z "$as_dir" && as_dir=.
23358     for ac_exec_ext in '' $ac_executable_extensions; do
23359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23360     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23362     break 2
23363   fi
23364 done
23365   done
23366 IFS=$as_save_IFS
23367 
23368   ;;
23369 esac
23370 fi
23371 DTRACE=$ac_cv_path_DTRACE
23372 if test -n "$DTRACE"; then
23373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23374 $as_echo "$DTRACE" >&6; }
23375 else
23376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23377 $as_echo "no" >&6; }
23378 fi
23379 
23380 
23381   test -n "$DTRACE" && break
23382 done
23383 
23384   else
23385     # The variable is set, but is it from the command line or the environment?
23386 
23387     # Try to remove the string !DTRACE! from our list.
23388     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23389     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23390       # If it failed, the variable was not from the command line. Ignore it,
23391       # but warn the user (except for BASH, which is always set by the calling BASH).
23392       if test "xDTRACE" != xBASH; then
23393         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23394 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23395       fi
23396       # Try to locate tool using the code snippet
23397       for ac_prog in dtrace
23398 do
23399   # Extract the first word of "$ac_prog", so it can be a program name with args.
23400 set dummy $ac_prog; ac_word=$2
23401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23402 $as_echo_n "checking for $ac_word... " >&6; }
23403 if ${ac_cv_path_DTRACE+:} false; then :
23404   $as_echo_n "(cached) " >&6
23405 else
23406   case $DTRACE in
23407   [\\/]* | ?:[\\/]*)
23408   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23409   ;;
23410   *)
23411   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23412 as_dummy="$PATH:/usr/sbin"
23413 for as_dir in $as_dummy
23414 do
23415   IFS=$as_save_IFS
23416   test -z "$as_dir" && as_dir=.
23417     for ac_exec_ext in '' $ac_executable_extensions; do
23418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23419     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23421     break 2
23422   fi
23423 done
23424   done
23425 IFS=$as_save_IFS
23426 
23427   ;;
23428 esac
23429 fi
23430 DTRACE=$ac_cv_path_DTRACE
23431 if test -n "$DTRACE"; then
23432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23433 $as_echo "$DTRACE" >&6; }
23434 else
23435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23436 $as_echo "no" >&6; }
23437 fi
23438 
23439 
23440   test -n "$DTRACE" && break
23441 done
23442 
23443     else
23444       # If it succeeded, then it was overridden by the user. We will use it
23445       # for the tool.
23446 
23447       # First remove it from the list of overridden variables, so we can test
23448       # for unknown variables in the end.
23449       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23450 
23451       # Check if we try to supply an empty value
23452       if test "x$DTRACE" = x; then
23453         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23454 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23455         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23456 $as_echo_n "checking for DTRACE... " >&6; }
23457         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23458 $as_echo "disabled" >&6; }
23459       else
23460         # Check if the provided tool contains a complete path.
23461         tool_specified="$DTRACE"
23462         tool_basename="${tool_specified##*/}"
23463         if test "x$tool_basename" = "x$tool_specified"; then
23464           # A command without a complete path is provided, search $PATH.
23465           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23466 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23467           # Extract the first word of "$tool_basename", so it can be a program name with args.
23468 set dummy $tool_basename; ac_word=$2
23469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23470 $as_echo_n "checking for $ac_word... " >&6; }
23471 if ${ac_cv_path_DTRACE+:} false; then :
23472   $as_echo_n "(cached) " >&6
23473 else
23474   case $DTRACE in
23475   [\\/]* | ?:[\\/]*)
23476   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23477   ;;
23478   *)
23479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23480 for as_dir in $PATH
23481 do
23482   IFS=$as_save_IFS
23483   test -z "$as_dir" && as_dir=.
23484     for ac_exec_ext in '' $ac_executable_extensions; do
23485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23486     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23488     break 2
23489   fi
23490 done
23491   done
23492 IFS=$as_save_IFS
23493 
23494   ;;
23495 esac
23496 fi
23497 DTRACE=$ac_cv_path_DTRACE
23498 if test -n "$DTRACE"; then
23499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23500 $as_echo "$DTRACE" >&6; }
23501 else
23502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23503 $as_echo "no" >&6; }
23504 fi
23505 
23506 
23507           if test "x$DTRACE" = x; then
23508             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23509           fi
23510         else
23511           # Otherwise we believe it is a complete path. Use it as it is.
23512           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23513 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23514           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23515 $as_echo_n "checking for DTRACE... " >&6; }
23516           if test ! -x "$tool_specified"; then
23517             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23518 $as_echo "not found" >&6; }
23519             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23520           fi
23521           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23522 $as_echo "$tool_specified" >&6; }
23523         fi
23524       fi
23525     fi
23526 
23527   fi
23528 
23529 
23530 
23531 
23532   # Publish this variable in the help.
23533 
23534 
23535   if [ -z "${PATCH+x}" ]; then
23536     # The variable is not set by user, try to locate tool using the code snippet
23537     for ac_prog in gpatch patch
23538 do
23539   # Extract the first word of "$ac_prog", so it can be a program name with args.
23540 set dummy $ac_prog; ac_word=$2
23541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23542 $as_echo_n "checking for $ac_word... " >&6; }
23543 if ${ac_cv_path_PATCH+:} false; then :
23544   $as_echo_n "(cached) " >&6
23545 else
23546   case $PATCH in
23547   [\\/]* | ?:[\\/]*)
23548   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23549   ;;
23550   *)
23551   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23552 for as_dir in $PATH
23553 do
23554   IFS=$as_save_IFS
23555   test -z "$as_dir" && as_dir=.
23556     for ac_exec_ext in '' $ac_executable_extensions; do
23557   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23558     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23559     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23560     break 2
23561   fi
23562 done
23563   done
23564 IFS=$as_save_IFS
23565 
23566   ;;
23567 esac
23568 fi
23569 PATCH=$ac_cv_path_PATCH
23570 if test -n "$PATCH"; then
23571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23572 $as_echo "$PATCH" >&6; }
23573 else
23574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23575 $as_echo "no" >&6; }
23576 fi
23577 
23578 
23579   test -n "$PATCH" && break
23580 done
23581 
23582   else
23583     # The variable is set, but is it from the command line or the environment?
23584 
23585     # Try to remove the string !PATCH! from our list.
23586     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23587     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23588       # If it failed, the variable was not from the command line. Ignore it,
23589       # but warn the user (except for BASH, which is always set by the calling BASH).
23590       if test "xPATCH" != xBASH; then
23591         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23592 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23593       fi
23594       # Try to locate tool using the code snippet
23595       for ac_prog in gpatch patch
23596 do
23597   # Extract the first word of "$ac_prog", so it can be a program name with args.
23598 set dummy $ac_prog; ac_word=$2
23599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23600 $as_echo_n "checking for $ac_word... " >&6; }
23601 if ${ac_cv_path_PATCH+:} false; then :
23602   $as_echo_n "(cached) " >&6
23603 else
23604   case $PATCH in
23605   [\\/]* | ?:[\\/]*)
23606   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23607   ;;
23608   *)
23609   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23610 for as_dir in $PATH
23611 do
23612   IFS=$as_save_IFS
23613   test -z "$as_dir" && as_dir=.
23614     for ac_exec_ext in '' $ac_executable_extensions; do
23615   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23616     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23617     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23618     break 2
23619   fi
23620 done
23621   done
23622 IFS=$as_save_IFS
23623 
23624   ;;
23625 esac
23626 fi
23627 PATCH=$ac_cv_path_PATCH
23628 if test -n "$PATCH"; then
23629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23630 $as_echo "$PATCH" >&6; }
23631 else
23632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23633 $as_echo "no" >&6; }
23634 fi
23635 
23636 
23637   test -n "$PATCH" && break
23638 done
23639 
23640     else
23641       # If it succeeded, then it was overridden by the user. We will use it
23642       # for the tool.
23643 
23644       # First remove it from the list of overridden variables, so we can test
23645       # for unknown variables in the end.
23646       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23647 
23648       # Check if we try to supply an empty value
23649       if test "x$PATCH" = x; then
23650         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23651 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23652         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23653 $as_echo_n "checking for PATCH... " >&6; }
23654         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23655 $as_echo "disabled" >&6; }
23656       else
23657         # Check if the provided tool contains a complete path.
23658         tool_specified="$PATCH"
23659         tool_basename="${tool_specified##*/}"
23660         if test "x$tool_basename" = "x$tool_specified"; then
23661           # A command without a complete path is provided, search $PATH.
23662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23663 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23664           # Extract the first word of "$tool_basename", so it can be a program name with args.
23665 set dummy $tool_basename; ac_word=$2
23666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23667 $as_echo_n "checking for $ac_word... " >&6; }
23668 if ${ac_cv_path_PATCH+:} false; then :
23669   $as_echo_n "(cached) " >&6
23670 else
23671   case $PATCH in
23672   [\\/]* | ?:[\\/]*)
23673   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23674   ;;
23675   *)
23676   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23677 for as_dir in $PATH
23678 do
23679   IFS=$as_save_IFS
23680   test -z "$as_dir" && as_dir=.
23681     for ac_exec_ext in '' $ac_executable_extensions; do
23682   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23683     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23684     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23685     break 2
23686   fi
23687 done
23688   done
23689 IFS=$as_save_IFS
23690 
23691   ;;
23692 esac
23693 fi
23694 PATCH=$ac_cv_path_PATCH
23695 if test -n "$PATCH"; then
23696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23697 $as_echo "$PATCH" >&6; }
23698 else
23699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23700 $as_echo "no" >&6; }
23701 fi
23702 
23703 
23704           if test "x$PATCH" = x; then
23705             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23706           fi
23707         else
23708           # Otherwise we believe it is a complete path. Use it as it is.
23709           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23710 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23711           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23712 $as_echo_n "checking for PATCH... " >&6; }
23713           if test ! -x "$tool_specified"; then
23714             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23715 $as_echo "not found" >&6; }
23716             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23717           fi
23718           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23719 $as_echo "$tool_specified" >&6; }
23720         fi
23721       fi
23722     fi
23723 
23724   fi
23725 
23726 
23727   # Check if it's GNU time
23728   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23729   if test "x$IS_GNU_TIME" != x; then
23730     IS_GNU_TIME=yes
23731   else
23732     IS_GNU_TIME=no
23733   fi
23734 
23735 
23736   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23737 
23738 
23739 
23740   # Publish this variable in the help.
23741 
23742 
23743   if [ -z "${DSYMUTIL+x}" ]; then
23744     # The variable is not set by user, try to locate tool using the code snippet
23745     for ac_prog in dsymutil
23746 do
23747   # Extract the first word of "$ac_prog", so it can be a program name with args.
23748 set dummy $ac_prog; ac_word=$2
23749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23750 $as_echo_n "checking for $ac_word... " >&6; }
23751 if ${ac_cv_path_DSYMUTIL+:} false; then :
23752   $as_echo_n "(cached) " >&6
23753 else
23754   case $DSYMUTIL in
23755   [\\/]* | ?:[\\/]*)
23756   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23757   ;;
23758   *)
23759   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23760 for as_dir in $PATH
23761 do
23762   IFS=$as_save_IFS
23763   test -z "$as_dir" && as_dir=.
23764     for ac_exec_ext in '' $ac_executable_extensions; do
23765   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23766     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23767     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23768     break 2
23769   fi
23770 done
23771   done
23772 IFS=$as_save_IFS
23773 
23774   ;;
23775 esac
23776 fi
23777 DSYMUTIL=$ac_cv_path_DSYMUTIL
23778 if test -n "$DSYMUTIL"; then
23779   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23780 $as_echo "$DSYMUTIL" >&6; }
23781 else
23782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23783 $as_echo "no" >&6; }
23784 fi
23785 
23786 
23787   test -n "$DSYMUTIL" && break
23788 done
23789 
23790   else
23791     # The variable is set, but is it from the command line or the environment?
23792 
23793     # Try to remove the string !DSYMUTIL! from our list.
23794     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23795     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23796       # If it failed, the variable was not from the command line. Ignore it,
23797       # but warn the user (except for BASH, which is always set by the calling BASH).
23798       if test "xDSYMUTIL" != xBASH; then
23799         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23800 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23801       fi
23802       # Try to locate tool using the code snippet
23803       for ac_prog in dsymutil
23804 do
23805   # Extract the first word of "$ac_prog", so it can be a program name with args.
23806 set dummy $ac_prog; ac_word=$2
23807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23808 $as_echo_n "checking for $ac_word... " >&6; }
23809 if ${ac_cv_path_DSYMUTIL+:} false; then :
23810   $as_echo_n "(cached) " >&6
23811 else
23812   case $DSYMUTIL in
23813   [\\/]* | ?:[\\/]*)
23814   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23815   ;;
23816   *)
23817   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23818 for as_dir in $PATH
23819 do
23820   IFS=$as_save_IFS
23821   test -z "$as_dir" && as_dir=.
23822     for ac_exec_ext in '' $ac_executable_extensions; do
23823   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23824     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23825     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23826     break 2
23827   fi
23828 done
23829   done
23830 IFS=$as_save_IFS
23831 
23832   ;;
23833 esac
23834 fi
23835 DSYMUTIL=$ac_cv_path_DSYMUTIL
23836 if test -n "$DSYMUTIL"; then
23837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23838 $as_echo "$DSYMUTIL" >&6; }
23839 else
23840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23841 $as_echo "no" >&6; }
23842 fi
23843 
23844 
23845   test -n "$DSYMUTIL" && break
23846 done
23847 
23848     else
23849       # If it succeeded, then it was overridden by the user. We will use it
23850       # for the tool.
23851 
23852       # First remove it from the list of overridden variables, so we can test
23853       # for unknown variables in the end.
23854       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23855 
23856       # Check if we try to supply an empty value
23857       if test "x$DSYMUTIL" = x; then
23858         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23859 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23860         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23861 $as_echo_n "checking for DSYMUTIL... " >&6; }
23862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23863 $as_echo "disabled" >&6; }
23864       else
23865         # Check if the provided tool contains a complete path.
23866         tool_specified="$DSYMUTIL"
23867         tool_basename="${tool_specified##*/}"
23868         if test "x$tool_basename" = "x$tool_specified"; then
23869           # A command without a complete path is provided, search $PATH.
23870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23871 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23872           # Extract the first word of "$tool_basename", so it can be a program name with args.
23873 set dummy $tool_basename; ac_word=$2
23874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23875 $as_echo_n "checking for $ac_word... " >&6; }
23876 if ${ac_cv_path_DSYMUTIL+:} false; then :
23877   $as_echo_n "(cached) " >&6
23878 else
23879   case $DSYMUTIL in
23880   [\\/]* | ?:[\\/]*)
23881   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23882   ;;
23883   *)
23884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23885 for as_dir in $PATH
23886 do
23887   IFS=$as_save_IFS
23888   test -z "$as_dir" && as_dir=.
23889     for ac_exec_ext in '' $ac_executable_extensions; do
23890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23891     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23893     break 2
23894   fi
23895 done
23896   done
23897 IFS=$as_save_IFS
23898 
23899   ;;
23900 esac
23901 fi
23902 DSYMUTIL=$ac_cv_path_DSYMUTIL
23903 if test -n "$DSYMUTIL"; then
23904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23905 $as_echo "$DSYMUTIL" >&6; }
23906 else
23907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23908 $as_echo "no" >&6; }
23909 fi
23910 
23911 
23912           if test "x$DSYMUTIL" = x; then
23913             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23914           fi
23915         else
23916           # Otherwise we believe it is a complete path. Use it as it is.
23917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23918 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23919           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23920 $as_echo_n "checking for DSYMUTIL... " >&6; }
23921           if test ! -x "$tool_specified"; then
23922             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23923 $as_echo "not found" >&6; }
23924             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23925           fi
23926           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23927 $as_echo "$tool_specified" >&6; }
23928         fi
23929       fi
23930     fi
23931 
23932   fi
23933 
23934 
23935 
23936   if test "x$DSYMUTIL" = x; then
23937     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23938   fi
23939 
23940 
23941 
23942 
23943 
23944   # Publish this variable in the help.
23945 
23946 
23947   if [ -z "${XATTR+x}" ]; then
23948     # The variable is not set by user, try to locate tool using the code snippet
23949     for ac_prog in xattr
23950 do
23951   # Extract the first word of "$ac_prog", so it can be a program name with args.
23952 set dummy $ac_prog; ac_word=$2
23953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23954 $as_echo_n "checking for $ac_word... " >&6; }
23955 if ${ac_cv_path_XATTR+:} false; then :
23956   $as_echo_n "(cached) " >&6
23957 else
23958   case $XATTR in
23959   [\\/]* | ?:[\\/]*)
23960   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23961   ;;
23962   *)
23963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23964 for as_dir in $PATH
23965 do
23966   IFS=$as_save_IFS
23967   test -z "$as_dir" && as_dir=.
23968     for ac_exec_ext in '' $ac_executable_extensions; do
23969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23970     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23972     break 2
23973   fi
23974 done
23975   done
23976 IFS=$as_save_IFS
23977 
23978   ;;
23979 esac
23980 fi
23981 XATTR=$ac_cv_path_XATTR
23982 if test -n "$XATTR"; then
23983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23984 $as_echo "$XATTR" >&6; }
23985 else
23986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23987 $as_echo "no" >&6; }
23988 fi
23989 
23990 
23991   test -n "$XATTR" && break
23992 done
23993 
23994   else
23995     # The variable is set, but is it from the command line or the environment?
23996 
23997     # Try to remove the string !XATTR! from our list.
23998     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23999     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24000       # If it failed, the variable was not from the command line. Ignore it,
24001       # but warn the user (except for BASH, which is always set by the calling BASH).
24002       if test "xXATTR" != xBASH; then
24003         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24004 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24005       fi
24006       # Try to locate tool using the code snippet
24007       for ac_prog in xattr
24008 do
24009   # Extract the first word of "$ac_prog", so it can be a program name with args.
24010 set dummy $ac_prog; ac_word=$2
24011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24012 $as_echo_n "checking for $ac_word... " >&6; }
24013 if ${ac_cv_path_XATTR+:} false; then :
24014   $as_echo_n "(cached) " >&6
24015 else
24016   case $XATTR in
24017   [\\/]* | ?:[\\/]*)
24018   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24019   ;;
24020   *)
24021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24022 for as_dir in $PATH
24023 do
24024   IFS=$as_save_IFS
24025   test -z "$as_dir" && as_dir=.
24026     for ac_exec_ext in '' $ac_executable_extensions; do
24027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24028     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24030     break 2
24031   fi
24032 done
24033   done
24034 IFS=$as_save_IFS
24035 
24036   ;;
24037 esac
24038 fi
24039 XATTR=$ac_cv_path_XATTR
24040 if test -n "$XATTR"; then
24041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24042 $as_echo "$XATTR" >&6; }
24043 else
24044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24045 $as_echo "no" >&6; }
24046 fi
24047 
24048 
24049   test -n "$XATTR" && break
24050 done
24051 
24052     else
24053       # If it succeeded, then it was overridden by the user. We will use it
24054       # for the tool.
24055 
24056       # First remove it from the list of overridden variables, so we can test
24057       # for unknown variables in the end.
24058       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24059 
24060       # Check if we try to supply an empty value
24061       if test "x$XATTR" = x; then
24062         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24063 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24064         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24065 $as_echo_n "checking for XATTR... " >&6; }
24066         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24067 $as_echo "disabled" >&6; }
24068       else
24069         # Check if the provided tool contains a complete path.
24070         tool_specified="$XATTR"
24071         tool_basename="${tool_specified##*/}"
24072         if test "x$tool_basename" = "x$tool_specified"; then
24073           # A command without a complete path is provided, search $PATH.
24074           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24075 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24076           # Extract the first word of "$tool_basename", so it can be a program name with args.
24077 set dummy $tool_basename; ac_word=$2
24078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24079 $as_echo_n "checking for $ac_word... " >&6; }
24080 if ${ac_cv_path_XATTR+:} false; then :
24081   $as_echo_n "(cached) " >&6
24082 else
24083   case $XATTR in
24084   [\\/]* | ?:[\\/]*)
24085   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24086   ;;
24087   *)
24088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24089 for as_dir in $PATH
24090 do
24091   IFS=$as_save_IFS
24092   test -z "$as_dir" && as_dir=.
24093     for ac_exec_ext in '' $ac_executable_extensions; do
24094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24095     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24097     break 2
24098   fi
24099 done
24100   done
24101 IFS=$as_save_IFS
24102 
24103   ;;
24104 esac
24105 fi
24106 XATTR=$ac_cv_path_XATTR
24107 if test -n "$XATTR"; then
24108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24109 $as_echo "$XATTR" >&6; }
24110 else
24111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24112 $as_echo "no" >&6; }
24113 fi
24114 
24115 
24116           if test "x$XATTR" = x; then
24117             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24118           fi
24119         else
24120           # Otherwise we believe it is a complete path. Use it as it is.
24121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24122 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24123           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24124 $as_echo_n "checking for XATTR... " >&6; }
24125           if test ! -x "$tool_specified"; then
24126             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24127 $as_echo "not found" >&6; }
24128             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24129           fi
24130           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24131 $as_echo "$tool_specified" >&6; }
24132         fi
24133       fi
24134     fi
24135 
24136   fi
24137 
24138 
24139 
24140   if test "x$XATTR" = x; then
24141     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24142   fi
24143 
24144 
24145 
24146 
24147   # Publish this variable in the help.
24148 
24149 
24150   if [ -z "${CODESIGN+x}" ]; then
24151     # The variable is not set by user, try to locate tool using the code snippet
24152     for ac_prog in codesign
24153 do
24154   # Extract the first word of "$ac_prog", so it can be a program name with args.
24155 set dummy $ac_prog; ac_word=$2
24156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24157 $as_echo_n "checking for $ac_word... " >&6; }
24158 if ${ac_cv_path_CODESIGN+:} false; then :
24159   $as_echo_n "(cached) " >&6
24160 else
24161   case $CODESIGN in
24162   [\\/]* | ?:[\\/]*)
24163   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24164   ;;
24165   *)
24166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24167 for as_dir in $PATH
24168 do
24169   IFS=$as_save_IFS
24170   test -z "$as_dir" && as_dir=.
24171     for ac_exec_ext in '' $ac_executable_extensions; do
24172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24173     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24175     break 2
24176   fi
24177 done
24178   done
24179 IFS=$as_save_IFS
24180 
24181   ;;
24182 esac
24183 fi
24184 CODESIGN=$ac_cv_path_CODESIGN
24185 if test -n "$CODESIGN"; then
24186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24187 $as_echo "$CODESIGN" >&6; }
24188 else
24189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24190 $as_echo "no" >&6; }
24191 fi
24192 
24193 
24194   test -n "$CODESIGN" && break
24195 done
24196 
24197   else
24198     # The variable is set, but is it from the command line or the environment?
24199 
24200     # Try to remove the string !CODESIGN! from our list.
24201     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24202     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24203       # If it failed, the variable was not from the command line. Ignore it,
24204       # but warn the user (except for BASH, which is always set by the calling BASH).
24205       if test "xCODESIGN" != xBASH; then
24206         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24207 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24208       fi
24209       # Try to locate tool using the code snippet
24210       for ac_prog in codesign
24211 do
24212   # Extract the first word of "$ac_prog", so it can be a program name with args.
24213 set dummy $ac_prog; ac_word=$2
24214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24215 $as_echo_n "checking for $ac_word... " >&6; }
24216 if ${ac_cv_path_CODESIGN+:} false; then :
24217   $as_echo_n "(cached) " >&6
24218 else
24219   case $CODESIGN in
24220   [\\/]* | ?:[\\/]*)
24221   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24222   ;;
24223   *)
24224   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24225 for as_dir in $PATH
24226 do
24227   IFS=$as_save_IFS
24228   test -z "$as_dir" && as_dir=.
24229     for ac_exec_ext in '' $ac_executable_extensions; do
24230   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24231     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24232     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24233     break 2
24234   fi
24235 done
24236   done
24237 IFS=$as_save_IFS
24238 
24239   ;;
24240 esac
24241 fi
24242 CODESIGN=$ac_cv_path_CODESIGN
24243 if test -n "$CODESIGN"; then
24244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24245 $as_echo "$CODESIGN" >&6; }
24246 else
24247   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24248 $as_echo "no" >&6; }
24249 fi
24250 
24251 
24252   test -n "$CODESIGN" && break
24253 done
24254 
24255     else
24256       # If it succeeded, then it was overridden by the user. We will use it
24257       # for the tool.
24258 
24259       # First remove it from the list of overridden variables, so we can test
24260       # for unknown variables in the end.
24261       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24262 
24263       # Check if we try to supply an empty value
24264       if test "x$CODESIGN" = x; then
24265         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24266 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24267         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24268 $as_echo_n "checking for CODESIGN... " >&6; }
24269         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24270 $as_echo "disabled" >&6; }
24271       else
24272         # Check if the provided tool contains a complete path.
24273         tool_specified="$CODESIGN"
24274         tool_basename="${tool_specified##*/}"
24275         if test "x$tool_basename" = "x$tool_specified"; then
24276           # A command without a complete path is provided, search $PATH.
24277           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24278 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24279           # Extract the first word of "$tool_basename", so it can be a program name with args.
24280 set dummy $tool_basename; ac_word=$2
24281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24282 $as_echo_n "checking for $ac_word... " >&6; }
24283 if ${ac_cv_path_CODESIGN+:} false; then :
24284   $as_echo_n "(cached) " >&6
24285 else
24286   case $CODESIGN in
24287   [\\/]* | ?:[\\/]*)
24288   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24289   ;;
24290   *)
24291   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24292 for as_dir in $PATH
24293 do
24294   IFS=$as_save_IFS
24295   test -z "$as_dir" && as_dir=.
24296     for ac_exec_ext in '' $ac_executable_extensions; do
24297   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24298     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24299     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24300     break 2
24301   fi
24302 done
24303   done
24304 IFS=$as_save_IFS
24305 
24306   ;;
24307 esac
24308 fi
24309 CODESIGN=$ac_cv_path_CODESIGN
24310 if test -n "$CODESIGN"; then
24311   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24312 $as_echo "$CODESIGN" >&6; }
24313 else
24314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24315 $as_echo "no" >&6; }
24316 fi
24317 
24318 
24319           if test "x$CODESIGN" = x; then
24320             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24321           fi
24322         else
24323           # Otherwise we believe it is a complete path. Use it as it is.
24324           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24325 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24326           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24327 $as_echo_n "checking for CODESIGN... " >&6; }
24328           if test ! -x "$tool_specified"; then
24329             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24330 $as_echo "not found" >&6; }
24331             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24332           fi
24333           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24334 $as_echo "$tool_specified" >&6; }
24335         fi
24336       fi
24337     fi
24338 
24339   fi
24340 
24341 
24342     if test "x$CODESIGN" != "x"; then
24343       # Verify that the openjdk_codesign certificate is present
24344       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24345 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24346       $RM codesign-testfile
24347       $TOUCH codesign-testfile
24348       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24349       $RM codesign-testfile
24350       if test "x$CODESIGN" = x; then
24351         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24352 $as_echo "no" >&6; }
24353       else
24354         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24355 $as_echo "yes" >&6; }
24356       fi
24357     fi
24358 
24359 
24360 
24361   # Publish this variable in the help.
24362 
24363 
24364   if [ -z "${SETFILE+x}" ]; then
24365     # The variable is not set by user, try to locate tool using the code snippet
24366     for ac_prog in SetFile
24367 do
24368   # Extract the first word of "$ac_prog", so it can be a program name with args.
24369 set dummy $ac_prog; ac_word=$2
24370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24371 $as_echo_n "checking for $ac_word... " >&6; }
24372 if ${ac_cv_path_SETFILE+:} false; then :
24373   $as_echo_n "(cached) " >&6
24374 else
24375   case $SETFILE in
24376   [\\/]* | ?:[\\/]*)
24377   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24378   ;;
24379   *)
24380   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24381 for as_dir in $PATH
24382 do
24383   IFS=$as_save_IFS
24384   test -z "$as_dir" && as_dir=.
24385     for ac_exec_ext in '' $ac_executable_extensions; do
24386   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24387     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24388     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24389     break 2
24390   fi
24391 done
24392   done
24393 IFS=$as_save_IFS
24394 
24395   ;;
24396 esac
24397 fi
24398 SETFILE=$ac_cv_path_SETFILE
24399 if test -n "$SETFILE"; then
24400   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24401 $as_echo "$SETFILE" >&6; }
24402 else
24403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24404 $as_echo "no" >&6; }
24405 fi
24406 
24407 
24408   test -n "$SETFILE" && break
24409 done
24410 
24411   else
24412     # The variable is set, but is it from the command line or the environment?
24413 
24414     # Try to remove the string !SETFILE! from our list.
24415     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24416     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24417       # If it failed, the variable was not from the command line. Ignore it,
24418       # but warn the user (except for BASH, which is always set by the calling BASH).
24419       if test "xSETFILE" != xBASH; then
24420         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24421 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24422       fi
24423       # Try to locate tool using the code snippet
24424       for ac_prog in SetFile
24425 do
24426   # Extract the first word of "$ac_prog", so it can be a program name with args.
24427 set dummy $ac_prog; ac_word=$2
24428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24429 $as_echo_n "checking for $ac_word... " >&6; }
24430 if ${ac_cv_path_SETFILE+:} false; then :
24431   $as_echo_n "(cached) " >&6
24432 else
24433   case $SETFILE in
24434   [\\/]* | ?:[\\/]*)
24435   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24436   ;;
24437   *)
24438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24439 for as_dir in $PATH
24440 do
24441   IFS=$as_save_IFS
24442   test -z "$as_dir" && as_dir=.
24443     for ac_exec_ext in '' $ac_executable_extensions; do
24444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24445     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24447     break 2
24448   fi
24449 done
24450   done
24451 IFS=$as_save_IFS
24452 
24453   ;;
24454 esac
24455 fi
24456 SETFILE=$ac_cv_path_SETFILE
24457 if test -n "$SETFILE"; then
24458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24459 $as_echo "$SETFILE" >&6; }
24460 else
24461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24462 $as_echo "no" >&6; }
24463 fi
24464 
24465 
24466   test -n "$SETFILE" && break
24467 done
24468 
24469     else
24470       # If it succeeded, then it was overridden by the user. We will use it
24471       # for the tool.
24472 
24473       # First remove it from the list of overridden variables, so we can test
24474       # for unknown variables in the end.
24475       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24476 
24477       # Check if we try to supply an empty value
24478       if test "x$SETFILE" = x; then
24479         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24480 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24481         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24482 $as_echo_n "checking for SETFILE... " >&6; }
24483         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24484 $as_echo "disabled" >&6; }
24485       else
24486         # Check if the provided tool contains a complete path.
24487         tool_specified="$SETFILE"
24488         tool_basename="${tool_specified##*/}"
24489         if test "x$tool_basename" = "x$tool_specified"; then
24490           # A command without a complete path is provided, search $PATH.
24491           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24492 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24493           # Extract the first word of "$tool_basename", so it can be a program name with args.
24494 set dummy $tool_basename; ac_word=$2
24495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24496 $as_echo_n "checking for $ac_word... " >&6; }
24497 if ${ac_cv_path_SETFILE+:} false; then :
24498   $as_echo_n "(cached) " >&6
24499 else
24500   case $SETFILE in
24501   [\\/]* | ?:[\\/]*)
24502   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24503   ;;
24504   *)
24505   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24506 for as_dir in $PATH
24507 do
24508   IFS=$as_save_IFS
24509   test -z "$as_dir" && as_dir=.
24510     for ac_exec_ext in '' $ac_executable_extensions; do
24511   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24512     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24513     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24514     break 2
24515   fi
24516 done
24517   done
24518 IFS=$as_save_IFS
24519 
24520   ;;
24521 esac
24522 fi
24523 SETFILE=$ac_cv_path_SETFILE
24524 if test -n "$SETFILE"; then
24525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24526 $as_echo "$SETFILE" >&6; }
24527 else
24528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24529 $as_echo "no" >&6; }
24530 fi
24531 
24532 
24533           if test "x$SETFILE" = x; then
24534             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24535           fi
24536         else
24537           # Otherwise we believe it is a complete path. Use it as it is.
24538           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24539 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24540           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24541 $as_echo_n "checking for SETFILE... " >&6; }
24542           if test ! -x "$tool_specified"; then
24543             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24544 $as_echo "not found" >&6; }
24545             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24546           fi
24547           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24548 $as_echo "$tool_specified" >&6; }
24549         fi
24550       fi
24551     fi
24552 
24553   fi
24554 
24555 
24556 
24557   if test "x$SETFILE" = x; then
24558     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24559   fi
24560 
24561 
24562   fi
24563 
24564 
24565   # Check bash version
24566   # Extra [ ] to stop m4 mangling
24567    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24568   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24569 $as_echo_n "checking bash version... " >&6; }
24570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24571 $as_echo "$BASH_VER" >&6; }
24572 
24573   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24574   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24575   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24576     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24577   fi
24578 
24579   # Test if bash supports pipefail.
24580   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24581 $as_echo_n "checking if bash supports pipefail... " >&6; }
24582   if ${BASH} -c 'set -o pipefail'; then
24583     BASH_ARGS="$BASH_ARGS -o pipefail"
24584     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24585 $as_echo "yes" >&6; }
24586   else
24587     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24588 $as_echo "no" >&6; }
24589   fi
24590 
24591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24592 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24593   if ${BASH} -e -c 'true'; then
24594     BASH_ARGS="$BASH_ARGS -e"
24595     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24596 $as_echo "yes" >&6; }
24597   else
24598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24599 $as_echo "no" >&6; }
24600   fi
24601 
24602 
24603 
24604 
24605 # Check if pkg-config is available.
24606 
24607 
24608 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24609         if test -n "$ac_tool_prefix"; then
24610   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24611 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24613 $as_echo_n "checking for $ac_word... " >&6; }
24614 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24615   $as_echo_n "(cached) " >&6
24616 else
24617   case $PKG_CONFIG in
24618   [\\/]* | ?:[\\/]*)
24619   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24620   ;;
24621   *)
24622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24623 for as_dir in $PATH
24624 do
24625   IFS=$as_save_IFS
24626   test -z "$as_dir" && as_dir=.
24627     for ac_exec_ext in '' $ac_executable_extensions; do
24628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24629     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24631     break 2
24632   fi
24633 done
24634   done
24635 IFS=$as_save_IFS
24636 
24637   ;;
24638 esac
24639 fi
24640 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24641 if test -n "$PKG_CONFIG"; then
24642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24643 $as_echo "$PKG_CONFIG" >&6; }
24644 else
24645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24646 $as_echo "no" >&6; }
24647 fi
24648 
24649 
24650 fi
24651 if test -z "$ac_cv_path_PKG_CONFIG"; then
24652   ac_pt_PKG_CONFIG=$PKG_CONFIG
24653   # Extract the first word of "pkg-config", so it can be a program name with args.
24654 set dummy pkg-config; ac_word=$2
24655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24656 $as_echo_n "checking for $ac_word... " >&6; }
24657 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24658   $as_echo_n "(cached) " >&6
24659 else
24660   case $ac_pt_PKG_CONFIG in
24661   [\\/]* | ?:[\\/]*)
24662   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24663   ;;
24664   *)
24665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24666 for as_dir in $PATH
24667 do
24668   IFS=$as_save_IFS
24669   test -z "$as_dir" && as_dir=.
24670     for ac_exec_ext in '' $ac_executable_extensions; do
24671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24672     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24674     break 2
24675   fi
24676 done
24677   done
24678 IFS=$as_save_IFS
24679 
24680   ;;
24681 esac
24682 fi
24683 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24684 if test -n "$ac_pt_PKG_CONFIG"; then
24685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24686 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24687 else
24688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24689 $as_echo "no" >&6; }
24690 fi
24691 
24692   if test "x$ac_pt_PKG_CONFIG" = x; then
24693     PKG_CONFIG=""
24694   else
24695     case $cross_compiling:$ac_tool_warned in
24696 yes:)
24697 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24698 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24699 ac_tool_warned=yes ;;
24700 esac
24701     PKG_CONFIG=$ac_pt_PKG_CONFIG
24702   fi
24703 else
24704   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24705 fi
24706 
24707 fi
24708 if test -n "$PKG_CONFIG"; then
24709         _pkg_min_version=0.9.0
24710         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24711 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24712         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24713                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24714 $as_echo "yes" >&6; }
24715         else
24716                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24717 $as_echo "no" >&6; }
24718                 PKG_CONFIG=""
24719         fi
24720 
24721 fi
24722 
24723 # After basic tools have been setup, we can check build os specific details.
24724 
24725   ###############################################################################
24726 
24727   # Note that this is the build platform OS version!
24728 
24729   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24730   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24731   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24732   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24733 
24734 
24735 
24736 
24737 
24738 # Misc basic settings
24739 
24740 
24741 # Check whether --with-default-make-target was given.
24742 if test "${with_default_make_target+set}" = set; then :
24743   withval=$with_default_make_target;
24744 fi
24745 
24746   if test "x$with_default_make_target" = "x" \
24747       || test "x$with_default_make_target" = "xyes"; then
24748     DEFAULT_MAKE_TARGET="exploded-image"
24749   elif test "x$with_default_make_target" = "xno"; then
24750     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24751   else
24752     DEFAULT_MAKE_TARGET="$with_default_make_target"
24753   fi
24754 
24755 
24756 
24757 
24758 ###############################################################################
24759 #
24760 # Determine OpenJDK variants, options and version numbers.
24761 #
24762 ###############################################################################
24763 
24764 # We need build & target for this.
24765 
24766   # Should we build a JDK without a graphical UI?
24767   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24768 $as_echo_n "checking headless only... " >&6; }
24769   # Check whether --enable-headless-only was given.
24770 if test "${enable_headless_only+set}" = set; then :
24771   enableval=$enable_headless_only;
24772 fi
24773 
24774 
24775   if test "x$enable_headless_only" = "xyes"; then
24776     ENABLE_HEADLESS_ONLY="true"
24777     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24778 $as_echo "yes" >&6; }
24779   elif test "x$enable_headless_only" = "xno"; then
24780     ENABLE_HEADLESS_ONLY="false"
24781     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24782 $as_echo "no" >&6; }
24783   elif test "x$enable_headless_only" = "x"; then
24784     ENABLE_HEADLESS_ONLY="false"
24785     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24786 $as_echo "no" >&6; }
24787   else
24788     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24789   fi
24790 
24791 
24792 
24793   # Should we build the complete docs, or just a lightweight version?
24794   # Check whether --enable-full-docs was given.
24795 if test "${enable_full_docs+set}" = set; then :
24796   enableval=$enable_full_docs;
24797 fi
24798 
24799 
24800   # Verify dependencies
24801   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24802 $as_echo_n "checking for graphviz dot... " >&6; }
24803   if test "x$DOT" != "x"; then
24804     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24805 $as_echo "yes" >&6; }
24806   else
24807     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24808 $as_echo "no, cannot generate full docs" >&6; }
24809     FULL_DOCS_DEP_MISSING=true
24810   fi
24811 
24812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24813 $as_echo_n "checking for pandoc... " >&6; }
24814   if test "x$PANDOC" != "x"; then
24815     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24816 $as_echo "yes" >&6; }
24817   else
24818     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24819 $as_echo "no, cannot generate full docs" >&6; }
24820     FULL_DOCS_DEP_MISSING=true
24821   fi
24822 
24823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24824 $as_echo_n "checking full docs... " >&6; }
24825   if test "x$enable_full_docs" = xyes; then
24826     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24827       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24828 $as_echo "no, missing dependencies" >&6; }
24829 
24830   # Print a helpful message on how to acquire the necessary build dependency.
24831   # dot is the help tag: freetype, cups, alsa etc
24832   MISSING_DEPENDENCY=dot
24833 
24834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24835     cygwin_help $MISSING_DEPENDENCY
24836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24837     msys_help $MISSING_DEPENDENCY
24838   else
24839     PKGHANDLER_COMMAND=
24840 
24841     case $PKGHANDLER in
24842       apt-get)
24843         apt_help     $MISSING_DEPENDENCY ;;
24844       yum)
24845         yum_help     $MISSING_DEPENDENCY ;;
24846       brew)
24847         brew_help    $MISSING_DEPENDENCY ;;
24848       port)
24849         port_help    $MISSING_DEPENDENCY ;;
24850       pkgutil)
24851         pkgutil_help $MISSING_DEPENDENCY ;;
24852       pkgadd)
24853         pkgadd_help  $MISSING_DEPENDENCY ;;
24854     esac
24855 
24856     if test "x$PKGHANDLER_COMMAND" != x; then
24857       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24858     fi
24859   fi
24860 
24861       as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24862     else
24863       ENABLE_FULL_DOCS=true
24864       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24865 $as_echo "yes, forced" >&6; }
24866     fi
24867   elif test "x$enable_full_docs" = xno; then
24868     ENABLE_FULL_DOCS=false
24869     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24870 $as_echo "no, forced" >&6; }
24871   elif test "x$enable_full_docs" = x; then
24872     # Check for prerequisites
24873     if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24874       ENABLE_FULL_DOCS=false
24875       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24876 $as_echo "no, missing dependencies" >&6; }
24877     else
24878       ENABLE_FULL_DOCS=true
24879       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24880 $as_echo "yes, dependencies present" >&6; }
24881     fi
24882   else
24883     as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24884   fi
24885 
24886 
24887 
24888   # Choose cacerts source file
24889 
24890 # Check whether --with-cacerts-file was given.
24891 if test "${with_cacerts_file+set}" = set; then :
24892   withval=$with_cacerts_file;
24893 fi
24894 
24895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cacerts file" >&5
24896 $as_echo_n "checking for cacerts file... " >&6; }
24897   if test "x$with_cacerts_file" == x; then
24898     { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
24899 $as_echo "default" >&6; }
24900   else
24901     CACERTS_FILE=$with_cacerts_file
24902     if test ! -f "$CACERTS_FILE"; then
24903       { $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
24904 $as_echo "fail" >&6; }
24905       as_fn_error $? "Specified cacerts file \"$CACERTS_FILE\" does not exist" "$LINENO" 5
24906     fi
24907     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACERTS_FILE" >&5
24908 $as_echo "$CACERTS_FILE" >&6; }
24909   fi
24910 
24911 
24912   # Enable or disable unlimited crypto
24913   # Check whether --enable-unlimited-crypto was given.
24914 if test "${enable_unlimited_crypto+set}" = set; then :
24915   enableval=$enable_unlimited_crypto;
24916 else
24917   enable_unlimited_crypto=yes
24918 fi
24919 
24920   if test "x$enable_unlimited_crypto" = "xyes"; then
24921     UNLIMITED_CRYPTO=true
24922   else
24923     UNLIMITED_CRYPTO=false
24924   fi
24925 
24926 
24927   # Should we build the serviceability agent (SA)?
24928   INCLUDE_SA=true
24929   if   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
24930     INCLUDE_SA=false
24931   fi
24932   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24933     INCLUDE_SA=false
24934   fi
24935 
24936 
24937   # Compress jars
24938   COMPRESS_JARS=false
24939 
24940 
24941 
24942   # Setup default copyright year. Mostly overridden when building close to a new year.
24943 
24944 # Check whether --with-copyright-year was given.
24945 if test "${with_copyright_year+set}" = set; then :
24946   withval=$with_copyright_year;
24947 fi
24948 
24949   if test "x$with_copyright_year" = xyes; then
24950     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24951   elif test "x$with_copyright_year" != x; then
24952     COPYRIGHT_YEAR="$with_copyright_year"
24953   else
24954     COPYRIGHT_YEAR=`$DATE +'%Y'`
24955   fi
24956 
24957 
24958 
24959   # Check whether --enable-keep-packaged-modules was given.
24960 if test "${enable_keep_packaged_modules+set}" = set; then :
24961   enableval=$enable_keep_packaged_modules;
24962 fi
24963 
24964 
24965   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24966 $as_echo_n "checking if packaged modules are kept... " >&6; }
24967   if test "x$enable_keep_packaged_modules" = "xyes"; then
24968     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24969 $as_echo "yes" >&6; }
24970     JLINK_KEEP_PACKAGED_MODULES=true
24971   elif test "x$enable_keep_packaged_modules" = "xno"; then
24972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24973 $as_echo "no" >&6; }
24974     JLINK_KEEP_PACKAGED_MODULES=false
24975   elif test "x$enable_keep_packaged_modules" = "x"; then
24976     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24977 $as_echo "yes (default)" >&6; }
24978     JLINK_KEEP_PACKAGED_MODULES=true
24979   else
24980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24981 $as_echo "error" >&6; }
24982     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24983   fi
24984 
24985 
24986 
24987 
24988   # Warn user that old version arguments are deprecated.
24989 
24990 
24991 # Check whether --with-milestone was given.
24992 if test "${with_milestone+set}" = set; then :
24993   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24994 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24995 fi
24996 
24997 
24998 
24999 
25000 # Check whether --with-update-version was given.
25001 if test "${with_update_version+set}" = set; then :
25002   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25003 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25004 fi
25005 
25006 
25007 
25008 
25009 # Check whether --with-user-release-suffix was given.
25010 if test "${with_user_release_suffix+set}" = set; then :
25011   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
25012 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25013 fi
25014 
25015 
25016 
25017 
25018 # Check whether --with-build-number was given.
25019 if test "${with_build_number+set}" = set; then :
25020   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25021 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25022 fi
25023 
25024 
25025 
25026 
25027 # Check whether --with-version-major was given.
25028 if test "${with_version_major+set}" = set; then :
25029   withval=$with_version_major; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-major is deprecated and will be ignored." >&5
25030 $as_echo "$as_me: WARNING: Option --with-version-major is deprecated and will be ignored." >&2;}
25031 fi
25032 
25033 
25034 
25035 
25036 # Check whether --with-version-minor was given.
25037 if test "${with_version_minor+set}" = set; then :
25038   withval=$with_version_minor; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-minor is deprecated and will be ignored." >&5
25039 $as_echo "$as_me: WARNING: Option --with-version-minor is deprecated and will be ignored." >&2;}
25040 fi
25041 
25042 
25043 
25044 
25045 # Check whether --with-version-security was given.
25046 if test "${with_version_security+set}" = set; then :
25047   withval=$with_version_security; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-security is deprecated and will be ignored." >&5
25048 $as_echo "$as_me: WARNING: Option --with-version-security is deprecated and will be ignored." >&2;}
25049 fi
25050 
25051 
25052 
25053   # Source the version numbers file
25054   . $AUTOCONF_DIR/version-numbers
25055 
25056   # Some non-version number information is set in that file
25057 
25058 
25059 
25060 
25061 
25062 
25063 
25064 
25065   # The vendor name, if any
25066 
25067 # Check whether --with-vendor-name was given.
25068 if test "${with_vendor_name+set}" = set; then :
25069   withval=$with_vendor_name;
25070 fi
25071 
25072   if test "x$with_vendor_name" = xyes; then
25073     as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
25074   elif  ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
25075     as_fn_error $? "--with--vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
25076   else
25077     COMPANY_NAME="$with_vendor_name"
25078   fi
25079 
25080 
25081   # Override version from arguments
25082 
25083   # If --with-version-string is set, process it first. It is possible to
25084   # override parts with more specific flags, since these are processed later.
25085 
25086 # Check whether --with-version-string was given.
25087 if test "${with_version_string+set}" = set; then :
25088   withval=$with_version_string;
25089 fi
25090 
25091   if test "x$with_version_string" = xyes; then
25092     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25093   elif test "x$with_version_string" != x; then
25094     # Additional [] needed to keep m4 from mangling shell constructs.
25095     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25096       VERSION_FEATURE=${BASH_REMATCH[1]}
25097       VERSION_INTERIM=${BASH_REMATCH[3]}
25098       VERSION_UPDATE=${BASH_REMATCH[5]}
25099       VERSION_PATCH=${BASH_REMATCH[7]}
25100       VERSION_PRE=${BASH_REMATCH[9]}
25101       version_plus_separator=${BASH_REMATCH[11]}
25102       VERSION_BUILD=${BASH_REMATCH[12]}
25103       VERSION_OPT=${BASH_REMATCH[14]}
25104       # Unspecified numerical fields are interpreted as 0.
25105       if test "x$VERSION_INTERIM" = x; then
25106         VERSION_INTERIM=0
25107       fi
25108       if test "x$VERSION_UPDATE" = x; then
25109         VERSION_UPDATE=0
25110       fi
25111       if test "x$VERSION_PATCH" = x; then
25112         VERSION_PATCH=0
25113       fi
25114       if test "x$version_plus_separator" != x \
25115           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25116         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25117       fi
25118       # Stop the version part process from setting default values.
25119       # We still allow them to explicitly override though.
25120       NO_DEFAULT_VERSION_PARTS=true
25121     else
25122       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25123     fi
25124   fi
25125 
25126 
25127 # Check whether --with-version-pre was given.
25128 if test "${with_version_pre+set}" = set; then :
25129   withval=$with_version_pre; with_version_pre_present=true
25130 else
25131   with_version_pre_present=false
25132 fi
25133 
25134 
25135   if test "x$with_version_pre_present" = xtrue; then
25136     if test "x$with_version_pre" = xyes; then
25137       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25138     elif test "x$with_version_pre" = xno; then
25139       # Interpret --without-* as empty string instead of the literal "no"
25140       VERSION_PRE=
25141     else
25142       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25143        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25144       if test "x$VERSION_PRE" != "x$with_version_pre"; then
25145         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25146 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25147       fi
25148     fi
25149   else
25150     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25151       # Default is to use "internal" as pre
25152       VERSION_PRE="internal"
25153     fi
25154   fi
25155 
25156 
25157 # Check whether --with-version-opt was given.
25158 if test "${with_version_opt+set}" = set; then :
25159   withval=$with_version_opt; with_version_opt_present=true
25160 else
25161   with_version_opt_present=false
25162 fi
25163 
25164 
25165   if test "x$with_version_opt_present" = xtrue; then
25166     if test "x$with_version_opt" = xyes; then
25167       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25168     elif test "x$with_version_opt" = xno; then
25169       # Interpret --without-* as empty string instead of the literal "no"
25170       VERSION_OPT=
25171     else
25172       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25173        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25174       if test "x$VERSION_OPT" != "x$with_version_opt"; then
25175         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25176 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25177       fi
25178     fi
25179   else
25180     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25181       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25182       # Outer [ ] to quote m4.
25183        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25184       VERSION_OPT="adhoc.$USERNAME.$basedirname"
25185     fi
25186   fi
25187 
25188 
25189 # Check whether --with-version-build was given.
25190 if test "${with_version_build+set}" = set; then :
25191   withval=$with_version_build; with_version_build_present=true
25192 else
25193   with_version_build_present=false
25194 fi
25195 
25196 
25197   if test "x$with_version_build_present" = xtrue; then
25198     if test "x$with_version_build" = xyes; then
25199       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25200     elif test "x$with_version_build" = xno; then
25201       # Interpret --without-* as empty string instead of the literal "no"
25202       VERSION_BUILD=
25203     elif test "x$with_version_build" = x; then
25204       VERSION_BUILD=
25205     else
25206 
25207   # Additional [] needed to keep m4 from mangling shell constructs.
25208   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25209     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25210   fi
25211   # Extract the version number without leading zeros.
25212   cleaned_value=${BASH_REMATCH[1]}
25213   if test "x$cleaned_value" = x; then
25214     # Special case for zero
25215     cleaned_value=${BASH_REMATCH[2]}
25216   fi
25217 
25218   if test $cleaned_value -gt 255; then
25219     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25220   fi
25221   if test "x$cleaned_value" != "x$with_version_build"; then
25222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25223 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25224   fi
25225   VERSION_BUILD=$cleaned_value
25226 
25227     fi
25228   else
25229     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25230       # Default is to not have a build number.
25231       VERSION_BUILD=""
25232       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25233       VERSION_BUILD=0
25234     fi
25235   fi
25236 
25237 
25238 # Check whether --with-version-feature was given.
25239 if test "${with_version_feature+set}" = set; then :
25240   withval=$with_version_feature; with_version_feature_present=true
25241 else
25242   with_version_feature_present=false
25243 fi
25244 
25245 
25246   if test "x$with_version_feature_present" = xtrue; then
25247     if test "x$with_version_feature" = xyes; then
25248       as_fn_error $? "--with-version-feature must have a value" "$LINENO" 5
25249     else
25250 
25251   # Additional [] needed to keep m4 from mangling shell constructs.
25252   if  ! [[ "$with_version_feature" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25253     as_fn_error $? "\"$with_version_feature\" is not a valid numerical value for VERSION_FEATURE" "$LINENO" 5
25254   fi
25255   # Extract the version number without leading zeros.
25256   cleaned_value=${BASH_REMATCH[1]}
25257   if test "x$cleaned_value" = x; then
25258     # Special case for zero
25259     cleaned_value=${BASH_REMATCH[2]}
25260   fi
25261 
25262   if test $cleaned_value -gt 255; then
25263     as_fn_error $? "VERSION_FEATURE is given as $with_version_feature. This is greater than 255 which is not allowed." "$LINENO" 5
25264   fi
25265   if test "x$cleaned_value" != "x$with_version_feature"; then
25266     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_FEATURE has been sanitized from '$with_version_feature' to '$cleaned_value'" >&5
25267 $as_echo "$as_me: WARNING: Value for VERSION_FEATURE has been sanitized from '$with_version_feature' to '$cleaned_value'" >&2;}
25268   fi
25269   VERSION_FEATURE=$cleaned_value
25270 
25271     fi
25272   else
25273     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25274       # Default is to get value from version-numbers
25275       VERSION_FEATURE="$DEFAULT_VERSION_FEATURE"
25276     fi
25277   fi
25278 
25279 
25280 # Check whether --with-version-interim was given.
25281 if test "${with_version_interim+set}" = set; then :
25282   withval=$with_version_interim; with_version_interim_present=true
25283 else
25284   with_version_interim_present=false
25285 fi
25286 
25287 
25288   if test "x$with_version_interim_present" = xtrue; then
25289     if test "x$with_version_interim" = xyes; then
25290       as_fn_error $? "--with-version-interim must have a value" "$LINENO" 5
25291     elif test "x$with_version_interim" = xno; then
25292       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25293       VERSION_INTERIM=0
25294     elif test "x$with_version_interim" = x; then
25295       VERSION_INTERIM=0
25296     else
25297 
25298   # Additional [] needed to keep m4 from mangling shell constructs.
25299   if  ! [[ "$with_version_interim" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25300     as_fn_error $? "\"$with_version_interim\" is not a valid numerical value for VERSION_INTERIM" "$LINENO" 5
25301   fi
25302   # Extract the version number without leading zeros.
25303   cleaned_value=${BASH_REMATCH[1]}
25304   if test "x$cleaned_value" = x; then
25305     # Special case for zero
25306     cleaned_value=${BASH_REMATCH[2]}
25307   fi
25308 
25309   if test $cleaned_value -gt 255; then
25310     as_fn_error $? "VERSION_INTERIM is given as $with_version_interim. This is greater than 255 which is not allowed." "$LINENO" 5
25311   fi
25312   if test "x$cleaned_value" != "x$with_version_interim"; then
25313     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_INTERIM has been sanitized from '$with_version_interim' to '$cleaned_value'" >&5
25314 $as_echo "$as_me: WARNING: Value for VERSION_INTERIM has been sanitized from '$with_version_interim' to '$cleaned_value'" >&2;}
25315   fi
25316   VERSION_INTERIM=$cleaned_value
25317 
25318     fi
25319   else
25320     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25321       # Default is 0, if unspecified
25322       VERSION_INTERIM=$DEFAULT_VERSION_INTERIM
25323     fi
25324   fi
25325 
25326 
25327 # Check whether --with-version-update was given.
25328 if test "${with_version_update+set}" = set; then :
25329   withval=$with_version_update; with_version_update_present=true
25330 else
25331   with_version_update_present=false
25332 fi
25333 
25334 
25335   if test "x$with_version_update_present" = xtrue; then
25336     if test "x$with_version_update" = xyes; then
25337       as_fn_error $? "--with-version-update must have a value" "$LINENO" 5
25338     elif test "x$with_version_update" = xno; then
25339       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25340       VERSION_UPDATE=0
25341     elif test "x$with_version_update" = x; then
25342       VERSION_UPDATE=0
25343     else
25344 
25345   # Additional [] needed to keep m4 from mangling shell constructs.
25346   if  ! [[ "$with_version_update" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25347     as_fn_error $? "\"$with_version_update\" is not a valid numerical value for VERSION_UPDATE" "$LINENO" 5
25348   fi
25349   # Extract the version number without leading zeros.
25350   cleaned_value=${BASH_REMATCH[1]}
25351   if test "x$cleaned_value" = x; then
25352     # Special case for zero
25353     cleaned_value=${BASH_REMATCH[2]}
25354   fi
25355 
25356   if test $cleaned_value -gt 255; then
25357     as_fn_error $? "VERSION_UPDATE is given as $with_version_update. This is greater than 255 which is not allowed." "$LINENO" 5
25358   fi
25359   if test "x$cleaned_value" != "x$with_version_update"; then
25360     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_UPDATE has been sanitized from '$with_version_update' to '$cleaned_value'" >&5
25361 $as_echo "$as_me: WARNING: Value for VERSION_UPDATE has been sanitized from '$with_version_update' to '$cleaned_value'" >&2;}
25362   fi
25363   VERSION_UPDATE=$cleaned_value
25364 
25365     fi
25366   else
25367     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25368       # Default is 0, if unspecified
25369       VERSION_UPDATE=$DEFAULT_VERSION_UPDATE
25370     fi
25371   fi
25372 
25373 
25374 # Check whether --with-version-patch was given.
25375 if test "${with_version_patch+set}" = set; then :
25376   withval=$with_version_patch; with_version_patch_present=true
25377 else
25378   with_version_patch_present=false
25379 fi
25380 
25381 
25382   if test "x$with_version_patch_present" = xtrue; then
25383     if test "x$with_version_patch" = xyes; then
25384       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25385     elif test "x$with_version_patch" = xno; then
25386       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25387       VERSION_PATCH=0
25388     elif test "x$with_version_patch" = x; then
25389       VERSION_PATCH=0
25390     else
25391 
25392   # Additional [] needed to keep m4 from mangling shell constructs.
25393   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25394     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25395   fi
25396   # Extract the version number without leading zeros.
25397   cleaned_value=${BASH_REMATCH[1]}
25398   if test "x$cleaned_value" = x; then
25399     # Special case for zero
25400     cleaned_value=${BASH_REMATCH[2]}
25401   fi
25402 
25403   if test $cleaned_value -gt 255; then
25404     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25405   fi
25406   if test "x$cleaned_value" != "x$with_version_patch"; then
25407     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25408 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25409   fi
25410   VERSION_PATCH=$cleaned_value
25411 
25412     fi
25413   else
25414     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25415       # Default is 0, if unspecified
25416       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25417     fi
25418   fi
25419 
25420   # Calculate derived version properties
25421 
25422   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25423   if test "x$VERSION_PRE" = x; then
25424     VERSION_IS_GA=true
25425   else
25426     VERSION_IS_GA=false
25427   fi
25428 
25429   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25430   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_FEATURE.$VERSION_INTERIM.$VERSION_UPDATE.$VERSION_PATCH
25431 
25432   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25433   # Strip trailing zeroes from stripped_version_number
25434   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25435   VERSION_NUMBER=$stripped_version_number
25436 
25437   # The complete version string, with additional build information
25438   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25439     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25440   else
25441     # If either build or opt is set, we need a + separator
25442     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25443   fi
25444 
25445   # The short version string, just VERSION_NUMBER and PRE, if present.
25446   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25447 
25448   # The version date
25449 
25450 # Check whether --with-version-date was given.
25451 if test "${with_version_date+set}" = set; then :
25452   withval=$with_version_date;
25453 fi
25454 
25455   if test "x$with_version_date" = xyes; then
25456     as_fn_error $? "--with-version-date must have a value" "$LINENO" 5
25457   elif test "x$with_version_date" != x; then
25458     if  ! [[ $with_version_date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ; then
25459       as_fn_error $? "\"$with_version_date\" is not a valid version date" "$LINENO" 5
25460     else
25461       VERSION_DATE="$with_version_date"
25462     fi
25463   else
25464     VERSION_DATE="$DEFAULT_VERSION_DATE"
25465   fi
25466 
25467   # The vendor version string, if any
25468 
25469 # Check whether --with-vendor-version-string was given.
25470 if test "${with_vendor_version_string+set}" = set; then :
25471   withval=$with_vendor_version_string;
25472 fi
25473 
25474   if test "x$with_vendor_version_string" = xyes; then
25475     as_fn_error $? "--with-vendor-version-string must have a value" "$LINENO" 5
25476   elif  ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ; then
25477     as_fn_error $? "--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string" "$LINENO" 5
25478   else
25479     VENDOR_VERSION_STRING="$with_vendor_version_string"
25480   fi
25481 
25482   # We could define --with flags for these, if really needed
25483   VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
25484   VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
25485 
25486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25487 $as_echo_n "checking for version string... " >&6; }
25488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25489 $as_echo "$VERSION_STRING" >&6; }
25490 
25491 
25492 
25493 
25494 
25495 
25496 
25497 
25498 
25499 
25500 
25501 
25502 
25503 
25504 
25505 
25506 
25507 
25508 
25509 
25510 ###############################################################################
25511 #
25512 # Setup BootJDK, used to bootstrap the build.
25513 #
25514 ###############################################################################
25515 
25516 
25517   BOOT_JDK_FOUND=no
25518 
25519 # Check whether --with-boot-jdk was given.
25520 if test "${with_boot_jdk+set}" = set; then :
25521   withval=$with_boot_jdk;
25522 fi
25523 
25524 
25525   # We look for the Boot JDK through various means, going from more certain to
25526   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25527   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25528   # must check if this is indeed valid; otherwise we'll continue looking.
25529 
25530   # Test: Is bootjdk explicitly set by command line arguments?
25531 
25532   if test "x$BOOT_JDK_FOUND" = xno; then
25533     # Now execute the test
25534 
25535   if test "x$with_boot_jdk" != x; then
25536     BOOT_JDK=$with_boot_jdk
25537     BOOT_JDK_FOUND=maybe
25538     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25539 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25540   fi
25541 
25542 
25543     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25544     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25545       # Do we have a bin/java?
25546       if test ! -x "$BOOT_JDK/bin/java"; then
25547         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25548 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25549         BOOT_JDK_FOUND=no
25550       else
25551         # Do we have a bin/javac?
25552         if test ! -x "$BOOT_JDK/bin/javac"; then
25553           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25554 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25555           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25556 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25557           BOOT_JDK_FOUND=no
25558         else
25559           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25560           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25561 
25562           # Extra M4 quote needed to protect [] in grep expression.
25563           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25564           if test "x$FOUND_CORRECT_VERSION" = x; then
25565             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25567             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25568 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25569             BOOT_JDK_FOUND=no
25570           else
25571             # We're done! :-)
25572             BOOT_JDK_FOUND=yes
25573 
25574   # Only process if variable expands to non-empty
25575 
25576   if test "x$BOOT_JDK" != x; then
25577     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25578 
25579   # Input might be given as Windows format, start by converting to
25580   # unix format.
25581   path="$BOOT_JDK"
25582   new_path=`$CYGPATH -u "$path"`
25583 
25584   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25585   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25586   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25587   # "foo.exe" is OK but "foo" is an error.
25588   #
25589   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25590   # It is also a way to make sure we got the proper file name for the real test later on.
25591   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25592   if test "x$test_shortpath" = x; then
25593     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25594 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25595     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25596   fi
25597 
25598   # Call helper function which possibly converts this using DOS-style short mode.
25599   # If so, the updated path is stored in $new_path.
25600 
25601   input_path="$new_path"
25602   # Check if we need to convert this using DOS-style short mode. If the path
25603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25604   # take no chances and rewrite it.
25605   # Note: m4 eats our [], so we need to use [ and ] instead.
25606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25607   if test "x$has_forbidden_chars" != x; then
25608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25609     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25610     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25611     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25612       # Going to short mode and back again did indeed matter. Since short mode is
25613       # case insensitive, let's make it lowercase to improve readability.
25614       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25615       # Now convert it back to Unix-style (cygpath)
25616       input_path=`$CYGPATH -u "$shortmode_path"`
25617       new_path="$input_path"
25618     fi
25619   fi
25620 
25621   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25622   if test "x$test_cygdrive_prefix" = x; then
25623     # As a simple fix, exclude /usr/bin since it's not a real path.
25624     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25625       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25626       # a path prefixed by /cygdrive for fixpath to work.
25627       new_path="$CYGWIN_ROOT_PATH$input_path"
25628     fi
25629   fi
25630 
25631 
25632   if test "x$path" != "x$new_path"; then
25633     BOOT_JDK="$new_path"
25634     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25635 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25636   fi
25637 
25638     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25639 
25640   path="$BOOT_JDK"
25641   has_colon=`$ECHO $path | $GREP ^.:`
25642   new_path="$path"
25643   if test "x$has_colon" = x; then
25644     # Not in mixed or Windows style, start by that.
25645     new_path=`cmd //c echo $path`
25646   fi
25647 
25648 
25649   input_path="$new_path"
25650   # Check if we need to convert this using DOS-style short mode. If the path
25651   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25652   # take no chances and rewrite it.
25653   # Note: m4 eats our [], so we need to use [ and ] instead.
25654   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25655   if test "x$has_forbidden_chars" != x; then
25656     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25657     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25658   fi
25659 
25660 
25661   windows_path="$new_path"
25662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25663     unix_path=`$CYGPATH -u "$windows_path"`
25664     new_path="$unix_path"
25665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25667     new_path="$unix_path"
25668   fi
25669 
25670   if test "x$path" != "x$new_path"; then
25671     BOOT_JDK="$new_path"
25672     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25673 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25674   fi
25675 
25676   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25677   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25678 
25679     else
25680       # We're on a unix platform. Hooray! :)
25681       path="$BOOT_JDK"
25682       has_space=`$ECHO "$path" | $GREP " "`
25683       if test "x$has_space" != x; then
25684         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25685 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25686         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25687       fi
25688 
25689       # Use eval to expand a potential ~
25690       eval path="$path"
25691       if test ! -f "$path" && test ! -d "$path"; then
25692         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25693       fi
25694 
25695       if test -d "$path"; then
25696         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25697       else
25698         dir="`$DIRNAME "$path"`"
25699         base="`$BASENAME "$path"`"
25700         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25701       fi
25702     fi
25703   fi
25704 
25705             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25706 $as_echo_n "checking for Boot JDK... " >&6; }
25707             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25708 $as_echo "$BOOT_JDK" >&6; }
25709             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25710 $as_echo_n "checking Boot JDK version... " >&6; }
25711             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25713 $as_echo "$BOOT_JDK_VERSION" >&6; }
25714           fi # end check jdk version
25715         fi # end check javac
25716       fi # end check java
25717     fi # end check boot jdk found
25718   fi
25719 
25720   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25721     # Having specified an argument which is incorrect will produce an instant failure;
25722     # we should not go on looking
25723     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25724   fi
25725 
25726   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25727 
25728   if test "x$BOOT_JDK_FOUND" = xno; then
25729     # Now execute the test
25730 
25731   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25732     # First check at user selected default
25733 
25734   if test "x$BOOT_JDK_FOUND" = xno; then
25735     # Now execute the test
25736 
25737   if test -x /usr/libexec/java_home; then
25738     BOOT_JDK=`/usr/libexec/java_home `
25739     BOOT_JDK_FOUND=maybe
25740     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25741 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25742   fi
25743 
25744 
25745     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25746     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25747       # Do we have a bin/java?
25748       if test ! -x "$BOOT_JDK/bin/java"; then
25749         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25750 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25751         BOOT_JDK_FOUND=no
25752       else
25753         # Do we have a bin/javac?
25754         if test ! -x "$BOOT_JDK/bin/javac"; then
25755           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25756 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25757           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25758 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25759           BOOT_JDK_FOUND=no
25760         else
25761           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25762           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25763 
25764           # Extra M4 quote needed to protect [] in grep expression.
25765           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25766           if test "x$FOUND_CORRECT_VERSION" = x; then
25767             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25768 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25769             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25770 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25771             BOOT_JDK_FOUND=no
25772           else
25773             # We're done! :-)
25774             BOOT_JDK_FOUND=yes
25775 
25776   # Only process if variable expands to non-empty
25777 
25778   if test "x$BOOT_JDK" != x; then
25779     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25780 
25781   # Input might be given as Windows format, start by converting to
25782   # unix format.
25783   path="$BOOT_JDK"
25784   new_path=`$CYGPATH -u "$path"`
25785 
25786   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25787   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25788   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25789   # "foo.exe" is OK but "foo" is an error.
25790   #
25791   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25792   # It is also a way to make sure we got the proper file name for the real test later on.
25793   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25794   if test "x$test_shortpath" = x; then
25795     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25796 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25797     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25798   fi
25799 
25800   # Call helper function which possibly converts this using DOS-style short mode.
25801   # If so, the updated path is stored in $new_path.
25802 
25803   input_path="$new_path"
25804   # Check if we need to convert this using DOS-style short mode. If the path
25805   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25806   # take no chances and rewrite it.
25807   # Note: m4 eats our [], so we need to use [ and ] instead.
25808   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25809   if test "x$has_forbidden_chars" != x; then
25810     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25811     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25812     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25813     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25814       # Going to short mode and back again did indeed matter. Since short mode is
25815       # case insensitive, let's make it lowercase to improve readability.
25816       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25817       # Now convert it back to Unix-style (cygpath)
25818       input_path=`$CYGPATH -u "$shortmode_path"`
25819       new_path="$input_path"
25820     fi
25821   fi
25822 
25823   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25824   if test "x$test_cygdrive_prefix" = x; then
25825     # As a simple fix, exclude /usr/bin since it's not a real path.
25826     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25827       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25828       # a path prefixed by /cygdrive for fixpath to work.
25829       new_path="$CYGWIN_ROOT_PATH$input_path"
25830     fi
25831   fi
25832 
25833 
25834   if test "x$path" != "x$new_path"; then
25835     BOOT_JDK="$new_path"
25836     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25837 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25838   fi
25839 
25840     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25841 
25842   path="$BOOT_JDK"
25843   has_colon=`$ECHO $path | $GREP ^.:`
25844   new_path="$path"
25845   if test "x$has_colon" = x; then
25846     # Not in mixed or Windows style, start by that.
25847     new_path=`cmd //c echo $path`
25848   fi
25849 
25850 
25851   input_path="$new_path"
25852   # Check if we need to convert this using DOS-style short mode. If the path
25853   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25854   # take no chances and rewrite it.
25855   # Note: m4 eats our [], so we need to use [ and ] instead.
25856   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25857   if test "x$has_forbidden_chars" != x; then
25858     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25859     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25860   fi
25861 
25862 
25863   windows_path="$new_path"
25864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25865     unix_path=`$CYGPATH -u "$windows_path"`
25866     new_path="$unix_path"
25867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25869     new_path="$unix_path"
25870   fi
25871 
25872   if test "x$path" != "x$new_path"; then
25873     BOOT_JDK="$new_path"
25874     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25875 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25876   fi
25877 
25878   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25879   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25880 
25881     else
25882       # We're on a unix platform. Hooray! :)
25883       path="$BOOT_JDK"
25884       has_space=`$ECHO "$path" | $GREP " "`
25885       if test "x$has_space" != x; then
25886         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25887 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25888         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25889       fi
25890 
25891       # Use eval to expand a potential ~
25892       eval path="$path"
25893       if test ! -f "$path" && test ! -d "$path"; then
25894         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25895       fi
25896 
25897       if test -d "$path"; then
25898         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25899       else
25900         dir="`$DIRNAME "$path"`"
25901         base="`$BASENAME "$path"`"
25902         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25903       fi
25904     fi
25905   fi
25906 
25907             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25908 $as_echo_n "checking for Boot JDK... " >&6; }
25909             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25910 $as_echo "$BOOT_JDK" >&6; }
25911             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25912 $as_echo_n "checking Boot JDK version... " >&6; }
25913             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25914             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25915 $as_echo "$BOOT_JDK_VERSION" >&6; }
25916           fi # end check jdk version
25917         fi # end check javac
25918       fi # end check java
25919     fi # end check boot jdk found
25920   fi
25921 
25922     # If that did not work out (e.g. too old), try explicit versions instead
25923 
25924   if test "x$BOOT_JDK_FOUND" = xno; then
25925     # Now execute the test
25926 
25927   if test -x /usr/libexec/java_home; then
25928     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25929     BOOT_JDK_FOUND=maybe
25930     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25931 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25932   fi
25933 
25934 
25935     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25936     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25937       # Do we have a bin/java?
25938       if test ! -x "$BOOT_JDK/bin/java"; then
25939         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25940 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25941         BOOT_JDK_FOUND=no
25942       else
25943         # Do we have a bin/javac?
25944         if test ! -x "$BOOT_JDK/bin/javac"; then
25945           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25946 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25947           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25948 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25949           BOOT_JDK_FOUND=no
25950         else
25951           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25952           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25953 
25954           # Extra M4 quote needed to protect [] in grep expression.
25955           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25956           if test "x$FOUND_CORRECT_VERSION" = x; then
25957             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25958 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25959             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25960 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25961             BOOT_JDK_FOUND=no
25962           else
25963             # We're done! :-)
25964             BOOT_JDK_FOUND=yes
25965 
25966   # Only process if variable expands to non-empty
25967 
25968   if test "x$BOOT_JDK" != x; then
25969     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25970 
25971   # Input might be given as Windows format, start by converting to
25972   # unix format.
25973   path="$BOOT_JDK"
25974   new_path=`$CYGPATH -u "$path"`
25975 
25976   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25977   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25978   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25979   # "foo.exe" is OK but "foo" is an error.
25980   #
25981   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25982   # It is also a way to make sure we got the proper file name for the real test later on.
25983   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25984   if test "x$test_shortpath" = x; then
25985     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25986 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25987     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25988   fi
25989 
25990   # Call helper function which possibly converts this using DOS-style short mode.
25991   # If so, the updated path is stored in $new_path.
25992 
25993   input_path="$new_path"
25994   # Check if we need to convert this using DOS-style short mode. If the path
25995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25996   # take no chances and rewrite it.
25997   # Note: m4 eats our [], so we need to use [ and ] instead.
25998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25999   if test "x$has_forbidden_chars" != x; then
26000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26001     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26002     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26003     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26004       # Going to short mode and back again did indeed matter. Since short mode is
26005       # case insensitive, let's make it lowercase to improve readability.
26006       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26007       # Now convert it back to Unix-style (cygpath)
26008       input_path=`$CYGPATH -u "$shortmode_path"`
26009       new_path="$input_path"
26010     fi
26011   fi
26012 
26013   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26014   if test "x$test_cygdrive_prefix" = x; then
26015     # As a simple fix, exclude /usr/bin since it's not a real path.
26016     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26017       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26018       # a path prefixed by /cygdrive for fixpath to work.
26019       new_path="$CYGWIN_ROOT_PATH$input_path"
26020     fi
26021   fi
26022 
26023 
26024   if test "x$path" != "x$new_path"; then
26025     BOOT_JDK="$new_path"
26026     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26027 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26028   fi
26029 
26030     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26031 
26032   path="$BOOT_JDK"
26033   has_colon=`$ECHO $path | $GREP ^.:`
26034   new_path="$path"
26035   if test "x$has_colon" = x; then
26036     # Not in mixed or Windows style, start by that.
26037     new_path=`cmd //c echo $path`
26038   fi
26039 
26040 
26041   input_path="$new_path"
26042   # Check if we need to convert this using DOS-style short mode. If the path
26043   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26044   # take no chances and rewrite it.
26045   # Note: m4 eats our [], so we need to use [ and ] instead.
26046   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26047   if test "x$has_forbidden_chars" != x; then
26048     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26049     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26050   fi
26051 
26052 
26053   windows_path="$new_path"
26054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26055     unix_path=`$CYGPATH -u "$windows_path"`
26056     new_path="$unix_path"
26057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26059     new_path="$unix_path"
26060   fi
26061 
26062   if test "x$path" != "x$new_path"; then
26063     BOOT_JDK="$new_path"
26064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26065 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26066   fi
26067 
26068   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26069   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26070 
26071     else
26072       # We're on a unix platform. Hooray! :)
26073       path="$BOOT_JDK"
26074       has_space=`$ECHO "$path" | $GREP " "`
26075       if test "x$has_space" != x; then
26076         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26077 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26078         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26079       fi
26080 
26081       # Use eval to expand a potential ~
26082       eval path="$path"
26083       if test ! -f "$path" && test ! -d "$path"; then
26084         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26085       fi
26086 
26087       if test -d "$path"; then
26088         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26089       else
26090         dir="`$DIRNAME "$path"`"
26091         base="`$BASENAME "$path"`"
26092         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26093       fi
26094     fi
26095   fi
26096 
26097             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26098 $as_echo_n "checking for Boot JDK... " >&6; }
26099             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26100 $as_echo "$BOOT_JDK" >&6; }
26101             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26102 $as_echo_n "checking Boot JDK version... " >&6; }
26103             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26104             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26105 $as_echo "$BOOT_JDK_VERSION" >&6; }
26106           fi # end check jdk version
26107         fi # end check javac
26108       fi # end check java
26109     fi # end check boot jdk found
26110   fi
26111 
26112 
26113   if test "x$BOOT_JDK_FOUND" = xno; then
26114     # Now execute the test
26115 
26116   if test -x /usr/libexec/java_home; then
26117     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26118     BOOT_JDK_FOUND=maybe
26119     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26120 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26121   fi
26122 
26123 
26124     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26125     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26126       # Do we have a bin/java?
26127       if test ! -x "$BOOT_JDK/bin/java"; then
26128         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26129 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26130         BOOT_JDK_FOUND=no
26131       else
26132         # Do we have a bin/javac?
26133         if test ! -x "$BOOT_JDK/bin/javac"; then
26134           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26135 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26136           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26137 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26138           BOOT_JDK_FOUND=no
26139         else
26140           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26141           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26142 
26143           # Extra M4 quote needed to protect [] in grep expression.
26144           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26145           if test "x$FOUND_CORRECT_VERSION" = x; then
26146             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26147 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26148             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26149 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26150             BOOT_JDK_FOUND=no
26151           else
26152             # We're done! :-)
26153             BOOT_JDK_FOUND=yes
26154 
26155   # Only process if variable expands to non-empty
26156 
26157   if test "x$BOOT_JDK" != x; then
26158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26159 
26160   # Input might be given as Windows format, start by converting to
26161   # unix format.
26162   path="$BOOT_JDK"
26163   new_path=`$CYGPATH -u "$path"`
26164 
26165   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26166   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26167   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26168   # "foo.exe" is OK but "foo" is an error.
26169   #
26170   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26171   # It is also a way to make sure we got the proper file name for the real test later on.
26172   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26173   if test "x$test_shortpath" = x; then
26174     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26175 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26176     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26177   fi
26178 
26179   # Call helper function which possibly converts this using DOS-style short mode.
26180   # If so, the updated path is stored in $new_path.
26181 
26182   input_path="$new_path"
26183   # Check if we need to convert this using DOS-style short mode. If the path
26184   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26185   # take no chances and rewrite it.
26186   # Note: m4 eats our [], so we need to use [ and ] instead.
26187   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26188   if test "x$has_forbidden_chars" != x; then
26189     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26190     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26191     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26192     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26193       # Going to short mode and back again did indeed matter. Since short mode is
26194       # case insensitive, let's make it lowercase to improve readability.
26195       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26196       # Now convert it back to Unix-style (cygpath)
26197       input_path=`$CYGPATH -u "$shortmode_path"`
26198       new_path="$input_path"
26199     fi
26200   fi
26201 
26202   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26203   if test "x$test_cygdrive_prefix" = x; then
26204     # As a simple fix, exclude /usr/bin since it's not a real path.
26205     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26206       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26207       # a path prefixed by /cygdrive for fixpath to work.
26208       new_path="$CYGWIN_ROOT_PATH$input_path"
26209     fi
26210   fi
26211 
26212 
26213   if test "x$path" != "x$new_path"; then
26214     BOOT_JDK="$new_path"
26215     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26216 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26217   fi
26218 
26219     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26220 
26221   path="$BOOT_JDK"
26222   has_colon=`$ECHO $path | $GREP ^.:`
26223   new_path="$path"
26224   if test "x$has_colon" = x; then
26225     # Not in mixed or Windows style, start by that.
26226     new_path=`cmd //c echo $path`
26227   fi
26228 
26229 
26230   input_path="$new_path"
26231   # Check if we need to convert this using DOS-style short mode. If the path
26232   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26233   # take no chances and rewrite it.
26234   # Note: m4 eats our [], so we need to use [ and ] instead.
26235   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26236   if test "x$has_forbidden_chars" != x; then
26237     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26238     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26239   fi
26240 
26241 
26242   windows_path="$new_path"
26243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26244     unix_path=`$CYGPATH -u "$windows_path"`
26245     new_path="$unix_path"
26246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26248     new_path="$unix_path"
26249   fi
26250 
26251   if test "x$path" != "x$new_path"; then
26252     BOOT_JDK="$new_path"
26253     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26254 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26255   fi
26256 
26257   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26258   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26259 
26260     else
26261       # We're on a unix platform. Hooray! :)
26262       path="$BOOT_JDK"
26263       has_space=`$ECHO "$path" | $GREP " "`
26264       if test "x$has_space" != x; then
26265         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26266 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26267         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26268       fi
26269 
26270       # Use eval to expand a potential ~
26271       eval path="$path"
26272       if test ! -f "$path" && test ! -d "$path"; then
26273         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26274       fi
26275 
26276       if test -d "$path"; then
26277         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26278       else
26279         dir="`$DIRNAME "$path"`"
26280         base="`$BASENAME "$path"`"
26281         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26282       fi
26283     fi
26284   fi
26285 
26286             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26287 $as_echo_n "checking for Boot JDK... " >&6; }
26288             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26289 $as_echo "$BOOT_JDK" >&6; }
26290             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26291 $as_echo_n "checking Boot JDK version... " >&6; }
26292             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26293             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26294 $as_echo "$BOOT_JDK_VERSION" >&6; }
26295           fi # end check jdk version
26296         fi # end check javac
26297       fi # end check java
26298     fi # end check boot jdk found
26299   fi
26300 
26301 
26302   if test "x$BOOT_JDK_FOUND" = xno; then
26303     # Now execute the test
26304 
26305   if test -x /usr/libexec/java_home; then
26306     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26307     BOOT_JDK_FOUND=maybe
26308     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26309 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26310   fi
26311 
26312 
26313     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26314     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26315       # Do we have a bin/java?
26316       if test ! -x "$BOOT_JDK/bin/java"; then
26317         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26319         BOOT_JDK_FOUND=no
26320       else
26321         # Do we have a bin/javac?
26322         if test ! -x "$BOOT_JDK/bin/javac"; then
26323           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26324 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26325           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26326 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26327           BOOT_JDK_FOUND=no
26328         else
26329           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26330           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26331 
26332           # Extra M4 quote needed to protect [] in grep expression.
26333           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26334           if test "x$FOUND_CORRECT_VERSION" = x; then
26335             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26336 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26337             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26338 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26339             BOOT_JDK_FOUND=no
26340           else
26341             # We're done! :-)
26342             BOOT_JDK_FOUND=yes
26343 
26344   # Only process if variable expands to non-empty
26345 
26346   if test "x$BOOT_JDK" != x; then
26347     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26348 
26349   # Input might be given as Windows format, start by converting to
26350   # unix format.
26351   path="$BOOT_JDK"
26352   new_path=`$CYGPATH -u "$path"`
26353 
26354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26357   # "foo.exe" is OK but "foo" is an error.
26358   #
26359   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26360   # It is also a way to make sure we got the proper file name for the real test later on.
26361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26362   if test "x$test_shortpath" = x; then
26363     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26364 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26365     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26366   fi
26367 
26368   # Call helper function which possibly converts this using DOS-style short mode.
26369   # If so, the updated path is stored in $new_path.
26370 
26371   input_path="$new_path"
26372   # Check if we need to convert this using DOS-style short mode. If the path
26373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26374   # take no chances and rewrite it.
26375   # Note: m4 eats our [], so we need to use [ and ] instead.
26376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26377   if test "x$has_forbidden_chars" != x; then
26378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26382       # Going to short mode and back again did indeed matter. Since short mode is
26383       # case insensitive, let's make it lowercase to improve readability.
26384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26385       # Now convert it back to Unix-style (cygpath)
26386       input_path=`$CYGPATH -u "$shortmode_path"`
26387       new_path="$input_path"
26388     fi
26389   fi
26390 
26391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26392   if test "x$test_cygdrive_prefix" = x; then
26393     # As a simple fix, exclude /usr/bin since it's not a real path.
26394     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26396       # a path prefixed by /cygdrive for fixpath to work.
26397       new_path="$CYGWIN_ROOT_PATH$input_path"
26398     fi
26399   fi
26400 
26401 
26402   if test "x$path" != "x$new_path"; then
26403     BOOT_JDK="$new_path"
26404     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26405 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26406   fi
26407 
26408     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26409 
26410   path="$BOOT_JDK"
26411   has_colon=`$ECHO $path | $GREP ^.:`
26412   new_path="$path"
26413   if test "x$has_colon" = x; then
26414     # Not in mixed or Windows style, start by that.
26415     new_path=`cmd //c echo $path`
26416   fi
26417 
26418 
26419   input_path="$new_path"
26420   # Check if we need to convert this using DOS-style short mode. If the path
26421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26422   # take no chances and rewrite it.
26423   # Note: m4 eats our [], so we need to use [ and ] instead.
26424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26425   if test "x$has_forbidden_chars" != x; then
26426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26427     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26428   fi
26429 
26430 
26431   windows_path="$new_path"
26432   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26433     unix_path=`$CYGPATH -u "$windows_path"`
26434     new_path="$unix_path"
26435   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26436     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26437     new_path="$unix_path"
26438   fi
26439 
26440   if test "x$path" != "x$new_path"; then
26441     BOOT_JDK="$new_path"
26442     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26443 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26444   fi
26445 
26446   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26447   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26448 
26449     else
26450       # We're on a unix platform. Hooray! :)
26451       path="$BOOT_JDK"
26452       has_space=`$ECHO "$path" | $GREP " "`
26453       if test "x$has_space" != x; then
26454         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26455 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26456         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26457       fi
26458 
26459       # Use eval to expand a potential ~
26460       eval path="$path"
26461       if test ! -f "$path" && test ! -d "$path"; then
26462         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26463       fi
26464 
26465       if test -d "$path"; then
26466         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26467       else
26468         dir="`$DIRNAME "$path"`"
26469         base="`$BASENAME "$path"`"
26470         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26471       fi
26472     fi
26473   fi
26474 
26475             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26476 $as_echo_n "checking for Boot JDK... " >&6; }
26477             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26478 $as_echo "$BOOT_JDK" >&6; }
26479             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26480 $as_echo_n "checking Boot JDK version... " >&6; }
26481             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26482             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26483 $as_echo "$BOOT_JDK_VERSION" >&6; }
26484           fi # end check jdk version
26485         fi # end check javac
26486       fi # end check java
26487     fi # end check boot jdk found
26488   fi
26489 
26490   fi
26491 
26492 
26493     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26494     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26495       # Do we have a bin/java?
26496       if test ! -x "$BOOT_JDK/bin/java"; then
26497         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26498 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26499         BOOT_JDK_FOUND=no
26500       else
26501         # Do we have a bin/javac?
26502         if test ! -x "$BOOT_JDK/bin/javac"; then
26503           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26504 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26505           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26506 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26507           BOOT_JDK_FOUND=no
26508         else
26509           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26510           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26511 
26512           # Extra M4 quote needed to protect [] in grep expression.
26513           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26514           if test "x$FOUND_CORRECT_VERSION" = x; then
26515             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26516 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26517             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26518 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26519             BOOT_JDK_FOUND=no
26520           else
26521             # We're done! :-)
26522             BOOT_JDK_FOUND=yes
26523 
26524   # Only process if variable expands to non-empty
26525 
26526   if test "x$BOOT_JDK" != x; then
26527     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26528 
26529   # Input might be given as Windows format, start by converting to
26530   # unix format.
26531   path="$BOOT_JDK"
26532   new_path=`$CYGPATH -u "$path"`
26533 
26534   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26535   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26536   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26537   # "foo.exe" is OK but "foo" is an error.
26538   #
26539   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26540   # It is also a way to make sure we got the proper file name for the real test later on.
26541   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26542   if test "x$test_shortpath" = x; then
26543     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26544 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26545     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26546   fi
26547 
26548   # Call helper function which possibly converts this using DOS-style short mode.
26549   # If so, the updated path is stored in $new_path.
26550 
26551   input_path="$new_path"
26552   # Check if we need to convert this using DOS-style short mode. If the path
26553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26554   # take no chances and rewrite it.
26555   # Note: m4 eats our [], so we need to use [ and ] instead.
26556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26557   if test "x$has_forbidden_chars" != x; then
26558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26559     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26560     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26561     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26562       # Going to short mode and back again did indeed matter. Since short mode is
26563       # case insensitive, let's make it lowercase to improve readability.
26564       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26565       # Now convert it back to Unix-style (cygpath)
26566       input_path=`$CYGPATH -u "$shortmode_path"`
26567       new_path="$input_path"
26568     fi
26569   fi
26570 
26571   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26572   if test "x$test_cygdrive_prefix" = x; then
26573     # As a simple fix, exclude /usr/bin since it's not a real path.
26574     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26575       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26576       # a path prefixed by /cygdrive for fixpath to work.
26577       new_path="$CYGWIN_ROOT_PATH$input_path"
26578     fi
26579   fi
26580 
26581 
26582   if test "x$path" != "x$new_path"; then
26583     BOOT_JDK="$new_path"
26584     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26585 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26586   fi
26587 
26588     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26589 
26590   path="$BOOT_JDK"
26591   has_colon=`$ECHO $path | $GREP ^.:`
26592   new_path="$path"
26593   if test "x$has_colon" = x; then
26594     # Not in mixed or Windows style, start by that.
26595     new_path=`cmd //c echo $path`
26596   fi
26597 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26608   fi
26609 
26610 
26611   windows_path="$new_path"
26612   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26613     unix_path=`$CYGPATH -u "$windows_path"`
26614     new_path="$unix_path"
26615   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26616     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26617     new_path="$unix_path"
26618   fi
26619 
26620   if test "x$path" != "x$new_path"; then
26621     BOOT_JDK="$new_path"
26622     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26623 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26624   fi
26625 
26626   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26627   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26628 
26629     else
26630       # We're on a unix platform. Hooray! :)
26631       path="$BOOT_JDK"
26632       has_space=`$ECHO "$path" | $GREP " "`
26633       if test "x$has_space" != x; then
26634         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26635 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26636         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26637       fi
26638 
26639       # Use eval to expand a potential ~
26640       eval path="$path"
26641       if test ! -f "$path" && test ! -d "$path"; then
26642         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26643       fi
26644 
26645       if test -d "$path"; then
26646         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26647       else
26648         dir="`$DIRNAME "$path"`"
26649         base="`$BASENAME "$path"`"
26650         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26651       fi
26652     fi
26653   fi
26654 
26655             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26656 $as_echo_n "checking for Boot JDK... " >&6; }
26657             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26658 $as_echo "$BOOT_JDK" >&6; }
26659             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26660 $as_echo_n "checking Boot JDK version... " >&6; }
26661             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26662             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26663 $as_echo "$BOOT_JDK_VERSION" >&6; }
26664           fi # end check jdk version
26665         fi # end check javac
26666       fi # end check java
26667     fi # end check boot jdk found
26668   fi
26669 
26670 
26671   # Test: Is $JAVA_HOME set?
26672 
26673   if test "x$BOOT_JDK_FOUND" = xno; then
26674     # Now execute the test
26675 
26676   if test "x$JAVA_HOME" != x; then
26677     JAVA_HOME_PROCESSED="$JAVA_HOME"
26678 
26679   # Only process if variable expands to non-empty
26680 
26681   if test "x$JAVA_HOME_PROCESSED" != x; then
26682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26683 
26684   # Input might be given as Windows format, start by converting to
26685   # unix format.
26686   path="$JAVA_HOME_PROCESSED"
26687   new_path=`$CYGPATH -u "$path"`
26688 
26689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26692   # "foo.exe" is OK but "foo" is an error.
26693   #
26694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26695   # It is also a way to make sure we got the proper file name for the real test later on.
26696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26697   if test "x$test_shortpath" = x; then
26698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26699 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26700     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26701   fi
26702 
26703   # Call helper function which possibly converts this using DOS-style short mode.
26704   # If so, the updated path is stored in $new_path.
26705 
26706   input_path="$new_path"
26707   # Check if we need to convert this using DOS-style short mode. If the path
26708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26709   # take no chances and rewrite it.
26710   # Note: m4 eats our [], so we need to use [ and ] instead.
26711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26712   if test "x$has_forbidden_chars" != x; then
26713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26717       # Going to short mode and back again did indeed matter. Since short mode is
26718       # case insensitive, let's make it lowercase to improve readability.
26719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26720       # Now convert it back to Unix-style (cygpath)
26721       input_path=`$CYGPATH -u "$shortmode_path"`
26722       new_path="$input_path"
26723     fi
26724   fi
26725 
26726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26727   if test "x$test_cygdrive_prefix" = x; then
26728     # As a simple fix, exclude /usr/bin since it's not a real path.
26729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26731       # a path prefixed by /cygdrive for fixpath to work.
26732       new_path="$CYGWIN_ROOT_PATH$input_path"
26733     fi
26734   fi
26735 
26736 
26737   if test "x$path" != "x$new_path"; then
26738     JAVA_HOME_PROCESSED="$new_path"
26739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26740 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26741   fi
26742 
26743     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26744 
26745   path="$JAVA_HOME_PROCESSED"
26746   has_colon=`$ECHO $path | $GREP ^.:`
26747   new_path="$path"
26748   if test "x$has_colon" = x; then
26749     # Not in mixed or Windows style, start by that.
26750     new_path=`cmd //c echo $path`
26751   fi
26752 
26753 
26754   input_path="$new_path"
26755   # Check if we need to convert this using DOS-style short mode. If the path
26756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26757   # take no chances and rewrite it.
26758   # Note: m4 eats our [], so we need to use [ and ] instead.
26759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26760   if test "x$has_forbidden_chars" != x; then
26761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26763   fi
26764 
26765 
26766   windows_path="$new_path"
26767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26768     unix_path=`$CYGPATH -u "$windows_path"`
26769     new_path="$unix_path"
26770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26772     new_path="$unix_path"
26773   fi
26774 
26775   if test "x$path" != "x$new_path"; then
26776     JAVA_HOME_PROCESSED="$new_path"
26777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26778 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26779   fi
26780 
26781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26783 
26784     else
26785       # We're on a unix platform. Hooray! :)
26786       path="$JAVA_HOME_PROCESSED"
26787       has_space=`$ECHO "$path" | $GREP " "`
26788       if test "x$has_space" != x; then
26789         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26790 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26791         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26792       fi
26793 
26794       # Use eval to expand a potential ~
26795       eval path="$path"
26796       if test ! -f "$path" && test ! -d "$path"; then
26797         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26798       fi
26799 
26800       if test -d "$path"; then
26801         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26802       else
26803         dir="`$DIRNAME "$path"`"
26804         base="`$BASENAME "$path"`"
26805         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26806       fi
26807     fi
26808   fi
26809 
26810     if test ! -d "$JAVA_HOME_PROCESSED"; then
26811       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26812 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26813     else
26814       # Aha, the user has set a JAVA_HOME
26815       # let us use that as the Boot JDK.
26816       BOOT_JDK="$JAVA_HOME_PROCESSED"
26817       BOOT_JDK_FOUND=maybe
26818       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26819 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26820     fi
26821   fi
26822 
26823 
26824     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26825     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26826       # Do we have a bin/java?
26827       if test ! -x "$BOOT_JDK/bin/java"; then
26828         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26830         BOOT_JDK_FOUND=no
26831       else
26832         # Do we have a bin/javac?
26833         if test ! -x "$BOOT_JDK/bin/javac"; then
26834           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26835 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26836           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26837 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26838           BOOT_JDK_FOUND=no
26839         else
26840           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26841           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26842 
26843           # Extra M4 quote needed to protect [] in grep expression.
26844           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26845           if test "x$FOUND_CORRECT_VERSION" = x; then
26846             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26847 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26848             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26849 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26850             BOOT_JDK_FOUND=no
26851           else
26852             # We're done! :-)
26853             BOOT_JDK_FOUND=yes
26854 
26855   # Only process if variable expands to non-empty
26856 
26857   if test "x$BOOT_JDK" != x; then
26858     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859 
26860   # Input might be given as Windows format, start by converting to
26861   # unix format.
26862   path="$BOOT_JDK"
26863   new_path=`$CYGPATH -u "$path"`
26864 
26865   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26866   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26867   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26868   # "foo.exe" is OK but "foo" is an error.
26869   #
26870   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26871   # It is also a way to make sure we got the proper file name for the real test later on.
26872   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26873   if test "x$test_shortpath" = x; then
26874     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26875 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26876     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26877   fi
26878 
26879   # Call helper function which possibly converts this using DOS-style short mode.
26880   # If so, the updated path is stored in $new_path.
26881 
26882   input_path="$new_path"
26883   # Check if we need to convert this using DOS-style short mode. If the path
26884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26885   # take no chances and rewrite it.
26886   # Note: m4 eats our [], so we need to use [ and ] instead.
26887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26888   if test "x$has_forbidden_chars" != x; then
26889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26890     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26891     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26892     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26893       # Going to short mode and back again did indeed matter. Since short mode is
26894       # case insensitive, let's make it lowercase to improve readability.
26895       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26896       # Now convert it back to Unix-style (cygpath)
26897       input_path=`$CYGPATH -u "$shortmode_path"`
26898       new_path="$input_path"
26899     fi
26900   fi
26901 
26902   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26903   if test "x$test_cygdrive_prefix" = x; then
26904     # As a simple fix, exclude /usr/bin since it's not a real path.
26905     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26906       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26907       # a path prefixed by /cygdrive for fixpath to work.
26908       new_path="$CYGWIN_ROOT_PATH$input_path"
26909     fi
26910   fi
26911 
26912 
26913   if test "x$path" != "x$new_path"; then
26914     BOOT_JDK="$new_path"
26915     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26916 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26917   fi
26918 
26919     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26920 
26921   path="$BOOT_JDK"
26922   has_colon=`$ECHO $path | $GREP ^.:`
26923   new_path="$path"
26924   if test "x$has_colon" = x; then
26925     # Not in mixed or Windows style, start by that.
26926     new_path=`cmd //c echo $path`
26927   fi
26928 
26929 
26930   input_path="$new_path"
26931   # Check if we need to convert this using DOS-style short mode. If the path
26932   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26933   # take no chances and rewrite it.
26934   # Note: m4 eats our [], so we need to use [ and ] instead.
26935   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26936   if test "x$has_forbidden_chars" != x; then
26937     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26938     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26939   fi
26940 
26941 
26942   windows_path="$new_path"
26943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26944     unix_path=`$CYGPATH -u "$windows_path"`
26945     new_path="$unix_path"
26946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26948     new_path="$unix_path"
26949   fi
26950 
26951   if test "x$path" != "x$new_path"; then
26952     BOOT_JDK="$new_path"
26953     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26954 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26955   fi
26956 
26957   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26958   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26959 
26960     else
26961       # We're on a unix platform. Hooray! :)
26962       path="$BOOT_JDK"
26963       has_space=`$ECHO "$path" | $GREP " "`
26964       if test "x$has_space" != x; then
26965         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26966 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26967         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26968       fi
26969 
26970       # Use eval to expand a potential ~
26971       eval path="$path"
26972       if test ! -f "$path" && test ! -d "$path"; then
26973         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26974       fi
26975 
26976       if test -d "$path"; then
26977         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26978       else
26979         dir="`$DIRNAME "$path"`"
26980         base="`$BASENAME "$path"`"
26981         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26982       fi
26983     fi
26984   fi
26985 
26986             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26987 $as_echo_n "checking for Boot JDK... " >&6; }
26988             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26989 $as_echo "$BOOT_JDK" >&6; }
26990             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26991 $as_echo_n "checking Boot JDK version... " >&6; }
26992             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26993             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26994 $as_echo "$BOOT_JDK_VERSION" >&6; }
26995           fi # end check jdk version
26996         fi # end check javac
26997       fi # end check java
26998     fi # end check boot jdk found
26999   fi
27000 
27001 
27002   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27003 
27004   if test "x$BOOT_JDK_FOUND" = xno; then
27005     # Now execute the test
27006 
27007   # Extract the first word of "javac", so it can be a program name with args.
27008 set dummy javac; ac_word=$2
27009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27010 $as_echo_n "checking for $ac_word... " >&6; }
27011 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27012   $as_echo_n "(cached) " >&6
27013 else
27014   case $JAVAC_CHECK in
27015   [\\/]* | ?:[\\/]*)
27016   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27017   ;;
27018   *)
27019   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27020 for as_dir in $PATH
27021 do
27022   IFS=$as_save_IFS
27023   test -z "$as_dir" && as_dir=.
27024     for ac_exec_ext in '' $ac_executable_extensions; do
27025   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27026     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27027     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27028     break 2
27029   fi
27030 done
27031   done
27032 IFS=$as_save_IFS
27033 
27034   ;;
27035 esac
27036 fi
27037 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27038 if test -n "$JAVAC_CHECK"; then
27039   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27040 $as_echo "$JAVAC_CHECK" >&6; }
27041 else
27042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27043 $as_echo "no" >&6; }
27044 fi
27045 
27046 
27047   # Extract the first word of "java", so it can be a program name with args.
27048 set dummy java; ac_word=$2
27049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27050 $as_echo_n "checking for $ac_word... " >&6; }
27051 if ${ac_cv_path_JAVA_CHECK+:} false; then :
27052   $as_echo_n "(cached) " >&6
27053 else
27054   case $JAVA_CHECK in
27055   [\\/]* | ?:[\\/]*)
27056   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27057   ;;
27058   *)
27059   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27060 for as_dir in $PATH
27061 do
27062   IFS=$as_save_IFS
27063   test -z "$as_dir" && as_dir=.
27064     for ac_exec_ext in '' $ac_executable_extensions; do
27065   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27066     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27067     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27068     break 2
27069   fi
27070 done
27071   done
27072 IFS=$as_save_IFS
27073 
27074   ;;
27075 esac
27076 fi
27077 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27078 if test -n "$JAVA_CHECK"; then
27079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27080 $as_echo "$JAVA_CHECK" >&6; }
27081 else
27082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27083 $as_echo "no" >&6; }
27084 fi
27085 
27086 
27087   BINARY="$JAVAC_CHECK"
27088   if test "x$JAVAC_CHECK" = x; then
27089     BINARY="$JAVA_CHECK"
27090   fi
27091   if test "x$BINARY" != x; then
27092     # So there is a java(c) binary, it might be part of a JDK.
27093     # Lets find the JDK/JRE directory by following symbolic links.
27094     # Linux/GNU systems often have links from /usr/bin/java to
27095     # /etc/alternatives/java to the real JDK binary.
27096 
27097   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27098     # Follow a chain of symbolic links. Use readlink
27099     # where it exists, else fall back to horribly
27100     # complicated shell code.
27101     if test "x$READLINK_TESTED" != yes; then
27102       # On MacOSX there is a readlink tool with a different
27103       # purpose than the GNU readlink tool. Check the found readlink.
27104       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27105       if test "x$ISGNU" = x; then
27106         # A readlink that we do not know how to use.
27107         # Are there other non-GNU readlinks out there?
27108         READLINK_TESTED=yes
27109         READLINK=
27110       fi
27111     fi
27112 
27113     if test "x$READLINK" != x; then
27114       BINARY=`$READLINK -f $BINARY`
27115     else
27116       # Save the current directory for restoring afterwards
27117       STARTDIR=$PWD
27118       COUNTER=0
27119       sym_link_dir=`$DIRNAME $BINARY`
27120       sym_link_file=`$BASENAME $BINARY`
27121       cd $sym_link_dir
27122       # Use -P flag to resolve symlinks in directories.
27123       cd `$THEPWDCMD -P`
27124       sym_link_dir=`$THEPWDCMD -P`
27125       # Resolve file symlinks
27126       while test $COUNTER -lt 20; do
27127         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27128         if test "x$ISLINK" == x; then
27129           # This is not a symbolic link! We are done!
27130           break
27131         fi
27132         # Again resolve directory symlinks since the target of the just found
27133         # link could be in a different directory
27134         cd `$DIRNAME $ISLINK`
27135         sym_link_dir=`$THEPWDCMD -P`
27136         sym_link_file=`$BASENAME $ISLINK`
27137         let COUNTER=COUNTER+1
27138       done
27139       cd $STARTDIR
27140       BINARY=$sym_link_dir/$sym_link_file
27141     fi
27142   fi
27143 
27144     BOOT_JDK=`dirname "$BINARY"`
27145     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27146     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27147       # Looks like we found ourselves an JDK
27148       BOOT_JDK_FOUND=maybe
27149       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27150 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27151     fi
27152   fi
27153 
27154 
27155     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27156     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27157       # Do we have a bin/java?
27158       if test ! -x "$BOOT_JDK/bin/java"; then
27159         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27160 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27161         BOOT_JDK_FOUND=no
27162       else
27163         # Do we have a bin/javac?
27164         if test ! -x "$BOOT_JDK/bin/javac"; then
27165           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27167           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27168 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27169           BOOT_JDK_FOUND=no
27170         else
27171           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27172           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27173 
27174           # Extra M4 quote needed to protect [] in grep expression.
27175           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27176           if test "x$FOUND_CORRECT_VERSION" = x; then
27177             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27179             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27180 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27181             BOOT_JDK_FOUND=no
27182           else
27183             # We're done! :-)
27184             BOOT_JDK_FOUND=yes
27185 
27186   # Only process if variable expands to non-empty
27187 
27188   if test "x$BOOT_JDK" != x; then
27189     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27190 
27191   # Input might be given as Windows format, start by converting to
27192   # unix format.
27193   path="$BOOT_JDK"
27194   new_path=`$CYGPATH -u "$path"`
27195 
27196   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27197   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27198   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27199   # "foo.exe" is OK but "foo" is an error.
27200   #
27201   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27202   # It is also a way to make sure we got the proper file name for the real test later on.
27203   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27204   if test "x$test_shortpath" = x; then
27205     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27206 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27207     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27208   fi
27209 
27210   # Call helper function which possibly converts this using DOS-style short mode.
27211   # If so, the updated path is stored in $new_path.
27212 
27213   input_path="$new_path"
27214   # Check if we need to convert this using DOS-style short mode. If the path
27215   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27216   # take no chances and rewrite it.
27217   # Note: m4 eats our [], so we need to use [ and ] instead.
27218   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27219   if test "x$has_forbidden_chars" != x; then
27220     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27221     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27222     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27223     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27224       # Going to short mode and back again did indeed matter. Since short mode is
27225       # case insensitive, let's make it lowercase to improve readability.
27226       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27227       # Now convert it back to Unix-style (cygpath)
27228       input_path=`$CYGPATH -u "$shortmode_path"`
27229       new_path="$input_path"
27230     fi
27231   fi
27232 
27233   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27234   if test "x$test_cygdrive_prefix" = x; then
27235     # As a simple fix, exclude /usr/bin since it's not a real path.
27236     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27237       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27238       # a path prefixed by /cygdrive for fixpath to work.
27239       new_path="$CYGWIN_ROOT_PATH$input_path"
27240     fi
27241   fi
27242 
27243 
27244   if test "x$path" != "x$new_path"; then
27245     BOOT_JDK="$new_path"
27246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27247 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27248   fi
27249 
27250     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27251 
27252   path="$BOOT_JDK"
27253   has_colon=`$ECHO $path | $GREP ^.:`
27254   new_path="$path"
27255   if test "x$has_colon" = x; then
27256     # Not in mixed or Windows style, start by that.
27257     new_path=`cmd //c echo $path`
27258   fi
27259 
27260 
27261   input_path="$new_path"
27262   # Check if we need to convert this using DOS-style short mode. If the path
27263   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27264   # take no chances and rewrite it.
27265   # Note: m4 eats our [], so we need to use [ and ] instead.
27266   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27267   if test "x$has_forbidden_chars" != x; then
27268     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27269     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27270   fi
27271 
27272 
27273   windows_path="$new_path"
27274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27275     unix_path=`$CYGPATH -u "$windows_path"`
27276     new_path="$unix_path"
27277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27279     new_path="$unix_path"
27280   fi
27281 
27282   if test "x$path" != "x$new_path"; then
27283     BOOT_JDK="$new_path"
27284     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27285 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27286   fi
27287 
27288   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27289   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27290 
27291     else
27292       # We're on a unix platform. Hooray! :)
27293       path="$BOOT_JDK"
27294       has_space=`$ECHO "$path" | $GREP " "`
27295       if test "x$has_space" != x; then
27296         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27297 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27298         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27299       fi
27300 
27301       # Use eval to expand a potential ~
27302       eval path="$path"
27303       if test ! -f "$path" && test ! -d "$path"; then
27304         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27305       fi
27306 
27307       if test -d "$path"; then
27308         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27309       else
27310         dir="`$DIRNAME "$path"`"
27311         base="`$BASENAME "$path"`"
27312         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27313       fi
27314     fi
27315   fi
27316 
27317             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27318 $as_echo_n "checking for Boot JDK... " >&6; }
27319             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27320 $as_echo "$BOOT_JDK" >&6; }
27321             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27322 $as_echo_n "checking Boot JDK version... " >&6; }
27323             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27324             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27325 $as_echo "$BOOT_JDK_VERSION" >&6; }
27326           fi # end check jdk version
27327         fi # end check javac
27328       fi # end check java
27329     fi # end check boot jdk found
27330   fi
27331 
27332 
27333   # Test: Is there a JDK installed in default, well-known locations?
27334 
27335   if test "x$BOOT_JDK_FOUND" = xno; then
27336     # Now execute the test
27337 
27338   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27339 
27340   if test "x$BOOT_JDK_FOUND" = xno; then
27341     # Now execute the test
27342 
27343   if test "x$ProgramW6432" != x; then
27344     VIRTUAL_DIR="$ProgramW6432/Java"
27345 
27346   windows_path="$VIRTUAL_DIR"
27347   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27348     unix_path=`$CYGPATH -u "$windows_path"`
27349     VIRTUAL_DIR="$unix_path"
27350   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27351     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27352     VIRTUAL_DIR="$unix_path"
27353   fi
27354 
27355 
27356   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27357   BOOT_JDK_SUFFIX=""
27358   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27359   if test "x$ALL_JDKS_FOUND" != x; then
27360     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27361 
27362   if test "x$BOOT_JDK_FOUND" = xno; then
27363     # Now execute the test
27364 
27365         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27366         if test -d "$BOOT_JDK"; then
27367           BOOT_JDK_FOUND=maybe
27368           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27369 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27370         fi
27371 
27372 
27373     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27374     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27375       # Do we have a bin/java?
27376       if test ! -x "$BOOT_JDK/bin/java"; then
27377         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27379         BOOT_JDK_FOUND=no
27380       else
27381         # Do we have a bin/javac?
27382         if test ! -x "$BOOT_JDK/bin/javac"; then
27383           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27384 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27385           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27386 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27387           BOOT_JDK_FOUND=no
27388         else
27389           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27390           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27391 
27392           # Extra M4 quote needed to protect [] in grep expression.
27393           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27394           if test "x$FOUND_CORRECT_VERSION" = x; then
27395             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27396 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27397             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27398 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27399             BOOT_JDK_FOUND=no
27400           else
27401             # We're done! :-)
27402             BOOT_JDK_FOUND=yes
27403 
27404   # Only process if variable expands to non-empty
27405 
27406   if test "x$BOOT_JDK" != x; then
27407     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27408 
27409   # Input might be given as Windows format, start by converting to
27410   # unix format.
27411   path="$BOOT_JDK"
27412   new_path=`$CYGPATH -u "$path"`
27413 
27414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27417   # "foo.exe" is OK but "foo" is an error.
27418   #
27419   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27420   # It is also a way to make sure we got the proper file name for the real test later on.
27421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27422   if test "x$test_shortpath" = x; then
27423     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27424 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27425     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27426   fi
27427 
27428   # Call helper function which possibly converts this using DOS-style short mode.
27429   # If so, the updated path is stored in $new_path.
27430 
27431   input_path="$new_path"
27432   # Check if we need to convert this using DOS-style short mode. If the path
27433   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27434   # take no chances and rewrite it.
27435   # Note: m4 eats our [], so we need to use [ and ] instead.
27436   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27437   if test "x$has_forbidden_chars" != x; then
27438     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27439     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27440     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27441     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27442       # Going to short mode and back again did indeed matter. Since short mode is
27443       # case insensitive, let's make it lowercase to improve readability.
27444       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27445       # Now convert it back to Unix-style (cygpath)
27446       input_path=`$CYGPATH -u "$shortmode_path"`
27447       new_path="$input_path"
27448     fi
27449   fi
27450 
27451   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27452   if test "x$test_cygdrive_prefix" = x; then
27453     # As a simple fix, exclude /usr/bin since it's not a real path.
27454     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27455       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27456       # a path prefixed by /cygdrive for fixpath to work.
27457       new_path="$CYGWIN_ROOT_PATH$input_path"
27458     fi
27459   fi
27460 
27461 
27462   if test "x$path" != "x$new_path"; then
27463     BOOT_JDK="$new_path"
27464     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27465 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27466   fi
27467 
27468     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27469 
27470   path="$BOOT_JDK"
27471   has_colon=`$ECHO $path | $GREP ^.:`
27472   new_path="$path"
27473   if test "x$has_colon" = x; then
27474     # Not in mixed or Windows style, start by that.
27475     new_path=`cmd //c echo $path`
27476   fi
27477 
27478 
27479   input_path="$new_path"
27480   # Check if we need to convert this using DOS-style short mode. If the path
27481   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27482   # take no chances and rewrite it.
27483   # Note: m4 eats our [], so we need to use [ and ] instead.
27484   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27485   if test "x$has_forbidden_chars" != x; then
27486     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27487     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27488   fi
27489 
27490 
27491   windows_path="$new_path"
27492   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27493     unix_path=`$CYGPATH -u "$windows_path"`
27494     new_path="$unix_path"
27495   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27496     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27497     new_path="$unix_path"
27498   fi
27499 
27500   if test "x$path" != "x$new_path"; then
27501     BOOT_JDK="$new_path"
27502     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27503 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27504   fi
27505 
27506   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27507   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27508 
27509     else
27510       # We're on a unix platform. Hooray! :)
27511       path="$BOOT_JDK"
27512       has_space=`$ECHO "$path" | $GREP " "`
27513       if test "x$has_space" != x; then
27514         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27515 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27516         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27517       fi
27518 
27519       # Use eval to expand a potential ~
27520       eval path="$path"
27521       if test ! -f "$path" && test ! -d "$path"; then
27522         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27523       fi
27524 
27525       if test -d "$path"; then
27526         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27527       else
27528         dir="`$DIRNAME "$path"`"
27529         base="`$BASENAME "$path"`"
27530         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27531       fi
27532     fi
27533   fi
27534 
27535             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27536 $as_echo_n "checking for Boot JDK... " >&6; }
27537             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27538 $as_echo "$BOOT_JDK" >&6; }
27539             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27540 $as_echo_n "checking Boot JDK version... " >&6; }
27541             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27542             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27543 $as_echo "$BOOT_JDK_VERSION" >&6; }
27544           fi # end check jdk version
27545         fi # end check javac
27546       fi # end check java
27547     fi # end check boot jdk found
27548   fi
27549 
27550     done
27551   fi
27552 
27553   fi
27554 
27555 
27556     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27557     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27558       # Do we have a bin/java?
27559       if test ! -x "$BOOT_JDK/bin/java"; then
27560         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27561 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27562         BOOT_JDK_FOUND=no
27563       else
27564         # Do we have a bin/javac?
27565         if test ! -x "$BOOT_JDK/bin/javac"; then
27566           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27568           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27569 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27570           BOOT_JDK_FOUND=no
27571         else
27572           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27573           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27574 
27575           # Extra M4 quote needed to protect [] in grep expression.
27576           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27577           if test "x$FOUND_CORRECT_VERSION" = x; then
27578             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27579 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27580             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27581 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27582             BOOT_JDK_FOUND=no
27583           else
27584             # We're done! :-)
27585             BOOT_JDK_FOUND=yes
27586 
27587   # Only process if variable expands to non-empty
27588 
27589   if test "x$BOOT_JDK" != x; then
27590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27591 
27592   # Input might be given as Windows format, start by converting to
27593   # unix format.
27594   path="$BOOT_JDK"
27595   new_path=`$CYGPATH -u "$path"`
27596 
27597   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27598   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27599   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27600   # "foo.exe" is OK but "foo" is an error.
27601   #
27602   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27603   # It is also a way to make sure we got the proper file name for the real test later on.
27604   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27605   if test "x$test_shortpath" = x; then
27606     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27607 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27608     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27609   fi
27610 
27611   # Call helper function which possibly converts this using DOS-style short mode.
27612   # If so, the updated path is stored in $new_path.
27613 
27614   input_path="$new_path"
27615   # Check if we need to convert this using DOS-style short mode. If the path
27616   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27617   # take no chances and rewrite it.
27618   # Note: m4 eats our [], so we need to use [ and ] instead.
27619   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27620   if test "x$has_forbidden_chars" != x; then
27621     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27622     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27623     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27624     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27625       # Going to short mode and back again did indeed matter. Since short mode is
27626       # case insensitive, let's make it lowercase to improve readability.
27627       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27628       # Now convert it back to Unix-style (cygpath)
27629       input_path=`$CYGPATH -u "$shortmode_path"`
27630       new_path="$input_path"
27631     fi
27632   fi
27633 
27634   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27635   if test "x$test_cygdrive_prefix" = x; then
27636     # As a simple fix, exclude /usr/bin since it's not a real path.
27637     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27638       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27639       # a path prefixed by /cygdrive for fixpath to work.
27640       new_path="$CYGWIN_ROOT_PATH$input_path"
27641     fi
27642   fi
27643 
27644 
27645   if test "x$path" != "x$new_path"; then
27646     BOOT_JDK="$new_path"
27647     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27648 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27649   fi
27650 
27651     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27652 
27653   path="$BOOT_JDK"
27654   has_colon=`$ECHO $path | $GREP ^.:`
27655   new_path="$path"
27656   if test "x$has_colon" = x; then
27657     # Not in mixed or Windows style, start by that.
27658     new_path=`cmd //c echo $path`
27659   fi
27660 
27661 
27662   input_path="$new_path"
27663   # Check if we need to convert this using DOS-style short mode. If the path
27664   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27665   # take no chances and rewrite it.
27666   # Note: m4 eats our [], so we need to use [ and ] instead.
27667   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27668   if test "x$has_forbidden_chars" != x; then
27669     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27670     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27671   fi
27672 
27673 
27674   windows_path="$new_path"
27675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27676     unix_path=`$CYGPATH -u "$windows_path"`
27677     new_path="$unix_path"
27678   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27679     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27680     new_path="$unix_path"
27681   fi
27682 
27683   if test "x$path" != "x$new_path"; then
27684     BOOT_JDK="$new_path"
27685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27687   fi
27688 
27689   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27690   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27691 
27692     else
27693       # We're on a unix platform. Hooray! :)
27694       path="$BOOT_JDK"
27695       has_space=`$ECHO "$path" | $GREP " "`
27696       if test "x$has_space" != x; then
27697         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27699         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27700       fi
27701 
27702       # Use eval to expand a potential ~
27703       eval path="$path"
27704       if test ! -f "$path" && test ! -d "$path"; then
27705         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27706       fi
27707 
27708       if test -d "$path"; then
27709         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27710       else
27711         dir="`$DIRNAME "$path"`"
27712         base="`$BASENAME "$path"`"
27713         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27714       fi
27715     fi
27716   fi
27717 
27718             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27719 $as_echo_n "checking for Boot JDK... " >&6; }
27720             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27721 $as_echo "$BOOT_JDK" >&6; }
27722             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27723 $as_echo_n "checking Boot JDK version... " >&6; }
27724             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27725             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27726 $as_echo "$BOOT_JDK_VERSION" >&6; }
27727           fi # end check jdk version
27728         fi # end check javac
27729       fi # end check java
27730     fi # end check boot jdk found
27731   fi
27732 
27733 
27734   if test "x$BOOT_JDK_FOUND" = xno; then
27735     # Now execute the test
27736 
27737   if test "x$PROGRAMW6432" != x; then
27738     VIRTUAL_DIR="$PROGRAMW6432/Java"
27739 
27740   windows_path="$VIRTUAL_DIR"
27741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27742     unix_path=`$CYGPATH -u "$windows_path"`
27743     VIRTUAL_DIR="$unix_path"
27744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27746     VIRTUAL_DIR="$unix_path"
27747   fi
27748 
27749 
27750   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27751   BOOT_JDK_SUFFIX=""
27752   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27753   if test "x$ALL_JDKS_FOUND" != x; then
27754     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27755 
27756   if test "x$BOOT_JDK_FOUND" = xno; then
27757     # Now execute the test
27758 
27759         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27760         if test -d "$BOOT_JDK"; then
27761           BOOT_JDK_FOUND=maybe
27762           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27763 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27764         fi
27765 
27766 
27767     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27768     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27769       # Do we have a bin/java?
27770       if test ! -x "$BOOT_JDK/bin/java"; then
27771         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27772 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27773         BOOT_JDK_FOUND=no
27774       else
27775         # Do we have a bin/javac?
27776         if test ! -x "$BOOT_JDK/bin/javac"; then
27777           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27778 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27779           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27780 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27781           BOOT_JDK_FOUND=no
27782         else
27783           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27784           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27785 
27786           # Extra M4 quote needed to protect [] in grep expression.
27787           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27788           if test "x$FOUND_CORRECT_VERSION" = x; then
27789             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27790 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27791             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27792 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27793             BOOT_JDK_FOUND=no
27794           else
27795             # We're done! :-)
27796             BOOT_JDK_FOUND=yes
27797 
27798   # Only process if variable expands to non-empty
27799 
27800   if test "x$BOOT_JDK" != x; then
27801     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27802 
27803   # Input might be given as Windows format, start by converting to
27804   # unix format.
27805   path="$BOOT_JDK"
27806   new_path=`$CYGPATH -u "$path"`
27807 
27808   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27809   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27810   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27811   # "foo.exe" is OK but "foo" is an error.
27812   #
27813   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27814   # It is also a way to make sure we got the proper file name for the real test later on.
27815   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27816   if test "x$test_shortpath" = x; then
27817     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27818 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27819     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27820   fi
27821 
27822   # Call helper function which possibly converts this using DOS-style short mode.
27823   # If so, the updated path is stored in $new_path.
27824 
27825   input_path="$new_path"
27826   # Check if we need to convert this using DOS-style short mode. If the path
27827   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27828   # take no chances and rewrite it.
27829   # Note: m4 eats our [], so we need to use [ and ] instead.
27830   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27831   if test "x$has_forbidden_chars" != x; then
27832     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27833     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27834     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27835     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27836       # Going to short mode and back again did indeed matter. Since short mode is
27837       # case insensitive, let's make it lowercase to improve readability.
27838       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27839       # Now convert it back to Unix-style (cygpath)
27840       input_path=`$CYGPATH -u "$shortmode_path"`
27841       new_path="$input_path"
27842     fi
27843   fi
27844 
27845   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27846   if test "x$test_cygdrive_prefix" = x; then
27847     # As a simple fix, exclude /usr/bin since it's not a real path.
27848     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27849       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27850       # a path prefixed by /cygdrive for fixpath to work.
27851       new_path="$CYGWIN_ROOT_PATH$input_path"
27852     fi
27853   fi
27854 
27855 
27856   if test "x$path" != "x$new_path"; then
27857     BOOT_JDK="$new_path"
27858     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27859 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27860   fi
27861 
27862     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27863 
27864   path="$BOOT_JDK"
27865   has_colon=`$ECHO $path | $GREP ^.:`
27866   new_path="$path"
27867   if test "x$has_colon" = x; then
27868     # Not in mixed or Windows style, start by that.
27869     new_path=`cmd //c echo $path`
27870   fi
27871 
27872 
27873   input_path="$new_path"
27874   # Check if we need to convert this using DOS-style short mode. If the path
27875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27876   # take no chances and rewrite it.
27877   # Note: m4 eats our [], so we need to use [ and ] instead.
27878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27879   if test "x$has_forbidden_chars" != x; then
27880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27881     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27882   fi
27883 
27884 
27885   windows_path="$new_path"
27886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27887     unix_path=`$CYGPATH -u "$windows_path"`
27888     new_path="$unix_path"
27889   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27890     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27891     new_path="$unix_path"
27892   fi
27893 
27894   if test "x$path" != "x$new_path"; then
27895     BOOT_JDK="$new_path"
27896     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27897 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27898   fi
27899 
27900   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27901   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27902 
27903     else
27904       # We're on a unix platform. Hooray! :)
27905       path="$BOOT_JDK"
27906       has_space=`$ECHO "$path" | $GREP " "`
27907       if test "x$has_space" != x; then
27908         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27909 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27910         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27911       fi
27912 
27913       # Use eval to expand a potential ~
27914       eval path="$path"
27915       if test ! -f "$path" && test ! -d "$path"; then
27916         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27917       fi
27918 
27919       if test -d "$path"; then
27920         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27921       else
27922         dir="`$DIRNAME "$path"`"
27923         base="`$BASENAME "$path"`"
27924         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27925       fi
27926     fi
27927   fi
27928 
27929             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27930 $as_echo_n "checking for Boot JDK... " >&6; }
27931             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27932 $as_echo "$BOOT_JDK" >&6; }
27933             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27934 $as_echo_n "checking Boot JDK version... " >&6; }
27935             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27936             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27937 $as_echo "$BOOT_JDK_VERSION" >&6; }
27938           fi # end check jdk version
27939         fi # end check javac
27940       fi # end check java
27941     fi # end check boot jdk found
27942   fi
27943 
27944     done
27945   fi
27946 
27947   fi
27948 
27949 
27950     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27951     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27952       # Do we have a bin/java?
27953       if test ! -x "$BOOT_JDK/bin/java"; then
27954         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27955 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27956         BOOT_JDK_FOUND=no
27957       else
27958         # Do we have a bin/javac?
27959         if test ! -x "$BOOT_JDK/bin/javac"; then
27960           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27961 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27962           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27963 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27964           BOOT_JDK_FOUND=no
27965         else
27966           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27967           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27968 
27969           # Extra M4 quote needed to protect [] in grep expression.
27970           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27971           if test "x$FOUND_CORRECT_VERSION" = x; then
27972             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27974             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27975 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27976             BOOT_JDK_FOUND=no
27977           else
27978             # We're done! :-)
27979             BOOT_JDK_FOUND=yes
27980 
27981   # Only process if variable expands to non-empty
27982 
27983   if test "x$BOOT_JDK" != x; then
27984     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27985 
27986   # Input might be given as Windows format, start by converting to
27987   # unix format.
27988   path="$BOOT_JDK"
27989   new_path=`$CYGPATH -u "$path"`
27990 
27991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27994   # "foo.exe" is OK but "foo" is an error.
27995   #
27996   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27997   # It is also a way to make sure we got the proper file name for the real test later on.
27998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27999   if test "x$test_shortpath" = x; then
28000     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28001 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28002     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28003   fi
28004 
28005   # Call helper function which possibly converts this using DOS-style short mode.
28006   # If so, the updated path is stored in $new_path.
28007 
28008   input_path="$new_path"
28009   # Check if we need to convert this using DOS-style short mode. If the path
28010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28011   # take no chances and rewrite it.
28012   # Note: m4 eats our [], so we need to use [ and ] instead.
28013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28014   if test "x$has_forbidden_chars" != x; then
28015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28016     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28017     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28018     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28019       # Going to short mode and back again did indeed matter. Since short mode is
28020       # case insensitive, let's make it lowercase to improve readability.
28021       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28022       # Now convert it back to Unix-style (cygpath)
28023       input_path=`$CYGPATH -u "$shortmode_path"`
28024       new_path="$input_path"
28025     fi
28026   fi
28027 
28028   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28029   if test "x$test_cygdrive_prefix" = x; then
28030     # As a simple fix, exclude /usr/bin since it's not a real path.
28031     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28032       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28033       # a path prefixed by /cygdrive for fixpath to work.
28034       new_path="$CYGWIN_ROOT_PATH$input_path"
28035     fi
28036   fi
28037 
28038 
28039   if test "x$path" != "x$new_path"; then
28040     BOOT_JDK="$new_path"
28041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28042 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28043   fi
28044 
28045     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28046 
28047   path="$BOOT_JDK"
28048   has_colon=`$ECHO $path | $GREP ^.:`
28049   new_path="$path"
28050   if test "x$has_colon" = x; then
28051     # Not in mixed or Windows style, start by that.
28052     new_path=`cmd //c echo $path`
28053   fi
28054 
28055 
28056   input_path="$new_path"
28057   # Check if we need to convert this using DOS-style short mode. If the path
28058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28059   # take no chances and rewrite it.
28060   # Note: m4 eats our [], so we need to use [ and ] instead.
28061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28062   if test "x$has_forbidden_chars" != x; then
28063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28064     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28065   fi
28066 
28067 
28068   windows_path="$new_path"
28069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28070     unix_path=`$CYGPATH -u "$windows_path"`
28071     new_path="$unix_path"
28072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28074     new_path="$unix_path"
28075   fi
28076 
28077   if test "x$path" != "x$new_path"; then
28078     BOOT_JDK="$new_path"
28079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28080 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28081   fi
28082 
28083   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28084   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28085 
28086     else
28087       # We're on a unix platform. Hooray! :)
28088       path="$BOOT_JDK"
28089       has_space=`$ECHO "$path" | $GREP " "`
28090       if test "x$has_space" != x; then
28091         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28092 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28093         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28094       fi
28095 
28096       # Use eval to expand a potential ~
28097       eval path="$path"
28098       if test ! -f "$path" && test ! -d "$path"; then
28099         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28100       fi
28101 
28102       if test -d "$path"; then
28103         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28104       else
28105         dir="`$DIRNAME "$path"`"
28106         base="`$BASENAME "$path"`"
28107         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28108       fi
28109     fi
28110   fi
28111 
28112             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28113 $as_echo_n "checking for Boot JDK... " >&6; }
28114             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28115 $as_echo "$BOOT_JDK" >&6; }
28116             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28117 $as_echo_n "checking Boot JDK version... " >&6; }
28118             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28119             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28120 $as_echo "$BOOT_JDK_VERSION" >&6; }
28121           fi # end check jdk version
28122         fi # end check javac
28123       fi # end check java
28124     fi # end check boot jdk found
28125   fi
28126 
28127 
28128   if test "x$BOOT_JDK_FOUND" = xno; then
28129     # Now execute the test
28130 
28131   if test "x$PROGRAMFILES" != x; then
28132     VIRTUAL_DIR="$PROGRAMFILES/Java"
28133 
28134   windows_path="$VIRTUAL_DIR"
28135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28136     unix_path=`$CYGPATH -u "$windows_path"`
28137     VIRTUAL_DIR="$unix_path"
28138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28140     VIRTUAL_DIR="$unix_path"
28141   fi
28142 
28143 
28144   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28145   BOOT_JDK_SUFFIX=""
28146   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28147   if test "x$ALL_JDKS_FOUND" != x; then
28148     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28149 
28150   if test "x$BOOT_JDK_FOUND" = xno; then
28151     # Now execute the test
28152 
28153         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28154         if test -d "$BOOT_JDK"; then
28155           BOOT_JDK_FOUND=maybe
28156           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28157 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28158         fi
28159 
28160 
28161     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28162     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28163       # Do we have a bin/java?
28164       if test ! -x "$BOOT_JDK/bin/java"; then
28165         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28166 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28167         BOOT_JDK_FOUND=no
28168       else
28169         # Do we have a bin/javac?
28170         if test ! -x "$BOOT_JDK/bin/javac"; then
28171           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28172 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28173           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28174 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28175           BOOT_JDK_FOUND=no
28176         else
28177           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28178           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28179 
28180           # Extra M4 quote needed to protect [] in grep expression.
28181           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28182           if test "x$FOUND_CORRECT_VERSION" = x; then
28183             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28184 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28185             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28186 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28187             BOOT_JDK_FOUND=no
28188           else
28189             # We're done! :-)
28190             BOOT_JDK_FOUND=yes
28191 
28192   # Only process if variable expands to non-empty
28193 
28194   if test "x$BOOT_JDK" != x; then
28195     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28196 
28197   # Input might be given as Windows format, start by converting to
28198   # unix format.
28199   path="$BOOT_JDK"
28200   new_path=`$CYGPATH -u "$path"`
28201 
28202   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28203   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28204   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28205   # "foo.exe" is OK but "foo" is an error.
28206   #
28207   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28208   # It is also a way to make sure we got the proper file name for the real test later on.
28209   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28210   if test "x$test_shortpath" = x; then
28211     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28212 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28213     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28214   fi
28215 
28216   # Call helper function which possibly converts this using DOS-style short mode.
28217   # If so, the updated path is stored in $new_path.
28218 
28219   input_path="$new_path"
28220   # Check if we need to convert this using DOS-style short mode. If the path
28221   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28222   # take no chances and rewrite it.
28223   # Note: m4 eats our [], so we need to use [ and ] instead.
28224   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28225   if test "x$has_forbidden_chars" != x; then
28226     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28227     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28228     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28229     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28230       # Going to short mode and back again did indeed matter. Since short mode is
28231       # case insensitive, let's make it lowercase to improve readability.
28232       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28233       # Now convert it back to Unix-style (cygpath)
28234       input_path=`$CYGPATH -u "$shortmode_path"`
28235       new_path="$input_path"
28236     fi
28237   fi
28238 
28239   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28240   if test "x$test_cygdrive_prefix" = x; then
28241     # As a simple fix, exclude /usr/bin since it's not a real path.
28242     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28243       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28244       # a path prefixed by /cygdrive for fixpath to work.
28245       new_path="$CYGWIN_ROOT_PATH$input_path"
28246     fi
28247   fi
28248 
28249 
28250   if test "x$path" != "x$new_path"; then
28251     BOOT_JDK="$new_path"
28252     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28253 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28254   fi
28255 
28256     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28257 
28258   path="$BOOT_JDK"
28259   has_colon=`$ECHO $path | $GREP ^.:`
28260   new_path="$path"
28261   if test "x$has_colon" = x; then
28262     # Not in mixed or Windows style, start by that.
28263     new_path=`cmd //c echo $path`
28264   fi
28265 
28266 
28267   input_path="$new_path"
28268   # Check if we need to convert this using DOS-style short mode. If the path
28269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28270   # take no chances and rewrite it.
28271   # Note: m4 eats our [], so we need to use [ and ] instead.
28272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28273   if test "x$has_forbidden_chars" != x; then
28274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28275     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28276   fi
28277 
28278 
28279   windows_path="$new_path"
28280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28281     unix_path=`$CYGPATH -u "$windows_path"`
28282     new_path="$unix_path"
28283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28284     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28285     new_path="$unix_path"
28286   fi
28287 
28288   if test "x$path" != "x$new_path"; then
28289     BOOT_JDK="$new_path"
28290     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28291 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28292   fi
28293 
28294   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28295   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28296 
28297     else
28298       # We're on a unix platform. Hooray! :)
28299       path="$BOOT_JDK"
28300       has_space=`$ECHO "$path" | $GREP " "`
28301       if test "x$has_space" != x; then
28302         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28303 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28304         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28305       fi
28306 
28307       # Use eval to expand a potential ~
28308       eval path="$path"
28309       if test ! -f "$path" && test ! -d "$path"; then
28310         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28311       fi
28312 
28313       if test -d "$path"; then
28314         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28315       else
28316         dir="`$DIRNAME "$path"`"
28317         base="`$BASENAME "$path"`"
28318         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28319       fi
28320     fi
28321   fi
28322 
28323             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28324 $as_echo_n "checking for Boot JDK... " >&6; }
28325             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28326 $as_echo "$BOOT_JDK" >&6; }
28327             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28328 $as_echo_n "checking Boot JDK version... " >&6; }
28329             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28330             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28331 $as_echo "$BOOT_JDK_VERSION" >&6; }
28332           fi # end check jdk version
28333         fi # end check javac
28334       fi # end check java
28335     fi # end check boot jdk found
28336   fi
28337 
28338     done
28339   fi
28340 
28341   fi
28342 
28343 
28344     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28345     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28346       # Do we have a bin/java?
28347       if test ! -x "$BOOT_JDK/bin/java"; then
28348         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28349 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28350         BOOT_JDK_FOUND=no
28351       else
28352         # Do we have a bin/javac?
28353         if test ! -x "$BOOT_JDK/bin/javac"; then
28354           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28355 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28356           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28357 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28358           BOOT_JDK_FOUND=no
28359         else
28360           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28361           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28362 
28363           # Extra M4 quote needed to protect [] in grep expression.
28364           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28365           if test "x$FOUND_CORRECT_VERSION" = x; then
28366             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28367 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28368             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28369 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28370             BOOT_JDK_FOUND=no
28371           else
28372             # We're done! :-)
28373             BOOT_JDK_FOUND=yes
28374 
28375   # Only process if variable expands to non-empty
28376 
28377   if test "x$BOOT_JDK" != x; then
28378     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28379 
28380   # Input might be given as Windows format, start by converting to
28381   # unix format.
28382   path="$BOOT_JDK"
28383   new_path=`$CYGPATH -u "$path"`
28384 
28385   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28386   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28387   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28388   # "foo.exe" is OK but "foo" is an error.
28389   #
28390   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28391   # It is also a way to make sure we got the proper file name for the real test later on.
28392   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28393   if test "x$test_shortpath" = x; then
28394     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28395 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28396     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28397   fi
28398 
28399   # Call helper function which possibly converts this using DOS-style short mode.
28400   # If so, the updated path is stored in $new_path.
28401 
28402   input_path="$new_path"
28403   # Check if we need to convert this using DOS-style short mode. If the path
28404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28405   # take no chances and rewrite it.
28406   # Note: m4 eats our [], so we need to use [ and ] instead.
28407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28408   if test "x$has_forbidden_chars" != x; then
28409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28413       # Going to short mode and back again did indeed matter. Since short mode is
28414       # case insensitive, let's make it lowercase to improve readability.
28415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28416       # Now convert it back to Unix-style (cygpath)
28417       input_path=`$CYGPATH -u "$shortmode_path"`
28418       new_path="$input_path"
28419     fi
28420   fi
28421 
28422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28423   if test "x$test_cygdrive_prefix" = x; then
28424     # As a simple fix, exclude /usr/bin since it's not a real path.
28425     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28427       # a path prefixed by /cygdrive for fixpath to work.
28428       new_path="$CYGWIN_ROOT_PATH$input_path"
28429     fi
28430   fi
28431 
28432 
28433   if test "x$path" != "x$new_path"; then
28434     BOOT_JDK="$new_path"
28435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28436 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28437   fi
28438 
28439     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28440 
28441   path="$BOOT_JDK"
28442   has_colon=`$ECHO $path | $GREP ^.:`
28443   new_path="$path"
28444   if test "x$has_colon" = x; then
28445     # Not in mixed or Windows style, start by that.
28446     new_path=`cmd //c echo $path`
28447   fi
28448 
28449 
28450   input_path="$new_path"
28451   # Check if we need to convert this using DOS-style short mode. If the path
28452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28453   # take no chances and rewrite it.
28454   # Note: m4 eats our [], so we need to use [ and ] instead.
28455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28456   if test "x$has_forbidden_chars" != x; then
28457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28459   fi
28460 
28461 
28462   windows_path="$new_path"
28463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28464     unix_path=`$CYGPATH -u "$windows_path"`
28465     new_path="$unix_path"
28466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28468     new_path="$unix_path"
28469   fi
28470 
28471   if test "x$path" != "x$new_path"; then
28472     BOOT_JDK="$new_path"
28473     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28474 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28475   fi
28476 
28477   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28478   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28479 
28480     else
28481       # We're on a unix platform. Hooray! :)
28482       path="$BOOT_JDK"
28483       has_space=`$ECHO "$path" | $GREP " "`
28484       if test "x$has_space" != x; then
28485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28486 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28487         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28488       fi
28489 
28490       # Use eval to expand a potential ~
28491       eval path="$path"
28492       if test ! -f "$path" && test ! -d "$path"; then
28493         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28494       fi
28495 
28496       if test -d "$path"; then
28497         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28498       else
28499         dir="`$DIRNAME "$path"`"
28500         base="`$BASENAME "$path"`"
28501         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28502       fi
28503     fi
28504   fi
28505 
28506             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28507 $as_echo_n "checking for Boot JDK... " >&6; }
28508             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28509 $as_echo "$BOOT_JDK" >&6; }
28510             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28511 $as_echo_n "checking Boot JDK version... " >&6; }
28512             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28513             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28514 $as_echo "$BOOT_JDK_VERSION" >&6; }
28515           fi # end check jdk version
28516         fi # end check javac
28517       fi # end check java
28518     fi # end check boot jdk found
28519   fi
28520 
28521 
28522   if test "x$BOOT_JDK_FOUND" = xno; then
28523     # Now execute the test
28524 
28525   if test "x$ProgramFiles" != x; then
28526     VIRTUAL_DIR="$ProgramFiles/Java"
28527 
28528   windows_path="$VIRTUAL_DIR"
28529   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28530     unix_path=`$CYGPATH -u "$windows_path"`
28531     VIRTUAL_DIR="$unix_path"
28532   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28533     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28534     VIRTUAL_DIR="$unix_path"
28535   fi
28536 
28537 
28538   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28539   BOOT_JDK_SUFFIX=""
28540   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28541   if test "x$ALL_JDKS_FOUND" != x; then
28542     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28543 
28544   if test "x$BOOT_JDK_FOUND" = xno; then
28545     # Now execute the test
28546 
28547         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28548         if test -d "$BOOT_JDK"; then
28549           BOOT_JDK_FOUND=maybe
28550           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28551 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28552         fi
28553 
28554 
28555     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28556     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28557       # Do we have a bin/java?
28558       if test ! -x "$BOOT_JDK/bin/java"; then
28559         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28560 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28561         BOOT_JDK_FOUND=no
28562       else
28563         # Do we have a bin/javac?
28564         if test ! -x "$BOOT_JDK/bin/javac"; then
28565           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28566 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28567           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28568 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28569           BOOT_JDK_FOUND=no
28570         else
28571           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28572           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28573 
28574           # Extra M4 quote needed to protect [] in grep expression.
28575           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28576           if test "x$FOUND_CORRECT_VERSION" = x; then
28577             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28578 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28579             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28580 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28581             BOOT_JDK_FOUND=no
28582           else
28583             # We're done! :-)
28584             BOOT_JDK_FOUND=yes
28585 
28586   # Only process if variable expands to non-empty
28587 
28588   if test "x$BOOT_JDK" != x; then
28589     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28590 
28591   # Input might be given as Windows format, start by converting to
28592   # unix format.
28593   path="$BOOT_JDK"
28594   new_path=`$CYGPATH -u "$path"`
28595 
28596   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28597   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28598   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28599   # "foo.exe" is OK but "foo" is an error.
28600   #
28601   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28602   # It is also a way to make sure we got the proper file name for the real test later on.
28603   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28604   if test "x$test_shortpath" = x; then
28605     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28606 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28607     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28608   fi
28609 
28610   # Call helper function which possibly converts this using DOS-style short mode.
28611   # If so, the updated path is stored in $new_path.
28612 
28613   input_path="$new_path"
28614   # Check if we need to convert this using DOS-style short mode. If the path
28615   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28616   # take no chances and rewrite it.
28617   # Note: m4 eats our [], so we need to use [ and ] instead.
28618   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28619   if test "x$has_forbidden_chars" != x; then
28620     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28621     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28622     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28623     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28624       # Going to short mode and back again did indeed matter. Since short mode is
28625       # case insensitive, let's make it lowercase to improve readability.
28626       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28627       # Now convert it back to Unix-style (cygpath)
28628       input_path=`$CYGPATH -u "$shortmode_path"`
28629       new_path="$input_path"
28630     fi
28631   fi
28632 
28633   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28634   if test "x$test_cygdrive_prefix" = x; then
28635     # As a simple fix, exclude /usr/bin since it's not a real path.
28636     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28637       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28638       # a path prefixed by /cygdrive for fixpath to work.
28639       new_path="$CYGWIN_ROOT_PATH$input_path"
28640     fi
28641   fi
28642 
28643 
28644   if test "x$path" != "x$new_path"; then
28645     BOOT_JDK="$new_path"
28646     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28647 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28648   fi
28649 
28650     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28651 
28652   path="$BOOT_JDK"
28653   has_colon=`$ECHO $path | $GREP ^.:`
28654   new_path="$path"
28655   if test "x$has_colon" = x; then
28656     # Not in mixed or Windows style, start by that.
28657     new_path=`cmd //c echo $path`
28658   fi
28659 
28660 
28661   input_path="$new_path"
28662   # Check if we need to convert this using DOS-style short mode. If the path
28663   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28664   # take no chances and rewrite it.
28665   # Note: m4 eats our [], so we need to use [ and ] instead.
28666   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28667   if test "x$has_forbidden_chars" != x; then
28668     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28669     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28670   fi
28671 
28672 
28673   windows_path="$new_path"
28674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28675     unix_path=`$CYGPATH -u "$windows_path"`
28676     new_path="$unix_path"
28677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28679     new_path="$unix_path"
28680   fi
28681 
28682   if test "x$path" != "x$new_path"; then
28683     BOOT_JDK="$new_path"
28684     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28685 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28686   fi
28687 
28688   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28689   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28690 
28691     else
28692       # We're on a unix platform. Hooray! :)
28693       path="$BOOT_JDK"
28694       has_space=`$ECHO "$path" | $GREP " "`
28695       if test "x$has_space" != x; then
28696         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28697 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28698         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28699       fi
28700 
28701       # Use eval to expand a potential ~
28702       eval path="$path"
28703       if test ! -f "$path" && test ! -d "$path"; then
28704         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28705       fi
28706 
28707       if test -d "$path"; then
28708         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28709       else
28710         dir="`$DIRNAME "$path"`"
28711         base="`$BASENAME "$path"`"
28712         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28713       fi
28714     fi
28715   fi
28716 
28717             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28718 $as_echo_n "checking for Boot JDK... " >&6; }
28719             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28720 $as_echo "$BOOT_JDK" >&6; }
28721             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28722 $as_echo_n "checking Boot JDK version... " >&6; }
28723             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28724             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28725 $as_echo "$BOOT_JDK_VERSION" >&6; }
28726           fi # end check jdk version
28727         fi # end check javac
28728       fi # end check java
28729     fi # end check boot jdk found
28730   fi
28731 
28732     done
28733   fi
28734 
28735   fi
28736 
28737 
28738     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28739     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28740       # Do we have a bin/java?
28741       if test ! -x "$BOOT_JDK/bin/java"; then
28742         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28743 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28744         BOOT_JDK_FOUND=no
28745       else
28746         # Do we have a bin/javac?
28747         if test ! -x "$BOOT_JDK/bin/javac"; then
28748           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28749 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28750           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28751 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28752           BOOT_JDK_FOUND=no
28753         else
28754           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28755           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28756 
28757           # Extra M4 quote needed to protect [] in grep expression.
28758           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28759           if test "x$FOUND_CORRECT_VERSION" = x; then
28760             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28761 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28762             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28763 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28764             BOOT_JDK_FOUND=no
28765           else
28766             # We're done! :-)
28767             BOOT_JDK_FOUND=yes
28768 
28769   # Only process if variable expands to non-empty
28770 
28771   if test "x$BOOT_JDK" != x; then
28772     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28773 
28774   # Input might be given as Windows format, start by converting to
28775   # unix format.
28776   path="$BOOT_JDK"
28777   new_path=`$CYGPATH -u "$path"`
28778 
28779   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28780   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28781   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28782   # "foo.exe" is OK but "foo" is an error.
28783   #
28784   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28785   # It is also a way to make sure we got the proper file name for the real test later on.
28786   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28787   if test "x$test_shortpath" = x; then
28788     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28789 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28790     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28791   fi
28792 
28793   # Call helper function which possibly converts this using DOS-style short mode.
28794   # If so, the updated path is stored in $new_path.
28795 
28796   input_path="$new_path"
28797   # Check if we need to convert this using DOS-style short mode. If the path
28798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28799   # take no chances and rewrite it.
28800   # Note: m4 eats our [], so we need to use [ and ] instead.
28801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28802   if test "x$has_forbidden_chars" != x; then
28803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28804     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28805     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28806     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28807       # Going to short mode and back again did indeed matter. Since short mode is
28808       # case insensitive, let's make it lowercase to improve readability.
28809       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28810       # Now convert it back to Unix-style (cygpath)
28811       input_path=`$CYGPATH -u "$shortmode_path"`
28812       new_path="$input_path"
28813     fi
28814   fi
28815 
28816   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28817   if test "x$test_cygdrive_prefix" = x; then
28818     # As a simple fix, exclude /usr/bin since it's not a real path.
28819     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28820       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28821       # a path prefixed by /cygdrive for fixpath to work.
28822       new_path="$CYGWIN_ROOT_PATH$input_path"
28823     fi
28824   fi
28825 
28826 
28827   if test "x$path" != "x$new_path"; then
28828     BOOT_JDK="$new_path"
28829     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28830 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28831   fi
28832 
28833     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28834 
28835   path="$BOOT_JDK"
28836   has_colon=`$ECHO $path | $GREP ^.:`
28837   new_path="$path"
28838   if test "x$has_colon" = x; then
28839     # Not in mixed or Windows style, start by that.
28840     new_path=`cmd //c echo $path`
28841   fi
28842 
28843 
28844   input_path="$new_path"
28845   # Check if we need to convert this using DOS-style short mode. If the path
28846   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28847   # take no chances and rewrite it.
28848   # Note: m4 eats our [], so we need to use [ and ] instead.
28849   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28850   if test "x$has_forbidden_chars" != x; then
28851     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28852     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28853   fi
28854 
28855 
28856   windows_path="$new_path"
28857   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28858     unix_path=`$CYGPATH -u "$windows_path"`
28859     new_path="$unix_path"
28860   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28861     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28862     new_path="$unix_path"
28863   fi
28864 
28865   if test "x$path" != "x$new_path"; then
28866     BOOT_JDK="$new_path"
28867     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28868 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28869   fi
28870 
28871   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28872   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28873 
28874     else
28875       # We're on a unix platform. Hooray! :)
28876       path="$BOOT_JDK"
28877       has_space=`$ECHO "$path" | $GREP " "`
28878       if test "x$has_space" != x; then
28879         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28880 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28881         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28882       fi
28883 
28884       # Use eval to expand a potential ~
28885       eval path="$path"
28886       if test ! -f "$path" && test ! -d "$path"; then
28887         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28888       fi
28889 
28890       if test -d "$path"; then
28891         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28892       else
28893         dir="`$DIRNAME "$path"`"
28894         base="`$BASENAME "$path"`"
28895         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28896       fi
28897     fi
28898   fi
28899 
28900             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28901 $as_echo_n "checking for Boot JDK... " >&6; }
28902             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28903 $as_echo "$BOOT_JDK" >&6; }
28904             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28905 $as_echo_n "checking Boot JDK version... " >&6; }
28906             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28907             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28908 $as_echo "$BOOT_JDK_VERSION" >&6; }
28909           fi # end check jdk version
28910         fi # end check javac
28911       fi # end check java
28912     fi # end check boot jdk found
28913   fi
28914 
28915 
28916   if test "x$BOOT_JDK_FOUND" = xno; then
28917     # Now execute the test
28918 
28919   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28920   BOOT_JDK_SUFFIX=""
28921   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28922   if test "x$ALL_JDKS_FOUND" != x; then
28923     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28924 
28925   if test "x$BOOT_JDK_FOUND" = xno; then
28926     # Now execute the test
28927 
28928         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28929         if test -d "$BOOT_JDK"; then
28930           BOOT_JDK_FOUND=maybe
28931           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28932 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28933         fi
28934 
28935 
28936     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28937     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28938       # Do we have a bin/java?
28939       if test ! -x "$BOOT_JDK/bin/java"; then
28940         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28941 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28942         BOOT_JDK_FOUND=no
28943       else
28944         # Do we have a bin/javac?
28945         if test ! -x "$BOOT_JDK/bin/javac"; then
28946           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28947 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28948           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28949 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28950           BOOT_JDK_FOUND=no
28951         else
28952           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28953           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28954 
28955           # Extra M4 quote needed to protect [] in grep expression.
28956           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28957           if test "x$FOUND_CORRECT_VERSION" = x; then
28958             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28959 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28960             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28961 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28962             BOOT_JDK_FOUND=no
28963           else
28964             # We're done! :-)
28965             BOOT_JDK_FOUND=yes
28966 
28967   # Only process if variable expands to non-empty
28968 
28969   if test "x$BOOT_JDK" != x; then
28970     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28971 
28972   # Input might be given as Windows format, start by converting to
28973   # unix format.
28974   path="$BOOT_JDK"
28975   new_path=`$CYGPATH -u "$path"`
28976 
28977   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28978   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28979   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28980   # "foo.exe" is OK but "foo" is an error.
28981   #
28982   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28983   # It is also a way to make sure we got the proper file name for the real test later on.
28984   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28985   if test "x$test_shortpath" = x; then
28986     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28987 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28988     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28989   fi
28990 
28991   # Call helper function which possibly converts this using DOS-style short mode.
28992   # If so, the updated path is stored in $new_path.
28993 
28994   input_path="$new_path"
28995   # Check if we need to convert this using DOS-style short mode. If the path
28996   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28997   # take no chances and rewrite it.
28998   # Note: m4 eats our [], so we need to use [ and ] instead.
28999   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29000   if test "x$has_forbidden_chars" != x; then
29001     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29002     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29003     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29004     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29005       # Going to short mode and back again did indeed matter. Since short mode is
29006       # case insensitive, let's make it lowercase to improve readability.
29007       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29008       # Now convert it back to Unix-style (cygpath)
29009       input_path=`$CYGPATH -u "$shortmode_path"`
29010       new_path="$input_path"
29011     fi
29012   fi
29013 
29014   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29015   if test "x$test_cygdrive_prefix" = x; then
29016     # As a simple fix, exclude /usr/bin since it's not a real path.
29017     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29018       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29019       # a path prefixed by /cygdrive for fixpath to work.
29020       new_path="$CYGWIN_ROOT_PATH$input_path"
29021     fi
29022   fi
29023 
29024 
29025   if test "x$path" != "x$new_path"; then
29026     BOOT_JDK="$new_path"
29027     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29028 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29029   fi
29030 
29031     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29032 
29033   path="$BOOT_JDK"
29034   has_colon=`$ECHO $path | $GREP ^.:`
29035   new_path="$path"
29036   if test "x$has_colon" = x; then
29037     # Not in mixed or Windows style, start by that.
29038     new_path=`cmd //c echo $path`
29039   fi
29040 
29041 
29042   input_path="$new_path"
29043   # Check if we need to convert this using DOS-style short mode. If the path
29044   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29045   # take no chances and rewrite it.
29046   # Note: m4 eats our [], so we need to use [ and ] instead.
29047   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29048   if test "x$has_forbidden_chars" != x; then
29049     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29050     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29051   fi
29052 
29053 
29054   windows_path="$new_path"
29055   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29056     unix_path=`$CYGPATH -u "$windows_path"`
29057     new_path="$unix_path"
29058   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29059     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29060     new_path="$unix_path"
29061   fi
29062 
29063   if test "x$path" != "x$new_path"; then
29064     BOOT_JDK="$new_path"
29065     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29066 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29067   fi
29068 
29069   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29070   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29071 
29072     else
29073       # We're on a unix platform. Hooray! :)
29074       path="$BOOT_JDK"
29075       has_space=`$ECHO "$path" | $GREP " "`
29076       if test "x$has_space" != x; then
29077         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29078 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29079         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29080       fi
29081 
29082       # Use eval to expand a potential ~
29083       eval path="$path"
29084       if test ! -f "$path" && test ! -d "$path"; then
29085         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29086       fi
29087 
29088       if test -d "$path"; then
29089         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29090       else
29091         dir="`$DIRNAME "$path"`"
29092         base="`$BASENAME "$path"`"
29093         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29094       fi
29095     fi
29096   fi
29097 
29098             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29099 $as_echo_n "checking for Boot JDK... " >&6; }
29100             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29101 $as_echo "$BOOT_JDK" >&6; }
29102             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29103 $as_echo_n "checking Boot JDK version... " >&6; }
29104             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29105             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29106 $as_echo "$BOOT_JDK_VERSION" >&6; }
29107           fi # end check jdk version
29108         fi # end check javac
29109       fi # end check java
29110     fi # end check boot jdk found
29111   fi
29112 
29113     done
29114   fi
29115 
29116 
29117     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29118     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29119       # Do we have a bin/java?
29120       if test ! -x "$BOOT_JDK/bin/java"; then
29121         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29122 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29123         BOOT_JDK_FOUND=no
29124       else
29125         # Do we have a bin/javac?
29126         if test ! -x "$BOOT_JDK/bin/javac"; then
29127           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29128 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29129           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29130 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29131           BOOT_JDK_FOUND=no
29132         else
29133           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29134           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29135 
29136           # Extra M4 quote needed to protect [] in grep expression.
29137           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29138           if test "x$FOUND_CORRECT_VERSION" = x; then
29139             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29140 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29141             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29142 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29143             BOOT_JDK_FOUND=no
29144           else
29145             # We're done! :-)
29146             BOOT_JDK_FOUND=yes
29147 
29148   # Only process if variable expands to non-empty
29149 
29150   if test "x$BOOT_JDK" != x; then
29151     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29152 
29153   # Input might be given as Windows format, start by converting to
29154   # unix format.
29155   path="$BOOT_JDK"
29156   new_path=`$CYGPATH -u "$path"`
29157 
29158   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29159   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29160   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29161   # "foo.exe" is OK but "foo" is an error.
29162   #
29163   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29164   # It is also a way to make sure we got the proper file name for the real test later on.
29165   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29166   if test "x$test_shortpath" = x; then
29167     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29168 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29169     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29170   fi
29171 
29172   # Call helper function which possibly converts this using DOS-style short mode.
29173   # If so, the updated path is stored in $new_path.
29174 
29175   input_path="$new_path"
29176   # Check if we need to convert this using DOS-style short mode. If the path
29177   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29178   # take no chances and rewrite it.
29179   # Note: m4 eats our [], so we need to use [ and ] instead.
29180   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29181   if test "x$has_forbidden_chars" != x; then
29182     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29183     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29184     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29185     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29186       # Going to short mode and back again did indeed matter. Since short mode is
29187       # case insensitive, let's make it lowercase to improve readability.
29188       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29189       # Now convert it back to Unix-style (cygpath)
29190       input_path=`$CYGPATH -u "$shortmode_path"`
29191       new_path="$input_path"
29192     fi
29193   fi
29194 
29195   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29196   if test "x$test_cygdrive_prefix" = x; then
29197     # As a simple fix, exclude /usr/bin since it's not a real path.
29198     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29199       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29200       # a path prefixed by /cygdrive for fixpath to work.
29201       new_path="$CYGWIN_ROOT_PATH$input_path"
29202     fi
29203   fi
29204 
29205 
29206   if test "x$path" != "x$new_path"; then
29207     BOOT_JDK="$new_path"
29208     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29209 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29210   fi
29211 
29212     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29213 
29214   path="$BOOT_JDK"
29215   has_colon=`$ECHO $path | $GREP ^.:`
29216   new_path="$path"
29217   if test "x$has_colon" = x; then
29218     # Not in mixed or Windows style, start by that.
29219     new_path=`cmd //c echo $path`
29220   fi
29221 
29222 
29223   input_path="$new_path"
29224   # Check if we need to convert this using DOS-style short mode. If the path
29225   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29226   # take no chances and rewrite it.
29227   # Note: m4 eats our [], so we need to use [ and ] instead.
29228   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29229   if test "x$has_forbidden_chars" != x; then
29230     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29231     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29232   fi
29233 
29234 
29235   windows_path="$new_path"
29236   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29237     unix_path=`$CYGPATH -u "$windows_path"`
29238     new_path="$unix_path"
29239   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29240     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29241     new_path="$unix_path"
29242   fi
29243 
29244   if test "x$path" != "x$new_path"; then
29245     BOOT_JDK="$new_path"
29246     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29247 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29248   fi
29249 
29250   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29251   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29252 
29253     else
29254       # We're on a unix platform. Hooray! :)
29255       path="$BOOT_JDK"
29256       has_space=`$ECHO "$path" | $GREP " "`
29257       if test "x$has_space" != x; then
29258         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29259 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29260         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29261       fi
29262 
29263       # Use eval to expand a potential ~
29264       eval path="$path"
29265       if test ! -f "$path" && test ! -d "$path"; then
29266         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29267       fi
29268 
29269       if test -d "$path"; then
29270         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29271       else
29272         dir="`$DIRNAME "$path"`"
29273         base="`$BASENAME "$path"`"
29274         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29275       fi
29276     fi
29277   fi
29278 
29279             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29280 $as_echo_n "checking for Boot JDK... " >&6; }
29281             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29282 $as_echo "$BOOT_JDK" >&6; }
29283             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29284 $as_echo_n "checking Boot JDK version... " >&6; }
29285             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29286             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29287 $as_echo "$BOOT_JDK_VERSION" >&6; }
29288           fi # end check jdk version
29289         fi # end check javac
29290       fi # end check java
29291     fi # end check boot jdk found
29292   fi
29293 
29294   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29295 
29296   if test "x$BOOT_JDK_FOUND" = xno; then
29297     # Now execute the test
29298 
29299   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29300   BOOT_JDK_SUFFIX="/Contents/Home"
29301   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29302   if test "x$ALL_JDKS_FOUND" != x; then
29303     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29304 
29305   if test "x$BOOT_JDK_FOUND" = xno; then
29306     # Now execute the test
29307 
29308         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29309         if test -d "$BOOT_JDK"; then
29310           BOOT_JDK_FOUND=maybe
29311           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29312 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29313         fi
29314 
29315 
29316     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29317     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29318       # Do we have a bin/java?
29319       if test ! -x "$BOOT_JDK/bin/java"; then
29320         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29321 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29322         BOOT_JDK_FOUND=no
29323       else
29324         # Do we have a bin/javac?
29325         if test ! -x "$BOOT_JDK/bin/javac"; then
29326           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29327 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29328           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29329 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29330           BOOT_JDK_FOUND=no
29331         else
29332           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29333           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29334 
29335           # Extra M4 quote needed to protect [] in grep expression.
29336           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29337           if test "x$FOUND_CORRECT_VERSION" = x; then
29338             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29339 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29340             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29341 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29342             BOOT_JDK_FOUND=no
29343           else
29344             # We're done! :-)
29345             BOOT_JDK_FOUND=yes
29346 
29347   # Only process if variable expands to non-empty
29348 
29349   if test "x$BOOT_JDK" != x; then
29350     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29351 
29352   # Input might be given as Windows format, start by converting to
29353   # unix format.
29354   path="$BOOT_JDK"
29355   new_path=`$CYGPATH -u "$path"`
29356 
29357   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29358   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29359   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29360   # "foo.exe" is OK but "foo" is an error.
29361   #
29362   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29363   # It is also a way to make sure we got the proper file name for the real test later on.
29364   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29365   if test "x$test_shortpath" = x; then
29366     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29367 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29368     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29369   fi
29370 
29371   # Call helper function which possibly converts this using DOS-style short mode.
29372   # If so, the updated path is stored in $new_path.
29373 
29374   input_path="$new_path"
29375   # Check if we need to convert this using DOS-style short mode. If the path
29376   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29377   # take no chances and rewrite it.
29378   # Note: m4 eats our [], so we need to use [ and ] instead.
29379   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29380   if test "x$has_forbidden_chars" != x; then
29381     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29382     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29383     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29384     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29385       # Going to short mode and back again did indeed matter. Since short mode is
29386       # case insensitive, let's make it lowercase to improve readability.
29387       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29388       # Now convert it back to Unix-style (cygpath)
29389       input_path=`$CYGPATH -u "$shortmode_path"`
29390       new_path="$input_path"
29391     fi
29392   fi
29393 
29394   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29395   if test "x$test_cygdrive_prefix" = x; then
29396     # As a simple fix, exclude /usr/bin since it's not a real path.
29397     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29398       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29399       # a path prefixed by /cygdrive for fixpath to work.
29400       new_path="$CYGWIN_ROOT_PATH$input_path"
29401     fi
29402   fi
29403 
29404 
29405   if test "x$path" != "x$new_path"; then
29406     BOOT_JDK="$new_path"
29407     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29408 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29409   fi
29410 
29411     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29412 
29413   path="$BOOT_JDK"
29414   has_colon=`$ECHO $path | $GREP ^.:`
29415   new_path="$path"
29416   if test "x$has_colon" = x; then
29417     # Not in mixed or Windows style, start by that.
29418     new_path=`cmd //c echo $path`
29419   fi
29420 
29421 
29422   input_path="$new_path"
29423   # Check if we need to convert this using DOS-style short mode. If the path
29424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29425   # take no chances and rewrite it.
29426   # Note: m4 eats our [], so we need to use [ and ] instead.
29427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29428   if test "x$has_forbidden_chars" != x; then
29429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29431   fi
29432 
29433 
29434   windows_path="$new_path"
29435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29436     unix_path=`$CYGPATH -u "$windows_path"`
29437     new_path="$unix_path"
29438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29439     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29440     new_path="$unix_path"
29441   fi
29442 
29443   if test "x$path" != "x$new_path"; then
29444     BOOT_JDK="$new_path"
29445     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29446 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29447   fi
29448 
29449   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29450   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29451 
29452     else
29453       # We're on a unix platform. Hooray! :)
29454       path="$BOOT_JDK"
29455       has_space=`$ECHO "$path" | $GREP " "`
29456       if test "x$has_space" != x; then
29457         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29458 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29459         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29460       fi
29461 
29462       # Use eval to expand a potential ~
29463       eval path="$path"
29464       if test ! -f "$path" && test ! -d "$path"; then
29465         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29466       fi
29467 
29468       if test -d "$path"; then
29469         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29470       else
29471         dir="`$DIRNAME "$path"`"
29472         base="`$BASENAME "$path"`"
29473         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29474       fi
29475     fi
29476   fi
29477 
29478             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29479 $as_echo_n "checking for Boot JDK... " >&6; }
29480             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29481 $as_echo "$BOOT_JDK" >&6; }
29482             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29483 $as_echo_n "checking Boot JDK version... " >&6; }
29484             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29485             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29486 $as_echo "$BOOT_JDK_VERSION" >&6; }
29487           fi # end check jdk version
29488         fi # end check javac
29489       fi # end check java
29490     fi # end check boot jdk found
29491   fi
29492 
29493     done
29494   fi
29495 
29496 
29497     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29498     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29499       # Do we have a bin/java?
29500       if test ! -x "$BOOT_JDK/bin/java"; then
29501         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29502 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29503         BOOT_JDK_FOUND=no
29504       else
29505         # Do we have a bin/javac?
29506         if test ! -x "$BOOT_JDK/bin/javac"; then
29507           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29508 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29509           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29510 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29511           BOOT_JDK_FOUND=no
29512         else
29513           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29514           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29515 
29516           # Extra M4 quote needed to protect [] in grep expression.
29517           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29518           if test "x$FOUND_CORRECT_VERSION" = x; then
29519             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29520 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29521             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29522 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29523             BOOT_JDK_FOUND=no
29524           else
29525             # We're done! :-)
29526             BOOT_JDK_FOUND=yes
29527 
29528   # Only process if variable expands to non-empty
29529 
29530   if test "x$BOOT_JDK" != x; then
29531     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29532 
29533   # Input might be given as Windows format, start by converting to
29534   # unix format.
29535   path="$BOOT_JDK"
29536   new_path=`$CYGPATH -u "$path"`
29537 
29538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29541   # "foo.exe" is OK but "foo" is an error.
29542   #
29543   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29544   # It is also a way to make sure we got the proper file name for the real test later on.
29545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29546   if test "x$test_shortpath" = x; then
29547     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29548 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29549     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29550   fi
29551 
29552   # Call helper function which possibly converts this using DOS-style short mode.
29553   # If so, the updated path is stored in $new_path.
29554 
29555   input_path="$new_path"
29556   # Check if we need to convert this using DOS-style short mode. If the path
29557   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29558   # take no chances and rewrite it.
29559   # Note: m4 eats our [], so we need to use [ and ] instead.
29560   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29561   if test "x$has_forbidden_chars" != x; then
29562     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29563     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29564     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29565     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29566       # Going to short mode and back again did indeed matter. Since short mode is
29567       # case insensitive, let's make it lowercase to improve readability.
29568       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29569       # Now convert it back to Unix-style (cygpath)
29570       input_path=`$CYGPATH -u "$shortmode_path"`
29571       new_path="$input_path"
29572     fi
29573   fi
29574 
29575   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29576   if test "x$test_cygdrive_prefix" = x; then
29577     # As a simple fix, exclude /usr/bin since it's not a real path.
29578     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29579       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29580       # a path prefixed by /cygdrive for fixpath to work.
29581       new_path="$CYGWIN_ROOT_PATH$input_path"
29582     fi
29583   fi
29584 
29585 
29586   if test "x$path" != "x$new_path"; then
29587     BOOT_JDK="$new_path"
29588     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29589 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29590   fi
29591 
29592     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29593 
29594   path="$BOOT_JDK"
29595   has_colon=`$ECHO $path | $GREP ^.:`
29596   new_path="$path"
29597   if test "x$has_colon" = x; then
29598     # Not in mixed or Windows style, start by that.
29599     new_path=`cmd //c echo $path`
29600   fi
29601 
29602 
29603   input_path="$new_path"
29604   # Check if we need to convert this using DOS-style short mode. If the path
29605   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29606   # take no chances and rewrite it.
29607   # Note: m4 eats our [], so we need to use [ and ] instead.
29608   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29609   if test "x$has_forbidden_chars" != x; then
29610     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29611     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29612   fi
29613 
29614 
29615   windows_path="$new_path"
29616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29617     unix_path=`$CYGPATH -u "$windows_path"`
29618     new_path="$unix_path"
29619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29621     new_path="$unix_path"
29622   fi
29623 
29624   if test "x$path" != "x$new_path"; then
29625     BOOT_JDK="$new_path"
29626     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29627 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29628   fi
29629 
29630   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29631   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29632 
29633     else
29634       # We're on a unix platform. Hooray! :)
29635       path="$BOOT_JDK"
29636       has_space=`$ECHO "$path" | $GREP " "`
29637       if test "x$has_space" != x; then
29638         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29639 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29640         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29641       fi
29642 
29643       # Use eval to expand a potential ~
29644       eval path="$path"
29645       if test ! -f "$path" && test ! -d "$path"; then
29646         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29647       fi
29648 
29649       if test -d "$path"; then
29650         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29651       else
29652         dir="`$DIRNAME "$path"`"
29653         base="`$BASENAME "$path"`"
29654         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29655       fi
29656     fi
29657   fi
29658 
29659             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29660 $as_echo_n "checking for Boot JDK... " >&6; }
29661             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29662 $as_echo "$BOOT_JDK" >&6; }
29663             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29664 $as_echo_n "checking Boot JDK version... " >&6; }
29665             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29666             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29667 $as_echo "$BOOT_JDK_VERSION" >&6; }
29668           fi # end check jdk version
29669         fi # end check javac
29670       fi # end check java
29671     fi # end check boot jdk found
29672   fi
29673 
29674 
29675   if test "x$BOOT_JDK_FOUND" = xno; then
29676     # Now execute the test
29677 
29678   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29679   BOOT_JDK_SUFFIX="/Contents/Home"
29680   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29681   if test "x$ALL_JDKS_FOUND" != x; then
29682     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29683 
29684   if test "x$BOOT_JDK_FOUND" = xno; then
29685     # Now execute the test
29686 
29687         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29688         if test -d "$BOOT_JDK"; then
29689           BOOT_JDK_FOUND=maybe
29690           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29691 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29692         fi
29693 
29694 
29695     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29696     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29697       # Do we have a bin/java?
29698       if test ! -x "$BOOT_JDK/bin/java"; then
29699         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29700 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29701         BOOT_JDK_FOUND=no
29702       else
29703         # Do we have a bin/javac?
29704         if test ! -x "$BOOT_JDK/bin/javac"; then
29705           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29706 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29707           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29708 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29709           BOOT_JDK_FOUND=no
29710         else
29711           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29712           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29713 
29714           # Extra M4 quote needed to protect [] in grep expression.
29715           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29716           if test "x$FOUND_CORRECT_VERSION" = x; then
29717             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29718 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29719             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29720 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29721             BOOT_JDK_FOUND=no
29722           else
29723             # We're done! :-)
29724             BOOT_JDK_FOUND=yes
29725 
29726   # Only process if variable expands to non-empty
29727 
29728   if test "x$BOOT_JDK" != x; then
29729     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29730 
29731   # Input might be given as Windows format, start by converting to
29732   # unix format.
29733   path="$BOOT_JDK"
29734   new_path=`$CYGPATH -u "$path"`
29735 
29736   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29737   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29738   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29739   # "foo.exe" is OK but "foo" is an error.
29740   #
29741   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29742   # It is also a way to make sure we got the proper file name for the real test later on.
29743   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29744   if test "x$test_shortpath" = x; then
29745     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29746 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29747     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29748   fi
29749 
29750   # Call helper function which possibly converts this using DOS-style short mode.
29751   # If so, the updated path is stored in $new_path.
29752 
29753   input_path="$new_path"
29754   # Check if we need to convert this using DOS-style short mode. If the path
29755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29756   # take no chances and rewrite it.
29757   # Note: m4 eats our [], so we need to use [ and ] instead.
29758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29759   if test "x$has_forbidden_chars" != x; then
29760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29761     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29762     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29763     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29764       # Going to short mode and back again did indeed matter. Since short mode is
29765       # case insensitive, let's make it lowercase to improve readability.
29766       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29767       # Now convert it back to Unix-style (cygpath)
29768       input_path=`$CYGPATH -u "$shortmode_path"`
29769       new_path="$input_path"
29770     fi
29771   fi
29772 
29773   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29774   if test "x$test_cygdrive_prefix" = x; then
29775     # As a simple fix, exclude /usr/bin since it's not a real path.
29776     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29777       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29778       # a path prefixed by /cygdrive for fixpath to work.
29779       new_path="$CYGWIN_ROOT_PATH$input_path"
29780     fi
29781   fi
29782 
29783 
29784   if test "x$path" != "x$new_path"; then
29785     BOOT_JDK="$new_path"
29786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29787 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29788   fi
29789 
29790     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29791 
29792   path="$BOOT_JDK"
29793   has_colon=`$ECHO $path | $GREP ^.:`
29794   new_path="$path"
29795   if test "x$has_colon" = x; then
29796     # Not in mixed or Windows style, start by that.
29797     new_path=`cmd //c echo $path`
29798   fi
29799 
29800 
29801   input_path="$new_path"
29802   # Check if we need to convert this using DOS-style short mode. If the path
29803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29804   # take no chances and rewrite it.
29805   # Note: m4 eats our [], so we need to use [ and ] instead.
29806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29807   if test "x$has_forbidden_chars" != x; then
29808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29809     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29810   fi
29811 
29812 
29813   windows_path="$new_path"
29814   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29815     unix_path=`$CYGPATH -u "$windows_path"`
29816     new_path="$unix_path"
29817   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29818     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29819     new_path="$unix_path"
29820   fi
29821 
29822   if test "x$path" != "x$new_path"; then
29823     BOOT_JDK="$new_path"
29824     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29825 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29826   fi
29827 
29828   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29829   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29830 
29831     else
29832       # We're on a unix platform. Hooray! :)
29833       path="$BOOT_JDK"
29834       has_space=`$ECHO "$path" | $GREP " "`
29835       if test "x$has_space" != x; then
29836         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29837 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29838         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29839       fi
29840 
29841       # Use eval to expand a potential ~
29842       eval path="$path"
29843       if test ! -f "$path" && test ! -d "$path"; then
29844         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29845       fi
29846 
29847       if test -d "$path"; then
29848         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29849       else
29850         dir="`$DIRNAME "$path"`"
29851         base="`$BASENAME "$path"`"
29852         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29853       fi
29854     fi
29855   fi
29856 
29857             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29858 $as_echo_n "checking for Boot JDK... " >&6; }
29859             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29860 $as_echo "$BOOT_JDK" >&6; }
29861             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29862 $as_echo_n "checking Boot JDK version... " >&6; }
29863             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29864             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29865 $as_echo "$BOOT_JDK_VERSION" >&6; }
29866           fi # end check jdk version
29867         fi # end check javac
29868       fi # end check java
29869     fi # end check boot jdk found
29870   fi
29871 
29872     done
29873   fi
29874 
29875 
29876     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29877     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29878       # Do we have a bin/java?
29879       if test ! -x "$BOOT_JDK/bin/java"; then
29880         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29881 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29882         BOOT_JDK_FOUND=no
29883       else
29884         # Do we have a bin/javac?
29885         if test ! -x "$BOOT_JDK/bin/javac"; then
29886           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29887 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29888           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29889 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29890           BOOT_JDK_FOUND=no
29891         else
29892           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29893           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29894 
29895           # Extra M4 quote needed to protect [] in grep expression.
29896           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29897           if test "x$FOUND_CORRECT_VERSION" = x; then
29898             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29899 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29900             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29901 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29902             BOOT_JDK_FOUND=no
29903           else
29904             # We're done! :-)
29905             BOOT_JDK_FOUND=yes
29906 
29907   # Only process if variable expands to non-empty
29908 
29909   if test "x$BOOT_JDK" != x; then
29910     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29911 
29912   # Input might be given as Windows format, start by converting to
29913   # unix format.
29914   path="$BOOT_JDK"
29915   new_path=`$CYGPATH -u "$path"`
29916 
29917   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29918   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29919   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29920   # "foo.exe" is OK but "foo" is an error.
29921   #
29922   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29923   # It is also a way to make sure we got the proper file name for the real test later on.
29924   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29925   if test "x$test_shortpath" = x; then
29926     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29927 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29928     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29929   fi
29930 
29931   # Call helper function which possibly converts this using DOS-style short mode.
29932   # If so, the updated path is stored in $new_path.
29933 
29934   input_path="$new_path"
29935   # Check if we need to convert this using DOS-style short mode. If the path
29936   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29937   # take no chances and rewrite it.
29938   # Note: m4 eats our [], so we need to use [ and ] instead.
29939   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29940   if test "x$has_forbidden_chars" != x; then
29941     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29942     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29943     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29944     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29945       # Going to short mode and back again did indeed matter. Since short mode is
29946       # case insensitive, let's make it lowercase to improve readability.
29947       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29948       # Now convert it back to Unix-style (cygpath)
29949       input_path=`$CYGPATH -u "$shortmode_path"`
29950       new_path="$input_path"
29951     fi
29952   fi
29953 
29954   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29955   if test "x$test_cygdrive_prefix" = x; then
29956     # As a simple fix, exclude /usr/bin since it's not a real path.
29957     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29958       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29959       # a path prefixed by /cygdrive for fixpath to work.
29960       new_path="$CYGWIN_ROOT_PATH$input_path"
29961     fi
29962   fi
29963 
29964 
29965   if test "x$path" != "x$new_path"; then
29966     BOOT_JDK="$new_path"
29967     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29968 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29969   fi
29970 
29971     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29972 
29973   path="$BOOT_JDK"
29974   has_colon=`$ECHO $path | $GREP ^.:`
29975   new_path="$path"
29976   if test "x$has_colon" = x; then
29977     # Not in mixed or Windows style, start by that.
29978     new_path=`cmd //c echo $path`
29979   fi
29980 
29981 
29982   input_path="$new_path"
29983   # Check if we need to convert this using DOS-style short mode. If the path
29984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29985   # take no chances and rewrite it.
29986   # Note: m4 eats our [], so we need to use [ and ] instead.
29987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29988   if test "x$has_forbidden_chars" != x; then
29989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29991   fi
29992 
29993 
29994   windows_path="$new_path"
29995   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29996     unix_path=`$CYGPATH -u "$windows_path"`
29997     new_path="$unix_path"
29998   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29999     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30000     new_path="$unix_path"
30001   fi
30002 
30003   if test "x$path" != "x$new_path"; then
30004     BOOT_JDK="$new_path"
30005     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30006 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30007   fi
30008 
30009   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30010   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30011 
30012     else
30013       # We're on a unix platform. Hooray! :)
30014       path="$BOOT_JDK"
30015       has_space=`$ECHO "$path" | $GREP " "`
30016       if test "x$has_space" != x; then
30017         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30018 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30019         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30020       fi
30021 
30022       # Use eval to expand a potential ~
30023       eval path="$path"
30024       if test ! -f "$path" && test ! -d "$path"; then
30025         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30026       fi
30027 
30028       if test -d "$path"; then
30029         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30030       else
30031         dir="`$DIRNAME "$path"`"
30032         base="`$BASENAME "$path"`"
30033         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30034       fi
30035     fi
30036   fi
30037 
30038             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30039 $as_echo_n "checking for Boot JDK... " >&6; }
30040             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30041 $as_echo "$BOOT_JDK" >&6; }
30042             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30043 $as_echo_n "checking Boot JDK version... " >&6; }
30044             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30045             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30046 $as_echo "$BOOT_JDK_VERSION" >&6; }
30047           fi # end check jdk version
30048         fi # end check javac
30049       fi # end check java
30050     fi # end check boot jdk found
30051   fi
30052 
30053   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30054 
30055   if test "x$BOOT_JDK_FOUND" = xno; then
30056     # Now execute the test
30057 
30058   BOOT_JDK_PREFIX="/usr/lib/jvm"
30059   BOOT_JDK_SUFFIX=""
30060   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30061   if test "x$ALL_JDKS_FOUND" != x; then
30062     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30063 
30064   if test "x$BOOT_JDK_FOUND" = xno; then
30065     # Now execute the test
30066 
30067         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30068         if test -d "$BOOT_JDK"; then
30069           BOOT_JDK_FOUND=maybe
30070           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30071 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30072         fi
30073 
30074 
30075     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30076     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30077       # Do we have a bin/java?
30078       if test ! -x "$BOOT_JDK/bin/java"; then
30079         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30080 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30081         BOOT_JDK_FOUND=no
30082       else
30083         # Do we have a bin/javac?
30084         if test ! -x "$BOOT_JDK/bin/javac"; then
30085           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30086 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30087           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30088 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30089           BOOT_JDK_FOUND=no
30090         else
30091           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30092           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30093 
30094           # Extra M4 quote needed to protect [] in grep expression.
30095           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30096           if test "x$FOUND_CORRECT_VERSION" = x; then
30097             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30098 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30099             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30100 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30101             BOOT_JDK_FOUND=no
30102           else
30103             # We're done! :-)
30104             BOOT_JDK_FOUND=yes
30105 
30106   # Only process if variable expands to non-empty
30107 
30108   if test "x$BOOT_JDK" != x; then
30109     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30110 
30111   # Input might be given as Windows format, start by converting to
30112   # unix format.
30113   path="$BOOT_JDK"
30114   new_path=`$CYGPATH -u "$path"`
30115 
30116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30119   # "foo.exe" is OK but "foo" is an error.
30120   #
30121   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30122   # It is also a way to make sure we got the proper file name for the real test later on.
30123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30124   if test "x$test_shortpath" = x; then
30125     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30126 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30127     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30128   fi
30129 
30130   # Call helper function which possibly converts this using DOS-style short mode.
30131   # If so, the updated path is stored in $new_path.
30132 
30133   input_path="$new_path"
30134   # Check if we need to convert this using DOS-style short mode. If the path
30135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30136   # take no chances and rewrite it.
30137   # Note: m4 eats our [], so we need to use [ and ] instead.
30138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30139   if test "x$has_forbidden_chars" != x; then
30140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30141     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30142     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30143     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30144       # Going to short mode and back again did indeed matter. Since short mode is
30145       # case insensitive, let's make it lowercase to improve readability.
30146       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30147       # Now convert it back to Unix-style (cygpath)
30148       input_path=`$CYGPATH -u "$shortmode_path"`
30149       new_path="$input_path"
30150     fi
30151   fi
30152 
30153   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30154   if test "x$test_cygdrive_prefix" = x; then
30155     # As a simple fix, exclude /usr/bin since it's not a real path.
30156     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30157       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30158       # a path prefixed by /cygdrive for fixpath to work.
30159       new_path="$CYGWIN_ROOT_PATH$input_path"
30160     fi
30161   fi
30162 
30163 
30164   if test "x$path" != "x$new_path"; then
30165     BOOT_JDK="$new_path"
30166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30167 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30168   fi
30169 
30170     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30171 
30172   path="$BOOT_JDK"
30173   has_colon=`$ECHO $path | $GREP ^.:`
30174   new_path="$path"
30175   if test "x$has_colon" = x; then
30176     # Not in mixed or Windows style, start by that.
30177     new_path=`cmd //c echo $path`
30178   fi
30179 
30180 
30181   input_path="$new_path"
30182   # Check if we need to convert this using DOS-style short mode. If the path
30183   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30184   # take no chances and rewrite it.
30185   # Note: m4 eats our [], so we need to use [ and ] instead.
30186   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30187   if test "x$has_forbidden_chars" != x; then
30188     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30189     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30190   fi
30191 
30192 
30193   windows_path="$new_path"
30194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30195     unix_path=`$CYGPATH -u "$windows_path"`
30196     new_path="$unix_path"
30197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30199     new_path="$unix_path"
30200   fi
30201 
30202   if test "x$path" != "x$new_path"; then
30203     BOOT_JDK="$new_path"
30204     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30205 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30206   fi
30207 
30208   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30209   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30210 
30211     else
30212       # We're on a unix platform. Hooray! :)
30213       path="$BOOT_JDK"
30214       has_space=`$ECHO "$path" | $GREP " "`
30215       if test "x$has_space" != x; then
30216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30217 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30218         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30219       fi
30220 
30221       # Use eval to expand a potential ~
30222       eval path="$path"
30223       if test ! -f "$path" && test ! -d "$path"; then
30224         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30225       fi
30226 
30227       if test -d "$path"; then
30228         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30229       else
30230         dir="`$DIRNAME "$path"`"
30231         base="`$BASENAME "$path"`"
30232         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30233       fi
30234     fi
30235   fi
30236 
30237             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30238 $as_echo_n "checking for Boot JDK... " >&6; }
30239             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30240 $as_echo "$BOOT_JDK" >&6; }
30241             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30242 $as_echo_n "checking Boot JDK version... " >&6; }
30243             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30244             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30245 $as_echo "$BOOT_JDK_VERSION" >&6; }
30246           fi # end check jdk version
30247         fi # end check javac
30248       fi # end check java
30249     fi # end check boot jdk found
30250   fi
30251 
30252     done
30253   fi
30254 
30255 
30256     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30257     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30258       # Do we have a bin/java?
30259       if test ! -x "$BOOT_JDK/bin/java"; then
30260         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30261 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30262         BOOT_JDK_FOUND=no
30263       else
30264         # Do we have a bin/javac?
30265         if test ! -x "$BOOT_JDK/bin/javac"; then
30266           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30267 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30268           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30269 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30270           BOOT_JDK_FOUND=no
30271         else
30272           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30273           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30274 
30275           # Extra M4 quote needed to protect [] in grep expression.
30276           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30277           if test "x$FOUND_CORRECT_VERSION" = x; then
30278             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30279 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30280             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30281 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30282             BOOT_JDK_FOUND=no
30283           else
30284             # We're done! :-)
30285             BOOT_JDK_FOUND=yes
30286 
30287   # Only process if variable expands to non-empty
30288 
30289   if test "x$BOOT_JDK" != x; then
30290     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30291 
30292   # Input might be given as Windows format, start by converting to
30293   # unix format.
30294   path="$BOOT_JDK"
30295   new_path=`$CYGPATH -u "$path"`
30296 
30297   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30298   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30299   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30300   # "foo.exe" is OK but "foo" is an error.
30301   #
30302   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30303   # It is also a way to make sure we got the proper file name for the real test later on.
30304   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30305   if test "x$test_shortpath" = x; then
30306     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30307 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30308     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30309   fi
30310 
30311   # Call helper function which possibly converts this using DOS-style short mode.
30312   # If so, the updated path is stored in $new_path.
30313 
30314   input_path="$new_path"
30315   # Check if we need to convert this using DOS-style short mode. If the path
30316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30317   # take no chances and rewrite it.
30318   # Note: m4 eats our [], so we need to use [ and ] instead.
30319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30320   if test "x$has_forbidden_chars" != x; then
30321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30322     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30323     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30324     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30325       # Going to short mode and back again did indeed matter. Since short mode is
30326       # case insensitive, let's make it lowercase to improve readability.
30327       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30328       # Now convert it back to Unix-style (cygpath)
30329       input_path=`$CYGPATH -u "$shortmode_path"`
30330       new_path="$input_path"
30331     fi
30332   fi
30333 
30334   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30335   if test "x$test_cygdrive_prefix" = x; then
30336     # As a simple fix, exclude /usr/bin since it's not a real path.
30337     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30338       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30339       # a path prefixed by /cygdrive for fixpath to work.
30340       new_path="$CYGWIN_ROOT_PATH$input_path"
30341     fi
30342   fi
30343 
30344 
30345   if test "x$path" != "x$new_path"; then
30346     BOOT_JDK="$new_path"
30347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30348 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30349   fi
30350 
30351     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30352 
30353   path="$BOOT_JDK"
30354   has_colon=`$ECHO $path | $GREP ^.:`
30355   new_path="$path"
30356   if test "x$has_colon" = x; then
30357     # Not in mixed or Windows style, start by that.
30358     new_path=`cmd //c echo $path`
30359   fi
30360 
30361 
30362   input_path="$new_path"
30363   # Check if we need to convert this using DOS-style short mode. If the path
30364   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30365   # take no chances and rewrite it.
30366   # Note: m4 eats our [], so we need to use [ and ] instead.
30367   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30368   if test "x$has_forbidden_chars" != x; then
30369     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30370     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30371   fi
30372 
30373 
30374   windows_path="$new_path"
30375   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30376     unix_path=`$CYGPATH -u "$windows_path"`
30377     new_path="$unix_path"
30378   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30379     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30380     new_path="$unix_path"
30381   fi
30382 
30383   if test "x$path" != "x$new_path"; then
30384     BOOT_JDK="$new_path"
30385     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30386 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30387   fi
30388 
30389   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30390   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30391 
30392     else
30393       # We're on a unix platform. Hooray! :)
30394       path="$BOOT_JDK"
30395       has_space=`$ECHO "$path" | $GREP " "`
30396       if test "x$has_space" != x; then
30397         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30398 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30399         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30400       fi
30401 
30402       # Use eval to expand a potential ~
30403       eval path="$path"
30404       if test ! -f "$path" && test ! -d "$path"; then
30405         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30406       fi
30407 
30408       if test -d "$path"; then
30409         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30410       else
30411         dir="`$DIRNAME "$path"`"
30412         base="`$BASENAME "$path"`"
30413         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30414       fi
30415     fi
30416   fi
30417 
30418             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30419 $as_echo_n "checking for Boot JDK... " >&6; }
30420             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30421 $as_echo "$BOOT_JDK" >&6; }
30422             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30423 $as_echo_n "checking Boot JDK version... " >&6; }
30424             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30425             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30426 $as_echo "$BOOT_JDK_VERSION" >&6; }
30427           fi # end check jdk version
30428         fi # end check javac
30429       fi # end check java
30430     fi # end check boot jdk found
30431   fi
30432 
30433   fi
30434 
30435 
30436     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30437     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30438       # Do we have a bin/java?
30439       if test ! -x "$BOOT_JDK/bin/java"; then
30440         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30441 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30442         BOOT_JDK_FOUND=no
30443       else
30444         # Do we have a bin/javac?
30445         if test ! -x "$BOOT_JDK/bin/javac"; then
30446           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30448           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30449 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30450           BOOT_JDK_FOUND=no
30451         else
30452           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30453           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30454 
30455           # Extra M4 quote needed to protect [] in grep expression.
30456           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30457           if test "x$FOUND_CORRECT_VERSION" = x; then
30458             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30460             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30461 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30462             BOOT_JDK_FOUND=no
30463           else
30464             # We're done! :-)
30465             BOOT_JDK_FOUND=yes
30466 
30467   # Only process if variable expands to non-empty
30468 
30469   if test "x$BOOT_JDK" != x; then
30470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30471 
30472   # Input might be given as Windows format, start by converting to
30473   # unix format.
30474   path="$BOOT_JDK"
30475   new_path=`$CYGPATH -u "$path"`
30476 
30477   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30478   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30479   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30480   # "foo.exe" is OK but "foo" is an error.
30481   #
30482   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30483   # It is also a way to make sure we got the proper file name for the real test later on.
30484   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30485   if test "x$test_shortpath" = x; then
30486     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30487 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30488     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30489   fi
30490 
30491   # Call helper function which possibly converts this using DOS-style short mode.
30492   # If so, the updated path is stored in $new_path.
30493 
30494   input_path="$new_path"
30495   # Check if we need to convert this using DOS-style short mode. If the path
30496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30497   # take no chances and rewrite it.
30498   # Note: m4 eats our [], so we need to use [ and ] instead.
30499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30500   if test "x$has_forbidden_chars" != x; then
30501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30502     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30503     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30504     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30505       # Going to short mode and back again did indeed matter. Since short mode is
30506       # case insensitive, let's make it lowercase to improve readability.
30507       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30508       # Now convert it back to Unix-style (cygpath)
30509       input_path=`$CYGPATH -u "$shortmode_path"`
30510       new_path="$input_path"
30511     fi
30512   fi
30513 
30514   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30515   if test "x$test_cygdrive_prefix" = x; then
30516     # As a simple fix, exclude /usr/bin since it's not a real path.
30517     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30518       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30519       # a path prefixed by /cygdrive for fixpath to work.
30520       new_path="$CYGWIN_ROOT_PATH$input_path"
30521     fi
30522   fi
30523 
30524 
30525   if test "x$path" != "x$new_path"; then
30526     BOOT_JDK="$new_path"
30527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30528 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30529   fi
30530 
30531     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30532 
30533   path="$BOOT_JDK"
30534   has_colon=`$ECHO $path | $GREP ^.:`
30535   new_path="$path"
30536   if test "x$has_colon" = x; then
30537     # Not in mixed or Windows style, start by that.
30538     new_path=`cmd //c echo $path`
30539   fi
30540 
30541 
30542   input_path="$new_path"
30543   # Check if we need to convert this using DOS-style short mode. If the path
30544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30545   # take no chances and rewrite it.
30546   # Note: m4 eats our [], so we need to use [ and ] instead.
30547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30548   if test "x$has_forbidden_chars" != x; then
30549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30550     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30551   fi
30552 
30553 
30554   windows_path="$new_path"
30555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30556     unix_path=`$CYGPATH -u "$windows_path"`
30557     new_path="$unix_path"
30558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30560     new_path="$unix_path"
30561   fi
30562 
30563   if test "x$path" != "x$new_path"; then
30564     BOOT_JDK="$new_path"
30565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30566 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30567   fi
30568 
30569   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30570   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30571 
30572     else
30573       # We're on a unix platform. Hooray! :)
30574       path="$BOOT_JDK"
30575       has_space=`$ECHO "$path" | $GREP " "`
30576       if test "x$has_space" != x; then
30577         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30578 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30579         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30580       fi
30581 
30582       # Use eval to expand a potential ~
30583       eval path="$path"
30584       if test ! -f "$path" && test ! -d "$path"; then
30585         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30586       fi
30587 
30588       if test -d "$path"; then
30589         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30590       else
30591         dir="`$DIRNAME "$path"`"
30592         base="`$BASENAME "$path"`"
30593         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30594       fi
30595     fi
30596   fi
30597 
30598             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30599 $as_echo_n "checking for Boot JDK... " >&6; }
30600             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30601 $as_echo "$BOOT_JDK" >&6; }
30602             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30603 $as_echo_n "checking Boot JDK version... " >&6; }
30604             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30605             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30606 $as_echo "$BOOT_JDK_VERSION" >&6; }
30607           fi # end check jdk version
30608         fi # end check javac
30609       fi # end check java
30610     fi # end check boot jdk found
30611   fi
30612 
30613 
30614   # If we haven't found anything yet, we've truly lost. Give up.
30615   if test "x$BOOT_JDK_FOUND" = xno; then
30616 
30617   # Print a helpful message on how to acquire the necessary build dependency.
30618   # openjdk is the help tag: freetype, cups, alsa etc
30619   MISSING_DEPENDENCY=openjdk
30620 
30621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30622     cygwin_help $MISSING_DEPENDENCY
30623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30624     msys_help $MISSING_DEPENDENCY
30625   else
30626     PKGHANDLER_COMMAND=
30627 
30628     case $PKGHANDLER in
30629       apt-get)
30630         apt_help     $MISSING_DEPENDENCY ;;
30631       yum)
30632         yum_help     $MISSING_DEPENDENCY ;;
30633       brew)
30634         brew_help    $MISSING_DEPENDENCY ;;
30635       port)
30636         port_help    $MISSING_DEPENDENCY ;;
30637       pkgutil)
30638         pkgutil_help $MISSING_DEPENDENCY ;;
30639       pkgadd)
30640         pkgadd_help  $MISSING_DEPENDENCY ;;
30641     esac
30642 
30643     if test "x$PKGHANDLER_COMMAND" != x; then
30644       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30645     fi
30646   fi
30647 
30648     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30649 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30650     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30651 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30652     as_fn_error $? "Cannot continue" "$LINENO" 5
30653   fi
30654 
30655 
30656 
30657   # Setup tools from the Boot JDK.
30658 
30659   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30660 
30661   # Publish this variable in the help.
30662 
30663 
30664   if [ -z "${JAVA+x}" ]; then
30665     # The variable is not set by user, try to locate tool using the code snippet
30666 
30667       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30668 $as_echo_n "checking for java in Boot JDK... " >&6; }
30669       JAVA=$BOOT_JDK/bin/java
30670       if test ! -x $JAVA; then
30671         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30672 $as_echo "not found" >&6; }
30673         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30674 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30675         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30676       fi
30677       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30678 $as_echo "ok" >&6; }
30679 
30680 
30681   else
30682     # The variable is set, but is it from the command line or the environment?
30683 
30684     # Try to remove the string !JAVA! from our list.
30685     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30686     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30687       # If it failed, the variable was not from the command line. Ignore it,
30688       # but warn the user (except for BASH, which is always set by the calling BASH).
30689       if test "xJAVA" != xBASH; then
30690         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30691 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30692       fi
30693       # Try to locate tool using the code snippet
30694 
30695       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30696 $as_echo_n "checking for java in Boot JDK... " >&6; }
30697       JAVA=$BOOT_JDK/bin/java
30698       if test ! -x $JAVA; then
30699         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30700 $as_echo "not found" >&6; }
30701         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30702 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30703         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30704       fi
30705       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30706 $as_echo "ok" >&6; }
30707 
30708 
30709     else
30710       # If it succeeded, then it was overridden by the user. We will use it
30711       # for the tool.
30712 
30713       # First remove it from the list of overridden variables, so we can test
30714       # for unknown variables in the end.
30715       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30716 
30717       # Check if we try to supply an empty value
30718       if test "x$JAVA" = x; then
30719         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30720 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30721         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30722 $as_echo_n "checking for JAVA... " >&6; }
30723         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30724 $as_echo "disabled" >&6; }
30725       else
30726         # Check if the provided tool contains a complete path.
30727         tool_specified="$JAVA"
30728         tool_basename="${tool_specified##*/}"
30729         if test "x$tool_basename" = "x$tool_specified"; then
30730           # A command without a complete path is provided, search $PATH.
30731           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30732 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30733           # Extract the first word of "$tool_basename", so it can be a program name with args.
30734 set dummy $tool_basename; ac_word=$2
30735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30736 $as_echo_n "checking for $ac_word... " >&6; }
30737 if ${ac_cv_path_JAVA+:} false; then :
30738   $as_echo_n "(cached) " >&6
30739 else
30740   case $JAVA in
30741   [\\/]* | ?:[\\/]*)
30742   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30743   ;;
30744   *)
30745   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30746 for as_dir in $PATH
30747 do
30748   IFS=$as_save_IFS
30749   test -z "$as_dir" && as_dir=.
30750     for ac_exec_ext in '' $ac_executable_extensions; do
30751   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30752     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30753     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30754     break 2
30755   fi
30756 done
30757   done
30758 IFS=$as_save_IFS
30759 
30760   ;;
30761 esac
30762 fi
30763 JAVA=$ac_cv_path_JAVA
30764 if test -n "$JAVA"; then
30765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30766 $as_echo "$JAVA" >&6; }
30767 else
30768   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30769 $as_echo "no" >&6; }
30770 fi
30771 
30772 
30773           if test "x$JAVA" = x; then
30774             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30775           fi
30776         else
30777           # Otherwise we believe it is a complete path. Use it as it is.
30778           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30779 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30780           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30781 $as_echo_n "checking for JAVA... " >&6; }
30782           if test ! -x "$tool_specified"; then
30783             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30784 $as_echo "not found" >&6; }
30785             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30786           fi
30787           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30788 $as_echo "$tool_specified" >&6; }
30789         fi
30790       fi
30791     fi
30792 
30793   fi
30794 
30795 
30796 
30797   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30798 
30799   # Publish this variable in the help.
30800 
30801 
30802   if [ -z "${JAVAC+x}" ]; then
30803     # The variable is not set by user, try to locate tool using the code snippet
30804 
30805       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30806 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30807       JAVAC=$BOOT_JDK/bin/javac
30808       if test ! -x $JAVAC; then
30809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30810 $as_echo "not found" >&6; }
30811         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30812 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30813         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30814       fi
30815       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30816 $as_echo "ok" >&6; }
30817 
30818 
30819   else
30820     # The variable is set, but is it from the command line or the environment?
30821 
30822     # Try to remove the string !JAVAC! from our list.
30823     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30824     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30825       # If it failed, the variable was not from the command line. Ignore it,
30826       # but warn the user (except for BASH, which is always set by the calling BASH).
30827       if test "xJAVAC" != xBASH; then
30828         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30829 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30830       fi
30831       # Try to locate tool using the code snippet
30832 
30833       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30834 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30835       JAVAC=$BOOT_JDK/bin/javac
30836       if test ! -x $JAVAC; then
30837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30838 $as_echo "not found" >&6; }
30839         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30840 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30841         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30842       fi
30843       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30844 $as_echo "ok" >&6; }
30845 
30846 
30847     else
30848       # If it succeeded, then it was overridden by the user. We will use it
30849       # for the tool.
30850 
30851       # First remove it from the list of overridden variables, so we can test
30852       # for unknown variables in the end.
30853       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30854 
30855       # Check if we try to supply an empty value
30856       if test "x$JAVAC" = x; then
30857         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30858 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30859         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30860 $as_echo_n "checking for JAVAC... " >&6; }
30861         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30862 $as_echo "disabled" >&6; }
30863       else
30864         # Check if the provided tool contains a complete path.
30865         tool_specified="$JAVAC"
30866         tool_basename="${tool_specified##*/}"
30867         if test "x$tool_basename" = "x$tool_specified"; then
30868           # A command without a complete path is provided, search $PATH.
30869           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30870 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30871           # Extract the first word of "$tool_basename", so it can be a program name with args.
30872 set dummy $tool_basename; ac_word=$2
30873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30874 $as_echo_n "checking for $ac_word... " >&6; }
30875 if ${ac_cv_path_JAVAC+:} false; then :
30876   $as_echo_n "(cached) " >&6
30877 else
30878   case $JAVAC in
30879   [\\/]* | ?:[\\/]*)
30880   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30881   ;;
30882   *)
30883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30884 for as_dir in $PATH
30885 do
30886   IFS=$as_save_IFS
30887   test -z "$as_dir" && as_dir=.
30888     for ac_exec_ext in '' $ac_executable_extensions; do
30889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30890     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30892     break 2
30893   fi
30894 done
30895   done
30896 IFS=$as_save_IFS
30897 
30898   ;;
30899 esac
30900 fi
30901 JAVAC=$ac_cv_path_JAVAC
30902 if test -n "$JAVAC"; then
30903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30904 $as_echo "$JAVAC" >&6; }
30905 else
30906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30907 $as_echo "no" >&6; }
30908 fi
30909 
30910 
30911           if test "x$JAVAC" = x; then
30912             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30913           fi
30914         else
30915           # Otherwise we believe it is a complete path. Use it as it is.
30916           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30917 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30918           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30919 $as_echo_n "checking for JAVAC... " >&6; }
30920           if test ! -x "$tool_specified"; then
30921             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30922 $as_echo "not found" >&6; }
30923             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30924           fi
30925           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30926 $as_echo "$tool_specified" >&6; }
30927         fi
30928       fi
30929     fi
30930 
30931   fi
30932 
30933 
30934 
30935   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30936 
30937   # Publish this variable in the help.
30938 
30939 
30940   if [ -z "${JAVADOC+x}" ]; then
30941     # The variable is not set by user, try to locate tool using the code snippet
30942 
30943       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javadoc in Boot JDK" >&5
30944 $as_echo_n "checking for javadoc in Boot JDK... " >&6; }
30945       JAVADOC=$BOOT_JDK/bin/javadoc
30946       if test ! -x $JAVADOC; then
30947         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30948 $as_echo "not found" >&6; }
30949         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30950 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30951         as_fn_error $? "Could not find javadoc in the Boot JDK" "$LINENO" 5
30952       fi
30953       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30954 $as_echo "ok" >&6; }
30955 
30956 
30957   else
30958     # The variable is set, but is it from the command line or the environment?
30959 
30960     # Try to remove the string !JAVADOC! from our list.
30961     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVADOC!/}
30962     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30963       # If it failed, the variable was not from the command line. Ignore it,
30964       # but warn the user (except for BASH, which is always set by the calling BASH).
30965       if test "xJAVADOC" != xBASH; then
30966         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVADOC from the environment. Use command line variables instead." >&5
30967 $as_echo "$as_me: WARNING: Ignoring value of JAVADOC from the environment. Use command line variables instead." >&2;}
30968       fi
30969       # Try to locate tool using the code snippet
30970 
30971       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javadoc in Boot JDK" >&5
30972 $as_echo_n "checking for javadoc in Boot JDK... " >&6; }
30973       JAVADOC=$BOOT_JDK/bin/javadoc
30974       if test ! -x $JAVADOC; then
30975         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30976 $as_echo "not found" >&6; }
30977         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30978 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30979         as_fn_error $? "Could not find javadoc in the Boot JDK" "$LINENO" 5
30980       fi
30981       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30982 $as_echo "ok" >&6; }
30983 
30984 
30985     else
30986       # If it succeeded, then it was overridden by the user. We will use it
30987       # for the tool.
30988 
30989       # First remove it from the list of overridden variables, so we can test
30990       # for unknown variables in the end.
30991       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30992 
30993       # Check if we try to supply an empty value
30994       if test "x$JAVADOC" = x; then
30995         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVADOC= (no value)" >&5
30996 $as_echo "$as_me: Setting user supplied tool JAVADOC= (no value)" >&6;}
30997         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVADOC" >&5
30998 $as_echo_n "checking for JAVADOC... " >&6; }
30999         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31000 $as_echo "disabled" >&6; }
31001       else
31002         # Check if the provided tool contains a complete path.
31003         tool_specified="$JAVADOC"
31004         tool_basename="${tool_specified##*/}"
31005         if test "x$tool_basename" = "x$tool_specified"; then
31006           # A command without a complete path is provided, search $PATH.
31007           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVADOC=$tool_basename" >&5
31008 $as_echo "$as_me: Will search for user supplied tool JAVADOC=$tool_basename" >&6;}
31009           # Extract the first word of "$tool_basename", so it can be a program name with args.
31010 set dummy $tool_basename; ac_word=$2
31011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31012 $as_echo_n "checking for $ac_word... " >&6; }
31013 if ${ac_cv_path_JAVADOC+:} false; then :
31014   $as_echo_n "(cached) " >&6
31015 else
31016   case $JAVADOC in
31017   [\\/]* | ?:[\\/]*)
31018   ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
31019   ;;
31020   *)
31021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31022 for as_dir in $PATH
31023 do
31024   IFS=$as_save_IFS
31025   test -z "$as_dir" && as_dir=.
31026     for ac_exec_ext in '' $ac_executable_extensions; do
31027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31028     ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
31029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31030     break 2
31031   fi
31032 done
31033   done
31034 IFS=$as_save_IFS
31035 
31036   ;;
31037 esac
31038 fi
31039 JAVADOC=$ac_cv_path_JAVADOC
31040 if test -n "$JAVADOC"; then
31041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5
31042 $as_echo "$JAVADOC" >&6; }
31043 else
31044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31045 $as_echo "no" >&6; }
31046 fi
31047 
31048 
31049           if test "x$JAVADOC" = x; then
31050             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31051           fi
31052         else
31053           # Otherwise we believe it is a complete path. Use it as it is.
31054           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVADOC=$tool_specified" >&5
31055 $as_echo "$as_me: Will use user supplied tool JAVADOC=$tool_specified" >&6;}
31056           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVADOC" >&5
31057 $as_echo_n "checking for JAVADOC... " >&6; }
31058           if test ! -x "$tool_specified"; then
31059             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31060 $as_echo "not found" >&6; }
31061             as_fn_error $? "User supplied tool JAVADOC=$tool_specified does not exist or is not executable" "$LINENO" 5
31062           fi
31063           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31064 $as_echo "$tool_specified" >&6; }
31065         fi
31066       fi
31067     fi
31068 
31069   fi
31070 
31071 
31072 
31073   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31074 
31075   # Publish this variable in the help.
31076 
31077 
31078   if [ -z "${JAR+x}" ]; then
31079     # The variable is not set by user, try to locate tool using the code snippet
31080 
31081       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31082 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31083       JAR=$BOOT_JDK/bin/jar
31084       if test ! -x $JAR; then
31085         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31086 $as_echo "not found" >&6; }
31087         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31088 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31089         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31090       fi
31091       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31092 $as_echo "ok" >&6; }
31093 
31094 
31095   else
31096     # The variable is set, but is it from the command line or the environment?
31097 
31098     # Try to remove the string !JAR! from our list.
31099     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31100     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31101       # If it failed, the variable was not from the command line. Ignore it,
31102       # but warn the user (except for BASH, which is always set by the calling BASH).
31103       if test "xJAR" != xBASH; then
31104         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31105 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31106       fi
31107       # Try to locate tool using the code snippet
31108 
31109       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31110 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31111       JAR=$BOOT_JDK/bin/jar
31112       if test ! -x $JAR; then
31113         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31114 $as_echo "not found" >&6; }
31115         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31116 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31117         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31118       fi
31119       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31120 $as_echo "ok" >&6; }
31121 
31122 
31123     else
31124       # If it succeeded, then it was overridden by the user. We will use it
31125       # for the tool.
31126 
31127       # First remove it from the list of overridden variables, so we can test
31128       # for unknown variables in the end.
31129       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31130 
31131       # Check if we try to supply an empty value
31132       if test "x$JAR" = x; then
31133         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31134 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31135         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31136 $as_echo_n "checking for JAR... " >&6; }
31137         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31138 $as_echo "disabled" >&6; }
31139       else
31140         # Check if the provided tool contains a complete path.
31141         tool_specified="$JAR"
31142         tool_basename="${tool_specified##*/}"
31143         if test "x$tool_basename" = "x$tool_specified"; then
31144           # A command without a complete path is provided, search $PATH.
31145           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31146 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31147           # Extract the first word of "$tool_basename", so it can be a program name with args.
31148 set dummy $tool_basename; ac_word=$2
31149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31150 $as_echo_n "checking for $ac_word... " >&6; }
31151 if ${ac_cv_path_JAR+:} false; then :
31152   $as_echo_n "(cached) " >&6
31153 else
31154   case $JAR in
31155   [\\/]* | ?:[\\/]*)
31156   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31157   ;;
31158   *)
31159   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31160 for as_dir in $PATH
31161 do
31162   IFS=$as_save_IFS
31163   test -z "$as_dir" && as_dir=.
31164     for ac_exec_ext in '' $ac_executable_extensions; do
31165   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31166     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31167     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31168     break 2
31169   fi
31170 done
31171   done
31172 IFS=$as_save_IFS
31173 
31174   ;;
31175 esac
31176 fi
31177 JAR=$ac_cv_path_JAR
31178 if test -n "$JAR"; then
31179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31180 $as_echo "$JAR" >&6; }
31181 else
31182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31183 $as_echo "no" >&6; }
31184 fi
31185 
31186 
31187           if test "x$JAR" = x; then
31188             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31189           fi
31190         else
31191           # Otherwise we believe it is a complete path. Use it as it is.
31192           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31193 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31194           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31195 $as_echo_n "checking for JAR... " >&6; }
31196           if test ! -x "$tool_specified"; then
31197             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31198 $as_echo "not found" >&6; }
31199             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31200           fi
31201           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31202 $as_echo "$tool_specified" >&6; }
31203         fi
31204       fi
31205     fi
31206 
31207   fi
31208 
31209 
31210 
31211   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31212 
31213   # Publish this variable in the help.
31214 
31215 
31216   if [ -z "${JARSIGNER+x}" ]; then
31217     # The variable is not set by user, try to locate tool using the code snippet
31218 
31219       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31220 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31221       JARSIGNER=$BOOT_JDK/bin/jarsigner
31222       if test ! -x $JARSIGNER; then
31223         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31224 $as_echo "not found" >&6; }
31225         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31226 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31227         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31228       fi
31229       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31230 $as_echo "ok" >&6; }
31231 
31232 
31233   else
31234     # The variable is set, but is it from the command line or the environment?
31235 
31236     # Try to remove the string !JARSIGNER! from our list.
31237     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31238     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31239       # If it failed, the variable was not from the command line. Ignore it,
31240       # but warn the user (except for BASH, which is always set by the calling BASH).
31241       if test "xJARSIGNER" != xBASH; then
31242         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31243 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31244       fi
31245       # Try to locate tool using the code snippet
31246 
31247       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31248 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31249       JARSIGNER=$BOOT_JDK/bin/jarsigner
31250       if test ! -x $JARSIGNER; then
31251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31252 $as_echo "not found" >&6; }
31253         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31254 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31255         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31256       fi
31257       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31258 $as_echo "ok" >&6; }
31259 
31260 
31261     else
31262       # If it succeeded, then it was overridden by the user. We will use it
31263       # for the tool.
31264 
31265       # First remove it from the list of overridden variables, so we can test
31266       # for unknown variables in the end.
31267       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31268 
31269       # Check if we try to supply an empty value
31270       if test "x$JARSIGNER" = x; then
31271         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31272 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31273         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31274 $as_echo_n "checking for JARSIGNER... " >&6; }
31275         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31276 $as_echo "disabled" >&6; }
31277       else
31278         # Check if the provided tool contains a complete path.
31279         tool_specified="$JARSIGNER"
31280         tool_basename="${tool_specified##*/}"
31281         if test "x$tool_basename" = "x$tool_specified"; then
31282           # A command without a complete path is provided, search $PATH.
31283           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31284 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31285           # Extract the first word of "$tool_basename", so it can be a program name with args.
31286 set dummy $tool_basename; ac_word=$2
31287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31288 $as_echo_n "checking for $ac_word... " >&6; }
31289 if ${ac_cv_path_JARSIGNER+:} false; then :
31290   $as_echo_n "(cached) " >&6
31291 else
31292   case $JARSIGNER in
31293   [\\/]* | ?:[\\/]*)
31294   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31295   ;;
31296   *)
31297   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31298 for as_dir in $PATH
31299 do
31300   IFS=$as_save_IFS
31301   test -z "$as_dir" && as_dir=.
31302     for ac_exec_ext in '' $ac_executable_extensions; do
31303   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31304     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31305     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31306     break 2
31307   fi
31308 done
31309   done
31310 IFS=$as_save_IFS
31311 
31312   ;;
31313 esac
31314 fi
31315 JARSIGNER=$ac_cv_path_JARSIGNER
31316 if test -n "$JARSIGNER"; then
31317   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31318 $as_echo "$JARSIGNER" >&6; }
31319 else
31320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31321 $as_echo "no" >&6; }
31322 fi
31323 
31324 
31325           if test "x$JARSIGNER" = x; then
31326             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31327           fi
31328         else
31329           # Otherwise we believe it is a complete path. Use it as it is.
31330           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31331 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31332           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31333 $as_echo_n "checking for JARSIGNER... " >&6; }
31334           if test ! -x "$tool_specified"; then
31335             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31336 $as_echo "not found" >&6; }
31337             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31338           fi
31339           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31340 $as_echo "$tool_specified" >&6; }
31341         fi
31342       fi
31343     fi
31344 
31345   fi
31346 
31347 
31348 
31349   # Finally, set some other options...
31350 
31351   # When compiling code to be executed by the Boot JDK, force compatibility with the
31352   # oldest supported bootjdk.
31353   BOOT_JDK_SOURCETARGET="-source 9 -target 9"
31354 
31355 
31356 
31357 
31358   # Check if the boot jdk is 32 or 64 bit
31359   if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31360     BOOT_JDK_BITS="64"
31361   else
31362     BOOT_JDK_BITS="32"
31363   fi
31364   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31365 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31367 $as_echo "$BOOT_JDK_BITS" >&6; }
31368 
31369   # Try to enable CDS
31370   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local Boot JDK Class Data Sharing (CDS)" >&5
31371 $as_echo_n "checking for local Boot JDK Class Data Sharing (CDS)... " >&6; }
31372   BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
31373 
31374   $ECHO "Check if jvm arg is ok: -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE" >&5
31375   $ECHO "Command: $JAVA -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE -version" >&5
31376   OUTPUT=`$JAVA -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE -version 2>&1`
31377   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
31378   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
31379   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31380     boot_jdk_cds_args="$boot_jdk_cds_args -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE"
31381     JVM_ARG_OK=true
31382   else
31383     $ECHO "Arg failed:" >&5
31384     $ECHO "$OUTPUT" >&5
31385     JVM_ARG_OK=false
31386   fi
31387 
31388 
31389   if test "x$boot_jdk_cds_args" != x; then
31390     # Try creating a CDS archive
31391     "$JAVA" $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
31392     if test $? -eq 0; then
31393       BOOTJDK_USE_LOCAL_CDS=true
31394       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, created" >&5
31395 $as_echo "yes, created" >&6; }
31396     else
31397       # Generation failed, don't use CDS.
31398       BOOTJDK_USE_LOCAL_CDS=false
31399       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, creation failed" >&5
31400 $as_echo "no, creation failed" >&6; }
31401     fi
31402   else
31403     BOOTJDK_USE_LOCAL_CDS=false
31404     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, -XX:SharedArchiveFile not supported" >&5
31405 $as_echo "no, -XX:SharedArchiveFile not supported" >&6; }
31406   fi
31407 
31408 
31409 
31410 # Check whether --with-build-jdk was given.
31411 if test "${with_build_jdk+set}" = set; then :
31412   withval=$with_build_jdk;
31413 fi
31414 
31415 
31416   CREATE_BUILDJDK=false
31417   EXTERNAL_BUILDJDK=false
31418   BUILD_JDK_FOUND="no"
31419   if test "x$with_build_jdk" != "x"; then
31420 
31421   if test "x$BUILD_JDK_FOUND" = xno; then
31422     # Execute the test
31423 
31424        if test "x$with_build_jdk" != x; then
31425          BUILD_JDK=$with_build_jdk
31426          BUILD_JDK_FOUND=maybe
31427          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31428 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31429        fi
31430 
31431     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31432     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31433       # Do we have a bin/java?
31434       if test ! -x "$BUILD_JDK/bin/java"; then
31435         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31436 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31437         BUILD_JDK_FOUND=no
31438       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31439         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31440 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31441         BUILD_JDK_FOUND=no
31442       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31443         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31444 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31445         BUILD_JDK_FOUND=no
31446       elif test ! -x "$BUILD_JDK/bin/javac"; then
31447         # Do we have a bin/javac?
31448         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31449 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31450         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31451 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31452         BUILD_JDK_FOUND=no
31453       else
31454         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31455         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31456 
31457         # Extra M4 quote needed to protect [] in grep expression.
31458         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`
31459         if test "x$FOUND_CORRECT_VERSION" = x; then
31460           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31461 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31462           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 10)" >&5
31463 $as_echo "$as_me: (Your Build JDK must be version 10)" >&6;}
31464           BUILD_JDK_FOUND=no
31465         else
31466           # We're done!
31467           BUILD_JDK_FOUND=yes
31468 
31469   # Only process if variable expands to non-empty
31470 
31471   if test "x$BUILD_JDK" != x; then
31472     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31473 
31474   # Input might be given as Windows format, start by converting to
31475   # unix format.
31476   path="$BUILD_JDK"
31477   new_path=`$CYGPATH -u "$path"`
31478 
31479   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31480   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31481   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31482   # "foo.exe" is OK but "foo" is an error.
31483   #
31484   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31485   # It is also a way to make sure we got the proper file name for the real test later on.
31486   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31487   if test "x$test_shortpath" = x; then
31488     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31489 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31490     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31491   fi
31492 
31493   # Call helper function which possibly converts this using DOS-style short mode.
31494   # If so, the updated path is stored in $new_path.
31495 
31496   input_path="$new_path"
31497   # Check if we need to convert this using DOS-style short mode. If the path
31498   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31499   # take no chances and rewrite it.
31500   # Note: m4 eats our [], so we need to use [ and ] instead.
31501   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31502   if test "x$has_forbidden_chars" != x; then
31503     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31504     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31505     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31506     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31507       # Going to short mode and back again did indeed matter. Since short mode is
31508       # case insensitive, let's make it lowercase to improve readability.
31509       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31510       # Now convert it back to Unix-style (cygpath)
31511       input_path=`$CYGPATH -u "$shortmode_path"`
31512       new_path="$input_path"
31513     fi
31514   fi
31515 
31516   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31517   if test "x$test_cygdrive_prefix" = x; then
31518     # As a simple fix, exclude /usr/bin since it's not a real path.
31519     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31520       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31521       # a path prefixed by /cygdrive for fixpath to work.
31522       new_path="$CYGWIN_ROOT_PATH$input_path"
31523     fi
31524   fi
31525 
31526 
31527   if test "x$path" != "x$new_path"; then
31528     BUILD_JDK="$new_path"
31529     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31530 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31531   fi
31532 
31533     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31534 
31535   path="$BUILD_JDK"
31536   has_colon=`$ECHO $path | $GREP ^.:`
31537   new_path="$path"
31538   if test "x$has_colon" = x; then
31539     # Not in mixed or Windows style, start by that.
31540     new_path=`cmd //c echo $path`
31541   fi
31542 
31543 
31544   input_path="$new_path"
31545   # Check if we need to convert this using DOS-style short mode. If the path
31546   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31547   # take no chances and rewrite it.
31548   # Note: m4 eats our [], so we need to use [ and ] instead.
31549   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31550   if test "x$has_forbidden_chars" != x; then
31551     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31552     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31553   fi
31554 
31555 
31556   windows_path="$new_path"
31557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31558     unix_path=`$CYGPATH -u "$windows_path"`
31559     new_path="$unix_path"
31560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31562     new_path="$unix_path"
31563   fi
31564 
31565   if test "x$path" != "x$new_path"; then
31566     BUILD_JDK="$new_path"
31567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31568 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31569   fi
31570 
31571   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31572   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31573 
31574     else
31575       # We're on a unix platform. Hooray! :)
31576       path="$BUILD_JDK"
31577       has_space=`$ECHO "$path" | $GREP " "`
31578       if test "x$has_space" != x; then
31579         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31580 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31581         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31582       fi
31583 
31584       # Use eval to expand a potential ~
31585       eval path="$path"
31586       if test ! -f "$path" && test ! -d "$path"; then
31587         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31588       fi
31589 
31590       if test -d "$path"; then
31591         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31592       else
31593         dir="`$DIRNAME "$path"`"
31594         base="`$BASENAME "$path"`"
31595         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31596       fi
31597     fi
31598   fi
31599 
31600           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31601 $as_echo_n "checking for Build JDK... " >&6; }
31602           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31603 $as_echo "$BUILD_JDK" >&6; }
31604           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31605 $as_echo_n "checking Build JDK version... " >&6; }
31606           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31607           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31608 $as_echo "$BUILD_JDK_VERSION" >&6; }
31609         fi # end check jdk version
31610       fi # end check java
31611     fi # end check build jdk found
31612   fi
31613 
31614     EXTERNAL_BUILDJDK=true
31615   else
31616     if test "x$COMPILE_TYPE" = "xcross"; then
31617       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31618       BUILD_JDK_FOUND=yes
31619       CREATE_BUILDJDK=true
31620       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31621 $as_echo_n "checking for Build JDK... " >&6; }
31622       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31623 $as_echo "yes, will build it for the host platform" >&6; }
31624     else
31625       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31626       BUILD_JDK_FOUND=yes
31627       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31628 $as_echo_n "checking for Build JDK... " >&6; }
31629       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31630 $as_echo "yes, will use output dir" >&6; }
31631     fi
31632   fi
31633 
31634   JMOD="$BUILD_JDK/bin/jmod"
31635   JLINK="$BUILD_JDK/bin/jlink"
31636 
31637 
31638 
31639   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31640     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31641 $as_echo_n "checking for Build JDK... " >&6; }
31642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31643 $as_echo "no" >&6; }
31644     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31645   fi
31646 
31647 
31648 
31649 
31650 
31651 
31652 ###############################################################################
31653 #
31654 # Configure the sources to use. We can add or override individual directories.
31655 #
31656 ###############################################################################
31657 
31658 
31659   OUTPUTDIR="$OUTPUTDIR"
31660 
31661   JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
31662 
31663   # Where are the sources.
31664 
31665 
31666 
31667 
31668 # Check whether --with-import-modules was given.
31669 if test "${with_import_modules+set}" = set; then :
31670   withval=$with_import_modules;
31671 fi
31672 
31673 
31674   if test "x$with_import_modules" != x \
31675       && test "x$with_import_modules" != "xno"; then
31676     if test -d "$with_import_modules"; then
31677       IMPORT_MODULES_TOPDIR="$with_import_modules"
31678 
31679   # Only process if variable expands to non-empty
31680 
31681   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31683 
31684   # Input might be given as Windows format, start by converting to
31685   # unix format.
31686   path="$IMPORT_MODULES_TOPDIR"
31687   new_path=`$CYGPATH -u "$path"`
31688 
31689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31692   # "foo.exe" is OK but "foo" is an error.
31693   #
31694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31695   # It is also a way to make sure we got the proper file name for the real test later on.
31696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31697   if test "x$test_shortpath" = x; then
31698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31699 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31700     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31701   fi
31702 
31703   # Call helper function which possibly converts this using DOS-style short mode.
31704   # If so, the updated path is stored in $new_path.
31705 
31706   input_path="$new_path"
31707   # Check if we need to convert this using DOS-style short mode. If the path
31708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31709   # take no chances and rewrite it.
31710   # Note: m4 eats our [], so we need to use [ and ] instead.
31711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31712   if test "x$has_forbidden_chars" != x; then
31713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31717       # Going to short mode and back again did indeed matter. Since short mode is
31718       # case insensitive, let's make it lowercase to improve readability.
31719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31720       # Now convert it back to Unix-style (cygpath)
31721       input_path=`$CYGPATH -u "$shortmode_path"`
31722       new_path="$input_path"
31723     fi
31724   fi
31725 
31726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31727   if test "x$test_cygdrive_prefix" = x; then
31728     # As a simple fix, exclude /usr/bin since it's not a real path.
31729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31731       # a path prefixed by /cygdrive for fixpath to work.
31732       new_path="$CYGWIN_ROOT_PATH$input_path"
31733     fi
31734   fi
31735 
31736 
31737   if test "x$path" != "x$new_path"; then
31738     IMPORT_MODULES_TOPDIR="$new_path"
31739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31740 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31741   fi
31742 
31743     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31744 
31745   path="$IMPORT_MODULES_TOPDIR"
31746   has_colon=`$ECHO $path | $GREP ^.:`
31747   new_path="$path"
31748   if test "x$has_colon" = x; then
31749     # Not in mixed or Windows style, start by that.
31750     new_path=`cmd //c echo $path`
31751   fi
31752 
31753 
31754   input_path="$new_path"
31755   # Check if we need to convert this using DOS-style short mode. If the path
31756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31757   # take no chances and rewrite it.
31758   # Note: m4 eats our [], so we need to use [ and ] instead.
31759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31760   if test "x$has_forbidden_chars" != x; then
31761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31763   fi
31764 
31765 
31766   windows_path="$new_path"
31767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31768     unix_path=`$CYGPATH -u "$windows_path"`
31769     new_path="$unix_path"
31770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31772     new_path="$unix_path"
31773   fi
31774 
31775   if test "x$path" != "x$new_path"; then
31776     IMPORT_MODULES_TOPDIR="$new_path"
31777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31778 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31779   fi
31780 
31781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31783 
31784     else
31785       # We're on a unix platform. Hooray! :)
31786       path="$IMPORT_MODULES_TOPDIR"
31787       has_space=`$ECHO "$path" | $GREP " "`
31788       if test "x$has_space" != x; then
31789         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31790 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31791         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31792       fi
31793 
31794       # Use eval to expand a potential ~
31795       eval path="$path"
31796       if test ! -f "$path" && test ! -d "$path"; then
31797         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31798       fi
31799 
31800       if test -d "$path"; then
31801         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31802       else
31803         dir="`$DIRNAME "$path"`"
31804         base="`$BASENAME "$path"`"
31805         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31806       fi
31807     fi
31808   fi
31809 
31810     elif test -e "$with_import_modules"; then
31811       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31812       $RM -rf "$IMPORT_MODULES_TOPDIR"
31813       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31814       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31815         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31816       fi
31817     else
31818       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31819     fi
31820   fi
31821 
31822   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31823     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31824   fi
31825   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31826     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31827   fi
31828   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31829     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31830   fi
31831   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31832     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31833   fi
31834   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31835     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31836   fi
31837   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31838     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31839   fi
31840   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31841     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31842   fi
31843   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31844     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31845   fi
31846 
31847 
31848 
31849 
31850 
31851 
31852 
31853 
31854 
31855 
31856 
31857 ###############################################################################
31858 #
31859 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31860 # native code.
31861 #
31862 ###############################################################################
31863 
31864 # See if we are doing a complete static build or not
31865 
31866   # Check whether --enable-static-build was given.
31867 if test "${enable_static_build+set}" = set; then :
31868   enableval=$enable_static_build;
31869 fi
31870 
31871   STATIC_BUILD=false
31872   if test "x$enable_static_build" = "xyes"; then
31873     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31874 $as_echo_n "checking if static build is enabled... " >&6; }
31875     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31876 $as_echo "yes" >&6; }
31877     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31878       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31879     fi
31880     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31881     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31882     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31883     STATIC_BUILD=true
31884   elif test "x$enable_static_build" = "xno"; then
31885     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31886 $as_echo_n "checking if static build is enabled... " >&6; }
31887     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31888 $as_echo "no" >&6; }
31889   elif test "x$enable_static_build" != "x"; then
31890     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31891   fi
31892 
31893 
31894 
31895 
31896 # First determine the toolchain type (compiler family)
31897 
31898 
31899 # Check whether --with-toolchain-type was given.
31900 if test "${with_toolchain_type+set}" = set; then :
31901   withval=$with_toolchain_type;
31902 fi
31903 
31904 
31905   # Use indirect variable referencing
31906   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31907   VALID_TOOLCHAINS=${!toolchain_var_name}
31908 
31909   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31910     if test -n "$XCODEBUILD"; then
31911       # On Mac OS X, default toolchain to clang after Xcode 5
31912       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31913       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31914       if test $? -ne 0; then
31915         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31916       fi
31917       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31918           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31919           $CUT -f 1 -d .`
31920       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31921 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31922       if test $XCODE_MAJOR_VERSION -ge 5; then
31923           DEFAULT_TOOLCHAIN="clang"
31924       else
31925           DEFAULT_TOOLCHAIN="gcc"
31926       fi
31927     else
31928       # If Xcode is not installed, but the command line tools are
31929       # then we can't run xcodebuild. On these systems we should
31930       # default to clang
31931       DEFAULT_TOOLCHAIN="clang"
31932     fi
31933   else
31934     # First toolchain type in the list is the default
31935     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31936   fi
31937 
31938   if test "x$with_toolchain_type" = xlist; then
31939     # List all toolchains
31940     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31941 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31942     for toolchain in $VALID_TOOLCHAINS; do
31943       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31944       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31945       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31946     done
31947 
31948     exit 0
31949   elif test "x$with_toolchain_type" != x; then
31950     # User override; check that it is valid
31951     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31952       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31953 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31954       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31955 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31956       as_fn_error $? "Cannot continue." "$LINENO" 5
31957     fi
31958     TOOLCHAIN_TYPE=$with_toolchain_type
31959   else
31960     # No flag given, use default
31961     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31962   fi
31963 
31964 
31965   TOOLCHAIN_CC_BINARY_clang="clang"
31966   TOOLCHAIN_CC_BINARY_gcc="gcc"
31967   TOOLCHAIN_CC_BINARY_microsoft="cl"
31968   TOOLCHAIN_CC_BINARY_solstudio="cc"
31969   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31970 
31971   TOOLCHAIN_CXX_BINARY_clang="clang++"
31972   TOOLCHAIN_CXX_BINARY_gcc="g++"
31973   TOOLCHAIN_CXX_BINARY_microsoft="cl"
31974   TOOLCHAIN_CXX_BINARY_solstudio="CC"
31975   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31976 
31977   # Use indirect variable referencing
31978   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31979   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31980   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31981   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31982   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31983   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31984   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31985   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31986 
31987 
31988   # Define filename patterns
31989   if test "x$OPENJDK_TARGET_OS" = xwindows; then
31990     LIBRARY_PREFIX=
31991     SHARED_LIBRARY_SUFFIX='.dll'
31992     STATIC_LIBRARY_SUFFIX='.lib'
31993     SHARED_LIBRARY='$1.dll'
31994     STATIC_LIBRARY='$1.lib'
31995     OBJ_SUFFIX='.obj'
31996     EXE_SUFFIX='.exe'
31997   else
31998     LIBRARY_PREFIX=lib
31999     SHARED_LIBRARY_SUFFIX='.so'
32000     STATIC_LIBRARY_SUFFIX='.a'
32001     SHARED_LIBRARY='lib$1.so'
32002     STATIC_LIBRARY='lib$1.a'
32003     OBJ_SUFFIX='.o'
32004     EXE_SUFFIX=''
32005     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32006       # For full static builds, we're overloading the SHARED_LIBRARY
32007       # variables in order to limit the amount of changes required.
32008       # It would be better to remove SHARED and just use LIBRARY and
32009       # LIBRARY_SUFFIX for libraries that can be built either
32010       # shared or static and use STATIC_* for libraries that are
32011       # always built statically.
32012       if test "x$STATIC_BUILD" = xtrue; then
32013         SHARED_LIBRARY='lib$1.a'
32014         SHARED_LIBRARY_SUFFIX='.a'
32015       else
32016         SHARED_LIBRARY='lib$1.dylib'
32017         SHARED_LIBRARY_SUFFIX='.dylib'
32018       fi
32019     fi
32020   fi
32021 
32022 
32023 
32024 
32025 
32026 
32027 
32028 
32029 
32030 
32031   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32032     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32033 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32034   else
32035     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32036 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32037   fi
32038 
32039 
32040 # User supplied flags should be used when configure detects compilers
32041 
32042   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32043     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32044 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32045   fi
32046 
32047   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32048     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32049 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32050   fi
32051 
32052   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32053     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32054 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32055   fi
32056 
32057 
32058 # Check whether --with-extra-cflags was given.
32059 if test "${with_extra_cflags+set}" = set; then :
32060   withval=$with_extra_cflags;
32061 fi
32062 
32063 
32064 
32065 # Check whether --with-extra-cxxflags was given.
32066 if test "${with_extra_cxxflags+set}" = set; then :
32067   withval=$with_extra_cxxflags;
32068 fi
32069 
32070 
32071 
32072 # Check whether --with-extra-ldflags was given.
32073 if test "${with_extra_ldflags+set}" = set; then :
32074   withval=$with_extra_ldflags;
32075 fi
32076 
32077 
32078   EXTRA_CFLAGS="$with_extra_cflags"
32079   EXTRA_CXXFLAGS="$with_extra_cxxflags"
32080   EXTRA_LDFLAGS="$with_extra_ldflags"
32081 
32082 
32083 
32084 
32085 
32086   # The global CFLAGS and LDLAGS variables are used by configure tests and
32087   # should include the extra parameters
32088   CFLAGS="$EXTRA_CFLAGS"
32089   CXXFLAGS="$EXTRA_CXXFLAGS"
32090   LDFLAGS="$EXTRA_LDFLAGS"
32091   CPPFLAGS=""
32092 
32093 # The sysroot cflags are needed for configure to be able to run the compilers
32094 
32095   if test "x$SYSROOT" != "x"; then
32096     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32097       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32098         # Solaris Studio does not have a concept of sysroot. Instead we must
32099         # make sure the default include and lib dirs are appended to each
32100         # compile and link command line. Must also add -I-xbuiltin to enable
32101         # inlining of system functions and intrinsics.
32102         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32103         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32104             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32105       fi
32106     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32107       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32108       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32109     elif test "x$TOOLCHAIN_TYPE" = xclang; then
32110       SYSROOT_CFLAGS="-isysroot $SYSROOT"
32111       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32112     fi
32113     # The global CFLAGS and LDFLAGS variables need these for configure to function
32114     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32115     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32116     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32117     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32118   fi
32119 
32120   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32121     # We also need -iframework<path>/System/Library/Frameworks
32122     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32123     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32124     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32125     # set this here so it doesn't have to be peppered throughout the forest
32126     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32127     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32128   fi
32129 
32130 
32131 
32132 
32133 
32134 # Then detect the actual binaries needed
32135 
32136   # FIXME: Is this needed?
32137   ac_ext=cpp
32138 ac_cpp='$CXXCPP $CPPFLAGS'
32139 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32140 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32141 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32142 
32143 
32144   # Store the CFLAGS etc passed to the configure script.
32145   ORG_CFLAGS="$CFLAGS"
32146   ORG_CXXFLAGS="$CXXFLAGS"
32147 
32148   # autoconf magic only relies on PATH, so update it if tools dir is specified
32149   OLD_PATH="$PATH"
32150 
32151   # On Windows, we need to detect the visual studio installation first.
32152   # This will change the PATH, but we need to keep that new PATH even
32153   # after toolchain detection is done, since the compiler (on x86) uses
32154   # it for DLL resolution in runtime.
32155   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32156       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32157 
32158   # Store path to cygwin link.exe to help excluding it when searching for
32159   # VS linker. This must be done before changing the PATH when looking for VS.
32160   # Extract the first word of "link", so it can be a program name with args.
32161 set dummy link; ac_word=$2
32162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32163 $as_echo_n "checking for $ac_word... " >&6; }
32164 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32165   $as_echo_n "(cached) " >&6
32166 else
32167   case $CYGWIN_LINK in
32168   [\\/]* | ?:[\\/]*)
32169   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32170   ;;
32171   *)
32172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32173 for as_dir in $PATH
32174 do
32175   IFS=$as_save_IFS
32176   test -z "$as_dir" && as_dir=.
32177     for ac_exec_ext in '' $ac_executable_extensions; do
32178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32179     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32181     break 2
32182   fi
32183 done
32184   done
32185 IFS=$as_save_IFS
32186 
32187   ;;
32188 esac
32189 fi
32190 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32191 if test -n "$CYGWIN_LINK"; then
32192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32193 $as_echo "$CYGWIN_LINK" >&6; }
32194 else
32195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32196 $as_echo "no" >&6; }
32197 fi
32198 
32199 
32200   if test "x$CYGWIN_LINK" != x; then
32201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32202 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32203     "$CYGWIN_LINK" --version > /dev/null
32204     if test $? -eq 0 ; then
32205       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32206 $as_echo "yes" >&6; }
32207     else
32208       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32209 $as_echo "no" >&6; }
32210       # This might be the VS linker. Don't exclude it later on.
32211       CYGWIN_LINK=""
32212     fi
32213   fi
32214 
32215   # First-hand choice is to locate and run the vsvars bat file.
32216 
32217 
32218 # Check whether --with-toolchain-version was given.
32219 if test "${with_toolchain_version+set}" = set; then :
32220   withval=$with_toolchain_version;
32221 fi
32222 
32223 
32224   if test "x$with_toolchain_version" = xlist; then
32225     # List all toolchains
32226     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32227 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32228     for version in $VALID_VS_VERSIONS; do
32229       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32230       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32231     done
32232 
32233     exit 0
32234   elif test "x$DEVKIT_VS_VERSION" != x; then
32235     VS_VERSION=$DEVKIT_VS_VERSION
32236     TOOLCHAIN_VERSION=$VS_VERSION
32237     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32238     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32239     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32240     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32241     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32242     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32243 
32244     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32245     # can still be exported as INCLUDE for compiler invocations without
32246     # SYSROOT_CFLAGS
32247     OLDIFS="$IFS"
32248     IFS=";"
32249     for i in $DEVKIT_VS_INCLUDE; do
32250       ipath=$i
32251 
32252   unix_path="$ipath"
32253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32254     windows_path=`$CYGPATH -m "$unix_path"`
32255     ipath="$windows_path"
32256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32257     windows_path=`cmd //c echo $unix_path`
32258     ipath="$windows_path"
32259   fi
32260 
32261       VS_INCLUDE="$VS_INCLUDE;$ipath"
32262     done
32263     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32264     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32265     for i in $DEVKIT_VS_LIB; do
32266       libpath=$i
32267 
32268   unix_path="$libpath"
32269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32270     windows_path=`$CYGPATH -m "$unix_path"`
32271     libpath="$windows_path"
32272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32273     windows_path=`cmd //c echo $unix_path`
32274     libpath="$windows_path"
32275   fi
32276 
32277       VS_LIB="$VS_LIB;$libpath"
32278     done
32279     IFS="$OLDIFS"
32280 
32281     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32282 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32283 
32284   elif test "x$with_toolchain_version" != x; then
32285     # User override; check that it is valid
32286     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32287       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32288 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32289       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32290 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32291       as_fn_error $? "Cannot continue." "$LINENO" 5
32292     fi
32293     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32294   else
32295     # No flag given, use default
32296     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32297   fi
32298 
32299   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32300 
32301   VS_VERSION="$VS_VERSION"
32302   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32303   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32304   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32305   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32306 
32307   # When using --with-tools-dir, assume it points to the correct and default
32308   # version of Visual Studio or that --with-toolchain-version was also set.
32309   if test "x$with_tools_dir" != x; then
32310 
32311   if test "x$VS_ENV_CMD" = x; then
32312     VS_VERSION="${VS_VERSION}"
32313     VS_BASE="$with_tools_dir/../.."
32314     METHOD="--with-tools-dir"
32315 
32316     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32317       VCVARSFILE="vc/bin/vcvars32.bat"
32318     else
32319       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32320     fi
32321 
32322 
32323   windows_path="$VS_BASE"
32324   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32325     unix_path=`$CYGPATH -u "$windows_path"`
32326     VS_BASE="$unix_path"
32327   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32328     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32329     VS_BASE="$unix_path"
32330   fi
32331 
32332     if test -d "$VS_BASE"; then
32333       if test -f "$VS_BASE/$VCVARSFILE"; then
32334         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32335 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32336         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32337         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32338         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32339         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32340       else
32341         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32342 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32343         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32344 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32345       fi
32346     fi
32347   fi
32348 
32349 
32350   if test "x$VS_ENV_CMD" = x; then
32351     VS_VERSION="${VS_VERSION}"
32352     VS_BASE="$with_tools_dir/../../.."
32353     METHOD="--with-tools-dir"
32354 
32355     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32356       VCVARSFILE="vc/bin/vcvars32.bat"
32357     else
32358       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32359     fi
32360 
32361 
32362   windows_path="$VS_BASE"
32363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32364     unix_path=`$CYGPATH -u "$windows_path"`
32365     VS_BASE="$unix_path"
32366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32367     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32368     VS_BASE="$unix_path"
32369   fi
32370 
32371     if test -d "$VS_BASE"; then
32372       if test -f "$VS_BASE/$VCVARSFILE"; then
32373         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32374 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32375         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32376         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32377         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32378         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32379       else
32380         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32381 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32382         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32383 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32384       fi
32385     fi
32386   fi
32387 
32388     if test "x$VS_ENV_CMD" = x; then
32389       # Having specified an argument which is incorrect will produce an instant failure;
32390       # we should not go on looking
32391       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32392 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32393       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32394 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32395       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32396 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32397       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32398     fi
32399   fi
32400 
32401   VS_ENV_CMD=""
32402   VS_ENV_ARGS=""
32403 
32404   if test "x$VS_COMNTOOLS" != x; then
32405 
32406   if test "x$VS_ENV_CMD" = x; then
32407     VS_VERSION="${VS_VERSION}"
32408     VS_BASE="$VS_COMNTOOLS/../.."
32409     METHOD="$VS_COMNTOOLS_VAR variable"
32410 
32411     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32412       VCVARSFILE="vc/bin/vcvars32.bat"
32413     else
32414       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32415     fi
32416 
32417 
32418   windows_path="$VS_BASE"
32419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32420     unix_path=`$CYGPATH -u "$windows_path"`
32421     VS_BASE="$unix_path"
32422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32424     VS_BASE="$unix_path"
32425   fi
32426 
32427     if test -d "$VS_BASE"; then
32428       if test -f "$VS_BASE/$VCVARSFILE"; then
32429         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32430 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32431         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32432         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32433         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32434         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32435       else
32436         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32437 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32438         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32439 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32440       fi
32441     fi
32442   fi
32443 
32444   fi
32445   if test "x$PROGRAMFILES" != x; then
32446 
32447   if test "x$VS_ENV_CMD" = x; then
32448     VS_VERSION="${VS_VERSION}"
32449     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32450     METHOD="well-known name"
32451 
32452     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32453       VCVARSFILE="vc/bin/vcvars32.bat"
32454     else
32455       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32456     fi
32457 
32458 
32459   windows_path="$VS_BASE"
32460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32461     unix_path=`$CYGPATH -u "$windows_path"`
32462     VS_BASE="$unix_path"
32463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32465     VS_BASE="$unix_path"
32466   fi
32467 
32468     if test -d "$VS_BASE"; then
32469       if test -f "$VS_BASE/$VCVARSFILE"; then
32470         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32471 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32472         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32473         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32474         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32475         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32476       else
32477         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32478 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32479         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32480 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32481       fi
32482     fi
32483   fi
32484 
32485   fi
32486   # Work around the insanely named ProgramFiles(x86) env variable
32487   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32488   if test "x$PROGRAMFILES_X86" != x; then
32489 
32490   if test "x$VS_ENV_CMD" = x; then
32491     VS_VERSION="${VS_VERSION}"
32492     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32493     METHOD="well-known name"
32494 
32495     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32496       VCVARSFILE="vc/bin/vcvars32.bat"
32497     else
32498       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32499     fi
32500 
32501 
32502   windows_path="$VS_BASE"
32503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32504     unix_path=`$CYGPATH -u "$windows_path"`
32505     VS_BASE="$unix_path"
32506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32508     VS_BASE="$unix_path"
32509   fi
32510 
32511     if test -d "$VS_BASE"; then
32512       if test -f "$VS_BASE/$VCVARSFILE"; then
32513         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32514 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32515         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32516         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32517         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32518         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32519       else
32520         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32521 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32522         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32523 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32524       fi
32525     fi
32526   fi
32527 
32528   fi
32529 
32530   if test "x$VS_ENV_CMD" = x; then
32531     VS_VERSION="${VS_VERSION}"
32532     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32533     METHOD="well-known name"
32534 
32535     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32536       VCVARSFILE="vc/bin/vcvars32.bat"
32537     else
32538       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32539     fi
32540 
32541 
32542   windows_path="$VS_BASE"
32543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32544     unix_path=`$CYGPATH -u "$windows_path"`
32545     VS_BASE="$unix_path"
32546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32548     VS_BASE="$unix_path"
32549   fi
32550 
32551     if test -d "$VS_BASE"; then
32552       if test -f "$VS_BASE/$VCVARSFILE"; then
32553         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32554 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32555         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32556         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32557         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32558         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32559       else
32560         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32561 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32562         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32563 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32564       fi
32565     fi
32566   fi
32567 
32568 
32569   if test "x$VS_ENV_CMD" = x; then
32570     VS_VERSION="${VS_VERSION}"
32571     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32572     METHOD="well-known name"
32573 
32574     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32575       VCVARSFILE="vc/bin/vcvars32.bat"
32576     else
32577       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32578     fi
32579 
32580 
32581   windows_path="$VS_BASE"
32582   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32583     unix_path=`$CYGPATH -u "$windows_path"`
32584     VS_BASE="$unix_path"
32585   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32586     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32587     VS_BASE="$unix_path"
32588   fi
32589 
32590     if test -d "$VS_BASE"; then
32591       if test -f "$VS_BASE/$VCVARSFILE"; then
32592         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32593 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32594         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32595         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32596         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32597         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32598       else
32599         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32600 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32601         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32602 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32603       fi
32604     fi
32605   fi
32606 
32607 
32608   if test "x$SDK_INSTALL_DIR" != x; then
32609     if test "x$ProgramW6432" != x; then
32610 
32611   if test "x$VS_ENV_CMD" = x; then
32612     VS_VERSION="${VS_VERSION}"
32613     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32614     METHOD="well-known name"
32615 
32616   windows_path="$WIN_SDK_BASE"
32617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32618     unix_path=`$CYGPATH -u "$windows_path"`
32619     WIN_SDK_BASE="$unix_path"
32620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32622     WIN_SDK_BASE="$unix_path"
32623   fi
32624 
32625     if test -d "$WIN_SDK_BASE"; then
32626       # There have been cases of partial or broken SDK installations. A missing
32627       # lib dir is not going to work.
32628       if test ! -d "$WIN_SDK_BASE/lib"; then
32629         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32630 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32631         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32632 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32633       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32634         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32635 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32636         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32637         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32638           VS_ENV_ARGS="/x86"
32639         else
32640           VS_ENV_ARGS="/x64"
32641         fi
32642         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32643         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32644         # TODO: improve detection for other versions of SDK
32645         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32646       else
32647         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32648 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32649         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32650 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32651       fi
32652     fi
32653   fi
32654 
32655     fi
32656     if test "x$PROGRAMW6432" != x; then
32657 
32658   if test "x$VS_ENV_CMD" = x; then
32659     VS_VERSION="${VS_VERSION}"
32660     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32661     METHOD="well-known name"
32662 
32663   windows_path="$WIN_SDK_BASE"
32664   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32665     unix_path=`$CYGPATH -u "$windows_path"`
32666     WIN_SDK_BASE="$unix_path"
32667   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32668     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32669     WIN_SDK_BASE="$unix_path"
32670   fi
32671 
32672     if test -d "$WIN_SDK_BASE"; then
32673       # There have been cases of partial or broken SDK installations. A missing
32674       # lib dir is not going to work.
32675       if test ! -d "$WIN_SDK_BASE/lib"; then
32676         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32677 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32678         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32679 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32680       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32681         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32682 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32683         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32684         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32685           VS_ENV_ARGS="/x86"
32686         else
32687           VS_ENV_ARGS="/x64"
32688         fi
32689         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32690         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32691         # TODO: improve detection for other versions of SDK
32692         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32693       else
32694         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32695 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32696         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32697 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32698       fi
32699     fi
32700   fi
32701 
32702     fi
32703     if test "x$PROGRAMFILES" != x; then
32704 
32705   if test "x$VS_ENV_CMD" = x; then
32706     VS_VERSION="${VS_VERSION}"
32707     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32708     METHOD="well-known name"
32709 
32710   windows_path="$WIN_SDK_BASE"
32711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32712     unix_path=`$CYGPATH -u "$windows_path"`
32713     WIN_SDK_BASE="$unix_path"
32714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32716     WIN_SDK_BASE="$unix_path"
32717   fi
32718 
32719     if test -d "$WIN_SDK_BASE"; then
32720       # There have been cases of partial or broken SDK installations. A missing
32721       # lib dir is not going to work.
32722       if test ! -d "$WIN_SDK_BASE/lib"; then
32723         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32724 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32725         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32726 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32727       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32728         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32729 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32730         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32731         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32732           VS_ENV_ARGS="/x86"
32733         else
32734           VS_ENV_ARGS="/x64"
32735         fi
32736         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32737         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32738         # TODO: improve detection for other versions of SDK
32739         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32740       else
32741         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32742 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32743         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32744 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32745       fi
32746     fi
32747   fi
32748 
32749     fi
32750 
32751   if test "x$VS_ENV_CMD" = x; then
32752     VS_VERSION="${VS_VERSION}"
32753     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32754     METHOD="well-known name"
32755 
32756   windows_path="$WIN_SDK_BASE"
32757   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32758     unix_path=`$CYGPATH -u "$windows_path"`
32759     WIN_SDK_BASE="$unix_path"
32760   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32761     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32762     WIN_SDK_BASE="$unix_path"
32763   fi
32764 
32765     if test -d "$WIN_SDK_BASE"; then
32766       # There have been cases of partial or broken SDK installations. A missing
32767       # lib dir is not going to work.
32768       if test ! -d "$WIN_SDK_BASE/lib"; then
32769         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32770 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32771         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32772 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32773       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32774         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32775 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32776         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32777         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32778           VS_ENV_ARGS="/x86"
32779         else
32780           VS_ENV_ARGS="/x64"
32781         fi
32782         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32783         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32784         # TODO: improve detection for other versions of SDK
32785         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32786       else
32787         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32788 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32789         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32790 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32791       fi
32792     fi
32793   fi
32794 
32795 
32796   if test "x$VS_ENV_CMD" = x; then
32797     VS_VERSION="${VS_VERSION}"
32798     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32799     METHOD="well-known name"
32800 
32801   windows_path="$WIN_SDK_BASE"
32802   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32803     unix_path=`$CYGPATH -u "$windows_path"`
32804     WIN_SDK_BASE="$unix_path"
32805   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32806     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32807     WIN_SDK_BASE="$unix_path"
32808   fi
32809 
32810     if test -d "$WIN_SDK_BASE"; then
32811       # There have been cases of partial or broken SDK installations. A missing
32812       # lib dir is not going to work.
32813       if test ! -d "$WIN_SDK_BASE/lib"; then
32814         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32815 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32816         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32817 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32818       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32819         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32820 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32821         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32822         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32823           VS_ENV_ARGS="/x86"
32824         else
32825           VS_ENV_ARGS="/x64"
32826         fi
32827         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32828         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32829         # TODO: improve detection for other versions of SDK
32830         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32831       else
32832         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32833 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32834         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32835 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32836       fi
32837     fi
32838   fi
32839 
32840   fi
32841 
32842     if test "x$VS_ENV_CMD" != x; then
32843       TOOLCHAIN_VERSION=$VS_VERSION
32844       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32845       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32846       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32847       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32848       # The rest of the variables are already evaled while probing
32849       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32850 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32851       break
32852     fi
32853   done
32854 
32855 
32856   # If we have a devkit, skip all of the below.
32857   if test "x$DEVKIT_VS_VERSION" = x; then
32858     if test "x$VS_ENV_CMD" != x; then
32859       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32860 
32861   # Only process if variable expands to non-empty
32862 
32863   if test "x$VS_ENV_CMD" != x; then
32864     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32865 
32866   # First separate the path from the arguments. This will split at the first
32867   # space.
32868   complete="$VS_ENV_CMD"
32869   path="${complete%% *}"
32870   tmp="$complete EOL"
32871   arguments="${tmp#* }"
32872 
32873   # Input might be given as Windows format, start by converting to
32874   # unix format.
32875   new_path=`$CYGPATH -u "$path"`
32876 
32877   # Now try to locate executable using which
32878   new_path=`$WHICH "$new_path" 2> /dev/null`
32879   # bat and cmd files are not always considered executable in cygwin causing which
32880   # to not find them
32881   if test "x$new_path" = x \
32882       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32883       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32884     new_path=`$CYGPATH -u "$path"`
32885   fi
32886   if test "x$new_path" = x; then
32887     # Oops. Which didn't find the executable.
32888     # The splitting of arguments from the executable at a space might have been incorrect,
32889     # since paths with space are more likely in Windows. Give it another try with the whole
32890     # argument.
32891     path="$complete"
32892     arguments="EOL"
32893     new_path=`$CYGPATH -u "$path"`
32894     new_path=`$WHICH "$new_path" 2> /dev/null`
32895     # bat and cmd files are not always considered executable in cygwin causing which
32896     # to not find them
32897     if test "x$new_path" = x \
32898         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32899         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32900       new_path=`$CYGPATH -u "$path"`
32901     fi
32902     if test "x$new_path" = x; then
32903       # It's still not found. Now this is an unrecoverable error.
32904       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32905 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32906       has_space=`$ECHO "$complete" | $GREP " "`
32907       if test "x$has_space" != x; then
32908         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32909 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32910       fi
32911       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32912     fi
32913   fi
32914 
32915   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32916   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32917   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32918   # "foo.exe" is OK but "foo" is an error.
32919   #
32920   # This test is therefore slightly more accurate than "test -f" to check for file presence.
32921   # It is also a way to make sure we got the proper file name for the real test later on.
32922   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32923   if test "x$test_shortpath" = x; then
32924     # Short path failed, file does not exist as specified.
32925     # Try adding .exe or .cmd
32926     if test -f "${new_path}.exe"; then
32927       input_to_shortpath="${new_path}.exe"
32928     elif test -f "${new_path}.cmd"; then
32929       input_to_shortpath="${new_path}.cmd"
32930     else
32931       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32932 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32933       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32934 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32935       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32936     fi
32937   else
32938     input_to_shortpath="$new_path"
32939   fi
32940 
32941   # Call helper function which possibly converts this using DOS-style short mode.
32942   # If so, the updated path is stored in $new_path.
32943   new_path="$input_to_shortpath"
32944 
32945   input_path="$input_to_shortpath"
32946   # Check if we need to convert this using DOS-style short mode. If the path
32947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
32948   # take no chances and rewrite it.
32949   # Note: m4 eats our [], so we need to use [ and ] instead.
32950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32951   if test "x$has_forbidden_chars" != x; then
32952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32953     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32954     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32955     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32956       # Going to short mode and back again did indeed matter. Since short mode is
32957       # case insensitive, let's make it lowercase to improve readability.
32958       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32959       # Now convert it back to Unix-style (cygpath)
32960       input_path=`$CYGPATH -u "$shortmode_path"`
32961       new_path="$input_path"
32962     fi
32963   fi
32964 
32965   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32966   if test "x$test_cygdrive_prefix" = x; then
32967     # As a simple fix, exclude /usr/bin since it's not a real path.
32968     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32969       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32970       # a path prefixed by /cygdrive for fixpath to work.
32971       new_path="$CYGWIN_ROOT_PATH$input_path"
32972     fi
32973   fi
32974 
32975   # remove trailing .exe if any
32976   new_path="${new_path/%.exe/}"
32977 
32978     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32979 
32980   # First separate the path from the arguments. This will split at the first
32981   # space.
32982   complete="$VS_ENV_CMD"
32983   path="${complete%% *}"
32984   tmp="$complete EOL"
32985   arguments="${tmp#* }"
32986 
32987   # Input might be given as Windows format, start by converting to
32988   # unix format.
32989   new_path="$path"
32990 
32991   windows_path="$new_path"
32992   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32993     unix_path=`$CYGPATH -u "$windows_path"`
32994     new_path="$unix_path"
32995   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32996     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32997     new_path="$unix_path"
32998   fi
32999 
33000 
33001   # Now try to locate executable using which
33002   new_path=`$WHICH "$new_path" 2> /dev/null`
33003 
33004   if test "x$new_path" = x; then
33005     # Oops. Which didn't find the executable.
33006     # The splitting of arguments from the executable at a space might have been incorrect,
33007     # since paths with space are more likely in Windows. Give it another try with the whole
33008     # argument.
33009     path="$complete"
33010     arguments="EOL"
33011     new_path="$path"
33012 
33013   windows_path="$new_path"
33014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33015     unix_path=`$CYGPATH -u "$windows_path"`
33016     new_path="$unix_path"
33017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33019     new_path="$unix_path"
33020   fi
33021 
33022 
33023     new_path=`$WHICH "$new_path" 2> /dev/null`
33024     # bat and cmd files are not always considered executable in MSYS causing which
33025     # to not find them
33026     if test "x$new_path" = x \
33027         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33028         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33029       new_path="$path"
33030 
33031   windows_path="$new_path"
33032   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33033     unix_path=`$CYGPATH -u "$windows_path"`
33034     new_path="$unix_path"
33035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33036     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33037     new_path="$unix_path"
33038   fi
33039 
33040     fi
33041 
33042     if test "x$new_path" = x; then
33043       # It's still not found. Now this is an unrecoverable error.
33044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33045 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33046       has_space=`$ECHO "$complete" | $GREP " "`
33047       if test "x$has_space" != x; then
33048         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33049 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33050       fi
33051       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33052     fi
33053   fi
33054 
33055   # Now new_path has a complete unix path to the binary
33056   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33057     # Keep paths in /bin as-is, but remove trailing .exe if any
33058     new_path="${new_path/%.exe/}"
33059     # Do not save /bin paths to all_fixpath_prefixes!
33060   else
33061     # Not in mixed or Windows style, start by that.
33062     new_path=`cmd //c echo $new_path`
33063 
33064   input_path="$new_path"
33065   # Check if we need to convert this using DOS-style short mode. If the path
33066   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33067   # take no chances and rewrite it.
33068   # Note: m4 eats our [], so we need to use [ and ] instead.
33069   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33070   if test "x$has_forbidden_chars" != x; then
33071     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33072     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33073   fi
33074 
33075     # Output is in $new_path
33076 
33077   windows_path="$new_path"
33078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33079     unix_path=`$CYGPATH -u "$windows_path"`
33080     new_path="$unix_path"
33081   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33082     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33083     new_path="$unix_path"
33084   fi
33085 
33086     # remove trailing .exe if any
33087     new_path="${new_path/%.exe/}"
33088 
33089     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33090     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33091   fi
33092 
33093     else
33094       # We're on a unix platform. Hooray! :)
33095       # First separate the path from the arguments. This will split at the first
33096       # space.
33097       complete="$VS_ENV_CMD"
33098       path="${complete%% *}"
33099       tmp="$complete EOL"
33100       arguments="${tmp#* }"
33101 
33102       # Cannot rely on the command "which" here since it doesn't always work.
33103       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33104       if test -z "$is_absolute_path"; then
33105         # Path to executable is not absolute. Find it.
33106         IFS_save="$IFS"
33107         IFS=:
33108         for p in $PATH; do
33109           if test -f "$p/$path" && test -x "$p/$path"; then
33110             new_path="$p/$path"
33111             break
33112           fi
33113         done
33114         IFS="$IFS_save"
33115       else
33116         # This is an absolute path, we can use it without further modifications.
33117         new_path="$path"
33118       fi
33119 
33120       if test "x$new_path" = x; then
33121         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33122 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33123         has_space=`$ECHO "$complete" | $GREP " "`
33124         if test "x$has_space" != x; then
33125           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33126 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33127         fi
33128         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33129       fi
33130     fi
33131 
33132     # Now join together the path and the arguments once again
33133     if test "x$arguments" != xEOL; then
33134       new_complete="$new_path ${arguments% *}"
33135     else
33136       new_complete="$new_path"
33137     fi
33138 
33139     if test "x$complete" != "x$new_complete"; then
33140       VS_ENV_CMD="$new_complete"
33141       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33142 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33143     fi
33144   fi
33145 
33146 
33147       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33148       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33149 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33150 
33151       # We need to create a couple of temporary files.
33152       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33153       $MKDIR -p $VS_ENV_TMP_DIR
33154 
33155       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33156       # Instead create a shell script which will set the relevant variables when run.
33157       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33158 
33159   unix_path="$WINPATH_VS_ENV_CMD"
33160   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33161     windows_path=`$CYGPATH -m "$unix_path"`
33162     WINPATH_VS_ENV_CMD="$windows_path"
33163   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33164     windows_path=`cmd //c echo $unix_path`
33165     WINPATH_VS_ENV_CMD="$windows_path"
33166   fi
33167 
33168       WINPATH_BASH="$BASH"
33169 
33170   unix_path="$WINPATH_BASH"
33171   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33172     windows_path=`$CYGPATH -m "$unix_path"`
33173     WINPATH_BASH="$windows_path"
33174   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33175     windows_path=`cmd //c echo $unix_path`
33176     WINPATH_BASH="$windows_path"
33177   fi
33178 
33179 
33180       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33181       # script (executable by bash) that will setup the important variables.
33182       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33183       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33184       # This will end up something like:
33185       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33186       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33187       # These will end up something like:
33188       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33189       # The trailing space for everyone except PATH is no typo, but is needed due
33190       # to trailing \ in the Windows paths. These will be stripped later.
33191       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33192           >> $EXTRACT_VC_ENV_BAT_FILE
33193       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33194           >> $EXTRACT_VC_ENV_BAT_FILE
33195       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33196           >> $EXTRACT_VC_ENV_BAT_FILE
33197       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33198           >> $EXTRACT_VC_ENV_BAT_FILE
33199       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33200           >> $EXTRACT_VC_ENV_BAT_FILE
33201       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33202           >> $EXTRACT_VC_ENV_BAT_FILE
33203 
33204       # Now execute the newly created bat file.
33205       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33206       # Change directory so we don't need to mess with Windows paths in redirects.
33207       cd $VS_ENV_TMP_DIR
33208       cmd /c extract-vs-env.bat | $CAT
33209       cd $CURDIR
33210 
33211       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33212         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33213 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33214         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33215 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33216         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33217 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33218         as_fn_error $? "Cannot continue" "$LINENO" 5
33219       fi
33220 
33221       # Now set all paths and other env variables. This will allow the rest of
33222       # the configure script to find and run the compiler in the proper way.
33223       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33224 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33225       . $VS_ENV_TMP_DIR/set-vs-env.sh
33226       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33227       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33228     else
33229       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33230       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33231 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33232     fi
33233   fi
33234 
33235   # At this point, we should have correct variables in the environment, or we can't continue.
33236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33237 $as_echo_n "checking for Visual Studio variables... " >&6; }
33238 
33239   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33240       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33241     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33242       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33243 $as_echo "present but broken" >&6; }
33244       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33245     else
33246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33247 $as_echo "ok" >&6; }
33248       # Remove any trailing "\" ";" and " " from the variables.
33249       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33250       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33251       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33252       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33253       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33254       # Remove any paths containing # (typically F#) as that messes up make. This
33255       # is needed if visual studio was installed with F# support.
33256       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33257 
33258 
33259 
33260 
33261 
33262       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33263       OLDIFS="$IFS"
33264       IFS=";"
33265       for i in $VS_INCLUDE; do
33266         ipath=$i
33267         # Only process non-empty elements
33268         if test "x$ipath" != x; then
33269           IFS="$OLDIFS"
33270           # Check that directory exists before calling fixup_path
33271           testpath=$ipath
33272 
33273   windows_path="$testpath"
33274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33275     unix_path=`$CYGPATH -u "$windows_path"`
33276     testpath="$unix_path"
33277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33279     testpath="$unix_path"
33280   fi
33281 
33282           if test -d "$testpath"; then
33283 
33284   # Only process if variable expands to non-empty
33285 
33286   if test "x$ipath" != x; then
33287     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33288 
33289   # Input might be given as Windows format, start by converting to
33290   # unix format.
33291   path="$ipath"
33292   new_path=`$CYGPATH -u "$path"`
33293 
33294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33297   # "foo.exe" is OK but "foo" is an error.
33298   #
33299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33300   # It is also a way to make sure we got the proper file name for the real test later on.
33301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33302   if test "x$test_shortpath" = x; then
33303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33304 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33305     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33306   fi
33307 
33308   # Call helper function which possibly converts this using DOS-style short mode.
33309   # If so, the updated path is stored in $new_path.
33310 
33311   input_path="$new_path"
33312   # Check if we need to convert this using DOS-style short mode. If the path
33313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33314   # take no chances and rewrite it.
33315   # Note: m4 eats our [], so we need to use [ and ] instead.
33316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33317   if test "x$has_forbidden_chars" != x; then
33318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33322       # Going to short mode and back again did indeed matter. Since short mode is
33323       # case insensitive, let's make it lowercase to improve readability.
33324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33325       # Now convert it back to Unix-style (cygpath)
33326       input_path=`$CYGPATH -u "$shortmode_path"`
33327       new_path="$input_path"
33328     fi
33329   fi
33330 
33331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33332   if test "x$test_cygdrive_prefix" = x; then
33333     # As a simple fix, exclude /usr/bin since it's not a real path.
33334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33336       # a path prefixed by /cygdrive for fixpath to work.
33337       new_path="$CYGWIN_ROOT_PATH$input_path"
33338     fi
33339   fi
33340 
33341 
33342   if test "x$path" != "x$new_path"; then
33343     ipath="$new_path"
33344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33345 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33346   fi
33347 
33348     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349 
33350   path="$ipath"
33351   has_colon=`$ECHO $path | $GREP ^.:`
33352   new_path="$path"
33353   if test "x$has_colon" = x; then
33354     # Not in mixed or Windows style, start by that.
33355     new_path=`cmd //c echo $path`
33356   fi
33357 
33358 
33359   input_path="$new_path"
33360   # Check if we need to convert this using DOS-style short mode. If the path
33361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33362   # take no chances and rewrite it.
33363   # Note: m4 eats our [], so we need to use [ and ] instead.
33364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33365   if test "x$has_forbidden_chars" != x; then
33366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33368   fi
33369 
33370 
33371   windows_path="$new_path"
33372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33373     unix_path=`$CYGPATH -u "$windows_path"`
33374     new_path="$unix_path"
33375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33377     new_path="$unix_path"
33378   fi
33379 
33380   if test "x$path" != "x$new_path"; then
33381     ipath="$new_path"
33382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33383 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33384   fi
33385 
33386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33388 
33389     else
33390       # We're on a unix platform. Hooray! :)
33391       path="$ipath"
33392       has_space=`$ECHO "$path" | $GREP " "`
33393       if test "x$has_space" != x; then
33394         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33395 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33396         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33397       fi
33398 
33399       # Use eval to expand a potential ~
33400       eval path="$path"
33401       if test ! -f "$path" && test ! -d "$path"; then
33402         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33403       fi
33404 
33405       if test -d "$path"; then
33406         ipath="`cd "$path"; $THEPWDCMD -L`"
33407       else
33408         dir="`$DIRNAME "$path"`"
33409         base="`$BASENAME "$path"`"
33410         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33411       fi
33412     fi
33413   fi
33414 
33415             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33416           fi
33417           IFS=";"
33418         fi
33419       done
33420       # Convert VS_LIB into SYSROOT_LDFLAGS
33421       for i in $VS_LIB; do
33422         libpath=$i
33423         # Only process non-empty elements
33424         if test "x$libpath" != x; then
33425           IFS="$OLDIFS"
33426           # Check that directory exists before calling fixup_path
33427           testpath=$libpath
33428 
33429   windows_path="$testpath"
33430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33431     unix_path=`$CYGPATH -u "$windows_path"`
33432     testpath="$unix_path"
33433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33435     testpath="$unix_path"
33436   fi
33437 
33438           if test -d "$testpath"; then
33439 
33440   # Only process if variable expands to non-empty
33441 
33442   if test "x$libpath" != x; then
33443     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33444 
33445   # Input might be given as Windows format, start by converting to
33446   # unix format.
33447   path="$libpath"
33448   new_path=`$CYGPATH -u "$path"`
33449 
33450   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33451   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33452   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33453   # "foo.exe" is OK but "foo" is an error.
33454   #
33455   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33456   # It is also a way to make sure we got the proper file name for the real test later on.
33457   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33458   if test "x$test_shortpath" = x; then
33459     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33460 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33461     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33462   fi
33463 
33464   # Call helper function which possibly converts this using DOS-style short mode.
33465   # If so, the updated path is stored in $new_path.
33466 
33467   input_path="$new_path"
33468   # Check if we need to convert this using DOS-style short mode. If the path
33469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33470   # take no chances and rewrite it.
33471   # Note: m4 eats our [], so we need to use [ and ] instead.
33472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33473   if test "x$has_forbidden_chars" != x; then
33474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33478       # Going to short mode and back again did indeed matter. Since short mode is
33479       # case insensitive, let's make it lowercase to improve readability.
33480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33481       # Now convert it back to Unix-style (cygpath)
33482       input_path=`$CYGPATH -u "$shortmode_path"`
33483       new_path="$input_path"
33484     fi
33485   fi
33486 
33487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33488   if test "x$test_cygdrive_prefix" = x; then
33489     # As a simple fix, exclude /usr/bin since it's not a real path.
33490     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33492       # a path prefixed by /cygdrive for fixpath to work.
33493       new_path="$CYGWIN_ROOT_PATH$input_path"
33494     fi
33495   fi
33496 
33497 
33498   if test "x$path" != "x$new_path"; then
33499     libpath="$new_path"
33500     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33501 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33502   fi
33503 
33504     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33505 
33506   path="$libpath"
33507   has_colon=`$ECHO $path | $GREP ^.:`
33508   new_path="$path"
33509   if test "x$has_colon" = x; then
33510     # Not in mixed or Windows style, start by that.
33511     new_path=`cmd //c echo $path`
33512   fi
33513 
33514 
33515   input_path="$new_path"
33516   # Check if we need to convert this using DOS-style short mode. If the path
33517   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33518   # take no chances and rewrite it.
33519   # Note: m4 eats our [], so we need to use [ and ] instead.
33520   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33521   if test "x$has_forbidden_chars" != x; then
33522     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33523     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33524   fi
33525 
33526 
33527   windows_path="$new_path"
33528   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33529     unix_path=`$CYGPATH -u "$windows_path"`
33530     new_path="$unix_path"
33531   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33532     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33533     new_path="$unix_path"
33534   fi
33535 
33536   if test "x$path" != "x$new_path"; then
33537     libpath="$new_path"
33538     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33539 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33540   fi
33541 
33542   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33543   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33544 
33545     else
33546       # We're on a unix platform. Hooray! :)
33547       path="$libpath"
33548       has_space=`$ECHO "$path" | $GREP " "`
33549       if test "x$has_space" != x; then
33550         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33551 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33552         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33553       fi
33554 
33555       # Use eval to expand a potential ~
33556       eval path="$path"
33557       if test ! -f "$path" && test ! -d "$path"; then
33558         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33559       fi
33560 
33561       if test -d "$path"; then
33562         libpath="`cd "$path"; $THEPWDCMD -L`"
33563       else
33564         dir="`$DIRNAME "$path"`"
33565         base="`$BASENAME "$path"`"
33566         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33567       fi
33568     fi
33569   fi
33570 
33571             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33572           fi
33573           IFS=";"
33574         fi
33575       done
33576       IFS="$OLDIFS"
33577     fi
33578   else
33579     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33580 $as_echo "not found" >&6; }
33581 
33582     if test "x$VS_ENV_CMD" = x; then
33583       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33584 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33585       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33586 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33587     else
33588       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33589 $as_echo "$as_me: Running the extraction script failed." >&6;}
33590     fi
33591     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33592 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33593     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33594 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33595     as_fn_error $? "Cannot continue" "$LINENO" 5
33596   fi
33597 
33598     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33599     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33600     PATH="$VS_PATH"
33601     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33602     export INCLUDE="$VS_INCLUDE"
33603     export LIB="$VS_LIB"
33604   else
33605     if test "x$XCODE_VERSION_OUTPUT" != x; then
33606       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33607       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33608       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33609     else
33610       # Currently we do not define this for other toolchains. This might change as the need arise.
33611       TOOLCHAIN_VERSION=
33612     fi
33613   fi
33614 
33615 
33616   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33617   # override all other locations.
33618   if test "x$TOOLCHAIN_PATH" != x; then
33619     PATH=$TOOLCHAIN_PATH:$PATH
33620   fi
33621 
33622 
33623   #
33624   # Setup the compilers (CC and CXX)
33625   #
33626 
33627   COMPILER_NAME=C
33628   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33629 
33630   if test "x$CC" != x; then
33631     # User has supplied compiler name already, always let that override.
33632     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33633 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33634     if test "x`basename $CC`" = "x$CC"; then
33635       # A command without a complete path is provided, search $PATH.
33636 
33637       for ac_prog in $CC
33638 do
33639   # Extract the first word of "$ac_prog", so it can be a program name with args.
33640 set dummy $ac_prog; ac_word=$2
33641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33642 $as_echo_n "checking for $ac_word... " >&6; }
33643 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33644   $as_echo_n "(cached) " >&6
33645 else
33646   case $POTENTIAL_CC in
33647   [\\/]* | ?:[\\/]*)
33648   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33649   ;;
33650   *)
33651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33652 for as_dir in $PATH
33653 do
33654   IFS=$as_save_IFS
33655   test -z "$as_dir" && as_dir=.
33656     for ac_exec_ext in '' $ac_executable_extensions; do
33657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33658     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33660     break 2
33661   fi
33662 done
33663   done
33664 IFS=$as_save_IFS
33665 
33666   ;;
33667 esac
33668 fi
33669 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33670 if test -n "$POTENTIAL_CC"; then
33671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33672 $as_echo "$POTENTIAL_CC" >&6; }
33673 else
33674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33675 $as_echo "no" >&6; }
33676 fi
33677 
33678 
33679   test -n "$POTENTIAL_CC" && break
33680 done
33681 
33682       if test "x$POTENTIAL_CC" != x; then
33683         CC=$POTENTIAL_CC
33684       else
33685         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33686       fi
33687     else
33688       # Otherwise it might already be a complete path
33689       if test ! -x "$CC"; then
33690         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33691       fi
33692     fi
33693   else
33694     # No user supplied value. Locate compiler ourselves.
33695 
33696     # If we are cross compiling, assume cross compilation tools follows the
33697     # cross compilation standard where they are prefixed with the autoconf
33698     # standard name for the target. For example the binary
33699     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33700     # If we are not cross compiling, then the default compiler name will be
33701     # used.
33702 
33703     CC=
33704     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33705     # before checking the rest of the PATH.
33706     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33707     # step, this should not be necessary.
33708     if test -n "$TOOLCHAIN_PATH"; then
33709       PATH_save="$PATH"
33710       PATH="$TOOLCHAIN_PATH"
33711       if test -n "$ac_tool_prefix"; then
33712   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33713 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33715 $as_echo_n "checking for $ac_word... " >&6; }
33716 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33717   $as_echo_n "(cached) " >&6
33718 else
33719   case $TOOLCHAIN_PATH_CC in
33720   [\\/]* | ?:[\\/]*)
33721   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33722   ;;
33723   *)
33724   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33725 for as_dir in $PATH
33726 do
33727   IFS=$as_save_IFS
33728   test -z "$as_dir" && as_dir=.
33729     for ac_exec_ext in '' $ac_executable_extensions; do
33730   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33731     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33732     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33733     break 2
33734   fi
33735 done
33736   done
33737 IFS=$as_save_IFS
33738 
33739   ;;
33740 esac
33741 fi
33742 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33743 if test -n "$TOOLCHAIN_PATH_CC"; then
33744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33745 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33746 else
33747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33748 $as_echo "no" >&6; }
33749 fi
33750 
33751 
33752 fi
33753 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33754   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33755   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33756 set dummy $SEARCH_LIST; ac_word=$2
33757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33758 $as_echo_n "checking for $ac_word... " >&6; }
33759 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33760   $as_echo_n "(cached) " >&6
33761 else
33762   case $ac_pt_TOOLCHAIN_PATH_CC in
33763   [\\/]* | ?:[\\/]*)
33764   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33765   ;;
33766   *)
33767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33768 for as_dir in $PATH
33769 do
33770   IFS=$as_save_IFS
33771   test -z "$as_dir" && as_dir=.
33772     for ac_exec_ext in '' $ac_executable_extensions; do
33773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33774     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33776     break 2
33777   fi
33778 done
33779   done
33780 IFS=$as_save_IFS
33781 
33782   ;;
33783 esac
33784 fi
33785 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33786 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33788 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33789 else
33790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33791 $as_echo "no" >&6; }
33792 fi
33793 
33794   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33795     TOOLCHAIN_PATH_CC=""
33796   else
33797     case $cross_compiling:$ac_tool_warned in
33798 yes:)
33799 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33800 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33801 ac_tool_warned=yes ;;
33802 esac
33803     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33804   fi
33805 else
33806   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33807 fi
33808 
33809       CC=$TOOLCHAIN_PATH_CC
33810       PATH="$PATH_save"
33811     fi
33812 
33813     # AC_PATH_TOOL can't be run multiple times with the same variable,
33814     # so create a new name for this run.
33815     if test "x$CC" = x; then
33816       if test -n "$ac_tool_prefix"; then
33817   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33818 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33820 $as_echo_n "checking for $ac_word... " >&6; }
33821 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33822   $as_echo_n "(cached) " >&6
33823 else
33824   case $POTENTIAL_CC in
33825   [\\/]* | ?:[\\/]*)
33826   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33827   ;;
33828   *)
33829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33830 for as_dir in $PATH
33831 do
33832   IFS=$as_save_IFS
33833   test -z "$as_dir" && as_dir=.
33834     for ac_exec_ext in '' $ac_executable_extensions; do
33835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33836     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33838     break 2
33839   fi
33840 done
33841   done
33842 IFS=$as_save_IFS
33843 
33844   ;;
33845 esac
33846 fi
33847 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33848 if test -n "$POTENTIAL_CC"; then
33849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33850 $as_echo "$POTENTIAL_CC" >&6; }
33851 else
33852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33853 $as_echo "no" >&6; }
33854 fi
33855 
33856 
33857 fi
33858 if test -z "$ac_cv_path_POTENTIAL_CC"; then
33859   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33860   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33861 set dummy $SEARCH_LIST; ac_word=$2
33862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33863 $as_echo_n "checking for $ac_word... " >&6; }
33864 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33865   $as_echo_n "(cached) " >&6
33866 else
33867   case $ac_pt_POTENTIAL_CC in
33868   [\\/]* | ?:[\\/]*)
33869   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33870   ;;
33871   *)
33872   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33873 for as_dir in $PATH
33874 do
33875   IFS=$as_save_IFS
33876   test -z "$as_dir" && as_dir=.
33877     for ac_exec_ext in '' $ac_executable_extensions; do
33878   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33879     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33880     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33881     break 2
33882   fi
33883 done
33884   done
33885 IFS=$as_save_IFS
33886 
33887   ;;
33888 esac
33889 fi
33890 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33891 if test -n "$ac_pt_POTENTIAL_CC"; then
33892   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33893 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33894 else
33895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33896 $as_echo "no" >&6; }
33897 fi
33898 
33899   if test "x$ac_pt_POTENTIAL_CC" = x; then
33900     POTENTIAL_CC=""
33901   else
33902     case $cross_compiling:$ac_tool_warned in
33903 yes:)
33904 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33905 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33906 ac_tool_warned=yes ;;
33907 esac
33908     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33909   fi
33910 else
33911   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33912 fi
33913 
33914       CC=$POTENTIAL_CC
33915     fi
33916 
33917     if test "x$CC" = x; then
33918 
33919   # Print a helpful message on how to acquire the necessary build dependency.
33920   # devkit is the help tag: freetype, cups, alsa etc
33921   MISSING_DEPENDENCY=devkit
33922 
33923   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924     cygwin_help $MISSING_DEPENDENCY
33925   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33926     msys_help $MISSING_DEPENDENCY
33927   else
33928     PKGHANDLER_COMMAND=
33929 
33930     case $PKGHANDLER in
33931       apt-get)
33932         apt_help     $MISSING_DEPENDENCY ;;
33933       yum)
33934         yum_help     $MISSING_DEPENDENCY ;;
33935       brew)
33936         brew_help    $MISSING_DEPENDENCY ;;
33937       port)
33938         port_help    $MISSING_DEPENDENCY ;;
33939       pkgutil)
33940         pkgutil_help $MISSING_DEPENDENCY ;;
33941       pkgadd)
33942         pkgadd_help  $MISSING_DEPENDENCY ;;
33943     esac
33944 
33945     if test "x$PKGHANDLER_COMMAND" != x; then
33946       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33947     fi
33948   fi
33949 
33950       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33951     fi
33952   fi
33953 
33954   # Now we have a compiler binary in CC. Make sure it's okay.
33955 
33956   # Only process if variable expands to non-empty
33957 
33958   if test "x$CC" != x; then
33959     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33960 
33961   # First separate the path from the arguments. This will split at the first
33962   # space.
33963   complete="$CC"
33964   path="${complete%% *}"
33965   tmp="$complete EOL"
33966   arguments="${tmp#* }"
33967 
33968   # Input might be given as Windows format, start by converting to
33969   # unix format.
33970   new_path=`$CYGPATH -u "$path"`
33971 
33972   # Now try to locate executable using which
33973   new_path=`$WHICH "$new_path" 2> /dev/null`
33974   # bat and cmd files are not always considered executable in cygwin causing which
33975   # to not find them
33976   if test "x$new_path" = x \
33977       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33978       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33979     new_path=`$CYGPATH -u "$path"`
33980   fi
33981   if test "x$new_path" = x; then
33982     # Oops. Which didn't find the executable.
33983     # The splitting of arguments from the executable at a space might have been incorrect,
33984     # since paths with space are more likely in Windows. Give it another try with the whole
33985     # argument.
33986     path="$complete"
33987     arguments="EOL"
33988     new_path=`$CYGPATH -u "$path"`
33989     new_path=`$WHICH "$new_path" 2> /dev/null`
33990     # bat and cmd files are not always considered executable in cygwin causing which
33991     # to not find them
33992     if test "x$new_path" = x \
33993         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33994         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33995       new_path=`$CYGPATH -u "$path"`
33996     fi
33997     if test "x$new_path" = x; then
33998       # It's still not found. Now this is an unrecoverable error.
33999       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34000 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34001       has_space=`$ECHO "$complete" | $GREP " "`
34002       if test "x$has_space" != x; then
34003         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34004 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34005       fi
34006       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34007     fi
34008   fi
34009 
34010   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34011   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34012   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34013   # "foo.exe" is OK but "foo" is an error.
34014   #
34015   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34016   # It is also a way to make sure we got the proper file name for the real test later on.
34017   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34018   if test "x$test_shortpath" = x; then
34019     # Short path failed, file does not exist as specified.
34020     # Try adding .exe or .cmd
34021     if test -f "${new_path}.exe"; then
34022       input_to_shortpath="${new_path}.exe"
34023     elif test -f "${new_path}.cmd"; then
34024       input_to_shortpath="${new_path}.cmd"
34025     else
34026       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34027 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34028       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34029 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34030       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34031     fi
34032   else
34033     input_to_shortpath="$new_path"
34034   fi
34035 
34036   # Call helper function which possibly converts this using DOS-style short mode.
34037   # If so, the updated path is stored in $new_path.
34038   new_path="$input_to_shortpath"
34039 
34040   input_path="$input_to_shortpath"
34041   # Check if we need to convert this using DOS-style short mode. If the path
34042   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34043   # take no chances and rewrite it.
34044   # Note: m4 eats our [], so we need to use [ and ] instead.
34045   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34046   if test "x$has_forbidden_chars" != x; then
34047     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34048     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34049     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34050     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34051       # Going to short mode and back again did indeed matter. Since short mode is
34052       # case insensitive, let's make it lowercase to improve readability.
34053       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34054       # Now convert it back to Unix-style (cygpath)
34055       input_path=`$CYGPATH -u "$shortmode_path"`
34056       new_path="$input_path"
34057     fi
34058   fi
34059 
34060   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34061   if test "x$test_cygdrive_prefix" = x; then
34062     # As a simple fix, exclude /usr/bin since it's not a real path.
34063     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34064       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34065       # a path prefixed by /cygdrive for fixpath to work.
34066       new_path="$CYGWIN_ROOT_PATH$input_path"
34067     fi
34068   fi
34069 
34070   # remove trailing .exe if any
34071   new_path="${new_path/%.exe/}"
34072 
34073     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34074 
34075   # First separate the path from the arguments. This will split at the first
34076   # space.
34077   complete="$CC"
34078   path="${complete%% *}"
34079   tmp="$complete EOL"
34080   arguments="${tmp#* }"
34081 
34082   # Input might be given as Windows format, start by converting to
34083   # unix format.
34084   new_path="$path"
34085 
34086   windows_path="$new_path"
34087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34088     unix_path=`$CYGPATH -u "$windows_path"`
34089     new_path="$unix_path"
34090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34092     new_path="$unix_path"
34093   fi
34094 
34095 
34096   # Now try to locate executable using which
34097   new_path=`$WHICH "$new_path" 2> /dev/null`
34098 
34099   if test "x$new_path" = x; then
34100     # Oops. Which didn't find the executable.
34101     # The splitting of arguments from the executable at a space might have been incorrect,
34102     # since paths with space are more likely in Windows. Give it another try with the whole
34103     # argument.
34104     path="$complete"
34105     arguments="EOL"
34106     new_path="$path"
34107 
34108   windows_path="$new_path"
34109   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34110     unix_path=`$CYGPATH -u "$windows_path"`
34111     new_path="$unix_path"
34112   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34113     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34114     new_path="$unix_path"
34115   fi
34116 
34117 
34118     new_path=`$WHICH "$new_path" 2> /dev/null`
34119     # bat and cmd files are not always considered executable in MSYS causing which
34120     # to not find them
34121     if test "x$new_path" = x \
34122         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34123         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34124       new_path="$path"
34125 
34126   windows_path="$new_path"
34127   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34128     unix_path=`$CYGPATH -u "$windows_path"`
34129     new_path="$unix_path"
34130   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34131     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34132     new_path="$unix_path"
34133   fi
34134 
34135     fi
34136 
34137     if test "x$new_path" = x; then
34138       # It's still not found. Now this is an unrecoverable error.
34139       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34140 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34141       has_space=`$ECHO "$complete" | $GREP " "`
34142       if test "x$has_space" != x; then
34143         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34144 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34145       fi
34146       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34147     fi
34148   fi
34149 
34150   # Now new_path has a complete unix path to the binary
34151   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34152     # Keep paths in /bin as-is, but remove trailing .exe if any
34153     new_path="${new_path/%.exe/}"
34154     # Do not save /bin paths to all_fixpath_prefixes!
34155   else
34156     # Not in mixed or Windows style, start by that.
34157     new_path=`cmd //c echo $new_path`
34158 
34159   input_path="$new_path"
34160   # Check if we need to convert this using DOS-style short mode. If the path
34161   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34162   # take no chances and rewrite it.
34163   # Note: m4 eats our [], so we need to use [ and ] instead.
34164   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34165   if test "x$has_forbidden_chars" != x; then
34166     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34167     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34168   fi
34169 
34170     # Output is in $new_path
34171 
34172   windows_path="$new_path"
34173   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34174     unix_path=`$CYGPATH -u "$windows_path"`
34175     new_path="$unix_path"
34176   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34177     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34178     new_path="$unix_path"
34179   fi
34180 
34181     # remove trailing .exe if any
34182     new_path="${new_path/%.exe/}"
34183 
34184     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34185     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34186   fi
34187 
34188     else
34189       # We're on a unix platform. Hooray! :)
34190       # First separate the path from the arguments. This will split at the first
34191       # space.
34192       complete="$CC"
34193       path="${complete%% *}"
34194       tmp="$complete EOL"
34195       arguments="${tmp#* }"
34196 
34197       # Cannot rely on the command "which" here since it doesn't always work.
34198       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34199       if test -z "$is_absolute_path"; then
34200         # Path to executable is not absolute. Find it.
34201         IFS_save="$IFS"
34202         IFS=:
34203         for p in $PATH; do
34204           if test -f "$p/$path" && test -x "$p/$path"; then
34205             new_path="$p/$path"
34206             break
34207           fi
34208         done
34209         IFS="$IFS_save"
34210       else
34211         # This is an absolute path, we can use it without further modifications.
34212         new_path="$path"
34213       fi
34214 
34215       if test "x$new_path" = x; then
34216         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34217 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34218         has_space=`$ECHO "$complete" | $GREP " "`
34219         if test "x$has_space" != x; then
34220           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34221 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34222         fi
34223         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34224       fi
34225     fi
34226 
34227     # Now join together the path and the arguments once again
34228     if test "x$arguments" != xEOL; then
34229       new_complete="$new_path ${arguments% *}"
34230     else
34231       new_complete="$new_path"
34232     fi
34233 
34234     if test "x$complete" != "x$new_complete"; then
34235       CC="$new_complete"
34236       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34237 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34238     fi
34239   fi
34240 
34241   TEST_COMPILER="$CC"
34242 
34243   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34244 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34245   SYMLINK_ORIGINAL="$TEST_COMPILER"
34246 
34247   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34248     # Follow a chain of symbolic links. Use readlink
34249     # where it exists, else fall back to horribly
34250     # complicated shell code.
34251     if test "x$READLINK_TESTED" != yes; then
34252       # On MacOSX there is a readlink tool with a different
34253       # purpose than the GNU readlink tool. Check the found readlink.
34254       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34255       if test "x$ISGNU" = x; then
34256         # A readlink that we do not know how to use.
34257         # Are there other non-GNU readlinks out there?
34258         READLINK_TESTED=yes
34259         READLINK=
34260       fi
34261     fi
34262 
34263     if test "x$READLINK" != x; then
34264       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34265     else
34266       # Save the current directory for restoring afterwards
34267       STARTDIR=$PWD
34268       COUNTER=0
34269       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34270       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34271       cd $sym_link_dir
34272       # Use -P flag to resolve symlinks in directories.
34273       cd `$THEPWDCMD -P`
34274       sym_link_dir=`$THEPWDCMD -P`
34275       # Resolve file symlinks
34276       while test $COUNTER -lt 20; do
34277         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34278         if test "x$ISLINK" == x; then
34279           # This is not a symbolic link! We are done!
34280           break
34281         fi
34282         # Again resolve directory symlinks since the target of the just found
34283         # link could be in a different directory
34284         cd `$DIRNAME $ISLINK`
34285         sym_link_dir=`$THEPWDCMD -P`
34286         sym_link_file=`$BASENAME $ISLINK`
34287         let COUNTER=COUNTER+1
34288       done
34289       cd $STARTDIR
34290       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34291     fi
34292   fi
34293 
34294   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34295     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34296 $as_echo "no symlink" >&6; }
34297   else
34298     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34299 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34300 
34301     # We can't handle ccache by gcc wrappers, since we need to know if we're
34302     # using ccache. Instead ccache usage must be controlled by a configure option.
34303     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34304     if test "x$COMPILER_BASENAME" = "xccache"; then
34305       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34306 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34307       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34308     fi
34309   fi
34310 
34311 
34312   COMPILER=$CC
34313   COMPILER_NAME=$COMPILER_NAME
34314 
34315   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34316     # cc -V output typically looks like
34317     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34318     # or
34319     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34320     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34321     # Check that this is likely to be the Solaris Studio cc.
34322     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34323     if test $? -ne 0; then
34324       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34325       { $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
34326 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34327       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34328 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34329       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34330 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34331       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34332     fi
34333     # Remove usage instructions (if present), and
34334     # collapse compiler output into a single line
34335     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34336         $SED -e 's/ *[Uu]sage:.*//'`
34337     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34338         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34339   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34340     # xlc -qversion output typically looks like
34341     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34342     #     Version: 11.01.0000.0015
34343     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34344     # Check that this is likely to be the IBM XL C compiler.
34345     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34346     if test $? -ne 0; then
34347       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34348       { $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
34349 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34350       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34351 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34352       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34353 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34354       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34355     fi
34356     # Collapse compiler output into a single line
34357     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34358     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34359         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34360   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34361     # There is no specific version flag, but all output starts with a version string.
34362     # First line typically looks something like:
34363     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34364     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34365     # Check that this is likely to be Microsoft CL.EXE.
34366     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34367     if test $? -ne 0; then
34368       { $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
34369 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34370       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34371 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34372       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34373     fi
34374     # Collapse compiler output into a single line
34375     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34376     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34377         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34378   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34379     # gcc --version output typically looks like
34380     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34381     #     Copyright (C) 2013 Free Software Foundation, Inc.
34382     #     This is free software; see the source for copying conditions.  There is NO
34383     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34384     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34385     # Check that this is likely to be GCC.
34386     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34387     if test $? -ne 0; then
34388       { $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
34389 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34390       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34391 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34392       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34393     fi
34394     # Remove Copyright and legalese from version string, and
34395     # collapse into a single line
34396     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34397         $SED -e 's/ *Copyright .*//'`
34398     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34399         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34400   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34401     # clang --version output typically looks like
34402     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34403     #    clang version 3.3 (tags/RELEASE_33/final)
34404     # or
34405     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34406     #    Target: x86_64-pc-linux-gnu
34407     #    Thread model: posix
34408     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34409     # Check that this is likely to be clang
34410     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34411     if test $? -ne 0; then
34412       { $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
34413 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34414       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34415 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34416       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34417     fi
34418     # Collapse compiler output into a single line
34419     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34420     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34421         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34422   else
34423       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34424   fi
34425   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34426   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34427   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34428   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34429 
34430   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34431 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34432 
34433 
34434   # Now that we have resolved CC ourself, let autoconf have its go at it
34435   ac_ext=c
34436 ac_cpp='$CPP $CPPFLAGS'
34437 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34438 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34439 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34440 if test -n "$ac_tool_prefix"; then
34441   for ac_prog in $CC
34442   do
34443     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34444 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34446 $as_echo_n "checking for $ac_word... " >&6; }
34447 if ${ac_cv_prog_CC+:} false; then :
34448   $as_echo_n "(cached) " >&6
34449 else
34450   if test -n "$CC"; then
34451   ac_cv_prog_CC="$CC" # Let the user override the test.
34452 else
34453 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34454 for as_dir in $PATH
34455 do
34456   IFS=$as_save_IFS
34457   test -z "$as_dir" && as_dir=.
34458     for ac_exec_ext in '' $ac_executable_extensions; do
34459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34460     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34462     break 2
34463   fi
34464 done
34465   done
34466 IFS=$as_save_IFS
34467 
34468 fi
34469 fi
34470 CC=$ac_cv_prog_CC
34471 if test -n "$CC"; then
34472   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34473 $as_echo "$CC" >&6; }
34474 else
34475   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34476 $as_echo "no" >&6; }
34477 fi
34478 
34479 
34480     test -n "$CC" && break
34481   done
34482 fi
34483 if test -z "$CC"; then
34484   ac_ct_CC=$CC
34485   for ac_prog in $CC
34486 do
34487   # Extract the first word of "$ac_prog", so it can be a program name with args.
34488 set dummy $ac_prog; ac_word=$2
34489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34490 $as_echo_n "checking for $ac_word... " >&6; }
34491 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34492   $as_echo_n "(cached) " >&6
34493 else
34494   if test -n "$ac_ct_CC"; then
34495   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34496 else
34497 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34498 for as_dir in $PATH
34499 do
34500   IFS=$as_save_IFS
34501   test -z "$as_dir" && as_dir=.
34502     for ac_exec_ext in '' $ac_executable_extensions; do
34503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34504     ac_cv_prog_ac_ct_CC="$ac_prog"
34505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34506     break 2
34507   fi
34508 done
34509   done
34510 IFS=$as_save_IFS
34511 
34512 fi
34513 fi
34514 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34515 if test -n "$ac_ct_CC"; then
34516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34517 $as_echo "$ac_ct_CC" >&6; }
34518 else
34519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34520 $as_echo "no" >&6; }
34521 fi
34522 
34523 
34524   test -n "$ac_ct_CC" && break
34525 done
34526 
34527   if test "x$ac_ct_CC" = x; then
34528     CC=""
34529   else
34530     case $cross_compiling:$ac_tool_warned in
34531 yes:)
34532 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34533 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34534 ac_tool_warned=yes ;;
34535 esac
34536     CC=$ac_ct_CC
34537   fi
34538 fi
34539 
34540 
34541 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34542 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34543 as_fn_error $? "no acceptable C compiler found in \$PATH
34544 See \`config.log' for more details" "$LINENO" 5; }
34545 
34546 # Provide some information about the compiler.
34547 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34548 set X $ac_compile
34549 ac_compiler=$2
34550 for ac_option in --version -v -V -qversion; do
34551   { { ac_try="$ac_compiler $ac_option >&5"
34552 case "(($ac_try" in
34553   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34554   *) ac_try_echo=$ac_try;;
34555 esac
34556 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34557 $as_echo "$ac_try_echo"; } >&5
34558   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34559   ac_status=$?
34560   if test -s conftest.err; then
34561     sed '10a\
34562 ... rest of stderr output deleted ...
34563          10q' conftest.err >conftest.er1
34564     cat conftest.er1 >&5
34565   fi
34566   rm -f conftest.er1 conftest.err
34567   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34568   test $ac_status = 0; }
34569 done
34570 
34571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34572 /* end confdefs.h.  */
34573 
34574 int
34575 main ()
34576 {
34577 
34578   ;
34579   return 0;
34580 }
34581 _ACEOF
34582 ac_clean_files_save=$ac_clean_files
34583 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34584 # Try to create an executable without -o first, disregard a.out.
34585 # It will help us diagnose broken compilers, and finding out an intuition
34586 # of exeext.
34587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34588 $as_echo_n "checking whether the C compiler works... " >&6; }
34589 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34590 
34591 # The possible output files:
34592 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34593 
34594 ac_rmfiles=
34595 for ac_file in $ac_files
34596 do
34597   case $ac_file in
34598     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34599     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34600   esac
34601 done
34602 rm -f $ac_rmfiles
34603 
34604 if { { ac_try="$ac_link_default"
34605 case "(($ac_try" in
34606   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34607   *) ac_try_echo=$ac_try;;
34608 esac
34609 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34610 $as_echo "$ac_try_echo"; } >&5
34611   (eval "$ac_link_default") 2>&5
34612   ac_status=$?
34613   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34614   test $ac_status = 0; }; then :
34615   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34616 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34617 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34618 # so that the user can short-circuit this test for compilers unknown to
34619 # Autoconf.
34620 for ac_file in $ac_files ''
34621 do
34622   test -f "$ac_file" || continue
34623   case $ac_file in
34624     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34625         ;;
34626     [ab].out )
34627         # We found the default executable, but exeext='' is most
34628         # certainly right.
34629         break;;
34630     *.* )
34631         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34632         then :; else
34633            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34634         fi
34635         # We set ac_cv_exeext here because the later test for it is not
34636         # safe: cross compilers may not add the suffix if given an `-o'
34637         # argument, so we may need to know it at that point already.
34638         # Even if this section looks crufty: it has the advantage of
34639         # actually working.
34640         break;;
34641     * )
34642         break;;
34643   esac
34644 done
34645 test "$ac_cv_exeext" = no && ac_cv_exeext=
34646 
34647 else
34648   ac_file=''
34649 fi
34650 if test -z "$ac_file"; then :
34651   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34652 $as_echo "no" >&6; }
34653 $as_echo "$as_me: failed program was:" >&5
34654 sed 's/^/| /' conftest.$ac_ext >&5
34655 
34656 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34657 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34658 as_fn_error 77 "C compiler cannot create executables
34659 See \`config.log' for more details" "$LINENO" 5; }
34660 else
34661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34662 $as_echo "yes" >&6; }
34663 fi
34664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34665 $as_echo_n "checking for C compiler default output file name... " >&6; }
34666 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34667 $as_echo "$ac_file" >&6; }
34668 ac_exeext=$ac_cv_exeext
34669 
34670 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34671 ac_clean_files=$ac_clean_files_save
34672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34673 $as_echo_n "checking for suffix of executables... " >&6; }
34674 if { { ac_try="$ac_link"
34675 case "(($ac_try" in
34676   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34677   *) ac_try_echo=$ac_try;;
34678 esac
34679 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34680 $as_echo "$ac_try_echo"; } >&5
34681   (eval "$ac_link") 2>&5
34682   ac_status=$?
34683   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34684   test $ac_status = 0; }; then :
34685   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34686 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34687 # work properly (i.e., refer to `conftest.exe'), while it won't with
34688 # `rm'.
34689 for ac_file in conftest.exe conftest conftest.*; do
34690   test -f "$ac_file" || continue
34691   case $ac_file in
34692     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34693     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34694           break;;
34695     * ) break;;
34696   esac
34697 done
34698 else
34699   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34700 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34701 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34702 See \`config.log' for more details" "$LINENO" 5; }
34703 fi
34704 rm -f conftest conftest$ac_cv_exeext
34705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34706 $as_echo "$ac_cv_exeext" >&6; }
34707 
34708 rm -f conftest.$ac_ext
34709 EXEEXT=$ac_cv_exeext
34710 ac_exeext=$EXEEXT
34711 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34712 /* end confdefs.h.  */
34713 #include <stdio.h>
34714 int
34715 main ()
34716 {
34717 FILE *f = fopen ("conftest.out", "w");
34718  return ferror (f) || fclose (f) != 0;
34719 
34720   ;
34721   return 0;
34722 }
34723 _ACEOF
34724 ac_clean_files="$ac_clean_files conftest.out"
34725 # Check that the compiler produces executables we can run.  If not, either
34726 # the compiler is broken, or we cross compile.
34727 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34728 $as_echo_n "checking whether we are cross compiling... " >&6; }
34729 if test "$cross_compiling" != yes; then
34730   { { ac_try="$ac_link"
34731 case "(($ac_try" in
34732   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34733   *) ac_try_echo=$ac_try;;
34734 esac
34735 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34736 $as_echo "$ac_try_echo"; } >&5
34737   (eval "$ac_link") 2>&5
34738   ac_status=$?
34739   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34740   test $ac_status = 0; }
34741   if { ac_try='./conftest$ac_cv_exeext'
34742   { { case "(($ac_try" in
34743   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34744   *) ac_try_echo=$ac_try;;
34745 esac
34746 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34747 $as_echo "$ac_try_echo"; } >&5
34748   (eval "$ac_try") 2>&5
34749   ac_status=$?
34750   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34751   test $ac_status = 0; }; }; then
34752     cross_compiling=no
34753   else
34754     if test "$cross_compiling" = maybe; then
34755         cross_compiling=yes
34756     else
34757         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34758 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34759 as_fn_error $? "cannot run C compiled programs.
34760 If you meant to cross compile, use \`--host'.
34761 See \`config.log' for more details" "$LINENO" 5; }
34762     fi
34763   fi
34764 fi
34765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34766 $as_echo "$cross_compiling" >&6; }
34767 
34768 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34769 ac_clean_files=$ac_clean_files_save
34770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34771 $as_echo_n "checking for suffix of object files... " >&6; }
34772 if ${ac_cv_objext+:} false; then :
34773   $as_echo_n "(cached) " >&6
34774 else
34775   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34776 /* end confdefs.h.  */
34777 
34778 int
34779 main ()
34780 {
34781 
34782   ;
34783   return 0;
34784 }
34785 _ACEOF
34786 rm -f conftest.o conftest.obj
34787 if { { ac_try="$ac_compile"
34788 case "(($ac_try" in
34789   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34790   *) ac_try_echo=$ac_try;;
34791 esac
34792 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34793 $as_echo "$ac_try_echo"; } >&5
34794   (eval "$ac_compile") 2>&5
34795   ac_status=$?
34796   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34797   test $ac_status = 0; }; then :
34798   for ac_file in conftest.o conftest.obj conftest.*; do
34799   test -f "$ac_file" || continue;
34800   case $ac_file in
34801     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34802     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34803        break;;
34804   esac
34805 done
34806 else
34807   $as_echo "$as_me: failed program was:" >&5
34808 sed 's/^/| /' conftest.$ac_ext >&5
34809 
34810 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34811 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34812 as_fn_error $? "cannot compute suffix of object files: cannot compile
34813 See \`config.log' for more details" "$LINENO" 5; }
34814 fi
34815 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34816 fi
34817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34818 $as_echo "$ac_cv_objext" >&6; }
34819 OBJEXT=$ac_cv_objext
34820 ac_objext=$OBJEXT
34821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34822 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34823 if ${ac_cv_c_compiler_gnu+:} false; then :
34824   $as_echo_n "(cached) " >&6
34825 else
34826   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34827 /* end confdefs.h.  */
34828 
34829 int
34830 main ()
34831 {
34832 #ifndef __GNUC__
34833        choke me
34834 #endif
34835 
34836   ;
34837   return 0;
34838 }
34839 _ACEOF
34840 if ac_fn_c_try_compile "$LINENO"; then :
34841   ac_compiler_gnu=yes
34842 else
34843   ac_compiler_gnu=no
34844 fi
34845 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34846 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34847 
34848 fi
34849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34850 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34851 if test $ac_compiler_gnu = yes; then
34852   GCC=yes
34853 else
34854   GCC=
34855 fi
34856 ac_test_CFLAGS=${CFLAGS+set}
34857 ac_save_CFLAGS=$CFLAGS
34858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34859 $as_echo_n "checking whether $CC accepts -g... " >&6; }
34860 if ${ac_cv_prog_cc_g+:} false; then :
34861   $as_echo_n "(cached) " >&6
34862 else
34863   ac_save_c_werror_flag=$ac_c_werror_flag
34864    ac_c_werror_flag=yes
34865    ac_cv_prog_cc_g=no
34866    CFLAGS="-g"
34867    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34868 /* end confdefs.h.  */
34869 
34870 int
34871 main ()
34872 {
34873 
34874   ;
34875   return 0;
34876 }
34877 _ACEOF
34878 if ac_fn_c_try_compile "$LINENO"; then :
34879   ac_cv_prog_cc_g=yes
34880 else
34881   CFLAGS=""
34882       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34883 /* end confdefs.h.  */
34884 
34885 int
34886 main ()
34887 {
34888 
34889   ;
34890   return 0;
34891 }
34892 _ACEOF
34893 if ac_fn_c_try_compile "$LINENO"; then :
34894 
34895 else
34896   ac_c_werror_flag=$ac_save_c_werror_flag
34897          CFLAGS="-g"
34898          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34899 /* end confdefs.h.  */
34900 
34901 int
34902 main ()
34903 {
34904 
34905   ;
34906   return 0;
34907 }
34908 _ACEOF
34909 if ac_fn_c_try_compile "$LINENO"; then :
34910   ac_cv_prog_cc_g=yes
34911 fi
34912 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34913 fi
34914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34915 fi
34916 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34917    ac_c_werror_flag=$ac_save_c_werror_flag
34918 fi
34919 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34920 $as_echo "$ac_cv_prog_cc_g" >&6; }
34921 if test "$ac_test_CFLAGS" = set; then
34922   CFLAGS=$ac_save_CFLAGS
34923 elif test $ac_cv_prog_cc_g = yes; then
34924   if test "$GCC" = yes; then
34925     CFLAGS="-g -O2"
34926   else
34927     CFLAGS="-g"
34928   fi
34929 else
34930   if test "$GCC" = yes; then
34931     CFLAGS="-O2"
34932   else
34933     CFLAGS=
34934   fi
34935 fi
34936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34937 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34938 if ${ac_cv_prog_cc_c89+:} false; then :
34939   $as_echo_n "(cached) " >&6
34940 else
34941   ac_cv_prog_cc_c89=no
34942 ac_save_CC=$CC
34943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34944 /* end confdefs.h.  */
34945 #include <stdarg.h>
34946 #include <stdio.h>
34947 struct stat;
34948 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34949 struct buf { int x; };
34950 FILE * (*rcsopen) (struct buf *, struct stat *, int);
34951 static char *e (p, i)
34952      char **p;
34953      int i;
34954 {
34955   return p[i];
34956 }
34957 static char *f (char * (*g) (char **, int), char **p, ...)
34958 {
34959   char *s;
34960   va_list v;
34961   va_start (v,p);
34962   s = g (p, va_arg (v,int));
34963   va_end (v);
34964   return s;
34965 }
34966 
34967 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34968    function prototypes and stuff, but not '\xHH' hex character constants.
34969    These don't provoke an error unfortunately, instead are silently treated
34970    as 'x'.  The following induces an error, until -std is added to get
34971    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34972    array size at least.  It's necessary to write '\x00'==0 to get something
34973    that's true only with -std.  */
34974 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34975 
34976 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34977    inside strings and character constants.  */
34978 #define FOO(x) 'x'
34979 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34980 
34981 int test (int i, double x);
34982 struct s1 {int (*f) (int a);};
34983 struct s2 {int (*f) (double a);};
34984 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34985 int argc;
34986 char **argv;
34987 int
34988 main ()
34989 {
34990 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34991   ;
34992   return 0;
34993 }
34994 _ACEOF
34995 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34996         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34997 do
34998   CC="$ac_save_CC $ac_arg"
34999   if ac_fn_c_try_compile "$LINENO"; then :
35000   ac_cv_prog_cc_c89=$ac_arg
35001 fi
35002 rm -f core conftest.err conftest.$ac_objext
35003   test "x$ac_cv_prog_cc_c89" != "xno" && break
35004 done
35005 rm -f conftest.$ac_ext
35006 CC=$ac_save_CC
35007 
35008 fi
35009 # AC_CACHE_VAL
35010 case "x$ac_cv_prog_cc_c89" in
35011   x)
35012     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35013 $as_echo "none needed" >&6; } ;;
35014   xno)
35015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35016 $as_echo "unsupported" >&6; } ;;
35017   *)
35018     CC="$CC $ac_cv_prog_cc_c89"
35019     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35020 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35021 esac
35022 if test "x$ac_cv_prog_cc_c89" != xno; then :
35023 
35024 fi
35025 
35026 ac_ext=cpp
35027 ac_cpp='$CXXCPP $CPPFLAGS'
35028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35031 
35032 
35033 
35034   COMPILER_NAME=C++
35035   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35036 
35037   if test "x$CXX" != x; then
35038     # User has supplied compiler name already, always let that override.
35039     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35040 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35041     if test "x`basename $CXX`" = "x$CXX"; then
35042       # A command without a complete path is provided, search $PATH.
35043 
35044       for ac_prog in $CXX
35045 do
35046   # Extract the first word of "$ac_prog", so it can be a program name with args.
35047 set dummy $ac_prog; ac_word=$2
35048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35049 $as_echo_n "checking for $ac_word... " >&6; }
35050 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35051   $as_echo_n "(cached) " >&6
35052 else
35053   case $POTENTIAL_CXX in
35054   [\\/]* | ?:[\\/]*)
35055   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35056   ;;
35057   *)
35058   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35059 for as_dir in $PATH
35060 do
35061   IFS=$as_save_IFS
35062   test -z "$as_dir" && as_dir=.
35063     for ac_exec_ext in '' $ac_executable_extensions; do
35064   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35065     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35066     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35067     break 2
35068   fi
35069 done
35070   done
35071 IFS=$as_save_IFS
35072 
35073   ;;
35074 esac
35075 fi
35076 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35077 if test -n "$POTENTIAL_CXX"; then
35078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35079 $as_echo "$POTENTIAL_CXX" >&6; }
35080 else
35081   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35082 $as_echo "no" >&6; }
35083 fi
35084 
35085 
35086   test -n "$POTENTIAL_CXX" && break
35087 done
35088 
35089       if test "x$POTENTIAL_CXX" != x; then
35090         CXX=$POTENTIAL_CXX
35091       else
35092         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35093       fi
35094     else
35095       # Otherwise it might already be a complete path
35096       if test ! -x "$CXX"; then
35097         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35098       fi
35099     fi
35100   else
35101     # No user supplied value. Locate compiler ourselves.
35102 
35103     # If we are cross compiling, assume cross compilation tools follows the
35104     # cross compilation standard where they are prefixed with the autoconf
35105     # standard name for the target. For example the binary
35106     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35107     # If we are not cross compiling, then the default compiler name will be
35108     # used.
35109 
35110     CXX=
35111     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35112     # before checking the rest of the PATH.
35113     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35114     # step, this should not be necessary.
35115     if test -n "$TOOLCHAIN_PATH"; then
35116       PATH_save="$PATH"
35117       PATH="$TOOLCHAIN_PATH"
35118       if test -n "$ac_tool_prefix"; then
35119   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35120 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35122 $as_echo_n "checking for $ac_word... " >&6; }
35123 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35124   $as_echo_n "(cached) " >&6
35125 else
35126   case $TOOLCHAIN_PATH_CXX in
35127   [\\/]* | ?:[\\/]*)
35128   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35129   ;;
35130   *)
35131   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35132 for as_dir in $PATH
35133 do
35134   IFS=$as_save_IFS
35135   test -z "$as_dir" && as_dir=.
35136     for ac_exec_ext in '' $ac_executable_extensions; do
35137   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35138     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35139     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35140     break 2
35141   fi
35142 done
35143   done
35144 IFS=$as_save_IFS
35145 
35146   ;;
35147 esac
35148 fi
35149 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35150 if test -n "$TOOLCHAIN_PATH_CXX"; then
35151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35152 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35153 else
35154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35155 $as_echo "no" >&6; }
35156 fi
35157 
35158 
35159 fi
35160 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35161   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35162   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35163 set dummy $SEARCH_LIST; ac_word=$2
35164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35165 $as_echo_n "checking for $ac_word... " >&6; }
35166 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35167   $as_echo_n "(cached) " >&6
35168 else
35169   case $ac_pt_TOOLCHAIN_PATH_CXX in
35170   [\\/]* | ?:[\\/]*)
35171   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35172   ;;
35173   *)
35174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35175 for as_dir in $PATH
35176 do
35177   IFS=$as_save_IFS
35178   test -z "$as_dir" && as_dir=.
35179     for ac_exec_ext in '' $ac_executable_extensions; do
35180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35181     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35183     break 2
35184   fi
35185 done
35186   done
35187 IFS=$as_save_IFS
35188 
35189   ;;
35190 esac
35191 fi
35192 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35193 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35195 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35196 else
35197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35198 $as_echo "no" >&6; }
35199 fi
35200 
35201   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35202     TOOLCHAIN_PATH_CXX=""
35203   else
35204     case $cross_compiling:$ac_tool_warned in
35205 yes:)
35206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35207 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35208 ac_tool_warned=yes ;;
35209 esac
35210     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35211   fi
35212 else
35213   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35214 fi
35215 
35216       CXX=$TOOLCHAIN_PATH_CXX
35217       PATH="$PATH_save"
35218     fi
35219 
35220     # AC_PATH_TOOL can't be run multiple times with the same variable,
35221     # so create a new name for this run.
35222     if test "x$CXX" = x; then
35223       if test -n "$ac_tool_prefix"; then
35224   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35225 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35227 $as_echo_n "checking for $ac_word... " >&6; }
35228 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35229   $as_echo_n "(cached) " >&6
35230 else
35231   case $POTENTIAL_CXX in
35232   [\\/]* | ?:[\\/]*)
35233   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35234   ;;
35235   *)
35236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35237 for as_dir in $PATH
35238 do
35239   IFS=$as_save_IFS
35240   test -z "$as_dir" && as_dir=.
35241     for ac_exec_ext in '' $ac_executable_extensions; do
35242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35243     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35245     break 2
35246   fi
35247 done
35248   done
35249 IFS=$as_save_IFS
35250 
35251   ;;
35252 esac
35253 fi
35254 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35255 if test -n "$POTENTIAL_CXX"; then
35256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35257 $as_echo "$POTENTIAL_CXX" >&6; }
35258 else
35259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35260 $as_echo "no" >&6; }
35261 fi
35262 
35263 
35264 fi
35265 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35266   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35267   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35268 set dummy $SEARCH_LIST; ac_word=$2
35269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35270 $as_echo_n "checking for $ac_word... " >&6; }
35271 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35272   $as_echo_n "(cached) " >&6
35273 else
35274   case $ac_pt_POTENTIAL_CXX in
35275   [\\/]* | ?:[\\/]*)
35276   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35277   ;;
35278   *)
35279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35280 for as_dir in $PATH
35281 do
35282   IFS=$as_save_IFS
35283   test -z "$as_dir" && as_dir=.
35284     for ac_exec_ext in '' $ac_executable_extensions; do
35285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35286     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35288     break 2
35289   fi
35290 done
35291   done
35292 IFS=$as_save_IFS
35293 
35294   ;;
35295 esac
35296 fi
35297 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35298 if test -n "$ac_pt_POTENTIAL_CXX"; then
35299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35300 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35301 else
35302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35303 $as_echo "no" >&6; }
35304 fi
35305 
35306   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35307     POTENTIAL_CXX=""
35308   else
35309     case $cross_compiling:$ac_tool_warned in
35310 yes:)
35311 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35312 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35313 ac_tool_warned=yes ;;
35314 esac
35315     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35316   fi
35317 else
35318   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35319 fi
35320 
35321       CXX=$POTENTIAL_CXX
35322     fi
35323 
35324     if test "x$CXX" = x; then
35325 
35326   # Print a helpful message on how to acquire the necessary build dependency.
35327   # devkit is the help tag: freetype, cups, alsa etc
35328   MISSING_DEPENDENCY=devkit
35329 
35330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35331     cygwin_help $MISSING_DEPENDENCY
35332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35333     msys_help $MISSING_DEPENDENCY
35334   else
35335     PKGHANDLER_COMMAND=
35336 
35337     case $PKGHANDLER in
35338       apt-get)
35339         apt_help     $MISSING_DEPENDENCY ;;
35340       yum)
35341         yum_help     $MISSING_DEPENDENCY ;;
35342       brew)
35343         brew_help    $MISSING_DEPENDENCY ;;
35344       port)
35345         port_help    $MISSING_DEPENDENCY ;;
35346       pkgutil)
35347         pkgutil_help $MISSING_DEPENDENCY ;;
35348       pkgadd)
35349         pkgadd_help  $MISSING_DEPENDENCY ;;
35350     esac
35351 
35352     if test "x$PKGHANDLER_COMMAND" != x; then
35353       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35354     fi
35355   fi
35356 
35357       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35358     fi
35359   fi
35360 
35361   # Now we have a compiler binary in CXX. Make sure it's okay.
35362 
35363   # Only process if variable expands to non-empty
35364 
35365   if test "x$CXX" != x; then
35366     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35367 
35368   # First separate the path from the arguments. This will split at the first
35369   # space.
35370   complete="$CXX"
35371   path="${complete%% *}"
35372   tmp="$complete EOL"
35373   arguments="${tmp#* }"
35374 
35375   # Input might be given as Windows format, start by converting to
35376   # unix format.
35377   new_path=`$CYGPATH -u "$path"`
35378 
35379   # Now try to locate executable using which
35380   new_path=`$WHICH "$new_path" 2> /dev/null`
35381   # bat and cmd files are not always considered executable in cygwin causing which
35382   # to not find them
35383   if test "x$new_path" = x \
35384       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35385       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35386     new_path=`$CYGPATH -u "$path"`
35387   fi
35388   if test "x$new_path" = x; then
35389     # Oops. Which didn't find the executable.
35390     # The splitting of arguments from the executable at a space might have been incorrect,
35391     # since paths with space are more likely in Windows. Give it another try with the whole
35392     # argument.
35393     path="$complete"
35394     arguments="EOL"
35395     new_path=`$CYGPATH -u "$path"`
35396     new_path=`$WHICH "$new_path" 2> /dev/null`
35397     # bat and cmd files are not always considered executable in cygwin causing which
35398     # to not find them
35399     if test "x$new_path" = x \
35400         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35401         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35402       new_path=`$CYGPATH -u "$path"`
35403     fi
35404     if test "x$new_path" = x; then
35405       # It's still not found. Now this is an unrecoverable error.
35406       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35407 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35408       has_space=`$ECHO "$complete" | $GREP " "`
35409       if test "x$has_space" != x; then
35410         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35411 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35412       fi
35413       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35414     fi
35415   fi
35416 
35417   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35418   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35419   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35420   # "foo.exe" is OK but "foo" is an error.
35421   #
35422   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35423   # It is also a way to make sure we got the proper file name for the real test later on.
35424   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35425   if test "x$test_shortpath" = x; then
35426     # Short path failed, file does not exist as specified.
35427     # Try adding .exe or .cmd
35428     if test -f "${new_path}.exe"; then
35429       input_to_shortpath="${new_path}.exe"
35430     elif test -f "${new_path}.cmd"; then
35431       input_to_shortpath="${new_path}.cmd"
35432     else
35433       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35434 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35435       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35436 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35437       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35438     fi
35439   else
35440     input_to_shortpath="$new_path"
35441   fi
35442 
35443   # Call helper function which possibly converts this using DOS-style short mode.
35444   # If so, the updated path is stored in $new_path.
35445   new_path="$input_to_shortpath"
35446 
35447   input_path="$input_to_shortpath"
35448   # Check if we need to convert this using DOS-style short mode. If the path
35449   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35450   # take no chances and rewrite it.
35451   # Note: m4 eats our [], so we need to use [ and ] instead.
35452   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35453   if test "x$has_forbidden_chars" != x; then
35454     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35455     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35456     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35457     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35458       # Going to short mode and back again did indeed matter. Since short mode is
35459       # case insensitive, let's make it lowercase to improve readability.
35460       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35461       # Now convert it back to Unix-style (cygpath)
35462       input_path=`$CYGPATH -u "$shortmode_path"`
35463       new_path="$input_path"
35464     fi
35465   fi
35466 
35467   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35468   if test "x$test_cygdrive_prefix" = x; then
35469     # As a simple fix, exclude /usr/bin since it's not a real path.
35470     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35471       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35472       # a path prefixed by /cygdrive for fixpath to work.
35473       new_path="$CYGWIN_ROOT_PATH$input_path"
35474     fi
35475   fi
35476 
35477   # remove trailing .exe if any
35478   new_path="${new_path/%.exe/}"
35479 
35480     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35481 
35482   # First separate the path from the arguments. This will split at the first
35483   # space.
35484   complete="$CXX"
35485   path="${complete%% *}"
35486   tmp="$complete EOL"
35487   arguments="${tmp#* }"
35488 
35489   # Input might be given as Windows format, start by converting to
35490   # unix format.
35491   new_path="$path"
35492 
35493   windows_path="$new_path"
35494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35495     unix_path=`$CYGPATH -u "$windows_path"`
35496     new_path="$unix_path"
35497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35499     new_path="$unix_path"
35500   fi
35501 
35502 
35503   # Now try to locate executable using which
35504   new_path=`$WHICH "$new_path" 2> /dev/null`
35505 
35506   if test "x$new_path" = x; then
35507     # Oops. Which didn't find the executable.
35508     # The splitting of arguments from the executable at a space might have been incorrect,
35509     # since paths with space are more likely in Windows. Give it another try with the whole
35510     # argument.
35511     path="$complete"
35512     arguments="EOL"
35513     new_path="$path"
35514 
35515   windows_path="$new_path"
35516   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35517     unix_path=`$CYGPATH -u "$windows_path"`
35518     new_path="$unix_path"
35519   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35520     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35521     new_path="$unix_path"
35522   fi
35523 
35524 
35525     new_path=`$WHICH "$new_path" 2> /dev/null`
35526     # bat and cmd files are not always considered executable in MSYS causing which
35527     # to not find them
35528     if test "x$new_path" = x \
35529         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35530         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35531       new_path="$path"
35532 
35533   windows_path="$new_path"
35534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35535     unix_path=`$CYGPATH -u "$windows_path"`
35536     new_path="$unix_path"
35537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35539     new_path="$unix_path"
35540   fi
35541 
35542     fi
35543 
35544     if test "x$new_path" = x; then
35545       # It's still not found. Now this is an unrecoverable error.
35546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35547 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35548       has_space=`$ECHO "$complete" | $GREP " "`
35549       if test "x$has_space" != x; then
35550         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35551 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35552       fi
35553       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35554     fi
35555   fi
35556 
35557   # Now new_path has a complete unix path to the binary
35558   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35559     # Keep paths in /bin as-is, but remove trailing .exe if any
35560     new_path="${new_path/%.exe/}"
35561     # Do not save /bin paths to all_fixpath_prefixes!
35562   else
35563     # Not in mixed or Windows style, start by that.
35564     new_path=`cmd //c echo $new_path`
35565 
35566   input_path="$new_path"
35567   # Check if we need to convert this using DOS-style short mode. If the path
35568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35569   # take no chances and rewrite it.
35570   # Note: m4 eats our [], so we need to use [ and ] instead.
35571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35572   if test "x$has_forbidden_chars" != x; then
35573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35575   fi
35576 
35577     # Output is in $new_path
35578 
35579   windows_path="$new_path"
35580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35581     unix_path=`$CYGPATH -u "$windows_path"`
35582     new_path="$unix_path"
35583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35585     new_path="$unix_path"
35586   fi
35587 
35588     # remove trailing .exe if any
35589     new_path="${new_path/%.exe/}"
35590 
35591     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35592     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35593   fi
35594 
35595     else
35596       # We're on a unix platform. Hooray! :)
35597       # First separate the path from the arguments. This will split at the first
35598       # space.
35599       complete="$CXX"
35600       path="${complete%% *}"
35601       tmp="$complete EOL"
35602       arguments="${tmp#* }"
35603 
35604       # Cannot rely on the command "which" here since it doesn't always work.
35605       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35606       if test -z "$is_absolute_path"; then
35607         # Path to executable is not absolute. Find it.
35608         IFS_save="$IFS"
35609         IFS=:
35610         for p in $PATH; do
35611           if test -f "$p/$path" && test -x "$p/$path"; then
35612             new_path="$p/$path"
35613             break
35614           fi
35615         done
35616         IFS="$IFS_save"
35617       else
35618         # This is an absolute path, we can use it without further modifications.
35619         new_path="$path"
35620       fi
35621 
35622       if test "x$new_path" = x; then
35623         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35624 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35625         has_space=`$ECHO "$complete" | $GREP " "`
35626         if test "x$has_space" != x; then
35627           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35628 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35629         fi
35630         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35631       fi
35632     fi
35633 
35634     # Now join together the path and the arguments once again
35635     if test "x$arguments" != xEOL; then
35636       new_complete="$new_path ${arguments% *}"
35637     else
35638       new_complete="$new_path"
35639     fi
35640 
35641     if test "x$complete" != "x$new_complete"; then
35642       CXX="$new_complete"
35643       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35644 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35645     fi
35646   fi
35647 
35648   TEST_COMPILER="$CXX"
35649 
35650   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35651 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35652   SYMLINK_ORIGINAL="$TEST_COMPILER"
35653 
35654   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35655     # Follow a chain of symbolic links. Use readlink
35656     # where it exists, else fall back to horribly
35657     # complicated shell code.
35658     if test "x$READLINK_TESTED" != yes; then
35659       # On MacOSX there is a readlink tool with a different
35660       # purpose than the GNU readlink tool. Check the found readlink.
35661       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35662       if test "x$ISGNU" = x; then
35663         # A readlink that we do not know how to use.
35664         # Are there other non-GNU readlinks out there?
35665         READLINK_TESTED=yes
35666         READLINK=
35667       fi
35668     fi
35669 
35670     if test "x$READLINK" != x; then
35671       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35672     else
35673       # Save the current directory for restoring afterwards
35674       STARTDIR=$PWD
35675       COUNTER=0
35676       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35677       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35678       cd $sym_link_dir
35679       # Use -P flag to resolve symlinks in directories.
35680       cd `$THEPWDCMD -P`
35681       sym_link_dir=`$THEPWDCMD -P`
35682       # Resolve file symlinks
35683       while test $COUNTER -lt 20; do
35684         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35685         if test "x$ISLINK" == x; then
35686           # This is not a symbolic link! We are done!
35687           break
35688         fi
35689         # Again resolve directory symlinks since the target of the just found
35690         # link could be in a different directory
35691         cd `$DIRNAME $ISLINK`
35692         sym_link_dir=`$THEPWDCMD -P`
35693         sym_link_file=`$BASENAME $ISLINK`
35694         let COUNTER=COUNTER+1
35695       done
35696       cd $STARTDIR
35697       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35698     fi
35699   fi
35700 
35701   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35702     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35703 $as_echo "no symlink" >&6; }
35704   else
35705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35706 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35707 
35708     # We can't handle ccache by gcc wrappers, since we need to know if we're
35709     # using ccache. Instead ccache usage must be controlled by a configure option.
35710     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35711     if test "x$COMPILER_BASENAME" = "xccache"; then
35712       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35713 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35714       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35715     fi
35716   fi
35717 
35718 
35719   COMPILER=$CXX
35720   COMPILER_NAME=$COMPILER_NAME
35721 
35722   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35723     # cc -V output typically looks like
35724     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35725     # or
35726     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35727     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35728     # Check that this is likely to be the Solaris Studio cc.
35729     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35730     if test $? -ne 0; then
35731       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35732       { $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
35733 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35734       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35735 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35736       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35737 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35738       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35739     fi
35740     # Remove usage instructions (if present), and
35741     # collapse compiler output into a single line
35742     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35743         $SED -e 's/ *[Uu]sage:.*//'`
35744     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35745         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35746   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35747     # xlc -qversion output typically looks like
35748     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35749     #     Version: 11.01.0000.0015
35750     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35751     # Check that this is likely to be the IBM XL C compiler.
35752     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35753     if test $? -ne 0; then
35754       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35755       { $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
35756 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35757       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35758 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35759       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35760 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35761       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35762     fi
35763     # Collapse compiler output into a single line
35764     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35765     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35766         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35767   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35768     # There is no specific version flag, but all output starts with a version string.
35769     # First line typically looks something like:
35770     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35771     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35772     # Check that this is likely to be Microsoft CL.EXE.
35773     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35774     if test $? -ne 0; then
35775       { $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
35776 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35777       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35778 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35779       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35780     fi
35781     # Collapse compiler output into a single line
35782     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35783     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35784         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35785   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35786     # gcc --version output typically looks like
35787     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35788     #     Copyright (C) 2013 Free Software Foundation, Inc.
35789     #     This is free software; see the source for copying conditions.  There is NO
35790     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35791     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35792     # Check that this is likely to be GCC.
35793     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35794     if test $? -ne 0; then
35795       { $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
35796 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35797       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35798 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35799       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35800     fi
35801     # Remove Copyright and legalese from version string, and
35802     # collapse into a single line
35803     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35804         $SED -e 's/ *Copyright .*//'`
35805     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35806         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35807   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35808     # clang --version output typically looks like
35809     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35810     #    clang version 3.3 (tags/RELEASE_33/final)
35811     # or
35812     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35813     #    Target: x86_64-pc-linux-gnu
35814     #    Thread model: posix
35815     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35816     # Check that this is likely to be clang
35817     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35818     if test $? -ne 0; then
35819       { $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
35820 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35821       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35822 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35823       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35824     fi
35825     # Collapse compiler output into a single line
35826     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35827     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35828         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35829   else
35830       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35831   fi
35832   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35833   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35834   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35835   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35836 
35837   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35838 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35839 
35840 
35841   # Now that we have resolved CXX ourself, let autoconf have its go at it
35842   ac_ext=cpp
35843 ac_cpp='$CXXCPP $CPPFLAGS'
35844 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35845 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35846 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35847 if test -z "$CXX"; then
35848   if test -n "$CCC"; then
35849     CXX=$CCC
35850   else
35851     if test -n "$ac_tool_prefix"; then
35852   for ac_prog in $CXX
35853   do
35854     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35855 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35857 $as_echo_n "checking for $ac_word... " >&6; }
35858 if ${ac_cv_prog_CXX+:} false; then :
35859   $as_echo_n "(cached) " >&6
35860 else
35861   if test -n "$CXX"; then
35862   ac_cv_prog_CXX="$CXX" # Let the user override the test.
35863 else
35864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35865 for as_dir in $PATH
35866 do
35867   IFS=$as_save_IFS
35868   test -z "$as_dir" && as_dir=.
35869     for ac_exec_ext in '' $ac_executable_extensions; do
35870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35871     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35873     break 2
35874   fi
35875 done
35876   done
35877 IFS=$as_save_IFS
35878 
35879 fi
35880 fi
35881 CXX=$ac_cv_prog_CXX
35882 if test -n "$CXX"; then
35883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35884 $as_echo "$CXX" >&6; }
35885 else
35886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35887 $as_echo "no" >&6; }
35888 fi
35889 
35890 
35891     test -n "$CXX" && break
35892   done
35893 fi
35894 if test -z "$CXX"; then
35895   ac_ct_CXX=$CXX
35896   for ac_prog in $CXX
35897 do
35898   # Extract the first word of "$ac_prog", so it can be a program name with args.
35899 set dummy $ac_prog; ac_word=$2
35900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35901 $as_echo_n "checking for $ac_word... " >&6; }
35902 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35903   $as_echo_n "(cached) " >&6
35904 else
35905   if test -n "$ac_ct_CXX"; then
35906   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35907 else
35908 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35909 for as_dir in $PATH
35910 do
35911   IFS=$as_save_IFS
35912   test -z "$as_dir" && as_dir=.
35913     for ac_exec_ext in '' $ac_executable_extensions; do
35914   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35915     ac_cv_prog_ac_ct_CXX="$ac_prog"
35916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35917     break 2
35918   fi
35919 done
35920   done
35921 IFS=$as_save_IFS
35922 
35923 fi
35924 fi
35925 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35926 if test -n "$ac_ct_CXX"; then
35927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35928 $as_echo "$ac_ct_CXX" >&6; }
35929 else
35930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35931 $as_echo "no" >&6; }
35932 fi
35933 
35934 
35935   test -n "$ac_ct_CXX" && break
35936 done
35937 
35938   if test "x$ac_ct_CXX" = x; then
35939     CXX="g++"
35940   else
35941     case $cross_compiling:$ac_tool_warned in
35942 yes:)
35943 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35944 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35945 ac_tool_warned=yes ;;
35946 esac
35947     CXX=$ac_ct_CXX
35948   fi
35949 fi
35950 
35951   fi
35952 fi
35953 # Provide some information about the compiler.
35954 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35955 set X $ac_compile
35956 ac_compiler=$2
35957 for ac_option in --version -v -V -qversion; do
35958   { { ac_try="$ac_compiler $ac_option >&5"
35959 case "(($ac_try" in
35960   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35961   *) ac_try_echo=$ac_try;;
35962 esac
35963 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35964 $as_echo "$ac_try_echo"; } >&5
35965   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35966   ac_status=$?
35967   if test -s conftest.err; then
35968     sed '10a\
35969 ... rest of stderr output deleted ...
35970          10q' conftest.err >conftest.er1
35971     cat conftest.er1 >&5
35972   fi
35973   rm -f conftest.er1 conftest.err
35974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35975   test $ac_status = 0; }
35976 done
35977 
35978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35979 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35980 if ${ac_cv_cxx_compiler_gnu+:} false; then :
35981   $as_echo_n "(cached) " >&6
35982 else
35983   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35984 /* end confdefs.h.  */
35985 
35986 int
35987 main ()
35988 {
35989 #ifndef __GNUC__
35990        choke me
35991 #endif
35992 
35993   ;
35994   return 0;
35995 }
35996 _ACEOF
35997 if ac_fn_cxx_try_compile "$LINENO"; then :
35998   ac_compiler_gnu=yes
35999 else
36000   ac_compiler_gnu=no
36001 fi
36002 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36003 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36004 
36005 fi
36006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36007 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36008 if test $ac_compiler_gnu = yes; then
36009   GXX=yes
36010 else
36011   GXX=
36012 fi
36013 ac_test_CXXFLAGS=${CXXFLAGS+set}
36014 ac_save_CXXFLAGS=$CXXFLAGS
36015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36016 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
36017 if ${ac_cv_prog_cxx_g+:} false; then :
36018   $as_echo_n "(cached) " >&6
36019 else
36020   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36021    ac_cxx_werror_flag=yes
36022    ac_cv_prog_cxx_g=no
36023    CXXFLAGS="-g"
36024    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36025 /* end confdefs.h.  */
36026 
36027 int
36028 main ()
36029 {
36030 
36031   ;
36032   return 0;
36033 }
36034 _ACEOF
36035 if ac_fn_cxx_try_compile "$LINENO"; then :
36036   ac_cv_prog_cxx_g=yes
36037 else
36038   CXXFLAGS=""
36039       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36040 /* end confdefs.h.  */
36041 
36042 int
36043 main ()
36044 {
36045 
36046   ;
36047   return 0;
36048 }
36049 _ACEOF
36050 if ac_fn_cxx_try_compile "$LINENO"; then :
36051 
36052 else
36053   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36054          CXXFLAGS="-g"
36055          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36056 /* end confdefs.h.  */
36057 
36058 int
36059 main ()
36060 {
36061 
36062   ;
36063   return 0;
36064 }
36065 _ACEOF
36066 if ac_fn_cxx_try_compile "$LINENO"; then :
36067   ac_cv_prog_cxx_g=yes
36068 fi
36069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36070 fi
36071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36072 fi
36073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36074    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36075 fi
36076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36077 $as_echo "$ac_cv_prog_cxx_g" >&6; }
36078 if test "$ac_test_CXXFLAGS" = set; then
36079   CXXFLAGS=$ac_save_CXXFLAGS
36080 elif test $ac_cv_prog_cxx_g = yes; then
36081   if test "$GXX" = yes; then
36082     CXXFLAGS="-g -O2"
36083   else
36084     CXXFLAGS="-g"
36085   fi
36086 else
36087   if test "$GXX" = yes; then
36088     CXXFLAGS="-O2"
36089   else
36090     CXXFLAGS=
36091   fi
36092 fi
36093 ac_ext=cpp
36094 ac_cpp='$CXXCPP $CPPFLAGS'
36095 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36096 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36097 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36098 
36099 
36100   # This is the compiler version number on the form X.Y[.Z]
36101 
36102 
36103 
36104 
36105   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36106     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36107 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36108     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36109 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36110   fi
36111 
36112   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36113   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36114     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
36115 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36116   fi
36117 
36118   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36119     { $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
36120 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36121   fi
36122 
36123   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36124 
36125 
36126   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36127 
36128 
36129 
36130 
36131 
36132 
36133 
36134 
36135 
36136 
36137 
36138 
36139 
36140 
36141 
36142 
36143 
36144 
36145 
36146 
36147 
36148 
36149 
36150 
36151 
36152 
36153 
36154 
36155 
36156 
36157 
36158 
36159 
36160 
36161 
36162 
36163 
36164 
36165 
36166 
36167 
36168 
36169 
36170 
36171 
36172 
36173 
36174 
36175 
36176     # Execute function body
36177 
36178   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36179   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36180 
36181   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36182     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36183   fi
36184 
36185   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36186     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36187   fi
36188 
36189   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36190   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36191 
36192   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36193     :
36194 
36195   else
36196     :
36197 
36198           { $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
36199 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36200 
36201 
36202   fi
36203 
36204 
36205 
36206 
36207 
36208 
36209 
36210 
36211 
36212 
36213 
36214 
36215 
36216 
36217   fi
36218 
36219   #
36220   # Setup the preprocessor (CPP and CXXCPP)
36221   #
36222   ac_ext=c
36223 ac_cpp='$CPP $CPPFLAGS'
36224 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36225 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36226 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36228 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36229 # On Suns, sometimes $CPP names a directory.
36230 if test -n "$CPP" && test -d "$CPP"; then
36231   CPP=
36232 fi
36233 if test -z "$CPP"; then
36234   if ${ac_cv_prog_CPP+:} false; then :
36235   $as_echo_n "(cached) " >&6
36236 else
36237       # Double quotes because CPP needs to be expanded
36238     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36239     do
36240       ac_preproc_ok=false
36241 for ac_c_preproc_warn_flag in '' yes
36242 do
36243   # Use a header file that comes with gcc, so configuring glibc
36244   # with a fresh cross-compiler works.
36245   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36246   # <limits.h> exists even on freestanding compilers.
36247   # On the NeXT, cc -E runs the code through the compiler's parser,
36248   # not just through cpp. "Syntax error" is here to catch this case.
36249   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36250 /* end confdefs.h.  */
36251 #ifdef __STDC__
36252 # include <limits.h>
36253 #else
36254 # include <assert.h>
36255 #endif
36256                      Syntax error
36257 _ACEOF
36258 if ac_fn_c_try_cpp "$LINENO"; then :
36259 
36260 else
36261   # Broken: fails on valid input.
36262 continue
36263 fi
36264 rm -f conftest.err conftest.i conftest.$ac_ext
36265 
36266   # OK, works on sane cases.  Now check whether nonexistent headers
36267   # can be detected and how.
36268   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36269 /* end confdefs.h.  */
36270 #include <ac_nonexistent.h>
36271 _ACEOF
36272 if ac_fn_c_try_cpp "$LINENO"; then :
36273   # Broken: success on invalid input.
36274 continue
36275 else
36276   # Passes both tests.
36277 ac_preproc_ok=:
36278 break
36279 fi
36280 rm -f conftest.err conftest.i conftest.$ac_ext
36281 
36282 done
36283 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36284 rm -f conftest.i conftest.err conftest.$ac_ext
36285 if $ac_preproc_ok; then :
36286   break
36287 fi
36288 
36289     done
36290     ac_cv_prog_CPP=$CPP
36291 
36292 fi
36293   CPP=$ac_cv_prog_CPP
36294 else
36295   ac_cv_prog_CPP=$CPP
36296 fi
36297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36298 $as_echo "$CPP" >&6; }
36299 ac_preproc_ok=false
36300 for ac_c_preproc_warn_flag in '' yes
36301 do
36302   # Use a header file that comes with gcc, so configuring glibc
36303   # with a fresh cross-compiler works.
36304   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36305   # <limits.h> exists even on freestanding compilers.
36306   # On the NeXT, cc -E runs the code through the compiler's parser,
36307   # not just through cpp. "Syntax error" is here to catch this case.
36308   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36309 /* end confdefs.h.  */
36310 #ifdef __STDC__
36311 # include <limits.h>
36312 #else
36313 # include <assert.h>
36314 #endif
36315                      Syntax error
36316 _ACEOF
36317 if ac_fn_c_try_cpp "$LINENO"; then :
36318 
36319 else
36320   # Broken: fails on valid input.
36321 continue
36322 fi
36323 rm -f conftest.err conftest.i conftest.$ac_ext
36324 
36325   # OK, works on sane cases.  Now check whether nonexistent headers
36326   # can be detected and how.
36327   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36328 /* end confdefs.h.  */
36329 #include <ac_nonexistent.h>
36330 _ACEOF
36331 if ac_fn_c_try_cpp "$LINENO"; then :
36332   # Broken: success on invalid input.
36333 continue
36334 else
36335   # Passes both tests.
36336 ac_preproc_ok=:
36337 break
36338 fi
36339 rm -f conftest.err conftest.i conftest.$ac_ext
36340 
36341 done
36342 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36343 rm -f conftest.i conftest.err conftest.$ac_ext
36344 if $ac_preproc_ok; then :
36345 
36346 else
36347   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36348 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36349 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36350 See \`config.log' for more details" "$LINENO" 5; }
36351 fi
36352 
36353 ac_ext=cpp
36354 ac_cpp='$CXXCPP $CPPFLAGS'
36355 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36356 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36357 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36358 
36359 
36360   # Only process if variable expands to non-empty
36361 
36362   if test "x$CPP" != x; then
36363     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36364 
36365   # First separate the path from the arguments. This will split at the first
36366   # space.
36367   complete="$CPP"
36368   path="${complete%% *}"
36369   tmp="$complete EOL"
36370   arguments="${tmp#* }"
36371 
36372   # Input might be given as Windows format, start by converting to
36373   # unix format.
36374   new_path=`$CYGPATH -u "$path"`
36375 
36376   # Now try to locate executable using which
36377   new_path=`$WHICH "$new_path" 2> /dev/null`
36378   # bat and cmd files are not always considered executable in cygwin causing which
36379   # to not find them
36380   if test "x$new_path" = x \
36381       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36382       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36383     new_path=`$CYGPATH -u "$path"`
36384   fi
36385   if test "x$new_path" = x; then
36386     # Oops. Which didn't find the executable.
36387     # The splitting of arguments from the executable at a space might have been incorrect,
36388     # since paths with space are more likely in Windows. Give it another try with the whole
36389     # argument.
36390     path="$complete"
36391     arguments="EOL"
36392     new_path=`$CYGPATH -u "$path"`
36393     new_path=`$WHICH "$new_path" 2> /dev/null`
36394     # bat and cmd files are not always considered executable in cygwin causing which
36395     # to not find them
36396     if test "x$new_path" = x \
36397         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36398         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36399       new_path=`$CYGPATH -u "$path"`
36400     fi
36401     if test "x$new_path" = x; then
36402       # It's still not found. Now this is an unrecoverable error.
36403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36404 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36405       has_space=`$ECHO "$complete" | $GREP " "`
36406       if test "x$has_space" != x; then
36407         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36408 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36409       fi
36410       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36411     fi
36412   fi
36413 
36414   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36415   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36416   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36417   # "foo.exe" is OK but "foo" is an error.
36418   #
36419   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36420   # It is also a way to make sure we got the proper file name for the real test later on.
36421   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36422   if test "x$test_shortpath" = x; then
36423     # Short path failed, file does not exist as specified.
36424     # Try adding .exe or .cmd
36425     if test -f "${new_path}.exe"; then
36426       input_to_shortpath="${new_path}.exe"
36427     elif test -f "${new_path}.cmd"; then
36428       input_to_shortpath="${new_path}.cmd"
36429     else
36430       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36431 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36432       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36433 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36434       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36435     fi
36436   else
36437     input_to_shortpath="$new_path"
36438   fi
36439 
36440   # Call helper function which possibly converts this using DOS-style short mode.
36441   # If so, the updated path is stored in $new_path.
36442   new_path="$input_to_shortpath"
36443 
36444   input_path="$input_to_shortpath"
36445   # Check if we need to convert this using DOS-style short mode. If the path
36446   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36447   # take no chances and rewrite it.
36448   # Note: m4 eats our [], so we need to use [ and ] instead.
36449   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36450   if test "x$has_forbidden_chars" != x; then
36451     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36452     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36453     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36454     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36455       # Going to short mode and back again did indeed matter. Since short mode is
36456       # case insensitive, let's make it lowercase to improve readability.
36457       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36458       # Now convert it back to Unix-style (cygpath)
36459       input_path=`$CYGPATH -u "$shortmode_path"`
36460       new_path="$input_path"
36461     fi
36462   fi
36463 
36464   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36465   if test "x$test_cygdrive_prefix" = x; then
36466     # As a simple fix, exclude /usr/bin since it's not a real path.
36467     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36468       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36469       # a path prefixed by /cygdrive for fixpath to work.
36470       new_path="$CYGWIN_ROOT_PATH$input_path"
36471     fi
36472   fi
36473 
36474   # remove trailing .exe if any
36475   new_path="${new_path/%.exe/}"
36476 
36477     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36478 
36479   # First separate the path from the arguments. This will split at the first
36480   # space.
36481   complete="$CPP"
36482   path="${complete%% *}"
36483   tmp="$complete EOL"
36484   arguments="${tmp#* }"
36485 
36486   # Input might be given as Windows format, start by converting to
36487   # unix format.
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 
36500   # Now try to locate executable using which
36501   new_path=`$WHICH "$new_path" 2> /dev/null`
36502 
36503   if test "x$new_path" = x; then
36504     # Oops. Which didn't find the executable.
36505     # The splitting of arguments from the executable at a space might have been incorrect,
36506     # since paths with space are more likely in Windows. Give it another try with the whole
36507     # argument.
36508     path="$complete"
36509     arguments="EOL"
36510     new_path="$path"
36511 
36512   windows_path="$new_path"
36513   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36514     unix_path=`$CYGPATH -u "$windows_path"`
36515     new_path="$unix_path"
36516   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36517     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36518     new_path="$unix_path"
36519   fi
36520 
36521 
36522     new_path=`$WHICH "$new_path" 2> /dev/null`
36523     # bat and cmd files are not always considered executable in MSYS causing which
36524     # to not find them
36525     if test "x$new_path" = x \
36526         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36527         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36528       new_path="$path"
36529 
36530   windows_path="$new_path"
36531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36532     unix_path=`$CYGPATH -u "$windows_path"`
36533     new_path="$unix_path"
36534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36536     new_path="$unix_path"
36537   fi
36538 
36539     fi
36540 
36541     if test "x$new_path" = x; then
36542       # It's still not found. Now this is an unrecoverable error.
36543       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36544 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36545       has_space=`$ECHO "$complete" | $GREP " "`
36546       if test "x$has_space" != x; then
36547         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36548 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36549       fi
36550       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36551     fi
36552   fi
36553 
36554   # Now new_path has a complete unix path to the binary
36555   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36556     # Keep paths in /bin as-is, but remove trailing .exe if any
36557     new_path="${new_path/%.exe/}"
36558     # Do not save /bin paths to all_fixpath_prefixes!
36559   else
36560     # Not in mixed or Windows style, start by that.
36561     new_path=`cmd //c echo $new_path`
36562 
36563   input_path="$new_path"
36564   # Check if we need to convert this using DOS-style short mode. If the path
36565   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36566   # take no chances and rewrite it.
36567   # Note: m4 eats our [], so we need to use [ and ] instead.
36568   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36569   if test "x$has_forbidden_chars" != x; then
36570     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36571     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36572   fi
36573 
36574     # Output is in $new_path
36575 
36576   windows_path="$new_path"
36577   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36578     unix_path=`$CYGPATH -u "$windows_path"`
36579     new_path="$unix_path"
36580   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36581     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36582     new_path="$unix_path"
36583   fi
36584 
36585     # remove trailing .exe if any
36586     new_path="${new_path/%.exe/}"
36587 
36588     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36589     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36590   fi
36591 
36592     else
36593       # We're on a unix platform. Hooray! :)
36594       # First separate the path from the arguments. This will split at the first
36595       # space.
36596       complete="$CPP"
36597       path="${complete%% *}"
36598       tmp="$complete EOL"
36599       arguments="${tmp#* }"
36600 
36601       # Cannot rely on the command "which" here since it doesn't always work.
36602       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36603       if test -z "$is_absolute_path"; then
36604         # Path to executable is not absolute. Find it.
36605         IFS_save="$IFS"
36606         IFS=:
36607         for p in $PATH; do
36608           if test -f "$p/$path" && test -x "$p/$path"; then
36609             new_path="$p/$path"
36610             break
36611           fi
36612         done
36613         IFS="$IFS_save"
36614       else
36615         # This is an absolute path, we can use it without further modifications.
36616         new_path="$path"
36617       fi
36618 
36619       if test "x$new_path" = x; then
36620         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36621 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36622         has_space=`$ECHO "$complete" | $GREP " "`
36623         if test "x$has_space" != x; then
36624           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36625 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36626         fi
36627         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36628       fi
36629     fi
36630 
36631     # Now join together the path and the arguments once again
36632     if test "x$arguments" != xEOL; then
36633       new_complete="$new_path ${arguments% *}"
36634     else
36635       new_complete="$new_path"
36636     fi
36637 
36638     if test "x$complete" != "x$new_complete"; then
36639       CPP="$new_complete"
36640       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36641 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36642     fi
36643   fi
36644 
36645   ac_ext=cpp
36646 ac_cpp='$CXXCPP $CPPFLAGS'
36647 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36648 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36649 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36651 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36652 if test -z "$CXXCPP"; then
36653   if ${ac_cv_prog_CXXCPP+:} false; then :
36654   $as_echo_n "(cached) " >&6
36655 else
36656       # Double quotes because CXXCPP needs to be expanded
36657     for CXXCPP in "$CXX -E" "/lib/cpp"
36658     do
36659       ac_preproc_ok=false
36660 for ac_cxx_preproc_warn_flag in '' yes
36661 do
36662   # Use a header file that comes with gcc, so configuring glibc
36663   # with a fresh cross-compiler works.
36664   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36665   # <limits.h> exists even on freestanding compilers.
36666   # On the NeXT, cc -E runs the code through the compiler's parser,
36667   # not just through cpp. "Syntax error" is here to catch this case.
36668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36669 /* end confdefs.h.  */
36670 #ifdef __STDC__
36671 # include <limits.h>
36672 #else
36673 # include <assert.h>
36674 #endif
36675                      Syntax error
36676 _ACEOF
36677 if ac_fn_cxx_try_cpp "$LINENO"; then :
36678 
36679 else
36680   # Broken: fails on valid input.
36681 continue
36682 fi
36683 rm -f conftest.err conftest.i conftest.$ac_ext
36684 
36685   # OK, works on sane cases.  Now check whether nonexistent headers
36686   # can be detected and how.
36687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36688 /* end confdefs.h.  */
36689 #include <ac_nonexistent.h>
36690 _ACEOF
36691 if ac_fn_cxx_try_cpp "$LINENO"; then :
36692   # Broken: success on invalid input.
36693 continue
36694 else
36695   # Passes both tests.
36696 ac_preproc_ok=:
36697 break
36698 fi
36699 rm -f conftest.err conftest.i conftest.$ac_ext
36700 
36701 done
36702 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36703 rm -f conftest.i conftest.err conftest.$ac_ext
36704 if $ac_preproc_ok; then :
36705   break
36706 fi
36707 
36708     done
36709     ac_cv_prog_CXXCPP=$CXXCPP
36710 
36711 fi
36712   CXXCPP=$ac_cv_prog_CXXCPP
36713 else
36714   ac_cv_prog_CXXCPP=$CXXCPP
36715 fi
36716 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36717 $as_echo "$CXXCPP" >&6; }
36718 ac_preproc_ok=false
36719 for ac_cxx_preproc_warn_flag in '' yes
36720 do
36721   # Use a header file that comes with gcc, so configuring glibc
36722   # with a fresh cross-compiler works.
36723   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36724   # <limits.h> exists even on freestanding compilers.
36725   # On the NeXT, cc -E runs the code through the compiler's parser,
36726   # not just through cpp. "Syntax error" is here to catch this case.
36727   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36728 /* end confdefs.h.  */
36729 #ifdef __STDC__
36730 # include <limits.h>
36731 #else
36732 # include <assert.h>
36733 #endif
36734                      Syntax error
36735 _ACEOF
36736 if ac_fn_cxx_try_cpp "$LINENO"; then :
36737 
36738 else
36739   # Broken: fails on valid input.
36740 continue
36741 fi
36742 rm -f conftest.err conftest.i conftest.$ac_ext
36743 
36744   # OK, works on sane cases.  Now check whether nonexistent headers
36745   # can be detected and how.
36746   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36747 /* end confdefs.h.  */
36748 #include <ac_nonexistent.h>
36749 _ACEOF
36750 if ac_fn_cxx_try_cpp "$LINENO"; then :
36751   # Broken: success on invalid input.
36752 continue
36753 else
36754   # Passes both tests.
36755 ac_preproc_ok=:
36756 break
36757 fi
36758 rm -f conftest.err conftest.i conftest.$ac_ext
36759 
36760 done
36761 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36762 rm -f conftest.i conftest.err conftest.$ac_ext
36763 if $ac_preproc_ok; then :
36764 
36765 else
36766   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36767 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36768 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36769 See \`config.log' for more details" "$LINENO" 5; }
36770 fi
36771 
36772 ac_ext=cpp
36773 ac_cpp='$CXXCPP $CPPFLAGS'
36774 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36775 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36776 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36777 
36778 
36779   # Only process if variable expands to non-empty
36780 
36781   if test "x$CXXCPP" != x; then
36782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36783 
36784   # First separate the path from the arguments. This will split at the first
36785   # space.
36786   complete="$CXXCPP"
36787   path="${complete%% *}"
36788   tmp="$complete EOL"
36789   arguments="${tmp#* }"
36790 
36791   # Input might be given as Windows format, start by converting to
36792   # unix format.
36793   new_path=`$CYGPATH -u "$path"`
36794 
36795   # Now try to locate executable using which
36796   new_path=`$WHICH "$new_path" 2> /dev/null`
36797   # bat and cmd files are not always considered executable in cygwin causing which
36798   # to not find them
36799   if test "x$new_path" = x \
36800       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36801       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36802     new_path=`$CYGPATH -u "$path"`
36803   fi
36804   if test "x$new_path" = x; then
36805     # Oops. Which didn't find the executable.
36806     # The splitting of arguments from the executable at a space might have been incorrect,
36807     # since paths with space are more likely in Windows. Give it another try with the whole
36808     # argument.
36809     path="$complete"
36810     arguments="EOL"
36811     new_path=`$CYGPATH -u "$path"`
36812     new_path=`$WHICH "$new_path" 2> /dev/null`
36813     # bat and cmd files are not always considered executable in cygwin causing which
36814     # to not find them
36815     if test "x$new_path" = x \
36816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36818       new_path=`$CYGPATH -u "$path"`
36819     fi
36820     if test "x$new_path" = x; then
36821       # It's still not found. Now this is an unrecoverable error.
36822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36823 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36824       has_space=`$ECHO "$complete" | $GREP " "`
36825       if test "x$has_space" != x; then
36826         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36827 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36828       fi
36829       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36830     fi
36831   fi
36832 
36833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36836   # "foo.exe" is OK but "foo" is an error.
36837   #
36838   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36839   # It is also a way to make sure we got the proper file name for the real test later on.
36840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36841   if test "x$test_shortpath" = x; then
36842     # Short path failed, file does not exist as specified.
36843     # Try adding .exe or .cmd
36844     if test -f "${new_path}.exe"; then
36845       input_to_shortpath="${new_path}.exe"
36846     elif test -f "${new_path}.cmd"; then
36847       input_to_shortpath="${new_path}.cmd"
36848     else
36849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36850 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36851       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36852 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36853       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36854     fi
36855   else
36856     input_to_shortpath="$new_path"
36857   fi
36858 
36859   # Call helper function which possibly converts this using DOS-style short mode.
36860   # If so, the updated path is stored in $new_path.
36861   new_path="$input_to_shortpath"
36862 
36863   input_path="$input_to_shortpath"
36864   # Check if we need to convert this using DOS-style short mode. If the path
36865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36866   # take no chances and rewrite it.
36867   # Note: m4 eats our [], so we need to use [ and ] instead.
36868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36869   if test "x$has_forbidden_chars" != x; then
36870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36874       # Going to short mode and back again did indeed matter. Since short mode is
36875       # case insensitive, let's make it lowercase to improve readability.
36876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36877       # Now convert it back to Unix-style (cygpath)
36878       input_path=`$CYGPATH -u "$shortmode_path"`
36879       new_path="$input_path"
36880     fi
36881   fi
36882 
36883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36884   if test "x$test_cygdrive_prefix" = x; then
36885     # As a simple fix, exclude /usr/bin since it's not a real path.
36886     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36888       # a path prefixed by /cygdrive for fixpath to work.
36889       new_path="$CYGWIN_ROOT_PATH$input_path"
36890     fi
36891   fi
36892 
36893   # remove trailing .exe if any
36894   new_path="${new_path/%.exe/}"
36895 
36896     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36897 
36898   # First separate the path from the arguments. This will split at the first
36899   # space.
36900   complete="$CXXCPP"
36901   path="${complete%% *}"
36902   tmp="$complete EOL"
36903   arguments="${tmp#* }"
36904 
36905   # Input might be given as Windows format, start by converting to
36906   # unix format.
36907   new_path="$path"
36908 
36909   windows_path="$new_path"
36910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36911     unix_path=`$CYGPATH -u "$windows_path"`
36912     new_path="$unix_path"
36913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36915     new_path="$unix_path"
36916   fi
36917 
36918 
36919   # Now try to locate executable using which
36920   new_path=`$WHICH "$new_path" 2> /dev/null`
36921 
36922   if test "x$new_path" = x; then
36923     # Oops. Which didn't find the executable.
36924     # The splitting of arguments from the executable at a space might have been incorrect,
36925     # since paths with space are more likely in Windows. Give it another try with the whole
36926     # argument.
36927     path="$complete"
36928     arguments="EOL"
36929     new_path="$path"
36930 
36931   windows_path="$new_path"
36932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36933     unix_path=`$CYGPATH -u "$windows_path"`
36934     new_path="$unix_path"
36935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36937     new_path="$unix_path"
36938   fi
36939 
36940 
36941     new_path=`$WHICH "$new_path" 2> /dev/null`
36942     # bat and cmd files are not always considered executable in MSYS causing which
36943     # to not find them
36944     if test "x$new_path" = x \
36945         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36946         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36947       new_path="$path"
36948 
36949   windows_path="$new_path"
36950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36951     unix_path=`$CYGPATH -u "$windows_path"`
36952     new_path="$unix_path"
36953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36955     new_path="$unix_path"
36956   fi
36957 
36958     fi
36959 
36960     if test "x$new_path" = x; then
36961       # It's still not found. Now this is an unrecoverable error.
36962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36963 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36964       has_space=`$ECHO "$complete" | $GREP " "`
36965       if test "x$has_space" != x; then
36966         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36967 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36968       fi
36969       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36970     fi
36971   fi
36972 
36973   # Now new_path has a complete unix path to the binary
36974   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36975     # Keep paths in /bin as-is, but remove trailing .exe if any
36976     new_path="${new_path/%.exe/}"
36977     # Do not save /bin paths to all_fixpath_prefixes!
36978   else
36979     # Not in mixed or Windows style, start by that.
36980     new_path=`cmd //c echo $new_path`
36981 
36982   input_path="$new_path"
36983   # Check if we need to convert this using DOS-style short mode. If the path
36984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36985   # take no chances and rewrite it.
36986   # Note: m4 eats our [], so we need to use [ and ] instead.
36987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36988   if test "x$has_forbidden_chars" != x; then
36989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36991   fi
36992 
36993     # Output is in $new_path
36994 
36995   windows_path="$new_path"
36996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36997     unix_path=`$CYGPATH -u "$windows_path"`
36998     new_path="$unix_path"
36999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37001     new_path="$unix_path"
37002   fi
37003 
37004     # remove trailing .exe if any
37005     new_path="${new_path/%.exe/}"
37006 
37007     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37008     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37009   fi
37010 
37011     else
37012       # We're on a unix platform. Hooray! :)
37013       # First separate the path from the arguments. This will split at the first
37014       # space.
37015       complete="$CXXCPP"
37016       path="${complete%% *}"
37017       tmp="$complete EOL"
37018       arguments="${tmp#* }"
37019 
37020       # Cannot rely on the command "which" here since it doesn't always work.
37021       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37022       if test -z "$is_absolute_path"; then
37023         # Path to executable is not absolute. Find it.
37024         IFS_save="$IFS"
37025         IFS=:
37026         for p in $PATH; do
37027           if test -f "$p/$path" && test -x "$p/$path"; then
37028             new_path="$p/$path"
37029             break
37030           fi
37031         done
37032         IFS="$IFS_save"
37033       else
37034         # This is an absolute path, we can use it without further modifications.
37035         new_path="$path"
37036       fi
37037 
37038       if test "x$new_path" = x; then
37039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37040 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37041         has_space=`$ECHO "$complete" | $GREP " "`
37042         if test "x$has_space" != x; then
37043           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37044 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37045         fi
37046         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37047       fi
37048     fi
37049 
37050     # Now join together the path and the arguments once again
37051     if test "x$arguments" != xEOL; then
37052       new_complete="$new_path ${arguments% *}"
37053     else
37054       new_complete="$new_path"
37055     fi
37056 
37057     if test "x$complete" != "x$new_complete"; then
37058       CXXCPP="$new_complete"
37059       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37060 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37061     fi
37062   fi
37063 
37064 
37065   #
37066   # Setup the linker (LD)
37067   #
37068   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37069     # In the Microsoft toolchain we have a separate LD command "link".
37070     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37071     # a cygwin program for something completely different.
37072     # Extract the first word of "link", so it can be a program name with args.
37073 set dummy link; ac_word=$2
37074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37075 $as_echo_n "checking for $ac_word... " >&6; }
37076 if ${ac_cv_prog_LD+:} false; then :
37077   $as_echo_n "(cached) " >&6
37078 else
37079   if test -n "$LD"; then
37080   ac_cv_prog_LD="$LD" # Let the user override the test.
37081 else
37082   ac_prog_rejected=no
37083 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37084 for as_dir in $PATH
37085 do
37086   IFS=$as_save_IFS
37087   test -z "$as_dir" && as_dir=.
37088     for ac_exec_ext in '' $ac_executable_extensions; do
37089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37090     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37091        ac_prog_rejected=yes
37092        continue
37093      fi
37094     ac_cv_prog_LD="link"
37095     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37096     break 2
37097   fi
37098 done
37099   done
37100 IFS=$as_save_IFS
37101 
37102 if test $ac_prog_rejected = yes; then
37103   # We found a bogon in the path, so make sure we never use it.
37104   set dummy $ac_cv_prog_LD
37105   shift
37106   if test $# != 0; then
37107     # We chose a different compiler from the bogus one.
37108     # However, it has the same basename, so the bogon will be chosen
37109     # first if we set LD to just the basename; use the full file name.
37110     shift
37111     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37112   fi
37113 fi
37114 fi
37115 fi
37116 LD=$ac_cv_prog_LD
37117 if test -n "$LD"; then
37118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37119 $as_echo "$LD" >&6; }
37120 else
37121   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37122 $as_echo "no" >&6; }
37123 fi
37124 
37125 
37126 
37127   # Only process if variable expands to non-empty
37128 
37129   if test "x$LD" != x; then
37130     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37131 
37132   # First separate the path from the arguments. This will split at the first
37133   # space.
37134   complete="$LD"
37135   path="${complete%% *}"
37136   tmp="$complete EOL"
37137   arguments="${tmp#* }"
37138 
37139   # Input might be given as Windows format, start by converting to
37140   # unix format.
37141   new_path=`$CYGPATH -u "$path"`
37142 
37143   # Now try to locate executable using which
37144   new_path=`$WHICH "$new_path" 2> /dev/null`
37145   # bat and cmd files are not always considered executable in cygwin causing which
37146   # to not find them
37147   if test "x$new_path" = x \
37148       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37149       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37150     new_path=`$CYGPATH -u "$path"`
37151   fi
37152   if test "x$new_path" = x; then
37153     # Oops. Which didn't find the executable.
37154     # The splitting of arguments from the executable at a space might have been incorrect,
37155     # since paths with space are more likely in Windows. Give it another try with the whole
37156     # argument.
37157     path="$complete"
37158     arguments="EOL"
37159     new_path=`$CYGPATH -u "$path"`
37160     new_path=`$WHICH "$new_path" 2> /dev/null`
37161     # bat and cmd files are not always considered executable in cygwin causing which
37162     # to not find them
37163     if test "x$new_path" = x \
37164         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37165         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37166       new_path=`$CYGPATH -u "$path"`
37167     fi
37168     if test "x$new_path" = x; then
37169       # It's still not found. Now this is an unrecoverable error.
37170       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37171 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37172       has_space=`$ECHO "$complete" | $GREP " "`
37173       if test "x$has_space" != x; then
37174         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37175 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37176       fi
37177       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37178     fi
37179   fi
37180 
37181   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37182   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37183   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37184   # "foo.exe" is OK but "foo" is an error.
37185   #
37186   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37187   # It is also a way to make sure we got the proper file name for the real test later on.
37188   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37189   if test "x$test_shortpath" = x; then
37190     # Short path failed, file does not exist as specified.
37191     # Try adding .exe or .cmd
37192     if test -f "${new_path}.exe"; then
37193       input_to_shortpath="${new_path}.exe"
37194     elif test -f "${new_path}.cmd"; then
37195       input_to_shortpath="${new_path}.cmd"
37196     else
37197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37198 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37199       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37200 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37201       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37202     fi
37203   else
37204     input_to_shortpath="$new_path"
37205   fi
37206 
37207   # Call helper function which possibly converts this using DOS-style short mode.
37208   # If so, the updated path is stored in $new_path.
37209   new_path="$input_to_shortpath"
37210 
37211   input_path="$input_to_shortpath"
37212   # Check if we need to convert this using DOS-style short mode. If the path
37213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37214   # take no chances and rewrite it.
37215   # Note: m4 eats our [], so we need to use [ and ] instead.
37216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37217   if test "x$has_forbidden_chars" != x; then
37218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37222       # Going to short mode and back again did indeed matter. Since short mode is
37223       # case insensitive, let's make it lowercase to improve readability.
37224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37225       # Now convert it back to Unix-style (cygpath)
37226       input_path=`$CYGPATH -u "$shortmode_path"`
37227       new_path="$input_path"
37228     fi
37229   fi
37230 
37231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37232   if test "x$test_cygdrive_prefix" = x; then
37233     # As a simple fix, exclude /usr/bin since it's not a real path.
37234     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37236       # a path prefixed by /cygdrive for fixpath to work.
37237       new_path="$CYGWIN_ROOT_PATH$input_path"
37238     fi
37239   fi
37240 
37241   # remove trailing .exe if any
37242   new_path="${new_path/%.exe/}"
37243 
37244     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37245 
37246   # First separate the path from the arguments. This will split at the first
37247   # space.
37248   complete="$LD"
37249   path="${complete%% *}"
37250   tmp="$complete EOL"
37251   arguments="${tmp#* }"
37252 
37253   # Input might be given as Windows format, start by converting to
37254   # unix format.
37255   new_path="$path"
37256 
37257   windows_path="$new_path"
37258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37259     unix_path=`$CYGPATH -u "$windows_path"`
37260     new_path="$unix_path"
37261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37263     new_path="$unix_path"
37264   fi
37265 
37266 
37267   # Now try to locate executable using which
37268   new_path=`$WHICH "$new_path" 2> /dev/null`
37269 
37270   if test "x$new_path" = x; then
37271     # Oops. Which didn't find the executable.
37272     # The splitting of arguments from the executable at a space might have been incorrect,
37273     # since paths with space are more likely in Windows. Give it another try with the whole
37274     # argument.
37275     path="$complete"
37276     arguments="EOL"
37277     new_path="$path"
37278 
37279   windows_path="$new_path"
37280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37281     unix_path=`$CYGPATH -u "$windows_path"`
37282     new_path="$unix_path"
37283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37284     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37285     new_path="$unix_path"
37286   fi
37287 
37288 
37289     new_path=`$WHICH "$new_path" 2> /dev/null`
37290     # bat and cmd files are not always considered executable in MSYS causing which
37291     # to not find them
37292     if test "x$new_path" = x \
37293         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37294         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37295       new_path="$path"
37296 
37297   windows_path="$new_path"
37298   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37299     unix_path=`$CYGPATH -u "$windows_path"`
37300     new_path="$unix_path"
37301   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37302     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37303     new_path="$unix_path"
37304   fi
37305 
37306     fi
37307 
37308     if test "x$new_path" = x; then
37309       # It's still not found. Now this is an unrecoverable error.
37310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37311 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37312       has_space=`$ECHO "$complete" | $GREP " "`
37313       if test "x$has_space" != x; then
37314         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37315 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37316       fi
37317       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37318     fi
37319   fi
37320 
37321   # Now new_path has a complete unix path to the binary
37322   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37323     # Keep paths in /bin as-is, but remove trailing .exe if any
37324     new_path="${new_path/%.exe/}"
37325     # Do not save /bin paths to all_fixpath_prefixes!
37326   else
37327     # Not in mixed or Windows style, start by that.
37328     new_path=`cmd //c echo $new_path`
37329 
37330   input_path="$new_path"
37331   # Check if we need to convert this using DOS-style short mode. If the path
37332   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37333   # take no chances and rewrite it.
37334   # Note: m4 eats our [], so we need to use [ and ] instead.
37335   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37336   if test "x$has_forbidden_chars" != x; then
37337     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37338     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37339   fi
37340 
37341     # Output is in $new_path
37342 
37343   windows_path="$new_path"
37344   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37345     unix_path=`$CYGPATH -u "$windows_path"`
37346     new_path="$unix_path"
37347   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37348     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37349     new_path="$unix_path"
37350   fi
37351 
37352     # remove trailing .exe if any
37353     new_path="${new_path/%.exe/}"
37354 
37355     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37356     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37357   fi
37358 
37359     else
37360       # We're on a unix platform. Hooray! :)
37361       # First separate the path from the arguments. This will split at the first
37362       # space.
37363       complete="$LD"
37364       path="${complete%% *}"
37365       tmp="$complete EOL"
37366       arguments="${tmp#* }"
37367 
37368       # Cannot rely on the command "which" here since it doesn't always work.
37369       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37370       if test -z "$is_absolute_path"; then
37371         # Path to executable is not absolute. Find it.
37372         IFS_save="$IFS"
37373         IFS=:
37374         for p in $PATH; do
37375           if test -f "$p/$path" && test -x "$p/$path"; then
37376             new_path="$p/$path"
37377             break
37378           fi
37379         done
37380         IFS="$IFS_save"
37381       else
37382         # This is an absolute path, we can use it without further modifications.
37383         new_path="$path"
37384       fi
37385 
37386       if test "x$new_path" = x; then
37387         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37388 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37389         has_space=`$ECHO "$complete" | $GREP " "`
37390         if test "x$has_space" != x; then
37391           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37392 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37393         fi
37394         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37395       fi
37396     fi
37397 
37398     # Now join together the path and the arguments once again
37399     if test "x$arguments" != xEOL; then
37400       new_complete="$new_path ${arguments% *}"
37401     else
37402       new_complete="$new_path"
37403     fi
37404 
37405     if test "x$complete" != "x$new_complete"; then
37406       LD="$new_complete"
37407       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37408 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37409     fi
37410   fi
37411 
37412     # Verify that we indeed succeeded with this trick.
37413     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37414 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37415     "$LD" --version > /dev/null
37416     if test $? -eq 0 ; then
37417       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37418 $as_echo "no" >&6; }
37419       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37420     else
37421       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37422 $as_echo "yes" >&6; }
37423     fi
37424     LDCXX="$LD"
37425   else
37426     # All other toolchains use the compiler to link.
37427     LD="$CC"
37428     LDCXX="$CXX"
37429   fi
37430 
37431   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37432 
37433 
37434   #
37435   # Setup the assembler (AS)
37436   #
37437   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37438 
37439 
37440   # Publish this variable in the help.
37441 
37442 
37443   if [ -z "${AS+x}" ]; then
37444     # The variable is not set by user, try to locate tool using the code snippet
37445     for ac_prog in as
37446 do
37447   # Extract the first word of "$ac_prog", so it can be a program name with args.
37448 set dummy $ac_prog; ac_word=$2
37449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37450 $as_echo_n "checking for $ac_word... " >&6; }
37451 if ${ac_cv_path_AS+:} false; then :
37452   $as_echo_n "(cached) " >&6
37453 else
37454   case $AS in
37455   [\\/]* | ?:[\\/]*)
37456   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37457   ;;
37458   *)
37459   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37460 for as_dir in $PATH
37461 do
37462   IFS=$as_save_IFS
37463   test -z "$as_dir" && as_dir=.
37464     for ac_exec_ext in '' $ac_executable_extensions; do
37465   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37466     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37467     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37468     break 2
37469   fi
37470 done
37471   done
37472 IFS=$as_save_IFS
37473 
37474   ;;
37475 esac
37476 fi
37477 AS=$ac_cv_path_AS
37478 if test -n "$AS"; then
37479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37480 $as_echo "$AS" >&6; }
37481 else
37482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37483 $as_echo "no" >&6; }
37484 fi
37485 
37486 
37487   test -n "$AS" && break
37488 done
37489 
37490   else
37491     # The variable is set, but is it from the command line or the environment?
37492 
37493     # Try to remove the string !AS! from our list.
37494     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37495     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37496       # If it failed, the variable was not from the command line. Ignore it,
37497       # but warn the user (except for BASH, which is always set by the calling BASH).
37498       if test "xAS" != xBASH; then
37499         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37500 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37501       fi
37502       # Try to locate tool using the code snippet
37503       for ac_prog in as
37504 do
37505   # Extract the first word of "$ac_prog", so it can be a program name with args.
37506 set dummy $ac_prog; ac_word=$2
37507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37508 $as_echo_n "checking for $ac_word... " >&6; }
37509 if ${ac_cv_path_AS+:} false; then :
37510   $as_echo_n "(cached) " >&6
37511 else
37512   case $AS in
37513   [\\/]* | ?:[\\/]*)
37514   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37515   ;;
37516   *)
37517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37518 for as_dir in $PATH
37519 do
37520   IFS=$as_save_IFS
37521   test -z "$as_dir" && as_dir=.
37522     for ac_exec_ext in '' $ac_executable_extensions; do
37523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37524     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37526     break 2
37527   fi
37528 done
37529   done
37530 IFS=$as_save_IFS
37531 
37532   ;;
37533 esac
37534 fi
37535 AS=$ac_cv_path_AS
37536 if test -n "$AS"; then
37537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37538 $as_echo "$AS" >&6; }
37539 else
37540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37541 $as_echo "no" >&6; }
37542 fi
37543 
37544 
37545   test -n "$AS" && break
37546 done
37547 
37548     else
37549       # If it succeeded, then it was overridden by the user. We will use it
37550       # for the tool.
37551 
37552       # First remove it from the list of overridden variables, so we can test
37553       # for unknown variables in the end.
37554       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37555 
37556       # Check if we try to supply an empty value
37557       if test "x$AS" = x; then
37558         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37559 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37560         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37561 $as_echo_n "checking for AS... " >&6; }
37562         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37563 $as_echo "disabled" >&6; }
37564       else
37565         # Check if the provided tool contains a complete path.
37566         tool_specified="$AS"
37567         tool_basename="${tool_specified##*/}"
37568         if test "x$tool_basename" = "x$tool_specified"; then
37569           # A command without a complete path is provided, search $PATH.
37570           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37571 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37572           # Extract the first word of "$tool_basename", so it can be a program name with args.
37573 set dummy $tool_basename; ac_word=$2
37574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37575 $as_echo_n "checking for $ac_word... " >&6; }
37576 if ${ac_cv_path_AS+:} false; then :
37577   $as_echo_n "(cached) " >&6
37578 else
37579   case $AS in
37580   [\\/]* | ?:[\\/]*)
37581   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37582   ;;
37583   *)
37584   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37585 for as_dir in $PATH
37586 do
37587   IFS=$as_save_IFS
37588   test -z "$as_dir" && as_dir=.
37589     for ac_exec_ext in '' $ac_executable_extensions; do
37590   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37591     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37592     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37593     break 2
37594   fi
37595 done
37596   done
37597 IFS=$as_save_IFS
37598 
37599   ;;
37600 esac
37601 fi
37602 AS=$ac_cv_path_AS
37603 if test -n "$AS"; then
37604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37605 $as_echo "$AS" >&6; }
37606 else
37607   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37608 $as_echo "no" >&6; }
37609 fi
37610 
37611 
37612           if test "x$AS" = x; then
37613             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37614           fi
37615         else
37616           # Otherwise we believe it is a complete path. Use it as it is.
37617           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37618 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37619           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37620 $as_echo_n "checking for AS... " >&6; }
37621           if test ! -x "$tool_specified"; then
37622             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37623 $as_echo "not found" >&6; }
37624             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37625           fi
37626           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37627 $as_echo "$tool_specified" >&6; }
37628         fi
37629       fi
37630     fi
37631 
37632   fi
37633 
37634 
37635 
37636   # Only process if variable expands to non-empty
37637 
37638   if test "x$AS" != x; then
37639     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37640 
37641   # First separate the path from the arguments. This will split at the first
37642   # space.
37643   complete="$AS"
37644   path="${complete%% *}"
37645   tmp="$complete EOL"
37646   arguments="${tmp#* }"
37647 
37648   # Input might be given as Windows format, start by converting to
37649   # unix format.
37650   new_path=`$CYGPATH -u "$path"`
37651 
37652   # Now try to locate executable using which
37653   new_path=`$WHICH "$new_path" 2> /dev/null`
37654   # bat and cmd files are not always considered executable in cygwin causing which
37655   # to not find them
37656   if test "x$new_path" = x \
37657       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37658       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37659     new_path=`$CYGPATH -u "$path"`
37660   fi
37661   if test "x$new_path" = x; then
37662     # Oops. Which didn't find the executable.
37663     # The splitting of arguments from the executable at a space might have been incorrect,
37664     # since paths with space are more likely in Windows. Give it another try with the whole
37665     # argument.
37666     path="$complete"
37667     arguments="EOL"
37668     new_path=`$CYGPATH -u "$path"`
37669     new_path=`$WHICH "$new_path" 2> /dev/null`
37670     # bat and cmd files are not always considered executable in cygwin causing which
37671     # to not find them
37672     if test "x$new_path" = x \
37673         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37674         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37675       new_path=`$CYGPATH -u "$path"`
37676     fi
37677     if test "x$new_path" = x; then
37678       # It's still not found. Now this is an unrecoverable error.
37679       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37680 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37681       has_space=`$ECHO "$complete" | $GREP " "`
37682       if test "x$has_space" != x; then
37683         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37684 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37685       fi
37686       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37687     fi
37688   fi
37689 
37690   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37691   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37692   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37693   # "foo.exe" is OK but "foo" is an error.
37694   #
37695   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37696   # It is also a way to make sure we got the proper file name for the real test later on.
37697   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37698   if test "x$test_shortpath" = x; then
37699     # Short path failed, file does not exist as specified.
37700     # Try adding .exe or .cmd
37701     if test -f "${new_path}.exe"; then
37702       input_to_shortpath="${new_path}.exe"
37703     elif test -f "${new_path}.cmd"; then
37704       input_to_shortpath="${new_path}.cmd"
37705     else
37706       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37707 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37708       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37709 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37710       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37711     fi
37712   else
37713     input_to_shortpath="$new_path"
37714   fi
37715 
37716   # Call helper function which possibly converts this using DOS-style short mode.
37717   # If so, the updated path is stored in $new_path.
37718   new_path="$input_to_shortpath"
37719 
37720   input_path="$input_to_shortpath"
37721   # Check if we need to convert this using DOS-style short mode. If the path
37722   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37723   # take no chances and rewrite it.
37724   # Note: m4 eats our [], so we need to use [ and ] instead.
37725   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37726   if test "x$has_forbidden_chars" != x; then
37727     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37728     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37729     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37730     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37731       # Going to short mode and back again did indeed matter. Since short mode is
37732       # case insensitive, let's make it lowercase to improve readability.
37733       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37734       # Now convert it back to Unix-style (cygpath)
37735       input_path=`$CYGPATH -u "$shortmode_path"`
37736       new_path="$input_path"
37737     fi
37738   fi
37739 
37740   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37741   if test "x$test_cygdrive_prefix" = x; then
37742     # As a simple fix, exclude /usr/bin since it's not a real path.
37743     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37744       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37745       # a path prefixed by /cygdrive for fixpath to work.
37746       new_path="$CYGWIN_ROOT_PATH$input_path"
37747     fi
37748   fi
37749 
37750   # remove trailing .exe if any
37751   new_path="${new_path/%.exe/}"
37752 
37753     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37754 
37755   # First separate the path from the arguments. This will split at the first
37756   # space.
37757   complete="$AS"
37758   path="${complete%% *}"
37759   tmp="$complete EOL"
37760   arguments="${tmp#* }"
37761 
37762   # Input might be given as Windows format, start by converting to
37763   # unix format.
37764   new_path="$path"
37765 
37766   windows_path="$new_path"
37767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37768     unix_path=`$CYGPATH -u "$windows_path"`
37769     new_path="$unix_path"
37770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37772     new_path="$unix_path"
37773   fi
37774 
37775 
37776   # Now try to locate executable using which
37777   new_path=`$WHICH "$new_path" 2> /dev/null`
37778 
37779   if test "x$new_path" = x; then
37780     # Oops. Which didn't find the executable.
37781     # The splitting of arguments from the executable at a space might have been incorrect,
37782     # since paths with space are more likely in Windows. Give it another try with the whole
37783     # argument.
37784     path="$complete"
37785     arguments="EOL"
37786     new_path="$path"
37787 
37788   windows_path="$new_path"
37789   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37790     unix_path=`$CYGPATH -u "$windows_path"`
37791     new_path="$unix_path"
37792   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37793     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37794     new_path="$unix_path"
37795   fi
37796 
37797 
37798     new_path=`$WHICH "$new_path" 2> /dev/null`
37799     # bat and cmd files are not always considered executable in MSYS causing which
37800     # to not find them
37801     if test "x$new_path" = x \
37802         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37803         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37804       new_path="$path"
37805 
37806   windows_path="$new_path"
37807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37808     unix_path=`$CYGPATH -u "$windows_path"`
37809     new_path="$unix_path"
37810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37812     new_path="$unix_path"
37813   fi
37814 
37815     fi
37816 
37817     if test "x$new_path" = x; then
37818       # It's still not found. Now this is an unrecoverable error.
37819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37820 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37821       has_space=`$ECHO "$complete" | $GREP " "`
37822       if test "x$has_space" != x; then
37823         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37824 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37825       fi
37826       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37827     fi
37828   fi
37829 
37830   # Now new_path has a complete unix path to the binary
37831   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37832     # Keep paths in /bin as-is, but remove trailing .exe if any
37833     new_path="${new_path/%.exe/}"
37834     # Do not save /bin paths to all_fixpath_prefixes!
37835   else
37836     # Not in mixed or Windows style, start by that.
37837     new_path=`cmd //c echo $new_path`
37838 
37839   input_path="$new_path"
37840   # Check if we need to convert this using DOS-style short mode. If the path
37841   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37842   # take no chances and rewrite it.
37843   # Note: m4 eats our [], so we need to use [ and ] instead.
37844   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37845   if test "x$has_forbidden_chars" != x; then
37846     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37847     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37848   fi
37849 
37850     # Output is in $new_path
37851 
37852   windows_path="$new_path"
37853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37854     unix_path=`$CYGPATH -u "$windows_path"`
37855     new_path="$unix_path"
37856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37858     new_path="$unix_path"
37859   fi
37860 
37861     # remove trailing .exe if any
37862     new_path="${new_path/%.exe/}"
37863 
37864     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37865     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37866   fi
37867 
37868     else
37869       # We're on a unix platform. Hooray! :)
37870       # First separate the path from the arguments. This will split at the first
37871       # space.
37872       complete="$AS"
37873       path="${complete%% *}"
37874       tmp="$complete EOL"
37875       arguments="${tmp#* }"
37876 
37877       # Cannot rely on the command "which" here since it doesn't always work.
37878       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37879       if test -z "$is_absolute_path"; then
37880         # Path to executable is not absolute. Find it.
37881         IFS_save="$IFS"
37882         IFS=:
37883         for p in $PATH; do
37884           if test -f "$p/$path" && test -x "$p/$path"; then
37885             new_path="$p/$path"
37886             break
37887           fi
37888         done
37889         IFS="$IFS_save"
37890       else
37891         # This is an absolute path, we can use it without further modifications.
37892         new_path="$path"
37893       fi
37894 
37895       if test "x$new_path" = x; then
37896         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37897 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37898         has_space=`$ECHO "$complete" | $GREP " "`
37899         if test "x$has_space" != x; then
37900           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37901 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37902         fi
37903         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37904       fi
37905     fi
37906 
37907     # Now join together the path and the arguments once again
37908     if test "x$arguments" != xEOL; then
37909       new_complete="$new_path ${arguments% *}"
37910     else
37911       new_complete="$new_path"
37912     fi
37913 
37914     if test "x$complete" != "x$new_complete"; then
37915       AS="$new_complete"
37916       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37917 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37918     fi
37919   fi
37920 
37921     if test "x$AS" = x; then
37922       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37923     fi
37924   else
37925     # FIXME: is this correct for microsoft?
37926     AS="$CC -c"
37927   fi
37928 
37929 
37930   #
37931   # Setup the archiver (AR)
37932   #
37933   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37934     # The corresponding ar tool is lib.exe (used to create static libraries)
37935     # Extract the first word of "lib", so it can be a program name with args.
37936 set dummy lib; ac_word=$2
37937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37938 $as_echo_n "checking for $ac_word... " >&6; }
37939 if ${ac_cv_prog_AR+:} false; then :
37940   $as_echo_n "(cached) " >&6
37941 else
37942   if test -n "$AR"; then
37943   ac_cv_prog_AR="$AR" # Let the user override the test.
37944 else
37945 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37946 for as_dir in $PATH
37947 do
37948   IFS=$as_save_IFS
37949   test -z "$as_dir" && as_dir=.
37950     for ac_exec_ext in '' $ac_executable_extensions; do
37951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37952     ac_cv_prog_AR="lib"
37953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37954     break 2
37955   fi
37956 done
37957   done
37958 IFS=$as_save_IFS
37959 
37960 fi
37961 fi
37962 AR=$ac_cv_prog_AR
37963 if test -n "$AR"; then
37964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37965 $as_echo "$AR" >&6; }
37966 else
37967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37968 $as_echo "no" >&6; }
37969 fi
37970 
37971 
37972   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37973 
37974 
37975   # Publish this variable in the help.
37976 
37977 
37978   if [ -z "${AR+x}" ]; then
37979     # The variable is not set by user, try to locate tool using the code snippet
37980     if test -n "$ac_tool_prefix"; then
37981   for ac_prog in ar gcc-ar
37982   do
37983     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37984 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37986 $as_echo_n "checking for $ac_word... " >&6; }
37987 if ${ac_cv_prog_AR+:} false; then :
37988   $as_echo_n "(cached) " >&6
37989 else
37990   if test -n "$AR"; then
37991   ac_cv_prog_AR="$AR" # Let the user override the test.
37992 else
37993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37994 for as_dir in $PATH
37995 do
37996   IFS=$as_save_IFS
37997   test -z "$as_dir" && as_dir=.
37998     for ac_exec_ext in '' $ac_executable_extensions; do
37999   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38000     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38001     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38002     break 2
38003   fi
38004 done
38005   done
38006 IFS=$as_save_IFS
38007 
38008 fi
38009 fi
38010 AR=$ac_cv_prog_AR
38011 if test -n "$AR"; then
38012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38013 $as_echo "$AR" >&6; }
38014 else
38015   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38016 $as_echo "no" >&6; }
38017 fi
38018 
38019 
38020     test -n "$AR" && break
38021   done
38022 fi
38023 if test -z "$AR"; then
38024   ac_ct_AR=$AR
38025   for ac_prog in ar gcc-ar
38026 do
38027   # Extract the first word of "$ac_prog", so it can be a program name with args.
38028 set dummy $ac_prog; ac_word=$2
38029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38030 $as_echo_n "checking for $ac_word... " >&6; }
38031 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38032   $as_echo_n "(cached) " >&6
38033 else
38034   if test -n "$ac_ct_AR"; then
38035   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38036 else
38037 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38038 for as_dir in $PATH
38039 do
38040   IFS=$as_save_IFS
38041   test -z "$as_dir" && as_dir=.
38042     for ac_exec_ext in '' $ac_executable_extensions; do
38043   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38044     ac_cv_prog_ac_ct_AR="$ac_prog"
38045     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38046     break 2
38047   fi
38048 done
38049   done
38050 IFS=$as_save_IFS
38051 
38052 fi
38053 fi
38054 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38055 if test -n "$ac_ct_AR"; then
38056   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38057 $as_echo "$ac_ct_AR" >&6; }
38058 else
38059   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38060 $as_echo "no" >&6; }
38061 fi
38062 
38063 
38064   test -n "$ac_ct_AR" && break
38065 done
38066 
38067   if test "x$ac_ct_AR" = x; then
38068     AR=""
38069   else
38070     case $cross_compiling:$ac_tool_warned in
38071 yes:)
38072 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38073 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38074 ac_tool_warned=yes ;;
38075 esac
38076     AR=$ac_ct_AR
38077   fi
38078 fi
38079 
38080   else
38081     # The variable is set, but is it from the command line or the environment?
38082 
38083     # Try to remove the string !AR! from our list.
38084     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38085     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38086       # If it failed, the variable was not from the command line. Ignore it,
38087       # but warn the user (except for BASH, which is always set by the calling BASH).
38088       if test "xAR" != xBASH; then
38089         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38090 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38091       fi
38092       # Try to locate tool using the code snippet
38093       if test -n "$ac_tool_prefix"; then
38094   for ac_prog in ar gcc-ar
38095   do
38096     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38097 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38099 $as_echo_n "checking for $ac_word... " >&6; }
38100 if ${ac_cv_prog_AR+:} false; then :
38101   $as_echo_n "(cached) " >&6
38102 else
38103   if test -n "$AR"; then
38104   ac_cv_prog_AR="$AR" # Let the user override the test.
38105 else
38106 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38107 for as_dir in $PATH
38108 do
38109   IFS=$as_save_IFS
38110   test -z "$as_dir" && as_dir=.
38111     for ac_exec_ext in '' $ac_executable_extensions; do
38112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38113     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38115     break 2
38116   fi
38117 done
38118   done
38119 IFS=$as_save_IFS
38120 
38121 fi
38122 fi
38123 AR=$ac_cv_prog_AR
38124 if test -n "$AR"; then
38125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38126 $as_echo "$AR" >&6; }
38127 else
38128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38129 $as_echo "no" >&6; }
38130 fi
38131 
38132 
38133     test -n "$AR" && break
38134   done
38135 fi
38136 if test -z "$AR"; then
38137   ac_ct_AR=$AR
38138   for ac_prog in ar gcc-ar
38139 do
38140   # Extract the first word of "$ac_prog", so it can be a program name with args.
38141 set dummy $ac_prog; ac_word=$2
38142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38143 $as_echo_n "checking for $ac_word... " >&6; }
38144 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38145   $as_echo_n "(cached) " >&6
38146 else
38147   if test -n "$ac_ct_AR"; then
38148   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38149 else
38150 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38151 for as_dir in $PATH
38152 do
38153   IFS=$as_save_IFS
38154   test -z "$as_dir" && as_dir=.
38155     for ac_exec_ext in '' $ac_executable_extensions; do
38156   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38157     ac_cv_prog_ac_ct_AR="$ac_prog"
38158     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38159     break 2
38160   fi
38161 done
38162   done
38163 IFS=$as_save_IFS
38164 
38165 fi
38166 fi
38167 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38168 if test -n "$ac_ct_AR"; then
38169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38170 $as_echo "$ac_ct_AR" >&6; }
38171 else
38172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38173 $as_echo "no" >&6; }
38174 fi
38175 
38176 
38177   test -n "$ac_ct_AR" && break
38178 done
38179 
38180   if test "x$ac_ct_AR" = x; then
38181     AR=""
38182   else
38183     case $cross_compiling:$ac_tool_warned in
38184 yes:)
38185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38186 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38187 ac_tool_warned=yes ;;
38188 esac
38189     AR=$ac_ct_AR
38190   fi
38191 fi
38192 
38193     else
38194       # If it succeeded, then it was overridden by the user. We will use it
38195       # for the tool.
38196 
38197       # First remove it from the list of overridden variables, so we can test
38198       # for unknown variables in the end.
38199       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38200 
38201       # Check if we try to supply an empty value
38202       if test "x$AR" = x; then
38203         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38204 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38206 $as_echo_n "checking for AR... " >&6; }
38207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38208 $as_echo "disabled" >&6; }
38209       else
38210         # Check if the provided tool contains a complete path.
38211         tool_specified="$AR"
38212         tool_basename="${tool_specified##*/}"
38213         if test "x$tool_basename" = "x$tool_specified"; then
38214           # A command without a complete path is provided, search $PATH.
38215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38216 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38217           # Extract the first word of "$tool_basename", so it can be a program name with args.
38218 set dummy $tool_basename; ac_word=$2
38219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38220 $as_echo_n "checking for $ac_word... " >&6; }
38221 if ${ac_cv_path_AR+:} false; then :
38222   $as_echo_n "(cached) " >&6
38223 else
38224   case $AR in
38225   [\\/]* | ?:[\\/]*)
38226   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38227   ;;
38228   *)
38229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38230 for as_dir in $PATH
38231 do
38232   IFS=$as_save_IFS
38233   test -z "$as_dir" && as_dir=.
38234     for ac_exec_ext in '' $ac_executable_extensions; do
38235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38236     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38238     break 2
38239   fi
38240 done
38241   done
38242 IFS=$as_save_IFS
38243 
38244   ;;
38245 esac
38246 fi
38247 AR=$ac_cv_path_AR
38248 if test -n "$AR"; then
38249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38250 $as_echo "$AR" >&6; }
38251 else
38252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38253 $as_echo "no" >&6; }
38254 fi
38255 
38256 
38257           if test "x$AR" = x; then
38258             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38259           fi
38260         else
38261           # Otherwise we believe it is a complete path. Use it as it is.
38262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38263 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38264           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38265 $as_echo_n "checking for AR... " >&6; }
38266           if test ! -x "$tool_specified"; then
38267             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38268 $as_echo "not found" >&6; }
38269             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38270           fi
38271           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38272 $as_echo "$tool_specified" >&6; }
38273         fi
38274       fi
38275     fi
38276 
38277   fi
38278 
38279 
38280   else
38281 
38282 
38283   # Publish this variable in the help.
38284 
38285 
38286   if [ -z "${AR+x}" ]; then
38287     # The variable is not set by user, try to locate tool using the code snippet
38288     if test -n "$ac_tool_prefix"; then
38289   for ac_prog in ar
38290   do
38291     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38292 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38294 $as_echo_n "checking for $ac_word... " >&6; }
38295 if ${ac_cv_prog_AR+:} false; then :
38296   $as_echo_n "(cached) " >&6
38297 else
38298   if test -n "$AR"; then
38299   ac_cv_prog_AR="$AR" # Let the user override the test.
38300 else
38301 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38302 for as_dir in $PATH
38303 do
38304   IFS=$as_save_IFS
38305   test -z "$as_dir" && as_dir=.
38306     for ac_exec_ext in '' $ac_executable_extensions; do
38307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38308     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38310     break 2
38311   fi
38312 done
38313   done
38314 IFS=$as_save_IFS
38315 
38316 fi
38317 fi
38318 AR=$ac_cv_prog_AR
38319 if test -n "$AR"; then
38320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38321 $as_echo "$AR" >&6; }
38322 else
38323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38324 $as_echo "no" >&6; }
38325 fi
38326 
38327 
38328     test -n "$AR" && break
38329   done
38330 fi
38331 if test -z "$AR"; then
38332   ac_ct_AR=$AR
38333   for ac_prog in ar
38334 do
38335   # Extract the first word of "$ac_prog", so it can be a program name with args.
38336 set dummy $ac_prog; ac_word=$2
38337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38338 $as_echo_n "checking for $ac_word... " >&6; }
38339 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38340   $as_echo_n "(cached) " >&6
38341 else
38342   if test -n "$ac_ct_AR"; then
38343   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38344 else
38345 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38346 for as_dir in $PATH
38347 do
38348   IFS=$as_save_IFS
38349   test -z "$as_dir" && as_dir=.
38350     for ac_exec_ext in '' $ac_executable_extensions; do
38351   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38352     ac_cv_prog_ac_ct_AR="$ac_prog"
38353     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38354     break 2
38355   fi
38356 done
38357   done
38358 IFS=$as_save_IFS
38359 
38360 fi
38361 fi
38362 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38363 if test -n "$ac_ct_AR"; then
38364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38365 $as_echo "$ac_ct_AR" >&6; }
38366 else
38367   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38368 $as_echo "no" >&6; }
38369 fi
38370 
38371 
38372   test -n "$ac_ct_AR" && break
38373 done
38374 
38375   if test "x$ac_ct_AR" = x; then
38376     AR=""
38377   else
38378     case $cross_compiling:$ac_tool_warned in
38379 yes:)
38380 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38381 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38382 ac_tool_warned=yes ;;
38383 esac
38384     AR=$ac_ct_AR
38385   fi
38386 fi
38387 
38388   else
38389     # The variable is set, but is it from the command line or the environment?
38390 
38391     # Try to remove the string !AR! from our list.
38392     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38393     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38394       # If it failed, the variable was not from the command line. Ignore it,
38395       # but warn the user (except for BASH, which is always set by the calling BASH).
38396       if test "xAR" != xBASH; then
38397         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38398 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38399       fi
38400       # Try to locate tool using the code snippet
38401       if test -n "$ac_tool_prefix"; then
38402   for ac_prog in ar
38403   do
38404     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38405 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38407 $as_echo_n "checking for $ac_word... " >&6; }
38408 if ${ac_cv_prog_AR+:} false; then :
38409   $as_echo_n "(cached) " >&6
38410 else
38411   if test -n "$AR"; then
38412   ac_cv_prog_AR="$AR" # Let the user override the test.
38413 else
38414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38415 for as_dir in $PATH
38416 do
38417   IFS=$as_save_IFS
38418   test -z "$as_dir" && as_dir=.
38419     for ac_exec_ext in '' $ac_executable_extensions; do
38420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38421     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38423     break 2
38424   fi
38425 done
38426   done
38427 IFS=$as_save_IFS
38428 
38429 fi
38430 fi
38431 AR=$ac_cv_prog_AR
38432 if test -n "$AR"; then
38433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38434 $as_echo "$AR" >&6; }
38435 else
38436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38437 $as_echo "no" >&6; }
38438 fi
38439 
38440 
38441     test -n "$AR" && break
38442   done
38443 fi
38444 if test -z "$AR"; then
38445   ac_ct_AR=$AR
38446   for ac_prog in ar
38447 do
38448   # Extract the first word of "$ac_prog", so it can be a program name with args.
38449 set dummy $ac_prog; ac_word=$2
38450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38451 $as_echo_n "checking for $ac_word... " >&6; }
38452 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38453   $as_echo_n "(cached) " >&6
38454 else
38455   if test -n "$ac_ct_AR"; then
38456   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38457 else
38458 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38459 for as_dir in $PATH
38460 do
38461   IFS=$as_save_IFS
38462   test -z "$as_dir" && as_dir=.
38463     for ac_exec_ext in '' $ac_executable_extensions; do
38464   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38465     ac_cv_prog_ac_ct_AR="$ac_prog"
38466     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38467     break 2
38468   fi
38469 done
38470   done
38471 IFS=$as_save_IFS
38472 
38473 fi
38474 fi
38475 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38476 if test -n "$ac_ct_AR"; then
38477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38478 $as_echo "$ac_ct_AR" >&6; }
38479 else
38480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38481 $as_echo "no" >&6; }
38482 fi
38483 
38484 
38485   test -n "$ac_ct_AR" && break
38486 done
38487 
38488   if test "x$ac_ct_AR" = x; then
38489     AR=""
38490   else
38491     case $cross_compiling:$ac_tool_warned in
38492 yes:)
38493 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38494 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38495 ac_tool_warned=yes ;;
38496 esac
38497     AR=$ac_ct_AR
38498   fi
38499 fi
38500 
38501     else
38502       # If it succeeded, then it was overridden by the user. We will use it
38503       # for the tool.
38504 
38505       # First remove it from the list of overridden variables, so we can test
38506       # for unknown variables in the end.
38507       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38508 
38509       # Check if we try to supply an empty value
38510       if test "x$AR" = x; then
38511         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38512 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38513         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38514 $as_echo_n "checking for AR... " >&6; }
38515         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38516 $as_echo "disabled" >&6; }
38517       else
38518         # Check if the provided tool contains a complete path.
38519         tool_specified="$AR"
38520         tool_basename="${tool_specified##*/}"
38521         if test "x$tool_basename" = "x$tool_specified"; then
38522           # A command without a complete path is provided, search $PATH.
38523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38524 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38525           # Extract the first word of "$tool_basename", so it can be a program name with args.
38526 set dummy $tool_basename; ac_word=$2
38527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38528 $as_echo_n "checking for $ac_word... " >&6; }
38529 if ${ac_cv_path_AR+:} false; then :
38530   $as_echo_n "(cached) " >&6
38531 else
38532   case $AR in
38533   [\\/]* | ?:[\\/]*)
38534   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38535   ;;
38536   *)
38537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38538 for as_dir in $PATH
38539 do
38540   IFS=$as_save_IFS
38541   test -z "$as_dir" && as_dir=.
38542     for ac_exec_ext in '' $ac_executable_extensions; do
38543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38544     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38546     break 2
38547   fi
38548 done
38549   done
38550 IFS=$as_save_IFS
38551 
38552   ;;
38553 esac
38554 fi
38555 AR=$ac_cv_path_AR
38556 if test -n "$AR"; then
38557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38558 $as_echo "$AR" >&6; }
38559 else
38560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38561 $as_echo "no" >&6; }
38562 fi
38563 
38564 
38565           if test "x$AR" = x; then
38566             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38567           fi
38568         else
38569           # Otherwise we believe it is a complete path. Use it as it is.
38570           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38571 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38572           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38573 $as_echo_n "checking for AR... " >&6; }
38574           if test ! -x "$tool_specified"; then
38575             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38576 $as_echo "not found" >&6; }
38577             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38578           fi
38579           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38580 $as_echo "$tool_specified" >&6; }
38581         fi
38582       fi
38583     fi
38584 
38585   fi
38586 
38587 
38588   fi
38589 
38590   # Only process if variable expands to non-empty
38591 
38592   if test "x$AR" != x; then
38593     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38594 
38595   # First separate the path from the arguments. This will split at the first
38596   # space.
38597   complete="$AR"
38598   path="${complete%% *}"
38599   tmp="$complete EOL"
38600   arguments="${tmp#* }"
38601 
38602   # Input might be given as Windows format, start by converting to
38603   # unix format.
38604   new_path=`$CYGPATH -u "$path"`
38605 
38606   # Now try to locate executable using which
38607   new_path=`$WHICH "$new_path" 2> /dev/null`
38608   # bat and cmd files are not always considered executable in cygwin causing which
38609   # to not find them
38610   if test "x$new_path" = x \
38611       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38612       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38613     new_path=`$CYGPATH -u "$path"`
38614   fi
38615   if test "x$new_path" = x; then
38616     # Oops. Which didn't find the executable.
38617     # The splitting of arguments from the executable at a space might have been incorrect,
38618     # since paths with space are more likely in Windows. Give it another try with the whole
38619     # argument.
38620     path="$complete"
38621     arguments="EOL"
38622     new_path=`$CYGPATH -u "$path"`
38623     new_path=`$WHICH "$new_path" 2> /dev/null`
38624     # bat and cmd files are not always considered executable in cygwin causing which
38625     # to not find them
38626     if test "x$new_path" = x \
38627         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38628         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38629       new_path=`$CYGPATH -u "$path"`
38630     fi
38631     if test "x$new_path" = x; then
38632       # It's still not found. Now this is an unrecoverable error.
38633       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38634 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38635       has_space=`$ECHO "$complete" | $GREP " "`
38636       if test "x$has_space" != x; then
38637         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38638 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38639       fi
38640       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38641     fi
38642   fi
38643 
38644   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38645   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38646   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38647   # "foo.exe" is OK but "foo" is an error.
38648   #
38649   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38650   # It is also a way to make sure we got the proper file name for the real test later on.
38651   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38652   if test "x$test_shortpath" = x; then
38653     # Short path failed, file does not exist as specified.
38654     # Try adding .exe or .cmd
38655     if test -f "${new_path}.exe"; then
38656       input_to_shortpath="${new_path}.exe"
38657     elif test -f "${new_path}.cmd"; then
38658       input_to_shortpath="${new_path}.cmd"
38659     else
38660       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38661 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38662       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38663 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38664       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38665     fi
38666   else
38667     input_to_shortpath="$new_path"
38668   fi
38669 
38670   # Call helper function which possibly converts this using DOS-style short mode.
38671   # If so, the updated path is stored in $new_path.
38672   new_path="$input_to_shortpath"
38673 
38674   input_path="$input_to_shortpath"
38675   # Check if we need to convert this using DOS-style short mode. If the path
38676   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38677   # take no chances and rewrite it.
38678   # Note: m4 eats our [], so we need to use [ and ] instead.
38679   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38680   if test "x$has_forbidden_chars" != x; then
38681     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38682     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38683     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38684     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38685       # Going to short mode and back again did indeed matter. Since short mode is
38686       # case insensitive, let's make it lowercase to improve readability.
38687       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38688       # Now convert it back to Unix-style (cygpath)
38689       input_path=`$CYGPATH -u "$shortmode_path"`
38690       new_path="$input_path"
38691     fi
38692   fi
38693 
38694   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38695   if test "x$test_cygdrive_prefix" = x; then
38696     # As a simple fix, exclude /usr/bin since it's not a real path.
38697     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38698       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38699       # a path prefixed by /cygdrive for fixpath to work.
38700       new_path="$CYGWIN_ROOT_PATH$input_path"
38701     fi
38702   fi
38703 
38704   # remove trailing .exe if any
38705   new_path="${new_path/%.exe/}"
38706 
38707     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38708 
38709   # First separate the path from the arguments. This will split at the first
38710   # space.
38711   complete="$AR"
38712   path="${complete%% *}"
38713   tmp="$complete EOL"
38714   arguments="${tmp#* }"
38715 
38716   # Input might be given as Windows format, start by converting to
38717   # unix format.
38718   new_path="$path"
38719 
38720   windows_path="$new_path"
38721   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38722     unix_path=`$CYGPATH -u "$windows_path"`
38723     new_path="$unix_path"
38724   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38725     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38726     new_path="$unix_path"
38727   fi
38728 
38729 
38730   # Now try to locate executable using which
38731   new_path=`$WHICH "$new_path" 2> /dev/null`
38732 
38733   if test "x$new_path" = x; then
38734     # Oops. Which didn't find the executable.
38735     # The splitting of arguments from the executable at a space might have been incorrect,
38736     # since paths with space are more likely in Windows. Give it another try with the whole
38737     # argument.
38738     path="$complete"
38739     arguments="EOL"
38740     new_path="$path"
38741 
38742   windows_path="$new_path"
38743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38744     unix_path=`$CYGPATH -u "$windows_path"`
38745     new_path="$unix_path"
38746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38748     new_path="$unix_path"
38749   fi
38750 
38751 
38752     new_path=`$WHICH "$new_path" 2> /dev/null`
38753     # bat and cmd files are not always considered executable in MSYS causing which
38754     # to not find them
38755     if test "x$new_path" = x \
38756         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38757         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38758       new_path="$path"
38759 
38760   windows_path="$new_path"
38761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38762     unix_path=`$CYGPATH -u "$windows_path"`
38763     new_path="$unix_path"
38764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38766     new_path="$unix_path"
38767   fi
38768 
38769     fi
38770 
38771     if test "x$new_path" = x; then
38772       # It's still not found. Now this is an unrecoverable error.
38773       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38774 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38775       has_space=`$ECHO "$complete" | $GREP " "`
38776       if test "x$has_space" != x; then
38777         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38778 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38779       fi
38780       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38781     fi
38782   fi
38783 
38784   # Now new_path has a complete unix path to the binary
38785   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38786     # Keep paths in /bin as-is, but remove trailing .exe if any
38787     new_path="${new_path/%.exe/}"
38788     # Do not save /bin paths to all_fixpath_prefixes!
38789   else
38790     # Not in mixed or Windows style, start by that.
38791     new_path=`cmd //c echo $new_path`
38792 
38793   input_path="$new_path"
38794   # Check if we need to convert this using DOS-style short mode. If the path
38795   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38796   # take no chances and rewrite it.
38797   # Note: m4 eats our [], so we need to use [ and ] instead.
38798   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38799   if test "x$has_forbidden_chars" != x; then
38800     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38801     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38802   fi
38803 
38804     # Output is in $new_path
38805 
38806   windows_path="$new_path"
38807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38808     unix_path=`$CYGPATH -u "$windows_path"`
38809     new_path="$unix_path"
38810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38812     new_path="$unix_path"
38813   fi
38814 
38815     # remove trailing .exe if any
38816     new_path="${new_path/%.exe/}"
38817 
38818     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38819     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38820   fi
38821 
38822     else
38823       # We're on a unix platform. Hooray! :)
38824       # First separate the path from the arguments. This will split at the first
38825       # space.
38826       complete="$AR"
38827       path="${complete%% *}"
38828       tmp="$complete EOL"
38829       arguments="${tmp#* }"
38830 
38831       # Cannot rely on the command "which" here since it doesn't always work.
38832       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38833       if test -z "$is_absolute_path"; then
38834         # Path to executable is not absolute. Find it.
38835         IFS_save="$IFS"
38836         IFS=:
38837         for p in $PATH; do
38838           if test -f "$p/$path" && test -x "$p/$path"; then
38839             new_path="$p/$path"
38840             break
38841           fi
38842         done
38843         IFS="$IFS_save"
38844       else
38845         # This is an absolute path, we can use it without further modifications.
38846         new_path="$path"
38847       fi
38848 
38849       if test "x$new_path" = x; then
38850         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38851 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38852         has_space=`$ECHO "$complete" | $GREP " "`
38853         if test "x$has_space" != x; then
38854           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38855 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38856         fi
38857         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38858       fi
38859     fi
38860 
38861     # Now join together the path and the arguments once again
38862     if test "x$arguments" != xEOL; then
38863       new_complete="$new_path ${arguments% *}"
38864     else
38865       new_complete="$new_path"
38866     fi
38867 
38868     if test "x$complete" != "x$new_complete"; then
38869       AR="$new_complete"
38870       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38871 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38872     fi
38873   fi
38874 
38875 
38876 
38877   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38878 
38879 
38880   # Publish this variable in the help.
38881 
38882 
38883   if [ -z "${LIPO+x}" ]; then
38884     # The variable is not set by user, try to locate tool using the code snippet
38885     for ac_prog in lipo
38886 do
38887   # Extract the first word of "$ac_prog", so it can be a program name with args.
38888 set dummy $ac_prog; ac_word=$2
38889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38890 $as_echo_n "checking for $ac_word... " >&6; }
38891 if ${ac_cv_path_LIPO+:} false; then :
38892   $as_echo_n "(cached) " >&6
38893 else
38894   case $LIPO in
38895   [\\/]* | ?:[\\/]*)
38896   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38897   ;;
38898   *)
38899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38900 for as_dir in $PATH
38901 do
38902   IFS=$as_save_IFS
38903   test -z "$as_dir" && as_dir=.
38904     for ac_exec_ext in '' $ac_executable_extensions; do
38905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38906     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38908     break 2
38909   fi
38910 done
38911   done
38912 IFS=$as_save_IFS
38913 
38914   ;;
38915 esac
38916 fi
38917 LIPO=$ac_cv_path_LIPO
38918 if test -n "$LIPO"; then
38919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38920 $as_echo "$LIPO" >&6; }
38921 else
38922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38923 $as_echo "no" >&6; }
38924 fi
38925 
38926 
38927   test -n "$LIPO" && break
38928 done
38929 
38930   else
38931     # The variable is set, but is it from the command line or the environment?
38932 
38933     # Try to remove the string !LIPO! from our list.
38934     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38935     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38936       # If it failed, the variable was not from the command line. Ignore it,
38937       # but warn the user (except for BASH, which is always set by the calling BASH).
38938       if test "xLIPO" != xBASH; then
38939         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38940 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38941       fi
38942       # Try to locate tool using the code snippet
38943       for ac_prog in lipo
38944 do
38945   # Extract the first word of "$ac_prog", so it can be a program name with args.
38946 set dummy $ac_prog; ac_word=$2
38947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38948 $as_echo_n "checking for $ac_word... " >&6; }
38949 if ${ac_cv_path_LIPO+:} false; then :
38950   $as_echo_n "(cached) " >&6
38951 else
38952   case $LIPO in
38953   [\\/]* | ?:[\\/]*)
38954   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38955   ;;
38956   *)
38957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38958 for as_dir in $PATH
38959 do
38960   IFS=$as_save_IFS
38961   test -z "$as_dir" && as_dir=.
38962     for ac_exec_ext in '' $ac_executable_extensions; do
38963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38964     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38966     break 2
38967   fi
38968 done
38969   done
38970 IFS=$as_save_IFS
38971 
38972   ;;
38973 esac
38974 fi
38975 LIPO=$ac_cv_path_LIPO
38976 if test -n "$LIPO"; then
38977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38978 $as_echo "$LIPO" >&6; }
38979 else
38980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38981 $as_echo "no" >&6; }
38982 fi
38983 
38984 
38985   test -n "$LIPO" && break
38986 done
38987 
38988     else
38989       # If it succeeded, then it was overridden by the user. We will use it
38990       # for the tool.
38991 
38992       # First remove it from the list of overridden variables, so we can test
38993       # for unknown variables in the end.
38994       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38995 
38996       # Check if we try to supply an empty value
38997       if test "x$LIPO" = x; then
38998         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38999 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39001 $as_echo_n "checking for LIPO... " >&6; }
39002         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39003 $as_echo "disabled" >&6; }
39004       else
39005         # Check if the provided tool contains a complete path.
39006         tool_specified="$LIPO"
39007         tool_basename="${tool_specified##*/}"
39008         if test "x$tool_basename" = "x$tool_specified"; then
39009           # A command without a complete path is provided, search $PATH.
39010           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39011 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39012           # Extract the first word of "$tool_basename", so it can be a program name with args.
39013 set dummy $tool_basename; ac_word=$2
39014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39015 $as_echo_n "checking for $ac_word... " >&6; }
39016 if ${ac_cv_path_LIPO+:} false; then :
39017   $as_echo_n "(cached) " >&6
39018 else
39019   case $LIPO in
39020   [\\/]* | ?:[\\/]*)
39021   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39022   ;;
39023   *)
39024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39025 for as_dir in $PATH
39026 do
39027   IFS=$as_save_IFS
39028   test -z "$as_dir" && as_dir=.
39029     for ac_exec_ext in '' $ac_executable_extensions; do
39030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39031     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39033     break 2
39034   fi
39035 done
39036   done
39037 IFS=$as_save_IFS
39038 
39039   ;;
39040 esac
39041 fi
39042 LIPO=$ac_cv_path_LIPO
39043 if test -n "$LIPO"; then
39044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39045 $as_echo "$LIPO" >&6; }
39046 else
39047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39048 $as_echo "no" >&6; }
39049 fi
39050 
39051 
39052           if test "x$LIPO" = x; then
39053             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39054           fi
39055         else
39056           # Otherwise we believe it is a complete path. Use it as it is.
39057           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39058 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39059           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39060 $as_echo_n "checking for LIPO... " >&6; }
39061           if test ! -x "$tool_specified"; then
39062             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39063 $as_echo "not found" >&6; }
39064             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39065           fi
39066           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39067 $as_echo "$tool_specified" >&6; }
39068         fi
39069       fi
39070     fi
39071 
39072   fi
39073 
39074 
39075 
39076   # Only process if variable expands to non-empty
39077 
39078   if test "x$LIPO" != x; then
39079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39080 
39081   # First separate the path from the arguments. This will split at the first
39082   # space.
39083   complete="$LIPO"
39084   path="${complete%% *}"
39085   tmp="$complete EOL"
39086   arguments="${tmp#* }"
39087 
39088   # Input might be given as Windows format, start by converting to
39089   # unix format.
39090   new_path=`$CYGPATH -u "$path"`
39091 
39092   # Now try to locate executable using which
39093   new_path=`$WHICH "$new_path" 2> /dev/null`
39094   # bat and cmd files are not always considered executable in cygwin causing which
39095   # to not find them
39096   if test "x$new_path" = x \
39097       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39098       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39099     new_path=`$CYGPATH -u "$path"`
39100   fi
39101   if test "x$new_path" = x; then
39102     # Oops. Which didn't find the executable.
39103     # The splitting of arguments from the executable at a space might have been incorrect,
39104     # since paths with space are more likely in Windows. Give it another try with the whole
39105     # argument.
39106     path="$complete"
39107     arguments="EOL"
39108     new_path=`$CYGPATH -u "$path"`
39109     new_path=`$WHICH "$new_path" 2> /dev/null`
39110     # bat and cmd files are not always considered executable in cygwin causing which
39111     # to not find them
39112     if test "x$new_path" = x \
39113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39115       new_path=`$CYGPATH -u "$path"`
39116     fi
39117     if test "x$new_path" = x; then
39118       # It's still not found. Now this is an unrecoverable error.
39119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39120 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39121       has_space=`$ECHO "$complete" | $GREP " "`
39122       if test "x$has_space" != x; then
39123         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39124 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39125       fi
39126       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39127     fi
39128   fi
39129 
39130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39133   # "foo.exe" is OK but "foo" is an error.
39134   #
39135   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39136   # It is also a way to make sure we got the proper file name for the real test later on.
39137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39138   if test "x$test_shortpath" = x; then
39139     # Short path failed, file does not exist as specified.
39140     # Try adding .exe or .cmd
39141     if test -f "${new_path}.exe"; then
39142       input_to_shortpath="${new_path}.exe"
39143     elif test -f "${new_path}.cmd"; then
39144       input_to_shortpath="${new_path}.cmd"
39145     else
39146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39147 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39148       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39149 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39150       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39151     fi
39152   else
39153     input_to_shortpath="$new_path"
39154   fi
39155 
39156   # Call helper function which possibly converts this using DOS-style short mode.
39157   # If so, the updated path is stored in $new_path.
39158   new_path="$input_to_shortpath"
39159 
39160   input_path="$input_to_shortpath"
39161   # Check if we need to convert this using DOS-style short mode. If the path
39162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39163   # take no chances and rewrite it.
39164   # Note: m4 eats our [], so we need to use [ and ] instead.
39165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39166   if test "x$has_forbidden_chars" != x; then
39167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39171       # Going to short mode and back again did indeed matter. Since short mode is
39172       # case insensitive, let's make it lowercase to improve readability.
39173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39174       # Now convert it back to Unix-style (cygpath)
39175       input_path=`$CYGPATH -u "$shortmode_path"`
39176       new_path="$input_path"
39177     fi
39178   fi
39179 
39180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39181   if test "x$test_cygdrive_prefix" = x; then
39182     # As a simple fix, exclude /usr/bin since it's not a real path.
39183     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39185       # a path prefixed by /cygdrive for fixpath to work.
39186       new_path="$CYGWIN_ROOT_PATH$input_path"
39187     fi
39188   fi
39189 
39190   # remove trailing .exe if any
39191   new_path="${new_path/%.exe/}"
39192 
39193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39194 
39195   # First separate the path from the arguments. This will split at the first
39196   # space.
39197   complete="$LIPO"
39198   path="${complete%% *}"
39199   tmp="$complete EOL"
39200   arguments="${tmp#* }"
39201 
39202   # Input might be given as Windows format, start by converting to
39203   # unix format.
39204   new_path="$path"
39205 
39206   windows_path="$new_path"
39207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39208     unix_path=`$CYGPATH -u "$windows_path"`
39209     new_path="$unix_path"
39210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39212     new_path="$unix_path"
39213   fi
39214 
39215 
39216   # Now try to locate executable using which
39217   new_path=`$WHICH "$new_path" 2> /dev/null`
39218 
39219   if test "x$new_path" = x; then
39220     # Oops. Which didn't find the executable.
39221     # The splitting of arguments from the executable at a space might have been incorrect,
39222     # since paths with space are more likely in Windows. Give it another try with the whole
39223     # argument.
39224     path="$complete"
39225     arguments="EOL"
39226     new_path="$path"
39227 
39228   windows_path="$new_path"
39229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39230     unix_path=`$CYGPATH -u "$windows_path"`
39231     new_path="$unix_path"
39232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39234     new_path="$unix_path"
39235   fi
39236 
39237 
39238     new_path=`$WHICH "$new_path" 2> /dev/null`
39239     # bat and cmd files are not always considered executable in MSYS causing which
39240     # to not find them
39241     if test "x$new_path" = x \
39242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39244       new_path="$path"
39245 
39246   windows_path="$new_path"
39247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39248     unix_path=`$CYGPATH -u "$windows_path"`
39249     new_path="$unix_path"
39250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39252     new_path="$unix_path"
39253   fi
39254 
39255     fi
39256 
39257     if test "x$new_path" = x; then
39258       # It's still not found. Now this is an unrecoverable error.
39259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39260 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39261       has_space=`$ECHO "$complete" | $GREP " "`
39262       if test "x$has_space" != x; then
39263         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39264 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39265       fi
39266       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39267     fi
39268   fi
39269 
39270   # Now new_path has a complete unix path to the binary
39271   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39272     # Keep paths in /bin as-is, but remove trailing .exe if any
39273     new_path="${new_path/%.exe/}"
39274     # Do not save /bin paths to all_fixpath_prefixes!
39275   else
39276     # Not in mixed or Windows style, start by that.
39277     new_path=`cmd //c echo $new_path`
39278 
39279   input_path="$new_path"
39280   # Check if we need to convert this using DOS-style short mode. If the path
39281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39282   # take no chances and rewrite it.
39283   # Note: m4 eats our [], so we need to use [ and ] instead.
39284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39285   if test "x$has_forbidden_chars" != x; then
39286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39287     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39288   fi
39289 
39290     # Output is in $new_path
39291 
39292   windows_path="$new_path"
39293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39294     unix_path=`$CYGPATH -u "$windows_path"`
39295     new_path="$unix_path"
39296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39298     new_path="$unix_path"
39299   fi
39300 
39301     # remove trailing .exe if any
39302     new_path="${new_path/%.exe/}"
39303 
39304     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39305     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39306   fi
39307 
39308     else
39309       # We're on a unix platform. Hooray! :)
39310       # First separate the path from the arguments. This will split at the first
39311       # space.
39312       complete="$LIPO"
39313       path="${complete%% *}"
39314       tmp="$complete EOL"
39315       arguments="${tmp#* }"
39316 
39317       # Cannot rely on the command "which" here since it doesn't always work.
39318       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39319       if test -z "$is_absolute_path"; then
39320         # Path to executable is not absolute. Find it.
39321         IFS_save="$IFS"
39322         IFS=:
39323         for p in $PATH; do
39324           if test -f "$p/$path" && test -x "$p/$path"; then
39325             new_path="$p/$path"
39326             break
39327           fi
39328         done
39329         IFS="$IFS_save"
39330       else
39331         # This is an absolute path, we can use it without further modifications.
39332         new_path="$path"
39333       fi
39334 
39335       if test "x$new_path" = x; then
39336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39337 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39338         has_space=`$ECHO "$complete" | $GREP " "`
39339         if test "x$has_space" != x; then
39340           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39341 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39342         fi
39343         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39344       fi
39345     fi
39346 
39347     # Now join together the path and the arguments once again
39348     if test "x$arguments" != xEOL; then
39349       new_complete="$new_path ${arguments% *}"
39350     else
39351       new_complete="$new_path"
39352     fi
39353 
39354     if test "x$complete" != "x$new_complete"; then
39355       LIPO="$new_complete"
39356       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39357 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39358     fi
39359   fi
39360 
39361 
39362 
39363 
39364   # Publish this variable in the help.
39365 
39366 
39367   if [ -z "${OTOOL+x}" ]; then
39368     # The variable is not set by user, try to locate tool using the code snippet
39369     for ac_prog in otool
39370 do
39371   # Extract the first word of "$ac_prog", so it can be a program name with args.
39372 set dummy $ac_prog; ac_word=$2
39373 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39374 $as_echo_n "checking for $ac_word... " >&6; }
39375 if ${ac_cv_path_OTOOL+:} false; then :
39376   $as_echo_n "(cached) " >&6
39377 else
39378   case $OTOOL in
39379   [\\/]* | ?:[\\/]*)
39380   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
39381   ;;
39382   *)
39383   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39384 for as_dir in $PATH
39385 do
39386   IFS=$as_save_IFS
39387   test -z "$as_dir" && as_dir=.
39388     for ac_exec_ext in '' $ac_executable_extensions; do
39389   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39390     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
39391     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39392     break 2
39393   fi
39394 done
39395   done
39396 IFS=$as_save_IFS
39397 
39398   ;;
39399 esac
39400 fi
39401 OTOOL=$ac_cv_path_OTOOL
39402 if test -n "$OTOOL"; then
39403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
39404 $as_echo "$OTOOL" >&6; }
39405 else
39406   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39407 $as_echo "no" >&6; }
39408 fi
39409 
39410 
39411   test -n "$OTOOL" && break
39412 done
39413 
39414   else
39415     # The variable is set, but is it from the command line or the environment?
39416 
39417     # Try to remove the string !OTOOL! from our list.
39418     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
39419     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39420       # If it failed, the variable was not from the command line. Ignore it,
39421       # but warn the user (except for BASH, which is always set by the calling BASH).
39422       if test "xOTOOL" != xBASH; then
39423         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
39424 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
39425       fi
39426       # Try to locate tool using the code snippet
39427       for ac_prog in otool
39428 do
39429   # Extract the first word of "$ac_prog", so it can be a program name with args.
39430 set dummy $ac_prog; ac_word=$2
39431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39432 $as_echo_n "checking for $ac_word... " >&6; }
39433 if ${ac_cv_path_OTOOL+:} false; then :
39434   $as_echo_n "(cached) " >&6
39435 else
39436   case $OTOOL in
39437   [\\/]* | ?:[\\/]*)
39438   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
39439   ;;
39440   *)
39441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39442 for as_dir in $PATH
39443 do
39444   IFS=$as_save_IFS
39445   test -z "$as_dir" && as_dir=.
39446     for ac_exec_ext in '' $ac_executable_extensions; do
39447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39448     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
39449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39450     break 2
39451   fi
39452 done
39453   done
39454 IFS=$as_save_IFS
39455 
39456   ;;
39457 esac
39458 fi
39459 OTOOL=$ac_cv_path_OTOOL
39460 if test -n "$OTOOL"; then
39461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
39462 $as_echo "$OTOOL" >&6; }
39463 else
39464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39465 $as_echo "no" >&6; }
39466 fi
39467 
39468 
39469   test -n "$OTOOL" && break
39470 done
39471 
39472     else
39473       # If it succeeded, then it was overridden by the user. We will use it
39474       # for the tool.
39475 
39476       # First remove it from the list of overridden variables, so we can test
39477       # for unknown variables in the end.
39478       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39479 
39480       # Check if we try to supply an empty value
39481       if test "x$OTOOL" = x; then
39482         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
39483 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
39484         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
39485 $as_echo_n "checking for OTOOL... " >&6; }
39486         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39487 $as_echo "disabled" >&6; }
39488       else
39489         # Check if the provided tool contains a complete path.
39490         tool_specified="$OTOOL"
39491         tool_basename="${tool_specified##*/}"
39492         if test "x$tool_basename" = "x$tool_specified"; then
39493           # A command without a complete path is provided, search $PATH.
39494           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
39495 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
39496           # Extract the first word of "$tool_basename", so it can be a program name with args.
39497 set dummy $tool_basename; ac_word=$2
39498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39499 $as_echo_n "checking for $ac_word... " >&6; }
39500 if ${ac_cv_path_OTOOL+:} false; then :
39501   $as_echo_n "(cached) " >&6
39502 else
39503   case $OTOOL in
39504   [\\/]* | ?:[\\/]*)
39505   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
39506   ;;
39507   *)
39508   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39509 for as_dir in $PATH
39510 do
39511   IFS=$as_save_IFS
39512   test -z "$as_dir" && as_dir=.
39513     for ac_exec_ext in '' $ac_executable_extensions; do
39514   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39515     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
39516     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39517     break 2
39518   fi
39519 done
39520   done
39521 IFS=$as_save_IFS
39522 
39523   ;;
39524 esac
39525 fi
39526 OTOOL=$ac_cv_path_OTOOL
39527 if test -n "$OTOOL"; then
39528   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
39529 $as_echo "$OTOOL" >&6; }
39530 else
39531   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39532 $as_echo "no" >&6; }
39533 fi
39534 
39535 
39536           if test "x$OTOOL" = x; then
39537             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39538           fi
39539         else
39540           # Otherwise we believe it is a complete path. Use it as it is.
39541           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
39542 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
39543           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
39544 $as_echo_n "checking for OTOOL... " >&6; }
39545           if test ! -x "$tool_specified"; then
39546             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39547 $as_echo "not found" >&6; }
39548             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
39549           fi
39550           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39551 $as_echo "$tool_specified" >&6; }
39552         fi
39553       fi
39554     fi
39555 
39556   fi
39557 
39558 
39559 
39560   if test "x$OTOOL" = x; then
39561     as_fn_error $? "Could not find required tool for OTOOL" "$LINENO" 5
39562   fi
39563 
39564 
39565 
39566   # Only process if variable expands to non-empty
39567 
39568   if test "x$OTOOL" != x; then
39569     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39570 
39571   # First separate the path from the arguments. This will split at the first
39572   # space.
39573   complete="$OTOOL"
39574   path="${complete%% *}"
39575   tmp="$complete EOL"
39576   arguments="${tmp#* }"
39577 
39578   # Input might be given as Windows format, start by converting to
39579   # unix format.
39580   new_path=`$CYGPATH -u "$path"`
39581 
39582   # Now try to locate executable using which
39583   new_path=`$WHICH "$new_path" 2> /dev/null`
39584   # bat and cmd files are not always considered executable in cygwin causing which
39585   # to not find them
39586   if test "x$new_path" = x \
39587       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39588       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39589     new_path=`$CYGPATH -u "$path"`
39590   fi
39591   if test "x$new_path" = x; then
39592     # Oops. Which didn't find the executable.
39593     # The splitting of arguments from the executable at a space might have been incorrect,
39594     # since paths with space are more likely in Windows. Give it another try with the whole
39595     # argument.
39596     path="$complete"
39597     arguments="EOL"
39598     new_path=`$CYGPATH -u "$path"`
39599     new_path=`$WHICH "$new_path" 2> /dev/null`
39600     # bat and cmd files are not always considered executable in cygwin causing which
39601     # to not find them
39602     if test "x$new_path" = x \
39603         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39604         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39605       new_path=`$CYGPATH -u "$path"`
39606     fi
39607     if test "x$new_path" = x; then
39608       # It's still not found. Now this is an unrecoverable error.
39609       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$complete\", is not found." >&5
39610 $as_echo "$as_me: The path of OTOOL, which resolves as \"$complete\", is not found." >&6;}
39611       has_space=`$ECHO "$complete" | $GREP " "`
39612       if test "x$has_space" != x; then
39613         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39614 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39615       fi
39616       as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39617     fi
39618   fi
39619 
39620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39623   # "foo.exe" is OK but "foo" is an error.
39624   #
39625   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39626   # It is also a way to make sure we got the proper file name for the real test later on.
39627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39628   if test "x$test_shortpath" = x; then
39629     # Short path failed, file does not exist as specified.
39630     # Try adding .exe or .cmd
39631     if test -f "${new_path}.exe"; then
39632       input_to_shortpath="${new_path}.exe"
39633     elif test -f "${new_path}.cmd"; then
39634       input_to_shortpath="${new_path}.cmd"
39635     else
39636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$new_path\", is invalid." >&5
39637 $as_echo "$as_me: The path of OTOOL, which resolves as \"$new_path\", is invalid." >&6;}
39638       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39639 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39640       as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39641     fi
39642   else
39643     input_to_shortpath="$new_path"
39644   fi
39645 
39646   # Call helper function which possibly converts this using DOS-style short mode.
39647   # If so, the updated path is stored in $new_path.
39648   new_path="$input_to_shortpath"
39649 
39650   input_path="$input_to_shortpath"
39651   # Check if we need to convert this using DOS-style short mode. If the path
39652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39653   # take no chances and rewrite it.
39654   # Note: m4 eats our [], so we need to use [ and ] instead.
39655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39656   if test "x$has_forbidden_chars" != x; then
39657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39658     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39659     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39660     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39661       # Going to short mode and back again did indeed matter. Since short mode is
39662       # case insensitive, let's make it lowercase to improve readability.
39663       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39664       # Now convert it back to Unix-style (cygpath)
39665       input_path=`$CYGPATH -u "$shortmode_path"`
39666       new_path="$input_path"
39667     fi
39668   fi
39669 
39670   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39671   if test "x$test_cygdrive_prefix" = x; then
39672     # As a simple fix, exclude /usr/bin since it's not a real path.
39673     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39674       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39675       # a path prefixed by /cygdrive for fixpath to work.
39676       new_path="$CYGWIN_ROOT_PATH$input_path"
39677     fi
39678   fi
39679 
39680   # remove trailing .exe if any
39681   new_path="${new_path/%.exe/}"
39682 
39683     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39684 
39685   # First separate the path from the arguments. This will split at the first
39686   # space.
39687   complete="$OTOOL"
39688   path="${complete%% *}"
39689   tmp="$complete EOL"
39690   arguments="${tmp#* }"
39691 
39692   # Input might be given as Windows format, start by converting to
39693   # unix format.
39694   new_path="$path"
39695 
39696   windows_path="$new_path"
39697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39698     unix_path=`$CYGPATH -u "$windows_path"`
39699     new_path="$unix_path"
39700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39701     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39702     new_path="$unix_path"
39703   fi
39704 
39705 
39706   # Now try to locate executable using which
39707   new_path=`$WHICH "$new_path" 2> /dev/null`
39708 
39709   if test "x$new_path" = x; then
39710     # Oops. Which didn't find the executable.
39711     # The splitting of arguments from the executable at a space might have been incorrect,
39712     # since paths with space are more likely in Windows. Give it another try with the whole
39713     # argument.
39714     path="$complete"
39715     arguments="EOL"
39716     new_path="$path"
39717 
39718   windows_path="$new_path"
39719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39720     unix_path=`$CYGPATH -u "$windows_path"`
39721     new_path="$unix_path"
39722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39724     new_path="$unix_path"
39725   fi
39726 
39727 
39728     new_path=`$WHICH "$new_path" 2> /dev/null`
39729     # bat and cmd files are not always considered executable in MSYS causing which
39730     # to not find them
39731     if test "x$new_path" = x \
39732         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39733         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39734       new_path="$path"
39735 
39736   windows_path="$new_path"
39737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39738     unix_path=`$CYGPATH -u "$windows_path"`
39739     new_path="$unix_path"
39740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39741     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39742     new_path="$unix_path"
39743   fi
39744 
39745     fi
39746 
39747     if test "x$new_path" = x; then
39748       # It's still not found. Now this is an unrecoverable error.
39749       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$complete\", is not found." >&5
39750 $as_echo "$as_me: The path of OTOOL, which resolves as \"$complete\", is not found." >&6;}
39751       has_space=`$ECHO "$complete" | $GREP " "`
39752       if test "x$has_space" != x; then
39753         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39754 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39755       fi
39756       as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39757     fi
39758   fi
39759 
39760   # Now new_path has a complete unix path to the binary
39761   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39762     # Keep paths in /bin as-is, but remove trailing .exe if any
39763     new_path="${new_path/%.exe/}"
39764     # Do not save /bin paths to all_fixpath_prefixes!
39765   else
39766     # Not in mixed or Windows style, start by that.
39767     new_path=`cmd //c echo $new_path`
39768 
39769   input_path="$new_path"
39770   # Check if we need to convert this using DOS-style short mode. If the path
39771   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39772   # take no chances and rewrite it.
39773   # Note: m4 eats our [], so we need to use [ and ] instead.
39774   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39775   if test "x$has_forbidden_chars" != x; then
39776     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39777     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39778   fi
39779 
39780     # Output is in $new_path
39781 
39782   windows_path="$new_path"
39783   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39784     unix_path=`$CYGPATH -u "$windows_path"`
39785     new_path="$unix_path"
39786   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39787     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39788     new_path="$unix_path"
39789   fi
39790 
39791     # remove trailing .exe if any
39792     new_path="${new_path/%.exe/}"
39793 
39794     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39795     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39796   fi
39797 
39798     else
39799       # We're on a unix platform. Hooray! :)
39800       # First separate the path from the arguments. This will split at the first
39801       # space.
39802       complete="$OTOOL"
39803       path="${complete%% *}"
39804       tmp="$complete EOL"
39805       arguments="${tmp#* }"
39806 
39807       # Cannot rely on the command "which" here since it doesn't always work.
39808       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39809       if test -z "$is_absolute_path"; then
39810         # Path to executable is not absolute. Find it.
39811         IFS_save="$IFS"
39812         IFS=:
39813         for p in $PATH; do
39814           if test -f "$p/$path" && test -x "$p/$path"; then
39815             new_path="$p/$path"
39816             break
39817           fi
39818         done
39819         IFS="$IFS_save"
39820       else
39821         # This is an absolute path, we can use it without further modifications.
39822         new_path="$path"
39823       fi
39824 
39825       if test "x$new_path" = x; then
39826         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$complete\", is not found." >&5
39827 $as_echo "$as_me: The path of OTOOL, which resolves as \"$complete\", is not found." >&6;}
39828         has_space=`$ECHO "$complete" | $GREP " "`
39829         if test "x$has_space" != x; then
39830           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39831 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39832         fi
39833         as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39834       fi
39835     fi
39836 
39837     # Now join together the path and the arguments once again
39838     if test "x$arguments" != xEOL; then
39839       new_complete="$new_path ${arguments% *}"
39840     else
39841       new_complete="$new_path"
39842     fi
39843 
39844     if test "x$complete" != "x$new_complete"; then
39845       OTOOL="$new_complete"
39846       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OTOOL to \"$new_complete\"" >&5
39847 $as_echo "$as_me: Rewriting OTOOL to \"$new_complete\"" >&6;}
39848     fi
39849   fi
39850 
39851 
39852 
39853 
39854   # Publish this variable in the help.
39855 
39856 
39857   if [ -z "${INSTALL_NAME_TOOL+x}" ]; then
39858     # The variable is not set by user, try to locate tool using the code snippet
39859     for ac_prog in install_name_tool
39860 do
39861   # Extract the first word of "$ac_prog", so it can be a program name with args.
39862 set dummy $ac_prog; ac_word=$2
39863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39864 $as_echo_n "checking for $ac_word... " >&6; }
39865 if ${ac_cv_path_INSTALL_NAME_TOOL+:} false; then :
39866   $as_echo_n "(cached) " >&6
39867 else
39868   case $INSTALL_NAME_TOOL in
39869   [\\/]* | ?:[\\/]*)
39870   ac_cv_path_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test with a path.
39871   ;;
39872   *)
39873   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39874 for as_dir in $PATH
39875 do
39876   IFS=$as_save_IFS
39877   test -z "$as_dir" && as_dir=.
39878     for ac_exec_ext in '' $ac_executable_extensions; do
39879   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39880     ac_cv_path_INSTALL_NAME_TOOL="$as_dir/$ac_word$ac_exec_ext"
39881     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39882     break 2
39883   fi
39884 done
39885   done
39886 IFS=$as_save_IFS
39887 
39888   ;;
39889 esac
39890 fi
39891 INSTALL_NAME_TOOL=$ac_cv_path_INSTALL_NAME_TOOL
39892 if test -n "$INSTALL_NAME_TOOL"; then
39893   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_NAME_TOOL" >&5
39894 $as_echo "$INSTALL_NAME_TOOL" >&6; }
39895 else
39896   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39897 $as_echo "no" >&6; }
39898 fi
39899 
39900 
39901   test -n "$INSTALL_NAME_TOOL" && break
39902 done
39903 
39904   else
39905     # The variable is set, but is it from the command line or the environment?
39906 
39907     # Try to remove the string !INSTALL_NAME_TOOL! from our list.
39908     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!INSTALL_NAME_TOOL!/}
39909     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39910       # If it failed, the variable was not from the command line. Ignore it,
39911       # but warn the user (except for BASH, which is always set by the calling BASH).
39912       if test "xINSTALL_NAME_TOOL" != xBASH; then
39913         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of INSTALL_NAME_TOOL from the environment. Use command line variables instead." >&5
39914 $as_echo "$as_me: WARNING: Ignoring value of INSTALL_NAME_TOOL from the environment. Use command line variables instead." >&2;}
39915       fi
39916       # Try to locate tool using the code snippet
39917       for ac_prog in install_name_tool
39918 do
39919   # Extract the first word of "$ac_prog", so it can be a program name with args.
39920 set dummy $ac_prog; ac_word=$2
39921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39922 $as_echo_n "checking for $ac_word... " >&6; }
39923 if ${ac_cv_path_INSTALL_NAME_TOOL+:} false; then :
39924   $as_echo_n "(cached) " >&6
39925 else
39926   case $INSTALL_NAME_TOOL in
39927   [\\/]* | ?:[\\/]*)
39928   ac_cv_path_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test with a path.
39929   ;;
39930   *)
39931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39932 for as_dir in $PATH
39933 do
39934   IFS=$as_save_IFS
39935   test -z "$as_dir" && as_dir=.
39936     for ac_exec_ext in '' $ac_executable_extensions; do
39937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39938     ac_cv_path_INSTALL_NAME_TOOL="$as_dir/$ac_word$ac_exec_ext"
39939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39940     break 2
39941   fi
39942 done
39943   done
39944 IFS=$as_save_IFS
39945 
39946   ;;
39947 esac
39948 fi
39949 INSTALL_NAME_TOOL=$ac_cv_path_INSTALL_NAME_TOOL
39950 if test -n "$INSTALL_NAME_TOOL"; then
39951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_NAME_TOOL" >&5
39952 $as_echo "$INSTALL_NAME_TOOL" >&6; }
39953 else
39954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39955 $as_echo "no" >&6; }
39956 fi
39957 
39958 
39959   test -n "$INSTALL_NAME_TOOL" && break
39960 done
39961 
39962     else
39963       # If it succeeded, then it was overridden by the user. We will use it
39964       # for the tool.
39965 
39966       # First remove it from the list of overridden variables, so we can test
39967       # for unknown variables in the end.
39968       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39969 
39970       # Check if we try to supply an empty value
39971       if test "x$INSTALL_NAME_TOOL" = x; then
39972         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool INSTALL_NAME_TOOL= (no value)" >&5
39973 $as_echo "$as_me: Setting user supplied tool INSTALL_NAME_TOOL= (no value)" >&6;}
39974         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INSTALL_NAME_TOOL" >&5
39975 $as_echo_n "checking for INSTALL_NAME_TOOL... " >&6; }
39976         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39977 $as_echo "disabled" >&6; }
39978       else
39979         # Check if the provided tool contains a complete path.
39980         tool_specified="$INSTALL_NAME_TOOL"
39981         tool_basename="${tool_specified##*/}"
39982         if test "x$tool_basename" = "x$tool_specified"; then
39983           # A command without a complete path is provided, search $PATH.
39984           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool INSTALL_NAME_TOOL=$tool_basename" >&5
39985 $as_echo "$as_me: Will search for user supplied tool INSTALL_NAME_TOOL=$tool_basename" >&6;}
39986           # Extract the first word of "$tool_basename", so it can be a program name with args.
39987 set dummy $tool_basename; ac_word=$2
39988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39989 $as_echo_n "checking for $ac_word... " >&6; }
39990 if ${ac_cv_path_INSTALL_NAME_TOOL+:} false; then :
39991   $as_echo_n "(cached) " >&6
39992 else
39993   case $INSTALL_NAME_TOOL in
39994   [\\/]* | ?:[\\/]*)
39995   ac_cv_path_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test with a path.
39996   ;;
39997   *)
39998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39999 for as_dir in $PATH
40000 do
40001   IFS=$as_save_IFS
40002   test -z "$as_dir" && as_dir=.
40003     for ac_exec_ext in '' $ac_executable_extensions; do
40004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40005     ac_cv_path_INSTALL_NAME_TOOL="$as_dir/$ac_word$ac_exec_ext"
40006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40007     break 2
40008   fi
40009 done
40010   done
40011 IFS=$as_save_IFS
40012 
40013   ;;
40014 esac
40015 fi
40016 INSTALL_NAME_TOOL=$ac_cv_path_INSTALL_NAME_TOOL
40017 if test -n "$INSTALL_NAME_TOOL"; then
40018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_NAME_TOOL" >&5
40019 $as_echo "$INSTALL_NAME_TOOL" >&6; }
40020 else
40021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40022 $as_echo "no" >&6; }
40023 fi
40024 
40025 
40026           if test "x$INSTALL_NAME_TOOL" = x; then
40027             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40028           fi
40029         else
40030           # Otherwise we believe it is a complete path. Use it as it is.
40031           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool INSTALL_NAME_TOOL=$tool_specified" >&5
40032 $as_echo "$as_me: Will use user supplied tool INSTALL_NAME_TOOL=$tool_specified" >&6;}
40033           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INSTALL_NAME_TOOL" >&5
40034 $as_echo_n "checking for INSTALL_NAME_TOOL... " >&6; }
40035           if test ! -x "$tool_specified"; then
40036             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40037 $as_echo "not found" >&6; }
40038             as_fn_error $? "User supplied tool INSTALL_NAME_TOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
40039           fi
40040           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40041 $as_echo "$tool_specified" >&6; }
40042         fi
40043       fi
40044     fi
40045 
40046   fi
40047 
40048 
40049 
40050   if test "x$INSTALL_NAME_TOOL" = x; then
40051     as_fn_error $? "Could not find required tool for INSTALL_NAME_TOOL" "$LINENO" 5
40052   fi
40053 
40054 
40055 
40056   # Only process if variable expands to non-empty
40057 
40058   if test "x$INSTALL_NAME_TOOL" != x; then
40059     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40060 
40061   # First separate the path from the arguments. This will split at the first
40062   # space.
40063   complete="$INSTALL_NAME_TOOL"
40064   path="${complete%% *}"
40065   tmp="$complete EOL"
40066   arguments="${tmp#* }"
40067 
40068   # Input might be given as Windows format, start by converting to
40069   # unix format.
40070   new_path=`$CYGPATH -u "$path"`
40071 
40072   # Now try to locate executable using which
40073   new_path=`$WHICH "$new_path" 2> /dev/null`
40074   # bat and cmd files are not always considered executable in cygwin causing which
40075   # to not find them
40076   if test "x$new_path" = x \
40077       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40078       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40079     new_path=`$CYGPATH -u "$path"`
40080   fi
40081   if test "x$new_path" = x; then
40082     # Oops. Which didn't find the executable.
40083     # The splitting of arguments from the executable at a space might have been incorrect,
40084     # since paths with space are more likely in Windows. Give it another try with the whole
40085     # argument.
40086     path="$complete"
40087     arguments="EOL"
40088     new_path=`$CYGPATH -u "$path"`
40089     new_path=`$WHICH "$new_path" 2> /dev/null`
40090     # bat and cmd files are not always considered executable in cygwin causing which
40091     # to not find them
40092     if test "x$new_path" = x \
40093         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40094         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40095       new_path=`$CYGPATH -u "$path"`
40096     fi
40097     if test "x$new_path" = x; then
40098       # It's still not found. Now this is an unrecoverable error.
40099       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&5
40100 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&6;}
40101       has_space=`$ECHO "$complete" | $GREP " "`
40102       if test "x$has_space" != x; then
40103         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40104 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40105       fi
40106       as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40107     fi
40108   fi
40109 
40110   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40111   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40112   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40113   # "foo.exe" is OK but "foo" is an error.
40114   #
40115   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40116   # It is also a way to make sure we got the proper file name for the real test later on.
40117   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40118   if test "x$test_shortpath" = x; then
40119     # Short path failed, file does not exist as specified.
40120     # Try adding .exe or .cmd
40121     if test -f "${new_path}.exe"; then
40122       input_to_shortpath="${new_path}.exe"
40123     elif test -f "${new_path}.cmd"; then
40124       input_to_shortpath="${new_path}.cmd"
40125     else
40126       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$new_path\", is invalid." >&5
40127 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$new_path\", is invalid." >&6;}
40128       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40129 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40130       as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40131     fi
40132   else
40133     input_to_shortpath="$new_path"
40134   fi
40135 
40136   # Call helper function which possibly converts this using DOS-style short mode.
40137   # If so, the updated path is stored in $new_path.
40138   new_path="$input_to_shortpath"
40139 
40140   input_path="$input_to_shortpath"
40141   # Check if we need to convert this using DOS-style short mode. If the path
40142   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40143   # take no chances and rewrite it.
40144   # Note: m4 eats our [], so we need to use [ and ] instead.
40145   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40146   if test "x$has_forbidden_chars" != x; then
40147     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40148     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40149     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40150     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40151       # Going to short mode and back again did indeed matter. Since short mode is
40152       # case insensitive, let's make it lowercase to improve readability.
40153       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40154       # Now convert it back to Unix-style (cygpath)
40155       input_path=`$CYGPATH -u "$shortmode_path"`
40156       new_path="$input_path"
40157     fi
40158   fi
40159 
40160   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40161   if test "x$test_cygdrive_prefix" = x; then
40162     # As a simple fix, exclude /usr/bin since it's not a real path.
40163     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40164       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40165       # a path prefixed by /cygdrive for fixpath to work.
40166       new_path="$CYGWIN_ROOT_PATH$input_path"
40167     fi
40168   fi
40169 
40170   # remove trailing .exe if any
40171   new_path="${new_path/%.exe/}"
40172 
40173     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40174 
40175   # First separate the path from the arguments. This will split at the first
40176   # space.
40177   complete="$INSTALL_NAME_TOOL"
40178   path="${complete%% *}"
40179   tmp="$complete EOL"
40180   arguments="${tmp#* }"
40181 
40182   # Input might be given as Windows format, start by converting to
40183   # unix format.
40184   new_path="$path"
40185 
40186   windows_path="$new_path"
40187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40188     unix_path=`$CYGPATH -u "$windows_path"`
40189     new_path="$unix_path"
40190   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40191     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40192     new_path="$unix_path"
40193   fi
40194 
40195 
40196   # Now try to locate executable using which
40197   new_path=`$WHICH "$new_path" 2> /dev/null`
40198 
40199   if test "x$new_path" = x; then
40200     # Oops. Which didn't find the executable.
40201     # The splitting of arguments from the executable at a space might have been incorrect,
40202     # since paths with space are more likely in Windows. Give it another try with the whole
40203     # argument.
40204     path="$complete"
40205     arguments="EOL"
40206     new_path="$path"
40207 
40208   windows_path="$new_path"
40209   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40210     unix_path=`$CYGPATH -u "$windows_path"`
40211     new_path="$unix_path"
40212   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40213     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40214     new_path="$unix_path"
40215   fi
40216 
40217 
40218     new_path=`$WHICH "$new_path" 2> /dev/null`
40219     # bat and cmd files are not always considered executable in MSYS causing which
40220     # to not find them
40221     if test "x$new_path" = x \
40222         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40223         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40224       new_path="$path"
40225 
40226   windows_path="$new_path"
40227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40228     unix_path=`$CYGPATH -u "$windows_path"`
40229     new_path="$unix_path"
40230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40232     new_path="$unix_path"
40233   fi
40234 
40235     fi
40236 
40237     if test "x$new_path" = x; then
40238       # It's still not found. Now this is an unrecoverable error.
40239       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&5
40240 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&6;}
40241       has_space=`$ECHO "$complete" | $GREP " "`
40242       if test "x$has_space" != x; then
40243         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40244 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40245       fi
40246       as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40247     fi
40248   fi
40249 
40250   # Now new_path has a complete unix path to the binary
40251   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40252     # Keep paths in /bin as-is, but remove trailing .exe if any
40253     new_path="${new_path/%.exe/}"
40254     # Do not save /bin paths to all_fixpath_prefixes!
40255   else
40256     # Not in mixed or Windows style, start by that.
40257     new_path=`cmd //c echo $new_path`
40258 
40259   input_path="$new_path"
40260   # Check if we need to convert this using DOS-style short mode. If the path
40261   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40262   # take no chances and rewrite it.
40263   # Note: m4 eats our [], so we need to use [ and ] instead.
40264   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40265   if test "x$has_forbidden_chars" != x; then
40266     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40267     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40268   fi
40269 
40270     # Output is in $new_path
40271 
40272   windows_path="$new_path"
40273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40274     unix_path=`$CYGPATH -u "$windows_path"`
40275     new_path="$unix_path"
40276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40277     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40278     new_path="$unix_path"
40279   fi
40280 
40281     # remove trailing .exe if any
40282     new_path="${new_path/%.exe/}"
40283 
40284     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40285     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40286   fi
40287 
40288     else
40289       # We're on a unix platform. Hooray! :)
40290       # First separate the path from the arguments. This will split at the first
40291       # space.
40292       complete="$INSTALL_NAME_TOOL"
40293       path="${complete%% *}"
40294       tmp="$complete EOL"
40295       arguments="${tmp#* }"
40296 
40297       # Cannot rely on the command "which" here since it doesn't always work.
40298       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40299       if test -z "$is_absolute_path"; then
40300         # Path to executable is not absolute. Find it.
40301         IFS_save="$IFS"
40302         IFS=:
40303         for p in $PATH; do
40304           if test -f "$p/$path" && test -x "$p/$path"; then
40305             new_path="$p/$path"
40306             break
40307           fi
40308         done
40309         IFS="$IFS_save"
40310       else
40311         # This is an absolute path, we can use it without further modifications.
40312         new_path="$path"
40313       fi
40314 
40315       if test "x$new_path" = x; then
40316         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&5
40317 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&6;}
40318         has_space=`$ECHO "$complete" | $GREP " "`
40319         if test "x$has_space" != x; then
40320           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40321 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40322         fi
40323         as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40324       fi
40325     fi
40326 
40327     # Now join together the path and the arguments once again
40328     if test "x$arguments" != xEOL; then
40329       new_complete="$new_path ${arguments% *}"
40330     else
40331       new_complete="$new_path"
40332     fi
40333 
40334     if test "x$complete" != "x$new_complete"; then
40335       INSTALL_NAME_TOOL="$new_complete"
40336       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting INSTALL_NAME_TOOL to \"$new_complete\"" >&5
40337 $as_echo "$as_me: Rewriting INSTALL_NAME_TOOL to \"$new_complete\"" >&6;}
40338     fi
40339   fi
40340 
40341   fi
40342 
40343   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40344     # Extract the first word of "mt", so it can be a program name with args.
40345 set dummy mt; ac_word=$2
40346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40347 $as_echo_n "checking for $ac_word... " >&6; }
40348 if ${ac_cv_prog_MT+:} false; then :
40349   $as_echo_n "(cached) " >&6
40350 else
40351   if test -n "$MT"; then
40352   ac_cv_prog_MT="$MT" # Let the user override the test.
40353 else
40354   ac_prog_rejected=no
40355 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40356 for as_dir in $PATH
40357 do
40358   IFS=$as_save_IFS
40359   test -z "$as_dir" && as_dir=.
40360     for ac_exec_ext in '' $ac_executable_extensions; do
40361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40362     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
40363        ac_prog_rejected=yes
40364        continue
40365      fi
40366     ac_cv_prog_MT="mt"
40367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40368     break 2
40369   fi
40370 done
40371   done
40372 IFS=$as_save_IFS
40373 
40374 if test $ac_prog_rejected = yes; then
40375   # We found a bogon in the path, so make sure we never use it.
40376   set dummy $ac_cv_prog_MT
40377   shift
40378   if test $# != 0; then
40379     # We chose a different compiler from the bogus one.
40380     # However, it has the same basename, so the bogon will be chosen
40381     # first if we set MT to just the basename; use the full file name.
40382     shift
40383     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
40384   fi
40385 fi
40386 fi
40387 fi
40388 MT=$ac_cv_prog_MT
40389 if test -n "$MT"; then
40390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
40391 $as_echo "$MT" >&6; }
40392 else
40393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40394 $as_echo "no" >&6; }
40395 fi
40396 
40397 
40398 
40399   # Only process if variable expands to non-empty
40400 
40401   if test "x$MT" != x; then
40402     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40403 
40404   # First separate the path from the arguments. This will split at the first
40405   # space.
40406   complete="$MT"
40407   path="${complete%% *}"
40408   tmp="$complete EOL"
40409   arguments="${tmp#* }"
40410 
40411   # Input might be given as Windows format, start by converting to
40412   # unix format.
40413   new_path=`$CYGPATH -u "$path"`
40414 
40415   # Now try to locate executable using which
40416   new_path=`$WHICH "$new_path" 2> /dev/null`
40417   # bat and cmd files are not always considered executable in cygwin causing which
40418   # to not find them
40419   if test "x$new_path" = x \
40420       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40421       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40422     new_path=`$CYGPATH -u "$path"`
40423   fi
40424   if test "x$new_path" = x; then
40425     # Oops. Which didn't find the executable.
40426     # The splitting of arguments from the executable at a space might have been incorrect,
40427     # since paths with space are more likely in Windows. Give it another try with the whole
40428     # argument.
40429     path="$complete"
40430     arguments="EOL"
40431     new_path=`$CYGPATH -u "$path"`
40432     new_path=`$WHICH "$new_path" 2> /dev/null`
40433     # bat and cmd files are not always considered executable in cygwin causing which
40434     # to not find them
40435     if test "x$new_path" = x \
40436         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40437         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40438       new_path=`$CYGPATH -u "$path"`
40439     fi
40440     if test "x$new_path" = x; then
40441       # It's still not found. Now this is an unrecoverable error.
40442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
40443 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
40444       has_space=`$ECHO "$complete" | $GREP " "`
40445       if test "x$has_space" != x; then
40446         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40447 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40448       fi
40449       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40450     fi
40451   fi
40452 
40453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40456   # "foo.exe" is OK but "foo" is an error.
40457   #
40458   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40459   # It is also a way to make sure we got the proper file name for the real test later on.
40460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40461   if test "x$test_shortpath" = x; then
40462     # Short path failed, file does not exist as specified.
40463     # Try adding .exe or .cmd
40464     if test -f "${new_path}.exe"; then
40465       input_to_shortpath="${new_path}.exe"
40466     elif test -f "${new_path}.cmd"; then
40467       input_to_shortpath="${new_path}.cmd"
40468     else
40469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
40470 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
40471       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40472 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40473       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40474     fi
40475   else
40476     input_to_shortpath="$new_path"
40477   fi
40478 
40479   # Call helper function which possibly converts this using DOS-style short mode.
40480   # If so, the updated path is stored in $new_path.
40481   new_path="$input_to_shortpath"
40482 
40483   input_path="$input_to_shortpath"
40484   # Check if we need to convert this using DOS-style short mode. If the path
40485   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40486   # take no chances and rewrite it.
40487   # Note: m4 eats our [], so we need to use [ and ] instead.
40488   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40489   if test "x$has_forbidden_chars" != x; then
40490     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40491     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40492     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40493     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40494       # Going to short mode and back again did indeed matter. Since short mode is
40495       # case insensitive, let's make it lowercase to improve readability.
40496       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40497       # Now convert it back to Unix-style (cygpath)
40498       input_path=`$CYGPATH -u "$shortmode_path"`
40499       new_path="$input_path"
40500     fi
40501   fi
40502 
40503   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40504   if test "x$test_cygdrive_prefix" = x; then
40505     # As a simple fix, exclude /usr/bin since it's not a real path.
40506     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40507       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40508       # a path prefixed by /cygdrive for fixpath to work.
40509       new_path="$CYGWIN_ROOT_PATH$input_path"
40510     fi
40511   fi
40512 
40513   # remove trailing .exe if any
40514   new_path="${new_path/%.exe/}"
40515 
40516     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40517 
40518   # First separate the path from the arguments. This will split at the first
40519   # space.
40520   complete="$MT"
40521   path="${complete%% *}"
40522   tmp="$complete EOL"
40523   arguments="${tmp#* }"
40524 
40525   # Input might be given as Windows format, start by converting to
40526   # unix format.
40527   new_path="$path"
40528 
40529   windows_path="$new_path"
40530   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40531     unix_path=`$CYGPATH -u "$windows_path"`
40532     new_path="$unix_path"
40533   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40534     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40535     new_path="$unix_path"
40536   fi
40537 
40538 
40539   # Now try to locate executable using which
40540   new_path=`$WHICH "$new_path" 2> /dev/null`
40541 
40542   if test "x$new_path" = x; then
40543     # Oops. Which didn't find the executable.
40544     # The splitting of arguments from the executable at a space might have been incorrect,
40545     # since paths with space are more likely in Windows. Give it another try with the whole
40546     # argument.
40547     path="$complete"
40548     arguments="EOL"
40549     new_path="$path"
40550 
40551   windows_path="$new_path"
40552   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40553     unix_path=`$CYGPATH -u "$windows_path"`
40554     new_path="$unix_path"
40555   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40556     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40557     new_path="$unix_path"
40558   fi
40559 
40560 
40561     new_path=`$WHICH "$new_path" 2> /dev/null`
40562     # bat and cmd files are not always considered executable in MSYS causing which
40563     # to not find them
40564     if test "x$new_path" = x \
40565         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40566         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40567       new_path="$path"
40568 
40569   windows_path="$new_path"
40570   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40571     unix_path=`$CYGPATH -u "$windows_path"`
40572     new_path="$unix_path"
40573   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40574     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40575     new_path="$unix_path"
40576   fi
40577 
40578     fi
40579 
40580     if test "x$new_path" = x; then
40581       # It's still not found. Now this is an unrecoverable error.
40582       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
40583 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
40584       has_space=`$ECHO "$complete" | $GREP " "`
40585       if test "x$has_space" != x; then
40586         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40587 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40588       fi
40589       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40590     fi
40591   fi
40592 
40593   # Now new_path has a complete unix path to the binary
40594   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40595     # Keep paths in /bin as-is, but remove trailing .exe if any
40596     new_path="${new_path/%.exe/}"
40597     # Do not save /bin paths to all_fixpath_prefixes!
40598   else
40599     # Not in mixed or Windows style, start by that.
40600     new_path=`cmd //c echo $new_path`
40601 
40602   input_path="$new_path"
40603   # Check if we need to convert this using DOS-style short mode. If the path
40604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40605   # take no chances and rewrite it.
40606   # Note: m4 eats our [], so we need to use [ and ] instead.
40607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40608   if test "x$has_forbidden_chars" != x; then
40609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40610     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40611   fi
40612 
40613     # Output is in $new_path
40614 
40615   windows_path="$new_path"
40616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40617     unix_path=`$CYGPATH -u "$windows_path"`
40618     new_path="$unix_path"
40619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40621     new_path="$unix_path"
40622   fi
40623 
40624     # remove trailing .exe if any
40625     new_path="${new_path/%.exe/}"
40626 
40627     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40628     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40629   fi
40630 
40631     else
40632       # We're on a unix platform. Hooray! :)
40633       # First separate the path from the arguments. This will split at the first
40634       # space.
40635       complete="$MT"
40636       path="${complete%% *}"
40637       tmp="$complete EOL"
40638       arguments="${tmp#* }"
40639 
40640       # Cannot rely on the command "which" here since it doesn't always work.
40641       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40642       if test -z "$is_absolute_path"; then
40643         # Path to executable is not absolute. Find it.
40644         IFS_save="$IFS"
40645         IFS=:
40646         for p in $PATH; do
40647           if test -f "$p/$path" && test -x "$p/$path"; then
40648             new_path="$p/$path"
40649             break
40650           fi
40651         done
40652         IFS="$IFS_save"
40653       else
40654         # This is an absolute path, we can use it without further modifications.
40655         new_path="$path"
40656       fi
40657 
40658       if test "x$new_path" = x; then
40659         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
40660 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
40661         has_space=`$ECHO "$complete" | $GREP " "`
40662         if test "x$has_space" != x; then
40663           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40664 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40665         fi
40666         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40667       fi
40668     fi
40669 
40670     # Now join together the path and the arguments once again
40671     if test "x$arguments" != xEOL; then
40672       new_complete="$new_path ${arguments% *}"
40673     else
40674       new_complete="$new_path"
40675     fi
40676 
40677     if test "x$complete" != "x$new_complete"; then
40678       MT="$new_complete"
40679       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
40680 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
40681     fi
40682   fi
40683 
40684     # Setup the resource compiler (RC)
40685     # Extract the first word of "rc", so it can be a program name with args.
40686 set dummy rc; ac_word=$2
40687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40688 $as_echo_n "checking for $ac_word... " >&6; }
40689 if ${ac_cv_prog_RC+:} false; then :
40690   $as_echo_n "(cached) " >&6
40691 else
40692   if test -n "$RC"; then
40693   ac_cv_prog_RC="$RC" # Let the user override the test.
40694 else
40695   ac_prog_rejected=no
40696 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40697 for as_dir in $PATH
40698 do
40699   IFS=$as_save_IFS
40700   test -z "$as_dir" && as_dir=.
40701     for ac_exec_ext in '' $ac_executable_extensions; do
40702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40703     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
40704        ac_prog_rejected=yes
40705        continue
40706      fi
40707     ac_cv_prog_RC="rc"
40708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40709     break 2
40710   fi
40711 done
40712   done
40713 IFS=$as_save_IFS
40714 
40715 if test $ac_prog_rejected = yes; then
40716   # We found a bogon in the path, so make sure we never use it.
40717   set dummy $ac_cv_prog_RC
40718   shift
40719   if test $# != 0; then
40720     # We chose a different compiler from the bogus one.
40721     # However, it has the same basename, so the bogon will be chosen
40722     # first if we set RC to just the basename; use the full file name.
40723     shift
40724     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
40725   fi
40726 fi
40727 fi
40728 fi
40729 RC=$ac_cv_prog_RC
40730 if test -n "$RC"; then
40731   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
40732 $as_echo "$RC" >&6; }
40733 else
40734   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40735 $as_echo "no" >&6; }
40736 fi
40737 
40738 
40739 
40740   # Only process if variable expands to non-empty
40741 
40742   if test "x$RC" != x; then
40743     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40744 
40745   # First separate the path from the arguments. This will split at the first
40746   # space.
40747   complete="$RC"
40748   path="${complete%% *}"
40749   tmp="$complete EOL"
40750   arguments="${tmp#* }"
40751 
40752   # Input might be given as Windows format, start by converting to
40753   # unix format.
40754   new_path=`$CYGPATH -u "$path"`
40755 
40756   # Now try to locate executable using which
40757   new_path=`$WHICH "$new_path" 2> /dev/null`
40758   # bat and cmd files are not always considered executable in cygwin causing which
40759   # to not find them
40760   if test "x$new_path" = x \
40761       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40762       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40763     new_path=`$CYGPATH -u "$path"`
40764   fi
40765   if test "x$new_path" = x; then
40766     # Oops. Which didn't find the executable.
40767     # The splitting of arguments from the executable at a space might have been incorrect,
40768     # since paths with space are more likely in Windows. Give it another try with the whole
40769     # argument.
40770     path="$complete"
40771     arguments="EOL"
40772     new_path=`$CYGPATH -u "$path"`
40773     new_path=`$WHICH "$new_path" 2> /dev/null`
40774     # bat and cmd files are not always considered executable in cygwin causing which
40775     # to not find them
40776     if test "x$new_path" = x \
40777         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40778         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40779       new_path=`$CYGPATH -u "$path"`
40780     fi
40781     if test "x$new_path" = x; then
40782       # It's still not found. Now this is an unrecoverable error.
40783       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40784 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40785       has_space=`$ECHO "$complete" | $GREP " "`
40786       if test "x$has_space" != x; then
40787         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40788 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40789       fi
40790       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40791     fi
40792   fi
40793 
40794   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40795   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40796   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40797   # "foo.exe" is OK but "foo" is an error.
40798   #
40799   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40800   # It is also a way to make sure we got the proper file name for the real test later on.
40801   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40802   if test "x$test_shortpath" = x; then
40803     # Short path failed, file does not exist as specified.
40804     # Try adding .exe or .cmd
40805     if test -f "${new_path}.exe"; then
40806       input_to_shortpath="${new_path}.exe"
40807     elif test -f "${new_path}.cmd"; then
40808       input_to_shortpath="${new_path}.cmd"
40809     else
40810       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
40811 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
40812       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40813 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40814       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40815     fi
40816   else
40817     input_to_shortpath="$new_path"
40818   fi
40819 
40820   # Call helper function which possibly converts this using DOS-style short mode.
40821   # If so, the updated path is stored in $new_path.
40822   new_path="$input_to_shortpath"
40823 
40824   input_path="$input_to_shortpath"
40825   # Check if we need to convert this using DOS-style short mode. If the path
40826   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40827   # take no chances and rewrite it.
40828   # Note: m4 eats our [], so we need to use [ and ] instead.
40829   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40830   if test "x$has_forbidden_chars" != x; then
40831     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40832     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40833     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40834     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40835       # Going to short mode and back again did indeed matter. Since short mode is
40836       # case insensitive, let's make it lowercase to improve readability.
40837       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40838       # Now convert it back to Unix-style (cygpath)
40839       input_path=`$CYGPATH -u "$shortmode_path"`
40840       new_path="$input_path"
40841     fi
40842   fi
40843 
40844   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40845   if test "x$test_cygdrive_prefix" = x; then
40846     # As a simple fix, exclude /usr/bin since it's not a real path.
40847     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40848       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40849       # a path prefixed by /cygdrive for fixpath to work.
40850       new_path="$CYGWIN_ROOT_PATH$input_path"
40851     fi
40852   fi
40853 
40854   # remove trailing .exe if any
40855   new_path="${new_path/%.exe/}"
40856 
40857     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40858 
40859   # First separate the path from the arguments. This will split at the first
40860   # space.
40861   complete="$RC"
40862   path="${complete%% *}"
40863   tmp="$complete EOL"
40864   arguments="${tmp#* }"
40865 
40866   # Input might be given as Windows format, start by converting to
40867   # unix format.
40868   new_path="$path"
40869 
40870   windows_path="$new_path"
40871   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40872     unix_path=`$CYGPATH -u "$windows_path"`
40873     new_path="$unix_path"
40874   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40875     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40876     new_path="$unix_path"
40877   fi
40878 
40879 
40880   # Now try to locate executable using which
40881   new_path=`$WHICH "$new_path" 2> /dev/null`
40882 
40883   if test "x$new_path" = x; then
40884     # Oops. Which didn't find the executable.
40885     # The splitting of arguments from the executable at a space might have been incorrect,
40886     # since paths with space are more likely in Windows. Give it another try with the whole
40887     # argument.
40888     path="$complete"
40889     arguments="EOL"
40890     new_path="$path"
40891 
40892   windows_path="$new_path"
40893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40894     unix_path=`$CYGPATH -u "$windows_path"`
40895     new_path="$unix_path"
40896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40898     new_path="$unix_path"
40899   fi
40900 
40901 
40902     new_path=`$WHICH "$new_path" 2> /dev/null`
40903     # bat and cmd files are not always considered executable in MSYS causing which
40904     # to not find them
40905     if test "x$new_path" = x \
40906         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40907         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40908       new_path="$path"
40909 
40910   windows_path="$new_path"
40911   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40912     unix_path=`$CYGPATH -u "$windows_path"`
40913     new_path="$unix_path"
40914   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40915     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40916     new_path="$unix_path"
40917   fi
40918 
40919     fi
40920 
40921     if test "x$new_path" = x; then
40922       # It's still not found. Now this is an unrecoverable error.
40923       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40924 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40925       has_space=`$ECHO "$complete" | $GREP " "`
40926       if test "x$has_space" != x; then
40927         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40928 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40929       fi
40930       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40931     fi
40932   fi
40933 
40934   # Now new_path has a complete unix path to the binary
40935   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40936     # Keep paths in /bin as-is, but remove trailing .exe if any
40937     new_path="${new_path/%.exe/}"
40938     # Do not save /bin paths to all_fixpath_prefixes!
40939   else
40940     # Not in mixed or Windows style, start by that.
40941     new_path=`cmd //c echo $new_path`
40942 
40943   input_path="$new_path"
40944   # Check if we need to convert this using DOS-style short mode. If the path
40945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40946   # take no chances and rewrite it.
40947   # Note: m4 eats our [], so we need to use [ and ] instead.
40948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40949   if test "x$has_forbidden_chars" != x; then
40950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40952   fi
40953 
40954     # Output is in $new_path
40955 
40956   windows_path="$new_path"
40957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40958     unix_path=`$CYGPATH -u "$windows_path"`
40959     new_path="$unix_path"
40960   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40961     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40962     new_path="$unix_path"
40963   fi
40964 
40965     # remove trailing .exe if any
40966     new_path="${new_path/%.exe/}"
40967 
40968     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40969     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40970   fi
40971 
40972     else
40973       # We're on a unix platform. Hooray! :)
40974       # First separate the path from the arguments. This will split at the first
40975       # space.
40976       complete="$RC"
40977       path="${complete%% *}"
40978       tmp="$complete EOL"
40979       arguments="${tmp#* }"
40980 
40981       # Cannot rely on the command "which" here since it doesn't always work.
40982       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40983       if test -z "$is_absolute_path"; then
40984         # Path to executable is not absolute. Find it.
40985         IFS_save="$IFS"
40986         IFS=:
40987         for p in $PATH; do
40988           if test -f "$p/$path" && test -x "$p/$path"; then
40989             new_path="$p/$path"
40990             break
40991           fi
40992         done
40993         IFS="$IFS_save"
40994       else
40995         # This is an absolute path, we can use it without further modifications.
40996         new_path="$path"
40997       fi
40998 
40999       if test "x$new_path" = x; then
41000         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
41001 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
41002         has_space=`$ECHO "$complete" | $GREP " "`
41003         if test "x$has_space" != x; then
41004           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41005 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41006         fi
41007         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
41008       fi
41009     fi
41010 
41011     # Now join together the path and the arguments once again
41012     if test "x$arguments" != xEOL; then
41013       new_complete="$new_path ${arguments% *}"
41014     else
41015       new_complete="$new_path"
41016     fi
41017 
41018     if test "x$complete" != "x$new_complete"; then
41019       RC="$new_complete"
41020       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
41021 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
41022     fi
41023   fi
41024 
41025     # Extract the first word of "dumpbin", so it can be a program name with args.
41026 set dummy dumpbin; ac_word=$2
41027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41028 $as_echo_n "checking for $ac_word... " >&6; }
41029 if ${ac_cv_prog_DUMPBIN+:} false; then :
41030   $as_echo_n "(cached) " >&6
41031 else
41032   if test -n "$DUMPBIN"; then
41033   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
41034 else
41035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036 for as_dir in $PATH
41037 do
41038   IFS=$as_save_IFS
41039   test -z "$as_dir" && as_dir=.
41040     for ac_exec_ext in '' $ac_executable_extensions; do
41041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042     ac_cv_prog_DUMPBIN="dumpbin"
41043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044     break 2
41045   fi
41046 done
41047   done
41048 IFS=$as_save_IFS
41049 
41050 fi
41051 fi
41052 DUMPBIN=$ac_cv_prog_DUMPBIN
41053 if test -n "$DUMPBIN"; then
41054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
41055 $as_echo "$DUMPBIN" >&6; }
41056 else
41057   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41058 $as_echo "no" >&6; }
41059 fi
41060 
41061 
41062 
41063   # Only process if variable expands to non-empty
41064 
41065   if test "x$DUMPBIN" != x; then
41066     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41067 
41068   # First separate the path from the arguments. This will split at the first
41069   # space.
41070   complete="$DUMPBIN"
41071   path="${complete%% *}"
41072   tmp="$complete EOL"
41073   arguments="${tmp#* }"
41074 
41075   # Input might be given as Windows format, start by converting to
41076   # unix format.
41077   new_path=`$CYGPATH -u "$path"`
41078 
41079   # Now try to locate executable using which
41080   new_path=`$WHICH "$new_path" 2> /dev/null`
41081   # bat and cmd files are not always considered executable in cygwin causing which
41082   # to not find them
41083   if test "x$new_path" = x \
41084       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41085       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41086     new_path=`$CYGPATH -u "$path"`
41087   fi
41088   if test "x$new_path" = x; then
41089     # Oops. Which didn't find the executable.
41090     # The splitting of arguments from the executable at a space might have been incorrect,
41091     # since paths with space are more likely in Windows. Give it another try with the whole
41092     # argument.
41093     path="$complete"
41094     arguments="EOL"
41095     new_path=`$CYGPATH -u "$path"`
41096     new_path=`$WHICH "$new_path" 2> /dev/null`
41097     # bat and cmd files are not always considered executable in cygwin causing which
41098     # to not find them
41099     if test "x$new_path" = x \
41100         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41101         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41102       new_path=`$CYGPATH -u "$path"`
41103     fi
41104     if test "x$new_path" = x; then
41105       # It's still not found. Now this is an unrecoverable error.
41106       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
41107 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
41108       has_space=`$ECHO "$complete" | $GREP " "`
41109       if test "x$has_space" != x; then
41110         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41111 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41112       fi
41113       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41114     fi
41115   fi
41116 
41117   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41118   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41119   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41120   # "foo.exe" is OK but "foo" is an error.
41121   #
41122   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41123   # It is also a way to make sure we got the proper file name for the real test later on.
41124   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41125   if test "x$test_shortpath" = x; then
41126     # Short path failed, file does not exist as specified.
41127     # Try adding .exe or .cmd
41128     if test -f "${new_path}.exe"; then
41129       input_to_shortpath="${new_path}.exe"
41130     elif test -f "${new_path}.cmd"; then
41131       input_to_shortpath="${new_path}.cmd"
41132     else
41133       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
41134 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
41135       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41136 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41137       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41138     fi
41139   else
41140     input_to_shortpath="$new_path"
41141   fi
41142 
41143   # Call helper function which possibly converts this using DOS-style short mode.
41144   # If so, the updated path is stored in $new_path.
41145   new_path="$input_to_shortpath"
41146 
41147   input_path="$input_to_shortpath"
41148   # Check if we need to convert this using DOS-style short mode. If the path
41149   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41150   # take no chances and rewrite it.
41151   # Note: m4 eats our [], so we need to use [ and ] instead.
41152   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41153   if test "x$has_forbidden_chars" != x; then
41154     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41155     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41156     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41157     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41158       # Going to short mode and back again did indeed matter. Since short mode is
41159       # case insensitive, let's make it lowercase to improve readability.
41160       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41161       # Now convert it back to Unix-style (cygpath)
41162       input_path=`$CYGPATH -u "$shortmode_path"`
41163       new_path="$input_path"
41164     fi
41165   fi
41166 
41167   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41168   if test "x$test_cygdrive_prefix" = x; then
41169     # As a simple fix, exclude /usr/bin since it's not a real path.
41170     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41171       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41172       # a path prefixed by /cygdrive for fixpath to work.
41173       new_path="$CYGWIN_ROOT_PATH$input_path"
41174     fi
41175   fi
41176 
41177   # remove trailing .exe if any
41178   new_path="${new_path/%.exe/}"
41179 
41180     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41181 
41182   # First separate the path from the arguments. This will split at the first
41183   # space.
41184   complete="$DUMPBIN"
41185   path="${complete%% *}"
41186   tmp="$complete EOL"
41187   arguments="${tmp#* }"
41188 
41189   # Input might be given as Windows format, start by converting to
41190   # unix format.
41191   new_path="$path"
41192 
41193   windows_path="$new_path"
41194   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41195     unix_path=`$CYGPATH -u "$windows_path"`
41196     new_path="$unix_path"
41197   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41198     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41199     new_path="$unix_path"
41200   fi
41201 
41202 
41203   # Now try to locate executable using which
41204   new_path=`$WHICH "$new_path" 2> /dev/null`
41205 
41206   if test "x$new_path" = x; then
41207     # Oops. Which didn't find the executable.
41208     # The splitting of arguments from the executable at a space might have been incorrect,
41209     # since paths with space are more likely in Windows. Give it another try with the whole
41210     # argument.
41211     path="$complete"
41212     arguments="EOL"
41213     new_path="$path"
41214 
41215   windows_path="$new_path"
41216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41217     unix_path=`$CYGPATH -u "$windows_path"`
41218     new_path="$unix_path"
41219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41221     new_path="$unix_path"
41222   fi
41223 
41224 
41225     new_path=`$WHICH "$new_path" 2> /dev/null`
41226     # bat and cmd files are not always considered executable in MSYS causing which
41227     # to not find them
41228     if test "x$new_path" = x \
41229         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41230         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41231       new_path="$path"
41232 
41233   windows_path="$new_path"
41234   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41235     unix_path=`$CYGPATH -u "$windows_path"`
41236     new_path="$unix_path"
41237   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41238     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41239     new_path="$unix_path"
41240   fi
41241 
41242     fi
41243 
41244     if test "x$new_path" = x; then
41245       # It's still not found. Now this is an unrecoverable error.
41246       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
41247 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
41248       has_space=`$ECHO "$complete" | $GREP " "`
41249       if test "x$has_space" != x; then
41250         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41251 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41252       fi
41253       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41254     fi
41255   fi
41256 
41257   # Now new_path has a complete unix path to the binary
41258   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41259     # Keep paths in /bin as-is, but remove trailing .exe if any
41260     new_path="${new_path/%.exe/}"
41261     # Do not save /bin paths to all_fixpath_prefixes!
41262   else
41263     # Not in mixed or Windows style, start by that.
41264     new_path=`cmd //c echo $new_path`
41265 
41266   input_path="$new_path"
41267   # Check if we need to convert this using DOS-style short mode. If the path
41268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41269   # take no chances and rewrite it.
41270   # Note: m4 eats our [], so we need to use [ and ] instead.
41271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41272   if test "x$has_forbidden_chars" != x; then
41273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41274     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41275   fi
41276 
41277     # Output is in $new_path
41278 
41279   windows_path="$new_path"
41280   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41281     unix_path=`$CYGPATH -u "$windows_path"`
41282     new_path="$unix_path"
41283   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41284     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41285     new_path="$unix_path"
41286   fi
41287 
41288     # remove trailing .exe if any
41289     new_path="${new_path/%.exe/}"
41290 
41291     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41292     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41293   fi
41294 
41295     else
41296       # We're on a unix platform. Hooray! :)
41297       # First separate the path from the arguments. This will split at the first
41298       # space.
41299       complete="$DUMPBIN"
41300       path="${complete%% *}"
41301       tmp="$complete EOL"
41302       arguments="${tmp#* }"
41303 
41304       # Cannot rely on the command "which" here since it doesn't always work.
41305       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41306       if test -z "$is_absolute_path"; then
41307         # Path to executable is not absolute. Find it.
41308         IFS_save="$IFS"
41309         IFS=:
41310         for p in $PATH; do
41311           if test -f "$p/$path" && test -x "$p/$path"; then
41312             new_path="$p/$path"
41313             break
41314           fi
41315         done
41316         IFS="$IFS_save"
41317       else
41318         # This is an absolute path, we can use it without further modifications.
41319         new_path="$path"
41320       fi
41321 
41322       if test "x$new_path" = x; then
41323         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
41324 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
41325         has_space=`$ECHO "$complete" | $GREP " "`
41326         if test "x$has_space" != x; then
41327           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41328 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41329         fi
41330         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41331       fi
41332     fi
41333 
41334     # Now join together the path and the arguments once again
41335     if test "x$arguments" != xEOL; then
41336       new_complete="$new_path ${arguments% *}"
41337     else
41338       new_complete="$new_path"
41339     fi
41340 
41341     if test "x$complete" != "x$new_complete"; then
41342       DUMPBIN="$new_complete"
41343       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
41344 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
41345     fi
41346   fi
41347 
41348     # We need to check for 'msbuild.exe' because at the place where we expect to
41349     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
41350     # won't find the 'msbuild.exe' executable in that case (and the
41351     # 'ac_executable_extensions' is unusable due to performance reasons).
41352     # Notice that we intentionally don't fix up the path to MSBUILD because we
41353     # will call it in a DOS shell during freetype detection on Windows (see
41354     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
41355     # Extract the first word of "msbuild.exe", so it can be a program name with args.
41356 set dummy msbuild.exe; ac_word=$2
41357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41358 $as_echo_n "checking for $ac_word... " >&6; }
41359 if ${ac_cv_prog_MSBUILD+:} false; then :
41360   $as_echo_n "(cached) " >&6
41361 else
41362   if test -n "$MSBUILD"; then
41363   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
41364 else
41365 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41366 for as_dir in $PATH
41367 do
41368   IFS=$as_save_IFS
41369   test -z "$as_dir" && as_dir=.
41370     for ac_exec_ext in '' $ac_executable_extensions; do
41371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41372     ac_cv_prog_MSBUILD="msbuild.exe"
41373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41374     break 2
41375   fi
41376 done
41377   done
41378 IFS=$as_save_IFS
41379 
41380 fi
41381 fi
41382 MSBUILD=$ac_cv_prog_MSBUILD
41383 if test -n "$MSBUILD"; then
41384   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
41385 $as_echo "$MSBUILD" >&6; }
41386 else
41387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41388 $as_echo "no" >&6; }
41389 fi
41390 
41391 
41392   fi
41393 
41394   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41395 
41396 
41397   # Publish this variable in the help.
41398 
41399 
41400   if [ -z "${STRIP+x}" ]; then
41401     # The variable is not set by user, try to locate tool using the code snippet
41402     for ac_prog in strip
41403 do
41404   # Extract the first word of "$ac_prog", so it can be a program name with args.
41405 set dummy $ac_prog; ac_word=$2
41406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41407 $as_echo_n "checking for $ac_word... " >&6; }
41408 if ${ac_cv_path_STRIP+:} false; then :
41409   $as_echo_n "(cached) " >&6
41410 else
41411   case $STRIP in
41412   [\\/]* | ?:[\\/]*)
41413   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41414   ;;
41415   *)
41416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41417 for as_dir in $PATH
41418 do
41419   IFS=$as_save_IFS
41420   test -z "$as_dir" && as_dir=.
41421     for ac_exec_ext in '' $ac_executable_extensions; do
41422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41423     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41425     break 2
41426   fi
41427 done
41428   done
41429 IFS=$as_save_IFS
41430 
41431   ;;
41432 esac
41433 fi
41434 STRIP=$ac_cv_path_STRIP
41435 if test -n "$STRIP"; then
41436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41437 $as_echo "$STRIP" >&6; }
41438 else
41439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41440 $as_echo "no" >&6; }
41441 fi
41442 
41443 
41444   test -n "$STRIP" && break
41445 done
41446 
41447   else
41448     # The variable is set, but is it from the command line or the environment?
41449 
41450     # Try to remove the string !STRIP! from our list.
41451     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41452     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41453       # If it failed, the variable was not from the command line. Ignore it,
41454       # but warn the user (except for BASH, which is always set by the calling BASH).
41455       if test "xSTRIP" != xBASH; then
41456         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41457 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41458       fi
41459       # Try to locate tool using the code snippet
41460       for ac_prog in strip
41461 do
41462   # Extract the first word of "$ac_prog", so it can be a program name with args.
41463 set dummy $ac_prog; ac_word=$2
41464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41465 $as_echo_n "checking for $ac_word... " >&6; }
41466 if ${ac_cv_path_STRIP+:} false; then :
41467   $as_echo_n "(cached) " >&6
41468 else
41469   case $STRIP in
41470   [\\/]* | ?:[\\/]*)
41471   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41472   ;;
41473   *)
41474   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41475 for as_dir in $PATH
41476 do
41477   IFS=$as_save_IFS
41478   test -z "$as_dir" && as_dir=.
41479     for ac_exec_ext in '' $ac_executable_extensions; do
41480   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41481     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41482     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41483     break 2
41484   fi
41485 done
41486   done
41487 IFS=$as_save_IFS
41488 
41489   ;;
41490 esac
41491 fi
41492 STRIP=$ac_cv_path_STRIP
41493 if test -n "$STRIP"; then
41494   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41495 $as_echo "$STRIP" >&6; }
41496 else
41497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41498 $as_echo "no" >&6; }
41499 fi
41500 
41501 
41502   test -n "$STRIP" && break
41503 done
41504 
41505     else
41506       # If it succeeded, then it was overridden by the user. We will use it
41507       # for the tool.
41508 
41509       # First remove it from the list of overridden variables, so we can test
41510       # for unknown variables in the end.
41511       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41512 
41513       # Check if we try to supply an empty value
41514       if test "x$STRIP" = x; then
41515         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41516 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41517         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41518 $as_echo_n "checking for STRIP... " >&6; }
41519         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41520 $as_echo "disabled" >&6; }
41521       else
41522         # Check if the provided tool contains a complete path.
41523         tool_specified="$STRIP"
41524         tool_basename="${tool_specified##*/}"
41525         if test "x$tool_basename" = "x$tool_specified"; then
41526           # A command without a complete path is provided, search $PATH.
41527           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41528 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41529           # Extract the first word of "$tool_basename", so it can be a program name with args.
41530 set dummy $tool_basename; ac_word=$2
41531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41532 $as_echo_n "checking for $ac_word... " >&6; }
41533 if ${ac_cv_path_STRIP+:} false; then :
41534   $as_echo_n "(cached) " >&6
41535 else
41536   case $STRIP in
41537   [\\/]* | ?:[\\/]*)
41538   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41539   ;;
41540   *)
41541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41542 for as_dir in $PATH
41543 do
41544   IFS=$as_save_IFS
41545   test -z "$as_dir" && as_dir=.
41546     for ac_exec_ext in '' $ac_executable_extensions; do
41547   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41548     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41550     break 2
41551   fi
41552 done
41553   done
41554 IFS=$as_save_IFS
41555 
41556   ;;
41557 esac
41558 fi
41559 STRIP=$ac_cv_path_STRIP
41560 if test -n "$STRIP"; then
41561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41562 $as_echo "$STRIP" >&6; }
41563 else
41564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41565 $as_echo "no" >&6; }
41566 fi
41567 
41568 
41569           if test "x$STRIP" = x; then
41570             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41571           fi
41572         else
41573           # Otherwise we believe it is a complete path. Use it as it is.
41574           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41575 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41576           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41577 $as_echo_n "checking for STRIP... " >&6; }
41578           if test ! -x "$tool_specified"; then
41579             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41580 $as_echo "not found" >&6; }
41581             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41582           fi
41583           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41584 $as_echo "$tool_specified" >&6; }
41585         fi
41586       fi
41587     fi
41588 
41589   fi
41590 
41591 
41592 
41593   # Only process if variable expands to non-empty
41594 
41595   if test "x$STRIP" != x; then
41596     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41597 
41598   # First separate the path from the arguments. This will split at the first
41599   # space.
41600   complete="$STRIP"
41601   path="${complete%% *}"
41602   tmp="$complete EOL"
41603   arguments="${tmp#* }"
41604 
41605   # Input might be given as Windows format, start by converting to
41606   # unix format.
41607   new_path=`$CYGPATH -u "$path"`
41608 
41609   # Now try to locate executable using which
41610   new_path=`$WHICH "$new_path" 2> /dev/null`
41611   # bat and cmd files are not always considered executable in cygwin causing which
41612   # to not find them
41613   if test "x$new_path" = x \
41614       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41615       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41616     new_path=`$CYGPATH -u "$path"`
41617   fi
41618   if test "x$new_path" = x; then
41619     # Oops. Which didn't find the executable.
41620     # The splitting of arguments from the executable at a space might have been incorrect,
41621     # since paths with space are more likely in Windows. Give it another try with the whole
41622     # argument.
41623     path="$complete"
41624     arguments="EOL"
41625     new_path=`$CYGPATH -u "$path"`
41626     new_path=`$WHICH "$new_path" 2> /dev/null`
41627     # bat and cmd files are not always considered executable in cygwin causing which
41628     # to not find them
41629     if test "x$new_path" = x \
41630         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41631         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41632       new_path=`$CYGPATH -u "$path"`
41633     fi
41634     if test "x$new_path" = x; then
41635       # It's still not found. Now this is an unrecoverable error.
41636       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41637 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41638       has_space=`$ECHO "$complete" | $GREP " "`
41639       if test "x$has_space" != x; then
41640         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41641 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41642       fi
41643       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41644     fi
41645   fi
41646 
41647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41650   # "foo.exe" is OK but "foo" is an error.
41651   #
41652   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41653   # It is also a way to make sure we got the proper file name for the real test later on.
41654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41655   if test "x$test_shortpath" = x; then
41656     # Short path failed, file does not exist as specified.
41657     # Try adding .exe or .cmd
41658     if test -f "${new_path}.exe"; then
41659       input_to_shortpath="${new_path}.exe"
41660     elif test -f "${new_path}.cmd"; then
41661       input_to_shortpath="${new_path}.cmd"
41662     else
41663       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41664 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41665       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41666 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41667       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41668     fi
41669   else
41670     input_to_shortpath="$new_path"
41671   fi
41672 
41673   # Call helper function which possibly converts this using DOS-style short mode.
41674   # If so, the updated path is stored in $new_path.
41675   new_path="$input_to_shortpath"
41676 
41677   input_path="$input_to_shortpath"
41678   # Check if we need to convert this using DOS-style short mode. If the path
41679   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41680   # take no chances and rewrite it.
41681   # Note: m4 eats our [], so we need to use [ and ] instead.
41682   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41683   if test "x$has_forbidden_chars" != x; then
41684     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41685     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41686     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41687     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41688       # Going to short mode and back again did indeed matter. Since short mode is
41689       # case insensitive, let's make it lowercase to improve readability.
41690       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41691       # Now convert it back to Unix-style (cygpath)
41692       input_path=`$CYGPATH -u "$shortmode_path"`
41693       new_path="$input_path"
41694     fi
41695   fi
41696 
41697   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41698   if test "x$test_cygdrive_prefix" = x; then
41699     # As a simple fix, exclude /usr/bin since it's not a real path.
41700     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41701       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41702       # a path prefixed by /cygdrive for fixpath to work.
41703       new_path="$CYGWIN_ROOT_PATH$input_path"
41704     fi
41705   fi
41706 
41707   # remove trailing .exe if any
41708   new_path="${new_path/%.exe/}"
41709 
41710     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41711 
41712   # First separate the path from the arguments. This will split at the first
41713   # space.
41714   complete="$STRIP"
41715   path="${complete%% *}"
41716   tmp="$complete EOL"
41717   arguments="${tmp#* }"
41718 
41719   # Input might be given as Windows format, start by converting to
41720   # unix format.
41721   new_path="$path"
41722 
41723   windows_path="$new_path"
41724   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41725     unix_path=`$CYGPATH -u "$windows_path"`
41726     new_path="$unix_path"
41727   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41728     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41729     new_path="$unix_path"
41730   fi
41731 
41732 
41733   # Now try to locate executable using which
41734   new_path=`$WHICH "$new_path" 2> /dev/null`
41735 
41736   if test "x$new_path" = x; then
41737     # Oops. Which didn't find the executable.
41738     # The splitting of arguments from the executable at a space might have been incorrect,
41739     # since paths with space are more likely in Windows. Give it another try with the whole
41740     # argument.
41741     path="$complete"
41742     arguments="EOL"
41743     new_path="$path"
41744 
41745   windows_path="$new_path"
41746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41747     unix_path=`$CYGPATH -u "$windows_path"`
41748     new_path="$unix_path"
41749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41751     new_path="$unix_path"
41752   fi
41753 
41754 
41755     new_path=`$WHICH "$new_path" 2> /dev/null`
41756     # bat and cmd files are not always considered executable in MSYS causing which
41757     # to not find them
41758     if test "x$new_path" = x \
41759         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41760         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41761       new_path="$path"
41762 
41763   windows_path="$new_path"
41764   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41765     unix_path=`$CYGPATH -u "$windows_path"`
41766     new_path="$unix_path"
41767   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41768     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41769     new_path="$unix_path"
41770   fi
41771 
41772     fi
41773 
41774     if test "x$new_path" = x; then
41775       # It's still not found. Now this is an unrecoverable error.
41776       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41777 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41778       has_space=`$ECHO "$complete" | $GREP " "`
41779       if test "x$has_space" != x; then
41780         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41781 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41782       fi
41783       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41784     fi
41785   fi
41786 
41787   # Now new_path has a complete unix path to the binary
41788   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41789     # Keep paths in /bin as-is, but remove trailing .exe if any
41790     new_path="${new_path/%.exe/}"
41791     # Do not save /bin paths to all_fixpath_prefixes!
41792   else
41793     # Not in mixed or Windows style, start by that.
41794     new_path=`cmd //c echo $new_path`
41795 
41796   input_path="$new_path"
41797   # Check if we need to convert this using DOS-style short mode. If the path
41798   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41799   # take no chances and rewrite it.
41800   # Note: m4 eats our [], so we need to use [ and ] instead.
41801   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41802   if test "x$has_forbidden_chars" != x; then
41803     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41804     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41805   fi
41806 
41807     # Output is in $new_path
41808 
41809   windows_path="$new_path"
41810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41811     unix_path=`$CYGPATH -u "$windows_path"`
41812     new_path="$unix_path"
41813   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41814     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41815     new_path="$unix_path"
41816   fi
41817 
41818     # remove trailing .exe if any
41819     new_path="${new_path/%.exe/}"
41820 
41821     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41822     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41823   fi
41824 
41825     else
41826       # We're on a unix platform. Hooray! :)
41827       # First separate the path from the arguments. This will split at the first
41828       # space.
41829       complete="$STRIP"
41830       path="${complete%% *}"
41831       tmp="$complete EOL"
41832       arguments="${tmp#* }"
41833 
41834       # Cannot rely on the command "which" here since it doesn't always work.
41835       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41836       if test -z "$is_absolute_path"; then
41837         # Path to executable is not absolute. Find it.
41838         IFS_save="$IFS"
41839         IFS=:
41840         for p in $PATH; do
41841           if test -f "$p/$path" && test -x "$p/$path"; then
41842             new_path="$p/$path"
41843             break
41844           fi
41845         done
41846         IFS="$IFS_save"
41847       else
41848         # This is an absolute path, we can use it without further modifications.
41849         new_path="$path"
41850       fi
41851 
41852       if test "x$new_path" = x; then
41853         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41854 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41855         has_space=`$ECHO "$complete" | $GREP " "`
41856         if test "x$has_space" != x; then
41857           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41858 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41859         fi
41860         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41861       fi
41862     fi
41863 
41864     # Now join together the path and the arguments once again
41865     if test "x$arguments" != xEOL; then
41866       new_complete="$new_path ${arguments% *}"
41867     else
41868       new_complete="$new_path"
41869     fi
41870 
41871     if test "x$complete" != "x$new_complete"; then
41872       STRIP="$new_complete"
41873       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41874 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41875     fi
41876   fi
41877 
41878 
41879 
41880   # Publish this variable in the help.
41881 
41882 
41883   if [ -z "${NM+x}" ]; then
41884     # The variable is not set by user, try to locate tool using the code snippet
41885     for ac_prog in nm
41886 do
41887   # Extract the first word of "$ac_prog", so it can be a program name with args.
41888 set dummy $ac_prog; ac_word=$2
41889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41890 $as_echo_n "checking for $ac_word... " >&6; }
41891 if ${ac_cv_path_NM+:} false; then :
41892   $as_echo_n "(cached) " >&6
41893 else
41894   case $NM in
41895   [\\/]* | ?:[\\/]*)
41896   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41897   ;;
41898   *)
41899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41900 for as_dir in $PATH
41901 do
41902   IFS=$as_save_IFS
41903   test -z "$as_dir" && as_dir=.
41904     for ac_exec_ext in '' $ac_executable_extensions; do
41905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41906     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41908     break 2
41909   fi
41910 done
41911   done
41912 IFS=$as_save_IFS
41913 
41914   ;;
41915 esac
41916 fi
41917 NM=$ac_cv_path_NM
41918 if test -n "$NM"; then
41919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41920 $as_echo "$NM" >&6; }
41921 else
41922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41923 $as_echo "no" >&6; }
41924 fi
41925 
41926 
41927   test -n "$NM" && break
41928 done
41929 
41930   else
41931     # The variable is set, but is it from the command line or the environment?
41932 
41933     # Try to remove the string !NM! from our list.
41934     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41935     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41936       # If it failed, the variable was not from the command line. Ignore it,
41937       # but warn the user (except for BASH, which is always set by the calling BASH).
41938       if test "xNM" != xBASH; then
41939         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41940 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41941       fi
41942       # Try to locate tool using the code snippet
41943       for ac_prog in nm
41944 do
41945   # Extract the first word of "$ac_prog", so it can be a program name with args.
41946 set dummy $ac_prog; ac_word=$2
41947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41948 $as_echo_n "checking for $ac_word... " >&6; }
41949 if ${ac_cv_path_NM+:} false; then :
41950   $as_echo_n "(cached) " >&6
41951 else
41952   case $NM in
41953   [\\/]* | ?:[\\/]*)
41954   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41955   ;;
41956   *)
41957   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41958 for as_dir in $PATH
41959 do
41960   IFS=$as_save_IFS
41961   test -z "$as_dir" && as_dir=.
41962     for ac_exec_ext in '' $ac_executable_extensions; do
41963   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41964     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41965     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41966     break 2
41967   fi
41968 done
41969   done
41970 IFS=$as_save_IFS
41971 
41972   ;;
41973 esac
41974 fi
41975 NM=$ac_cv_path_NM
41976 if test -n "$NM"; then
41977   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41978 $as_echo "$NM" >&6; }
41979 else
41980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41981 $as_echo "no" >&6; }
41982 fi
41983 
41984 
41985   test -n "$NM" && break
41986 done
41987 
41988     else
41989       # If it succeeded, then it was overridden by the user. We will use it
41990       # for the tool.
41991 
41992       # First remove it from the list of overridden variables, so we can test
41993       # for unknown variables in the end.
41994       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41995 
41996       # Check if we try to supply an empty value
41997       if test "x$NM" = x; then
41998         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41999 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42000         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42001 $as_echo_n "checking for NM... " >&6; }
42002         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42003 $as_echo "disabled" >&6; }
42004       else
42005         # Check if the provided tool contains a complete path.
42006         tool_specified="$NM"
42007         tool_basename="${tool_specified##*/}"
42008         if test "x$tool_basename" = "x$tool_specified"; then
42009           # A command without a complete path is provided, search $PATH.
42010           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42011 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42012           # Extract the first word of "$tool_basename", so it can be a program name with args.
42013 set dummy $tool_basename; ac_word=$2
42014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42015 $as_echo_n "checking for $ac_word... " >&6; }
42016 if ${ac_cv_path_NM+:} false; then :
42017   $as_echo_n "(cached) " >&6
42018 else
42019   case $NM in
42020   [\\/]* | ?:[\\/]*)
42021   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42022   ;;
42023   *)
42024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42025 for as_dir in $PATH
42026 do
42027   IFS=$as_save_IFS
42028   test -z "$as_dir" && as_dir=.
42029     for ac_exec_ext in '' $ac_executable_extensions; do
42030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42031     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42033     break 2
42034   fi
42035 done
42036   done
42037 IFS=$as_save_IFS
42038 
42039   ;;
42040 esac
42041 fi
42042 NM=$ac_cv_path_NM
42043 if test -n "$NM"; then
42044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42045 $as_echo "$NM" >&6; }
42046 else
42047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42048 $as_echo "no" >&6; }
42049 fi
42050 
42051 
42052           if test "x$NM" = x; then
42053             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42054           fi
42055         else
42056           # Otherwise we believe it is a complete path. Use it as it is.
42057           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42058 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42059           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42060 $as_echo_n "checking for NM... " >&6; }
42061           if test ! -x "$tool_specified"; then
42062             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42063 $as_echo "not found" >&6; }
42064             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42065           fi
42066           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42067 $as_echo "$tool_specified" >&6; }
42068         fi
42069       fi
42070     fi
42071 
42072   fi
42073 
42074 
42075 
42076   # Only process if variable expands to non-empty
42077 
42078   if test "x$NM" != x; then
42079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42080 
42081   # First separate the path from the arguments. This will split at the first
42082   # space.
42083   complete="$NM"
42084   path="${complete%% *}"
42085   tmp="$complete EOL"
42086   arguments="${tmp#* }"
42087 
42088   # Input might be given as Windows format, start by converting to
42089   # unix format.
42090   new_path=`$CYGPATH -u "$path"`
42091 
42092   # Now try to locate executable using which
42093   new_path=`$WHICH "$new_path" 2> /dev/null`
42094   # bat and cmd files are not always considered executable in cygwin causing which
42095   # to not find them
42096   if test "x$new_path" = x \
42097       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42098       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42099     new_path=`$CYGPATH -u "$path"`
42100   fi
42101   if test "x$new_path" = x; then
42102     # Oops. Which didn't find the executable.
42103     # The splitting of arguments from the executable at a space might have been incorrect,
42104     # since paths with space are more likely in Windows. Give it another try with the whole
42105     # argument.
42106     path="$complete"
42107     arguments="EOL"
42108     new_path=`$CYGPATH -u "$path"`
42109     new_path=`$WHICH "$new_path" 2> /dev/null`
42110     # bat and cmd files are not always considered executable in cygwin causing which
42111     # to not find them
42112     if test "x$new_path" = x \
42113         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42114         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42115       new_path=`$CYGPATH -u "$path"`
42116     fi
42117     if test "x$new_path" = x; then
42118       # It's still not found. Now this is an unrecoverable error.
42119       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42120 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42121       has_space=`$ECHO "$complete" | $GREP " "`
42122       if test "x$has_space" != x; then
42123         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42124 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42125       fi
42126       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42127     fi
42128   fi
42129 
42130   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42131   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42132   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42133   # "foo.exe" is OK but "foo" is an error.
42134   #
42135   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42136   # It is also a way to make sure we got the proper file name for the real test later on.
42137   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42138   if test "x$test_shortpath" = x; then
42139     # Short path failed, file does not exist as specified.
42140     # Try adding .exe or .cmd
42141     if test -f "${new_path}.exe"; then
42142       input_to_shortpath="${new_path}.exe"
42143     elif test -f "${new_path}.cmd"; then
42144       input_to_shortpath="${new_path}.cmd"
42145     else
42146       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42147 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42148       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42149 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42150       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42151     fi
42152   else
42153     input_to_shortpath="$new_path"
42154   fi
42155 
42156   # Call helper function which possibly converts this using DOS-style short mode.
42157   # If so, the updated path is stored in $new_path.
42158   new_path="$input_to_shortpath"
42159 
42160   input_path="$input_to_shortpath"
42161   # Check if we need to convert this using DOS-style short mode. If the path
42162   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42163   # take no chances and rewrite it.
42164   # Note: m4 eats our [], so we need to use [ and ] instead.
42165   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42166   if test "x$has_forbidden_chars" != x; then
42167     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42168     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42169     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42170     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42171       # Going to short mode and back again did indeed matter. Since short mode is
42172       # case insensitive, let's make it lowercase to improve readability.
42173       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42174       # Now convert it back to Unix-style (cygpath)
42175       input_path=`$CYGPATH -u "$shortmode_path"`
42176       new_path="$input_path"
42177     fi
42178   fi
42179 
42180   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42181   if test "x$test_cygdrive_prefix" = x; then
42182     # As a simple fix, exclude /usr/bin since it's not a real path.
42183     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42184       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42185       # a path prefixed by /cygdrive for fixpath to work.
42186       new_path="$CYGWIN_ROOT_PATH$input_path"
42187     fi
42188   fi
42189 
42190   # remove trailing .exe if any
42191   new_path="${new_path/%.exe/}"
42192 
42193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42194 
42195   # First separate the path from the arguments. This will split at the first
42196   # space.
42197   complete="$NM"
42198   path="${complete%% *}"
42199   tmp="$complete EOL"
42200   arguments="${tmp#* }"
42201 
42202   # Input might be given as Windows format, start by converting to
42203   # unix format.
42204   new_path="$path"
42205 
42206   windows_path="$new_path"
42207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42208     unix_path=`$CYGPATH -u "$windows_path"`
42209     new_path="$unix_path"
42210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42212     new_path="$unix_path"
42213   fi
42214 
42215 
42216   # Now try to locate executable using which
42217   new_path=`$WHICH "$new_path" 2> /dev/null`
42218 
42219   if test "x$new_path" = x; then
42220     # Oops. Which didn't find the executable.
42221     # The splitting of arguments from the executable at a space might have been incorrect,
42222     # since paths with space are more likely in Windows. Give it another try with the whole
42223     # argument.
42224     path="$complete"
42225     arguments="EOL"
42226     new_path="$path"
42227 
42228   windows_path="$new_path"
42229   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42230     unix_path=`$CYGPATH -u "$windows_path"`
42231     new_path="$unix_path"
42232   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42233     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42234     new_path="$unix_path"
42235   fi
42236 
42237 
42238     new_path=`$WHICH "$new_path" 2> /dev/null`
42239     # bat and cmd files are not always considered executable in MSYS causing which
42240     # to not find them
42241     if test "x$new_path" = x \
42242         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42243         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42244       new_path="$path"
42245 
42246   windows_path="$new_path"
42247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42248     unix_path=`$CYGPATH -u "$windows_path"`
42249     new_path="$unix_path"
42250   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42251     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42252     new_path="$unix_path"
42253   fi
42254 
42255     fi
42256 
42257     if test "x$new_path" = x; then
42258       # It's still not found. Now this is an unrecoverable error.
42259       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42260 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42261       has_space=`$ECHO "$complete" | $GREP " "`
42262       if test "x$has_space" != x; then
42263         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42264 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42265       fi
42266       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42267     fi
42268   fi
42269 
42270   # Now new_path has a complete unix path to the binary
42271   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42272     # Keep paths in /bin as-is, but remove trailing .exe if any
42273     new_path="${new_path/%.exe/}"
42274     # Do not save /bin paths to all_fixpath_prefixes!
42275   else
42276     # Not in mixed or Windows style, start by that.
42277     new_path=`cmd //c echo $new_path`
42278 
42279   input_path="$new_path"
42280   # Check if we need to convert this using DOS-style short mode. If the path
42281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42282   # take no chances and rewrite it.
42283   # Note: m4 eats our [], so we need to use [ and ] instead.
42284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42285   if test "x$has_forbidden_chars" != x; then
42286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42287     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42288   fi
42289 
42290     # Output is in $new_path
42291 
42292   windows_path="$new_path"
42293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42294     unix_path=`$CYGPATH -u "$windows_path"`
42295     new_path="$unix_path"
42296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42298     new_path="$unix_path"
42299   fi
42300 
42301     # remove trailing .exe if any
42302     new_path="${new_path/%.exe/}"
42303 
42304     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42305     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42306   fi
42307 
42308     else
42309       # We're on a unix platform. Hooray! :)
42310       # First separate the path from the arguments. This will split at the first
42311       # space.
42312       complete="$NM"
42313       path="${complete%% *}"
42314       tmp="$complete EOL"
42315       arguments="${tmp#* }"
42316 
42317       # Cannot rely on the command "which" here since it doesn't always work.
42318       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42319       if test -z "$is_absolute_path"; then
42320         # Path to executable is not absolute. Find it.
42321         IFS_save="$IFS"
42322         IFS=:
42323         for p in $PATH; do
42324           if test -f "$p/$path" && test -x "$p/$path"; then
42325             new_path="$p/$path"
42326             break
42327           fi
42328         done
42329         IFS="$IFS_save"
42330       else
42331         # This is an absolute path, we can use it without further modifications.
42332         new_path="$path"
42333       fi
42334 
42335       if test "x$new_path" = x; then
42336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42337 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42338         has_space=`$ECHO "$complete" | $GREP " "`
42339         if test "x$has_space" != x; then
42340           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42341 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42342         fi
42343         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42344       fi
42345     fi
42346 
42347     # Now join together the path and the arguments once again
42348     if test "x$arguments" != xEOL; then
42349       new_complete="$new_path ${arguments% *}"
42350     else
42351       new_complete="$new_path"
42352     fi
42353 
42354     if test "x$complete" != "x$new_complete"; then
42355       NM="$new_complete"
42356       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42357 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42358     fi
42359   fi
42360 
42361 
42362 
42363   # Publish this variable in the help.
42364 
42365 
42366   if [ -z "${GNM+x}" ]; then
42367     # The variable is not set by user, try to locate tool using the code snippet
42368     for ac_prog in gnm
42369 do
42370   # Extract the first word of "$ac_prog", so it can be a program name with args.
42371 set dummy $ac_prog; ac_word=$2
42372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42373 $as_echo_n "checking for $ac_word... " >&6; }
42374 if ${ac_cv_path_GNM+:} false; then :
42375   $as_echo_n "(cached) " >&6
42376 else
42377   case $GNM in
42378   [\\/]* | ?:[\\/]*)
42379   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
42380   ;;
42381   *)
42382   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42383 for as_dir in $PATH
42384 do
42385   IFS=$as_save_IFS
42386   test -z "$as_dir" && as_dir=.
42387     for ac_exec_ext in '' $ac_executable_extensions; do
42388   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42389     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
42390     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42391     break 2
42392   fi
42393 done
42394   done
42395 IFS=$as_save_IFS
42396 
42397   ;;
42398 esac
42399 fi
42400 GNM=$ac_cv_path_GNM
42401 if test -n "$GNM"; then
42402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
42403 $as_echo "$GNM" >&6; }
42404 else
42405   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42406 $as_echo "no" >&6; }
42407 fi
42408 
42409 
42410   test -n "$GNM" && break
42411 done
42412 
42413   else
42414     # The variable is set, but is it from the command line or the environment?
42415 
42416     # Try to remove the string !GNM! from our list.
42417     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
42418     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42419       # If it failed, the variable was not from the command line. Ignore it,
42420       # but warn the user (except for BASH, which is always set by the calling BASH).
42421       if test "xGNM" != xBASH; then
42422         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
42423 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
42424       fi
42425       # Try to locate tool using the code snippet
42426       for ac_prog in gnm
42427 do
42428   # Extract the first word of "$ac_prog", so it can be a program name with args.
42429 set dummy $ac_prog; ac_word=$2
42430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42431 $as_echo_n "checking for $ac_word... " >&6; }
42432 if ${ac_cv_path_GNM+:} false; then :
42433   $as_echo_n "(cached) " >&6
42434 else
42435   case $GNM in
42436   [\\/]* | ?:[\\/]*)
42437   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
42438   ;;
42439   *)
42440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42441 for as_dir in $PATH
42442 do
42443   IFS=$as_save_IFS
42444   test -z "$as_dir" && as_dir=.
42445     for ac_exec_ext in '' $ac_executable_extensions; do
42446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42447     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
42448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42449     break 2
42450   fi
42451 done
42452   done
42453 IFS=$as_save_IFS
42454 
42455   ;;
42456 esac
42457 fi
42458 GNM=$ac_cv_path_GNM
42459 if test -n "$GNM"; then
42460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
42461 $as_echo "$GNM" >&6; }
42462 else
42463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42464 $as_echo "no" >&6; }
42465 fi
42466 
42467 
42468   test -n "$GNM" && break
42469 done
42470 
42471     else
42472       # If it succeeded, then it was overridden by the user. We will use it
42473       # for the tool.
42474 
42475       # First remove it from the list of overridden variables, so we can test
42476       # for unknown variables in the end.
42477       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42478 
42479       # Check if we try to supply an empty value
42480       if test "x$GNM" = x; then
42481         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
42482 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
42483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
42484 $as_echo_n "checking for GNM... " >&6; }
42485         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42486 $as_echo "disabled" >&6; }
42487       else
42488         # Check if the provided tool contains a complete path.
42489         tool_specified="$GNM"
42490         tool_basename="${tool_specified##*/}"
42491         if test "x$tool_basename" = "x$tool_specified"; then
42492           # A command without a complete path is provided, search $PATH.
42493           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
42494 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
42495           # Extract the first word of "$tool_basename", so it can be a program name with args.
42496 set dummy $tool_basename; ac_word=$2
42497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42498 $as_echo_n "checking for $ac_word... " >&6; }
42499 if ${ac_cv_path_GNM+:} false; then :
42500   $as_echo_n "(cached) " >&6
42501 else
42502   case $GNM in
42503   [\\/]* | ?:[\\/]*)
42504   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
42505   ;;
42506   *)
42507   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42508 for as_dir in $PATH
42509 do
42510   IFS=$as_save_IFS
42511   test -z "$as_dir" && as_dir=.
42512     for ac_exec_ext in '' $ac_executable_extensions; do
42513   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42514     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
42515     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42516     break 2
42517   fi
42518 done
42519   done
42520 IFS=$as_save_IFS
42521 
42522   ;;
42523 esac
42524 fi
42525 GNM=$ac_cv_path_GNM
42526 if test -n "$GNM"; then
42527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
42528 $as_echo "$GNM" >&6; }
42529 else
42530   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42531 $as_echo "no" >&6; }
42532 fi
42533 
42534 
42535           if test "x$GNM" = x; then
42536             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42537           fi
42538         else
42539           # Otherwise we believe it is a complete path. Use it as it is.
42540           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
42541 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
42542           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
42543 $as_echo_n "checking for GNM... " >&6; }
42544           if test ! -x "$tool_specified"; then
42545             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42546 $as_echo "not found" >&6; }
42547             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
42548           fi
42549           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42550 $as_echo "$tool_specified" >&6; }
42551         fi
42552       fi
42553     fi
42554 
42555   fi
42556 
42557 
42558 
42559   # Only process if variable expands to non-empty
42560 
42561   if test "x$GNM" != x; then
42562     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42563 
42564   # First separate the path from the arguments. This will split at the first
42565   # space.
42566   complete="$GNM"
42567   path="${complete%% *}"
42568   tmp="$complete EOL"
42569   arguments="${tmp#* }"
42570 
42571   # Input might be given as Windows format, start by converting to
42572   # unix format.
42573   new_path=`$CYGPATH -u "$path"`
42574 
42575   # Now try to locate executable using which
42576   new_path=`$WHICH "$new_path" 2> /dev/null`
42577   # bat and cmd files are not always considered executable in cygwin causing which
42578   # to not find them
42579   if test "x$new_path" = x \
42580       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42581       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42582     new_path=`$CYGPATH -u "$path"`
42583   fi
42584   if test "x$new_path" = x; then
42585     # Oops. Which didn't find the executable.
42586     # The splitting of arguments from the executable at a space might have been incorrect,
42587     # since paths with space are more likely in Windows. Give it another try with the whole
42588     # argument.
42589     path="$complete"
42590     arguments="EOL"
42591     new_path=`$CYGPATH -u "$path"`
42592     new_path=`$WHICH "$new_path" 2> /dev/null`
42593     # bat and cmd files are not always considered executable in cygwin causing which
42594     # to not find them
42595     if test "x$new_path" = x \
42596         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42597         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42598       new_path=`$CYGPATH -u "$path"`
42599     fi
42600     if test "x$new_path" = x; then
42601       # It's still not found. Now this is an unrecoverable error.
42602       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42603 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42604       has_space=`$ECHO "$complete" | $GREP " "`
42605       if test "x$has_space" != x; then
42606         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42607 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42608       fi
42609       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42610     fi
42611   fi
42612 
42613   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42614   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42615   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42616   # "foo.exe" is OK but "foo" is an error.
42617   #
42618   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42619   # It is also a way to make sure we got the proper file name for the real test later on.
42620   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42621   if test "x$test_shortpath" = x; then
42622     # Short path failed, file does not exist as specified.
42623     # Try adding .exe or .cmd
42624     if test -f "${new_path}.exe"; then
42625       input_to_shortpath="${new_path}.exe"
42626     elif test -f "${new_path}.cmd"; then
42627       input_to_shortpath="${new_path}.cmd"
42628     else
42629       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
42630 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
42631       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42632 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42633       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42634     fi
42635   else
42636     input_to_shortpath="$new_path"
42637   fi
42638 
42639   # Call helper function which possibly converts this using DOS-style short mode.
42640   # If so, the updated path is stored in $new_path.
42641   new_path="$input_to_shortpath"
42642 
42643   input_path="$input_to_shortpath"
42644   # Check if we need to convert this using DOS-style short mode. If the path
42645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42646   # take no chances and rewrite it.
42647   # Note: m4 eats our [], so we need to use [ and ] instead.
42648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42649   if test "x$has_forbidden_chars" != x; then
42650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42654       # Going to short mode and back again did indeed matter. Since short mode is
42655       # case insensitive, let's make it lowercase to improve readability.
42656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42657       # Now convert it back to Unix-style (cygpath)
42658       input_path=`$CYGPATH -u "$shortmode_path"`
42659       new_path="$input_path"
42660     fi
42661   fi
42662 
42663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42664   if test "x$test_cygdrive_prefix" = x; then
42665     # As a simple fix, exclude /usr/bin since it's not a real path.
42666     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42668       # a path prefixed by /cygdrive for fixpath to work.
42669       new_path="$CYGWIN_ROOT_PATH$input_path"
42670     fi
42671   fi
42672 
42673   # remove trailing .exe if any
42674   new_path="${new_path/%.exe/}"
42675 
42676     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42677 
42678   # First separate the path from the arguments. This will split at the first
42679   # space.
42680   complete="$GNM"
42681   path="${complete%% *}"
42682   tmp="$complete EOL"
42683   arguments="${tmp#* }"
42684 
42685   # Input might be given as Windows format, start by converting to
42686   # unix format.
42687   new_path="$path"
42688 
42689   windows_path="$new_path"
42690   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42691     unix_path=`$CYGPATH -u "$windows_path"`
42692     new_path="$unix_path"
42693   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42694     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42695     new_path="$unix_path"
42696   fi
42697 
42698 
42699   # Now try to locate executable using which
42700   new_path=`$WHICH "$new_path" 2> /dev/null`
42701 
42702   if test "x$new_path" = x; then
42703     # Oops. Which didn't find the executable.
42704     # The splitting of arguments from the executable at a space might have been incorrect,
42705     # since paths with space are more likely in Windows. Give it another try with the whole
42706     # argument.
42707     path="$complete"
42708     arguments="EOL"
42709     new_path="$path"
42710 
42711   windows_path="$new_path"
42712   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42713     unix_path=`$CYGPATH -u "$windows_path"`
42714     new_path="$unix_path"
42715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42716     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42717     new_path="$unix_path"
42718   fi
42719 
42720 
42721     new_path=`$WHICH "$new_path" 2> /dev/null`
42722     # bat and cmd files are not always considered executable in MSYS causing which
42723     # to not find them
42724     if test "x$new_path" = x \
42725         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42726         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42727       new_path="$path"
42728 
42729   windows_path="$new_path"
42730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42731     unix_path=`$CYGPATH -u "$windows_path"`
42732     new_path="$unix_path"
42733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42735     new_path="$unix_path"
42736   fi
42737 
42738     fi
42739 
42740     if test "x$new_path" = x; then
42741       # It's still not found. Now this is an unrecoverable error.
42742       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42743 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42744       has_space=`$ECHO "$complete" | $GREP " "`
42745       if test "x$has_space" != x; then
42746         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42747 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42748       fi
42749       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42750     fi
42751   fi
42752 
42753   # Now new_path has a complete unix path to the binary
42754   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42755     # Keep paths in /bin as-is, but remove trailing .exe if any
42756     new_path="${new_path/%.exe/}"
42757     # Do not save /bin paths to all_fixpath_prefixes!
42758   else
42759     # Not in mixed or Windows style, start by that.
42760     new_path=`cmd //c echo $new_path`
42761 
42762   input_path="$new_path"
42763   # Check if we need to convert this using DOS-style short mode. If the path
42764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42765   # take no chances and rewrite it.
42766   # Note: m4 eats our [], so we need to use [ and ] instead.
42767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42768   if test "x$has_forbidden_chars" != x; then
42769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42770     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42771   fi
42772 
42773     # Output is in $new_path
42774 
42775   windows_path="$new_path"
42776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42777     unix_path=`$CYGPATH -u "$windows_path"`
42778     new_path="$unix_path"
42779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42781     new_path="$unix_path"
42782   fi
42783 
42784     # remove trailing .exe if any
42785     new_path="${new_path/%.exe/}"
42786 
42787     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42788     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42789   fi
42790 
42791     else
42792       # We're on a unix platform. Hooray! :)
42793       # First separate the path from the arguments. This will split at the first
42794       # space.
42795       complete="$GNM"
42796       path="${complete%% *}"
42797       tmp="$complete EOL"
42798       arguments="${tmp#* }"
42799 
42800       # Cannot rely on the command "which" here since it doesn't always work.
42801       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42802       if test -z "$is_absolute_path"; then
42803         # Path to executable is not absolute. Find it.
42804         IFS_save="$IFS"
42805         IFS=:
42806         for p in $PATH; do
42807           if test -f "$p/$path" && test -x "$p/$path"; then
42808             new_path="$p/$path"
42809             break
42810           fi
42811         done
42812         IFS="$IFS_save"
42813       else
42814         # This is an absolute path, we can use it without further modifications.
42815         new_path="$path"
42816       fi
42817 
42818       if test "x$new_path" = x; then
42819         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42820 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42821         has_space=`$ECHO "$complete" | $GREP " "`
42822         if test "x$has_space" != x; then
42823           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42824 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42825         fi
42826         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42827       fi
42828     fi
42829 
42830     # Now join together the path and the arguments once again
42831     if test "x$arguments" != xEOL; then
42832       new_complete="$new_path ${arguments% *}"
42833     else
42834       new_complete="$new_path"
42835     fi
42836 
42837     if test "x$complete" != "x$new_complete"; then
42838       GNM="$new_complete"
42839       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42840 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42841     fi
42842   fi
42843 
42844   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42845     # FIXME: we should unify this with the solaris case above.
42846 
42847 
42848   # Publish this variable in the help.
42849 
42850 
42851   if [ -z "${STRIP+x}" ]; then
42852     # The variable is not set by user, try to locate tool using the code snippet
42853     if test -n "$ac_tool_prefix"; then
42854   for ac_prog in strip
42855   do
42856     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42857 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42859 $as_echo_n "checking for $ac_word... " >&6; }
42860 if ${ac_cv_prog_STRIP+:} false; then :
42861   $as_echo_n "(cached) " >&6
42862 else
42863   if test -n "$STRIP"; then
42864   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42865 else
42866 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42867 for as_dir in $PATH
42868 do
42869   IFS=$as_save_IFS
42870   test -z "$as_dir" && as_dir=.
42871     for ac_exec_ext in '' $ac_executable_extensions; do
42872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42873     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42875     break 2
42876   fi
42877 done
42878   done
42879 IFS=$as_save_IFS
42880 
42881 fi
42882 fi
42883 STRIP=$ac_cv_prog_STRIP
42884 if test -n "$STRIP"; then
42885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42886 $as_echo "$STRIP" >&6; }
42887 else
42888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42889 $as_echo "no" >&6; }
42890 fi
42891 
42892 
42893     test -n "$STRIP" && break
42894   done
42895 fi
42896 if test -z "$STRIP"; then
42897   ac_ct_STRIP=$STRIP
42898   for ac_prog in strip
42899 do
42900   # Extract the first word of "$ac_prog", so it can be a program name with args.
42901 set dummy $ac_prog; ac_word=$2
42902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42903 $as_echo_n "checking for $ac_word... " >&6; }
42904 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42905   $as_echo_n "(cached) " >&6
42906 else
42907   if test -n "$ac_ct_STRIP"; then
42908   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42909 else
42910 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42911 for as_dir in $PATH
42912 do
42913   IFS=$as_save_IFS
42914   test -z "$as_dir" && as_dir=.
42915     for ac_exec_ext in '' $ac_executable_extensions; do
42916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42917     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42919     break 2
42920   fi
42921 done
42922   done
42923 IFS=$as_save_IFS
42924 
42925 fi
42926 fi
42927 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42928 if test -n "$ac_ct_STRIP"; then
42929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42930 $as_echo "$ac_ct_STRIP" >&6; }
42931 else
42932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42933 $as_echo "no" >&6; }
42934 fi
42935 
42936 
42937   test -n "$ac_ct_STRIP" && break
42938 done
42939 
42940   if test "x$ac_ct_STRIP" = x; then
42941     STRIP=""
42942   else
42943     case $cross_compiling:$ac_tool_warned in
42944 yes:)
42945 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42946 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42947 ac_tool_warned=yes ;;
42948 esac
42949     STRIP=$ac_ct_STRIP
42950   fi
42951 fi
42952 
42953   else
42954     # The variable is set, but is it from the command line or the environment?
42955 
42956     # Try to remove the string !STRIP! from our list.
42957     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42958     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42959       # If it failed, the variable was not from the command line. Ignore it,
42960       # but warn the user (except for BASH, which is always set by the calling BASH).
42961       if test "xSTRIP" != xBASH; then
42962         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42963 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42964       fi
42965       # Try to locate tool using the code snippet
42966       if test -n "$ac_tool_prefix"; then
42967   for ac_prog in strip
42968   do
42969     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42970 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42972 $as_echo_n "checking for $ac_word... " >&6; }
42973 if ${ac_cv_prog_STRIP+:} false; then :
42974   $as_echo_n "(cached) " >&6
42975 else
42976   if test -n "$STRIP"; then
42977   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42978 else
42979 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42980 for as_dir in $PATH
42981 do
42982   IFS=$as_save_IFS
42983   test -z "$as_dir" && as_dir=.
42984     for ac_exec_ext in '' $ac_executable_extensions; do
42985   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42986     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42987     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42988     break 2
42989   fi
42990 done
42991   done
42992 IFS=$as_save_IFS
42993 
42994 fi
42995 fi
42996 STRIP=$ac_cv_prog_STRIP
42997 if test -n "$STRIP"; then
42998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42999 $as_echo "$STRIP" >&6; }
43000 else
43001   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43002 $as_echo "no" >&6; }
43003 fi
43004 
43005 
43006     test -n "$STRIP" && break
43007   done
43008 fi
43009 if test -z "$STRIP"; then
43010   ac_ct_STRIP=$STRIP
43011   for ac_prog in strip
43012 do
43013   # Extract the first word of "$ac_prog", so it can be a program name with args.
43014 set dummy $ac_prog; ac_word=$2
43015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43016 $as_echo_n "checking for $ac_word... " >&6; }
43017 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
43018   $as_echo_n "(cached) " >&6
43019 else
43020   if test -n "$ac_ct_STRIP"; then
43021   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
43022 else
43023 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43024 for as_dir in $PATH
43025 do
43026   IFS=$as_save_IFS
43027   test -z "$as_dir" && as_dir=.
43028     for ac_exec_ext in '' $ac_executable_extensions; do
43029   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43030     ac_cv_prog_ac_ct_STRIP="$ac_prog"
43031     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43032     break 2
43033   fi
43034 done
43035   done
43036 IFS=$as_save_IFS
43037 
43038 fi
43039 fi
43040 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
43041 if test -n "$ac_ct_STRIP"; then
43042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
43043 $as_echo "$ac_ct_STRIP" >&6; }
43044 else
43045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43046 $as_echo "no" >&6; }
43047 fi
43048 
43049 
43050   test -n "$ac_ct_STRIP" && break
43051 done
43052 
43053   if test "x$ac_ct_STRIP" = x; then
43054     STRIP=""
43055   else
43056     case $cross_compiling:$ac_tool_warned in
43057 yes:)
43058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43059 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43060 ac_tool_warned=yes ;;
43061 esac
43062     STRIP=$ac_ct_STRIP
43063   fi
43064 fi
43065 
43066     else
43067       # If it succeeded, then it was overridden by the user. We will use it
43068       # for the tool.
43069 
43070       # First remove it from the list of overridden variables, so we can test
43071       # for unknown variables in the end.
43072       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43073 
43074       # Check if we try to supply an empty value
43075       if test "x$STRIP" = x; then
43076         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
43077 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
43078         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
43079 $as_echo_n "checking for STRIP... " >&6; }
43080         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43081 $as_echo "disabled" >&6; }
43082       else
43083         # Check if the provided tool contains a complete path.
43084         tool_specified="$STRIP"
43085         tool_basename="${tool_specified##*/}"
43086         if test "x$tool_basename" = "x$tool_specified"; then
43087           # A command without a complete path is provided, search $PATH.
43088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
43089 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
43090           # Extract the first word of "$tool_basename", so it can be a program name with args.
43091 set dummy $tool_basename; ac_word=$2
43092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43093 $as_echo_n "checking for $ac_word... " >&6; }
43094 if ${ac_cv_path_STRIP+:} false; then :
43095   $as_echo_n "(cached) " >&6
43096 else
43097   case $STRIP in
43098   [\\/]* | ?:[\\/]*)
43099   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
43100   ;;
43101   *)
43102   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43103 for as_dir in $PATH
43104 do
43105   IFS=$as_save_IFS
43106   test -z "$as_dir" && as_dir=.
43107     for ac_exec_ext in '' $ac_executable_extensions; do
43108   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43109     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
43110     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43111     break 2
43112   fi
43113 done
43114   done
43115 IFS=$as_save_IFS
43116 
43117   ;;
43118 esac
43119 fi
43120 STRIP=$ac_cv_path_STRIP
43121 if test -n "$STRIP"; then
43122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
43123 $as_echo "$STRIP" >&6; }
43124 else
43125   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43126 $as_echo "no" >&6; }
43127 fi
43128 
43129 
43130           if test "x$STRIP" = x; then
43131             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43132           fi
43133         else
43134           # Otherwise we believe it is a complete path. Use it as it is.
43135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
43136 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
43137           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
43138 $as_echo_n "checking for STRIP... " >&6; }
43139           if test ! -x "$tool_specified"; then
43140             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43141 $as_echo "not found" >&6; }
43142             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
43143           fi
43144           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43145 $as_echo "$tool_specified" >&6; }
43146         fi
43147       fi
43148     fi
43149 
43150   fi
43151 
43152 
43153 
43154   # Only process if variable expands to non-empty
43155 
43156   if test "x$STRIP" != x; then
43157     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43158 
43159   # First separate the path from the arguments. This will split at the first
43160   # space.
43161   complete="$STRIP"
43162   path="${complete%% *}"
43163   tmp="$complete EOL"
43164   arguments="${tmp#* }"
43165 
43166   # Input might be given as Windows format, start by converting to
43167   # unix format.
43168   new_path=`$CYGPATH -u "$path"`
43169 
43170   # Now try to locate executable using which
43171   new_path=`$WHICH "$new_path" 2> /dev/null`
43172   # bat and cmd files are not always considered executable in cygwin causing which
43173   # to not find them
43174   if test "x$new_path" = x \
43175       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43176       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43177     new_path=`$CYGPATH -u "$path"`
43178   fi
43179   if test "x$new_path" = x; then
43180     # Oops. Which didn't find the executable.
43181     # The splitting of arguments from the executable at a space might have been incorrect,
43182     # since paths with space are more likely in Windows. Give it another try with the whole
43183     # argument.
43184     path="$complete"
43185     arguments="EOL"
43186     new_path=`$CYGPATH -u "$path"`
43187     new_path=`$WHICH "$new_path" 2> /dev/null`
43188     # bat and cmd files are not always considered executable in cygwin causing which
43189     # to not find them
43190     if test "x$new_path" = x \
43191         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43192         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43193       new_path=`$CYGPATH -u "$path"`
43194     fi
43195     if test "x$new_path" = x; then
43196       # It's still not found. Now this is an unrecoverable error.
43197       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
43198 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
43199       has_space=`$ECHO "$complete" | $GREP " "`
43200       if test "x$has_space" != x; then
43201         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43202 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43203       fi
43204       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43205     fi
43206   fi
43207 
43208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43211   # "foo.exe" is OK but "foo" is an error.
43212   #
43213   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43214   # It is also a way to make sure we got the proper file name for the real test later on.
43215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43216   if test "x$test_shortpath" = x; then
43217     # Short path failed, file does not exist as specified.
43218     # Try adding .exe or .cmd
43219     if test -f "${new_path}.exe"; then
43220       input_to_shortpath="${new_path}.exe"
43221     elif test -f "${new_path}.cmd"; then
43222       input_to_shortpath="${new_path}.cmd"
43223     else
43224       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
43225 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
43226       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43227 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43228       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43229     fi
43230   else
43231     input_to_shortpath="$new_path"
43232   fi
43233 
43234   # Call helper function which possibly converts this using DOS-style short mode.
43235   # If so, the updated path is stored in $new_path.
43236   new_path="$input_to_shortpath"
43237 
43238   input_path="$input_to_shortpath"
43239   # Check if we need to convert this using DOS-style short mode. If the path
43240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43241   # take no chances and rewrite it.
43242   # Note: m4 eats our [], so we need to use [ and ] instead.
43243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43244   if test "x$has_forbidden_chars" != x; then
43245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43246     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43247     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43248     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43249       # Going to short mode and back again did indeed matter. Since short mode is
43250       # case insensitive, let's make it lowercase to improve readability.
43251       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43252       # Now convert it back to Unix-style (cygpath)
43253       input_path=`$CYGPATH -u "$shortmode_path"`
43254       new_path="$input_path"
43255     fi
43256   fi
43257 
43258   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43259   if test "x$test_cygdrive_prefix" = x; then
43260     # As a simple fix, exclude /usr/bin since it's not a real path.
43261     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43262       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43263       # a path prefixed by /cygdrive for fixpath to work.
43264       new_path="$CYGWIN_ROOT_PATH$input_path"
43265     fi
43266   fi
43267 
43268   # remove trailing .exe if any
43269   new_path="${new_path/%.exe/}"
43270 
43271     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43272 
43273   # First separate the path from the arguments. This will split at the first
43274   # space.
43275   complete="$STRIP"
43276   path="${complete%% *}"
43277   tmp="$complete EOL"
43278   arguments="${tmp#* }"
43279 
43280   # Input might be given as Windows format, start by converting to
43281   # unix format.
43282   new_path="$path"
43283 
43284   windows_path="$new_path"
43285   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43286     unix_path=`$CYGPATH -u "$windows_path"`
43287     new_path="$unix_path"
43288   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43289     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43290     new_path="$unix_path"
43291   fi
43292 
43293 
43294   # Now try to locate executable using which
43295   new_path=`$WHICH "$new_path" 2> /dev/null`
43296 
43297   if test "x$new_path" = x; then
43298     # Oops. Which didn't find the executable.
43299     # The splitting of arguments from the executable at a space might have been incorrect,
43300     # since paths with space are more likely in Windows. Give it another try with the whole
43301     # argument.
43302     path="$complete"
43303     arguments="EOL"
43304     new_path="$path"
43305 
43306   windows_path="$new_path"
43307   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43308     unix_path=`$CYGPATH -u "$windows_path"`
43309     new_path="$unix_path"
43310   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43311     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43312     new_path="$unix_path"
43313   fi
43314 
43315 
43316     new_path=`$WHICH "$new_path" 2> /dev/null`
43317     # bat and cmd files are not always considered executable in MSYS causing which
43318     # to not find them
43319     if test "x$new_path" = x \
43320         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43321         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43322       new_path="$path"
43323 
43324   windows_path="$new_path"
43325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43326     unix_path=`$CYGPATH -u "$windows_path"`
43327     new_path="$unix_path"
43328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43330     new_path="$unix_path"
43331   fi
43332 
43333     fi
43334 
43335     if test "x$new_path" = x; then
43336       # It's still not found. Now this is an unrecoverable error.
43337       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
43338 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
43339       has_space=`$ECHO "$complete" | $GREP " "`
43340       if test "x$has_space" != x; then
43341         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43342 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43343       fi
43344       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43345     fi
43346   fi
43347 
43348   # Now new_path has a complete unix path to the binary
43349   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43350     # Keep paths in /bin as-is, but remove trailing .exe if any
43351     new_path="${new_path/%.exe/}"
43352     # Do not save /bin paths to all_fixpath_prefixes!
43353   else
43354     # Not in mixed or Windows style, start by that.
43355     new_path=`cmd //c echo $new_path`
43356 
43357   input_path="$new_path"
43358   # Check if we need to convert this using DOS-style short mode. If the path
43359   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43360   # take no chances and rewrite it.
43361   # Note: m4 eats our [], so we need to use [ and ] instead.
43362   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43363   if test "x$has_forbidden_chars" != x; then
43364     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43365     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43366   fi
43367 
43368     # Output is in $new_path
43369 
43370   windows_path="$new_path"
43371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43372     unix_path=`$CYGPATH -u "$windows_path"`
43373     new_path="$unix_path"
43374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43376     new_path="$unix_path"
43377   fi
43378 
43379     # remove trailing .exe if any
43380     new_path="${new_path/%.exe/}"
43381 
43382     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43383     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43384   fi
43385 
43386     else
43387       # We're on a unix platform. Hooray! :)
43388       # First separate the path from the arguments. This will split at the first
43389       # space.
43390       complete="$STRIP"
43391       path="${complete%% *}"
43392       tmp="$complete EOL"
43393       arguments="${tmp#* }"
43394 
43395       # Cannot rely on the command "which" here since it doesn't always work.
43396       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43397       if test -z "$is_absolute_path"; then
43398         # Path to executable is not absolute. Find it.
43399         IFS_save="$IFS"
43400         IFS=:
43401         for p in $PATH; do
43402           if test -f "$p/$path" && test -x "$p/$path"; then
43403             new_path="$p/$path"
43404             break
43405           fi
43406         done
43407         IFS="$IFS_save"
43408       else
43409         # This is an absolute path, we can use it without further modifications.
43410         new_path="$path"
43411       fi
43412 
43413       if test "x$new_path" = x; then
43414         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
43415 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
43416         has_space=`$ECHO "$complete" | $GREP " "`
43417         if test "x$has_space" != x; then
43418           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43419 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43420         fi
43421         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43422       fi
43423     fi
43424 
43425     # Now join together the path and the arguments once again
43426     if test "x$arguments" != xEOL; then
43427       new_complete="$new_path ${arguments% *}"
43428     else
43429       new_complete="$new_path"
43430     fi
43431 
43432     if test "x$complete" != "x$new_complete"; then
43433       STRIP="$new_complete"
43434       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
43435 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
43436     fi
43437   fi
43438 
43439     if test "x$TOOLCHAIN_TYPE" = xgcc; then
43440 
43441 
43442   # Publish this variable in the help.
43443 
43444 
43445   if [ -z "${NM+x}" ]; then
43446     # The variable is not set by user, try to locate tool using the code snippet
43447     if test -n "$ac_tool_prefix"; then
43448   for ac_prog in nm gcc-nm
43449   do
43450     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43451 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43453 $as_echo_n "checking for $ac_word... " >&6; }
43454 if ${ac_cv_prog_NM+:} false; then :
43455   $as_echo_n "(cached) " >&6
43456 else
43457   if test -n "$NM"; then
43458   ac_cv_prog_NM="$NM" # Let the user override the test.
43459 else
43460 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43461 for as_dir in $PATH
43462 do
43463   IFS=$as_save_IFS
43464   test -z "$as_dir" && as_dir=.
43465     for ac_exec_ext in '' $ac_executable_extensions; do
43466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43467     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43469     break 2
43470   fi
43471 done
43472   done
43473 IFS=$as_save_IFS
43474 
43475 fi
43476 fi
43477 NM=$ac_cv_prog_NM
43478 if test -n "$NM"; then
43479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43480 $as_echo "$NM" >&6; }
43481 else
43482   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43483 $as_echo "no" >&6; }
43484 fi
43485 
43486 
43487     test -n "$NM" && break
43488   done
43489 fi
43490 if test -z "$NM"; then
43491   ac_ct_NM=$NM
43492   for ac_prog in nm gcc-nm
43493 do
43494   # Extract the first word of "$ac_prog", so it can be a program name with args.
43495 set dummy $ac_prog; ac_word=$2
43496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43497 $as_echo_n "checking for $ac_word... " >&6; }
43498 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43499   $as_echo_n "(cached) " >&6
43500 else
43501   if test -n "$ac_ct_NM"; then
43502   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43503 else
43504 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43505 for as_dir in $PATH
43506 do
43507   IFS=$as_save_IFS
43508   test -z "$as_dir" && as_dir=.
43509     for ac_exec_ext in '' $ac_executable_extensions; do
43510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43511     ac_cv_prog_ac_ct_NM="$ac_prog"
43512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43513     break 2
43514   fi
43515 done
43516   done
43517 IFS=$as_save_IFS
43518 
43519 fi
43520 fi
43521 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43522 if test -n "$ac_ct_NM"; then
43523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43524 $as_echo "$ac_ct_NM" >&6; }
43525 else
43526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43527 $as_echo "no" >&6; }
43528 fi
43529 
43530 
43531   test -n "$ac_ct_NM" && break
43532 done
43533 
43534   if test "x$ac_ct_NM" = x; then
43535     NM=""
43536   else
43537     case $cross_compiling:$ac_tool_warned in
43538 yes:)
43539 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43540 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43541 ac_tool_warned=yes ;;
43542 esac
43543     NM=$ac_ct_NM
43544   fi
43545 fi
43546 
43547   else
43548     # The variable is set, but is it from the command line or the environment?
43549 
43550     # Try to remove the string !NM! from our list.
43551     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43552     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43553       # If it failed, the variable was not from the command line. Ignore it,
43554       # but warn the user (except for BASH, which is always set by the calling BASH).
43555       if test "xNM" != xBASH; then
43556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43557 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43558       fi
43559       # Try to locate tool using the code snippet
43560       if test -n "$ac_tool_prefix"; then
43561   for ac_prog in nm gcc-nm
43562   do
43563     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43564 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43566 $as_echo_n "checking for $ac_word... " >&6; }
43567 if ${ac_cv_prog_NM+:} false; then :
43568   $as_echo_n "(cached) " >&6
43569 else
43570   if test -n "$NM"; then
43571   ac_cv_prog_NM="$NM" # Let the user override the test.
43572 else
43573 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43574 for as_dir in $PATH
43575 do
43576   IFS=$as_save_IFS
43577   test -z "$as_dir" && as_dir=.
43578     for ac_exec_ext in '' $ac_executable_extensions; do
43579   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43580     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43581     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43582     break 2
43583   fi
43584 done
43585   done
43586 IFS=$as_save_IFS
43587 
43588 fi
43589 fi
43590 NM=$ac_cv_prog_NM
43591 if test -n "$NM"; then
43592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43593 $as_echo "$NM" >&6; }
43594 else
43595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43596 $as_echo "no" >&6; }
43597 fi
43598 
43599 
43600     test -n "$NM" && break
43601   done
43602 fi
43603 if test -z "$NM"; then
43604   ac_ct_NM=$NM
43605   for ac_prog in nm gcc-nm
43606 do
43607   # Extract the first word of "$ac_prog", so it can be a program name with args.
43608 set dummy $ac_prog; ac_word=$2
43609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43610 $as_echo_n "checking for $ac_word... " >&6; }
43611 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43612   $as_echo_n "(cached) " >&6
43613 else
43614   if test -n "$ac_ct_NM"; then
43615   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43616 else
43617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43618 for as_dir in $PATH
43619 do
43620   IFS=$as_save_IFS
43621   test -z "$as_dir" && as_dir=.
43622     for ac_exec_ext in '' $ac_executable_extensions; do
43623   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43624     ac_cv_prog_ac_ct_NM="$ac_prog"
43625     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43626     break 2
43627   fi
43628 done
43629   done
43630 IFS=$as_save_IFS
43631 
43632 fi
43633 fi
43634 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43635 if test -n "$ac_ct_NM"; then
43636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43637 $as_echo "$ac_ct_NM" >&6; }
43638 else
43639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43640 $as_echo "no" >&6; }
43641 fi
43642 
43643 
43644   test -n "$ac_ct_NM" && break
43645 done
43646 
43647   if test "x$ac_ct_NM" = x; then
43648     NM=""
43649   else
43650     case $cross_compiling:$ac_tool_warned in
43651 yes:)
43652 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43653 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43654 ac_tool_warned=yes ;;
43655 esac
43656     NM=$ac_ct_NM
43657   fi
43658 fi
43659 
43660     else
43661       # If it succeeded, then it was overridden by the user. We will use it
43662       # for the tool.
43663 
43664       # First remove it from the list of overridden variables, so we can test
43665       # for unknown variables in the end.
43666       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43667 
43668       # Check if we try to supply an empty value
43669       if test "x$NM" = x; then
43670         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43671 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43672         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43673 $as_echo_n "checking for NM... " >&6; }
43674         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43675 $as_echo "disabled" >&6; }
43676       else
43677         # Check if the provided tool contains a complete path.
43678         tool_specified="$NM"
43679         tool_basename="${tool_specified##*/}"
43680         if test "x$tool_basename" = "x$tool_specified"; then
43681           # A command without a complete path is provided, search $PATH.
43682           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43683 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43684           # Extract the first word of "$tool_basename", so it can be a program name with args.
43685 set dummy $tool_basename; ac_word=$2
43686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43687 $as_echo_n "checking for $ac_word... " >&6; }
43688 if ${ac_cv_path_NM+:} false; then :
43689   $as_echo_n "(cached) " >&6
43690 else
43691   case $NM in
43692   [\\/]* | ?:[\\/]*)
43693   ac_cv_path_NM="$NM" # Let the user override the test with a path.
43694   ;;
43695   *)
43696   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43697 for as_dir in $PATH
43698 do
43699   IFS=$as_save_IFS
43700   test -z "$as_dir" && as_dir=.
43701     for ac_exec_ext in '' $ac_executable_extensions; do
43702   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43703     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43704     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43705     break 2
43706   fi
43707 done
43708   done
43709 IFS=$as_save_IFS
43710 
43711   ;;
43712 esac
43713 fi
43714 NM=$ac_cv_path_NM
43715 if test -n "$NM"; then
43716   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43717 $as_echo "$NM" >&6; }
43718 else
43719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43720 $as_echo "no" >&6; }
43721 fi
43722 
43723 
43724           if test "x$NM" = x; then
43725             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43726           fi
43727         else
43728           # Otherwise we believe it is a complete path. Use it as it is.
43729           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43730 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43731           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43732 $as_echo_n "checking for NM... " >&6; }
43733           if test ! -x "$tool_specified"; then
43734             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43735 $as_echo "not found" >&6; }
43736             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43737           fi
43738           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43739 $as_echo "$tool_specified" >&6; }
43740         fi
43741       fi
43742     fi
43743 
43744   fi
43745 
43746 
43747     else
43748 
43749 
43750   # Publish this variable in the help.
43751 
43752 
43753   if [ -z "${NM+x}" ]; then
43754     # The variable is not set by user, try to locate tool using the code snippet
43755     if test -n "$ac_tool_prefix"; then
43756   for ac_prog in nm
43757   do
43758     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43759 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43761 $as_echo_n "checking for $ac_word... " >&6; }
43762 if ${ac_cv_prog_NM+:} false; then :
43763   $as_echo_n "(cached) " >&6
43764 else
43765   if test -n "$NM"; then
43766   ac_cv_prog_NM="$NM" # Let the user override the test.
43767 else
43768 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43769 for as_dir in $PATH
43770 do
43771   IFS=$as_save_IFS
43772   test -z "$as_dir" && as_dir=.
43773     for ac_exec_ext in '' $ac_executable_extensions; do
43774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43775     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43777     break 2
43778   fi
43779 done
43780   done
43781 IFS=$as_save_IFS
43782 
43783 fi
43784 fi
43785 NM=$ac_cv_prog_NM
43786 if test -n "$NM"; then
43787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43788 $as_echo "$NM" >&6; }
43789 else
43790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43791 $as_echo "no" >&6; }
43792 fi
43793 
43794 
43795     test -n "$NM" && break
43796   done
43797 fi
43798 if test -z "$NM"; then
43799   ac_ct_NM=$NM
43800   for ac_prog in nm
43801 do
43802   # Extract the first word of "$ac_prog", so it can be a program name with args.
43803 set dummy $ac_prog; ac_word=$2
43804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43805 $as_echo_n "checking for $ac_word... " >&6; }
43806 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43807   $as_echo_n "(cached) " >&6
43808 else
43809   if test -n "$ac_ct_NM"; then
43810   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43811 else
43812 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43813 for as_dir in $PATH
43814 do
43815   IFS=$as_save_IFS
43816   test -z "$as_dir" && as_dir=.
43817     for ac_exec_ext in '' $ac_executable_extensions; do
43818   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43819     ac_cv_prog_ac_ct_NM="$ac_prog"
43820     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43821     break 2
43822   fi
43823 done
43824   done
43825 IFS=$as_save_IFS
43826 
43827 fi
43828 fi
43829 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43830 if test -n "$ac_ct_NM"; then
43831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43832 $as_echo "$ac_ct_NM" >&6; }
43833 else
43834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43835 $as_echo "no" >&6; }
43836 fi
43837 
43838 
43839   test -n "$ac_ct_NM" && break
43840 done
43841 
43842   if test "x$ac_ct_NM" = x; then
43843     NM=""
43844   else
43845     case $cross_compiling:$ac_tool_warned in
43846 yes:)
43847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43848 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43849 ac_tool_warned=yes ;;
43850 esac
43851     NM=$ac_ct_NM
43852   fi
43853 fi
43854 
43855   else
43856     # The variable is set, but is it from the command line or the environment?
43857 
43858     # Try to remove the string !NM! from our list.
43859     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43860     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43861       # If it failed, the variable was not from the command line. Ignore it,
43862       # but warn the user (except for BASH, which is always set by the calling BASH).
43863       if test "xNM" != xBASH; then
43864         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43865 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43866       fi
43867       # Try to locate tool using the code snippet
43868       if test -n "$ac_tool_prefix"; then
43869   for ac_prog in nm
43870   do
43871     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43872 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43874 $as_echo_n "checking for $ac_word... " >&6; }
43875 if ${ac_cv_prog_NM+:} false; then :
43876   $as_echo_n "(cached) " >&6
43877 else
43878   if test -n "$NM"; then
43879   ac_cv_prog_NM="$NM" # Let the user override the test.
43880 else
43881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43882 for as_dir in $PATH
43883 do
43884   IFS=$as_save_IFS
43885   test -z "$as_dir" && as_dir=.
43886     for ac_exec_ext in '' $ac_executable_extensions; do
43887   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43888     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43889     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43890     break 2
43891   fi
43892 done
43893   done
43894 IFS=$as_save_IFS
43895 
43896 fi
43897 fi
43898 NM=$ac_cv_prog_NM
43899 if test -n "$NM"; then
43900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43901 $as_echo "$NM" >&6; }
43902 else
43903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43904 $as_echo "no" >&6; }
43905 fi
43906 
43907 
43908     test -n "$NM" && break
43909   done
43910 fi
43911 if test -z "$NM"; then
43912   ac_ct_NM=$NM
43913   for ac_prog in nm
43914 do
43915   # Extract the first word of "$ac_prog", so it can be a program name with args.
43916 set dummy $ac_prog; ac_word=$2
43917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43918 $as_echo_n "checking for $ac_word... " >&6; }
43919 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43920   $as_echo_n "(cached) " >&6
43921 else
43922   if test -n "$ac_ct_NM"; then
43923   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43924 else
43925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43926 for as_dir in $PATH
43927 do
43928   IFS=$as_save_IFS
43929   test -z "$as_dir" && as_dir=.
43930     for ac_exec_ext in '' $ac_executable_extensions; do
43931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43932     ac_cv_prog_ac_ct_NM="$ac_prog"
43933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43934     break 2
43935   fi
43936 done
43937   done
43938 IFS=$as_save_IFS
43939 
43940 fi
43941 fi
43942 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43943 if test -n "$ac_ct_NM"; then
43944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43945 $as_echo "$ac_ct_NM" >&6; }
43946 else
43947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43948 $as_echo "no" >&6; }
43949 fi
43950 
43951 
43952   test -n "$ac_ct_NM" && break
43953 done
43954 
43955   if test "x$ac_ct_NM" = x; then
43956     NM=""
43957   else
43958     case $cross_compiling:$ac_tool_warned in
43959 yes:)
43960 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43961 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43962 ac_tool_warned=yes ;;
43963 esac
43964     NM=$ac_ct_NM
43965   fi
43966 fi
43967 
43968     else
43969       # If it succeeded, then it was overridden by the user. We will use it
43970       # for the tool.
43971 
43972       # First remove it from the list of overridden variables, so we can test
43973       # for unknown variables in the end.
43974       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43975 
43976       # Check if we try to supply an empty value
43977       if test "x$NM" = x; then
43978         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43979 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43980         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43981 $as_echo_n "checking for NM... " >&6; }
43982         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43983 $as_echo "disabled" >&6; }
43984       else
43985         # Check if the provided tool contains a complete path.
43986         tool_specified="$NM"
43987         tool_basename="${tool_specified##*/}"
43988         if test "x$tool_basename" = "x$tool_specified"; then
43989           # A command without a complete path is provided, search $PATH.
43990           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43991 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43992           # Extract the first word of "$tool_basename", so it can be a program name with args.
43993 set dummy $tool_basename; ac_word=$2
43994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43995 $as_echo_n "checking for $ac_word... " >&6; }
43996 if ${ac_cv_path_NM+:} false; then :
43997   $as_echo_n "(cached) " >&6
43998 else
43999   case $NM in
44000   [\\/]* | ?:[\\/]*)
44001   ac_cv_path_NM="$NM" # Let the user override the test with a path.
44002   ;;
44003   *)
44004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44005 for as_dir in $PATH
44006 do
44007   IFS=$as_save_IFS
44008   test -z "$as_dir" && as_dir=.
44009     for ac_exec_ext in '' $ac_executable_extensions; do
44010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44011     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
44012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44013     break 2
44014   fi
44015 done
44016   done
44017 IFS=$as_save_IFS
44018 
44019   ;;
44020 esac
44021 fi
44022 NM=$ac_cv_path_NM
44023 if test -n "$NM"; then
44024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
44025 $as_echo "$NM" >&6; }
44026 else
44027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44028 $as_echo "no" >&6; }
44029 fi
44030 
44031 
44032           if test "x$NM" = x; then
44033             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44034           fi
44035         else
44036           # Otherwise we believe it is a complete path. Use it as it is.
44037           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
44038 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
44039           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
44040 $as_echo_n "checking for NM... " >&6; }
44041           if test ! -x "$tool_specified"; then
44042             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44043 $as_echo "not found" >&6; }
44044             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44045           fi
44046           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44047 $as_echo "$tool_specified" >&6; }
44048         fi
44049       fi
44050     fi
44051 
44052   fi
44053 
44054 
44055     fi
44056 
44057   # Only process if variable expands to non-empty
44058 
44059   if test "x$NM" != x; then
44060     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44061 
44062   # First separate the path from the arguments. This will split at the first
44063   # space.
44064   complete="$NM"
44065   path="${complete%% *}"
44066   tmp="$complete EOL"
44067   arguments="${tmp#* }"
44068 
44069   # Input might be given as Windows format, start by converting to
44070   # unix format.
44071   new_path=`$CYGPATH -u "$path"`
44072 
44073   # Now try to locate executable using which
44074   new_path=`$WHICH "$new_path" 2> /dev/null`
44075   # bat and cmd files are not always considered executable in cygwin causing which
44076   # to not find them
44077   if test "x$new_path" = x \
44078       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44079       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44080     new_path=`$CYGPATH -u "$path"`
44081   fi
44082   if test "x$new_path" = x; then
44083     # Oops. Which didn't find the executable.
44084     # The splitting of arguments from the executable at a space might have been incorrect,
44085     # since paths with space are more likely in Windows. Give it another try with the whole
44086     # argument.
44087     path="$complete"
44088     arguments="EOL"
44089     new_path=`$CYGPATH -u "$path"`
44090     new_path=`$WHICH "$new_path" 2> /dev/null`
44091     # bat and cmd files are not always considered executable in cygwin causing which
44092     # to not find them
44093     if test "x$new_path" = x \
44094         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44095         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44096       new_path=`$CYGPATH -u "$path"`
44097     fi
44098     if test "x$new_path" = x; then
44099       # It's still not found. Now this is an unrecoverable error.
44100       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
44101 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
44102       has_space=`$ECHO "$complete" | $GREP " "`
44103       if test "x$has_space" != x; then
44104         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44105 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44106       fi
44107       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44108     fi
44109   fi
44110 
44111   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44112   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44113   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44114   # "foo.exe" is OK but "foo" is an error.
44115   #
44116   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44117   # It is also a way to make sure we got the proper file name for the real test later on.
44118   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44119   if test "x$test_shortpath" = x; then
44120     # Short path failed, file does not exist as specified.
44121     # Try adding .exe or .cmd
44122     if test -f "${new_path}.exe"; then
44123       input_to_shortpath="${new_path}.exe"
44124     elif test -f "${new_path}.cmd"; then
44125       input_to_shortpath="${new_path}.cmd"
44126     else
44127       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
44128 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
44129       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44130 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44131       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44132     fi
44133   else
44134     input_to_shortpath="$new_path"
44135   fi
44136 
44137   # Call helper function which possibly converts this using DOS-style short mode.
44138   # If so, the updated path is stored in $new_path.
44139   new_path="$input_to_shortpath"
44140 
44141   input_path="$input_to_shortpath"
44142   # Check if we need to convert this using DOS-style short mode. If the path
44143   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44144   # take no chances and rewrite it.
44145   # Note: m4 eats our [], so we need to use [ and ] instead.
44146   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44147   if test "x$has_forbidden_chars" != x; then
44148     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44149     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44150     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44151     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44152       # Going to short mode and back again did indeed matter. Since short mode is
44153       # case insensitive, let's make it lowercase to improve readability.
44154       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44155       # Now convert it back to Unix-style (cygpath)
44156       input_path=`$CYGPATH -u "$shortmode_path"`
44157       new_path="$input_path"
44158     fi
44159   fi
44160 
44161   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44162   if test "x$test_cygdrive_prefix" = x; then
44163     # As a simple fix, exclude /usr/bin since it's not a real path.
44164     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44165       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44166       # a path prefixed by /cygdrive for fixpath to work.
44167       new_path="$CYGWIN_ROOT_PATH$input_path"
44168     fi
44169   fi
44170 
44171   # remove trailing .exe if any
44172   new_path="${new_path/%.exe/}"
44173 
44174     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44175 
44176   # First separate the path from the arguments. This will split at the first
44177   # space.
44178   complete="$NM"
44179   path="${complete%% *}"
44180   tmp="$complete EOL"
44181   arguments="${tmp#* }"
44182 
44183   # Input might be given as Windows format, start by converting to
44184   # unix format.
44185   new_path="$path"
44186 
44187   windows_path="$new_path"
44188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44189     unix_path=`$CYGPATH -u "$windows_path"`
44190     new_path="$unix_path"
44191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44193     new_path="$unix_path"
44194   fi
44195 
44196 
44197   # Now try to locate executable using which
44198   new_path=`$WHICH "$new_path" 2> /dev/null`
44199 
44200   if test "x$new_path" = x; then
44201     # Oops. Which didn't find the executable.
44202     # The splitting of arguments from the executable at a space might have been incorrect,
44203     # since paths with space are more likely in Windows. Give it another try with the whole
44204     # argument.
44205     path="$complete"
44206     arguments="EOL"
44207     new_path="$path"
44208 
44209   windows_path="$new_path"
44210   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44211     unix_path=`$CYGPATH -u "$windows_path"`
44212     new_path="$unix_path"
44213   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44214     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44215     new_path="$unix_path"
44216   fi
44217 
44218 
44219     new_path=`$WHICH "$new_path" 2> /dev/null`
44220     # bat and cmd files are not always considered executable in MSYS causing which
44221     # to not find them
44222     if test "x$new_path" = x \
44223         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44224         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44225       new_path="$path"
44226 
44227   windows_path="$new_path"
44228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44229     unix_path=`$CYGPATH -u "$windows_path"`
44230     new_path="$unix_path"
44231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44233     new_path="$unix_path"
44234   fi
44235 
44236     fi
44237 
44238     if test "x$new_path" = x; then
44239       # It's still not found. Now this is an unrecoverable error.
44240       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
44241 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
44242       has_space=`$ECHO "$complete" | $GREP " "`
44243       if test "x$has_space" != x; then
44244         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44245 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44246       fi
44247       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44248     fi
44249   fi
44250 
44251   # Now new_path has a complete unix path to the binary
44252   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44253     # Keep paths in /bin as-is, but remove trailing .exe if any
44254     new_path="${new_path/%.exe/}"
44255     # Do not save /bin paths to all_fixpath_prefixes!
44256   else
44257     # Not in mixed or Windows style, start by that.
44258     new_path=`cmd //c echo $new_path`
44259 
44260   input_path="$new_path"
44261   # Check if we need to convert this using DOS-style short mode. If the path
44262   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44263   # take no chances and rewrite it.
44264   # Note: m4 eats our [], so we need to use [ and ] instead.
44265   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44266   if test "x$has_forbidden_chars" != x; then
44267     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44268     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44269   fi
44270 
44271     # Output is in $new_path
44272 
44273   windows_path="$new_path"
44274   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44275     unix_path=`$CYGPATH -u "$windows_path"`
44276     new_path="$unix_path"
44277   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44278     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44279     new_path="$unix_path"
44280   fi
44281 
44282     # remove trailing .exe if any
44283     new_path="${new_path/%.exe/}"
44284 
44285     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44286     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44287   fi
44288 
44289     else
44290       # We're on a unix platform. Hooray! :)
44291       # First separate the path from the arguments. This will split at the first
44292       # space.
44293       complete="$NM"
44294       path="${complete%% *}"
44295       tmp="$complete EOL"
44296       arguments="${tmp#* }"
44297 
44298       # Cannot rely on the command "which" here since it doesn't always work.
44299       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44300       if test -z "$is_absolute_path"; then
44301         # Path to executable is not absolute. Find it.
44302         IFS_save="$IFS"
44303         IFS=:
44304         for p in $PATH; do
44305           if test -f "$p/$path" && test -x "$p/$path"; then
44306             new_path="$p/$path"
44307             break
44308           fi
44309         done
44310         IFS="$IFS_save"
44311       else
44312         # This is an absolute path, we can use it without further modifications.
44313         new_path="$path"
44314       fi
44315 
44316       if test "x$new_path" = x; then
44317         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
44318 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
44319         has_space=`$ECHO "$complete" | $GREP " "`
44320         if test "x$has_space" != x; then
44321           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44322 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44323         fi
44324         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44325       fi
44326     fi
44327 
44328     # Now join together the path and the arguments once again
44329     if test "x$arguments" != xEOL; then
44330       new_complete="$new_path ${arguments% *}"
44331     else
44332       new_complete="$new_path"
44333     fi
44334 
44335     if test "x$complete" != "x$new_complete"; then
44336       NM="$new_complete"
44337       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
44338 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
44339     fi
44340   fi
44341 
44342     GNM="$NM"
44343 
44344   fi
44345 
44346   # objcopy is used for moving debug symbols to separate files when
44347   # full debug symbols are enabled.
44348   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
44349 
44350 
44351   # Publish this variable in the help.
44352 
44353 
44354   if [ -z "${OBJCOPY+x}" ]; then
44355     # The variable is not set by user, try to locate tool using the code snippet
44356     if test -n "$ac_tool_prefix"; then
44357   for ac_prog in gobjcopy objcopy
44358   do
44359     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44360 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44362 $as_echo_n "checking for $ac_word... " >&6; }
44363 if ${ac_cv_prog_OBJCOPY+:} false; then :
44364   $as_echo_n "(cached) " >&6
44365 else
44366   if test -n "$OBJCOPY"; then
44367   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
44368 else
44369 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44370 for as_dir in $PATH
44371 do
44372   IFS=$as_save_IFS
44373   test -z "$as_dir" && as_dir=.
44374     for ac_exec_ext in '' $ac_executable_extensions; do
44375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44376     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
44377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44378     break 2
44379   fi
44380 done
44381   done
44382 IFS=$as_save_IFS
44383 
44384 fi
44385 fi
44386 OBJCOPY=$ac_cv_prog_OBJCOPY
44387 if test -n "$OBJCOPY"; then
44388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
44389 $as_echo "$OBJCOPY" >&6; }
44390 else
44391   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44392 $as_echo "no" >&6; }
44393 fi
44394 
44395 
44396     test -n "$OBJCOPY" && break
44397   done
44398 fi
44399 if test -z "$OBJCOPY"; then
44400   ac_ct_OBJCOPY=$OBJCOPY
44401   for ac_prog in gobjcopy objcopy
44402 do
44403   # Extract the first word of "$ac_prog", so it can be a program name with args.
44404 set dummy $ac_prog; ac_word=$2
44405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44406 $as_echo_n "checking for $ac_word... " >&6; }
44407 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
44408   $as_echo_n "(cached) " >&6
44409 else
44410   if test -n "$ac_ct_OBJCOPY"; then
44411   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
44412 else
44413 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44414 for as_dir in $PATH
44415 do
44416   IFS=$as_save_IFS
44417   test -z "$as_dir" && as_dir=.
44418     for ac_exec_ext in '' $ac_executable_extensions; do
44419   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44420     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
44421     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44422     break 2
44423   fi
44424 done
44425   done
44426 IFS=$as_save_IFS
44427 
44428 fi
44429 fi
44430 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
44431 if test -n "$ac_ct_OBJCOPY"; then
44432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
44433 $as_echo "$ac_ct_OBJCOPY" >&6; }
44434 else
44435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44436 $as_echo "no" >&6; }
44437 fi
44438 
44439 
44440   test -n "$ac_ct_OBJCOPY" && break
44441 done
44442 
44443   if test "x$ac_ct_OBJCOPY" = x; then
44444     OBJCOPY=""
44445   else
44446     case $cross_compiling:$ac_tool_warned in
44447 yes:)
44448 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44449 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44450 ac_tool_warned=yes ;;
44451 esac
44452     OBJCOPY=$ac_ct_OBJCOPY
44453   fi
44454 fi
44455 
44456   else
44457     # The variable is set, but is it from the command line or the environment?
44458 
44459     # Try to remove the string !OBJCOPY! from our list.
44460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
44461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44462       # If it failed, the variable was not from the command line. Ignore it,
44463       # but warn the user (except for BASH, which is always set by the calling BASH).
44464       if test "xOBJCOPY" != xBASH; then
44465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
44466 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
44467       fi
44468       # Try to locate tool using the code snippet
44469       if test -n "$ac_tool_prefix"; then
44470   for ac_prog in gobjcopy objcopy
44471   do
44472     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44473 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44475 $as_echo_n "checking for $ac_word... " >&6; }
44476 if ${ac_cv_prog_OBJCOPY+:} false; then :
44477   $as_echo_n "(cached) " >&6
44478 else
44479   if test -n "$OBJCOPY"; then
44480   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
44481 else
44482 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44483 for as_dir in $PATH
44484 do
44485   IFS=$as_save_IFS
44486   test -z "$as_dir" && as_dir=.
44487     for ac_exec_ext in '' $ac_executable_extensions; do
44488   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44489     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
44490     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44491     break 2
44492   fi
44493 done
44494   done
44495 IFS=$as_save_IFS
44496 
44497 fi
44498 fi
44499 OBJCOPY=$ac_cv_prog_OBJCOPY
44500 if test -n "$OBJCOPY"; then
44501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
44502 $as_echo "$OBJCOPY" >&6; }
44503 else
44504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44505 $as_echo "no" >&6; }
44506 fi
44507 
44508 
44509     test -n "$OBJCOPY" && break
44510   done
44511 fi
44512 if test -z "$OBJCOPY"; then
44513   ac_ct_OBJCOPY=$OBJCOPY
44514   for ac_prog in gobjcopy objcopy
44515 do
44516   # Extract the first word of "$ac_prog", so it can be a program name with args.
44517 set dummy $ac_prog; ac_word=$2
44518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44519 $as_echo_n "checking for $ac_word... " >&6; }
44520 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
44521   $as_echo_n "(cached) " >&6
44522 else
44523   if test -n "$ac_ct_OBJCOPY"; then
44524   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
44525 else
44526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44527 for as_dir in $PATH
44528 do
44529   IFS=$as_save_IFS
44530   test -z "$as_dir" && as_dir=.
44531     for ac_exec_ext in '' $ac_executable_extensions; do
44532   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44533     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
44534     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44535     break 2
44536   fi
44537 done
44538   done
44539 IFS=$as_save_IFS
44540 
44541 fi
44542 fi
44543 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
44544 if test -n "$ac_ct_OBJCOPY"; then
44545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
44546 $as_echo "$ac_ct_OBJCOPY" >&6; }
44547 else
44548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44549 $as_echo "no" >&6; }
44550 fi
44551 
44552 
44553   test -n "$ac_ct_OBJCOPY" && break
44554 done
44555 
44556   if test "x$ac_ct_OBJCOPY" = x; then
44557     OBJCOPY=""
44558   else
44559     case $cross_compiling:$ac_tool_warned in
44560 yes:)
44561 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44562 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44563 ac_tool_warned=yes ;;
44564 esac
44565     OBJCOPY=$ac_ct_OBJCOPY
44566   fi
44567 fi
44568 
44569     else
44570       # If it succeeded, then it was overridden by the user. We will use it
44571       # for the tool.
44572 
44573       # First remove it from the list of overridden variables, so we can test
44574       # for unknown variables in the end.
44575       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44576 
44577       # Check if we try to supply an empty value
44578       if test "x$OBJCOPY" = x; then
44579         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
44580 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
44581         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
44582 $as_echo_n "checking for OBJCOPY... " >&6; }
44583         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44584 $as_echo "disabled" >&6; }
44585       else
44586         # Check if the provided tool contains a complete path.
44587         tool_specified="$OBJCOPY"
44588         tool_basename="${tool_specified##*/}"
44589         if test "x$tool_basename" = "x$tool_specified"; then
44590           # A command without a complete path is provided, search $PATH.
44591           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
44592 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
44593           # Extract the first word of "$tool_basename", so it can be a program name with args.
44594 set dummy $tool_basename; ac_word=$2
44595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44596 $as_echo_n "checking for $ac_word... " >&6; }
44597 if ${ac_cv_path_OBJCOPY+:} false; then :
44598   $as_echo_n "(cached) " >&6
44599 else
44600   case $OBJCOPY in
44601   [\\/]* | ?:[\\/]*)
44602   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
44603   ;;
44604   *)
44605   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44606 for as_dir in $PATH
44607 do
44608   IFS=$as_save_IFS
44609   test -z "$as_dir" && as_dir=.
44610     for ac_exec_ext in '' $ac_executable_extensions; do
44611   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44612     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
44613     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44614     break 2
44615   fi
44616 done
44617   done
44618 IFS=$as_save_IFS
44619 
44620   ;;
44621 esac
44622 fi
44623 OBJCOPY=$ac_cv_path_OBJCOPY
44624 if test -n "$OBJCOPY"; then
44625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
44626 $as_echo "$OBJCOPY" >&6; }
44627 else
44628   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44629 $as_echo "no" >&6; }
44630 fi
44631 
44632 
44633           if test "x$OBJCOPY" = x; then
44634             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44635           fi
44636         else
44637           # Otherwise we believe it is a complete path. Use it as it is.
44638           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
44639 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
44640           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
44641 $as_echo_n "checking for OBJCOPY... " >&6; }
44642           if test ! -x "$tool_specified"; then
44643             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44644 $as_echo "not found" >&6; }
44645             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
44646           fi
44647           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44648 $as_echo "$tool_specified" >&6; }
44649         fi
44650       fi
44651     fi
44652 
44653   fi
44654 
44655 
44656     # Only call fixup if objcopy was found.
44657     if test -n "$OBJCOPY"; then
44658 
44659   # Only process if variable expands to non-empty
44660 
44661   if test "x$OBJCOPY" != x; then
44662     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44663 
44664   # First separate the path from the arguments. This will split at the first
44665   # space.
44666   complete="$OBJCOPY"
44667   path="${complete%% *}"
44668   tmp="$complete EOL"
44669   arguments="${tmp#* }"
44670 
44671   # Input might be given as Windows format, start by converting to
44672   # unix format.
44673   new_path=`$CYGPATH -u "$path"`
44674 
44675   # Now try to locate executable using which
44676   new_path=`$WHICH "$new_path" 2> /dev/null`
44677   # bat and cmd files are not always considered executable in cygwin causing which
44678   # to not find them
44679   if test "x$new_path" = x \
44680       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44681       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44682     new_path=`$CYGPATH -u "$path"`
44683   fi
44684   if test "x$new_path" = x; then
44685     # Oops. Which didn't find the executable.
44686     # The splitting of arguments from the executable at a space might have been incorrect,
44687     # since paths with space are more likely in Windows. Give it another try with the whole
44688     # argument.
44689     path="$complete"
44690     arguments="EOL"
44691     new_path=`$CYGPATH -u "$path"`
44692     new_path=`$WHICH "$new_path" 2> /dev/null`
44693     # bat and cmd files are not always considered executable in cygwin causing which
44694     # to not find them
44695     if test "x$new_path" = x \
44696         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44697         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44698       new_path=`$CYGPATH -u "$path"`
44699     fi
44700     if test "x$new_path" = x; then
44701       # It's still not found. Now this is an unrecoverable error.
44702       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44703 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44704       has_space=`$ECHO "$complete" | $GREP " "`
44705       if test "x$has_space" != x; then
44706         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44707 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44708       fi
44709       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44710     fi
44711   fi
44712 
44713   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44714   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44715   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44716   # "foo.exe" is OK but "foo" is an error.
44717   #
44718   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44719   # It is also a way to make sure we got the proper file name for the real test later on.
44720   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44721   if test "x$test_shortpath" = x; then
44722     # Short path failed, file does not exist as specified.
44723     # Try adding .exe or .cmd
44724     if test -f "${new_path}.exe"; then
44725       input_to_shortpath="${new_path}.exe"
44726     elif test -f "${new_path}.cmd"; then
44727       input_to_shortpath="${new_path}.cmd"
44728     else
44729       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
44730 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
44731       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44732 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44733       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44734     fi
44735   else
44736     input_to_shortpath="$new_path"
44737   fi
44738 
44739   # Call helper function which possibly converts this using DOS-style short mode.
44740   # If so, the updated path is stored in $new_path.
44741   new_path="$input_to_shortpath"
44742 
44743   input_path="$input_to_shortpath"
44744   # Check if we need to convert this using DOS-style short mode. If the path
44745   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44746   # take no chances and rewrite it.
44747   # Note: m4 eats our [], so we need to use [ and ] instead.
44748   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44749   if test "x$has_forbidden_chars" != x; then
44750     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44751     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44752     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44753     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44754       # Going to short mode and back again did indeed matter. Since short mode is
44755       # case insensitive, let's make it lowercase to improve readability.
44756       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44757       # Now convert it back to Unix-style (cygpath)
44758       input_path=`$CYGPATH -u "$shortmode_path"`
44759       new_path="$input_path"
44760     fi
44761   fi
44762 
44763   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44764   if test "x$test_cygdrive_prefix" = x; then
44765     # As a simple fix, exclude /usr/bin since it's not a real path.
44766     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44767       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44768       # a path prefixed by /cygdrive for fixpath to work.
44769       new_path="$CYGWIN_ROOT_PATH$input_path"
44770     fi
44771   fi
44772 
44773   # remove trailing .exe if any
44774   new_path="${new_path/%.exe/}"
44775 
44776     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44777 
44778   # First separate the path from the arguments. This will split at the first
44779   # space.
44780   complete="$OBJCOPY"
44781   path="${complete%% *}"
44782   tmp="$complete EOL"
44783   arguments="${tmp#* }"
44784 
44785   # Input might be given as Windows format, start by converting to
44786   # unix format.
44787   new_path="$path"
44788 
44789   windows_path="$new_path"
44790   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44791     unix_path=`$CYGPATH -u "$windows_path"`
44792     new_path="$unix_path"
44793   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44794     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44795     new_path="$unix_path"
44796   fi
44797 
44798 
44799   # Now try to locate executable using which
44800   new_path=`$WHICH "$new_path" 2> /dev/null`
44801 
44802   if test "x$new_path" = x; then
44803     # Oops. Which didn't find the executable.
44804     # The splitting of arguments from the executable at a space might have been incorrect,
44805     # since paths with space are more likely in Windows. Give it another try with the whole
44806     # argument.
44807     path="$complete"
44808     arguments="EOL"
44809     new_path="$path"
44810 
44811   windows_path="$new_path"
44812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44813     unix_path=`$CYGPATH -u "$windows_path"`
44814     new_path="$unix_path"
44815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44817     new_path="$unix_path"
44818   fi
44819 
44820 
44821     new_path=`$WHICH "$new_path" 2> /dev/null`
44822     # bat and cmd files are not always considered executable in MSYS causing which
44823     # to not find them
44824     if test "x$new_path" = x \
44825         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44826         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44827       new_path="$path"
44828 
44829   windows_path="$new_path"
44830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44831     unix_path=`$CYGPATH -u "$windows_path"`
44832     new_path="$unix_path"
44833   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44834     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44835     new_path="$unix_path"
44836   fi
44837 
44838     fi
44839 
44840     if test "x$new_path" = x; then
44841       # It's still not found. Now this is an unrecoverable error.
44842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44843 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44844       has_space=`$ECHO "$complete" | $GREP " "`
44845       if test "x$has_space" != x; then
44846         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44847 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44848       fi
44849       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44850     fi
44851   fi
44852 
44853   # Now new_path has a complete unix path to the binary
44854   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44855     # Keep paths in /bin as-is, but remove trailing .exe if any
44856     new_path="${new_path/%.exe/}"
44857     # Do not save /bin paths to all_fixpath_prefixes!
44858   else
44859     # Not in mixed or Windows style, start by that.
44860     new_path=`cmd //c echo $new_path`
44861 
44862   input_path="$new_path"
44863   # Check if we need to convert this using DOS-style short mode. If the path
44864   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44865   # take no chances and rewrite it.
44866   # Note: m4 eats our [], so we need to use [ and ] instead.
44867   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44868   if test "x$has_forbidden_chars" != x; then
44869     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44870     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44871   fi
44872 
44873     # Output is in $new_path
44874 
44875   windows_path="$new_path"
44876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44877     unix_path=`$CYGPATH -u "$windows_path"`
44878     new_path="$unix_path"
44879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44881     new_path="$unix_path"
44882   fi
44883 
44884     # remove trailing .exe if any
44885     new_path="${new_path/%.exe/}"
44886 
44887     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44888     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44889   fi
44890 
44891     else
44892       # We're on a unix platform. Hooray! :)
44893       # First separate the path from the arguments. This will split at the first
44894       # space.
44895       complete="$OBJCOPY"
44896       path="${complete%% *}"
44897       tmp="$complete EOL"
44898       arguments="${tmp#* }"
44899 
44900       # Cannot rely on the command "which" here since it doesn't always work.
44901       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44902       if test -z "$is_absolute_path"; then
44903         # Path to executable is not absolute. Find it.
44904         IFS_save="$IFS"
44905         IFS=:
44906         for p in $PATH; do
44907           if test -f "$p/$path" && test -x "$p/$path"; then
44908             new_path="$p/$path"
44909             break
44910           fi
44911         done
44912         IFS="$IFS_save"
44913       else
44914         # This is an absolute path, we can use it without further modifications.
44915         new_path="$path"
44916       fi
44917 
44918       if test "x$new_path" = x; then
44919         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44920 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44921         has_space=`$ECHO "$complete" | $GREP " "`
44922         if test "x$has_space" != x; then
44923           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44924 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44925         fi
44926         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44927       fi
44928     fi
44929 
44930     # Now join together the path and the arguments once again
44931     if test "x$arguments" != xEOL; then
44932       new_complete="$new_path ${arguments% *}"
44933     else
44934       new_complete="$new_path"
44935     fi
44936 
44937     if test "x$complete" != "x$new_complete"; then
44938       OBJCOPY="$new_complete"
44939       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44940 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44941     fi
44942   fi
44943 
44944       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44945         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44946         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44947         # - version number is last blank separate word on first line
44948         # - version number formats that have been seen:
44949         #   - <major>.<minor>
44950         #   - <major>.<minor>.<micro>
44951         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44952         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44953          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44954               -e 's/.* //' \
44955               -e '/^[01]\./b bad' \
44956               -e '/^2\./{' \
44957               -e '  s/^2\.//' \
44958               -e '  /^[0-9]$/b bad' \
44959               -e '  /^[0-9]\./b bad' \
44960               -e '  /^1[0-9]$/b bad' \
44961               -e '  /^1[0-9]\./b bad' \
44962               -e '  /^20\./b bad' \
44963               -e '  /^21\.0$/b bad' \
44964               -e '  /^21\.0\./b bad' \
44965               -e '}' \
44966               -e ':good' \
44967               -e 's/.*/VALID_VERSION/p' \
44968               -e 'q' \
44969               -e ':bad' \
44970               -e 's/.*/BAD_VERSION/p' \
44971               -e 'q'`
44972         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44973           OBJCOPY=
44974           { $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
44975 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44976           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44977 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44978           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44979 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44980           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44981 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44982           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44983 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44984         fi
44985       fi
44986     fi
44987   fi
44988 
44989 
44990 
44991   # Publish this variable in the help.
44992 
44993 
44994   if [ -z "${OBJDUMP+x}" ]; then
44995     # The variable is not set by user, try to locate tool using the code snippet
44996     if test -n "$ac_tool_prefix"; then
44997   for ac_prog in gobjdump objdump
44998   do
44999     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
45000 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
45001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45002 $as_echo_n "checking for $ac_word... " >&6; }
45003 if ${ac_cv_prog_OBJDUMP+:} false; then :
45004   $as_echo_n "(cached) " >&6
45005 else
45006   if test -n "$OBJDUMP"; then
45007   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
45008 else
45009 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45010 for as_dir in $PATH
45011 do
45012   IFS=$as_save_IFS
45013   test -z "$as_dir" && as_dir=.
45014     for ac_exec_ext in '' $ac_executable_extensions; do
45015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45016     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
45017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45018     break 2
45019   fi
45020 done
45021   done
45022 IFS=$as_save_IFS
45023 
45024 fi
45025 fi
45026 OBJDUMP=$ac_cv_prog_OBJDUMP
45027 if test -n "$OBJDUMP"; then
45028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
45029 $as_echo "$OBJDUMP" >&6; }
45030 else
45031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45032 $as_echo "no" >&6; }
45033 fi
45034 
45035 
45036     test -n "$OBJDUMP" && break
45037   done
45038 fi
45039 if test -z "$OBJDUMP"; then
45040   ac_ct_OBJDUMP=$OBJDUMP
45041   for ac_prog in gobjdump objdump
45042 do
45043   # Extract the first word of "$ac_prog", so it can be a program name with args.
45044 set dummy $ac_prog; ac_word=$2
45045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45046 $as_echo_n "checking for $ac_word... " >&6; }
45047 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
45048   $as_echo_n "(cached) " >&6
45049 else
45050   if test -n "$ac_ct_OBJDUMP"; then
45051   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
45052 else
45053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45054 for as_dir in $PATH
45055 do
45056   IFS=$as_save_IFS
45057   test -z "$as_dir" && as_dir=.
45058     for ac_exec_ext in '' $ac_executable_extensions; do
45059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45060     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
45061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45062     break 2
45063   fi
45064 done
45065   done
45066 IFS=$as_save_IFS
45067 
45068 fi
45069 fi
45070 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
45071 if test -n "$ac_ct_OBJDUMP"; then
45072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
45073 $as_echo "$ac_ct_OBJDUMP" >&6; }
45074 else
45075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45076 $as_echo "no" >&6; }
45077 fi
45078 
45079 
45080   test -n "$ac_ct_OBJDUMP" && break
45081 done
45082 
45083   if test "x$ac_ct_OBJDUMP" = x; then
45084     OBJDUMP=""
45085   else
45086     case $cross_compiling:$ac_tool_warned in
45087 yes:)
45088 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
45089 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
45090 ac_tool_warned=yes ;;
45091 esac
45092     OBJDUMP=$ac_ct_OBJDUMP
45093   fi
45094 fi
45095 
45096   else
45097     # The variable is set, but is it from the command line or the environment?
45098 
45099     # Try to remove the string !OBJDUMP! from our list.
45100     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
45101     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45102       # If it failed, the variable was not from the command line. Ignore it,
45103       # but warn the user (except for BASH, which is always set by the calling BASH).
45104       if test "xOBJDUMP" != xBASH; then
45105         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
45106 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
45107       fi
45108       # Try to locate tool using the code snippet
45109       if test -n "$ac_tool_prefix"; then
45110   for ac_prog in gobjdump objdump
45111   do
45112     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
45113 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
45114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45115 $as_echo_n "checking for $ac_word... " >&6; }
45116 if ${ac_cv_prog_OBJDUMP+:} false; then :
45117   $as_echo_n "(cached) " >&6
45118 else
45119   if test -n "$OBJDUMP"; then
45120   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
45121 else
45122 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45123 for as_dir in $PATH
45124 do
45125   IFS=$as_save_IFS
45126   test -z "$as_dir" && as_dir=.
45127     for ac_exec_ext in '' $ac_executable_extensions; do
45128   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45129     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
45130     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45131     break 2
45132   fi
45133 done
45134   done
45135 IFS=$as_save_IFS
45136 
45137 fi
45138 fi
45139 OBJDUMP=$ac_cv_prog_OBJDUMP
45140 if test -n "$OBJDUMP"; then
45141   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
45142 $as_echo "$OBJDUMP" >&6; }
45143 else
45144   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45145 $as_echo "no" >&6; }
45146 fi
45147 
45148 
45149     test -n "$OBJDUMP" && break
45150   done
45151 fi
45152 if test -z "$OBJDUMP"; then
45153   ac_ct_OBJDUMP=$OBJDUMP
45154   for ac_prog in gobjdump objdump
45155 do
45156   # Extract the first word of "$ac_prog", so it can be a program name with args.
45157 set dummy $ac_prog; 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_prog_ac_ct_OBJDUMP+:} false; then :
45161   $as_echo_n "(cached) " >&6
45162 else
45163   if test -n "$ac_ct_OBJDUMP"; then
45164   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
45165 else
45166 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45167 for as_dir in $PATH
45168 do
45169   IFS=$as_save_IFS
45170   test -z "$as_dir" && as_dir=.
45171     for ac_exec_ext in '' $ac_executable_extensions; do
45172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45173     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
45174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45175     break 2
45176   fi
45177 done
45178   done
45179 IFS=$as_save_IFS
45180 
45181 fi
45182 fi
45183 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
45184 if test -n "$ac_ct_OBJDUMP"; then
45185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
45186 $as_echo "$ac_ct_OBJDUMP" >&6; }
45187 else
45188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45189 $as_echo "no" >&6; }
45190 fi
45191 
45192 
45193   test -n "$ac_ct_OBJDUMP" && break
45194 done
45195 
45196   if test "x$ac_ct_OBJDUMP" = x; then
45197     OBJDUMP=""
45198   else
45199     case $cross_compiling:$ac_tool_warned in
45200 yes:)
45201 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
45202 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
45203 ac_tool_warned=yes ;;
45204 esac
45205     OBJDUMP=$ac_ct_OBJDUMP
45206   fi
45207 fi
45208 
45209     else
45210       # If it succeeded, then it was overridden by the user. We will use it
45211       # for the tool.
45212 
45213       # First remove it from the list of overridden variables, so we can test
45214       # for unknown variables in the end.
45215       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45216 
45217       # Check if we try to supply an empty value
45218       if test "x$OBJDUMP" = x; then
45219         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
45220 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
45221         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
45222 $as_echo_n "checking for OBJDUMP... " >&6; }
45223         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45224 $as_echo "disabled" >&6; }
45225       else
45226         # Check if the provided tool contains a complete path.
45227         tool_specified="$OBJDUMP"
45228         tool_basename="${tool_specified##*/}"
45229         if test "x$tool_basename" = "x$tool_specified"; then
45230           # A command without a complete path is provided, search $PATH.
45231           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
45232 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
45233           # Extract the first word of "$tool_basename", so it can be a program name with args.
45234 set dummy $tool_basename; ac_word=$2
45235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45236 $as_echo_n "checking for $ac_word... " >&6; }
45237 if ${ac_cv_path_OBJDUMP+:} false; then :
45238   $as_echo_n "(cached) " >&6
45239 else
45240   case $OBJDUMP in
45241   [\\/]* | ?:[\\/]*)
45242   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
45243   ;;
45244   *)
45245   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45246 for as_dir in $PATH
45247 do
45248   IFS=$as_save_IFS
45249   test -z "$as_dir" && as_dir=.
45250     for ac_exec_ext in '' $ac_executable_extensions; do
45251   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45252     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
45253     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45254     break 2
45255   fi
45256 done
45257   done
45258 IFS=$as_save_IFS
45259 
45260   ;;
45261 esac
45262 fi
45263 OBJDUMP=$ac_cv_path_OBJDUMP
45264 if test -n "$OBJDUMP"; then
45265   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
45266 $as_echo "$OBJDUMP" >&6; }
45267 else
45268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45269 $as_echo "no" >&6; }
45270 fi
45271 
45272 
45273           if test "x$OBJDUMP" = x; then
45274             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45275           fi
45276         else
45277           # Otherwise we believe it is a complete path. Use it as it is.
45278           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
45279 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
45280           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
45281 $as_echo_n "checking for OBJDUMP... " >&6; }
45282           if test ! -x "$tool_specified"; then
45283             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45284 $as_echo "not found" >&6; }
45285             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
45286           fi
45287           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45288 $as_echo "$tool_specified" >&6; }
45289         fi
45290       fi
45291     fi
45292 
45293   fi
45294 
45295 
45296   if test "x$OBJDUMP" != x; then
45297     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
45298     # bails if argument is missing.
45299 
45300   # Only process if variable expands to non-empty
45301 
45302   if test "x$OBJDUMP" != x; then
45303     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45304 
45305   # First separate the path from the arguments. This will split at the first
45306   # space.
45307   complete="$OBJDUMP"
45308   path="${complete%% *}"
45309   tmp="$complete EOL"
45310   arguments="${tmp#* }"
45311 
45312   # Input might be given as Windows format, start by converting to
45313   # unix format.
45314   new_path=`$CYGPATH -u "$path"`
45315 
45316   # Now try to locate executable using which
45317   new_path=`$WHICH "$new_path" 2> /dev/null`
45318   # bat and cmd files are not always considered executable in cygwin causing which
45319   # to not find them
45320   if test "x$new_path" = x \
45321       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45322       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45323     new_path=`$CYGPATH -u "$path"`
45324   fi
45325   if test "x$new_path" = x; then
45326     # Oops. Which didn't find the executable.
45327     # The splitting of arguments from the executable at a space might have been incorrect,
45328     # since paths with space are more likely in Windows. Give it another try with the whole
45329     # argument.
45330     path="$complete"
45331     arguments="EOL"
45332     new_path=`$CYGPATH -u "$path"`
45333     new_path=`$WHICH "$new_path" 2> /dev/null`
45334     # bat and cmd files are not always considered executable in cygwin causing which
45335     # to not find them
45336     if test "x$new_path" = x \
45337         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45338         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45339       new_path=`$CYGPATH -u "$path"`
45340     fi
45341     if test "x$new_path" = x; then
45342       # It's still not found. Now this is an unrecoverable error.
45343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
45344 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
45345       has_space=`$ECHO "$complete" | $GREP " "`
45346       if test "x$has_space" != x; then
45347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45349       fi
45350       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45351     fi
45352   fi
45353 
45354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45357   # "foo.exe" is OK but "foo" is an error.
45358   #
45359   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45360   # It is also a way to make sure we got the proper file name for the real test later on.
45361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45362   if test "x$test_shortpath" = x; then
45363     # Short path failed, file does not exist as specified.
45364     # Try adding .exe or .cmd
45365     if test -f "${new_path}.exe"; then
45366       input_to_shortpath="${new_path}.exe"
45367     elif test -f "${new_path}.cmd"; then
45368       input_to_shortpath="${new_path}.cmd"
45369     else
45370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
45371 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
45372       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45373 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45374       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45375     fi
45376   else
45377     input_to_shortpath="$new_path"
45378   fi
45379 
45380   # Call helper function which possibly converts this using DOS-style short mode.
45381   # If so, the updated path is stored in $new_path.
45382   new_path="$input_to_shortpath"
45383 
45384   input_path="$input_to_shortpath"
45385   # Check if we need to convert this using DOS-style short mode. If the path
45386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45387   # take no chances and rewrite it.
45388   # Note: m4 eats our [], so we need to use [ and ] instead.
45389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45390   if test "x$has_forbidden_chars" != x; then
45391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45395       # Going to short mode and back again did indeed matter. Since short mode is
45396       # case insensitive, let's make it lowercase to improve readability.
45397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45398       # Now convert it back to Unix-style (cygpath)
45399       input_path=`$CYGPATH -u "$shortmode_path"`
45400       new_path="$input_path"
45401     fi
45402   fi
45403 
45404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45405   if test "x$test_cygdrive_prefix" = x; then
45406     # As a simple fix, exclude /usr/bin since it's not a real path.
45407     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45409       # a path prefixed by /cygdrive for fixpath to work.
45410       new_path="$CYGWIN_ROOT_PATH$input_path"
45411     fi
45412   fi
45413 
45414   # remove trailing .exe if any
45415   new_path="${new_path/%.exe/}"
45416 
45417     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45418 
45419   # First separate the path from the arguments. This will split at the first
45420   # space.
45421   complete="$OBJDUMP"
45422   path="${complete%% *}"
45423   tmp="$complete EOL"
45424   arguments="${tmp#* }"
45425 
45426   # Input might be given as Windows format, start by converting to
45427   # unix format.
45428   new_path="$path"
45429 
45430   windows_path="$new_path"
45431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45432     unix_path=`$CYGPATH -u "$windows_path"`
45433     new_path="$unix_path"
45434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45436     new_path="$unix_path"
45437   fi
45438 
45439 
45440   # Now try to locate executable using which
45441   new_path=`$WHICH "$new_path" 2> /dev/null`
45442 
45443   if test "x$new_path" = x; then
45444     # Oops. Which didn't find the executable.
45445     # The splitting of arguments from the executable at a space might have been incorrect,
45446     # since paths with space are more likely in Windows. Give it another try with the whole
45447     # argument.
45448     path="$complete"
45449     arguments="EOL"
45450     new_path="$path"
45451 
45452   windows_path="$new_path"
45453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45454     unix_path=`$CYGPATH -u "$windows_path"`
45455     new_path="$unix_path"
45456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45458     new_path="$unix_path"
45459   fi
45460 
45461 
45462     new_path=`$WHICH "$new_path" 2> /dev/null`
45463     # bat and cmd files are not always considered executable in MSYS causing which
45464     # to not find them
45465     if test "x$new_path" = x \
45466         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45467         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45468       new_path="$path"
45469 
45470   windows_path="$new_path"
45471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45472     unix_path=`$CYGPATH -u "$windows_path"`
45473     new_path="$unix_path"
45474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45476     new_path="$unix_path"
45477   fi
45478 
45479     fi
45480 
45481     if test "x$new_path" = x; then
45482       # It's still not found. Now this is an unrecoverable error.
45483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
45484 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
45485       has_space=`$ECHO "$complete" | $GREP " "`
45486       if test "x$has_space" != x; then
45487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45489       fi
45490       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45491     fi
45492   fi
45493 
45494   # Now new_path has a complete unix path to the binary
45495   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45496     # Keep paths in /bin as-is, but remove trailing .exe if any
45497     new_path="${new_path/%.exe/}"
45498     # Do not save /bin paths to all_fixpath_prefixes!
45499   else
45500     # Not in mixed or Windows style, start by that.
45501     new_path=`cmd //c echo $new_path`
45502 
45503   input_path="$new_path"
45504   # Check if we need to convert this using DOS-style short mode. If the path
45505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45506   # take no chances and rewrite it.
45507   # Note: m4 eats our [], so we need to use [ and ] instead.
45508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45509   if test "x$has_forbidden_chars" != x; then
45510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45511     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45512   fi
45513 
45514     # Output is in $new_path
45515 
45516   windows_path="$new_path"
45517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45518     unix_path=`$CYGPATH -u "$windows_path"`
45519     new_path="$unix_path"
45520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45522     new_path="$unix_path"
45523   fi
45524 
45525     # remove trailing .exe if any
45526     new_path="${new_path/%.exe/}"
45527 
45528     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45529     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45530   fi
45531 
45532     else
45533       # We're on a unix platform. Hooray! :)
45534       # First separate the path from the arguments. This will split at the first
45535       # space.
45536       complete="$OBJDUMP"
45537       path="${complete%% *}"
45538       tmp="$complete EOL"
45539       arguments="${tmp#* }"
45540 
45541       # Cannot rely on the command "which" here since it doesn't always work.
45542       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45543       if test -z "$is_absolute_path"; then
45544         # Path to executable is not absolute. Find it.
45545         IFS_save="$IFS"
45546         IFS=:
45547         for p in $PATH; do
45548           if test -f "$p/$path" && test -x "$p/$path"; then
45549             new_path="$p/$path"
45550             break
45551           fi
45552         done
45553         IFS="$IFS_save"
45554       else
45555         # This is an absolute path, we can use it without further modifications.
45556         new_path="$path"
45557       fi
45558 
45559       if test "x$new_path" = x; then
45560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
45561 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
45562         has_space=`$ECHO "$complete" | $GREP " "`
45563         if test "x$has_space" != x; then
45564           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45565 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45566         fi
45567         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45568       fi
45569     fi
45570 
45571     # Now join together the path and the arguments once again
45572     if test "x$arguments" != xEOL; then
45573       new_complete="$new_path ${arguments% *}"
45574     else
45575       new_complete="$new_path"
45576     fi
45577 
45578     if test "x$complete" != "x$new_complete"; then
45579       OBJDUMP="$new_complete"
45580       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
45581 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
45582     fi
45583   fi
45584 
45585   fi
45586 
45587 
45588   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
45589   # to remain in place. Otherwise the compiler will not work in some siutations
45590   # in later configure checks.
45591   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
45592     PATH="$OLD_PATH"
45593   fi
45594 
45595   # Restore the flags to the user specified values.
45596   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
45597   CFLAGS="$ORG_CFLAGS"
45598   CXXFLAGS="$ORG_CXXFLAGS"
45599 
45600 
45601 # Finally do some processing after the detection phase
45602 
45603   if test "x$COMPILE_TYPE" = "xcross"; then
45604     # Now we need to find a C/C++ compiler that can build executables for the
45605     # build platform. We can't use the AC_PROG_CC macro, since it can only be
45606     # used once. Also, we need to do this without adding a tools dir to the
45607     # path, otherwise we might pick up cross-compilers which don't use standard
45608     # naming.
45609 
45610     OLDPATH="$PATH"
45611 
45612 
45613 # Check whether --with-build-devkit was given.
45614 if test "${with_build_devkit+set}" = set; then :
45615   withval=$with_build_devkit;
45616 fi
45617 
45618     if test "x$with_build_devkit" = "xyes"; then
45619       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
45620     elif test -n "$with_build_devkit"; then
45621       if test ! -d "$with_build_devkit"; then
45622         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
45623       else
45624 
45625   # Only process if variable expands to non-empty
45626 
45627   if test "x$with_build_devkit" != x; then
45628     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45629 
45630   # Input might be given as Windows format, start by converting to
45631   # unix format.
45632   path="$with_build_devkit"
45633   new_path=`$CYGPATH -u "$path"`
45634 
45635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45638   # "foo.exe" is OK but "foo" is an error.
45639   #
45640   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45641   # It is also a way to make sure we got the proper file name for the real test later on.
45642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45643   if test "x$test_shortpath" = x; then
45644     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
45645 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
45646     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
45647   fi
45648 
45649   # Call helper function which possibly converts this using DOS-style short mode.
45650   # If so, the updated path is stored in $new_path.
45651 
45652   input_path="$new_path"
45653   # Check if we need to convert this using DOS-style short mode. If the path
45654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45655   # take no chances and rewrite it.
45656   # Note: m4 eats our [], so we need to use [ and ] instead.
45657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45658   if test "x$has_forbidden_chars" != x; then
45659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45663       # Going to short mode and back again did indeed matter. Since short mode is
45664       # case insensitive, let's make it lowercase to improve readability.
45665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45666       # Now convert it back to Unix-style (cygpath)
45667       input_path=`$CYGPATH -u "$shortmode_path"`
45668       new_path="$input_path"
45669     fi
45670   fi
45671 
45672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45673   if test "x$test_cygdrive_prefix" = x; then
45674     # As a simple fix, exclude /usr/bin since it's not a real path.
45675     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45677       # a path prefixed by /cygdrive for fixpath to work.
45678       new_path="$CYGWIN_ROOT_PATH$input_path"
45679     fi
45680   fi
45681 
45682 
45683   if test "x$path" != "x$new_path"; then
45684     with_build_devkit="$new_path"
45685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
45686 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
45687   fi
45688 
45689     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45690 
45691   path="$with_build_devkit"
45692   has_colon=`$ECHO $path | $GREP ^.:`
45693   new_path="$path"
45694   if test "x$has_colon" = x; then
45695     # Not in mixed or Windows style, start by that.
45696     new_path=`cmd //c echo $path`
45697   fi
45698 
45699 
45700   input_path="$new_path"
45701   # Check if we need to convert this using DOS-style short mode. If the path
45702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45703   # take no chances and rewrite it.
45704   # Note: m4 eats our [], so we need to use [ and ] instead.
45705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45706   if test "x$has_forbidden_chars" != x; then
45707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45709   fi
45710 
45711 
45712   windows_path="$new_path"
45713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45714     unix_path=`$CYGPATH -u "$windows_path"`
45715     new_path="$unix_path"
45716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45718     new_path="$unix_path"
45719   fi
45720 
45721   if test "x$path" != "x$new_path"; then
45722     with_build_devkit="$new_path"
45723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
45724 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
45725   fi
45726 
45727   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45728   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45729 
45730     else
45731       # We're on a unix platform. Hooray! :)
45732       path="$with_build_devkit"
45733       has_space=`$ECHO "$path" | $GREP " "`
45734       if test "x$has_space" != x; then
45735         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
45736 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
45737         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45738       fi
45739 
45740       # Use eval to expand a potential ~
45741       eval path="$path"
45742       if test ! -f "$path" && test ! -d "$path"; then
45743         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
45744       fi
45745 
45746       if test -d "$path"; then
45747         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
45748       else
45749         dir="`$DIRNAME "$path"`"
45750         base="`$BASENAME "$path"`"
45751         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
45752       fi
45753     fi
45754   fi
45755 
45756         BUILD_DEVKIT_ROOT="$with_build_devkit"
45757         # Check for a meta data info file in the root of the devkit
45758         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
45759           # Process devkit.info so that existing devkit variables are not
45760           # modified by this
45761           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
45762               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
45763               -e "s/\$host/\$build/g" \
45764               $BUILD_DEVKIT_ROOT/devkit.info \
45765               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45766           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45767           # This potentially sets the following:
45768           # A descriptive name of the devkit
45769 
45770   if test "x$BUILD_DEVKIT_NAME" = x; then
45771     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
45772   fi
45773 
45774           # Corresponds to --with-extra-path
45775 
45776   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
45777     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
45778   fi
45779 
45780           # Corresponds to --with-toolchain-path
45781 
45782   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45783     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
45784   fi
45785 
45786           # Corresponds to --with-sysroot
45787 
45788   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
45789     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
45790   fi
45791 
45792           # Skip the Window specific parts
45793         fi
45794 
45795         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
45796 $as_echo_n "checking for build platform devkit... " >&6; }
45797         if test "x$BUILD_DEVKIT_NAME" != x; then
45798           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
45799 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
45800         else
45801           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
45802 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
45803         fi
45804 
45805         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
45806 
45807   if test "x$BUILD_SYSROOT" != "x"; then
45808     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
45809       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
45810         # Solaris Studio does not have a concept of sysroot. Instead we must
45811         # make sure the default include and lib dirs are appended to each
45812         # compile and link command line. Must also add -I-xbuiltin to enable
45813         # inlining of system functions and intrinsics.
45814         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
45815         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
45816             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
45817       fi
45818     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
45819       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
45820       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
45821     elif test "x$TOOLCHAIN_TYPE" = xclang; then
45822       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
45823       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
45824     fi
45825     # The global CFLAGS and LDFLAGS variables need these for configure to function
45826     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
45827     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
45828     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
45829     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
45830   fi
45831 
45832   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
45833     # We also need -iframework<path>/System/Library/Frameworks
45834     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45835     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
45836     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
45837     # set this here so it doesn't have to be peppered throughout the forest
45838     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45839     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45840   fi
45841 
45842 
45843 
45844 
45845 
45846          # Fallback default of just /bin if DEVKIT_PATH is not defined
45847         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45848           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45849         fi
45850         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45851       fi
45852     fi
45853 
45854     # FIXME: we should list the discovered compilers as an exclude pattern!
45855     # If we do that, we can do this detection before POST_DETECTION, and still
45856     # find the build compilers in the tools dir, if needed.
45857 
45858 
45859 
45860   # Publish this variable in the help.
45861 
45862 
45863   if [ -z "${BUILD_CC+x}" ]; then
45864     # The variable is not set by user, try to locate tool using the code snippet
45865     for ac_prog in cl cc gcc
45866 do
45867   # Extract the first word of "$ac_prog", so it can be a program name with args.
45868 set dummy $ac_prog; ac_word=$2
45869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45870 $as_echo_n "checking for $ac_word... " >&6; }
45871 if ${ac_cv_path_BUILD_CC+:} false; then :
45872   $as_echo_n "(cached) " >&6
45873 else
45874   case $BUILD_CC in
45875   [\\/]* | ?:[\\/]*)
45876   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45877   ;;
45878   *)
45879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45880 for as_dir in $PATH
45881 do
45882   IFS=$as_save_IFS
45883   test -z "$as_dir" && as_dir=.
45884     for ac_exec_ext in '' $ac_executable_extensions; do
45885   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45886     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45887     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45888     break 2
45889   fi
45890 done
45891   done
45892 IFS=$as_save_IFS
45893 
45894   ;;
45895 esac
45896 fi
45897 BUILD_CC=$ac_cv_path_BUILD_CC
45898 if test -n "$BUILD_CC"; then
45899   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45900 $as_echo "$BUILD_CC" >&6; }
45901 else
45902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45903 $as_echo "no" >&6; }
45904 fi
45905 
45906 
45907   test -n "$BUILD_CC" && break
45908 done
45909 
45910   else
45911     # The variable is set, but is it from the command line or the environment?
45912 
45913     # Try to remove the string !BUILD_CC! from our list.
45914     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45915     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45916       # If it failed, the variable was not from the command line. Ignore it,
45917       # but warn the user (except for BASH, which is always set by the calling BASH).
45918       if test "xBUILD_CC" != xBASH; then
45919         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45920 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45921       fi
45922       # Try to locate tool using the code snippet
45923       for ac_prog in cl cc gcc
45924 do
45925   # Extract the first word of "$ac_prog", so it can be a program name with args.
45926 set dummy $ac_prog; ac_word=$2
45927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45928 $as_echo_n "checking for $ac_word... " >&6; }
45929 if ${ac_cv_path_BUILD_CC+:} false; then :
45930   $as_echo_n "(cached) " >&6
45931 else
45932   case $BUILD_CC in
45933   [\\/]* | ?:[\\/]*)
45934   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45935   ;;
45936   *)
45937   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45938 for as_dir in $PATH
45939 do
45940   IFS=$as_save_IFS
45941   test -z "$as_dir" && as_dir=.
45942     for ac_exec_ext in '' $ac_executable_extensions; do
45943   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45944     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45945     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45946     break 2
45947   fi
45948 done
45949   done
45950 IFS=$as_save_IFS
45951 
45952   ;;
45953 esac
45954 fi
45955 BUILD_CC=$ac_cv_path_BUILD_CC
45956 if test -n "$BUILD_CC"; then
45957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45958 $as_echo "$BUILD_CC" >&6; }
45959 else
45960   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45961 $as_echo "no" >&6; }
45962 fi
45963 
45964 
45965   test -n "$BUILD_CC" && break
45966 done
45967 
45968     else
45969       # If it succeeded, then it was overridden by the user. We will use it
45970       # for the tool.
45971 
45972       # First remove it from the list of overridden variables, so we can test
45973       # for unknown variables in the end.
45974       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45975 
45976       # Check if we try to supply an empty value
45977       if test "x$BUILD_CC" = x; then
45978         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45979 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45980         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45981 $as_echo_n "checking for BUILD_CC... " >&6; }
45982         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45983 $as_echo "disabled" >&6; }
45984       else
45985         # Check if the provided tool contains a complete path.
45986         tool_specified="$BUILD_CC"
45987         tool_basename="${tool_specified##*/}"
45988         if test "x$tool_basename" = "x$tool_specified"; then
45989           # A command without a complete path is provided, search $PATH.
45990           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45991 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45992           # Extract the first word of "$tool_basename", so it can be a program name with args.
45993 set dummy $tool_basename; ac_word=$2
45994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45995 $as_echo_n "checking for $ac_word... " >&6; }
45996 if ${ac_cv_path_BUILD_CC+:} false; then :
45997   $as_echo_n "(cached) " >&6
45998 else
45999   case $BUILD_CC in
46000   [\\/]* | ?:[\\/]*)
46001   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
46002   ;;
46003   *)
46004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46005 for as_dir in $PATH
46006 do
46007   IFS=$as_save_IFS
46008   test -z "$as_dir" && as_dir=.
46009     for ac_exec_ext in '' $ac_executable_extensions; do
46010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46011     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
46012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46013     break 2
46014   fi
46015 done
46016   done
46017 IFS=$as_save_IFS
46018 
46019   ;;
46020 esac
46021 fi
46022 BUILD_CC=$ac_cv_path_BUILD_CC
46023 if test -n "$BUILD_CC"; then
46024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
46025 $as_echo "$BUILD_CC" >&6; }
46026 else
46027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46028 $as_echo "no" >&6; }
46029 fi
46030 
46031 
46032           if test "x$BUILD_CC" = x; then
46033             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46034           fi
46035         else
46036           # Otherwise we believe it is a complete path. Use it as it is.
46037           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
46038 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
46039           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
46040 $as_echo_n "checking for BUILD_CC... " >&6; }
46041           if test ! -x "$tool_specified"; then
46042             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46043 $as_echo "not found" >&6; }
46044             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
46045           fi
46046           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46047 $as_echo "$tool_specified" >&6; }
46048         fi
46049       fi
46050     fi
46051 
46052   fi
46053 
46054 
46055 
46056   if test "x$BUILD_CC" = x; then
46057     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
46058   fi
46059 
46060 
46061 
46062   # Only process if variable expands to non-empty
46063 
46064   if test "x$BUILD_CC" != x; then
46065     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46066 
46067   # First separate the path from the arguments. This will split at the first
46068   # space.
46069   complete="$BUILD_CC"
46070   path="${complete%% *}"
46071   tmp="$complete EOL"
46072   arguments="${tmp#* }"
46073 
46074   # Input might be given as Windows format, start by converting to
46075   # unix format.
46076   new_path=`$CYGPATH -u "$path"`
46077 
46078   # Now try to locate executable using which
46079   new_path=`$WHICH "$new_path" 2> /dev/null`
46080   # bat and cmd files are not always considered executable in cygwin causing which
46081   # to not find them
46082   if test "x$new_path" = x \
46083       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46084       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46085     new_path=`$CYGPATH -u "$path"`
46086   fi
46087   if test "x$new_path" = x; then
46088     # Oops. Which didn't find the executable.
46089     # The splitting of arguments from the executable at a space might have been incorrect,
46090     # since paths with space are more likely in Windows. Give it another try with the whole
46091     # argument.
46092     path="$complete"
46093     arguments="EOL"
46094     new_path=`$CYGPATH -u "$path"`
46095     new_path=`$WHICH "$new_path" 2> /dev/null`
46096     # bat and cmd files are not always considered executable in cygwin causing which
46097     # to not find them
46098     if test "x$new_path" = x \
46099         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46100         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46101       new_path=`$CYGPATH -u "$path"`
46102     fi
46103     if test "x$new_path" = x; then
46104       # It's still not found. Now this is an unrecoverable error.
46105       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
46106 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
46107       has_space=`$ECHO "$complete" | $GREP " "`
46108       if test "x$has_space" != x; then
46109         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46110 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46111       fi
46112       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46113     fi
46114   fi
46115 
46116   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46117   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46118   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46119   # "foo.exe" is OK but "foo" is an error.
46120   #
46121   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46122   # It is also a way to make sure we got the proper file name for the real test later on.
46123   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46124   if test "x$test_shortpath" = x; then
46125     # Short path failed, file does not exist as specified.
46126     # Try adding .exe or .cmd
46127     if test -f "${new_path}.exe"; then
46128       input_to_shortpath="${new_path}.exe"
46129     elif test -f "${new_path}.cmd"; then
46130       input_to_shortpath="${new_path}.cmd"
46131     else
46132       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
46133 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
46134       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46135 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46136       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46137     fi
46138   else
46139     input_to_shortpath="$new_path"
46140   fi
46141 
46142   # Call helper function which possibly converts this using DOS-style short mode.
46143   # If so, the updated path is stored in $new_path.
46144   new_path="$input_to_shortpath"
46145 
46146   input_path="$input_to_shortpath"
46147   # Check if we need to convert this using DOS-style short mode. If the path
46148   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46149   # take no chances and rewrite it.
46150   # Note: m4 eats our [], so we need to use [ and ] instead.
46151   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46152   if test "x$has_forbidden_chars" != x; then
46153     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46154     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46155     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46156     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46157       # Going to short mode and back again did indeed matter. Since short mode is
46158       # case insensitive, let's make it lowercase to improve readability.
46159       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46160       # Now convert it back to Unix-style (cygpath)
46161       input_path=`$CYGPATH -u "$shortmode_path"`
46162       new_path="$input_path"
46163     fi
46164   fi
46165 
46166   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46167   if test "x$test_cygdrive_prefix" = x; then
46168     # As a simple fix, exclude /usr/bin since it's not a real path.
46169     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46170       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46171       # a path prefixed by /cygdrive for fixpath to work.
46172       new_path="$CYGWIN_ROOT_PATH$input_path"
46173     fi
46174   fi
46175 
46176   # remove trailing .exe if any
46177   new_path="${new_path/%.exe/}"
46178 
46179     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46180 
46181   # First separate the path from the arguments. This will split at the first
46182   # space.
46183   complete="$BUILD_CC"
46184   path="${complete%% *}"
46185   tmp="$complete EOL"
46186   arguments="${tmp#* }"
46187 
46188   # Input might be given as Windows format, start by converting to
46189   # unix format.
46190   new_path="$path"
46191 
46192   windows_path="$new_path"
46193   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46194     unix_path=`$CYGPATH -u "$windows_path"`
46195     new_path="$unix_path"
46196   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46197     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46198     new_path="$unix_path"
46199   fi
46200 
46201 
46202   # Now try to locate executable using which
46203   new_path=`$WHICH "$new_path" 2> /dev/null`
46204 
46205   if test "x$new_path" = x; then
46206     # Oops. Which didn't find the executable.
46207     # The splitting of arguments from the executable at a space might have been incorrect,
46208     # since paths with space are more likely in Windows. Give it another try with the whole
46209     # argument.
46210     path="$complete"
46211     arguments="EOL"
46212     new_path="$path"
46213 
46214   windows_path="$new_path"
46215   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46216     unix_path=`$CYGPATH -u "$windows_path"`
46217     new_path="$unix_path"
46218   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46219     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46220     new_path="$unix_path"
46221   fi
46222 
46223 
46224     new_path=`$WHICH "$new_path" 2> /dev/null`
46225     # bat and cmd files are not always considered executable in MSYS causing which
46226     # to not find them
46227     if test "x$new_path" = x \
46228         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46229         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46230       new_path="$path"
46231 
46232   windows_path="$new_path"
46233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46234     unix_path=`$CYGPATH -u "$windows_path"`
46235     new_path="$unix_path"
46236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46238     new_path="$unix_path"
46239   fi
46240 
46241     fi
46242 
46243     if test "x$new_path" = x; then
46244       # It's still not found. Now this is an unrecoverable error.
46245       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
46246 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
46247       has_space=`$ECHO "$complete" | $GREP " "`
46248       if test "x$has_space" != x; then
46249         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46250 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46251       fi
46252       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46253     fi
46254   fi
46255 
46256   # Now new_path has a complete unix path to the binary
46257   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46258     # Keep paths in /bin as-is, but remove trailing .exe if any
46259     new_path="${new_path/%.exe/}"
46260     # Do not save /bin paths to all_fixpath_prefixes!
46261   else
46262     # Not in mixed or Windows style, start by that.
46263     new_path=`cmd //c echo $new_path`
46264 
46265   input_path="$new_path"
46266   # Check if we need to convert this using DOS-style short mode. If the path
46267   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46268   # take no chances and rewrite it.
46269   # Note: m4 eats our [], so we need to use [ and ] instead.
46270   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46271   if test "x$has_forbidden_chars" != x; then
46272     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46273     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46274   fi
46275 
46276     # Output is in $new_path
46277 
46278   windows_path="$new_path"
46279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46280     unix_path=`$CYGPATH -u "$windows_path"`
46281     new_path="$unix_path"
46282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46283     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46284     new_path="$unix_path"
46285   fi
46286 
46287     # remove trailing .exe if any
46288     new_path="${new_path/%.exe/}"
46289 
46290     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46291     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46292   fi
46293 
46294     else
46295       # We're on a unix platform. Hooray! :)
46296       # First separate the path from the arguments. This will split at the first
46297       # space.
46298       complete="$BUILD_CC"
46299       path="${complete%% *}"
46300       tmp="$complete EOL"
46301       arguments="${tmp#* }"
46302 
46303       # Cannot rely on the command "which" here since it doesn't always work.
46304       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46305       if test -z "$is_absolute_path"; then
46306         # Path to executable is not absolute. Find it.
46307         IFS_save="$IFS"
46308         IFS=:
46309         for p in $PATH; do
46310           if test -f "$p/$path" && test -x "$p/$path"; then
46311             new_path="$p/$path"
46312             break
46313           fi
46314         done
46315         IFS="$IFS_save"
46316       else
46317         # This is an absolute path, we can use it without further modifications.
46318         new_path="$path"
46319       fi
46320 
46321       if test "x$new_path" = x; then
46322         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
46323 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
46324         has_space=`$ECHO "$complete" | $GREP " "`
46325         if test "x$has_space" != x; then
46326           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46327 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46328         fi
46329         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46330       fi
46331     fi
46332 
46333     # Now join together the path and the arguments once again
46334     if test "x$arguments" != xEOL; then
46335       new_complete="$new_path ${arguments% *}"
46336     else
46337       new_complete="$new_path"
46338     fi
46339 
46340     if test "x$complete" != "x$new_complete"; then
46341       BUILD_CC="$new_complete"
46342       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
46343 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
46344     fi
46345   fi
46346 
46347 
46348 
46349 
46350   # Publish this variable in the help.
46351 
46352 
46353   if [ -z "${BUILD_CXX+x}" ]; then
46354     # The variable is not set by user, try to locate tool using the code snippet
46355     for ac_prog in cl CC g++
46356 do
46357   # Extract the first word of "$ac_prog", so it can be a program name with args.
46358 set dummy $ac_prog; ac_word=$2
46359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46360 $as_echo_n "checking for $ac_word... " >&6; }
46361 if ${ac_cv_path_BUILD_CXX+:} false; then :
46362   $as_echo_n "(cached) " >&6
46363 else
46364   case $BUILD_CXX in
46365   [\\/]* | ?:[\\/]*)
46366   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
46367   ;;
46368   *)
46369   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46370 for as_dir in $PATH
46371 do
46372   IFS=$as_save_IFS
46373   test -z "$as_dir" && as_dir=.
46374     for ac_exec_ext in '' $ac_executable_extensions; do
46375   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46376     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
46377     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46378     break 2
46379   fi
46380 done
46381   done
46382 IFS=$as_save_IFS
46383 
46384   ;;
46385 esac
46386 fi
46387 BUILD_CXX=$ac_cv_path_BUILD_CXX
46388 if test -n "$BUILD_CXX"; then
46389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
46390 $as_echo "$BUILD_CXX" >&6; }
46391 else
46392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46393 $as_echo "no" >&6; }
46394 fi
46395 
46396 
46397   test -n "$BUILD_CXX" && break
46398 done
46399 
46400   else
46401     # The variable is set, but is it from the command line or the environment?
46402 
46403     # Try to remove the string !BUILD_CXX! from our list.
46404     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
46405     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46406       # If it failed, the variable was not from the command line. Ignore it,
46407       # but warn the user (except for BASH, which is always set by the calling BASH).
46408       if test "xBUILD_CXX" != xBASH; then
46409         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
46410 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
46411       fi
46412       # Try to locate tool using the code snippet
46413       for ac_prog in cl CC g++
46414 do
46415   # Extract the first word of "$ac_prog", so it can be a program name with args.
46416 set dummy $ac_prog; ac_word=$2
46417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46418 $as_echo_n "checking for $ac_word... " >&6; }
46419 if ${ac_cv_path_BUILD_CXX+:} false; then :
46420   $as_echo_n "(cached) " >&6
46421 else
46422   case $BUILD_CXX in
46423   [\\/]* | ?:[\\/]*)
46424   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
46425   ;;
46426   *)
46427   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46428 for as_dir in $PATH
46429 do
46430   IFS=$as_save_IFS
46431   test -z "$as_dir" && as_dir=.
46432     for ac_exec_ext in '' $ac_executable_extensions; do
46433   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46434     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
46435     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46436     break 2
46437   fi
46438 done
46439   done
46440 IFS=$as_save_IFS
46441 
46442   ;;
46443 esac
46444 fi
46445 BUILD_CXX=$ac_cv_path_BUILD_CXX
46446 if test -n "$BUILD_CXX"; then
46447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
46448 $as_echo "$BUILD_CXX" >&6; }
46449 else
46450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46451 $as_echo "no" >&6; }
46452 fi
46453 
46454 
46455   test -n "$BUILD_CXX" && break
46456 done
46457 
46458     else
46459       # If it succeeded, then it was overridden by the user. We will use it
46460       # for the tool.
46461 
46462       # First remove it from the list of overridden variables, so we can test
46463       # for unknown variables in the end.
46464       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46465 
46466       # Check if we try to supply an empty value
46467       if test "x$BUILD_CXX" = x; then
46468         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
46469 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
46470         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
46471 $as_echo_n "checking for BUILD_CXX... " >&6; }
46472         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46473 $as_echo "disabled" >&6; }
46474       else
46475         # Check if the provided tool contains a complete path.
46476         tool_specified="$BUILD_CXX"
46477         tool_basename="${tool_specified##*/}"
46478         if test "x$tool_basename" = "x$tool_specified"; then
46479           # A command without a complete path is provided, search $PATH.
46480           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
46481 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
46482           # Extract the first word of "$tool_basename", so it can be a program name with args.
46483 set dummy $tool_basename; ac_word=$2
46484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46485 $as_echo_n "checking for $ac_word... " >&6; }
46486 if ${ac_cv_path_BUILD_CXX+:} false; then :
46487   $as_echo_n "(cached) " >&6
46488 else
46489   case $BUILD_CXX in
46490   [\\/]* | ?:[\\/]*)
46491   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
46492   ;;
46493   *)
46494   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46495 for as_dir in $PATH
46496 do
46497   IFS=$as_save_IFS
46498   test -z "$as_dir" && as_dir=.
46499     for ac_exec_ext in '' $ac_executable_extensions; do
46500   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46501     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
46502     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46503     break 2
46504   fi
46505 done
46506   done
46507 IFS=$as_save_IFS
46508 
46509   ;;
46510 esac
46511 fi
46512 BUILD_CXX=$ac_cv_path_BUILD_CXX
46513 if test -n "$BUILD_CXX"; then
46514   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
46515 $as_echo "$BUILD_CXX" >&6; }
46516 else
46517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46518 $as_echo "no" >&6; }
46519 fi
46520 
46521 
46522           if test "x$BUILD_CXX" = x; then
46523             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46524           fi
46525         else
46526           # Otherwise we believe it is a complete path. Use it as it is.
46527           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
46528 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
46529           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
46530 $as_echo_n "checking for BUILD_CXX... " >&6; }
46531           if test ! -x "$tool_specified"; then
46532             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46533 $as_echo "not found" >&6; }
46534             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
46535           fi
46536           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46537 $as_echo "$tool_specified" >&6; }
46538         fi
46539       fi
46540     fi
46541 
46542   fi
46543 
46544 
46545 
46546   if test "x$BUILD_CXX" = x; then
46547     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
46548   fi
46549 
46550 
46551 
46552   # Only process if variable expands to non-empty
46553 
46554   if test "x$BUILD_CXX" != x; then
46555     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46556 
46557   # First separate the path from the arguments. This will split at the first
46558   # space.
46559   complete="$BUILD_CXX"
46560   path="${complete%% *}"
46561   tmp="$complete EOL"
46562   arguments="${tmp#* }"
46563 
46564   # Input might be given as Windows format, start by converting to
46565   # unix format.
46566   new_path=`$CYGPATH -u "$path"`
46567 
46568   # Now try to locate executable using which
46569   new_path=`$WHICH "$new_path" 2> /dev/null`
46570   # bat and cmd files are not always considered executable in cygwin causing which
46571   # to not find them
46572   if test "x$new_path" = x \
46573       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46574       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46575     new_path=`$CYGPATH -u "$path"`
46576   fi
46577   if test "x$new_path" = x; then
46578     # Oops. Which didn't find the executable.
46579     # The splitting of arguments from the executable at a space might have been incorrect,
46580     # since paths with space are more likely in Windows. Give it another try with the whole
46581     # argument.
46582     path="$complete"
46583     arguments="EOL"
46584     new_path=`$CYGPATH -u "$path"`
46585     new_path=`$WHICH "$new_path" 2> /dev/null`
46586     # bat and cmd files are not always considered executable in cygwin causing which
46587     # to not find them
46588     if test "x$new_path" = x \
46589         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46590         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46591       new_path=`$CYGPATH -u "$path"`
46592     fi
46593     if test "x$new_path" = x; then
46594       # It's still not found. Now this is an unrecoverable error.
46595       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46596 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46597       has_space=`$ECHO "$complete" | $GREP " "`
46598       if test "x$has_space" != x; then
46599         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46600 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46601       fi
46602       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46603     fi
46604   fi
46605 
46606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46609   # "foo.exe" is OK but "foo" is an error.
46610   #
46611   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46612   # It is also a way to make sure we got the proper file name for the real test later on.
46613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46614   if test "x$test_shortpath" = x; then
46615     # Short path failed, file does not exist as specified.
46616     # Try adding .exe or .cmd
46617     if test -f "${new_path}.exe"; then
46618       input_to_shortpath="${new_path}.exe"
46619     elif test -f "${new_path}.cmd"; then
46620       input_to_shortpath="${new_path}.cmd"
46621     else
46622       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
46623 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
46624       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46625 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46626       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46627     fi
46628   else
46629     input_to_shortpath="$new_path"
46630   fi
46631 
46632   # Call helper function which possibly converts this using DOS-style short mode.
46633   # If so, the updated path is stored in $new_path.
46634   new_path="$input_to_shortpath"
46635 
46636   input_path="$input_to_shortpath"
46637   # Check if we need to convert this using DOS-style short mode. If the path
46638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46639   # take no chances and rewrite it.
46640   # Note: m4 eats our [], so we need to use [ and ] instead.
46641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46642   if test "x$has_forbidden_chars" != x; then
46643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46644     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46645     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46646     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46647       # Going to short mode and back again did indeed matter. Since short mode is
46648       # case insensitive, let's make it lowercase to improve readability.
46649       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46650       # Now convert it back to Unix-style (cygpath)
46651       input_path=`$CYGPATH -u "$shortmode_path"`
46652       new_path="$input_path"
46653     fi
46654   fi
46655 
46656   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46657   if test "x$test_cygdrive_prefix" = x; then
46658     # As a simple fix, exclude /usr/bin since it's not a real path.
46659     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46660       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46661       # a path prefixed by /cygdrive for fixpath to work.
46662       new_path="$CYGWIN_ROOT_PATH$input_path"
46663     fi
46664   fi
46665 
46666   # remove trailing .exe if any
46667   new_path="${new_path/%.exe/}"
46668 
46669     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46670 
46671   # First separate the path from the arguments. This will split at the first
46672   # space.
46673   complete="$BUILD_CXX"
46674   path="${complete%% *}"
46675   tmp="$complete EOL"
46676   arguments="${tmp#* }"
46677 
46678   # Input might be given as Windows format, start by converting to
46679   # unix format.
46680   new_path="$path"
46681 
46682   windows_path="$new_path"
46683   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46684     unix_path=`$CYGPATH -u "$windows_path"`
46685     new_path="$unix_path"
46686   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46687     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46688     new_path="$unix_path"
46689   fi
46690 
46691 
46692   # Now try to locate executable using which
46693   new_path=`$WHICH "$new_path" 2> /dev/null`
46694 
46695   if test "x$new_path" = x; then
46696     # Oops. Which didn't find the executable.
46697     # The splitting of arguments from the executable at a space might have been incorrect,
46698     # since paths with space are more likely in Windows. Give it another try with the whole
46699     # argument.
46700     path="$complete"
46701     arguments="EOL"
46702     new_path="$path"
46703 
46704   windows_path="$new_path"
46705   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46706     unix_path=`$CYGPATH -u "$windows_path"`
46707     new_path="$unix_path"
46708   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46709     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46710     new_path="$unix_path"
46711   fi
46712 
46713 
46714     new_path=`$WHICH "$new_path" 2> /dev/null`
46715     # bat and cmd files are not always considered executable in MSYS causing which
46716     # to not find them
46717     if test "x$new_path" = x \
46718         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46719         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46720       new_path="$path"
46721 
46722   windows_path="$new_path"
46723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46724     unix_path=`$CYGPATH -u "$windows_path"`
46725     new_path="$unix_path"
46726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46728     new_path="$unix_path"
46729   fi
46730 
46731     fi
46732 
46733     if test "x$new_path" = x; then
46734       # It's still not found. Now this is an unrecoverable error.
46735       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46736 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46737       has_space=`$ECHO "$complete" | $GREP " "`
46738       if test "x$has_space" != x; then
46739         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46740 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46741       fi
46742       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46743     fi
46744   fi
46745 
46746   # Now new_path has a complete unix path to the binary
46747   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46748     # Keep paths in /bin as-is, but remove trailing .exe if any
46749     new_path="${new_path/%.exe/}"
46750     # Do not save /bin paths to all_fixpath_prefixes!
46751   else
46752     # Not in mixed or Windows style, start by that.
46753     new_path=`cmd //c echo $new_path`
46754 
46755   input_path="$new_path"
46756   # Check if we need to convert this using DOS-style short mode. If the path
46757   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46758   # take no chances and rewrite it.
46759   # Note: m4 eats our [], so we need to use [ and ] instead.
46760   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46761   if test "x$has_forbidden_chars" != x; then
46762     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46763     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46764   fi
46765 
46766     # Output is in $new_path
46767 
46768   windows_path="$new_path"
46769   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46770     unix_path=`$CYGPATH -u "$windows_path"`
46771     new_path="$unix_path"
46772   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46773     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46774     new_path="$unix_path"
46775   fi
46776 
46777     # remove trailing .exe if any
46778     new_path="${new_path/%.exe/}"
46779 
46780     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46781     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46782   fi
46783 
46784     else
46785       # We're on a unix platform. Hooray! :)
46786       # First separate the path from the arguments. This will split at the first
46787       # space.
46788       complete="$BUILD_CXX"
46789       path="${complete%% *}"
46790       tmp="$complete EOL"
46791       arguments="${tmp#* }"
46792 
46793       # Cannot rely on the command "which" here since it doesn't always work.
46794       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46795       if test -z "$is_absolute_path"; then
46796         # Path to executable is not absolute. Find it.
46797         IFS_save="$IFS"
46798         IFS=:
46799         for p in $PATH; do
46800           if test -f "$p/$path" && test -x "$p/$path"; then
46801             new_path="$p/$path"
46802             break
46803           fi
46804         done
46805         IFS="$IFS_save"
46806       else
46807         # This is an absolute path, we can use it without further modifications.
46808         new_path="$path"
46809       fi
46810 
46811       if test "x$new_path" = x; then
46812         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46813 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46814         has_space=`$ECHO "$complete" | $GREP " "`
46815         if test "x$has_space" != x; then
46816           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46817 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46818         fi
46819         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46820       fi
46821     fi
46822 
46823     # Now join together the path and the arguments once again
46824     if test "x$arguments" != xEOL; then
46825       new_complete="$new_path ${arguments% *}"
46826     else
46827       new_complete="$new_path"
46828     fi
46829 
46830     if test "x$complete" != "x$new_complete"; then
46831       BUILD_CXX="$new_complete"
46832       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
46833 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
46834     fi
46835   fi
46836 
46837 
46838 
46839   # Publish this variable in the help.
46840 
46841 
46842   if [ -z "${BUILD_NM+x}" ]; then
46843     # The variable is not set by user, try to locate tool using the code snippet
46844     for ac_prog in nm gcc-nm
46845 do
46846   # Extract the first word of "$ac_prog", so it can be a program name with args.
46847 set dummy $ac_prog; ac_word=$2
46848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46849 $as_echo_n "checking for $ac_word... " >&6; }
46850 if ${ac_cv_path_BUILD_NM+:} false; then :
46851   $as_echo_n "(cached) " >&6
46852 else
46853   case $BUILD_NM in
46854   [\\/]* | ?:[\\/]*)
46855   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46856   ;;
46857   *)
46858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46859 for as_dir in $PATH
46860 do
46861   IFS=$as_save_IFS
46862   test -z "$as_dir" && as_dir=.
46863     for ac_exec_ext in '' $ac_executable_extensions; do
46864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46865     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46867     break 2
46868   fi
46869 done
46870   done
46871 IFS=$as_save_IFS
46872 
46873   ;;
46874 esac
46875 fi
46876 BUILD_NM=$ac_cv_path_BUILD_NM
46877 if test -n "$BUILD_NM"; then
46878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46879 $as_echo "$BUILD_NM" >&6; }
46880 else
46881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46882 $as_echo "no" >&6; }
46883 fi
46884 
46885 
46886   test -n "$BUILD_NM" && break
46887 done
46888 
46889   else
46890     # The variable is set, but is it from the command line or the environment?
46891 
46892     # Try to remove the string !BUILD_NM! from our list.
46893     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46894     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46895       # If it failed, the variable was not from the command line. Ignore it,
46896       # but warn the user (except for BASH, which is always set by the calling BASH).
46897       if test "xBUILD_NM" != xBASH; then
46898         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46899 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46900       fi
46901       # Try to locate tool using the code snippet
46902       for ac_prog in nm gcc-nm
46903 do
46904   # Extract the first word of "$ac_prog", so it can be a program name with args.
46905 set dummy $ac_prog; ac_word=$2
46906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46907 $as_echo_n "checking for $ac_word... " >&6; }
46908 if ${ac_cv_path_BUILD_NM+:} false; then :
46909   $as_echo_n "(cached) " >&6
46910 else
46911   case $BUILD_NM in
46912   [\\/]* | ?:[\\/]*)
46913   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46914   ;;
46915   *)
46916   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46917 for as_dir in $PATH
46918 do
46919   IFS=$as_save_IFS
46920   test -z "$as_dir" && as_dir=.
46921     for ac_exec_ext in '' $ac_executable_extensions; do
46922   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46923     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46924     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46925     break 2
46926   fi
46927 done
46928   done
46929 IFS=$as_save_IFS
46930 
46931   ;;
46932 esac
46933 fi
46934 BUILD_NM=$ac_cv_path_BUILD_NM
46935 if test -n "$BUILD_NM"; then
46936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46937 $as_echo "$BUILD_NM" >&6; }
46938 else
46939   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46940 $as_echo "no" >&6; }
46941 fi
46942 
46943 
46944   test -n "$BUILD_NM" && break
46945 done
46946 
46947     else
46948       # If it succeeded, then it was overridden by the user. We will use it
46949       # for the tool.
46950 
46951       # First remove it from the list of overridden variables, so we can test
46952       # for unknown variables in the end.
46953       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46954 
46955       # Check if we try to supply an empty value
46956       if test "x$BUILD_NM" = x; then
46957         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46958 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46959         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46960 $as_echo_n "checking for BUILD_NM... " >&6; }
46961         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46962 $as_echo "disabled" >&6; }
46963       else
46964         # Check if the provided tool contains a complete path.
46965         tool_specified="$BUILD_NM"
46966         tool_basename="${tool_specified##*/}"
46967         if test "x$tool_basename" = "x$tool_specified"; then
46968           # A command without a complete path is provided, search $PATH.
46969           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46970 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46971           # Extract the first word of "$tool_basename", so it can be a program name with args.
46972 set dummy $tool_basename; ac_word=$2
46973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46974 $as_echo_n "checking for $ac_word... " >&6; }
46975 if ${ac_cv_path_BUILD_NM+:} false; then :
46976   $as_echo_n "(cached) " >&6
46977 else
46978   case $BUILD_NM in
46979   [\\/]* | ?:[\\/]*)
46980   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46981   ;;
46982   *)
46983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46984 for as_dir in $PATH
46985 do
46986   IFS=$as_save_IFS
46987   test -z "$as_dir" && as_dir=.
46988     for ac_exec_ext in '' $ac_executable_extensions; do
46989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46990     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46992     break 2
46993   fi
46994 done
46995   done
46996 IFS=$as_save_IFS
46997 
46998   ;;
46999 esac
47000 fi
47001 BUILD_NM=$ac_cv_path_BUILD_NM
47002 if test -n "$BUILD_NM"; then
47003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
47004 $as_echo "$BUILD_NM" >&6; }
47005 else
47006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47007 $as_echo "no" >&6; }
47008 fi
47009 
47010 
47011           if test "x$BUILD_NM" = x; then
47012             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47013           fi
47014         else
47015           # Otherwise we believe it is a complete path. Use it as it is.
47016           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
47017 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
47018           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
47019 $as_echo_n "checking for BUILD_NM... " >&6; }
47020           if test ! -x "$tool_specified"; then
47021             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47022 $as_echo "not found" >&6; }
47023             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
47024           fi
47025           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47026 $as_echo "$tool_specified" >&6; }
47027         fi
47028       fi
47029     fi
47030 
47031   fi
47032 
47033 
47034 
47035   # Only process if variable expands to non-empty
47036 
47037   if test "x$BUILD_NM" != x; then
47038     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47039 
47040   # First separate the path from the arguments. This will split at the first
47041   # space.
47042   complete="$BUILD_NM"
47043   path="${complete%% *}"
47044   tmp="$complete EOL"
47045   arguments="${tmp#* }"
47046 
47047   # Input might be given as Windows format, start by converting to
47048   # unix format.
47049   new_path=`$CYGPATH -u "$path"`
47050 
47051   # Now try to locate executable using which
47052   new_path=`$WHICH "$new_path" 2> /dev/null`
47053   # bat and cmd files are not always considered executable in cygwin causing which
47054   # to not find them
47055   if test "x$new_path" = x \
47056       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47057       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47058     new_path=`$CYGPATH -u "$path"`
47059   fi
47060   if test "x$new_path" = x; then
47061     # Oops. Which didn't find the executable.
47062     # The splitting of arguments from the executable at a space might have been incorrect,
47063     # since paths with space are more likely in Windows. Give it another try with the whole
47064     # argument.
47065     path="$complete"
47066     arguments="EOL"
47067     new_path=`$CYGPATH -u "$path"`
47068     new_path=`$WHICH "$new_path" 2> /dev/null`
47069     # bat and cmd files are not always considered executable in cygwin causing which
47070     # to not find them
47071     if test "x$new_path" = x \
47072         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47073         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47074       new_path=`$CYGPATH -u "$path"`
47075     fi
47076     if test "x$new_path" = x; then
47077       # It's still not found. Now this is an unrecoverable error.
47078       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
47079 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
47080       has_space=`$ECHO "$complete" | $GREP " "`
47081       if test "x$has_space" != x; then
47082         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47083 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47084       fi
47085       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47086     fi
47087   fi
47088 
47089   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47090   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47091   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47092   # "foo.exe" is OK but "foo" is an error.
47093   #
47094   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47095   # It is also a way to make sure we got the proper file name for the real test later on.
47096   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47097   if test "x$test_shortpath" = x; then
47098     # Short path failed, file does not exist as specified.
47099     # Try adding .exe or .cmd
47100     if test -f "${new_path}.exe"; then
47101       input_to_shortpath="${new_path}.exe"
47102     elif test -f "${new_path}.cmd"; then
47103       input_to_shortpath="${new_path}.cmd"
47104     else
47105       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
47106 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
47107       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47108 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47109       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47110     fi
47111   else
47112     input_to_shortpath="$new_path"
47113   fi
47114 
47115   # Call helper function which possibly converts this using DOS-style short mode.
47116   # If so, the updated path is stored in $new_path.
47117   new_path="$input_to_shortpath"
47118 
47119   input_path="$input_to_shortpath"
47120   # Check if we need to convert this using DOS-style short mode. If the path
47121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47122   # take no chances and rewrite it.
47123   # Note: m4 eats our [], so we need to use [ and ] instead.
47124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47125   if test "x$has_forbidden_chars" != x; then
47126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47127     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47128     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47129     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47130       # Going to short mode and back again did indeed matter. Since short mode is
47131       # case insensitive, let's make it lowercase to improve readability.
47132       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47133       # Now convert it back to Unix-style (cygpath)
47134       input_path=`$CYGPATH -u "$shortmode_path"`
47135       new_path="$input_path"
47136     fi
47137   fi
47138 
47139   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47140   if test "x$test_cygdrive_prefix" = x; then
47141     # As a simple fix, exclude /usr/bin since it's not a real path.
47142     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47143       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47144       # a path prefixed by /cygdrive for fixpath to work.
47145       new_path="$CYGWIN_ROOT_PATH$input_path"
47146     fi
47147   fi
47148 
47149   # remove trailing .exe if any
47150   new_path="${new_path/%.exe/}"
47151 
47152     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47153 
47154   # First separate the path from the arguments. This will split at the first
47155   # space.
47156   complete="$BUILD_NM"
47157   path="${complete%% *}"
47158   tmp="$complete EOL"
47159   arguments="${tmp#* }"
47160 
47161   # Input might be given as Windows format, start by converting to
47162   # unix format.
47163   new_path="$path"
47164 
47165   windows_path="$new_path"
47166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47167     unix_path=`$CYGPATH -u "$windows_path"`
47168     new_path="$unix_path"
47169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47171     new_path="$unix_path"
47172   fi
47173 
47174 
47175   # Now try to locate executable using which
47176   new_path=`$WHICH "$new_path" 2> /dev/null`
47177 
47178   if test "x$new_path" = x; then
47179     # Oops. Which didn't find the executable.
47180     # The splitting of arguments from the executable at a space might have been incorrect,
47181     # since paths with space are more likely in Windows. Give it another try with the whole
47182     # argument.
47183     path="$complete"
47184     arguments="EOL"
47185     new_path="$path"
47186 
47187   windows_path="$new_path"
47188   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47189     unix_path=`$CYGPATH -u "$windows_path"`
47190     new_path="$unix_path"
47191   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47192     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47193     new_path="$unix_path"
47194   fi
47195 
47196 
47197     new_path=`$WHICH "$new_path" 2> /dev/null`
47198     # bat and cmd files are not always considered executable in MSYS causing which
47199     # to not find them
47200     if test "x$new_path" = x \
47201         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47202         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47203       new_path="$path"
47204 
47205   windows_path="$new_path"
47206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47207     unix_path=`$CYGPATH -u "$windows_path"`
47208     new_path="$unix_path"
47209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47211     new_path="$unix_path"
47212   fi
47213 
47214     fi
47215 
47216     if test "x$new_path" = x; then
47217       # It's still not found. Now this is an unrecoverable error.
47218       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
47219 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
47220       has_space=`$ECHO "$complete" | $GREP " "`
47221       if test "x$has_space" != x; then
47222         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47223 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47224       fi
47225       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47226     fi
47227   fi
47228 
47229   # Now new_path has a complete unix path to the binary
47230   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47231     # Keep paths in /bin as-is, but remove trailing .exe if any
47232     new_path="${new_path/%.exe/}"
47233     # Do not save /bin paths to all_fixpath_prefixes!
47234   else
47235     # Not in mixed or Windows style, start by that.
47236     new_path=`cmd //c echo $new_path`
47237 
47238   input_path="$new_path"
47239   # Check if we need to convert this using DOS-style short mode. If the path
47240   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47241   # take no chances and rewrite it.
47242   # Note: m4 eats our [], so we need to use [ and ] instead.
47243   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47244   if test "x$has_forbidden_chars" != x; then
47245     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47246     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47247   fi
47248 
47249     # Output is in $new_path
47250 
47251   windows_path="$new_path"
47252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47253     unix_path=`$CYGPATH -u "$windows_path"`
47254     new_path="$unix_path"
47255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47257     new_path="$unix_path"
47258   fi
47259 
47260     # remove trailing .exe if any
47261     new_path="${new_path/%.exe/}"
47262 
47263     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47264     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47265   fi
47266 
47267     else
47268       # We're on a unix platform. Hooray! :)
47269       # First separate the path from the arguments. This will split at the first
47270       # space.
47271       complete="$BUILD_NM"
47272       path="${complete%% *}"
47273       tmp="$complete EOL"
47274       arguments="${tmp#* }"
47275 
47276       # Cannot rely on the command "which" here since it doesn't always work.
47277       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47278       if test -z "$is_absolute_path"; then
47279         # Path to executable is not absolute. Find it.
47280         IFS_save="$IFS"
47281         IFS=:
47282         for p in $PATH; do
47283           if test -f "$p/$path" && test -x "$p/$path"; then
47284             new_path="$p/$path"
47285             break
47286           fi
47287         done
47288         IFS="$IFS_save"
47289       else
47290         # This is an absolute path, we can use it without further modifications.
47291         new_path="$path"
47292       fi
47293 
47294       if test "x$new_path" = x; then
47295         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
47296 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
47297         has_space=`$ECHO "$complete" | $GREP " "`
47298         if test "x$has_space" != x; then
47299           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47300 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47301         fi
47302         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47303       fi
47304     fi
47305 
47306     # Now join together the path and the arguments once again
47307     if test "x$arguments" != xEOL; then
47308       new_complete="$new_path ${arguments% *}"
47309     else
47310       new_complete="$new_path"
47311     fi
47312 
47313     if test "x$complete" != "x$new_complete"; then
47314       BUILD_NM="$new_complete"
47315       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
47316 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
47317     fi
47318   fi
47319 
47320 
47321 
47322   # Publish this variable in the help.
47323 
47324 
47325   if [ -z "${BUILD_AR+x}" ]; then
47326     # The variable is not set by user, try to locate tool using the code snippet
47327     for ac_prog in ar gcc-ar
47328 do
47329   # Extract the first word of "$ac_prog", so it can be a program name with args.
47330 set dummy $ac_prog; ac_word=$2
47331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47332 $as_echo_n "checking for $ac_word... " >&6; }
47333 if ${ac_cv_path_BUILD_AR+:} false; then :
47334   $as_echo_n "(cached) " >&6
47335 else
47336   case $BUILD_AR in
47337   [\\/]* | ?:[\\/]*)
47338   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
47339   ;;
47340   *)
47341   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47342 for as_dir in $PATH
47343 do
47344   IFS=$as_save_IFS
47345   test -z "$as_dir" && as_dir=.
47346     for ac_exec_ext in '' $ac_executable_extensions; do
47347   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47348     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
47349     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47350     break 2
47351   fi
47352 done
47353   done
47354 IFS=$as_save_IFS
47355 
47356   ;;
47357 esac
47358 fi
47359 BUILD_AR=$ac_cv_path_BUILD_AR
47360 if test -n "$BUILD_AR"; then
47361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
47362 $as_echo "$BUILD_AR" >&6; }
47363 else
47364   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47365 $as_echo "no" >&6; }
47366 fi
47367 
47368 
47369   test -n "$BUILD_AR" && break
47370 done
47371 
47372   else
47373     # The variable is set, but is it from the command line or the environment?
47374 
47375     # Try to remove the string !BUILD_AR! from our list.
47376     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
47377     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47378       # If it failed, the variable was not from the command line. Ignore it,
47379       # but warn the user (except for BASH, which is always set by the calling BASH).
47380       if test "xBUILD_AR" != xBASH; then
47381         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
47382 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
47383       fi
47384       # Try to locate tool using the code snippet
47385       for ac_prog in ar gcc-ar
47386 do
47387   # Extract the first word of "$ac_prog", so it can be a program name with args.
47388 set dummy $ac_prog; ac_word=$2
47389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47390 $as_echo_n "checking for $ac_word... " >&6; }
47391 if ${ac_cv_path_BUILD_AR+:} false; then :
47392   $as_echo_n "(cached) " >&6
47393 else
47394   case $BUILD_AR in
47395   [\\/]* | ?:[\\/]*)
47396   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
47397   ;;
47398   *)
47399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47400 for as_dir in $PATH
47401 do
47402   IFS=$as_save_IFS
47403   test -z "$as_dir" && as_dir=.
47404     for ac_exec_ext in '' $ac_executable_extensions; do
47405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47406     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
47407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47408     break 2
47409   fi
47410 done
47411   done
47412 IFS=$as_save_IFS
47413 
47414   ;;
47415 esac
47416 fi
47417 BUILD_AR=$ac_cv_path_BUILD_AR
47418 if test -n "$BUILD_AR"; then
47419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
47420 $as_echo "$BUILD_AR" >&6; }
47421 else
47422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47423 $as_echo "no" >&6; }
47424 fi
47425 
47426 
47427   test -n "$BUILD_AR" && break
47428 done
47429 
47430     else
47431       # If it succeeded, then it was overridden by the user. We will use it
47432       # for the tool.
47433 
47434       # First remove it from the list of overridden variables, so we can test
47435       # for unknown variables in the end.
47436       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47437 
47438       # Check if we try to supply an empty value
47439       if test "x$BUILD_AR" = x; then
47440         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
47441 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
47442         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
47443 $as_echo_n "checking for BUILD_AR... " >&6; }
47444         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47445 $as_echo "disabled" >&6; }
47446       else
47447         # Check if the provided tool contains a complete path.
47448         tool_specified="$BUILD_AR"
47449         tool_basename="${tool_specified##*/}"
47450         if test "x$tool_basename" = "x$tool_specified"; then
47451           # A command without a complete path is provided, search $PATH.
47452           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
47453 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
47454           # Extract the first word of "$tool_basename", so it can be a program name with args.
47455 set dummy $tool_basename; ac_word=$2
47456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47457 $as_echo_n "checking for $ac_word... " >&6; }
47458 if ${ac_cv_path_BUILD_AR+:} false; then :
47459   $as_echo_n "(cached) " >&6
47460 else
47461   case $BUILD_AR in
47462   [\\/]* | ?:[\\/]*)
47463   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
47464   ;;
47465   *)
47466   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47467 for as_dir in $PATH
47468 do
47469   IFS=$as_save_IFS
47470   test -z "$as_dir" && as_dir=.
47471     for ac_exec_ext in '' $ac_executable_extensions; do
47472   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47473     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
47474     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47475     break 2
47476   fi
47477 done
47478   done
47479 IFS=$as_save_IFS
47480 
47481   ;;
47482 esac
47483 fi
47484 BUILD_AR=$ac_cv_path_BUILD_AR
47485 if test -n "$BUILD_AR"; then
47486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
47487 $as_echo "$BUILD_AR" >&6; }
47488 else
47489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47490 $as_echo "no" >&6; }
47491 fi
47492 
47493 
47494           if test "x$BUILD_AR" = x; then
47495             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47496           fi
47497         else
47498           # Otherwise we believe it is a complete path. Use it as it is.
47499           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
47500 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
47501           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
47502 $as_echo_n "checking for BUILD_AR... " >&6; }
47503           if test ! -x "$tool_specified"; then
47504             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47505 $as_echo "not found" >&6; }
47506             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
47507           fi
47508           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47509 $as_echo "$tool_specified" >&6; }
47510         fi
47511       fi
47512     fi
47513 
47514   fi
47515 
47516 
47517 
47518   # Only process if variable expands to non-empty
47519 
47520   if test "x$BUILD_AR" != x; then
47521     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47522 
47523   # First separate the path from the arguments. This will split at the first
47524   # space.
47525   complete="$BUILD_AR"
47526   path="${complete%% *}"
47527   tmp="$complete EOL"
47528   arguments="${tmp#* }"
47529 
47530   # Input might be given as Windows format, start by converting to
47531   # unix format.
47532   new_path=`$CYGPATH -u "$path"`
47533 
47534   # Now try to locate executable using which
47535   new_path=`$WHICH "$new_path" 2> /dev/null`
47536   # bat and cmd files are not always considered executable in cygwin causing which
47537   # to not find them
47538   if test "x$new_path" = x \
47539       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47540       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47541     new_path=`$CYGPATH -u "$path"`
47542   fi
47543   if test "x$new_path" = x; then
47544     # Oops. Which didn't find the executable.
47545     # The splitting of arguments from the executable at a space might have been incorrect,
47546     # since paths with space are more likely in Windows. Give it another try with the whole
47547     # argument.
47548     path="$complete"
47549     arguments="EOL"
47550     new_path=`$CYGPATH -u "$path"`
47551     new_path=`$WHICH "$new_path" 2> /dev/null`
47552     # bat and cmd files are not always considered executable in cygwin causing which
47553     # to not find them
47554     if test "x$new_path" = x \
47555         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47556         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47557       new_path=`$CYGPATH -u "$path"`
47558     fi
47559     if test "x$new_path" = x; then
47560       # It's still not found. Now this is an unrecoverable error.
47561       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47562 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47563       has_space=`$ECHO "$complete" | $GREP " "`
47564       if test "x$has_space" != x; then
47565         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47566 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47567       fi
47568       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47569     fi
47570   fi
47571 
47572   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47573   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47574   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47575   # "foo.exe" is OK but "foo" is an error.
47576   #
47577   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47578   # It is also a way to make sure we got the proper file name for the real test later on.
47579   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47580   if test "x$test_shortpath" = x; then
47581     # Short path failed, file does not exist as specified.
47582     # Try adding .exe or .cmd
47583     if test -f "${new_path}.exe"; then
47584       input_to_shortpath="${new_path}.exe"
47585     elif test -f "${new_path}.cmd"; then
47586       input_to_shortpath="${new_path}.cmd"
47587     else
47588       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
47589 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
47590       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47591 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47592       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47593     fi
47594   else
47595     input_to_shortpath="$new_path"
47596   fi
47597 
47598   # Call helper function which possibly converts this using DOS-style short mode.
47599   # If so, the updated path is stored in $new_path.
47600   new_path="$input_to_shortpath"
47601 
47602   input_path="$input_to_shortpath"
47603   # Check if we need to convert this using DOS-style short mode. If the path
47604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47605   # take no chances and rewrite it.
47606   # Note: m4 eats our [], so we need to use [ and ] instead.
47607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47608   if test "x$has_forbidden_chars" != x; then
47609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47613       # Going to short mode and back again did indeed matter. Since short mode is
47614       # case insensitive, let's make it lowercase to improve readability.
47615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47616       # Now convert it back to Unix-style (cygpath)
47617       input_path=`$CYGPATH -u "$shortmode_path"`
47618       new_path="$input_path"
47619     fi
47620   fi
47621 
47622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47623   if test "x$test_cygdrive_prefix" = x; then
47624     # As a simple fix, exclude /usr/bin since it's not a real path.
47625     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47627       # a path prefixed by /cygdrive for fixpath to work.
47628       new_path="$CYGWIN_ROOT_PATH$input_path"
47629     fi
47630   fi
47631 
47632   # remove trailing .exe if any
47633   new_path="${new_path/%.exe/}"
47634 
47635     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47636 
47637   # First separate the path from the arguments. This will split at the first
47638   # space.
47639   complete="$BUILD_AR"
47640   path="${complete%% *}"
47641   tmp="$complete EOL"
47642   arguments="${tmp#* }"
47643 
47644   # Input might be given as Windows format, start by converting to
47645   # unix format.
47646   new_path="$path"
47647 
47648   windows_path="$new_path"
47649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47650     unix_path=`$CYGPATH -u "$windows_path"`
47651     new_path="$unix_path"
47652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47654     new_path="$unix_path"
47655   fi
47656 
47657 
47658   # Now try to locate executable using which
47659   new_path=`$WHICH "$new_path" 2> /dev/null`
47660 
47661   if test "x$new_path" = x; then
47662     # Oops. Which didn't find the executable.
47663     # The splitting of arguments from the executable at a space might have been incorrect,
47664     # since paths with space are more likely in Windows. Give it another try with the whole
47665     # argument.
47666     path="$complete"
47667     arguments="EOL"
47668     new_path="$path"
47669 
47670   windows_path="$new_path"
47671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47672     unix_path=`$CYGPATH -u "$windows_path"`
47673     new_path="$unix_path"
47674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47676     new_path="$unix_path"
47677   fi
47678 
47679 
47680     new_path=`$WHICH "$new_path" 2> /dev/null`
47681     # bat and cmd files are not always considered executable in MSYS causing which
47682     # to not find them
47683     if test "x$new_path" = x \
47684         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47685         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47686       new_path="$path"
47687 
47688   windows_path="$new_path"
47689   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47690     unix_path=`$CYGPATH -u "$windows_path"`
47691     new_path="$unix_path"
47692   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47693     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47694     new_path="$unix_path"
47695   fi
47696 
47697     fi
47698 
47699     if test "x$new_path" = x; then
47700       # It's still not found. Now this is an unrecoverable error.
47701       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47702 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47703       has_space=`$ECHO "$complete" | $GREP " "`
47704       if test "x$has_space" != x; then
47705         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47706 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47707       fi
47708       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47709     fi
47710   fi
47711 
47712   # Now new_path has a complete unix path to the binary
47713   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47714     # Keep paths in /bin as-is, but remove trailing .exe if any
47715     new_path="${new_path/%.exe/}"
47716     # Do not save /bin paths to all_fixpath_prefixes!
47717   else
47718     # Not in mixed or Windows style, start by that.
47719     new_path=`cmd //c echo $new_path`
47720 
47721   input_path="$new_path"
47722   # Check if we need to convert this using DOS-style short mode. If the path
47723   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47724   # take no chances and rewrite it.
47725   # Note: m4 eats our [], so we need to use [ and ] instead.
47726   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47727   if test "x$has_forbidden_chars" != x; then
47728     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47729     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47730   fi
47731 
47732     # Output is in $new_path
47733 
47734   windows_path="$new_path"
47735   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47736     unix_path=`$CYGPATH -u "$windows_path"`
47737     new_path="$unix_path"
47738   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47739     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47740     new_path="$unix_path"
47741   fi
47742 
47743     # remove trailing .exe if any
47744     new_path="${new_path/%.exe/}"
47745 
47746     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47747     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47748   fi
47749 
47750     else
47751       # We're on a unix platform. Hooray! :)
47752       # First separate the path from the arguments. This will split at the first
47753       # space.
47754       complete="$BUILD_AR"
47755       path="${complete%% *}"
47756       tmp="$complete EOL"
47757       arguments="${tmp#* }"
47758 
47759       # Cannot rely on the command "which" here since it doesn't always work.
47760       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47761       if test -z "$is_absolute_path"; then
47762         # Path to executable is not absolute. Find it.
47763         IFS_save="$IFS"
47764         IFS=:
47765         for p in $PATH; do
47766           if test -f "$p/$path" && test -x "$p/$path"; then
47767             new_path="$p/$path"
47768             break
47769           fi
47770         done
47771         IFS="$IFS_save"
47772       else
47773         # This is an absolute path, we can use it without further modifications.
47774         new_path="$path"
47775       fi
47776 
47777       if test "x$new_path" = x; then
47778         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47779 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47780         has_space=`$ECHO "$complete" | $GREP " "`
47781         if test "x$has_space" != x; then
47782           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47783 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47784         fi
47785         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47786       fi
47787     fi
47788 
47789     # Now join together the path and the arguments once again
47790     if test "x$arguments" != xEOL; then
47791       new_complete="$new_path ${arguments% *}"
47792     else
47793       new_complete="$new_path"
47794     fi
47795 
47796     if test "x$complete" != "x$new_complete"; then
47797       BUILD_AR="$new_complete"
47798       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
47799 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
47800     fi
47801   fi
47802 
47803 
47804 
47805   # Publish this variable in the help.
47806 
47807 
47808   if [ -z "${BUILD_OBJCOPY+x}" ]; then
47809     # The variable is not set by user, try to locate tool using the code snippet
47810     for ac_prog in objcopy
47811 do
47812   # Extract the first word of "$ac_prog", so it can be a program name with args.
47813 set dummy $ac_prog; ac_word=$2
47814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47815 $as_echo_n "checking for $ac_word... " >&6; }
47816 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47817   $as_echo_n "(cached) " >&6
47818 else
47819   case $BUILD_OBJCOPY in
47820   [\\/]* | ?:[\\/]*)
47821   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47822   ;;
47823   *)
47824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47825 for as_dir in $PATH
47826 do
47827   IFS=$as_save_IFS
47828   test -z "$as_dir" && as_dir=.
47829     for ac_exec_ext in '' $ac_executable_extensions; do
47830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47831     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47833     break 2
47834   fi
47835 done
47836   done
47837 IFS=$as_save_IFS
47838 
47839   ;;
47840 esac
47841 fi
47842 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47843 if test -n "$BUILD_OBJCOPY"; then
47844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47845 $as_echo "$BUILD_OBJCOPY" >&6; }
47846 else
47847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47848 $as_echo "no" >&6; }
47849 fi
47850 
47851 
47852   test -n "$BUILD_OBJCOPY" && break
47853 done
47854 
47855   else
47856     # The variable is set, but is it from the command line or the environment?
47857 
47858     # Try to remove the string !BUILD_OBJCOPY! from our list.
47859     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47860     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47861       # If it failed, the variable was not from the command line. Ignore it,
47862       # but warn the user (except for BASH, which is always set by the calling BASH).
47863       if test "xBUILD_OBJCOPY" != xBASH; then
47864         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47865 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47866       fi
47867       # Try to locate tool using the code snippet
47868       for ac_prog in objcopy
47869 do
47870   # Extract the first word of "$ac_prog", so it can be a program name with args.
47871 set dummy $ac_prog; ac_word=$2
47872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47873 $as_echo_n "checking for $ac_word... " >&6; }
47874 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47875   $as_echo_n "(cached) " >&6
47876 else
47877   case $BUILD_OBJCOPY in
47878   [\\/]* | ?:[\\/]*)
47879   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47880   ;;
47881   *)
47882   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47883 for as_dir in $PATH
47884 do
47885   IFS=$as_save_IFS
47886   test -z "$as_dir" && as_dir=.
47887     for ac_exec_ext in '' $ac_executable_extensions; do
47888   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47889     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47890     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47891     break 2
47892   fi
47893 done
47894   done
47895 IFS=$as_save_IFS
47896 
47897   ;;
47898 esac
47899 fi
47900 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47901 if test -n "$BUILD_OBJCOPY"; then
47902   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47903 $as_echo "$BUILD_OBJCOPY" >&6; }
47904 else
47905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47906 $as_echo "no" >&6; }
47907 fi
47908 
47909 
47910   test -n "$BUILD_OBJCOPY" && break
47911 done
47912 
47913     else
47914       # If it succeeded, then it was overridden by the user. We will use it
47915       # for the tool.
47916 
47917       # First remove it from the list of overridden variables, so we can test
47918       # for unknown variables in the end.
47919       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47920 
47921       # Check if we try to supply an empty value
47922       if test "x$BUILD_OBJCOPY" = x; then
47923         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47924 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47926 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47927         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47928 $as_echo "disabled" >&6; }
47929       else
47930         # Check if the provided tool contains a complete path.
47931         tool_specified="$BUILD_OBJCOPY"
47932         tool_basename="${tool_specified##*/}"
47933         if test "x$tool_basename" = "x$tool_specified"; then
47934           # A command without a complete path is provided, search $PATH.
47935           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47936 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47937           # Extract the first word of "$tool_basename", so it can be a program name with args.
47938 set dummy $tool_basename; ac_word=$2
47939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47940 $as_echo_n "checking for $ac_word... " >&6; }
47941 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47942   $as_echo_n "(cached) " >&6
47943 else
47944   case $BUILD_OBJCOPY in
47945   [\\/]* | ?:[\\/]*)
47946   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47947   ;;
47948   *)
47949   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47950 for as_dir in $PATH
47951 do
47952   IFS=$as_save_IFS
47953   test -z "$as_dir" && as_dir=.
47954     for ac_exec_ext in '' $ac_executable_extensions; do
47955   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47956     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47957     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47958     break 2
47959   fi
47960 done
47961   done
47962 IFS=$as_save_IFS
47963 
47964   ;;
47965 esac
47966 fi
47967 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47968 if test -n "$BUILD_OBJCOPY"; then
47969   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47970 $as_echo "$BUILD_OBJCOPY" >&6; }
47971 else
47972   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47973 $as_echo "no" >&6; }
47974 fi
47975 
47976 
47977           if test "x$BUILD_OBJCOPY" = x; then
47978             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47979           fi
47980         else
47981           # Otherwise we believe it is a complete path. Use it as it is.
47982           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47983 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47984           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47985 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47986           if test ! -x "$tool_specified"; then
47987             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47988 $as_echo "not found" >&6; }
47989             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47990           fi
47991           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47992 $as_echo "$tool_specified" >&6; }
47993         fi
47994       fi
47995     fi
47996 
47997   fi
47998 
47999 
48000 
48001   # Only process if variable expands to non-empty
48002 
48003   if test "x$BUILD_OBJCOPY" != x; then
48004     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48005 
48006   # First separate the path from the arguments. This will split at the first
48007   # space.
48008   complete="$BUILD_OBJCOPY"
48009   path="${complete%% *}"
48010   tmp="$complete EOL"
48011   arguments="${tmp#* }"
48012 
48013   # Input might be given as Windows format, start by converting to
48014   # unix format.
48015   new_path=`$CYGPATH -u "$path"`
48016 
48017   # Now try to locate executable using which
48018   new_path=`$WHICH "$new_path" 2> /dev/null`
48019   # bat and cmd files are not always considered executable in cygwin causing which
48020   # to not find them
48021   if test "x$new_path" = x \
48022       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48023       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48024     new_path=`$CYGPATH -u "$path"`
48025   fi
48026   if test "x$new_path" = x; then
48027     # Oops. Which didn't find the executable.
48028     # The splitting of arguments from the executable at a space might have been incorrect,
48029     # since paths with space are more likely in Windows. Give it another try with the whole
48030     # argument.
48031     path="$complete"
48032     arguments="EOL"
48033     new_path=`$CYGPATH -u "$path"`
48034     new_path=`$WHICH "$new_path" 2> /dev/null`
48035     # bat and cmd files are not always considered executable in cygwin causing which
48036     # to not find them
48037     if test "x$new_path" = x \
48038         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48039         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48040       new_path=`$CYGPATH -u "$path"`
48041     fi
48042     if test "x$new_path" = x; then
48043       # It's still not found. Now this is an unrecoverable error.
48044       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
48045 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
48046       has_space=`$ECHO "$complete" | $GREP " "`
48047       if test "x$has_space" != x; then
48048         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48049 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48050       fi
48051       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48052     fi
48053   fi
48054 
48055   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48056   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48057   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48058   # "foo.exe" is OK but "foo" is an error.
48059   #
48060   # This test is therefore slightly more accurate than "test -f" to check for file presence.
48061   # It is also a way to make sure we got the proper file name for the real test later on.
48062   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48063   if test "x$test_shortpath" = x; then
48064     # Short path failed, file does not exist as specified.
48065     # Try adding .exe or .cmd
48066     if test -f "${new_path}.exe"; then
48067       input_to_shortpath="${new_path}.exe"
48068     elif test -f "${new_path}.cmd"; then
48069       input_to_shortpath="${new_path}.cmd"
48070     else
48071       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
48072 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
48073       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
48074 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
48075       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48076     fi
48077   else
48078     input_to_shortpath="$new_path"
48079   fi
48080 
48081   # Call helper function which possibly converts this using DOS-style short mode.
48082   # If so, the updated path is stored in $new_path.
48083   new_path="$input_to_shortpath"
48084 
48085   input_path="$input_to_shortpath"
48086   # Check if we need to convert this using DOS-style short mode. If the path
48087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48088   # take no chances and rewrite it.
48089   # Note: m4 eats our [], so we need to use [ and ] instead.
48090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48091   if test "x$has_forbidden_chars" != x; then
48092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48096       # Going to short mode and back again did indeed matter. Since short mode is
48097       # case insensitive, let's make it lowercase to improve readability.
48098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48099       # Now convert it back to Unix-style (cygpath)
48100       input_path=`$CYGPATH -u "$shortmode_path"`
48101       new_path="$input_path"
48102     fi
48103   fi
48104 
48105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48106   if test "x$test_cygdrive_prefix" = x; then
48107     # As a simple fix, exclude /usr/bin since it's not a real path.
48108     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
48109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48110       # a path prefixed by /cygdrive for fixpath to work.
48111       new_path="$CYGWIN_ROOT_PATH$input_path"
48112     fi
48113   fi
48114 
48115   # remove trailing .exe if any
48116   new_path="${new_path/%.exe/}"
48117 
48118     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48119 
48120   # First separate the path from the arguments. This will split at the first
48121   # space.
48122   complete="$BUILD_OBJCOPY"
48123   path="${complete%% *}"
48124   tmp="$complete EOL"
48125   arguments="${tmp#* }"
48126 
48127   # Input might be given as Windows format, start by converting to
48128   # unix format.
48129   new_path="$path"
48130 
48131   windows_path="$new_path"
48132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48133     unix_path=`$CYGPATH -u "$windows_path"`
48134     new_path="$unix_path"
48135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48137     new_path="$unix_path"
48138   fi
48139 
48140 
48141   # Now try to locate executable using which
48142   new_path=`$WHICH "$new_path" 2> /dev/null`
48143 
48144   if test "x$new_path" = x; then
48145     # Oops. Which didn't find the executable.
48146     # The splitting of arguments from the executable at a space might have been incorrect,
48147     # since paths with space are more likely in Windows. Give it another try with the whole
48148     # argument.
48149     path="$complete"
48150     arguments="EOL"
48151     new_path="$path"
48152 
48153   windows_path="$new_path"
48154   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48155     unix_path=`$CYGPATH -u "$windows_path"`
48156     new_path="$unix_path"
48157   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48158     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48159     new_path="$unix_path"
48160   fi
48161 
48162 
48163     new_path=`$WHICH "$new_path" 2> /dev/null`
48164     # bat and cmd files are not always considered executable in MSYS causing which
48165     # to not find them
48166     if test "x$new_path" = x \
48167         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48168         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48169       new_path="$path"
48170 
48171   windows_path="$new_path"
48172   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48173     unix_path=`$CYGPATH -u "$windows_path"`
48174     new_path="$unix_path"
48175   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48176     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48177     new_path="$unix_path"
48178   fi
48179 
48180     fi
48181 
48182     if test "x$new_path" = x; then
48183       # It's still not found. Now this is an unrecoverable error.
48184       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
48185 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
48186       has_space=`$ECHO "$complete" | $GREP " "`
48187       if test "x$has_space" != x; then
48188         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48189 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48190       fi
48191       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48192     fi
48193   fi
48194 
48195   # Now new_path has a complete unix path to the binary
48196   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
48197     # Keep paths in /bin as-is, but remove trailing .exe if any
48198     new_path="${new_path/%.exe/}"
48199     # Do not save /bin paths to all_fixpath_prefixes!
48200   else
48201     # Not in mixed or Windows style, start by that.
48202     new_path=`cmd //c echo $new_path`
48203 
48204   input_path="$new_path"
48205   # Check if we need to convert this using DOS-style short mode. If the path
48206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48207   # take no chances and rewrite it.
48208   # Note: m4 eats our [], so we need to use [ and ] instead.
48209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48210   if test "x$has_forbidden_chars" != x; then
48211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48213   fi
48214 
48215     # Output is in $new_path
48216 
48217   windows_path="$new_path"
48218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48219     unix_path=`$CYGPATH -u "$windows_path"`
48220     new_path="$unix_path"
48221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48223     new_path="$unix_path"
48224   fi
48225 
48226     # remove trailing .exe if any
48227     new_path="${new_path/%.exe/}"
48228 
48229     # Save the first 10 bytes of this path to the storage, so fixpath can work.
48230     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48231   fi
48232 
48233     else
48234       # We're on a unix platform. Hooray! :)
48235       # First separate the path from the arguments. This will split at the first
48236       # space.
48237       complete="$BUILD_OBJCOPY"
48238       path="${complete%% *}"
48239       tmp="$complete EOL"
48240       arguments="${tmp#* }"
48241 
48242       # Cannot rely on the command "which" here since it doesn't always work.
48243       is_absolute_path=`$ECHO "$path" | $GREP ^/`
48244       if test -z "$is_absolute_path"; then
48245         # Path to executable is not absolute. Find it.
48246         IFS_save="$IFS"
48247         IFS=:
48248         for p in $PATH; do
48249           if test -f "$p/$path" && test -x "$p/$path"; then
48250             new_path="$p/$path"
48251             break
48252           fi
48253         done
48254         IFS="$IFS_save"
48255       else
48256         # This is an absolute path, we can use it without further modifications.
48257         new_path="$path"
48258       fi
48259 
48260       if test "x$new_path" = x; then
48261         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
48262 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
48263         has_space=`$ECHO "$complete" | $GREP " "`
48264         if test "x$has_space" != x; then
48265           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
48266 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
48267         fi
48268         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48269       fi
48270     fi
48271 
48272     # Now join together the path and the arguments once again
48273     if test "x$arguments" != xEOL; then
48274       new_complete="$new_path ${arguments% *}"
48275     else
48276       new_complete="$new_path"
48277     fi
48278 
48279     if test "x$complete" != "x$new_complete"; then
48280       BUILD_OBJCOPY="$new_complete"
48281       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
48282 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
48283     fi
48284   fi
48285 
48286 
48287 
48288   # Publish this variable in the help.
48289 
48290 
48291   if [ -z "${BUILD_STRIP+x}" ]; then
48292     # The variable is not set by user, try to locate tool using the code snippet
48293     for ac_prog in strip
48294 do
48295   # Extract the first word of "$ac_prog", so it can be a program name with args.
48296 set dummy $ac_prog; ac_word=$2
48297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48298 $as_echo_n "checking for $ac_word... " >&6; }
48299 if ${ac_cv_path_BUILD_STRIP+:} false; then :
48300   $as_echo_n "(cached) " >&6
48301 else
48302   case $BUILD_STRIP in
48303   [\\/]* | ?:[\\/]*)
48304   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
48305   ;;
48306   *)
48307   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48308 for as_dir in $PATH
48309 do
48310   IFS=$as_save_IFS
48311   test -z "$as_dir" && as_dir=.
48312     for ac_exec_ext in '' $ac_executable_extensions; do
48313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48314     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
48315     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48316     break 2
48317   fi
48318 done
48319   done
48320 IFS=$as_save_IFS
48321 
48322   ;;
48323 esac
48324 fi
48325 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
48326 if test -n "$BUILD_STRIP"; then
48327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
48328 $as_echo "$BUILD_STRIP" >&6; }
48329 else
48330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48331 $as_echo "no" >&6; }
48332 fi
48333 
48334 
48335   test -n "$BUILD_STRIP" && break
48336 done
48337 
48338   else
48339     # The variable is set, but is it from the command line or the environment?
48340 
48341     # Try to remove the string !BUILD_STRIP! from our list.
48342     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
48343     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48344       # If it failed, the variable was not from the command line. Ignore it,
48345       # but warn the user (except for BASH, which is always set by the calling BASH).
48346       if test "xBUILD_STRIP" != xBASH; then
48347         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
48348 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
48349       fi
48350       # Try to locate tool using the code snippet
48351       for ac_prog in strip
48352 do
48353   # Extract the first word of "$ac_prog", so it can be a program name with args.
48354 set dummy $ac_prog; ac_word=$2
48355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48356 $as_echo_n "checking for $ac_word... " >&6; }
48357 if ${ac_cv_path_BUILD_STRIP+:} false; then :
48358   $as_echo_n "(cached) " >&6
48359 else
48360   case $BUILD_STRIP in
48361   [\\/]* | ?:[\\/]*)
48362   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
48363   ;;
48364   *)
48365   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48366 for as_dir in $PATH
48367 do
48368   IFS=$as_save_IFS
48369   test -z "$as_dir" && as_dir=.
48370     for ac_exec_ext in '' $ac_executable_extensions; do
48371   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48372     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
48373     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48374     break 2
48375   fi
48376 done
48377   done
48378 IFS=$as_save_IFS
48379 
48380   ;;
48381 esac
48382 fi
48383 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
48384 if test -n "$BUILD_STRIP"; then
48385   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
48386 $as_echo "$BUILD_STRIP" >&6; }
48387 else
48388   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48389 $as_echo "no" >&6; }
48390 fi
48391 
48392 
48393   test -n "$BUILD_STRIP" && break
48394 done
48395 
48396     else
48397       # If it succeeded, then it was overridden by the user. We will use it
48398       # for the tool.
48399 
48400       # First remove it from the list of overridden variables, so we can test
48401       # for unknown variables in the end.
48402       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48403 
48404       # Check if we try to supply an empty value
48405       if test "x$BUILD_STRIP" = x; then
48406         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
48407 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
48408         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
48409 $as_echo_n "checking for BUILD_STRIP... " >&6; }
48410         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48411 $as_echo "disabled" >&6; }
48412       else
48413         # Check if the provided tool contains a complete path.
48414         tool_specified="$BUILD_STRIP"
48415         tool_basename="${tool_specified##*/}"
48416         if test "x$tool_basename" = "x$tool_specified"; then
48417           # A command without a complete path is provided, search $PATH.
48418           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
48419 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
48420           # Extract the first word of "$tool_basename", so it can be a program name with args.
48421 set dummy $tool_basename; ac_word=$2
48422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48423 $as_echo_n "checking for $ac_word... " >&6; }
48424 if ${ac_cv_path_BUILD_STRIP+:} false; then :
48425   $as_echo_n "(cached) " >&6
48426 else
48427   case $BUILD_STRIP in
48428   [\\/]* | ?:[\\/]*)
48429   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
48430   ;;
48431   *)
48432   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48433 for as_dir in $PATH
48434 do
48435   IFS=$as_save_IFS
48436   test -z "$as_dir" && as_dir=.
48437     for ac_exec_ext in '' $ac_executable_extensions; do
48438   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48439     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
48440     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48441     break 2
48442   fi
48443 done
48444   done
48445 IFS=$as_save_IFS
48446 
48447   ;;
48448 esac
48449 fi
48450 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
48451 if test -n "$BUILD_STRIP"; then
48452   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
48453 $as_echo "$BUILD_STRIP" >&6; }
48454 else
48455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48456 $as_echo "no" >&6; }
48457 fi
48458 
48459 
48460           if test "x$BUILD_STRIP" = x; then
48461             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48462           fi
48463         else
48464           # Otherwise we believe it is a complete path. Use it as it is.
48465           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
48466 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
48467           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
48468 $as_echo_n "checking for BUILD_STRIP... " >&6; }
48469           if test ! -x "$tool_specified"; then
48470             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48471 $as_echo "not found" >&6; }
48472             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
48473           fi
48474           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48475 $as_echo "$tool_specified" >&6; }
48476         fi
48477       fi
48478     fi
48479 
48480   fi
48481 
48482 
48483 
48484   # Only process if variable expands to non-empty
48485 
48486   if test "x$BUILD_STRIP" != x; then
48487     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48488 
48489   # First separate the path from the arguments. This will split at the first
48490   # space.
48491   complete="$BUILD_STRIP"
48492   path="${complete%% *}"
48493   tmp="$complete EOL"
48494   arguments="${tmp#* }"
48495 
48496   # Input might be given as Windows format, start by converting to
48497   # unix format.
48498   new_path=`$CYGPATH -u "$path"`
48499 
48500   # Now try to locate executable using which
48501   new_path=`$WHICH "$new_path" 2> /dev/null`
48502   # bat and cmd files are not always considered executable in cygwin causing which
48503   # to not find them
48504   if test "x$new_path" = x \
48505       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48506       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48507     new_path=`$CYGPATH -u "$path"`
48508   fi
48509   if test "x$new_path" = x; then
48510     # Oops. Which didn't find the executable.
48511     # The splitting of arguments from the executable at a space might have been incorrect,
48512     # since paths with space are more likely in Windows. Give it another try with the whole
48513     # argument.
48514     path="$complete"
48515     arguments="EOL"
48516     new_path=`$CYGPATH -u "$path"`
48517     new_path=`$WHICH "$new_path" 2> /dev/null`
48518     # bat and cmd files are not always considered executable in cygwin causing which
48519     # to not find them
48520     if test "x$new_path" = x \
48521         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48522         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48523       new_path=`$CYGPATH -u "$path"`
48524     fi
48525     if test "x$new_path" = x; then
48526       # It's still not found. Now this is an unrecoverable error.
48527       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
48528 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
48529       has_space=`$ECHO "$complete" | $GREP " "`
48530       if test "x$has_space" != x; then
48531         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48532 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48533       fi
48534       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48535     fi
48536   fi
48537 
48538   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48539   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48540   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48541   # "foo.exe" is OK but "foo" is an error.
48542   #
48543   # This test is therefore slightly more accurate than "test -f" to check for file presence.
48544   # It is also a way to make sure we got the proper file name for the real test later on.
48545   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48546   if test "x$test_shortpath" = x; then
48547     # Short path failed, file does not exist as specified.
48548     # Try adding .exe or .cmd
48549     if test -f "${new_path}.exe"; then
48550       input_to_shortpath="${new_path}.exe"
48551     elif test -f "${new_path}.cmd"; then
48552       input_to_shortpath="${new_path}.cmd"
48553     else
48554       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
48555 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
48556       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
48557 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
48558       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48559     fi
48560   else
48561     input_to_shortpath="$new_path"
48562   fi
48563 
48564   # Call helper function which possibly converts this using DOS-style short mode.
48565   # If so, the updated path is stored in $new_path.
48566   new_path="$input_to_shortpath"
48567 
48568   input_path="$input_to_shortpath"
48569   # Check if we need to convert this using DOS-style short mode. If the path
48570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48571   # take no chances and rewrite it.
48572   # Note: m4 eats our [], so we need to use [ and ] instead.
48573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48574   if test "x$has_forbidden_chars" != x; then
48575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48576     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48577     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48578     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48579       # Going to short mode and back again did indeed matter. Since short mode is
48580       # case insensitive, let's make it lowercase to improve readability.
48581       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48582       # Now convert it back to Unix-style (cygpath)
48583       input_path=`$CYGPATH -u "$shortmode_path"`
48584       new_path="$input_path"
48585     fi
48586   fi
48587 
48588   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48589   if test "x$test_cygdrive_prefix" = x; then
48590     # As a simple fix, exclude /usr/bin since it's not a real path.
48591     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
48592       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48593       # a path prefixed by /cygdrive for fixpath to work.
48594       new_path="$CYGWIN_ROOT_PATH$input_path"
48595     fi
48596   fi
48597 
48598   # remove trailing .exe if any
48599   new_path="${new_path/%.exe/}"
48600 
48601     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48602 
48603   # First separate the path from the arguments. This will split at the first
48604   # space.
48605   complete="$BUILD_STRIP"
48606   path="${complete%% *}"
48607   tmp="$complete EOL"
48608   arguments="${tmp#* }"
48609 
48610   # Input might be given as Windows format, start by converting to
48611   # unix format.
48612   new_path="$path"
48613 
48614   windows_path="$new_path"
48615   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48616     unix_path=`$CYGPATH -u "$windows_path"`
48617     new_path="$unix_path"
48618   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48619     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48620     new_path="$unix_path"
48621   fi
48622 
48623 
48624   # Now try to locate executable using which
48625   new_path=`$WHICH "$new_path" 2> /dev/null`
48626 
48627   if test "x$new_path" = x; then
48628     # Oops. Which didn't find the executable.
48629     # The splitting of arguments from the executable at a space might have been incorrect,
48630     # since paths with space are more likely in Windows. Give it another try with the whole
48631     # argument.
48632     path="$complete"
48633     arguments="EOL"
48634     new_path="$path"
48635 
48636   windows_path="$new_path"
48637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48638     unix_path=`$CYGPATH -u "$windows_path"`
48639     new_path="$unix_path"
48640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48642     new_path="$unix_path"
48643   fi
48644 
48645 
48646     new_path=`$WHICH "$new_path" 2> /dev/null`
48647     # bat and cmd files are not always considered executable in MSYS causing which
48648     # to not find them
48649     if test "x$new_path" = x \
48650         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48651         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48652       new_path="$path"
48653 
48654   windows_path="$new_path"
48655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48656     unix_path=`$CYGPATH -u "$windows_path"`
48657     new_path="$unix_path"
48658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48660     new_path="$unix_path"
48661   fi
48662 
48663     fi
48664 
48665     if test "x$new_path" = x; then
48666       # It's still not found. Now this is an unrecoverable error.
48667       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
48668 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
48669       has_space=`$ECHO "$complete" | $GREP " "`
48670       if test "x$has_space" != x; then
48671         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48672 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48673       fi
48674       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48675     fi
48676   fi
48677 
48678   # Now new_path has a complete unix path to the binary
48679   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
48680     # Keep paths in /bin as-is, but remove trailing .exe if any
48681     new_path="${new_path/%.exe/}"
48682     # Do not save /bin paths to all_fixpath_prefixes!
48683   else
48684     # Not in mixed or Windows style, start by that.
48685     new_path=`cmd //c echo $new_path`
48686 
48687   input_path="$new_path"
48688   # Check if we need to convert this using DOS-style short mode. If the path
48689   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48690   # take no chances and rewrite it.
48691   # Note: m4 eats our [], so we need to use [ and ] instead.
48692   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48693   if test "x$has_forbidden_chars" != x; then
48694     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48695     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48696   fi
48697 
48698     # Output is in $new_path
48699 
48700   windows_path="$new_path"
48701   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48702     unix_path=`$CYGPATH -u "$windows_path"`
48703     new_path="$unix_path"
48704   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48705     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48706     new_path="$unix_path"
48707   fi
48708 
48709     # remove trailing .exe if any
48710     new_path="${new_path/%.exe/}"
48711 
48712     # Save the first 10 bytes of this path to the storage, so fixpath can work.
48713     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48714   fi
48715 
48716     else
48717       # We're on a unix platform. Hooray! :)
48718       # First separate the path from the arguments. This will split at the first
48719       # space.
48720       complete="$BUILD_STRIP"
48721       path="${complete%% *}"
48722       tmp="$complete EOL"
48723       arguments="${tmp#* }"
48724 
48725       # Cannot rely on the command "which" here since it doesn't always work.
48726       is_absolute_path=`$ECHO "$path" | $GREP ^/`
48727       if test -z "$is_absolute_path"; then
48728         # Path to executable is not absolute. Find it.
48729         IFS_save="$IFS"
48730         IFS=:
48731         for p in $PATH; do
48732           if test -f "$p/$path" && test -x "$p/$path"; then
48733             new_path="$p/$path"
48734             break
48735           fi
48736         done
48737         IFS="$IFS_save"
48738       else
48739         # This is an absolute path, we can use it without further modifications.
48740         new_path="$path"
48741       fi
48742 
48743       if test "x$new_path" = x; then
48744         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
48745 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
48746         has_space=`$ECHO "$complete" | $GREP " "`
48747         if test "x$has_space" != x; then
48748           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
48749 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
48750         fi
48751         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48752       fi
48753     fi
48754 
48755     # Now join together the path and the arguments once again
48756     if test "x$arguments" != xEOL; then
48757       new_complete="$new_path ${arguments% *}"
48758     else
48759       new_complete="$new_path"
48760     fi
48761 
48762     if test "x$complete" != "x$new_complete"; then
48763       BUILD_STRIP="$new_complete"
48764       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
48765 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
48766     fi
48767   fi
48768 
48769     # Assume the C compiler is the assembler
48770     BUILD_AS="$BUILD_CC -c"
48771     # Just like for the target compiler, use the compiler as linker
48772     BUILD_LD="$BUILD_CC"
48773     BUILD_LDCXX="$BUILD_CXX"
48774 
48775     PATH="$OLDPATH"
48776 
48777 
48778   COMPILER=$BUILD_CC
48779   COMPILER_NAME=BuildC
48780 
48781   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48782     # cc -V output typically looks like
48783     #     cc: Sun C 5.12 Linux_i386 2011/11/16
48784     # or
48785     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48786     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48787     # Check that this is likely to be the Solaris Studio cc.
48788     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48789     if test $? -ne 0; then
48790       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48791       { $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
48792 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48793       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48794 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48795       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48796 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48797       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48798     fi
48799     # Remove usage instructions (if present), and
48800     # collapse compiler output into a single line
48801     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48802         $SED -e 's/ *[Uu]sage:.*//'`
48803     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48804         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48805   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48806     # xlc -qversion output typically looks like
48807     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48808     #     Version: 11.01.0000.0015
48809     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48810     # Check that this is likely to be the IBM XL C compiler.
48811     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48812     if test $? -ne 0; then
48813       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48814       { $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
48815 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48816       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48817 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48818       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48819 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48820       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48821     fi
48822     # Collapse compiler output into a single line
48823     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48824     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48825         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48826   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48827     # There is no specific version flag, but all output starts with a version string.
48828     # First line typically looks something like:
48829     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48830     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48831     # Check that this is likely to be Microsoft CL.EXE.
48832     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48833     if test $? -ne 0; then
48834       { $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
48835 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48836       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48837 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48838       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48839     fi
48840     # Collapse compiler output into a single line
48841     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48842     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48843         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48844   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48845     # gcc --version output typically looks like
48846     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48847     #     Copyright (C) 2013 Free Software Foundation, Inc.
48848     #     This is free software; see the source for copying conditions.  There is NO
48849     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48850     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48851     # Check that this is likely to be GCC.
48852     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48853     if test $? -ne 0; then
48854       { $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
48855 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48856       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48857 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48858       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48859     fi
48860     # Remove Copyright and legalese from version string, and
48861     # collapse into a single line
48862     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48863         $SED -e 's/ *Copyright .*//'`
48864     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48865         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48866   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48867     # clang --version output typically looks like
48868     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48869     #    clang version 3.3 (tags/RELEASE_33/final)
48870     # or
48871     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48872     #    Target: x86_64-pc-linux-gnu
48873     #    Thread model: posix
48874     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48875     # Check that this is likely to be clang
48876     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48877     if test $? -ne 0; then
48878       { $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
48879 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48880       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48881 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48882       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48883     fi
48884     # Collapse compiler output into a single line
48885     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48886     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48887         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48888   else
48889       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48890   fi
48891   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48892   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48893   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48894   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48895 
48896   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48897 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48898 
48899 
48900   COMPILER=$BUILD_CXX
48901   COMPILER_NAME=BuildC++
48902 
48903   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48904     # cc -V output typically looks like
48905     #     cc: Sun C 5.12 Linux_i386 2011/11/16
48906     # or
48907     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48908     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48909     # Check that this is likely to be the Solaris Studio cc.
48910     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48911     if test $? -ne 0; then
48912       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48913       { $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
48914 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48915       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48916 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48917       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48918 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48919       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48920     fi
48921     # Remove usage instructions (if present), and
48922     # collapse compiler output into a single line
48923     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48924         $SED -e 's/ *[Uu]sage:.*//'`
48925     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48926         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48927   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48928     # xlc -qversion output typically looks like
48929     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48930     #     Version: 11.01.0000.0015
48931     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48932     # Check that this is likely to be the IBM XL C compiler.
48933     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48934     if test $? -ne 0; then
48935       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48936       { $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
48937 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48938       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48939 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48940       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48941 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48942       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48943     fi
48944     # Collapse compiler output into a single line
48945     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48946     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48947         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48948   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48949     # There is no specific version flag, but all output starts with a version string.
48950     # First line typically looks something like:
48951     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48952     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48953     # Check that this is likely to be Microsoft CL.EXE.
48954     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48955     if test $? -ne 0; then
48956       { $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
48957 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48958       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48959 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48960       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48961     fi
48962     # Collapse compiler output into a single line
48963     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48964     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48965         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48966   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48967     # gcc --version output typically looks like
48968     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48969     #     Copyright (C) 2013 Free Software Foundation, Inc.
48970     #     This is free software; see the source for copying conditions.  There is NO
48971     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48972     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48973     # Check that this is likely to be GCC.
48974     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48975     if test $? -ne 0; then
48976       { $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
48977 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48978       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48979 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48980       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48981     fi
48982     # Remove Copyright and legalese from version string, and
48983     # collapse into a single line
48984     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48985         $SED -e 's/ *Copyright .*//'`
48986     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48987         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48988   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48989     # clang --version output typically looks like
48990     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48991     #    clang version 3.3 (tags/RELEASE_33/final)
48992     # or
48993     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48994     #    Target: x86_64-pc-linux-gnu
48995     #    Thread model: posix
48996     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48997     # Check that this is likely to be clang
48998     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48999     if test $? -ne 0; then
49000       { $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
49001 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49002       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49003 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49004       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49005     fi
49006     # Collapse compiler output into a single line
49007     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49008     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49009         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
49010   else
49011       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
49012   fi
49013   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
49014   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
49015   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
49016   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
49017 
49018   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
49019 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
49020 
49021 
49022   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
49023     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&5
49024 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
49025     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
49026 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
49027   fi
49028 
49029   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
49030   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
49031     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
49032 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
49033   fi
49034 
49035   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
49036     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
49037 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
49038   fi
49039 
49040   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
49041 
49042   else
49043     # If we are not cross compiling, use the normal target compilers for
49044     # building the build platform executables.
49045     BUILD_CC="$CC"
49046     BUILD_CXX="$CXX"
49047     BUILD_LD="$LD"
49048     BUILD_LDCXX="$LDCXX"
49049     BUILD_NM="$NM"
49050     BUILD_AS="$AS"
49051     BUILD_OBJCOPY="$OBJCOPY"
49052     BUILD_STRIP="$STRIP"
49053     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
49054     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
49055     BUILD_AR="$AR"
49056 
49057 
49058   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
49059     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
49060 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
49061     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
49062 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
49063   fi
49064 
49065   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
49066   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
49067     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
49068 $as_echo "$as_me: WARNING: C compiler version number has more than four parts (W.X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
49069   fi
49070 
49071   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
49072     { $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
49073 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
49074   fi
49075 
49076   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
49077 
49078   fi
49079 
49080 
49081 
49082 
49083 
49084 
49085 
49086 
49087 
49088 
49089 
49090 
49091 
49092 
49093   # The package path is used only on macosx?
49094   # FIXME: clean this up, and/or move it elsewhere.
49095   PACKAGE_PATH=/opt/local
49096 
49097 
49098   # Check for extra potential brokenness.
49099   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49100     # On Windows, double-check that we got the right compiler.
49101     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
49102     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
49103     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
49104       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
49105         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
49106       fi
49107     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
49108       if test "x$COMPILER_CPU_TEST" != "xx64"; then
49109         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
49110       fi
49111     fi
49112   fi
49113 
49114   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49115     # If this is a --hash-style=gnu system, use --hash-style=both, why?
49116     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
49117     # This is later checked when setting flags.
49118 
49119     # "-Og" suppported for GCC 4.8 and later
49120     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
49121 
49122 
49123 
49124 
49125 
49126 
49127 
49128 
49129 
49130 
49131 
49132 
49133 
49134 
49135 
49136 
49137 
49138 
49139 
49140 
49141 
49142 
49143 
49144 
49145 
49146 
49147 
49148 
49149 
49150 
49151 
49152 
49153 
49154 
49155 
49156 
49157 
49158 
49159 
49160 
49161 
49162 
49163 
49164 
49165 
49166 
49167 
49168     # Execute function body
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 
49205 
49206 
49207 
49208 
49209 
49210 
49211 
49212 
49213 
49214 
49215 
49216 
49217     # Execute function body
49218 
49219   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
49220 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
49221   supports=yes
49222 
49223   saved_cflags="$CFLAGS"
49224   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
49225   ac_ext=c
49226 ac_cpp='$CPP $CPPFLAGS'
49227 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49228 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49229 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49230 
49231   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49232 /* end confdefs.h.  */
49233 int i;
49234 _ACEOF
49235 if ac_fn_c_try_compile "$LINENO"; then :
49236 
49237 else
49238   supports=no
49239 fi
49240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49241   ac_ext=cpp
49242 ac_cpp='$CXXCPP $CPPFLAGS'
49243 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49244 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49245 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49246 
49247   CFLAGS="$saved_cflags"
49248 
49249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49250 $as_echo "$supports" >&6; }
49251   if test "x$supports" = "xyes" ; then
49252     :
49253     C_COMP_SUPPORTS="yes"
49254   else
49255     :
49256     C_COMP_SUPPORTS="no"
49257   fi
49258 
49259 
49260 
49261 
49262 
49263 
49264 
49265 
49266 
49267 
49268 
49269 
49270 
49271 
49272 
49273 
49274 
49275 
49276 
49277 
49278 
49279 
49280 
49281 
49282 
49283 
49284 
49285 
49286 
49287 
49288 
49289 
49290 
49291 
49292 
49293 
49294 
49295 
49296 
49297 
49298 
49299 
49300 
49301 
49302 
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317     # Execute function body
49318 
49319   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
49320 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
49321   supports=yes
49322 
49323   saved_cxxflags="$CXXFLAGS"
49324   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
49325   ac_ext=cpp
49326 ac_cpp='$CXXCPP $CPPFLAGS'
49327 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49328 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49329 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49330 
49331   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49332 /* end confdefs.h.  */
49333 int i;
49334 _ACEOF
49335 if ac_fn_cxx_try_compile "$LINENO"; then :
49336 
49337 else
49338   supports=no
49339 fi
49340 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49341   ac_ext=cpp
49342 ac_cpp='$CXXCPP $CPPFLAGS'
49343 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49344 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49345 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49346 
49347   CXXFLAGS="$saved_cxxflags"
49348 
49349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49350 $as_echo "$supports" >&6; }
49351   if test "x$supports" = "xyes" ; then
49352     :
49353     CXX_COMP_SUPPORTS="yes"
49354   else
49355     :
49356     CXX_COMP_SUPPORTS="no"
49357   fi
49358 
49359 
49360 
49361 
49362 
49363 
49364 
49365 
49366 
49367 
49368 
49369 
49370 
49371   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
49372 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
49373   supports=no
49374   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49375 
49376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49377 $as_echo "$supports" >&6; }
49378   if test "x$supports" = "xyes" ; then
49379     :
49380     HAS_CFLAG_OPTIMIZE_DEBUG=true
49381   else
49382     :
49383     HAS_CFLAG_OPTIMIZE_DEBUG=false
49384   fi
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392     # "-z relro" supported in GNU binutils 2.17 and later
49393     LINKER_RELRO_FLAG="-Wl,-z,relro"
49394 
49395 
49396 
49397 
49398 
49399 
49400 
49401 
49402 
49403 
49404 
49405 
49406 
49407 
49408 
49409 
49410 
49411 
49412 
49413 
49414 
49415 
49416 
49417 
49418 
49419 
49420 
49421 
49422 
49423 
49424 
49425 
49426 
49427 
49428 
49429 
49430 
49431 
49432 
49433 
49434 
49435 
49436 
49437 
49438 
49439 
49440 
49441     # Execute function body
49442 
49443   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
49444 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
49445   supports=yes
49446 
49447   saved_ldflags="$LDFLAGS"
49448   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
49449   ac_ext=c
49450 ac_cpp='$CPP $CPPFLAGS'
49451 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49452 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49453 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49454 
49455   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49456 /* end confdefs.h.  */
49457 
49458 int
49459 main ()
49460 {
49461 
49462   ;
49463   return 0;
49464 }
49465 _ACEOF
49466 if ac_fn_c_try_link "$LINENO"; then :
49467 
49468 else
49469   supports=no
49470 fi
49471 rm -f core conftest.err conftest.$ac_objext \
49472     conftest$ac_exeext conftest.$ac_ext
49473   ac_ext=cpp
49474 ac_cpp='$CXXCPP $CPPFLAGS'
49475 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49476 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49477 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49478 
49479   LDFLAGS="$saved_ldflags"
49480 
49481   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49482 $as_echo "$supports" >&6; }
49483   if test "x$supports" = "xyes" ; then
49484     :
49485     HAS_LINKER_RELRO=true
49486   else
49487     :
49488     HAS_LINKER_RELRO=false
49489   fi
49490 
49491 
49492 
49493 
49494 
49495 
49496 
49497 
49498 
49499 
49500 
49501 
49502 
49503     # "-z now" supported in GNU binutils 2.11 and later
49504     LINKER_NOW_FLAG="-Wl,-z,now"
49505 
49506 
49507 
49508 
49509 
49510 
49511 
49512 
49513 
49514 
49515 
49516 
49517 
49518 
49519 
49520 
49521 
49522 
49523 
49524 
49525 
49526 
49527 
49528 
49529 
49530 
49531 
49532 
49533 
49534 
49535 
49536 
49537 
49538 
49539 
49540 
49541 
49542 
49543 
49544 
49545 
49546 
49547 
49548 
49549 
49550 
49551 
49552     # Execute function body
49553 
49554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
49555 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
49556   supports=yes
49557 
49558   saved_ldflags="$LDFLAGS"
49559   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
49560   ac_ext=c
49561 ac_cpp='$CPP $CPPFLAGS'
49562 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49563 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49564 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49565 
49566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49567 /* end confdefs.h.  */
49568 
49569 int
49570 main ()
49571 {
49572 
49573   ;
49574   return 0;
49575 }
49576 _ACEOF
49577 if ac_fn_c_try_link "$LINENO"; then :
49578 
49579 else
49580   supports=no
49581 fi
49582 rm -f core conftest.err conftest.$ac_objext \
49583     conftest$ac_exeext conftest.$ac_ext
49584   ac_ext=cpp
49585 ac_cpp='$CXXCPP $CPPFLAGS'
49586 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49587 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49588 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49589 
49590   LDFLAGS="$saved_ldflags"
49591 
49592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49593 $as_echo "$supports" >&6; }
49594   if test "x$supports" = "xyes" ; then
49595     :
49596     HAS_LINKER_NOW=true
49597   else
49598     :
49599     HAS_LINKER_NOW=false
49600   fi
49601 
49602 
49603 
49604 
49605 
49606 
49607 
49608 
49609 
49610 
49611 
49612 
49613   fi
49614 
49615   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
49616   # in executable.'
49617   USING_BROKEN_SUSE_LD=no
49618   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
49619     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
49620 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
49621     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
49622     $ECHO "int main() { }" > main.c
49623     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
49624       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49625 $as_echo "no" >&6; }
49626       USING_BROKEN_SUSE_LD=no
49627     else
49628       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49629 $as_echo "yes" >&6; }
49630       USING_BROKEN_SUSE_LD=yes
49631     fi
49632     $RM version-script.map main.c a.out
49633   fi
49634 
49635 
49636   # Setup hotspot lecagy names for toolchains
49637   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
49638   if test "x$TOOLCHAIN_TYPE" = xclang; then
49639     HOTSPOT_TOOLCHAIN_TYPE=gcc
49640   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49641     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
49642   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49643     HOTSPOT_TOOLCHAIN_TYPE=visCPP
49644   fi
49645 
49646 
49647 
49648 # Setup the JTReg Regression Test Harness.
49649 
49650 
49651 # Check whether --with-jtreg was given.
49652 if test "${with_jtreg+set}" = set; then :
49653   withval=$with_jtreg;
49654 fi
49655 
49656 
49657   if test "x$with_jtreg" = xno; then
49658     # jtreg disabled
49659     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49660 $as_echo_n "checking for jtreg test harness... " >&6; }
49661     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
49662 $as_echo "no, disabled" >&6; }
49663   elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
49664     # An explicit path is specified, use it.
49665     JT_HOME="$with_jtreg"
49666 
49667   # Only process if variable expands to non-empty
49668 
49669   if test "x$JT_HOME" != x; then
49670     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49671 
49672   # Input might be given as Windows format, start by converting to
49673   # unix format.
49674   path="$JT_HOME"
49675   new_path=`$CYGPATH -u "$path"`
49676 
49677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49680   # "foo.exe" is OK but "foo" is an error.
49681   #
49682   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49683   # It is also a way to make sure we got the proper file name for the real test later on.
49684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49685   if test "x$test_shortpath" = x; then
49686     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49687 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49688     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49689   fi
49690 
49691   # Call helper function which possibly converts this using DOS-style short mode.
49692   # If so, the updated path is stored in $new_path.
49693 
49694   input_path="$new_path"
49695   # Check if we need to convert this using DOS-style short mode. If the path
49696   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49697   # take no chances and rewrite it.
49698   # Note: m4 eats our [], so we need to use [ and ] instead.
49699   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49700   if test "x$has_forbidden_chars" != x; then
49701     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49702     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49703     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49704     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49705       # Going to short mode and back again did indeed matter. Since short mode is
49706       # case insensitive, let's make it lowercase to improve readability.
49707       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49708       # Now convert it back to Unix-style (cygpath)
49709       input_path=`$CYGPATH -u "$shortmode_path"`
49710       new_path="$input_path"
49711     fi
49712   fi
49713 
49714   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49715   if test "x$test_cygdrive_prefix" = x; then
49716     # As a simple fix, exclude /usr/bin since it's not a real path.
49717     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49718       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49719       # a path prefixed by /cygdrive for fixpath to work.
49720       new_path="$CYGWIN_ROOT_PATH$input_path"
49721     fi
49722   fi
49723 
49724 
49725   if test "x$path" != "x$new_path"; then
49726     JT_HOME="$new_path"
49727     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49728 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49729   fi
49730 
49731     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49732 
49733   path="$JT_HOME"
49734   has_colon=`$ECHO $path | $GREP ^.:`
49735   new_path="$path"
49736   if test "x$has_colon" = x; then
49737     # Not in mixed or Windows style, start by that.
49738     new_path=`cmd //c echo $path`
49739   fi
49740 
49741 
49742   input_path="$new_path"
49743   # Check if we need to convert this using DOS-style short mode. If the path
49744   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49745   # take no chances and rewrite it.
49746   # Note: m4 eats our [], so we need to use [ and ] instead.
49747   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49748   if test "x$has_forbidden_chars" != x; then
49749     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49750     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49751   fi
49752 
49753 
49754   windows_path="$new_path"
49755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49756     unix_path=`$CYGPATH -u "$windows_path"`
49757     new_path="$unix_path"
49758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49760     new_path="$unix_path"
49761   fi
49762 
49763   if test "x$path" != "x$new_path"; then
49764     JT_HOME="$new_path"
49765     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49766 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49767   fi
49768 
49769   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49770   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49771 
49772     else
49773       # We're on a unix platform. Hooray! :)
49774       path="$JT_HOME"
49775       has_space=`$ECHO "$path" | $GREP " "`
49776       if test "x$has_space" != x; then
49777         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49778 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49779         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49780       fi
49781 
49782       # Use eval to expand a potential ~
49783       eval path="$path"
49784       if test ! -f "$path" && test ! -d "$path"; then
49785         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49786       fi
49787 
49788       if test -d "$path"; then
49789         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49790       else
49791         dir="`$DIRNAME "$path"`"
49792         base="`$BASENAME "$path"`"
49793         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49794       fi
49795     fi
49796   fi
49797 
49798     if test ! -d "$JT_HOME"; then
49799       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
49800     fi
49801 
49802     if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49803       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
49804     fi
49805 
49806     JTREGEXE="$JT_HOME/bin/jtreg"
49807     if test ! -x "$JTREGEXE"; then
49808       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
49809     fi
49810 
49811     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49812 $as_echo_n "checking for jtreg test harness... " >&6; }
49813     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49814 $as_echo "$JT_HOME" >&6; }
49815   else
49816     # Try to locate jtreg
49817     if test "x$JT_HOME" != x; then
49818       # JT_HOME set in environment, use it
49819       if test ! -d "$JT_HOME"; then
49820         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
49821 $as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
49822         JT_HOME=
49823       else
49824         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49825           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
49826 $as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
49827           JT_HOME=
49828         elif test ! -x "$JT_HOME/bin/jtreg"; then
49829           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
49830 $as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
49831           JT_HOME=
49832         else
49833           JTREGEXE="$JT_HOME/bin/jtreg"
49834           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
49835 $as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
49836         fi
49837       fi
49838     fi
49839 
49840     if test "x$JT_HOME" = x; then
49841       # JT_HOME is not set in environment, or was deemed invalid.
49842       # Try to find jtreg on path
49843 
49844 
49845   # Publish this variable in the help.
49846 
49847 
49848   if [ -z "${JTREGEXE+x}" ]; then
49849     # The variable is not set by user, try to locate tool using the code snippet
49850     for ac_prog in jtreg
49851 do
49852   # Extract the first word of "$ac_prog", so it can be a program name with args.
49853 set dummy $ac_prog; ac_word=$2
49854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49855 $as_echo_n "checking for $ac_word... " >&6; }
49856 if ${ac_cv_path_JTREGEXE+:} false; then :
49857   $as_echo_n "(cached) " >&6
49858 else
49859   case $JTREGEXE in
49860   [\\/]* | ?:[\\/]*)
49861   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49862   ;;
49863   *)
49864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49865 for as_dir in $PATH
49866 do
49867   IFS=$as_save_IFS
49868   test -z "$as_dir" && as_dir=.
49869     for ac_exec_ext in '' $ac_executable_extensions; do
49870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49871     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49873     break 2
49874   fi
49875 done
49876   done
49877 IFS=$as_save_IFS
49878 
49879   ;;
49880 esac
49881 fi
49882 JTREGEXE=$ac_cv_path_JTREGEXE
49883 if test -n "$JTREGEXE"; then
49884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49885 $as_echo "$JTREGEXE" >&6; }
49886 else
49887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49888 $as_echo "no" >&6; }
49889 fi
49890 
49891 
49892   test -n "$JTREGEXE" && break
49893 done
49894 
49895   else
49896     # The variable is set, but is it from the command line or the environment?
49897 
49898     # Try to remove the string !JTREGEXE! from our list.
49899     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
49900     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49901       # If it failed, the variable was not from the command line. Ignore it,
49902       # but warn the user (except for BASH, which is always set by the calling BASH).
49903       if test "xJTREGEXE" != xBASH; then
49904         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
49905 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
49906       fi
49907       # Try to locate tool using the code snippet
49908       for ac_prog in jtreg
49909 do
49910   # Extract the first word of "$ac_prog", so it can be a program name with args.
49911 set dummy $ac_prog; ac_word=$2
49912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49913 $as_echo_n "checking for $ac_word... " >&6; }
49914 if ${ac_cv_path_JTREGEXE+:} false; then :
49915   $as_echo_n "(cached) " >&6
49916 else
49917   case $JTREGEXE in
49918   [\\/]* | ?:[\\/]*)
49919   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49920   ;;
49921   *)
49922   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49923 for as_dir in $PATH
49924 do
49925   IFS=$as_save_IFS
49926   test -z "$as_dir" && as_dir=.
49927     for ac_exec_ext in '' $ac_executable_extensions; do
49928   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49929     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49930     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49931     break 2
49932   fi
49933 done
49934   done
49935 IFS=$as_save_IFS
49936 
49937   ;;
49938 esac
49939 fi
49940 JTREGEXE=$ac_cv_path_JTREGEXE
49941 if test -n "$JTREGEXE"; then
49942   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49943 $as_echo "$JTREGEXE" >&6; }
49944 else
49945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49946 $as_echo "no" >&6; }
49947 fi
49948 
49949 
49950   test -n "$JTREGEXE" && break
49951 done
49952 
49953     else
49954       # If it succeeded, then it was overridden by the user. We will use it
49955       # for the tool.
49956 
49957       # First remove it from the list of overridden variables, so we can test
49958       # for unknown variables in the end.
49959       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49960 
49961       # Check if we try to supply an empty value
49962       if test "x$JTREGEXE" = x; then
49963         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
49964 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
49965         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49966 $as_echo_n "checking for JTREGEXE... " >&6; }
49967         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
49968 $as_echo "disabled" >&6; }
49969       else
49970         # Check if the provided tool contains a complete path.
49971         tool_specified="$JTREGEXE"
49972         tool_basename="${tool_specified##*/}"
49973         if test "x$tool_basename" = "x$tool_specified"; then
49974           # A command without a complete path is provided, search $PATH.
49975           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49976 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49977           # Extract the first word of "$tool_basename", so it can be a program name with args.
49978 set dummy $tool_basename; ac_word=$2
49979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49980 $as_echo_n "checking for $ac_word... " >&6; }
49981 if ${ac_cv_path_JTREGEXE+:} false; then :
49982   $as_echo_n "(cached) " >&6
49983 else
49984   case $JTREGEXE in
49985   [\\/]* | ?:[\\/]*)
49986   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49987   ;;
49988   *)
49989   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49990 for as_dir in $PATH
49991 do
49992   IFS=$as_save_IFS
49993   test -z "$as_dir" && as_dir=.
49994     for ac_exec_ext in '' $ac_executable_extensions; do
49995   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49996     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49997     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49998     break 2
49999   fi
50000 done
50001   done
50002 IFS=$as_save_IFS
50003 
50004   ;;
50005 esac
50006 fi
50007 JTREGEXE=$ac_cv_path_JTREGEXE
50008 if test -n "$JTREGEXE"; then
50009   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
50010 $as_echo "$JTREGEXE" >&6; }
50011 else
50012   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50013 $as_echo "no" >&6; }
50014 fi
50015 
50016 
50017           if test "x$JTREGEXE" = x; then
50018             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50019           fi
50020         else
50021           # Otherwise we believe it is a complete path. Use it as it is.
50022           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
50023 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
50024           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
50025 $as_echo_n "checking for JTREGEXE... " >&6; }
50026           if test ! -x "$tool_specified"; then
50027             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50028 $as_echo "not found" >&6; }
50029             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
50030           fi
50031           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50032 $as_echo "$tool_specified" >&6; }
50033         fi
50034       fi
50035     fi
50036 
50037   fi
50038 
50039 
50040       if test "x$JTREGEXE" != x; then
50041         # That's good, now try to derive JT_HOME
50042         JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
50043         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
50044           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
50045 $as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
50046           JT_HOME=
50047           JTREGEXE=
50048         else
50049           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
50050 $as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
50051         fi
50052       fi
50053     fi
50054 
50055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
50056 $as_echo_n "checking for jtreg test harness... " >&6; }
50057     if test "x$JT_HOME" != x; then
50058       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
50059 $as_echo "$JT_HOME" >&6; }
50060     else
50061       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
50062 $as_echo "no, not found" >&6; }
50063 
50064       if test "x$with_jtreg" = xyes; then
50065         as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
50066       fi
50067     fi
50068   fi
50069 
50070 
50071   # Only process if variable expands to non-empty
50072 
50073   if test "x$JTREGEXE" != x; then
50074     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50075 
50076   # First separate the path from the arguments. This will split at the first
50077   # space.
50078   complete="$JTREGEXE"
50079   path="${complete%% *}"
50080   tmp="$complete EOL"
50081   arguments="${tmp#* }"
50082 
50083   # Input might be given as Windows format, start by converting to
50084   # unix format.
50085   new_path=`$CYGPATH -u "$path"`
50086 
50087   # Now try to locate executable using which
50088   new_path=`$WHICH "$new_path" 2> /dev/null`
50089   # bat and cmd files are not always considered executable in cygwin causing which
50090   # to not find them
50091   if test "x$new_path" = x \
50092       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
50093       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
50094     new_path=`$CYGPATH -u "$path"`
50095   fi
50096   if test "x$new_path" = x; then
50097     # Oops. Which didn't find the executable.
50098     # The splitting of arguments from the executable at a space might have been incorrect,
50099     # since paths with space are more likely in Windows. Give it another try with the whole
50100     # argument.
50101     path="$complete"
50102     arguments="EOL"
50103     new_path=`$CYGPATH -u "$path"`
50104     new_path=`$WHICH "$new_path" 2> /dev/null`
50105     # bat and cmd files are not always considered executable in cygwin causing which
50106     # to not find them
50107     if test "x$new_path" = x \
50108         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
50109         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
50110       new_path=`$CYGPATH -u "$path"`
50111     fi
50112     if test "x$new_path" = x; then
50113       # It's still not found. Now this is an unrecoverable error.
50114       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
50115 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
50116       has_space=`$ECHO "$complete" | $GREP " "`
50117       if test "x$has_space" != x; then
50118         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
50119 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
50120       fi
50121       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50122     fi
50123   fi
50124 
50125   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50126   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50127   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50128   # "foo.exe" is OK but "foo" is an error.
50129   #
50130   # This test is therefore slightly more accurate than "test -f" to check for file presence.
50131   # It is also a way to make sure we got the proper file name for the real test later on.
50132   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50133   if test "x$test_shortpath" = x; then
50134     # Short path failed, file does not exist as specified.
50135     # Try adding .exe or .cmd
50136     if test -f "${new_path}.exe"; then
50137       input_to_shortpath="${new_path}.exe"
50138     elif test -f "${new_path}.cmd"; then
50139       input_to_shortpath="${new_path}.cmd"
50140     else
50141       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
50142 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
50143       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
50144 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
50145       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50146     fi
50147   else
50148     input_to_shortpath="$new_path"
50149   fi
50150 
50151   # Call helper function which possibly converts this using DOS-style short mode.
50152   # If so, the updated path is stored in $new_path.
50153   new_path="$input_to_shortpath"
50154 
50155   input_path="$input_to_shortpath"
50156   # Check if we need to convert this using DOS-style short mode. If the path
50157   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50158   # take no chances and rewrite it.
50159   # Note: m4 eats our [], so we need to use [ and ] instead.
50160   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50161   if test "x$has_forbidden_chars" != x; then
50162     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50163     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50164     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50165     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50166       # Going to short mode and back again did indeed matter. Since short mode is
50167       # case insensitive, let's make it lowercase to improve readability.
50168       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50169       # Now convert it back to Unix-style (cygpath)
50170       input_path=`$CYGPATH -u "$shortmode_path"`
50171       new_path="$input_path"
50172     fi
50173   fi
50174 
50175   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50176   if test "x$test_cygdrive_prefix" = x; then
50177     # As a simple fix, exclude /usr/bin since it's not a real path.
50178     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
50179       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50180       # a path prefixed by /cygdrive for fixpath to work.
50181       new_path="$CYGWIN_ROOT_PATH$input_path"
50182     fi
50183   fi
50184 
50185   # remove trailing .exe if any
50186   new_path="${new_path/%.exe/}"
50187 
50188     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50189 
50190   # First separate the path from the arguments. This will split at the first
50191   # space.
50192   complete="$JTREGEXE"
50193   path="${complete%% *}"
50194   tmp="$complete EOL"
50195   arguments="${tmp#* }"
50196 
50197   # Input might be given as Windows format, start by converting to
50198   # unix format.
50199   new_path="$path"
50200 
50201   windows_path="$new_path"
50202   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50203     unix_path=`$CYGPATH -u "$windows_path"`
50204     new_path="$unix_path"
50205   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50206     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50207     new_path="$unix_path"
50208   fi
50209 
50210 
50211   # Now try to locate executable using which
50212   new_path=`$WHICH "$new_path" 2> /dev/null`
50213 
50214   if test "x$new_path" = x; then
50215     # Oops. Which didn't find the executable.
50216     # The splitting of arguments from the executable at a space might have been incorrect,
50217     # since paths with space are more likely in Windows. Give it another try with the whole
50218     # argument.
50219     path="$complete"
50220     arguments="EOL"
50221     new_path="$path"
50222 
50223   windows_path="$new_path"
50224   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50225     unix_path=`$CYGPATH -u "$windows_path"`
50226     new_path="$unix_path"
50227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50228     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50229     new_path="$unix_path"
50230   fi
50231 
50232 
50233     new_path=`$WHICH "$new_path" 2> /dev/null`
50234     # bat and cmd files are not always considered executable in MSYS causing which
50235     # to not find them
50236     if test "x$new_path" = x \
50237         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
50238         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
50239       new_path="$path"
50240 
50241   windows_path="$new_path"
50242   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50243     unix_path=`$CYGPATH -u "$windows_path"`
50244     new_path="$unix_path"
50245   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50246     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50247     new_path="$unix_path"
50248   fi
50249 
50250     fi
50251 
50252     if test "x$new_path" = x; then
50253       # It's still not found. Now this is an unrecoverable error.
50254       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
50255 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
50256       has_space=`$ECHO "$complete" | $GREP " "`
50257       if test "x$has_space" != x; then
50258         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
50259 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
50260       fi
50261       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50262     fi
50263   fi
50264 
50265   # Now new_path has a complete unix path to the binary
50266   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
50267     # Keep paths in /bin as-is, but remove trailing .exe if any
50268     new_path="${new_path/%.exe/}"
50269     # Do not save /bin paths to all_fixpath_prefixes!
50270   else
50271     # Not in mixed or Windows style, start by that.
50272     new_path=`cmd //c echo $new_path`
50273 
50274   input_path="$new_path"
50275   # Check if we need to convert this using DOS-style short mode. If the path
50276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50277   # take no chances and rewrite it.
50278   # Note: m4 eats our [], so we need to use [ and ] instead.
50279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50280   if test "x$has_forbidden_chars" != x; then
50281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50282     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50283   fi
50284 
50285     # Output is in $new_path
50286 
50287   windows_path="$new_path"
50288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50289     unix_path=`$CYGPATH -u "$windows_path"`
50290     new_path="$unix_path"
50291   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50292     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50293     new_path="$unix_path"
50294   fi
50295 
50296     # remove trailing .exe if any
50297     new_path="${new_path/%.exe/}"
50298 
50299     # Save the first 10 bytes of this path to the storage, so fixpath can work.
50300     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50301   fi
50302 
50303     else
50304       # We're on a unix platform. Hooray! :)
50305       # First separate the path from the arguments. This will split at the first
50306       # space.
50307       complete="$JTREGEXE"
50308       path="${complete%% *}"
50309       tmp="$complete EOL"
50310       arguments="${tmp#* }"
50311 
50312       # Cannot rely on the command "which" here since it doesn't always work.
50313       is_absolute_path=`$ECHO "$path" | $GREP ^/`
50314       if test -z "$is_absolute_path"; then
50315         # Path to executable is not absolute. Find it.
50316         IFS_save="$IFS"
50317         IFS=:
50318         for p in $PATH; do
50319           if test -f "$p/$path" && test -x "$p/$path"; then
50320             new_path="$p/$path"
50321             break
50322           fi
50323         done
50324         IFS="$IFS_save"
50325       else
50326         # This is an absolute path, we can use it without further modifications.
50327         new_path="$path"
50328       fi
50329 
50330       if test "x$new_path" = x; then
50331         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
50332 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
50333         has_space=`$ECHO "$complete" | $GREP " "`
50334         if test "x$has_space" != x; then
50335           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
50336 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
50337         fi
50338         as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50339       fi
50340     fi
50341 
50342     # Now join together the path and the arguments once again
50343     if test "x$arguments" != xEOL; then
50344       new_complete="$new_path ${arguments% *}"
50345     else
50346       new_complete="$new_path"
50347     fi
50348 
50349     if test "x$complete" != "x$new_complete"; then
50350       JTREGEXE="$new_complete"
50351       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
50352 $as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
50353     fi
50354   fi
50355 
50356 
50357   # Only process if variable expands to non-empty
50358 
50359   if test "x$JT_HOME" != x; then
50360     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50361 
50362   # Input might be given as Windows format, start by converting to
50363   # unix format.
50364   path="$JT_HOME"
50365   new_path=`$CYGPATH -u "$path"`
50366 
50367   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50368   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50369   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50370   # "foo.exe" is OK but "foo" is an error.
50371   #
50372   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50373   # It is also a way to make sure we got the proper file name for the real test later on.
50374   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50375   if test "x$test_shortpath" = x; then
50376     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
50377 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
50378     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
50379   fi
50380 
50381   # Call helper function which possibly converts this using DOS-style short mode.
50382   # If so, the updated path is stored in $new_path.
50383 
50384   input_path="$new_path"
50385   # Check if we need to convert this using DOS-style short mode. If the path
50386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50387   # take no chances and rewrite it.
50388   # Note: m4 eats our [], so we need to use [ and ] instead.
50389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50390   if test "x$has_forbidden_chars" != x; then
50391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50395       # Going to short mode and back again did indeed matter. Since short mode is
50396       # case insensitive, let's make it lowercase to improve readability.
50397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50398       # Now convert it back to Unix-style (cygpath)
50399       input_path=`$CYGPATH -u "$shortmode_path"`
50400       new_path="$input_path"
50401     fi
50402   fi
50403 
50404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50405   if test "x$test_cygdrive_prefix" = x; then
50406     # As a simple fix, exclude /usr/bin since it's not a real path.
50407     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50409       # a path prefixed by /cygdrive for fixpath to work.
50410       new_path="$CYGWIN_ROOT_PATH$input_path"
50411     fi
50412   fi
50413 
50414 
50415   if test "x$path" != "x$new_path"; then
50416     JT_HOME="$new_path"
50417     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
50418 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
50419   fi
50420 
50421     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50422 
50423   path="$JT_HOME"
50424   has_colon=`$ECHO $path | $GREP ^.:`
50425   new_path="$path"
50426   if test "x$has_colon" = x; then
50427     # Not in mixed or Windows style, start by that.
50428     new_path=`cmd //c echo $path`
50429   fi
50430 
50431 
50432   input_path="$new_path"
50433   # Check if we need to convert this using DOS-style short mode. If the path
50434   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50435   # take no chances and rewrite it.
50436   # Note: m4 eats our [], so we need to use [ and ] instead.
50437   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50438   if test "x$has_forbidden_chars" != x; then
50439     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50440     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50441   fi
50442 
50443 
50444   windows_path="$new_path"
50445   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50446     unix_path=`$CYGPATH -u "$windows_path"`
50447     new_path="$unix_path"
50448   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50449     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50450     new_path="$unix_path"
50451   fi
50452 
50453   if test "x$path" != "x$new_path"; then
50454     JT_HOME="$new_path"
50455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
50456 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
50457   fi
50458 
50459   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50460   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50461 
50462     else
50463       # We're on a unix platform. Hooray! :)
50464       path="$JT_HOME"
50465       has_space=`$ECHO "$path" | $GREP " "`
50466       if test "x$has_space" != x; then
50467         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
50468 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
50469         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50470       fi
50471 
50472       # Use eval to expand a potential ~
50473       eval path="$path"
50474       if test ! -f "$path" && test ! -d "$path"; then
50475         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
50476       fi
50477 
50478       if test -d "$path"; then
50479         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
50480       else
50481         dir="`$DIRNAME "$path"`"
50482         base="`$BASENAME "$path"`"
50483         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
50484       fi
50485     fi
50486   fi
50487 
50488 
50489 
50490 
50491 
50492 # Setup Jib dependency tool
50493 
50494 
50495 # Check whether --with-jib was given.
50496 if test "${with_jib+set}" = set; then :
50497   withval=$with_jib;
50498 fi
50499 
50500 
50501   if test "x$with_jib" = xno || test "x$with_jib" = x; then
50502     # jib disabled
50503     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
50504 $as_echo_n "checking for jib... " >&6; }
50505     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50506 $as_echo "no" >&6; }
50507   elif test "x$with_jib" = xyes; then
50508     as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
50509   else
50510     JIB_HOME="${with_jib}"
50511     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
50512 $as_echo_n "checking for jib... " >&6; }
50513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
50514 $as_echo "${JIB_HOME}" >&6; }
50515     if test ! -d "${JIB_HOME}"; then
50516       as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
50517     fi
50518     JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
50519     if test ! -f "${JIB_JAR}"; then
50520       as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
50521     fi
50522   fi
50523 
50524 
50525 
50526 
50527 
50528   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
50529   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
50530   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
50531   #                              commands produced by the link step (currently AIX only)
50532   if test "x$TOOLCHAIN_TYPE" = xxlc; then
50533     COMPILER_TARGET_BITS_FLAG="-q"
50534     COMPILER_COMMAND_FILE_FLAG="-f"
50535     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
50536   else
50537     COMPILER_TARGET_BITS_FLAG="-m"
50538     COMPILER_COMMAND_FILE_FLAG="@"
50539     COMPILER_BINDCMD_FILE_FLAG=""
50540 
50541     # The solstudio linker does not support @-files.
50542     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50543       COMPILER_COMMAND_FILE_FLAG=
50544     fi
50545 
50546     # Check if @file is supported by gcc
50547     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50548       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
50549 $as_echo_n "checking if @file is supported by gcc... " >&6; }
50550       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
50551       $ECHO "" "--version" > command.file
50552       if $CXX @command.file 2>&5 >&5; then
50553         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50554 $as_echo "yes" >&6; }
50555         COMPILER_COMMAND_FILE_FLAG="@"
50556       else
50557         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50558 $as_echo "no" >&6; }
50559         COMPILER_COMMAND_FILE_FLAG=
50560       fi
50561       $RM command.file
50562     fi
50563   fi
50564 
50565 
50566 
50567 
50568   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
50569   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50570     ARFLAGS="-r"
50571   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50572     ARFLAGS="-X64"
50573   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50574     # lib.exe is used as AR to create static libraries.
50575     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
50576   else
50577     ARFLAGS=""
50578   fi
50579 
50580 
50581   ## Setup strip.
50582   # FIXME: should this really be per platform, or should it be per toolchain type?
50583   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
50584   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
50585   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50586     STRIPFLAGS="-g"
50587   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50588     STRIPFLAGS="-x"
50589   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50590     STRIPFLAGS="-S"
50591   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50592     STRIPFLAGS="-X32_64"
50593   fi
50594 
50595 
50596 
50597   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50598     CC_OUT_OPTION=-Fo
50599     EXE_OUT_OPTION=-out:
50600     LD_OUT_OPTION=-out:
50601     AR_OUT_OPTION=-out:
50602   else
50603     # The option used to specify the target .o,.a or .so file.
50604     # When compiling, how to specify the to be created object file.
50605     CC_OUT_OPTION='-o$(SPACE)'
50606     # When linking, how to specify the to be created executable.
50607     EXE_OUT_OPTION='-o$(SPACE)'
50608     # When linking, how to specify the to be created dynamically linkable library.
50609     LD_OUT_OPTION='-o$(SPACE)'
50610     # When archiving, how to specify the to be create static archive for object files.
50611     AR_OUT_OPTION='rcs$(SPACE)'
50612   fi
50613 
50614 
50615 
50616 
50617 
50618   # On Windows, we need to set RC flags.
50619   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50620     RC_FLAGS="-nologo -l0x409"
50621     JVM_RCFLAGS="-nologo"
50622     if test "x$DEBUG_LEVEL" = xrelease; then
50623       RC_FLAGS="$RC_FLAGS -DNDEBUG"
50624       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
50625     fi
50626 
50627     # The version variables used to create RC_FLAGS may be overridden
50628     # in a custom configure script, or possibly the command line.
50629     # Let those variables be expanded at make time in spec.gmk.
50630     # The \$ are escaped to the shell, and the $(...) variables
50631     # are evaluated by make.
50632     RC_FLAGS="$RC_FLAGS \
50633         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
50634         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
50635         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
50636         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
50637         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
50638         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
50639         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
50640 
50641     JVM_RCFLAGS="$JVM_RCFLAGS \
50642         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
50643         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
50644         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
50645         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
50646         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
50647         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
50648         -D\"HS_FNAME=jvm.dll\" \
50649         -D\"HS_INTERNAL_NAME=jvm\""
50650   fi
50651 
50652 
50653 
50654   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50655     # silence copyright notice and other headers.
50656     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
50657   fi
50658 
50659 
50660 # Now we can test some aspects on the target using configure macros.
50661 
50662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
50663 $as_echo_n "checking for ANSI C header files... " >&6; }
50664 if ${ac_cv_header_stdc+:} false; then :
50665   $as_echo_n "(cached) " >&6
50666 else
50667   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50668 /* end confdefs.h.  */
50669 #include <stdlib.h>
50670 #include <stdarg.h>
50671 #include <string.h>
50672 #include <float.h>
50673 
50674 int
50675 main ()
50676 {
50677 
50678   ;
50679   return 0;
50680 }
50681 _ACEOF
50682 if ac_fn_cxx_try_compile "$LINENO"; then :
50683   ac_cv_header_stdc=yes
50684 else
50685   ac_cv_header_stdc=no
50686 fi
50687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50688 
50689 if test $ac_cv_header_stdc = yes; then
50690   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
50691   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50692 /* end confdefs.h.  */
50693 #include <string.h>
50694 
50695 _ACEOF
50696 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50697   $EGREP "memchr" >/dev/null 2>&1; then :
50698 
50699 else
50700   ac_cv_header_stdc=no
50701 fi
50702 rm -f conftest*
50703 
50704 fi
50705 
50706 if test $ac_cv_header_stdc = yes; then
50707   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
50708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50709 /* end confdefs.h.  */
50710 #include <stdlib.h>
50711 
50712 _ACEOF
50713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50714   $EGREP "free" >/dev/null 2>&1; then :
50715 
50716 else
50717   ac_cv_header_stdc=no
50718 fi
50719 rm -f conftest*
50720 
50721 fi
50722 
50723 if test $ac_cv_header_stdc = yes; then
50724   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
50725   if test "$cross_compiling" = yes; then :
50726   :
50727 else
50728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50729 /* end confdefs.h.  */
50730 #include <ctype.h>
50731 #include <stdlib.h>
50732 #if ((' ' & 0x0FF) == 0x020)
50733 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
50734 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
50735 #else
50736 # define ISLOWER(c) \
50737                    (('a' <= (c) && (c) <= 'i') \
50738                      || ('j' <= (c) && (c) <= 'r') \
50739                      || ('s' <= (c) && (c) <= 'z'))
50740 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
50741 #endif
50742 
50743 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
50744 int
50745 main ()
50746 {
50747   int i;
50748   for (i = 0; i < 256; i++)
50749     if (XOR (islower (i), ISLOWER (i))
50750         || toupper (i) != TOUPPER (i))
50751       return 2;
50752   return 0;
50753 }
50754 _ACEOF
50755 if ac_fn_cxx_try_run "$LINENO"; then :
50756 
50757 else
50758   ac_cv_header_stdc=no
50759 fi
50760 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50761   conftest.$ac_objext conftest.beam conftest.$ac_ext
50762 fi
50763 
50764 fi
50765 fi
50766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
50767 $as_echo "$ac_cv_header_stdc" >&6; }
50768 if test $ac_cv_header_stdc = yes; then
50769 
50770 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
50771 
50772 fi
50773 
50774 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
50775 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
50776                   inttypes.h stdint.h unistd.h
50777 do :
50778   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
50779 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
50780 "
50781 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
50782   cat >>confdefs.h <<_ACEOF
50783 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
50784 _ACEOF
50785 
50786 fi
50787 
50788 done
50789 
50790 
50791 
50792   ###############################################################################
50793   #
50794   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
50795   # (The JVM can use 32 or 64 bit Java pointers but that decision
50796   # is made at runtime.)
50797   #
50798 
50799   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
50800     # Always specify -m flag on Solaris
50801     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
50802 
50803   # When we add flags to the "official" CFLAGS etc, we need to
50804   # keep track of these additions in ADDED_CFLAGS etc. These
50805   # will later be checked to make sure only controlled additions
50806   # have been made to CFLAGS etc.
50807   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50808   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50809   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50810 
50811   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50812   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50813   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50814 
50815   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50816   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50817   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50818 
50819   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50820   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50821   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50822 
50823   elif test "x$COMPILE_TYPE" = xreduced; then
50824     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
50825       # Specify -m if running reduced on unix platforms
50826 
50827   # When we add flags to the "official" CFLAGS etc, we need to
50828   # keep track of these additions in ADDED_CFLAGS etc. These
50829   # will later be checked to make sure only controlled additions
50830   # have been made to CFLAGS etc.
50831   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50832   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50833   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50834 
50835   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50836   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50837   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50838 
50839   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50840   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50841   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50842 
50843   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50844   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50845   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50846 
50847     fi
50848   fi
50849   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50850     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50851     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50852     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50853   fi
50854 
50855   # Make compilation sanity check
50856   for ac_header in stdio.h
50857 do :
50858   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
50859 if test "x$ac_cv_header_stdio_h" = xyes; then :
50860   cat >>confdefs.h <<_ACEOF
50861 #define HAVE_STDIO_H 1
50862 _ACEOF
50863 
50864 else
50865 
50866     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
50867 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
50868     if test "x$COMPILE_TYPE" = xreduced; then
50869 
50870   # Print a helpful message on how to acquire the necessary build dependency.
50871   # reduced is the help tag: freetype, cups, alsa etc
50872   MISSING_DEPENDENCY=reduced
50873 
50874   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50875     cygwin_help $MISSING_DEPENDENCY
50876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50877     msys_help $MISSING_DEPENDENCY
50878   else
50879     PKGHANDLER_COMMAND=
50880 
50881     case $PKGHANDLER in
50882       apt-get)
50883         apt_help     $MISSING_DEPENDENCY ;;
50884       yum)
50885         yum_help     $MISSING_DEPENDENCY ;;
50886       brew)
50887         brew_help    $MISSING_DEPENDENCY ;;
50888       port)
50889         port_help    $MISSING_DEPENDENCY ;;
50890       pkgutil)
50891         pkgutil_help $MISSING_DEPENDENCY ;;
50892       pkgadd)
50893         pkgadd_help  $MISSING_DEPENDENCY ;;
50894     esac
50895 
50896     if test "x$PKGHANDLER_COMMAND" != x; then
50897       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50898     fi
50899   fi
50900 
50901       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50902 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50903     elif test "x$COMPILE_TYPE" = xcross; then
50904       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50905 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50906     fi
50907     as_fn_error $? "Cannot continue." "$LINENO" 5
50908 
50909 fi
50910 
50911 done
50912 
50913 
50914   # The cast to long int works around a bug in the HP C Compiler
50915 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50916 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50917 # This bug is HP SR number 8606223364.
50918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50919 $as_echo_n "checking size of int *... " >&6; }
50920 if ${ac_cv_sizeof_int_p+:} false; then :
50921   $as_echo_n "(cached) " >&6
50922 else
50923   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
50924 
50925 else
50926   if test "$ac_cv_type_int_p" = yes; then
50927      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50928 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50929 as_fn_error 77 "cannot compute sizeof (int *)
50930 See \`config.log' for more details" "$LINENO" 5; }
50931    else
50932      ac_cv_sizeof_int_p=0
50933    fi
50934 fi
50935 
50936 fi
50937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50938 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50939 
50940 
50941 
50942 cat >>confdefs.h <<_ACEOF
50943 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50944 _ACEOF
50945 
50946 
50947 
50948   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
50949   if test "x$ac_cv_sizeof_int_p" = x; then
50950     # The test failed, lets stick to the assumed value.
50951     { $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
50952 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
50953   else
50954     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50955 
50956     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50957       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
50958       # Let's try to implicitely set the compilers target architecture and retry the test
50959       { $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
50960 $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;}
50961       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
50962 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
50963 
50964   # When we add flags to the "official" CFLAGS etc, we need to
50965   # keep track of these additions in ADDED_CFLAGS etc. These
50966   # will later be checked to make sure only controlled additions
50967   # have been made to CFLAGS etc.
50968   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50969   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50970   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
50971 
50972   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
50973   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
50974   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
50975 
50976   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
50977   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
50978   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
50979 
50980   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
50981   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
50982   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
50983 
50984 
50985       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
50986       unset ac_cv_sizeof_int_p
50987       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
50988       cat >>confdefs.h <<_ACEOF
50989 #undef SIZEOF_INT_P
50990 _ACEOF
50991 
50992       # The cast to long int works around a bug in the HP C Compiler
50993 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
50994 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
50995 # This bug is HP SR number 8606223364.
50996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
50997 $as_echo_n "checking size of int *... " >&6; }
50998 if ${ac_cv_sizeof_int_p+:} false; then :
50999   $as_echo_n "(cached) " >&6
51000 else
51001   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
51002 
51003 else
51004   if test "$ac_cv_type_int_p" = yes; then
51005      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
51006 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
51007 as_fn_error 77 "cannot compute sizeof (int *)
51008 See \`config.log' for more details" "$LINENO" 5; }
51009    else
51010      ac_cv_sizeof_int_p=0
51011    fi
51012 fi
51013 
51014 fi
51015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
51016 $as_echo "$ac_cv_sizeof_int_p" >&6; }
51017 
51018 
51019 
51020 cat >>confdefs.h <<_ACEOF
51021 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
51022 _ACEOF
51023 
51024 
51025 
51026       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
51027 
51028       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
51029         { $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
51030 $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;}
51031         if test "x$COMPILE_TYPE" = xreduced; then
51032 
51033   # Print a helpful message on how to acquire the necessary build dependency.
51034   # reduced is the help tag: freetype, cups, alsa etc
51035   MISSING_DEPENDENCY=reduced
51036 
51037   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51038     cygwin_help $MISSING_DEPENDENCY
51039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51040     msys_help $MISSING_DEPENDENCY
51041   else
51042     PKGHANDLER_COMMAND=
51043 
51044     case $PKGHANDLER in
51045       apt-get)
51046         apt_help     $MISSING_DEPENDENCY ;;
51047       yum)
51048         yum_help     $MISSING_DEPENDENCY ;;
51049       brew)
51050         brew_help    $MISSING_DEPENDENCY ;;
51051       port)
51052         port_help    $MISSING_DEPENDENCY ;;
51053       pkgutil)
51054         pkgutil_help $MISSING_DEPENDENCY ;;
51055       pkgadd)
51056         pkgadd_help  $MISSING_DEPENDENCY ;;
51057     esac
51058 
51059     if test "x$PKGHANDLER_COMMAND" != x; then
51060       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51061     fi
51062   fi
51063 
51064           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
51065 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
51066         elif test "x$COMPILE_TYPE" = xcross; then
51067           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
51068 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
51069         fi
51070         as_fn_error $? "Cannot continue." "$LINENO" 5
51071       fi
51072     fi
51073   fi
51074 
51075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
51076 $as_echo_n "checking for target address size... " >&6; }
51077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
51078 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
51079 
51080 
51081   ###############################################################################
51082   #
51083   # Is the target little of big endian?
51084   #
51085    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
51086 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
51087 if ${ac_cv_c_bigendian+:} false; then :
51088   $as_echo_n "(cached) " >&6
51089 else
51090   ac_cv_c_bigendian=unknown
51091     # See if we're dealing with a universal compiler.
51092     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51093 /* end confdefs.h.  */
51094 #ifndef __APPLE_CC__
51095                not a universal capable compiler
51096              #endif
51097              typedef int dummy;
51098 
51099 _ACEOF
51100 if ac_fn_cxx_try_compile "$LINENO"; then :
51101 
51102         # Check for potential -arch flags.  It is not universal unless
51103         # there are at least two -arch flags with different values.
51104         ac_arch=
51105         ac_prev=
51106         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
51107          if test -n "$ac_prev"; then
51108            case $ac_word in
51109              i?86 | x86_64 | ppc | ppc64)
51110                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
51111                  ac_arch=$ac_word
51112                else
51113                  ac_cv_c_bigendian=universal
51114                  break
51115                fi
51116                ;;
51117            esac
51118            ac_prev=
51119          elif test "x$ac_word" = "x-arch"; then
51120            ac_prev=arch
51121          fi
51122        done
51123 fi
51124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51125     if test $ac_cv_c_bigendian = unknown; then
51126       # See if sys/param.h defines the BYTE_ORDER macro.
51127       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51128 /* end confdefs.h.  */
51129 #include <sys/types.h>
51130              #include <sys/param.h>
51131 
51132 int
51133 main ()
51134 {
51135 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
51136                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
51137                      && LITTLE_ENDIAN)
51138               bogus endian macros
51139              #endif
51140 
51141   ;
51142   return 0;
51143 }
51144 _ACEOF
51145 if ac_fn_cxx_try_compile "$LINENO"; then :
51146   # It does; now see whether it defined to BIG_ENDIAN or not.
51147          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51148 /* end confdefs.h.  */
51149 #include <sys/types.h>
51150                 #include <sys/param.h>
51151 
51152 int
51153 main ()
51154 {
51155 #if BYTE_ORDER != BIG_ENDIAN
51156                  not big endian
51157                 #endif
51158 
51159   ;
51160   return 0;
51161 }
51162 _ACEOF
51163 if ac_fn_cxx_try_compile "$LINENO"; then :
51164   ac_cv_c_bigendian=yes
51165 else
51166   ac_cv_c_bigendian=no
51167 fi
51168 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51169 fi
51170 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51171     fi
51172     if test $ac_cv_c_bigendian = unknown; then
51173       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
51174       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51175 /* end confdefs.h.  */
51176 #include <limits.h>
51177 
51178 int
51179 main ()
51180 {
51181 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
51182               bogus endian macros
51183              #endif
51184 
51185   ;
51186   return 0;
51187 }
51188 _ACEOF
51189 if ac_fn_cxx_try_compile "$LINENO"; then :
51190   # It does; now see whether it defined to _BIG_ENDIAN or not.
51191          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51192 /* end confdefs.h.  */
51193 #include <limits.h>
51194 
51195 int
51196 main ()
51197 {
51198 #ifndef _BIG_ENDIAN
51199                  not big endian
51200                 #endif
51201 
51202   ;
51203   return 0;
51204 }
51205 _ACEOF
51206 if ac_fn_cxx_try_compile "$LINENO"; then :
51207   ac_cv_c_bigendian=yes
51208 else
51209   ac_cv_c_bigendian=no
51210 fi
51211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51212 fi
51213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51214     fi
51215     if test $ac_cv_c_bigendian = unknown; then
51216       # Compile a test program.
51217       if test "$cross_compiling" = yes; then :
51218   # Try to guess by grepping values from an object file.
51219          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51220 /* end confdefs.h.  */
51221 short int ascii_mm[] =
51222                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
51223                 short int ascii_ii[] =
51224                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
51225                 int use_ascii (int i) {
51226                   return ascii_mm[i] + ascii_ii[i];
51227                 }
51228                 short int ebcdic_ii[] =
51229                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
51230                 short int ebcdic_mm[] =
51231                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
51232                 int use_ebcdic (int i) {
51233                   return ebcdic_mm[i] + ebcdic_ii[i];
51234                 }
51235                 extern int foo;
51236 
51237 int
51238 main ()
51239 {
51240 return use_ascii (foo) == use_ebcdic (foo);
51241   ;
51242   return 0;
51243 }
51244 _ACEOF
51245 if ac_fn_cxx_try_compile "$LINENO"; then :
51246   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
51247               ac_cv_c_bigendian=yes
51248             fi
51249             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
51250               if test "$ac_cv_c_bigendian" = unknown; then
51251                 ac_cv_c_bigendian=no
51252               else
51253                 # finding both strings is unlikely to happen, but who knows?
51254                 ac_cv_c_bigendian=unknown
51255               fi
51256             fi
51257 fi
51258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51259 else
51260   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51261 /* end confdefs.h.  */
51262 $ac_includes_default
51263 int
51264 main ()
51265 {
51266 
51267              /* Are we little or big endian?  From Harbison&Steele.  */
51268              union
51269              {
51270                long int l;
51271                char c[sizeof (long int)];
51272              } u;
51273              u.l = 1;
51274              return u.c[sizeof (long int) - 1] == 1;
51275 
51276   ;
51277   return 0;
51278 }
51279 _ACEOF
51280 if ac_fn_cxx_try_run "$LINENO"; then :
51281   ac_cv_c_bigendian=no
51282 else
51283   ac_cv_c_bigendian=yes
51284 fi
51285 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51286   conftest.$ac_objext conftest.beam conftest.$ac_ext
51287 fi
51288 
51289     fi
51290 fi
51291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
51292 $as_echo "$ac_cv_c_bigendian" >&6; }
51293  case $ac_cv_c_bigendian in #(
51294    yes)
51295      ENDIAN="big";; #(
51296    no)
51297      ENDIAN="little" ;; #(
51298    universal)
51299      ENDIAN="universal_endianness"
51300      ;; #(
51301    *)
51302      ENDIAN="unknown" ;;
51303  esac
51304 
51305 
51306   if test "x$ENDIAN" = xuniversal_endianness; then
51307     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
51308   fi
51309   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
51310     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
51311   fi
51312 
51313 
51314 # Configure flags for the tools
51315 
51316   ###############################################################################
51317   #
51318   # How to compile shared libraries.
51319   #
51320 
51321   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51322     PICFLAG="-fPIC"
51323     C_FLAG_REORDER=''
51324     CXX_FLAG_REORDER=''
51325 
51326     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51327       # Linking is different on MacOSX
51328       if test "x$STATIC_BUILD" = xtrue; then
51329         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
51330       else
51331         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
51332         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
51333       fi
51334       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
51335       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
51336       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
51337       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
51338     else
51339       # Default works for linux, might work on other platforms as well.
51340       SHARED_LIBRARY_FLAGS='-shared'
51341       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
51342       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
51343       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
51344       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
51345     fi
51346   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51347     C_FLAG_REORDER=''
51348     CXX_FLAG_REORDER=''
51349 
51350     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51351       # Linking is different on MacOSX
51352       PICFLAG=''
51353       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
51354       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
51355       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
51356       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
51357       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
51358 
51359       if test "x$STATIC_BUILD" = xfalse; then
51360         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
51361       fi
51362     else
51363       # Default works for linux, might work on other platforms as well.
51364       PICFLAG='-fPIC'
51365       SHARED_LIBRARY_FLAGS='-shared'
51366       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
51367       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
51368       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
51369 
51370       # arm specific settings
51371       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
51372         # '-Wl,-z,origin' isn't used on arm.
51373         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
51374       else
51375         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
51376       fi
51377 
51378     fi
51379   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51380     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51381       PICFLAG="-xcode=pic32"
51382     else
51383       PICFLAG="-KPIC"
51384     fi
51385     C_FLAG_REORDER='-xF'
51386     CXX_FLAG_REORDER='-xF'
51387     SHARED_LIBRARY_FLAGS="-G"
51388     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
51389     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
51390     SET_SHARED_LIBRARY_NAME='-h $1'
51391     SET_SHARED_LIBRARY_MAPFILE='-M$1'
51392   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51393     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
51394     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
51395     # will have to patch this single instruction with a call to some out-of-order code which
51396     # does the load from the TOC. This is of course slow. But in that case we also would have
51397     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
51398     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
51399     # can be patched directly by the linker and does not require a jump to out-of-order code.
51400     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
51401     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
51402     # loads for accessing a global variable). But there are rumors that this may be seen as a
51403     # 'performance feature' because of improved code locality of the symbols used in a
51404     # compilation unit.
51405     PICFLAG="-qpic"
51406     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
51407     C_FLAG_REORDER=''
51408     CXX_FLAG_REORDER=''
51409     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
51410     SET_EXECUTABLE_ORIGIN=""
51411     SET_SHARED_LIBRARY_ORIGIN=''
51412     SET_SHARED_LIBRARY_NAME=''
51413     SET_SHARED_LIBRARY_MAPFILE=''
51414   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51415     PICFLAG=""
51416     C_FLAG_REORDER=''
51417     CXX_FLAG_REORDER=''
51418     SHARED_LIBRARY_FLAGS="-dll"
51419     SET_EXECUTABLE_ORIGIN=''
51420     SET_SHARED_LIBRARY_ORIGIN=''
51421     SET_SHARED_LIBRARY_NAME=''
51422     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
51423   fi
51424 
51425 
51426 
51427 
51428 
51429 
51430 
51431 
51432 
51433   # The (cross) compiler is now configured, we can now test capabilities
51434   # of the target platform.
51435 
51436 
51437 
51438   ###############################################################################
51439   #
51440   # Setup the opt flags for different compilers
51441   # and different operating systems.
51442   #
51443 
51444   # FIXME: this was indirectly the old default, but just inherited.
51445   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51446   #   C_FLAG_DEPS="-MMD -MF"
51447   # fi
51448 
51449   # Generate make dependency files
51450   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51451     C_FLAG_DEPS="-MMD -MF"
51452   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51453     C_FLAG_DEPS="-MMD -MF"
51454   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51455     C_FLAG_DEPS="-xMMD -xMF"
51456   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51457     C_FLAG_DEPS="-qmakedep=gcc -MF"
51458   fi
51459   CXX_FLAG_DEPS="$C_FLAG_DEPS"
51460 
51461 
51462 
51463   # Debug symbols
51464   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51465     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
51466       # reduce from default "-g2" option to save space
51467       CFLAGS_DEBUG_SYMBOLS="-g1"
51468       CXXFLAGS_DEBUG_SYMBOLS="-g1"
51469     else
51470       CFLAGS_DEBUG_SYMBOLS="-g"
51471       CXXFLAGS_DEBUG_SYMBOLS="-g"
51472     fi
51473   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51474     CFLAGS_DEBUG_SYMBOLS="-g"
51475     CXXFLAGS_DEBUG_SYMBOLS="-g"
51476   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51477     CFLAGS_DEBUG_SYMBOLS="-g -xs"
51478     # -g0 enables debug symbols without disabling inlining.
51479     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
51480   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51481     CFLAGS_DEBUG_SYMBOLS="-g"
51482     CXXFLAGS_DEBUG_SYMBOLS="-g"
51483   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51484     CFLAGS_DEBUG_SYMBOLS="-Zi"
51485     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
51486   fi
51487 
51488 
51489 
51490   # Debug symbols for JVM_CFLAGS
51491   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51492     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
51493     if test "x$DEBUG_LEVEL" = xslowdebug; then
51494       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
51495     else
51496       # -g0 does not disable inlining, which -g does.
51497       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
51498     fi
51499   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51500     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
51501   else
51502     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
51503   fi
51504 
51505 
51506   # bounds, memory and behavior checking options
51507   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51508     case $DEBUG_LEVEL in
51509     release )
51510       # no adjustment
51511       ;;
51512     fastdebug )
51513       # no adjustment
51514       ;;
51515     slowdebug )
51516       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
51517       # get's added conditionally on whether we produce debug symbols or not.
51518       # This is most likely not really correct.
51519 
51520       # Add runtime stack smashing and undefined behavior checks.
51521       # Not all versions of gcc support -fstack-protector
51522       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
51523 
51524 
51525 
51526 
51527 
51528 
51529 
51530 
51531 
51532 
51533 
51534 
51535 
51536 
51537 
51538 
51539 
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551 
51552 
51553 
51554 
51555 
51556 
51557 
51558 
51559 
51560 
51561 
51562 
51563 
51564 
51565     # Execute function body
51566 
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574 
51575 
51576 
51577 
51578 
51579 
51580 
51581 
51582 
51583 
51584 
51585 
51586 
51587 
51588 
51589 
51590 
51591 
51592 
51593 
51594 
51595 
51596 
51597 
51598 
51599 
51600 
51601 
51602 
51603 
51604 
51605 
51606 
51607 
51608 
51609 
51610 
51611 
51612 
51613 
51614     # Execute function body
51615 
51616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
51617 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
51618   supports=yes
51619 
51620   saved_cflags="$CFLAGS"
51621   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
51622   ac_ext=c
51623 ac_cpp='$CPP $CPPFLAGS'
51624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51627 
51628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51629 /* end confdefs.h.  */
51630 int i;
51631 _ACEOF
51632 if ac_fn_c_try_compile "$LINENO"; then :
51633 
51634 else
51635   supports=no
51636 fi
51637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51638   ac_ext=cpp
51639 ac_cpp='$CXXCPP $CPPFLAGS'
51640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51643 
51644   CFLAGS="$saved_cflags"
51645 
51646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51647 $as_echo "$supports" >&6; }
51648   if test "x$supports" = "xyes" ; then
51649     :
51650     C_COMP_SUPPORTS="yes"
51651   else
51652     :
51653     C_COMP_SUPPORTS="no"
51654   fi
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 
51692 
51693 
51694 
51695 
51696 
51697 
51698 
51699 
51700 
51701 
51702 
51703 
51704 
51705 
51706 
51707 
51708 
51709 
51710 
51711 
51712 
51713 
51714     # Execute function body
51715 
51716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
51717 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
51718   supports=yes
51719 
51720   saved_cxxflags="$CXXFLAGS"
51721   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
51722   ac_ext=cpp
51723 ac_cpp='$CXXCPP $CPPFLAGS'
51724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51727 
51728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51729 /* end confdefs.h.  */
51730 int i;
51731 _ACEOF
51732 if ac_fn_cxx_try_compile "$LINENO"; then :
51733 
51734 else
51735   supports=no
51736 fi
51737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51738   ac_ext=cpp
51739 ac_cpp='$CXXCPP $CPPFLAGS'
51740 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51741 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51742 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51743 
51744   CXXFLAGS="$saved_cxxflags"
51745 
51746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51747 $as_echo "$supports" >&6; }
51748   if test "x$supports" = "xyes" ; then
51749     :
51750     CXX_COMP_SUPPORTS="yes"
51751   else
51752     :
51753     CXX_COMP_SUPPORTS="no"
51754   fi
51755 
51756 
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
51769 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
51770   supports=no
51771   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51772 
51773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51774 $as_echo "$supports" >&6; }
51775   if test "x$supports" = "xyes" ; then
51776     :
51777 
51778   else
51779     :
51780     STACK_PROTECTOR_CFLAG=""
51781   fi
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
51790       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
51791       if test "x$STACK_PROTECTOR_CFLAG" != x; then
51792         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
51793       fi
51794       ;;
51795     esac
51796   fi
51797 
51798   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51799     if test "x$DEBUG_LEVEL" != xrelease; then
51800       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51801         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
51802       fi
51803     fi
51804   fi
51805 
51806   # Optimization levels
51807   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51808     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
51809 
51810     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
51811       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
51812       C_O_FLAG_HIGHEST_JVM="-xO4"
51813       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
51814       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
51815       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
51816       C_O_FLAG_DEBUG="-xregs=no%frameptr"
51817       C_O_FLAG_DEBUG_JVM=""
51818       C_O_FLAG_NONE="-xregs=no%frameptr"
51819       CXX_O_FLAG_HIGHEST_JVM="-xO4"
51820       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
51821       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
51822       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
51823       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
51824       CXX_O_FLAG_DEBUG_JVM=""
51825       CXX_O_FLAG_NONE="-xregs=no%frameptr"
51826       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51827         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
51828         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
51829       fi
51830     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51831       C_O_FLAG_HIGHEST_JVM="-xO4"
51832       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
51833       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
51834       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
51835       C_O_FLAG_DEBUG=""
51836       C_O_FLAG_DEBUG_JVM=""
51837       C_O_FLAG_NONE=""
51838       CXX_O_FLAG_HIGHEST_JVM="-xO4"
51839       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
51840       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
51841       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
51842       CXX_O_FLAG_DEBUG=""
51843       CXX_O_FLAG_DEBUG_JVM=""
51844       CXX_O_FLAG_NONE=""
51845     fi
51846   else
51847     # The remaining toolchains share opt flags between CC and CXX;
51848     # setup for C and duplicate afterwards.
51849     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51850       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51851         # On MacOSX we optimize for size, something
51852         # we should do for all platforms?
51853         C_O_FLAG_HIGHEST_JVM="-Os"
51854         C_O_FLAG_HIGHEST="-Os"
51855         C_O_FLAG_HI="-Os"
51856         C_O_FLAG_NORM="-Os"
51857         C_O_FLAG_SIZE="-Os"
51858       else
51859         C_O_FLAG_HIGHEST_JVM="-O3"
51860         C_O_FLAG_HIGHEST="-O3"
51861         C_O_FLAG_HI="-O3"
51862         C_O_FLAG_NORM="-O2"
51863         C_O_FLAG_SIZE="-Os"
51864       fi
51865       C_O_FLAG_DEBUG="-O0"
51866       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51867         C_O_FLAG_DEBUG_JVM=""
51868       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51869         C_O_FLAG_DEBUG_JVM="-O0"
51870       fi
51871       C_O_FLAG_NONE="-O0"
51872     elif test "x$TOOLCHAIN_TYPE" = xclang; then
51873       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51874         # On MacOSX we optimize for size, something
51875         # we should do for all platforms?
51876         C_O_FLAG_HIGHEST_JVM="-Os"
51877         C_O_FLAG_HIGHEST="-Os"
51878         C_O_FLAG_HI="-Os"
51879         C_O_FLAG_NORM="-Os"
51880         C_O_FLAG_SIZE="-Os"
51881       else
51882         C_O_FLAG_HIGHEST_JVM="-O3"
51883         C_O_FLAG_HIGHEST="-O3"
51884         C_O_FLAG_HI="-O3"
51885         C_O_FLAG_NORM="-O2"
51886         C_O_FLAG_SIZE="-Os"
51887       fi
51888       C_O_FLAG_DEBUG="-O0"
51889       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51890         C_O_FLAG_DEBUG_JVM=""
51891       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51892         C_O_FLAG_DEBUG_JVM="-O0"
51893       fi
51894       C_O_FLAG_NONE="-O0"
51895     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51896       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
51897       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
51898       C_O_FLAG_HI="-O3 -qinline -qinlglue"
51899       C_O_FLAG_NORM="-O2"
51900       C_O_FLAG_DEBUG="-qnoopt"
51901       # FIXME: Value below not verified.
51902       C_O_FLAG_DEBUG_JVM=""
51903       C_O_FLAG_NONE="-qnoopt"
51904     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51905       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
51906       C_O_FLAG_HIGHEST="-O2"
51907       C_O_FLAG_HI="-O1"
51908       C_O_FLAG_NORM="-O1"
51909       C_O_FLAG_DEBUG="-Od"
51910       C_O_FLAG_DEBUG_JVM=""
51911       C_O_FLAG_NONE="-Od"
51912       C_O_FLAG_SIZE="-Os"
51913     fi
51914     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
51915     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
51916     CXX_O_FLAG_HI="$C_O_FLAG_HI"
51917     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
51918     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
51919     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
51920     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
51921     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
51922   fi
51923 
51924   # Adjust optimization flags according to debug level.
51925   case $DEBUG_LEVEL in
51926     release )
51927       # no adjustment
51928       ;;
51929     fastdebug )
51930       # Not quite so much optimization
51931       C_O_FLAG_HI="$C_O_FLAG_NORM"
51932       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
51933       ;;
51934     slowdebug )
51935       # Disable optimization
51936       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
51937       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
51938       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
51939       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
51940       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
51941       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
51942       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
51943       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
51944       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
51945       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
51946       ;;
51947   esac
51948 
51949 
51950 
51951 
51952 
51953 
51954 
51955 
51956 
51957 
51958 
51959 
51960 
51961 
51962 
51963 
51964 
51965 
51966 
51967 
51968 # Check whether --with-abi-profile was given.
51969 if test "${with_abi_profile+set}" = set; then :
51970   withval=$with_abi_profile;
51971 fi
51972 
51973 
51974   if test "x$with_abi_profile" != x; then
51975     if test "x$OPENJDK_TARGET_CPU" != xarm && \
51976         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
51977       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
51978     fi
51979 
51980     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
51981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
51982 $as_echo_n "checking for ABI profle... " >&6; }
51983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
51984 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
51985 
51986     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
51987       ARM_FLOAT_TYPE=vfp-sflt
51988       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51989     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
51990       ARM_FLOAT_TYPE=vfp-hflt
51991       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
51992     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
51993       ARM_FLOAT_TYPE=sflt
51994       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51995     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
51996       ARM_FLOAT_TYPE=vfp-sflt
51997       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
51998     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
51999       ARM_FLOAT_TYPE=vfp-hflt
52000       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
52001     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
52002       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
52003       ARM_FLOAT_TYPE=
52004       ARM_ARCH_TYPE_FLAGS=
52005     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
52006       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
52007       ARM_FLOAT_TYPE=
52008       ARM_ARCH_TYPE_FLAGS=
52009     else
52010       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
52011     fi
52012 
52013     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
52014       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
52015     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
52016       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
52017     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
52018       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
52019     fi
52020     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
52021 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
52022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
52023 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
52024 
52025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
52026 $as_echo_n "checking for arch type flags... " >&6; }
52027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
52028 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
52029 
52030     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
52031     # autoconf target triplet.
52032      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
52033     # Sanity check that it is a known ABI.
52034     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
52035         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
52036         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
52037           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
52038 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
52039     fi
52040     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
52041 $as_echo_n "checking for ABI property name... " >&6; }
52042     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
52043 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
52044 
52045 
52046     # Pass these on to the open part of configure as if they were set using
52047     # --with-extra-c[xx]flags.
52048     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
52049     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
52050     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
52051     # FIXME: This should not really be set using extra_cflags.
52052     if test "x$OPENJDK_TARGET_CPU" = xarm; then
52053         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
52054         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
52055     fi
52056     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
52057     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
52058     # And pass the architecture flags to the linker as well
52059     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
52060   fi
52061 
52062   # When building with an abi profile, the name of that profile is appended on the
52063   # bundle platform, which is used in bundle names.
52064   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
52065     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
52066   fi
52067 
52068 
52069   # Optional POSIX functionality needed by the JVM
52070   #
52071   # Check if clock_gettime is available and in which library. This indicates
52072   # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
52073   # don't let it update LIBS.
52074   save_LIBS="$LIBS"
52075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
52076 $as_echo_n "checking for library containing clock_gettime... " >&6; }
52077 if ${ac_cv_search_clock_gettime+:} false; then :
52078   $as_echo_n "(cached) " >&6
52079 else
52080   ac_func_search_save_LIBS=$LIBS
52081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52082 /* end confdefs.h.  */
52083 
52084 /* Override any GCC internal prototype to avoid an error.
52085    Use char because int might match the return type of a GCC
52086    builtin and then its argument prototype would still apply.  */
52087 #ifdef __cplusplus
52088 extern "C"
52089 #endif
52090 char clock_gettime ();
52091 int
52092 main ()
52093 {
52094 return clock_gettime ();
52095   ;
52096   return 0;
52097 }
52098 _ACEOF
52099 for ac_lib in '' rt; do
52100   if test -z "$ac_lib"; then
52101     ac_res="none required"
52102   else
52103     ac_res=-l$ac_lib
52104     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
52105   fi
52106   if ac_fn_cxx_try_link "$LINENO"; then :
52107   ac_cv_search_clock_gettime=$ac_res
52108 fi
52109 rm -f core conftest.err conftest.$ac_objext \
52110     conftest$ac_exeext
52111   if ${ac_cv_search_clock_gettime+:} false; then :
52112   break
52113 fi
52114 done
52115 if ${ac_cv_search_clock_gettime+:} false; then :
52116 
52117 else
52118   ac_cv_search_clock_gettime=no
52119 fi
52120 rm conftest.$ac_ext
52121 LIBS=$ac_func_search_save_LIBS
52122 fi
52123 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
52124 $as_echo "$ac_cv_search_clock_gettime" >&6; }
52125 ac_res=$ac_cv_search_clock_gettime
52126 if test "$ac_res" != no; then :
52127   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
52128   HAS_CLOCK_GETTIME=true
52129 fi
52130 
52131   if test "x$LIBS" = "x-lrt "; then
52132     CLOCK_GETTIME_IN_LIBRT=true
52133   fi
52134   LIBS="$save_LIBS"
52135 
52136 
52137   # Special extras...
52138   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52139     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
52140       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52141       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52142     fi
52143     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52144     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52145   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52146     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52147     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52148   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52149     CXXSTD_CXXFLAG="-std=gnu++98"
52150 
52151 
52152 
52153 
52154 
52155 
52156 
52157 
52158 
52159 
52160 
52161 
52162 
52163 
52164 
52165 
52166 
52167 
52168 
52169 
52170 
52171 
52172 
52173 
52174 
52175 
52176 
52177 
52178 
52179 
52180 
52181 
52182 
52183 
52184 
52185 
52186 
52187 
52188 
52189 
52190 
52191 
52192     # Execute function body
52193 
52194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
52195 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
52196   supports=yes
52197 
52198   saved_cxxflags="$CXXFLAGS"
52199   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
52200   ac_ext=cpp
52201 ac_cpp='$CXXCPP $CPPFLAGS'
52202 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52203 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52204 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52205 
52206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52207 /* end confdefs.h.  */
52208 int i;
52209 _ACEOF
52210 if ac_fn_cxx_try_compile "$LINENO"; then :
52211 
52212 else
52213   supports=no
52214 fi
52215 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52216   ac_ext=cpp
52217 ac_cpp='$CXXCPP $CPPFLAGS'
52218 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52219 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52220 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52221 
52222   CXXFLAGS="$saved_cxxflags"
52223 
52224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52225 $as_echo "$supports" >&6; }
52226   if test "x$supports" = "xyes" ; then
52227     :
52228 
52229   else
52230     :
52231     CXXSTD_CXXFLAG=""
52232   fi
52233 
52234 
52235 
52236 
52237 
52238 
52239 
52240 
52241 
52242 
52243 
52244 
52245     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
52246     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
52247 
52248   fi
52249   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52250     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
52251     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
52252   fi
52253 
52254   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
52255   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
52256   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
52257 
52258   ###############################################################################
52259   #
52260   # Now setup the CFLAGS and LDFLAGS for the JDK build.
52261   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52262   #
52263 
52264   # Setup compiler/platform specific flags into
52265   #    CFLAGS_JDK    - C Compiler flags
52266   #    CXXFLAGS_JDK  - C++ Compiler flags
52267   #    COMMON_CCXXFLAGS_JDK - common to C and C++
52268   if test "x$TOOLCHAIN_TYPE" = xgcc; then
52269     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
52270     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
52271     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
52272     if test "x$OPENJDK_TARGET_CPU" = xx86; then
52273       # Force compatibility with i586 on 32 bit intel platforms.
52274       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
52275       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
52276     fi
52277     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52278         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52279     case $OPENJDK_TARGET_CPU_ARCH in
52280       arm )
52281         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52282         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52283         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
52284         ;;
52285       ppc )
52286         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52287         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52288         ;;
52289       s390 )
52290         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52291         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52292         ;;
52293       * )
52294         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52295         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52296         ;;
52297     esac
52298 
52299 
52300 
52301 
52302 
52303 
52304 
52305 
52306 
52307 
52308 
52309 
52310 
52311 
52312 
52313 
52314 
52315 
52316 
52317 
52318 
52319 
52320 
52321 
52322 
52323 
52324 
52325 
52326 
52327 
52328 
52329 
52330 
52331 
52332 
52333 
52334 
52335 
52336 
52337 
52338 
52339 
52340 
52341 
52342 
52343 
52344 
52345 
52346 
52347 
52348 
52349 
52350 
52351 
52352     # Execute function body
52353 
52354   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52355   REFERENCE_VERSION=6
52356 
52357   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52358     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52359   fi
52360 
52361   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52362     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52363   fi
52364 
52365   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52366   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52367 
52368   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52369     :
52370 
52371   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52372   # runs afoul of the more aggressive versions of these optimisations.
52373   # Notably, value range propagation now assumes that the this pointer of C++
52374   # member functions is non-null.
52375   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52376         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52377         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52378 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52379   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52380   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52381 
52382   else
52383     :
52384 
52385   fi
52386 
52387 
52388 
52389 
52390 
52391 
52392 
52393 
52394 
52395 
52396 
52397 
52398 
52399 
52400   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52401     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
52402 
52403     # Restrict the debug information created by Clang to avoid
52404     # too big object files and speed the build up a little bit
52405     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52406     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
52407     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52408       if test "x$OPENJDK_TARGET_CPU" = xx86; then
52409         # Force compatibility with i586 on 32 bit intel platforms.
52410         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
52411         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
52412       fi
52413       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
52414       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52415           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52416       case $OPENJDK_TARGET_CPU_ARCH in
52417         ppc )
52418           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52419           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52420           ;;
52421         * )
52422           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52423           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52424           ;;
52425       esac
52426     fi
52427   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52428     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
52429     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52430     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
52431       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
52432     fi
52433 
52434     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52435     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52436   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52437     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
52438     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52439     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52440   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52441     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
52442         -MD -Zc:wchar_t- -W3 -wd4800 \
52443         -DWIN32_LEAN_AND_MEAN \
52444         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52445         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52446         -DWIN32 -DIAL"
52447     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52448       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52449     else
52450       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52451     fi
52452     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52453     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52454     # studio.
52455     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52456       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52457       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52458       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52459     fi
52460   fi
52461 
52462   ###############################################################################
52463 
52464   # Adjust flags according to debug level.
52465   case $DEBUG_LEVEL in
52466     fastdebug | slowdebug )
52467       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52468       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52469       ;;
52470     release )
52471       ;;
52472     * )
52473       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52474       ;;
52475   esac
52476 
52477   # Set some common defines. These works for all compilers, but assume
52478   # -D is universally accepted.
52479 
52480   # Setup endianness
52481   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
52482     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52483     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52484     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52485     #   Note: -Dmacro         is the same as    #define macro 1
52486     #         -Dmacro=        is the same as    #define macro
52487     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52488       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52489     else
52490       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52491     fi
52492   else
52493     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52494     # are defined in the system?
52495     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52496       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52497     else
52498       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52499     fi
52500   fi
52501 
52502   # Always enable optional macros for VM.
52503   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52504   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52505   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52506 
52507   # Setup target OS define. Use OS target name but in upper case.
52508   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52509   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
52510 
52511   # Setup target CPU
52512   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52513       $OPENJDK_TARGET_ADD_LP64 \
52514       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
52515 
52516   # Setup debug/release defines
52517   if test "x$DEBUG_LEVEL" = xrelease; then
52518     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
52519     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52520       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
52521     fi
52522   else
52523     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
52524   fi
52525 
52526   # Optional POSIX functionality needed by the VM
52527 
52528   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52529     JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52530     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52531       JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
52532     fi
52533   fi
52534 
52535 
52536   # Set some additional per-OS defines.
52537   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52538     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
52539     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52540         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52541   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52542     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
52543     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
52544         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52545   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52546     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52547     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
52548     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52549     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52550         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52551         -fno-omit-frame-pointer"
52552   elif test "x$OPENJDK_TARGET_OS" = xaix; then
52553     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
52554     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
52555         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52556         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52557     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52558     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52559     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52560     if test "x$DEBUG_LEVEL" = xslowdebug; then
52561       JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
52562     fi
52563   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52564     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52565   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52566     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52567     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
52568   fi
52569 
52570   # Set some additional per-CPU defines.
52571   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
52572     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
52573   elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
52574     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
52575   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
52576     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52577       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52578       # fixes `relocation truncated to fit' error for gcc 4.1.
52579       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
52580       # Use ppc64 instructions, but schedule for power5
52581       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52582     elif test "x$OPENJDK_TARGET_OS" = xaix; then
52583       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
52584     fi
52585   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
52586     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52587       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52588       # Little endian machine uses ELFv2 ABI.
52589       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
52590       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52591       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
52592     fi
52593   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
52594     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52595       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
52596     fi
52597   fi
52598 
52599   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
52600     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52601   fi
52602 
52603   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52604     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
52605       # Solaris does not have _LP64=1 in the old build.
52606       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52607       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
52608     fi
52609   fi
52610 
52611   # Set JVM_CFLAGS warning handling
52612   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52613     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52614         -Wunused-value -Woverloaded-virtual"
52615 
52616     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52617 
52618 
52619 
52620 
52621 
52622 
52623 
52624 
52625 
52626 
52627 
52628 
52629 
52630 
52631 
52632 
52633 
52634 
52635 
52636 
52637 
52638 
52639 
52640 
52641 
52642 
52643 
52644 
52645 
52646 
52647 
52648 
52649 
52650 
52651 
52652 
52653 
52654 
52655 
52656 
52657 
52658 
52659 
52660 
52661 
52662 
52663 
52664 
52665 
52666 
52667 
52668 
52669 
52670 
52671     # Execute function body
52672 
52673   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52674   REFERENCE_VERSION=4.8
52675 
52676   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52677     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52678   fi
52679 
52680   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52681     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52682   fi
52683 
52684   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52685   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52686 
52687   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52688     :
52689 
52690             # These flags either do not work or give spurious warnings prior to gcc 4.8.
52691             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52692 
52693 
52694   else
52695     :
52696 
52697   fi
52698 
52699 
52700 
52701 
52702 
52703 
52704 
52705 
52706 
52707 
52708 
52709 
52710 
52711 
52712     fi
52713     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
52714       # Non-zero builds have stricter warnings
52715       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52716     else
52717       if test "x$TOOLCHAIN_TYPE" = xclang; then
52718         # Some versions of llvm do not like -Wundef
52719         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
52720       fi
52721     fi
52722   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52723     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52724         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52725   fi
52726 
52727   # Additional macosx handling
52728   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52729     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52730     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52731     # JDK can be built and makes the linked binaries compatible even if built on
52732     # a newer version of the OS.
52733     MACOSX_VERSION_MIN=10.7.0
52734 
52735 
52736     # Setting --with-macosx-version-max=<version> makes it an error to build or
52737     # link to macosx APIs that are newer than the given OS version. The expected
52738     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52739 
52740 # Check whether --with-macosx-version-max was given.
52741 if test "${with_macosx_version_max+set}" = set; then :
52742   withval=$with_macosx_version_max;
52743           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52744               MACOSX_VERSION_MAX=$with_macosx_version_max
52745           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52746               MACOSX_VERSION_MAX=$with_macosx_version_max
52747           elif test "x$with_macosx_version_max" = "xno"; then
52748               # Use build system default
52749               MACOSX_VERSION_MAX=
52750           else
52751               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52752           fi
52753 
52754 else
52755   MACOSX_VERSION_MAX=
52756 
52757 fi
52758 
52759 
52760 
52761     # Let the flags variables get resolved in make for easier override on make
52762     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52763     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52764         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52765         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52766     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52767     JVM_CFLAGS="$JVM_CFLAGS \
52768         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52769         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52770 
52771     if test -n "$MACOSX_VERSION_MAX"; then
52772         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52773             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52774         JVM_CFLAGS="$JVM_CFLAGS \
52775             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52776     fi
52777   fi
52778 
52779   # Setup some hard coded includes
52780   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52781       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52782       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
52783       -I${TOPDIR}/src/java.base/share/native/libjava \
52784       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
52785       -I${TOPDIR}/src/hotspot/share/include \
52786       -I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
52787 
52788   # The shared libraries are compiled using the picflag.
52789   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
52790       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52791   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
52792       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52793 
52794   # Executable flags
52795   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
52796   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
52797 
52798 
52799 
52800 
52801 
52802 
52803   # Setup LDFLAGS et al.
52804   #
52805 
52806   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52807     LDFLAGS_MICROSOFT="-nologo -opt:ref"
52808     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52809     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52810     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
52811       LDFLAGS_SAFESH="-safeseh"
52812       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
52813       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
52814       # NOTE: Old build added -machine. Probably not needed.
52815       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
52816     else
52817       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
52818     fi
52819   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52820       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52821       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52822         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52823         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52824     fi
52825   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52826     # If this is a --hash-style=gnu system, use --hash-style=both, why?
52827     # We have previously set HAS_GNU_HASH if this is the case
52828     if test -n "$HAS_GNU_HASH"; then
52829       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52830       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
52831       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
52832     fi
52833       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52834         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52835     fi
52836     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52837       # And since we now know that the linker is gnu, then add -z defs, to forbid
52838       # undefined symbols in object files.
52839       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52840       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52841       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52842       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52843       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52844       if test "x$OPENJDK_TARGET_CPU" = xx86; then
52845         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
52846       fi
52847       case $DEBUG_LEVEL in
52848         release )
52849           # tell linker to optimize libraries.
52850           # Should this be supplied to the OSS linker as well?
52851           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52852           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52853           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52854           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52855             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
52856           fi
52857           ;;
52858         slowdebug )
52859           # Hotspot always let the linker optimize
52860           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
52861           if test "x$HAS_LINKER_NOW" = "xtrue"; then
52862             # do relocations at load
52863             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
52864             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52865             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
52866           fi
52867           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52868             # mark relocations read only
52869             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
52870             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52871             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
52872           fi
52873           ;;
52874         fastdebug )
52875           # Hotspot always let the linker optimize
52876           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
52877           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52878             # mark relocations read only
52879             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
52880             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52881             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
52882           fi
52883           ;;
52884         * )
52885           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52886           ;;
52887         esac
52888     fi
52889   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52890     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52891     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52892     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52893     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52894     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52895     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
52896       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
52897     fi
52898   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52899     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
52900     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
52901     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
52902     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52903     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52904     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52905     if test "x$DEBUG_LEVEL" = xslowdebug; then
52906       JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
52907     fi
52908   fi
52909 
52910   # Customize LDFLAGS for executables
52911 
52912   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
52913 
52914   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52915     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
52916       LDFLAGS_STACK_SIZE=1048576
52917     else
52918       LDFLAGS_STACK_SIZE=327680
52919     fi
52920     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52921   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52922     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52923   fi
52924 
52925   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
52926 
52927   # Customize LDFLAGS for libs
52928   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
52929 
52930   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52931   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
52932   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52933     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52934         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
52935     JDKLIB_LIBS=""
52936   else
52937     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52938         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52939 
52940     if test "xTARGET" = "xTARGET"; then
52941       # On some platforms (mac) the linker warns about non existing -L dirs.
52942       # For any of the variants server, client or minimal, the dir matches the
52943       # variant name. The "main" variant should be used for linking. For the
52944       # rest, the dir is just server.
52945       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52946           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52947         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52948             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52949       else
52950         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52951             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52952       fi
52953     elif test "xTARGET" = "xBUILD"; then
52954       # When building a buildjdk, it's always only the server variant
52955       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
52956           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52957     fi
52958 
52959     JDKLIB_LIBS="-ljava -ljvm"
52960     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52961       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
52962     fi
52963 
52964   fi
52965 
52966 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
52967 
52968   # Set JVM_LIBS (per os)
52969   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52970     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
52971   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52972     # FIXME: This hard-coded path is not really proper.
52973     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52974       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52975     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
52976       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52977     fi
52978     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52979         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
52980   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52981     JVM_LIBS="$JVM_LIBS -lm"
52982   elif test "x$OPENJDK_TARGET_OS" = xaix; then
52983     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52984   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52985     JVM_LIBS="$JVM_LIBS -lm"
52986   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52987     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52988         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52989         wsock32.lib winmm.lib version.lib psapi.lib"
52990     fi
52991 
52992   # Set JVM_ASFLAGS
52993   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52994     if test "x$OPENJDK_TARGET_CPU" = xx86; then
52995       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
52996     fi
52997   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52998     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52999   fi
53000 
53001   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
53002 
53003 
53004 
53005 
53006 
53007 
53008 
53009 
53010 
53011 
53012 
53013 
53014 
53015 
53016 
53017 
53018   # Special extras...
53019   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53020     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
53021       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
53022       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
53023     fi
53024     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
53025     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
53026   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
53027     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
53028     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
53029   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
53030     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
53031 
53032 
53033 
53034 
53035 
53036 
53037 
53038 
53039 
53040 
53041 
53042 
53043 
53044 
53045 
53046 
53047 
53048 
53049 
53050 
53051 
53052 
53053 
53054 
53055 
53056 
53057 
53058 
53059 
53060 
53061 
53062 
53063 
53064 
53065 
53066 
53067 
53068 
53069 
53070 
53071 
53072 
53073     # Execute function body
53074 
53075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
53076 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
53077   supports=yes
53078 
53079   saved_cxxflags="$CXXFLAGS"
53080   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
53081   ac_ext=cpp
53082 ac_cpp='$CXXCPP $CPPFLAGS'
53083 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53084 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53085 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53086 
53087   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53088 /* end confdefs.h.  */
53089 int i;
53090 _ACEOF
53091 if ac_fn_cxx_try_compile "$LINENO"; then :
53092 
53093 else
53094   supports=no
53095 fi
53096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53097   ac_ext=cpp
53098 ac_cpp='$CXXCPP $CPPFLAGS'
53099 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53100 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53101 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53102 
53103   CXXFLAGS="$saved_cxxflags"
53104 
53105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53106 $as_echo "$supports" >&6; }
53107   if test "x$supports" = "xyes" ; then
53108     :
53109 
53110   else
53111     :
53112     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
53113   fi
53114 
53115 
53116 
53117 
53118 
53119 
53120 
53121 
53122 
53123 
53124 
53125 
53126     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
53127     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
53128 
53129   fi
53130   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
53131     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
53132     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
53133   fi
53134 
53135   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
53136   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
53137   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
53138 
53139   ###############################################################################
53140   #
53141   # Now setup the CFLAGS and LDFLAGS for the JDK build.
53142   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
53143   #
53144 
53145   # Setup compiler/platform specific flags into
53146   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
53147   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
53148   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
53149   if test "x$TOOLCHAIN_TYPE" = xgcc; then
53150     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
53151     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
53152     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
53153     if test "x$OPENJDK_BUILD_CPU" = xx86; then
53154       # Force compatibility with i586 on 32 bit intel platforms.
53155       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
53156       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
53157     fi
53158     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
53159         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
53160     case $OPENJDK_BUILD_CPU_ARCH in
53161       arm )
53162         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
53163         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53164         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
53165         ;;
53166       ppc )
53167         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
53168         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53169         ;;
53170       s390 )
53171         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
53172         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53173         ;;
53174       * )
53175         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
53176         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53177         ;;
53178     esac
53179 
53180 
53181 
53182 
53183 
53184 
53185 
53186 
53187 
53188 
53189 
53190 
53191 
53192 
53193 
53194 
53195 
53196 
53197 
53198 
53199 
53200 
53201 
53202 
53203 
53204 
53205 
53206 
53207 
53208 
53209 
53210 
53211 
53212 
53213 
53214 
53215 
53216 
53217 
53218 
53219 
53220 
53221 
53222 
53223 
53224 
53225 
53226 
53227 
53228 
53229 
53230 
53231 
53232 
53233     # Execute function body
53234 
53235   # Need to assign to a variable since m4 is blocked from modifying parts in [].
53236   REFERENCE_VERSION=6
53237 
53238   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
53239     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
53240   fi
53241 
53242   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
53243     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
53244   fi
53245 
53246   # Version comparison method inspired by http://stackoverflow.com/a/24067243
53247   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
53248 
53249   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
53250     :
53251 
53252   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
53253   # runs afoul of the more aggressive versions of these optimisations.
53254   # Notably, value range propagation now assumes that the this pointer of C++
53255   # member functions is non-null.
53256   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
53257         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
53258         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
53259 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
53260   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
53261   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
53262 
53263   else
53264     :
53265 
53266   fi
53267 
53268 
53269 
53270 
53271 
53272 
53273 
53274 
53275 
53276 
53277 
53278 
53279 
53280 
53281   elif test "x$TOOLCHAIN_TYPE" = xclang; then
53282     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
53283 
53284     # Restrict the debug information created by Clang to avoid
53285     # too big object files and speed the build up a little bit
53286     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
53287     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
53288     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53289       if test "x$OPENJDK_BUILD_CPU" = xx86; then
53290         # Force compatibility with i586 on 32 bit intel platforms.
53291         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
53292         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
53293       fi
53294       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
53295       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
53296           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
53297       case $OPENJDK_BUILD_CPU_ARCH in
53298         ppc )
53299           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
53300           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53301           ;;
53302         * )
53303           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
53304           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53305           ;;
53306       esac
53307     fi
53308   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53309     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
53310     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
53311     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
53312       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
53313     fi
53314 
53315     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
53316     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
53317   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
53318     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
53319     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
53320     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
53321   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53322     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53323         -MD -Zc:wchar_t- -W3 -wd4800 \
53324         -DWIN32_LEAN_AND_MEAN \
53325         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
53326         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
53327         -DWIN32 -DIAL"
53328     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
53329       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
53330     else
53331       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
53332     fi
53333     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
53334     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
53335     # studio.
53336     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
53337       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
53338       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
53339       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
53340     fi
53341   fi
53342 
53343   ###############################################################################
53344 
53345   # Adjust flags according to debug level.
53346   case $DEBUG_LEVEL in
53347     fastdebug | slowdebug )
53348       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
53349       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
53350       ;;
53351     release )
53352       ;;
53353     * )
53354       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
53355       ;;
53356   esac
53357 
53358   # Set some common defines. These works for all compilers, but assume
53359   # -D is universally accepted.
53360 
53361   # Setup endianness
53362   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
53363     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
53364     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
53365     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
53366     #   Note: -Dmacro         is the same as    #define macro 1
53367     #         -Dmacro=        is the same as    #define macro
53368     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
53369       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
53370     else
53371       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
53372     fi
53373   else
53374     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
53375     # are defined in the system?
53376     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
53377       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
53378     else
53379       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
53380     fi
53381   fi
53382 
53383   # Always enable optional macros for VM.
53384   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
53385   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
53386   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
53387 
53388   # Setup target OS define. Use OS target name but in upper case.
53389   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
53390   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
53391 
53392   # Setup target CPU
53393   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53394       $OPENJDK_BUILD_ADD_LP64 \
53395       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
53396 
53397   # Setup debug/release defines
53398   if test "x$DEBUG_LEVEL" = xrelease; then
53399     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
53400     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
53401       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
53402     fi
53403   else
53404     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
53405   fi
53406 
53407   # Optional POSIX functionality needed by the VM
53408 
53409   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
53410     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
53411     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
53412       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
53413     fi
53414   fi
53415 
53416 
53417   # Set some additional per-OS defines.
53418   if test "x$OPENJDK_BUILD_OS" = xlinux; then
53419     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
53420     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
53421         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
53422   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
53423     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
53424     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
53425         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
53426   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
53427     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
53428     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
53429     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
53430     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
53431         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
53432         -fno-omit-frame-pointer"
53433   elif test "x$OPENJDK_BUILD_OS" = xaix; then
53434     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
53435     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
53436         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
53437         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
53438     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
53439     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
53440     # so for slowdebug we build with '-qpic=large -bbigtoc'.
53441     if test "x$DEBUG_LEVEL" = xslowdebug; then
53442       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
53443     fi
53444   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
53445     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
53446   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53447     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
53448     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
53449   fi
53450 
53451   # Set some additional per-CPU defines.
53452   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
53453     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
53454   elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
53455     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
53456   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
53457     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53458       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
53459       # fixes `relocation truncated to fit' error for gcc 4.1.
53460       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
53461       # Use ppc64 instructions, but schedule for power5
53462       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
53463     elif test "x$OPENJDK_BUILD_OS" = xaix; then
53464       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
53465     fi
53466   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
53467     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53468       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
53469       # Little endian machine uses ELFv2 ABI.
53470       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
53471       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
53472       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
53473     fi
53474   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
53475     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53476       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
53477     fi
53478   fi
53479 
53480   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
53481     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
53482   fi
53483 
53484   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
53485     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
53486       # Solaris does not have _LP64=1 in the old build.
53487       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
53488       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
53489     fi
53490   fi
53491 
53492   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
53493   if test "x$OPENJDK_BUILD_OS" = xlinux; then
53494     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
53495         -Wunused-value -Woverloaded-virtual"
53496 
53497     if test "x$TOOLCHAIN_TYPE" = xgcc; then
53498 
53499 
53500 
53501 
53502 
53503 
53504 
53505 
53506 
53507 
53508 
53509 
53510 
53511 
53512 
53513 
53514 
53515 
53516 
53517 
53518 
53519 
53520 
53521 
53522 
53523 
53524 
53525 
53526 
53527 
53528 
53529 
53530 
53531 
53532 
53533 
53534 
53535 
53536 
53537 
53538 
53539 
53540 
53541 
53542 
53543 
53544 
53545 
53546 
53547 
53548 
53549 
53550 
53551 
53552     # Execute function body
53553 
53554   # Need to assign to a variable since m4 is blocked from modifying parts in [].
53555   REFERENCE_VERSION=4.8
53556 
53557   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
53558     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
53559   fi
53560 
53561   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
53562     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
53563   fi
53564 
53565   # Version comparison method inspired by http://stackoverflow.com/a/24067243
53566   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
53567 
53568   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
53569     :
53570 
53571             # These flags either do not work or give spurious warnings prior to gcc 4.8.
53572             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
53573 
53574 
53575   else
53576     :
53577 
53578   fi
53579 
53580 
53581 
53582 
53583 
53584 
53585 
53586 
53587 
53588 
53589 
53590 
53591 
53592 
53593     fi
53594     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
53595       # Non-zero builds have stricter warnings
53596       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
53597     else
53598       if test "x$TOOLCHAIN_TYPE" = xclang; then
53599         # Some versions of llvm do not like -Wundef
53600         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
53601       fi
53602     fi
53603   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
53604     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
53605         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
53606   fi
53607 
53608   # Additional macosx handling
53609   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
53610     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
53611     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
53612     # JDK can be built and makes the linked binaries compatible even if built on
53613     # a newer version of the OS.
53614     MACOSX_VERSION_MIN=10.7.0
53615 
53616 
53617     # Setting --with-macosx-version-max=<version> makes it an error to build or
53618     # link to macosx APIs that are newer than the given OS version. The expected
53619     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
53620 
53621 # Check whether --with-macosx-version-max was given.
53622 if test "${with_macosx_version_max+set}" = set; then :
53623   withval=$with_macosx_version_max;
53624           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
53625               MACOSX_VERSION_MAX=$with_macosx_version_max
53626           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
53627               MACOSX_VERSION_MAX=$with_macosx_version_max
53628           elif test "x$with_macosx_version_max" = "xno"; then
53629               # Use build system default
53630               MACOSX_VERSION_MAX=
53631           else
53632               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
53633           fi
53634 
53635 else
53636   MACOSX_VERSION_MAX=
53637 
53638 fi
53639 
53640 
53641 
53642     # Let the flags variables get resolved in make for easier override on make
53643     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
53644     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53645         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
53646         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
53647     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
53648     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
53649         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
53650         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
53651 
53652     if test -n "$MACOSX_VERSION_MAX"; then
53653         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53654             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
53655         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
53656             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
53657     fi
53658   fi
53659 
53660   # Setup some hard coded includes
53661   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53662       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
53663       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
53664       -I${TOPDIR}/src/java.base/share/native/libjava \
53665       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava \
53666       -I${TOPDIR}/src/hotspot/share/include \
53667       -I${TOPDIR}/src/hotspot/os/${HOTSPOT_BUILD_OS_TYPE}/include"
53668 
53669   # The shared libraries are compiled using the picflag.
53670   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53671       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
53672   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53673       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
53674 
53675   # Executable flags
53676   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
53677   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
53678 
53679 
53680 
53681 
53682 
53683 
53684   # Setup LDFLAGS et al.
53685   #
53686 
53687   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53688     LDFLAGS_MICROSOFT="-nologo -opt:ref"
53689     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
53690     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
53691     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
53692       LDFLAGS_SAFESH="-safeseh"
53693       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
53694       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
53695       # NOTE: Old build added -machine. Probably not needed.
53696       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
53697     else
53698       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
53699     fi
53700   elif test "x$TOOLCHAIN_TYPE" = xclang; then
53701       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
53702       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
53703         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
53704         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
53705     fi
53706   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
53707     # If this is a --hash-style=gnu system, use --hash-style=both, why?
53708     # We have previously set HAS_GNU_HASH if this is the case
53709     if test -n "$HAS_GNU_HASH"; then
53710       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
53711       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
53712       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
53713     fi
53714       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
53715         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
53716     fi
53717     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53718       # And since we now know that the linker is gnu, then add -z defs, to forbid
53719       # undefined symbols in object files.
53720       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
53721       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
53722       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
53723       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
53724       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
53725       if test "x$OPENJDK_BUILD_CPU" = xx86; then
53726         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
53727       fi
53728       case $DEBUG_LEVEL in
53729         release )
53730           # tell linker to optimize libraries.
53731           # Should this be supplied to the OSS linker as well?
53732           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
53733           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
53734           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
53735           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53736             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
53737           fi
53738           ;;
53739         slowdebug )
53740           # Hotspot always let the linker optimize
53741           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
53742           if test "x$HAS_LINKER_NOW" = "xtrue"; then
53743             # do relocations at load
53744             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
53745             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
53746             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
53747           fi
53748           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53749             # mark relocations read only
53750             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
53751             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
53752             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
53753           fi
53754           ;;
53755         fastdebug )
53756           # Hotspot always let the linker optimize
53757           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
53758           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53759             # mark relocations read only
53760             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
53761             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
53762             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
53763           fi
53764           ;;
53765         * )
53766           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
53767           ;;
53768         esac
53769     fi
53770   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53771     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
53772     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
53773     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
53774     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
53775     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
53776     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
53777       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
53778     fi
53779   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
53780     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
53781     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
53782     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
53783     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
53784     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
53785     # so for slowdebug we build with '-qpic=large -bbigtoc'.
53786     if test "x$DEBUG_LEVEL" = xslowdebug; then
53787       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
53788     fi
53789   fi
53790 
53791   # Customize LDFLAGS for executables
53792 
53793   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
53794 
53795   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53796     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
53797       LDFLAGS_STACK_SIZE=1048576
53798     else
53799       LDFLAGS_STACK_SIZE=327680
53800     fi
53801     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
53802   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
53803     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
53804   fi
53805 
53806   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
53807 
53808   # Customize LDFLAGS for libs
53809   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
53810 
53811   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
53812   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
53813   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53814     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
53815         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
53816     OPENJDK_BUILD_JDKLIB_LIBS=""
53817   else
53818     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
53819         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
53820 
53821     if test "xBUILD" = "xTARGET"; then
53822       # On some platforms (mac) the linker warns about non existing -L dirs.
53823       # For any of the variants server, client or minimal, the dir matches the
53824       # variant name. The "main" variant should be used for linking. For the
53825       # rest, the dir is just server.
53826       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
53827           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
53828         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
53829             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
53830       else
53831         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
53832             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
53833       fi
53834     elif test "xBUILD" = "xBUILD"; then
53835       # When building a buildjdk, it's always only the server variant
53836       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
53837           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
53838     fi
53839 
53840     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
53841     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53842       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
53843     fi
53844 
53845   fi
53846 
53847 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
53848 
53849   # Set OPENJDK_BUILD_JVM_LIBS (per os)
53850   if test "x$OPENJDK_BUILD_OS" = xlinux; then
53851     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
53852   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
53853     # FIXME: This hard-coded path is not really proper.
53854     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
53855       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
53856     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
53857       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
53858     fi
53859     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
53860         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
53861   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
53862     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
53863   elif test "x$OPENJDK_BUILD_OS" = xaix; then
53864     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
53865   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
53866     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
53867   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53868     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
53869         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
53870         wsock32.lib winmm.lib version.lib psapi.lib"
53871     fi
53872 
53873   # Set OPENJDK_BUILD_JVM_ASFLAGS
53874   if test "x$OPENJDK_BUILD_OS" = xlinux; then
53875     if test "x$OPENJDK_BUILD_CPU" = xx86; then
53876       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
53877     fi
53878   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
53879     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
53880   fi
53881 
53882   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
53883 
53884 
53885 
53886 
53887 
53888 
53889 
53890 
53891 
53892 
53893 
53894 
53895 
53896 
53897 
53898 
53899   # Tests are only ever compiled for TARGET
53900   # Flags for compiling test libraries
53901   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
53902   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
53903 
53904   # Flags for compiling test executables
53905   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
53906   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
53907 
53908 
53909 
53910 
53911 
53912 
53913   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
53914   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
53915 
53916 
53917 
53918 
53919 
53920 
53921   # Check that the compiler supports -mX (or -qX on AIX) flags
53922   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
53923 
53924 
53925 
53926 
53927 
53928 
53929 
53930 
53931 
53932 
53933 
53934 
53935 
53936 
53937 
53938 
53939 
53940 
53941 
53942 
53943 
53944 
53945 
53946 
53947 
53948 
53949 
53950 
53951 
53952 
53953 
53954 
53955 
53956 
53957 
53958 
53959 
53960 
53961 
53962 
53963 
53964 
53965 
53966 
53967 
53968 
53969 
53970     # Execute function body
53971 
53972 
53973 
53974 
53975 
53976 
53977 
53978 
53979 
53980 
53981 
53982 
53983 
53984 
53985 
53986 
53987 
53988 
53989 
53990 
53991 
53992 
53993 
53994 
53995 
53996 
53997 
53998 
53999 
54000 
54001 
54002 
54003 
54004 
54005 
54006 
54007 
54008 
54009 
54010 
54011 
54012 
54013 
54014 
54015 
54016 
54017 
54018 
54019     # Execute function body
54020 
54021   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
54022 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
54023   supports=yes
54024 
54025   saved_cflags="$CFLAGS"
54026   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
54027   ac_ext=c
54028 ac_cpp='$CPP $CPPFLAGS'
54029 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54030 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54031 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54032 
54033   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54034 /* end confdefs.h.  */
54035 int i;
54036 _ACEOF
54037 if ac_fn_c_try_compile "$LINENO"; then :
54038 
54039 else
54040   supports=no
54041 fi
54042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54043   ac_ext=cpp
54044 ac_cpp='$CXXCPP $CPPFLAGS'
54045 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54046 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54047 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54048 
54049   CFLAGS="$saved_cflags"
54050 
54051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54052 $as_echo "$supports" >&6; }
54053   if test "x$supports" = "xyes" ; then
54054     :
54055     C_COMP_SUPPORTS="yes"
54056   else
54057     :
54058     C_COMP_SUPPORTS="no"
54059   fi
54060 
54061 
54062 
54063 
54064 
54065 
54066 
54067 
54068 
54069 
54070 
54071 
54072 
54073 
54074 
54075 
54076 
54077 
54078 
54079 
54080 
54081 
54082 
54083 
54084 
54085 
54086 
54087 
54088 
54089 
54090 
54091 
54092 
54093 
54094 
54095 
54096 
54097 
54098 
54099 
54100 
54101 
54102 
54103 
54104 
54105 
54106 
54107 
54108 
54109 
54110 
54111 
54112 
54113 
54114 
54115 
54116 
54117 
54118 
54119     # Execute function body
54120 
54121   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
54122 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
54123   supports=yes
54124 
54125   saved_cxxflags="$CXXFLAGS"
54126   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
54127   ac_ext=cpp
54128 ac_cpp='$CXXCPP $CPPFLAGS'
54129 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54130 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54131 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54132 
54133   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54134 /* end confdefs.h.  */
54135 int i;
54136 _ACEOF
54137 if ac_fn_cxx_try_compile "$LINENO"; then :
54138 
54139 else
54140   supports=no
54141 fi
54142 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54143   ac_ext=cpp
54144 ac_cpp='$CXXCPP $CPPFLAGS'
54145 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54146 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54147 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54148 
54149   CXXFLAGS="$saved_cxxflags"
54150 
54151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54152 $as_echo "$supports" >&6; }
54153   if test "x$supports" = "xyes" ; then
54154     :
54155     CXX_COMP_SUPPORTS="yes"
54156   else
54157     :
54158     CXX_COMP_SUPPORTS="no"
54159   fi
54160 
54161 
54162 
54163 
54164 
54165 
54166 
54167 
54168 
54169 
54170 
54171 
54172 
54173   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
54174 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
54175   supports=no
54176   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
54177 
54178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54179 $as_echo "$supports" >&6; }
54180   if test "x$supports" = "xyes" ; then
54181     :
54182     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
54183   else
54184     :
54185     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
54186   fi
54187 
54188 
54189 
54190 
54191 
54192 
54193 
54194 
54195   # Check whether --enable-warnings-as-errors was given.
54196 if test "${enable_warnings_as_errors+set}" = set; then :
54197   enableval=$enable_warnings_as_errors;
54198 fi
54199 
54200 
54201   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
54202 $as_echo_n "checking if native warnings are errors... " >&6; }
54203   if test "x$enable_warnings_as_errors" = "xyes"; then
54204     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
54205 $as_echo "yes (explicitly set)" >&6; }
54206     WARNINGS_AS_ERRORS=true
54207   elif test "x$enable_warnings_as_errors" = "xno"; then
54208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54209 $as_echo "no" >&6; }
54210     WARNINGS_AS_ERRORS=false
54211   elif test "x$enable_warnings_as_errors" = "x"; then
54212     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
54213 $as_echo "yes (default)" >&6; }
54214     WARNINGS_AS_ERRORS=true
54215   else
54216     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
54217   fi
54218 
54219 
54220 
54221   case "${TOOLCHAIN_TYPE}" in
54222     microsoft)
54223       DISABLE_WARNING_PREFIX="-wd"
54224       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
54225       ;;
54226     solstudio)
54227       DISABLE_WARNING_PREFIX="-erroff="
54228       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
54229       ;;
54230     gcc)
54231       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
54232 
54233 
54234 
54235 
54236 
54237 
54238 
54239 
54240 
54241 
54242 
54243 
54244 
54245 
54246 
54247 
54248 
54249 
54250 
54251 
54252 
54253 
54254 
54255 
54256 
54257 
54258 
54259 
54260 
54261 
54262 
54263 
54264 
54265 
54266 
54267 
54268 
54269 
54270 
54271 
54272 
54273 
54274 
54275 
54276 
54277 
54278 
54279     # Execute function body
54280 
54281 
54282 
54283 
54284 
54285 
54286 
54287 
54288 
54289 
54290 
54291 
54292 
54293 
54294 
54295 
54296 
54297 
54298 
54299 
54300 
54301 
54302 
54303 
54304 
54305 
54306 
54307 
54308 
54309 
54310 
54311 
54312 
54313 
54314 
54315 
54316 
54317 
54318 
54319 
54320 
54321 
54322 
54323 
54324 
54325 
54326 
54327 
54328     # Execute function body
54329 
54330   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54331 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54332   supports=yes
54333 
54334   saved_cflags="$CFLAGS"
54335   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
54336   ac_ext=c
54337 ac_cpp='$CPP $CPPFLAGS'
54338 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54339 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54340 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54341 
54342   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54343 /* end confdefs.h.  */
54344 int i;
54345 _ACEOF
54346 if ac_fn_c_try_compile "$LINENO"; then :
54347 
54348 else
54349   supports=no
54350 fi
54351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54352   ac_ext=cpp
54353 ac_cpp='$CXXCPP $CPPFLAGS'
54354 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54355 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54356 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54357 
54358   CFLAGS="$saved_cflags"
54359 
54360   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54361 $as_echo "$supports" >&6; }
54362   if test "x$supports" = "xyes" ; then
54363     :
54364     C_COMP_SUPPORTS="yes"
54365   else
54366     :
54367     C_COMP_SUPPORTS="no"
54368   fi
54369 
54370 
54371 
54372 
54373 
54374 
54375 
54376 
54377 
54378 
54379 
54380 
54381 
54382 
54383 
54384 
54385 
54386 
54387 
54388 
54389 
54390 
54391 
54392 
54393 
54394 
54395 
54396 
54397 
54398 
54399 
54400 
54401 
54402 
54403 
54404 
54405 
54406 
54407 
54408 
54409 
54410 
54411 
54412 
54413 
54414 
54415 
54416 
54417 
54418 
54419 
54420 
54421 
54422 
54423 
54424 
54425 
54426 
54427 
54428     # Execute function body
54429 
54430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54431 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54432   supports=yes
54433 
54434   saved_cxxflags="$CXXFLAGS"
54435   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
54436   ac_ext=cpp
54437 ac_cpp='$CXXCPP $CPPFLAGS'
54438 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54439 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54440 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54441 
54442   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54443 /* end confdefs.h.  */
54444 int i;
54445 _ACEOF
54446 if ac_fn_cxx_try_compile "$LINENO"; then :
54447 
54448 else
54449   supports=no
54450 fi
54451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54452   ac_ext=cpp
54453 ac_cpp='$CXXCPP $CPPFLAGS'
54454 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54455 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54456 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54457 
54458   CXXFLAGS="$saved_cxxflags"
54459 
54460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54461 $as_echo "$supports" >&6; }
54462   if test "x$supports" = "xyes" ; then
54463     :
54464     CXX_COMP_SUPPORTS="yes"
54465   else
54466     :
54467     CXX_COMP_SUPPORTS="no"
54468   fi
54469 
54470 
54471 
54472 
54473 
54474 
54475 
54476 
54477 
54478 
54479 
54480 
54481 
54482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54483 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54484   supports=no
54485   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
54486 
54487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54488 $as_echo "$supports" >&6; }
54489   if test "x$supports" = "xyes" ; then
54490     :
54491     GCC_CAN_DISABLE_WARNINGS=true
54492   else
54493     :
54494     GCC_CAN_DISABLE_WARNINGS=false
54495 
54496   fi
54497 
54498 
54499 
54500 
54501 
54502 
54503       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
54504         DISABLE_WARNING_PREFIX="-Wno-"
54505       else
54506         DISABLE_WARNING_PREFIX=
54507       fi
54508       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
54509       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
54510       # CFLAGS since any target specific flags will likely not work with the
54511       # build compiler
54512       CC_OLD="$CC"
54513       CXX_OLD="$CXX"
54514       CC="$BUILD_CC"
54515       CXX="$BUILD_CXX"
54516       CFLAGS_OLD="$CFLAGS"
54517       CFLAGS=""
54518 
54519 
54520 
54521 
54522 
54523 
54524 
54525 
54526 
54527 
54528 
54529 
54530 
54531 
54532 
54533 
54534 
54535 
54536 
54537 
54538 
54539 
54540 
54541 
54542 
54543 
54544 
54545 
54546 
54547 
54548 
54549 
54550 
54551 
54552 
54553 
54554 
54555 
54556 
54557 
54558 
54559 
54560 
54561 
54562 
54563 
54564 
54565     # Execute function body
54566 
54567 
54568 
54569 
54570 
54571 
54572 
54573 
54574 
54575 
54576 
54577 
54578 
54579 
54580 
54581 
54582 
54583 
54584 
54585 
54586 
54587 
54588 
54589 
54590 
54591 
54592 
54593 
54594 
54595 
54596 
54597 
54598 
54599 
54600 
54601 
54602 
54603 
54604 
54605 
54606 
54607 
54608 
54609 
54610 
54611 
54612 
54613 
54614     # Execute function body
54615 
54616   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54617 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54618   supports=yes
54619 
54620   saved_cflags="$CFLAGS"
54621   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
54622   ac_ext=c
54623 ac_cpp='$CPP $CPPFLAGS'
54624 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54625 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54626 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54627 
54628   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54629 /* end confdefs.h.  */
54630 int i;
54631 _ACEOF
54632 if ac_fn_c_try_compile "$LINENO"; then :
54633 
54634 else
54635   supports=no
54636 fi
54637 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54638   ac_ext=cpp
54639 ac_cpp='$CXXCPP $CPPFLAGS'
54640 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54641 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54642 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54643 
54644   CFLAGS="$saved_cflags"
54645 
54646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54647 $as_echo "$supports" >&6; }
54648   if test "x$supports" = "xyes" ; then
54649     :
54650     C_COMP_SUPPORTS="yes"
54651   else
54652     :
54653     C_COMP_SUPPORTS="no"
54654   fi
54655 
54656 
54657 
54658 
54659 
54660 
54661 
54662 
54663 
54664 
54665 
54666 
54667 
54668 
54669 
54670 
54671 
54672 
54673 
54674 
54675 
54676 
54677 
54678 
54679 
54680 
54681 
54682 
54683 
54684 
54685 
54686 
54687 
54688 
54689 
54690 
54691 
54692 
54693 
54694 
54695 
54696 
54697 
54698 
54699 
54700 
54701 
54702 
54703 
54704 
54705 
54706 
54707 
54708 
54709 
54710 
54711 
54712 
54713 
54714     # Execute function body
54715 
54716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54717 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54718   supports=yes
54719 
54720   saved_cxxflags="$CXXFLAGS"
54721   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
54722   ac_ext=cpp
54723 ac_cpp='$CXXCPP $CPPFLAGS'
54724 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54725 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54726 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54727 
54728   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54729 /* end confdefs.h.  */
54730 int i;
54731 _ACEOF
54732 if ac_fn_cxx_try_compile "$LINENO"; then :
54733 
54734 else
54735   supports=no
54736 fi
54737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54738   ac_ext=cpp
54739 ac_cpp='$CXXCPP $CPPFLAGS'
54740 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54741 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54742 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54743 
54744   CXXFLAGS="$saved_cxxflags"
54745 
54746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54747 $as_echo "$supports" >&6; }
54748   if test "x$supports" = "xyes" ; then
54749     :
54750     CXX_COMP_SUPPORTS="yes"
54751   else
54752     :
54753     CXX_COMP_SUPPORTS="no"
54754   fi
54755 
54756 
54757 
54758 
54759 
54760 
54761 
54762 
54763 
54764 
54765 
54766 
54767 
54768   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54769 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54770   supports=no
54771   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
54772 
54773   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54774 $as_echo "$supports" >&6; }
54775   if test "x$supports" = "xyes" ; then
54776     :
54777     BUILD_CC_CAN_DISABLE_WARNINGS=true
54778   else
54779     :
54780     BUILD_CC_CAN_DISABLE_WARNINGS=false
54781 
54782   fi
54783 
54784 
54785 
54786 
54787 
54788 
54789       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
54790         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
54791       else
54792         BUILD_CC_DISABLE_WARNING_PREFIX=
54793       fi
54794       CC="$CC_OLD"
54795       CXX="$CXX_OLD"
54796       CFLAGS="$CFLAGS_OLD"
54797       ;;
54798     clang)
54799       DISABLE_WARNING_PREFIX="-Wno-"
54800       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
54801       ;;
54802     xlc)
54803       DISABLE_WARNING_PREFIX="-qsuppress="
54804       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
54805       ;;
54806   esac
54807 
54808 
54809 
54810 
54811 
54812 # Setup debug symbols (need objcopy from the toolchain for that)
54813 
54814   #
54815   # NATIVE_DEBUG_SYMBOLS
54816   # This must be done after the toolchain is setup, since we're looking at objcopy.
54817   #
54818   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
54819 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
54820 
54821 # Check whether --with-native-debug-symbols was given.
54822 if test "${with_native_debug_symbols+set}" = set; then :
54823   withval=$with_native_debug_symbols;
54824         if test "x$OPENJDK_TARGET_OS" = xaix; then
54825           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
54826             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
54827           fi
54828         fi
54829 
54830 else
54831 
54832         if test "x$OPENJDK_TARGET_OS" = xaix; then
54833           # AIX doesn't support 'external' so use 'internal' as default
54834           with_native_debug_symbols="internal"
54835         else
54836           if test "x$STATIC_BUILD" = xtrue; then
54837             with_native_debug_symbols="none"
54838           else
54839             with_native_debug_symbols="external"
54840           fi
54841         fi
54842 
54843 fi
54844 
54845   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
54846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
54847 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
54848 
54849   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
54850 
54851     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
54852       if test "x$OBJCOPY" = x; then
54853         # enabling of enable-debug-symbols and can't find objcopy
54854         # this is an error
54855         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
54856       fi
54857     fi
54858 
54859     COMPILE_WITH_DEBUG_SYMBOLS=true
54860     COPY_DEBUG_SYMBOLS=true
54861     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
54862   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
54863     COMPILE_WITH_DEBUG_SYMBOLS=false
54864     COPY_DEBUG_SYMBOLS=false
54865     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
54866   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
54867     COMPILE_WITH_DEBUG_SYMBOLS=true
54868     COPY_DEBUG_SYMBOLS=false
54869     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
54870   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
54871 
54872     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
54873       if test "x$OBJCOPY" = x; then
54874         # enabling of enable-debug-symbols and can't find objcopy
54875         # this is an error
54876         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
54877       fi
54878     fi
54879 
54880     COMPILE_WITH_DEBUG_SYMBOLS=true
54881     COPY_DEBUG_SYMBOLS=true
54882     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
54883   else
54884     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
54885   fi
54886 
54887   # --enable-debug-symbols is deprecated.
54888   # Please use --with-native-debug-symbols=[internal,external,zipped] .
54889 
54890   # Check whether --enable-debug-symbols was given.
54891 if test "${enable_debug_symbols+set}" = set; then :
54892   enableval=$enable_debug_symbols;
54893 fi
54894 
54895   if test "x$enable_debug_symbols" != x; then
54896     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
54897 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
54898 
54899     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
54900       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
54901 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
54902     fi
54903 
54904   fi
54905 
54906 
54907   # --enable-zip-debug-info is deprecated.
54908   # Please use --with-native-debug-symbols=zipped .
54909 
54910   # Check whether --enable-zip-debug-info was given.
54911 if test "${enable_zip_debug_info+set}" = set; then :
54912   enableval=$enable_zip_debug_info;
54913 fi
54914 
54915   if test "x$enable_zip_debug_info" != x; then
54916     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
54917 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
54918 
54919     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
54920       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
54921 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
54922     fi
54923 
54924   fi
54925 
54926 
54927 
54928 
54929 
54930 
54931 
54932   # Check whether --enable-native-coverage was given.
54933 if test "${enable_native_coverage+set}" = set; then :
54934   enableval=$enable_native_coverage;
54935 fi
54936 
54937   GCOV_ENABLED="false"
54938   if test "x$enable_native_coverage" = "xyes"; then
54939     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
54940       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54941 $as_echo_n "checking if native coverage is enabled... " >&6; }
54942       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54943 $as_echo "yes" >&6; }
54944       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
54945       GCOV_LDFLAGS="-fprofile-arcs"
54946       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
54947       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
54948       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
54949       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
54950       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
54951       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
54952       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
54953       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
54954       GCOV_ENABLED="true"
54955     else
54956       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
54957     fi
54958   elif test "x$enable_native_coverage" = "xno"; then
54959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
54960 $as_echo_n "checking if native coverage is enabled... " >&6; }
54961     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54962 $as_echo "no" >&6; }
54963   elif test "x$enable_native_coverage" != "x"; then
54964     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
54965   fi
54966 
54967 
54968 
54969 
54970 # AddressSanitizer
54971 
54972   # Check whether --enable-asan was given.
54973 if test "${enable_asan+set}" = set; then :
54974   enableval=$enable_asan;
54975 fi
54976 
54977   ASAN_ENABLED="no"
54978   if test "x$enable_asan" = "xyes"; then
54979     case $TOOLCHAIN_TYPE in
54980       gcc | clang)
54981         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asan is enabled" >&5
54982 $as_echo_n "checking if asan is enabled... " >&6; }
54983         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54984 $as_echo "yes" >&6; }
54985         ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
54986         ASAN_LDFLAGS="-fsanitize=address"
54987         JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
54988         JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
54989         CFLAGS_JDKLIB="$CFLAGS_JDKLIB $ASAN_CFLAGS"
54990         CFLAGS_JDKEXE="$CFLAGS_JDKEXE $ASAN_CFLAGS"
54991         CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $ASAN_CFLAGS"
54992         CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $ASAN_CFLAGS"
54993         LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
54994         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
54995         ASAN_ENABLED="yes"
54996         ;;
54997       *)
54998         as_fn_error $? "--enable-asan only works with toolchain type gcc or clang" "$LINENO" 5
54999         ;;
55000     esac
55001   elif test "x$enable_asan" = "xno"; then
55002     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asan is enabled" >&5
55003 $as_echo_n "checking if asan is enabled... " >&6; }
55004     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55005 $as_echo "no" >&6; }
55006   elif test "x$enable_asan" != "x"; then
55007     as_fn_error $? "--enable-asan can only be assigned \"yes\" or \"no\"" "$LINENO" 5
55008   fi
55009 
55010 
55011 
55012 
55013 # Need toolchain to setup dtrace
55014 
55015   # Test for dtrace dependencies
55016   # Check whether --enable-dtrace was given.
55017 if test "${enable_dtrace+set}" = set; then :
55018   enableval=$enable_dtrace;
55019 fi
55020 
55021 
55022   DTRACE_DEP_MISSING=false
55023 
55024   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
55025 $as_echo_n "checking for dtrace tool... " >&6; }
55026   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
55027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
55028 $as_echo "$DTRACE" >&6; }
55029   else
55030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
55031 $as_echo "not found, cannot build dtrace" >&6; }
55032     DTRACE_DEP_MISSING=true
55033   fi
55034 
55035   for ac_header in sys/sdt.h
55036 do :
55037   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
55038 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
55039   cat >>confdefs.h <<_ACEOF
55040 #define HAVE_SYS_SDT_H 1
55041 _ACEOF
55042  DTRACE_HEADERS_OK=yes
55043 else
55044   DTRACE_HEADERS_OK=no
55045 fi
55046 
55047 done
55048 
55049   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
55050     DTRACE_DEP_MISSING=true
55051   fi
55052 
55053   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
55054 $as_echo_n "checking if dtrace should be built... " >&6; }
55055   if test "x$enable_dtrace" = "xyes"; then
55056     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
55057       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
55058 $as_echo "no, missing dependencies" >&6; }
55059 
55060   # Print a helpful message on how to acquire the necessary build dependency.
55061   # dtrace is the help tag: freetype, cups, alsa etc
55062   MISSING_DEPENDENCY=dtrace
55063 
55064   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55065     cygwin_help $MISSING_DEPENDENCY
55066   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55067     msys_help $MISSING_DEPENDENCY
55068   else
55069     PKGHANDLER_COMMAND=
55070 
55071     case $PKGHANDLER in
55072       apt-get)
55073         apt_help     $MISSING_DEPENDENCY ;;
55074       yum)
55075         yum_help     $MISSING_DEPENDENCY ;;
55076       brew)
55077         brew_help    $MISSING_DEPENDENCY ;;
55078       port)
55079         port_help    $MISSING_DEPENDENCY ;;
55080       pkgutil)
55081         pkgutil_help $MISSING_DEPENDENCY ;;
55082       pkgadd)
55083         pkgadd_help  $MISSING_DEPENDENCY ;;
55084     esac
55085 
55086     if test "x$PKGHANDLER_COMMAND" != x; then
55087       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55088     fi
55089   fi
55090 
55091       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
55092     else
55093       INCLUDE_DTRACE=true
55094       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
55095 $as_echo "yes, forced" >&6; }
55096     fi
55097   elif test "x$enable_dtrace" = "xno"; then
55098     INCLUDE_DTRACE=false
55099     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
55100 $as_echo "no, forced" >&6; }
55101   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
55102     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
55103       INCLUDE_DTRACE=false
55104       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
55105 $as_echo "no, missing dependencies" >&6; }
55106     else
55107       INCLUDE_DTRACE=true
55108       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
55109 $as_echo "yes, dependencies present" >&6; }
55110     fi
55111   else
55112     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
55113   fi
55114 
55115 
55116   # Check whether --enable-aot was given.
55117 if test "${enable_aot+set}" = set; then :
55118   enableval=$enable_aot;
55119 fi
55120 
55121 
55122   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
55123     ENABLE_AOT="true"
55124   elif test "x$enable_aot" = "xyes"; then
55125     ENABLE_AOT="true"
55126   elif test "x$enable_aot" = "xno"; then
55127     ENABLE_AOT="false"
55128     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
55129 $as_echo_n "checking if aot should be enabled... " >&6; }
55130     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
55131 $as_echo "no, forced" >&6; }
55132   else
55133     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
55134   fi
55135 
55136   if test "x$ENABLE_AOT" = "xtrue"; then
55137     # Only enable AOT on X64 platforms.
55138     if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
55139       if test -e "${TOPDIR}/src/jdk.aot"; then
55140         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
55141           ENABLE_AOT="true"
55142         else
55143           ENABLE_AOT="false"
55144           if test "x$enable_aot" = "xyes"; then
55145             as_fn_error $? "Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
55146           fi
55147         fi
55148       else
55149         ENABLE_AOT="false"
55150         if test "x$enable_aot" = "xyes"; then
55151           as_fn_error $? "Cannot build AOT without src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
55152         fi
55153       fi
55154     else
55155       ENABLE_AOT="false"
55156       if test "x$enable_aot" = "xyes"; then
55157         as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
55158       fi
55159     fi
55160   fi
55161 
55162 
55163 
55164 
55165   # Check whether --enable-cds was given.
55166 if test "${enable_cds+set}" = set; then :
55167   enableval=$enable_cds;
55168 fi
55169 
55170 
55171   if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
55172     ENABLE_CDS="true"
55173   elif test "x$enable_cds" = "xno"; then
55174     ENABLE_CDS="false"
55175   else
55176     as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
55177   fi
55178 
55179 
55180 
55181 
55182   # Check whether --enable-hotspot-gtest was given.
55183 if test "${enable_hotspot_gtest+set}" = set; then :
55184   enableval=$enable_hotspot_gtest;
55185 fi
55186 
55187 
55188   if test -e "${TOPDIR}/test/hotspot/gtest"; then
55189     GTEST_DIR_EXISTS="true"
55190   else
55191     GTEST_DIR_EXISTS="false"
55192   fi
55193 
55194   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
55195 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
55196   if test "x$enable_hotspot_gtest" = "xyes"; then
55197     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
55198       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
55199 $as_echo "yes, forced" >&6; }
55200       BUILD_GTEST="true"
55201     else
55202       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
55203     fi
55204   elif test "x$enable_hotspot_gtest" = "xno"; then
55205     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
55206 $as_echo "no, forced" >&6; }
55207     BUILD_GTEST="false"
55208   elif test "x$enable_hotspot_gtest" = "x"; then
55209     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
55210       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55211 $as_echo "yes" >&6; }
55212       BUILD_GTEST="true"
55213     else
55214       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55215 $as_echo "no" >&6; }
55216       BUILD_GTEST="false"
55217     fi
55218   else
55219     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
55220   fi
55221 
55222 
55223 
55224 
55225 ###############################################################################
55226 #
55227 # Check dependencies for external and internal libraries.
55228 #
55229 ###############################################################################
55230 
55231 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
55232 
55233   # When using cygwin or msys, we need a wrapper binary that renames
55234   # /cygdrive/c/ arguments into c:/ arguments and peeks into
55235   # @files and rewrites these too! This wrapper binary is
55236   # called fixpath.
55237   FIXPATH=
55238   if test "x$OPENJDK_BUILD_OS" = xwindows; then
55239     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
55240 $as_echo_n "checking if fixpath can be created... " >&6; }
55241     FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
55242     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
55243     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
55244     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
55245       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
55246       FIXPATH="$FIXPATH_BIN -c"
55247     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
55248       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
55249       # @ was chosen as separator to minimize risk of other tools messing around with it
55250       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
55251           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
55252       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
55253       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
55254     fi
55255     FIXPATH_SRC_W="$FIXPATH_SRC"
55256     FIXPATH_BIN_W="$FIXPATH_BIN"
55257 
55258   unix_path="$FIXPATH_SRC_W"
55259   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55260     windows_path=`$CYGPATH -m "$unix_path"`
55261     FIXPATH_SRC_W="$windows_path"
55262   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55263     windows_path=`cmd //c echo $unix_path`
55264     FIXPATH_SRC_W="$windows_path"
55265   fi
55266 
55267 
55268   unix_path="$FIXPATH_BIN_W"
55269   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55270     windows_path=`$CYGPATH -m "$unix_path"`
55271     FIXPATH_BIN_W="$windows_path"
55272   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55273     windows_path=`cmd //c echo $unix_path`
55274     FIXPATH_BIN_W="$windows_path"
55275   fi
55276 
55277     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
55278     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
55279     cd $FIXPATH_DIR
55280     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
55281     cd $CURDIR
55282 
55283     if test ! -x $FIXPATH_BIN; then
55284       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55285 $as_echo "no" >&6; }
55286       cat $FIXPATH_DIR/fixpath1.log
55287       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
55288     fi
55289     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55290 $as_echo "yes" >&6; }
55291     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
55292 $as_echo_n "checking if fixpath.exe works... " >&6; }
55293     cd $FIXPATH_DIR
55294     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
55295         > $FIXPATH_DIR/fixpath2.log 2>&1
55296     cd $CURDIR
55297     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
55298       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55299 $as_echo "no" >&6; }
55300       cat $FIXPATH_DIR/fixpath2.log
55301       as_fn_error $? "fixpath did not work!" "$LINENO" 5
55302     fi
55303     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55304 $as_echo "yes" >&6; }
55305 
55306     FIXPATH_DETACH_FLAG="--detach"
55307   fi
55308 
55309 
55310 
55311 
55312 
55313 
55314   # Check if X11 is needed
55315   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
55316     # No X11 support on windows or macosx
55317     NEEDS_LIB_X11=false
55318   else
55319     # All other instances need X11, even if building headless only, libawt still
55320     # needs X11 headers.
55321     NEEDS_LIB_X11=true
55322   fi
55323 
55324   # Check if fontconfig is needed
55325   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
55326     # No fontconfig support on windows or macosx
55327     NEEDS_LIB_FONTCONFIG=false
55328   else
55329     # All other instances need fontconfig, even if building headless only,
55330     # libawt still needs fontconfig headers.
55331     NEEDS_LIB_FONTCONFIG=true
55332   fi
55333 
55334   # Check if cups is needed
55335   if test "x$OPENJDK_TARGET_OS" = xwindows; then
55336     # Windows have a separate print system
55337     NEEDS_LIB_CUPS=false
55338   else
55339     NEEDS_LIB_CUPS=true
55340   fi
55341 
55342   # A custom hook may have set this already
55343   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
55344     NEEDS_LIB_FREETYPE=true
55345   fi
55346 
55347   # Check if alsa is needed
55348   if test "x$OPENJDK_TARGET_OS" = xlinux; then
55349     NEEDS_LIB_ALSA=true
55350   else
55351     NEEDS_LIB_ALSA=false
55352   fi
55353 
55354   # Check if ffi is needed
55355   if   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
55356     NEEDS_LIB_FFI=true
55357   else
55358     NEEDS_LIB_FFI=false
55359   fi
55360 
55361 
55362   # statically link libstdc++ before C++ ABI is stablized on Linux unless
55363   # dynamic build is configured on command line.
55364 
55365 # Check whether --with-stdc++lib was given.
55366 if test "${with_stdc__lib+set}" = set; then :
55367   withval=$with_stdc__lib;
55368         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
55369                 && test "x$with_stdc__lib" != xdefault; then
55370           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
55371         fi
55372 
55373 else
55374   with_stdc__lib=default
55375 
55376 fi
55377 
55378 
55379   if test "x$OPENJDK_TARGET_OS" = xlinux; then
55380     # Test if stdc++ can be linked statically.
55381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
55382 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
55383     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
55384     ac_ext=cpp
55385 ac_cpp='$CXXCPP $CPPFLAGS'
55386 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55387 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55388 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55389 
55390     OLD_LIBS="$LIBS"
55391     LIBS="$STATIC_STDCXX_FLAGS"
55392     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55393 /* end confdefs.h.  */
55394 
55395 int
55396 main ()
55397 {
55398 return 0;
55399   ;
55400   return 0;
55401 }
55402 _ACEOF
55403 if ac_fn_cxx_try_link "$LINENO"; then :
55404   has_static_libstdcxx=yes
55405 else
55406   has_static_libstdcxx=no
55407 fi
55408 rm -f core conftest.err conftest.$ac_objext \
55409     conftest$ac_exeext conftest.$ac_ext
55410     LIBS="$OLD_LIBS"
55411     ac_ext=cpp
55412 ac_cpp='$CXXCPP $CPPFLAGS'
55413 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55414 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55415 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55416 
55417     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
55418 $as_echo "$has_static_libstdcxx" >&6; }
55419 
55420     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
55421       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
55422     fi
55423 
55424     # If dynamic was requested, it's available since it would fail above otherwise.
55425     # If dynamic wasn't requested, go with static unless it isn't available.
55426     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
55427 $as_echo_n "checking how to link with libstdc++... " >&6; }
55428     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ; then
55429       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
55430 $as_echo "dynamic" >&6; }
55431     else
55432       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
55433       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
55434       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
55435       # just use the same setting as for the TARGET toolchain.
55436       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
55437       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
55438 $as_echo "static" >&6; }
55439     fi
55440   fi
55441 
55442   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
55443   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
55444     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
55445   fi
55446 
55447 
55448 
55449   # Setup Windows runtime dlls
55450   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
55451 
55452 
55453 # Check whether --with-msvcr-dll was given.
55454 if test "${with_msvcr_dll+set}" = set; then :
55455   withval=$with_msvcr_dll;
55456 fi
55457 
55458 
55459   if test "x$with_msvcr_dll" != x; then
55460     # If given explicitly by user, do not probe. If not present, fail directly.
55461 
55462   DLL_NAME="$MSVCR_NAME"
55463   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
55464   METHOD="--with-msvcr-dll"
55465   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55466     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55467 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55468 
55469     # Need to check if the found msvcr is correct architecture
55470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55471 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55472     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55473     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55474       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55475       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55476       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55477         CORRECT_MSVCR_ARCH="PE32 executable"
55478       else
55479         CORRECT_MSVCR_ARCH="PE32+ executable"
55480       fi
55481     else
55482       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55483         CORRECT_MSVCR_ARCH=386
55484       else
55485         CORRECT_MSVCR_ARCH=x86-64
55486       fi
55487     fi
55488     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55489       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55490 $as_echo "ok" >&6; }
55491       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55492 
55493   # Only process if variable expands to non-empty
55494 
55495   if test "x$MSVC_DLL" != x; then
55496     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55497 
55498   # Input might be given as Windows format, start by converting to
55499   # unix format.
55500   path="$MSVC_DLL"
55501   new_path=`$CYGPATH -u "$path"`
55502 
55503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55506   # "foo.exe" is OK but "foo" is an error.
55507   #
55508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55509   # It is also a way to make sure we got the proper file name for the real test later on.
55510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55511   if test "x$test_shortpath" = x; then
55512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55513 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55514     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55515   fi
55516 
55517   # Call helper function which possibly converts this using DOS-style short mode.
55518   # If so, the updated path is stored in $new_path.
55519 
55520   input_path="$new_path"
55521   # Check if we need to convert this using DOS-style short mode. If the path
55522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55523   # take no chances and rewrite it.
55524   # Note: m4 eats our [], so we need to use [ and ] instead.
55525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55526   if test "x$has_forbidden_chars" != x; then
55527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55531       # Going to short mode and back again did indeed matter. Since short mode is
55532       # case insensitive, let's make it lowercase to improve readability.
55533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55534       # Now convert it back to Unix-style (cygpath)
55535       input_path=`$CYGPATH -u "$shortmode_path"`
55536       new_path="$input_path"
55537     fi
55538   fi
55539 
55540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55541   if test "x$test_cygdrive_prefix" = x; then
55542     # As a simple fix, exclude /usr/bin since it's not a real path.
55543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55545       # a path prefixed by /cygdrive for fixpath to work.
55546       new_path="$CYGWIN_ROOT_PATH$input_path"
55547     fi
55548   fi
55549 
55550 
55551   if test "x$path" != "x$new_path"; then
55552     MSVC_DLL="$new_path"
55553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55554 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55555   fi
55556 
55557     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55558 
55559   path="$MSVC_DLL"
55560   has_colon=`$ECHO $path | $GREP ^.:`
55561   new_path="$path"
55562   if test "x$has_colon" = x; then
55563     # Not in mixed or Windows style, start by that.
55564     new_path=`cmd //c echo $path`
55565   fi
55566 
55567 
55568   input_path="$new_path"
55569   # Check if we need to convert this using DOS-style short mode. If the path
55570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55571   # take no chances and rewrite it.
55572   # Note: m4 eats our [], so we need to use [ and ] instead.
55573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55574   if test "x$has_forbidden_chars" != x; then
55575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55577   fi
55578 
55579 
55580   windows_path="$new_path"
55581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55582     unix_path=`$CYGPATH -u "$windows_path"`
55583     new_path="$unix_path"
55584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55586     new_path="$unix_path"
55587   fi
55588 
55589   if test "x$path" != "x$new_path"; then
55590     MSVC_DLL="$new_path"
55591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55592 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55593   fi
55594 
55595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55597 
55598     else
55599       # We're on a unix platform. Hooray! :)
55600       path="$MSVC_DLL"
55601       has_space=`$ECHO "$path" | $GREP " "`
55602       if test "x$has_space" != x; then
55603         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55604 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55605         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55606       fi
55607 
55608       # Use eval to expand a potential ~
55609       eval path="$path"
55610       if test ! -f "$path" && test ! -d "$path"; then
55611         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55612       fi
55613 
55614       if test -d "$path"; then
55615         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55616       else
55617         dir="`$DIRNAME "$path"`"
55618         base="`$BASENAME "$path"`"
55619         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55620       fi
55621     fi
55622   fi
55623 
55624       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55625 $as_echo_n "checking for $DLL_NAME... " >&6; }
55626       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55627 $as_echo "$MSVC_DLL" >&6; }
55628     else
55629       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55630 $as_echo "incorrect, ignoring" >&6; }
55631       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55632 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55633     fi
55634   fi
55635 
55636     if test "x$MSVC_DLL" = x; then
55637       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
55638     fi
55639     MSVCR_DLL="$MSVC_DLL"
55640   elif test "x$DEVKIT_MSVCR_DLL" != x; then
55641 
55642   DLL_NAME="$MSVCR_NAME"
55643   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
55644   METHOD="devkit"
55645   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55646     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55647 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55648 
55649     # Need to check if the found msvcr is correct architecture
55650     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55651 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55652     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55653     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55654       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55655       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55656       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55657         CORRECT_MSVCR_ARCH="PE32 executable"
55658       else
55659         CORRECT_MSVCR_ARCH="PE32+ executable"
55660       fi
55661     else
55662       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55663         CORRECT_MSVCR_ARCH=386
55664       else
55665         CORRECT_MSVCR_ARCH=x86-64
55666       fi
55667     fi
55668     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55669       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55670 $as_echo "ok" >&6; }
55671       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55672 
55673   # Only process if variable expands to non-empty
55674 
55675   if test "x$MSVC_DLL" != x; then
55676     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55677 
55678   # Input might be given as Windows format, start by converting to
55679   # unix format.
55680   path="$MSVC_DLL"
55681   new_path=`$CYGPATH -u "$path"`
55682 
55683   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55684   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55685   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55686   # "foo.exe" is OK but "foo" is an error.
55687   #
55688   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55689   # It is also a way to make sure we got the proper file name for the real test later on.
55690   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55691   if test "x$test_shortpath" = x; then
55692     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55693 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55694     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55695   fi
55696 
55697   # Call helper function which possibly converts this using DOS-style short mode.
55698   # If so, the updated path is stored in $new_path.
55699 
55700   input_path="$new_path"
55701   # Check if we need to convert this using DOS-style short mode. If the path
55702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55703   # take no chances and rewrite it.
55704   # Note: m4 eats our [], so we need to use [ and ] instead.
55705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55706   if test "x$has_forbidden_chars" != x; then
55707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55708     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55709     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55710     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55711       # Going to short mode and back again did indeed matter. Since short mode is
55712       # case insensitive, let's make it lowercase to improve readability.
55713       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55714       # Now convert it back to Unix-style (cygpath)
55715       input_path=`$CYGPATH -u "$shortmode_path"`
55716       new_path="$input_path"
55717     fi
55718   fi
55719 
55720   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55721   if test "x$test_cygdrive_prefix" = x; then
55722     # As a simple fix, exclude /usr/bin since it's not a real path.
55723     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55724       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55725       # a path prefixed by /cygdrive for fixpath to work.
55726       new_path="$CYGWIN_ROOT_PATH$input_path"
55727     fi
55728   fi
55729 
55730 
55731   if test "x$path" != "x$new_path"; then
55732     MSVC_DLL="$new_path"
55733     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55734 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55735   fi
55736 
55737     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55738 
55739   path="$MSVC_DLL"
55740   has_colon=`$ECHO $path | $GREP ^.:`
55741   new_path="$path"
55742   if test "x$has_colon" = x; then
55743     # Not in mixed or Windows style, start by that.
55744     new_path=`cmd //c echo $path`
55745   fi
55746 
55747 
55748   input_path="$new_path"
55749   # Check if we need to convert this using DOS-style short mode. If the path
55750   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55751   # take no chances and rewrite it.
55752   # Note: m4 eats our [], so we need to use [ and ] instead.
55753   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55754   if test "x$has_forbidden_chars" != x; then
55755     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55756     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55757   fi
55758 
55759 
55760   windows_path="$new_path"
55761   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55762     unix_path=`$CYGPATH -u "$windows_path"`
55763     new_path="$unix_path"
55764   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55765     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55766     new_path="$unix_path"
55767   fi
55768 
55769   if test "x$path" != "x$new_path"; then
55770     MSVC_DLL="$new_path"
55771     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55772 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55773   fi
55774 
55775   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55776   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55777 
55778     else
55779       # We're on a unix platform. Hooray! :)
55780       path="$MSVC_DLL"
55781       has_space=`$ECHO "$path" | $GREP " "`
55782       if test "x$has_space" != x; then
55783         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55784 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55785         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55786       fi
55787 
55788       # Use eval to expand a potential ~
55789       eval path="$path"
55790       if test ! -f "$path" && test ! -d "$path"; then
55791         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55792       fi
55793 
55794       if test -d "$path"; then
55795         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55796       else
55797         dir="`$DIRNAME "$path"`"
55798         base="`$BASENAME "$path"`"
55799         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55800       fi
55801     fi
55802   fi
55803 
55804       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55805 $as_echo_n "checking for $DLL_NAME... " >&6; }
55806       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55807 $as_echo "$MSVC_DLL" >&6; }
55808     else
55809       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55810 $as_echo "incorrect, ignoring" >&6; }
55811       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55812 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55813     fi
55814   fi
55815 
55816     if test "x$MSVC_DLL" = x; then
55817       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
55818     fi
55819     MSVCR_DLL="$MSVC_DLL"
55820   else
55821 
55822   DLL_NAME="${MSVCR_NAME}"
55823   MSVC_DLL=
55824 
55825   if test "x$MSVC_DLL" = x; then
55826     # Probe: Using well-known location from Visual Studio 10.0
55827     if test "x$VCINSTALLDIR" != x; then
55828       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55829 
55830   windows_path="$CYGWIN_VC_INSTALL_DIR"
55831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55832     unix_path=`$CYGPATH -u "$windows_path"`
55833     CYGWIN_VC_INSTALL_DIR="$unix_path"
55834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55836     CYGWIN_VC_INSTALL_DIR="$unix_path"
55837   fi
55838 
55839       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55840         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55841       else
55842         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55843       fi
55844       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55845 
55846   DLL_NAME="$DLL_NAME"
55847   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55848   METHOD="well-known location in VCINSTALLDIR"
55849   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55850     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55851 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55852 
55853     # Need to check if the found msvcr is correct architecture
55854     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55855 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55856     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55857     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55858       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55859       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55860       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55861         CORRECT_MSVCR_ARCH="PE32 executable"
55862       else
55863         CORRECT_MSVCR_ARCH="PE32+ executable"
55864       fi
55865     else
55866       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55867         CORRECT_MSVCR_ARCH=386
55868       else
55869         CORRECT_MSVCR_ARCH=x86-64
55870       fi
55871     fi
55872     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55873       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55874 $as_echo "ok" >&6; }
55875       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55876 
55877   # Only process if variable expands to non-empty
55878 
55879   if test "x$MSVC_DLL" != x; then
55880     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55881 
55882   # Input might be given as Windows format, start by converting to
55883   # unix format.
55884   path="$MSVC_DLL"
55885   new_path=`$CYGPATH -u "$path"`
55886 
55887   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55888   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55889   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55890   # "foo.exe" is OK but "foo" is an error.
55891   #
55892   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55893   # It is also a way to make sure we got the proper file name for the real test later on.
55894   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55895   if test "x$test_shortpath" = x; then
55896     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55897 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55898     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55899   fi
55900 
55901   # Call helper function which possibly converts this using DOS-style short mode.
55902   # If so, the updated path is stored in $new_path.
55903 
55904   input_path="$new_path"
55905   # Check if we need to convert this using DOS-style short mode. If the path
55906   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55907   # take no chances and rewrite it.
55908   # Note: m4 eats our [], so we need to use [ and ] instead.
55909   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55910   if test "x$has_forbidden_chars" != x; then
55911     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55912     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55913     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55914     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55915       # Going to short mode and back again did indeed matter. Since short mode is
55916       # case insensitive, let's make it lowercase to improve readability.
55917       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55918       # Now convert it back to Unix-style (cygpath)
55919       input_path=`$CYGPATH -u "$shortmode_path"`
55920       new_path="$input_path"
55921     fi
55922   fi
55923 
55924   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55925   if test "x$test_cygdrive_prefix" = x; then
55926     # As a simple fix, exclude /usr/bin since it's not a real path.
55927     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55928       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55929       # a path prefixed by /cygdrive for fixpath to work.
55930       new_path="$CYGWIN_ROOT_PATH$input_path"
55931     fi
55932   fi
55933 
55934 
55935   if test "x$path" != "x$new_path"; then
55936     MSVC_DLL="$new_path"
55937     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55938 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55939   fi
55940 
55941     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55942 
55943   path="$MSVC_DLL"
55944   has_colon=`$ECHO $path | $GREP ^.:`
55945   new_path="$path"
55946   if test "x$has_colon" = x; then
55947     # Not in mixed or Windows style, start by that.
55948     new_path=`cmd //c echo $path`
55949   fi
55950 
55951 
55952   input_path="$new_path"
55953   # Check if we need to convert this using DOS-style short mode. If the path
55954   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55955   # take no chances and rewrite it.
55956   # Note: m4 eats our [], so we need to use [ and ] instead.
55957   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55958   if test "x$has_forbidden_chars" != x; then
55959     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55960     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55961   fi
55962 
55963 
55964   windows_path="$new_path"
55965   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55966     unix_path=`$CYGPATH -u "$windows_path"`
55967     new_path="$unix_path"
55968   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55969     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55970     new_path="$unix_path"
55971   fi
55972 
55973   if test "x$path" != "x$new_path"; then
55974     MSVC_DLL="$new_path"
55975     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55976 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55977   fi
55978 
55979   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55980   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55981 
55982     else
55983       # We're on a unix platform. Hooray! :)
55984       path="$MSVC_DLL"
55985       has_space=`$ECHO "$path" | $GREP " "`
55986       if test "x$has_space" != x; then
55987         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55988 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55989         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55990       fi
55991 
55992       # Use eval to expand a potential ~
55993       eval path="$path"
55994       if test ! -f "$path" && test ! -d "$path"; then
55995         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55996       fi
55997 
55998       if test -d "$path"; then
55999         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56000       else
56001         dir="`$DIRNAME "$path"`"
56002         base="`$BASENAME "$path"`"
56003         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56004       fi
56005     fi
56006   fi
56007 
56008       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56009 $as_echo_n "checking for $DLL_NAME... " >&6; }
56010       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56011 $as_echo "$MSVC_DLL" >&6; }
56012     else
56013       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56014 $as_echo "incorrect, ignoring" >&6; }
56015       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56016 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56017     fi
56018   fi
56019 
56020     fi
56021   fi
56022 
56023   if test "x$MSVC_DLL" = x; then
56024     # Probe: Check in the Boot JDK directory.
56025     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56026 
56027   DLL_NAME="$DLL_NAME"
56028   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56029   METHOD="well-known location in Boot JDK"
56030   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56031     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56032 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56033 
56034     # Need to check if the found msvcr is correct architecture
56035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56036 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56037     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56038     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56039       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56040       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56041       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56042         CORRECT_MSVCR_ARCH="PE32 executable"
56043       else
56044         CORRECT_MSVCR_ARCH="PE32+ executable"
56045       fi
56046     else
56047       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56048         CORRECT_MSVCR_ARCH=386
56049       else
56050         CORRECT_MSVCR_ARCH=x86-64
56051       fi
56052     fi
56053     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56054       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56055 $as_echo "ok" >&6; }
56056       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56057 
56058   # Only process if variable expands to non-empty
56059 
56060   if test "x$MSVC_DLL" != x; then
56061     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56062 
56063   # Input might be given as Windows format, start by converting to
56064   # unix format.
56065   path="$MSVC_DLL"
56066   new_path=`$CYGPATH -u "$path"`
56067 
56068   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56069   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56070   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56071   # "foo.exe" is OK but "foo" is an error.
56072   #
56073   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56074   # It is also a way to make sure we got the proper file name for the real test later on.
56075   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56076   if test "x$test_shortpath" = x; then
56077     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56078 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56079     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56080   fi
56081 
56082   # Call helper function which possibly converts this using DOS-style short mode.
56083   # If so, the updated path is stored in $new_path.
56084 
56085   input_path="$new_path"
56086   # Check if we need to convert this using DOS-style short mode. If the path
56087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56088   # take no chances and rewrite it.
56089   # Note: m4 eats our [], so we need to use [ and ] instead.
56090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56091   if test "x$has_forbidden_chars" != x; then
56092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56096       # Going to short mode and back again did indeed matter. Since short mode is
56097       # case insensitive, let's make it lowercase to improve readability.
56098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56099       # Now convert it back to Unix-style (cygpath)
56100       input_path=`$CYGPATH -u "$shortmode_path"`
56101       new_path="$input_path"
56102     fi
56103   fi
56104 
56105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56106   if test "x$test_cygdrive_prefix" = x; then
56107     # As a simple fix, exclude /usr/bin since it's not a real path.
56108     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56110       # a path prefixed by /cygdrive for fixpath to work.
56111       new_path="$CYGWIN_ROOT_PATH$input_path"
56112     fi
56113   fi
56114 
56115 
56116   if test "x$path" != "x$new_path"; then
56117     MSVC_DLL="$new_path"
56118     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56119 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56120   fi
56121 
56122     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56123 
56124   path="$MSVC_DLL"
56125   has_colon=`$ECHO $path | $GREP ^.:`
56126   new_path="$path"
56127   if test "x$has_colon" = x; then
56128     # Not in mixed or Windows style, start by that.
56129     new_path=`cmd //c echo $path`
56130   fi
56131 
56132 
56133   input_path="$new_path"
56134   # Check if we need to convert this using DOS-style short mode. If the path
56135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56136   # take no chances and rewrite it.
56137   # Note: m4 eats our [], so we need to use [ and ] instead.
56138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56139   if test "x$has_forbidden_chars" != x; then
56140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56142   fi
56143 
56144 
56145   windows_path="$new_path"
56146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56147     unix_path=`$CYGPATH -u "$windows_path"`
56148     new_path="$unix_path"
56149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56151     new_path="$unix_path"
56152   fi
56153 
56154   if test "x$path" != "x$new_path"; then
56155     MSVC_DLL="$new_path"
56156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56157 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56158   fi
56159 
56160   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56161   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56162 
56163     else
56164       # We're on a unix platform. Hooray! :)
56165       path="$MSVC_DLL"
56166       has_space=`$ECHO "$path" | $GREP " "`
56167       if test "x$has_space" != x; then
56168         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56169 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56170         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56171       fi
56172 
56173       # Use eval to expand a potential ~
56174       eval path="$path"
56175       if test ! -f "$path" && test ! -d "$path"; then
56176         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56177       fi
56178 
56179       if test -d "$path"; then
56180         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56181       else
56182         dir="`$DIRNAME "$path"`"
56183         base="`$BASENAME "$path"`"
56184         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56185       fi
56186     fi
56187   fi
56188 
56189       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56190 $as_echo_n "checking for $DLL_NAME... " >&6; }
56191       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56192 $as_echo "$MSVC_DLL" >&6; }
56193     else
56194       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56195 $as_echo "incorrect, ignoring" >&6; }
56196       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56197 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56198     fi
56199   fi
56200 
56201   fi
56202 
56203   if test "x$MSVC_DLL" = x; then
56204     # Probe: Look in the Windows system32 directory
56205     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56206 
56207   windows_path="$CYGWIN_SYSTEMROOT"
56208   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56209     unix_path=`$CYGPATH -u "$windows_path"`
56210     CYGWIN_SYSTEMROOT="$unix_path"
56211   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56212     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56213     CYGWIN_SYSTEMROOT="$unix_path"
56214   fi
56215 
56216     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56217 
56218   DLL_NAME="$DLL_NAME"
56219   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56220   METHOD="well-known location in SYSTEMROOT"
56221   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56222     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56223 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56224 
56225     # Need to check if the found msvcr is correct architecture
56226     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56227 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56228     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56230       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56231       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56232       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56233         CORRECT_MSVCR_ARCH="PE32 executable"
56234       else
56235         CORRECT_MSVCR_ARCH="PE32+ executable"
56236       fi
56237     else
56238       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56239         CORRECT_MSVCR_ARCH=386
56240       else
56241         CORRECT_MSVCR_ARCH=x86-64
56242       fi
56243     fi
56244     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56245       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56246 $as_echo "ok" >&6; }
56247       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56248 
56249   # Only process if variable expands to non-empty
56250 
56251   if test "x$MSVC_DLL" != x; then
56252     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56253 
56254   # Input might be given as Windows format, start by converting to
56255   # unix format.
56256   path="$MSVC_DLL"
56257   new_path=`$CYGPATH -u "$path"`
56258 
56259   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56260   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56261   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56262   # "foo.exe" is OK but "foo" is an error.
56263   #
56264   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56265   # It is also a way to make sure we got the proper file name for the real test later on.
56266   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56267   if test "x$test_shortpath" = x; then
56268     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56269 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56270     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56271   fi
56272 
56273   # Call helper function which possibly converts this using DOS-style short mode.
56274   # If so, the updated path is stored in $new_path.
56275 
56276   input_path="$new_path"
56277   # Check if we need to convert this using DOS-style short mode. If the path
56278   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56279   # take no chances and rewrite it.
56280   # Note: m4 eats our [], so we need to use [ and ] instead.
56281   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56282   if test "x$has_forbidden_chars" != x; then
56283     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56284     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56285     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56286     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56287       # Going to short mode and back again did indeed matter. Since short mode is
56288       # case insensitive, let's make it lowercase to improve readability.
56289       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56290       # Now convert it back to Unix-style (cygpath)
56291       input_path=`$CYGPATH -u "$shortmode_path"`
56292       new_path="$input_path"
56293     fi
56294   fi
56295 
56296   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56297   if test "x$test_cygdrive_prefix" = x; then
56298     # As a simple fix, exclude /usr/bin since it's not a real path.
56299     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56300       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56301       # a path prefixed by /cygdrive for fixpath to work.
56302       new_path="$CYGWIN_ROOT_PATH$input_path"
56303     fi
56304   fi
56305 
56306 
56307   if test "x$path" != "x$new_path"; then
56308     MSVC_DLL="$new_path"
56309     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56310 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56311   fi
56312 
56313     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56314 
56315   path="$MSVC_DLL"
56316   has_colon=`$ECHO $path | $GREP ^.:`
56317   new_path="$path"
56318   if test "x$has_colon" = x; then
56319     # Not in mixed or Windows style, start by that.
56320     new_path=`cmd //c echo $path`
56321   fi
56322 
56323 
56324   input_path="$new_path"
56325   # Check if we need to convert this using DOS-style short mode. If the path
56326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56327   # take no chances and rewrite it.
56328   # Note: m4 eats our [], so we need to use [ and ] instead.
56329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56330   if test "x$has_forbidden_chars" != x; then
56331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56332     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56333   fi
56334 
56335 
56336   windows_path="$new_path"
56337   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56338     unix_path=`$CYGPATH -u "$windows_path"`
56339     new_path="$unix_path"
56340   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56341     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56342     new_path="$unix_path"
56343   fi
56344 
56345   if test "x$path" != "x$new_path"; then
56346     MSVC_DLL="$new_path"
56347     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56348 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56349   fi
56350 
56351   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56352   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56353 
56354     else
56355       # We're on a unix platform. Hooray! :)
56356       path="$MSVC_DLL"
56357       has_space=`$ECHO "$path" | $GREP " "`
56358       if test "x$has_space" != x; then
56359         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56360 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56361         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56362       fi
56363 
56364       # Use eval to expand a potential ~
56365       eval path="$path"
56366       if test ! -f "$path" && test ! -d "$path"; then
56367         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56368       fi
56369 
56370       if test -d "$path"; then
56371         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56372       else
56373         dir="`$DIRNAME "$path"`"
56374         base="`$BASENAME "$path"`"
56375         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56376       fi
56377     fi
56378   fi
56379 
56380       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56381 $as_echo_n "checking for $DLL_NAME... " >&6; }
56382       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56383 $as_echo "$MSVC_DLL" >&6; }
56384     else
56385       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56386 $as_echo "incorrect, ignoring" >&6; }
56387       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56388 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56389     fi
56390   fi
56391 
56392   fi
56393 
56394   if test "x$MSVC_DLL" = x; then
56395     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56396     if test "x$VS100COMNTOOLS" != x; then
56397       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56398 
56399   windows_path="$CYGWIN_VS_TOOLS_DIR"
56400   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56401     unix_path=`$CYGPATH -u "$windows_path"`
56402     CYGWIN_VS_TOOLS_DIR="$unix_path"
56403   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56404     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56405     CYGWIN_VS_TOOLS_DIR="$unix_path"
56406   fi
56407 
56408       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56409         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56410             | $GREP -i /x64/ | $HEAD --lines 1`
56411       else
56412         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56413             | $GREP -i /x86/ | $HEAD --lines 1`
56414       fi
56415 
56416   DLL_NAME="$DLL_NAME"
56417   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56418   METHOD="search of VS100COMNTOOLS"
56419   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56420     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56421 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56422 
56423     # Need to check if the found msvcr is correct architecture
56424     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56425 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56426     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56427     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56428       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56429       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56430       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56431         CORRECT_MSVCR_ARCH="PE32 executable"
56432       else
56433         CORRECT_MSVCR_ARCH="PE32+ executable"
56434       fi
56435     else
56436       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56437         CORRECT_MSVCR_ARCH=386
56438       else
56439         CORRECT_MSVCR_ARCH=x86-64
56440       fi
56441     fi
56442     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56443       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56444 $as_echo "ok" >&6; }
56445       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56446 
56447   # Only process if variable expands to non-empty
56448 
56449   if test "x$MSVC_DLL" != x; then
56450     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56451 
56452   # Input might be given as Windows format, start by converting to
56453   # unix format.
56454   path="$MSVC_DLL"
56455   new_path=`$CYGPATH -u "$path"`
56456 
56457   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56458   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56459   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56460   # "foo.exe" is OK but "foo" is an error.
56461   #
56462   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56463   # It is also a way to make sure we got the proper file name for the real test later on.
56464   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56465   if test "x$test_shortpath" = x; then
56466     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56467 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56468     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56469   fi
56470 
56471   # Call helper function which possibly converts this using DOS-style short mode.
56472   # If so, the updated path is stored in $new_path.
56473 
56474   input_path="$new_path"
56475   # Check if we need to convert this using DOS-style short mode. If the path
56476   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56477   # take no chances and rewrite it.
56478   # Note: m4 eats our [], so we need to use [ and ] instead.
56479   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56480   if test "x$has_forbidden_chars" != x; then
56481     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56482     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56483     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56484     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56485       # Going to short mode and back again did indeed matter. Since short mode is
56486       # case insensitive, let's make it lowercase to improve readability.
56487       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56488       # Now convert it back to Unix-style (cygpath)
56489       input_path=`$CYGPATH -u "$shortmode_path"`
56490       new_path="$input_path"
56491     fi
56492   fi
56493 
56494   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56495   if test "x$test_cygdrive_prefix" = x; then
56496     # As a simple fix, exclude /usr/bin since it's not a real path.
56497     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56498       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56499       # a path prefixed by /cygdrive for fixpath to work.
56500       new_path="$CYGWIN_ROOT_PATH$input_path"
56501     fi
56502   fi
56503 
56504 
56505   if test "x$path" != "x$new_path"; then
56506     MSVC_DLL="$new_path"
56507     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56508 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56509   fi
56510 
56511     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56512 
56513   path="$MSVC_DLL"
56514   has_colon=`$ECHO $path | $GREP ^.:`
56515   new_path="$path"
56516   if test "x$has_colon" = x; then
56517     # Not in mixed or Windows style, start by that.
56518     new_path=`cmd //c echo $path`
56519   fi
56520 
56521 
56522   input_path="$new_path"
56523   # Check if we need to convert this using DOS-style short mode. If the path
56524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56525   # take no chances and rewrite it.
56526   # Note: m4 eats our [], so we need to use [ and ] instead.
56527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56528   if test "x$has_forbidden_chars" != x; then
56529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56530     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56531   fi
56532 
56533 
56534   windows_path="$new_path"
56535   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56536     unix_path=`$CYGPATH -u "$windows_path"`
56537     new_path="$unix_path"
56538   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56539     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56540     new_path="$unix_path"
56541   fi
56542 
56543   if test "x$path" != "x$new_path"; then
56544     MSVC_DLL="$new_path"
56545     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56546 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56547   fi
56548 
56549   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56550   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56551 
56552     else
56553       # We're on a unix platform. Hooray! :)
56554       path="$MSVC_DLL"
56555       has_space=`$ECHO "$path" | $GREP " "`
56556       if test "x$has_space" != x; then
56557         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56558 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56559         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56560       fi
56561 
56562       # Use eval to expand a potential ~
56563       eval path="$path"
56564       if test ! -f "$path" && test ! -d "$path"; then
56565         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56566       fi
56567 
56568       if test -d "$path"; then
56569         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56570       else
56571         dir="`$DIRNAME "$path"`"
56572         base="`$BASENAME "$path"`"
56573         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56574       fi
56575     fi
56576   fi
56577 
56578       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56579 $as_echo_n "checking for $DLL_NAME... " >&6; }
56580       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56581 $as_echo "$MSVC_DLL" >&6; }
56582     else
56583       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56584 $as_echo "incorrect, ignoring" >&6; }
56585       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56586 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56587     fi
56588   fi
56589 
56590     fi
56591   fi
56592 
56593   if test "x$MSVC_DLL" = x; then
56594     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56595     # (This was the original behaviour; kept since it might turn something up)
56596     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56597       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56598         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56599             | $GREP x64 | $HEAD --lines 1`
56600       else
56601         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56602             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56603         if test "x$POSSIBLE_MSVC_DLL" = x; then
56604           # We're grasping at straws now...
56605           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56606               | $HEAD --lines 1`
56607         fi
56608       fi
56609 
56610 
56611   DLL_NAME="$DLL_NAME"
56612   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56613   METHOD="search of VCINSTALLDIR"
56614   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56615     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56616 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56617 
56618     # Need to check if the found msvcr is correct architecture
56619     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56620 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56621     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56622     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56623       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56624       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56625       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56626         CORRECT_MSVCR_ARCH="PE32 executable"
56627       else
56628         CORRECT_MSVCR_ARCH="PE32+ executable"
56629       fi
56630     else
56631       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56632         CORRECT_MSVCR_ARCH=386
56633       else
56634         CORRECT_MSVCR_ARCH=x86-64
56635       fi
56636     fi
56637     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56638       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56639 $as_echo "ok" >&6; }
56640       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56641 
56642   # Only process if variable expands to non-empty
56643 
56644   if test "x$MSVC_DLL" != x; then
56645     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56646 
56647   # Input might be given as Windows format, start by converting to
56648   # unix format.
56649   path="$MSVC_DLL"
56650   new_path=`$CYGPATH -u "$path"`
56651 
56652   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56653   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56654   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56655   # "foo.exe" is OK but "foo" is an error.
56656   #
56657   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56658   # It is also a way to make sure we got the proper file name for the real test later on.
56659   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56660   if test "x$test_shortpath" = x; then
56661     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56662 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56663     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56664   fi
56665 
56666   # Call helper function which possibly converts this using DOS-style short mode.
56667   # If so, the updated path is stored in $new_path.
56668 
56669   input_path="$new_path"
56670   # Check if we need to convert this using DOS-style short mode. If the path
56671   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56672   # take no chances and rewrite it.
56673   # Note: m4 eats our [], so we need to use [ and ] instead.
56674   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56675   if test "x$has_forbidden_chars" != x; then
56676     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56677     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56678     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56679     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56680       # Going to short mode and back again did indeed matter. Since short mode is
56681       # case insensitive, let's make it lowercase to improve readability.
56682       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56683       # Now convert it back to Unix-style (cygpath)
56684       input_path=`$CYGPATH -u "$shortmode_path"`
56685       new_path="$input_path"
56686     fi
56687   fi
56688 
56689   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56690   if test "x$test_cygdrive_prefix" = x; then
56691     # As a simple fix, exclude /usr/bin since it's not a real path.
56692     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56693       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56694       # a path prefixed by /cygdrive for fixpath to work.
56695       new_path="$CYGWIN_ROOT_PATH$input_path"
56696     fi
56697   fi
56698 
56699 
56700   if test "x$path" != "x$new_path"; then
56701     MSVC_DLL="$new_path"
56702     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56703 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56704   fi
56705 
56706     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56707 
56708   path="$MSVC_DLL"
56709   has_colon=`$ECHO $path | $GREP ^.:`
56710   new_path="$path"
56711   if test "x$has_colon" = x; then
56712     # Not in mixed or Windows style, start by that.
56713     new_path=`cmd //c echo $path`
56714   fi
56715 
56716 
56717   input_path="$new_path"
56718   # Check if we need to convert this using DOS-style short mode. If the path
56719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56720   # take no chances and rewrite it.
56721   # Note: m4 eats our [], so we need to use [ and ] instead.
56722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56723   if test "x$has_forbidden_chars" != x; then
56724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56725     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56726   fi
56727 
56728 
56729   windows_path="$new_path"
56730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56731     unix_path=`$CYGPATH -u "$windows_path"`
56732     new_path="$unix_path"
56733   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56734     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56735     new_path="$unix_path"
56736   fi
56737 
56738   if test "x$path" != "x$new_path"; then
56739     MSVC_DLL="$new_path"
56740     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56741 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56742   fi
56743 
56744   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56745   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56746 
56747     else
56748       # We're on a unix platform. Hooray! :)
56749       path="$MSVC_DLL"
56750       has_space=`$ECHO "$path" | $GREP " "`
56751       if test "x$has_space" != x; then
56752         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56753 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56754         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56755       fi
56756 
56757       # Use eval to expand a potential ~
56758       eval path="$path"
56759       if test ! -f "$path" && test ! -d "$path"; then
56760         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56761       fi
56762 
56763       if test -d "$path"; then
56764         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56765       else
56766         dir="`$DIRNAME "$path"`"
56767         base="`$BASENAME "$path"`"
56768         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56769       fi
56770     fi
56771   fi
56772 
56773       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56774 $as_echo_n "checking for $DLL_NAME... " >&6; }
56775       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56776 $as_echo "$MSVC_DLL" >&6; }
56777     else
56778       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56779 $as_echo "incorrect, ignoring" >&6; }
56780       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56781 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56782     fi
56783   fi
56784 
56785     fi
56786   fi
56787 
56788   if test "x$MSVC_DLL" = x; then
56789     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56790 $as_echo_n "checking for $DLL_NAME... " >&6; }
56791     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56792 $as_echo "no" >&6; }
56793     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56794   fi
56795 
56796     MSVCR_DLL="$MSVC_DLL"
56797   fi
56798 
56799 
56800 
56801 # Check whether --with-msvcp-dll was given.
56802 if test "${with_msvcp_dll+set}" = set; then :
56803   withval=$with_msvcp_dll;
56804 fi
56805 
56806 
56807   if test "x$MSVCP_NAME" != "x"; then
56808     if test "x$with_msvcp_dll" != x; then
56809       # If given explicitly by user, do not probe. If not present, fail directly.
56810 
56811   DLL_NAME="$MSVCP_NAME"
56812   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
56813   METHOD="--with-msvcp-dll"
56814   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56815     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56816 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56817 
56818     # Need to check if the found msvcr is correct architecture
56819     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56820 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56821     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56822     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56823       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56824       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56825       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56826         CORRECT_MSVCR_ARCH="PE32 executable"
56827       else
56828         CORRECT_MSVCR_ARCH="PE32+ executable"
56829       fi
56830     else
56831       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56832         CORRECT_MSVCR_ARCH=386
56833       else
56834         CORRECT_MSVCR_ARCH=x86-64
56835       fi
56836     fi
56837     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56838       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56839 $as_echo "ok" >&6; }
56840       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56841 
56842   # Only process if variable expands to non-empty
56843 
56844   if test "x$MSVC_DLL" != x; then
56845     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56846 
56847   # Input might be given as Windows format, start by converting to
56848   # unix format.
56849   path="$MSVC_DLL"
56850   new_path=`$CYGPATH -u "$path"`
56851 
56852   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56853   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56854   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56855   # "foo.exe" is OK but "foo" is an error.
56856   #
56857   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56858   # It is also a way to make sure we got the proper file name for the real test later on.
56859   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56860   if test "x$test_shortpath" = x; then
56861     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56862 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56863     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56864   fi
56865 
56866   # Call helper function which possibly converts this using DOS-style short mode.
56867   # If so, the updated path is stored in $new_path.
56868 
56869   input_path="$new_path"
56870   # Check if we need to convert this using DOS-style short mode. If the path
56871   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56872   # take no chances and rewrite it.
56873   # Note: m4 eats our [], so we need to use [ and ] instead.
56874   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56875   if test "x$has_forbidden_chars" != x; then
56876     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56877     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56878     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56879     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56880       # Going to short mode and back again did indeed matter. Since short mode is
56881       # case insensitive, let's make it lowercase to improve readability.
56882       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56883       # Now convert it back to Unix-style (cygpath)
56884       input_path=`$CYGPATH -u "$shortmode_path"`
56885       new_path="$input_path"
56886     fi
56887   fi
56888 
56889   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56890   if test "x$test_cygdrive_prefix" = x; then
56891     # As a simple fix, exclude /usr/bin since it's not a real path.
56892     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56893       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56894       # a path prefixed by /cygdrive for fixpath to work.
56895       new_path="$CYGWIN_ROOT_PATH$input_path"
56896     fi
56897   fi
56898 
56899 
56900   if test "x$path" != "x$new_path"; then
56901     MSVC_DLL="$new_path"
56902     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56903 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56904   fi
56905 
56906     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56907 
56908   path="$MSVC_DLL"
56909   has_colon=`$ECHO $path | $GREP ^.:`
56910   new_path="$path"
56911   if test "x$has_colon" = x; then
56912     # Not in mixed or Windows style, start by that.
56913     new_path=`cmd //c echo $path`
56914   fi
56915 
56916 
56917   input_path="$new_path"
56918   # Check if we need to convert this using DOS-style short mode. If the path
56919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56920   # take no chances and rewrite it.
56921   # Note: m4 eats our [], so we need to use [ and ] instead.
56922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56923   if test "x$has_forbidden_chars" != x; then
56924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56925     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56926   fi
56927 
56928 
56929   windows_path="$new_path"
56930   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56931     unix_path=`$CYGPATH -u "$windows_path"`
56932     new_path="$unix_path"
56933   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56934     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56935     new_path="$unix_path"
56936   fi
56937 
56938   if test "x$path" != "x$new_path"; then
56939     MSVC_DLL="$new_path"
56940     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56941 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56942   fi
56943 
56944   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56945   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56946 
56947     else
56948       # We're on a unix platform. Hooray! :)
56949       path="$MSVC_DLL"
56950       has_space=`$ECHO "$path" | $GREP " "`
56951       if test "x$has_space" != x; then
56952         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56953 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56954         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56955       fi
56956 
56957       # Use eval to expand a potential ~
56958       eval path="$path"
56959       if test ! -f "$path" && test ! -d "$path"; then
56960         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56961       fi
56962 
56963       if test -d "$path"; then
56964         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56965       else
56966         dir="`$DIRNAME "$path"`"
56967         base="`$BASENAME "$path"`"
56968         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56969       fi
56970     fi
56971   fi
56972 
56973       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56974 $as_echo_n "checking for $DLL_NAME... " >&6; }
56975       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56976 $as_echo "$MSVC_DLL" >&6; }
56977     else
56978       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56979 $as_echo "incorrect, ignoring" >&6; }
56980       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56981 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56982     fi
56983   fi
56984 
56985       if test "x$MSVC_DLL" = x; then
56986         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
56987       fi
56988       MSVCP_DLL="$MSVC_DLL"
56989     elif test "x$DEVKIT_MSVCP_DLL" != x; then
56990 
56991   DLL_NAME="$MSVCP_NAME"
56992   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
56993   METHOD="devkit"
56994   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56995     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56996 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56997 
56998     # Need to check if the found msvcr is correct architecture
56999     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57000 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57001     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57002     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57003       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57004       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57005       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57006         CORRECT_MSVCR_ARCH="PE32 executable"
57007       else
57008         CORRECT_MSVCR_ARCH="PE32+ executable"
57009       fi
57010     else
57011       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57012         CORRECT_MSVCR_ARCH=386
57013       else
57014         CORRECT_MSVCR_ARCH=x86-64
57015       fi
57016     fi
57017     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57018       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57019 $as_echo "ok" >&6; }
57020       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57021 
57022   # Only process if variable expands to non-empty
57023 
57024   if test "x$MSVC_DLL" != x; then
57025     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57026 
57027   # Input might be given as Windows format, start by converting to
57028   # unix format.
57029   path="$MSVC_DLL"
57030   new_path=`$CYGPATH -u "$path"`
57031 
57032   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57033   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57034   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57035   # "foo.exe" is OK but "foo" is an error.
57036   #
57037   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57038   # It is also a way to make sure we got the proper file name for the real test later on.
57039   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57040   if test "x$test_shortpath" = x; then
57041     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57042 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57043     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57044   fi
57045 
57046   # Call helper function which possibly converts this using DOS-style short mode.
57047   # If so, the updated path is stored in $new_path.
57048 
57049   input_path="$new_path"
57050   # Check if we need to convert this using DOS-style short mode. If the path
57051   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57052   # take no chances and rewrite it.
57053   # Note: m4 eats our [], so we need to use [ and ] instead.
57054   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57055   if test "x$has_forbidden_chars" != x; then
57056     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57057     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57058     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57059     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57060       # Going to short mode and back again did indeed matter. Since short mode is
57061       # case insensitive, let's make it lowercase to improve readability.
57062       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57063       # Now convert it back to Unix-style (cygpath)
57064       input_path=`$CYGPATH -u "$shortmode_path"`
57065       new_path="$input_path"
57066     fi
57067   fi
57068 
57069   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57070   if test "x$test_cygdrive_prefix" = x; then
57071     # As a simple fix, exclude /usr/bin since it's not a real path.
57072     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57073       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57074       # a path prefixed by /cygdrive for fixpath to work.
57075       new_path="$CYGWIN_ROOT_PATH$input_path"
57076     fi
57077   fi
57078 
57079 
57080   if test "x$path" != "x$new_path"; then
57081     MSVC_DLL="$new_path"
57082     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57083 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57084   fi
57085 
57086     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57087 
57088   path="$MSVC_DLL"
57089   has_colon=`$ECHO $path | $GREP ^.:`
57090   new_path="$path"
57091   if test "x$has_colon" = x; then
57092     # Not in mixed or Windows style, start by that.
57093     new_path=`cmd //c echo $path`
57094   fi
57095 
57096 
57097   input_path="$new_path"
57098   # Check if we need to convert this using DOS-style short mode. If the path
57099   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57100   # take no chances and rewrite it.
57101   # Note: m4 eats our [], so we need to use [ and ] instead.
57102   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57103   if test "x$has_forbidden_chars" != x; then
57104     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57105     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57106   fi
57107 
57108 
57109   windows_path="$new_path"
57110   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57111     unix_path=`$CYGPATH -u "$windows_path"`
57112     new_path="$unix_path"
57113   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57114     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57115     new_path="$unix_path"
57116   fi
57117 
57118   if test "x$path" != "x$new_path"; then
57119     MSVC_DLL="$new_path"
57120     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57121 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57122   fi
57123 
57124   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57125   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57126 
57127     else
57128       # We're on a unix platform. Hooray! :)
57129       path="$MSVC_DLL"
57130       has_space=`$ECHO "$path" | $GREP " "`
57131       if test "x$has_space" != x; then
57132         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57133 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57134         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57135       fi
57136 
57137       # Use eval to expand a potential ~
57138       eval path="$path"
57139       if test ! -f "$path" && test ! -d "$path"; then
57140         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57141       fi
57142 
57143       if test -d "$path"; then
57144         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57145       else
57146         dir="`$DIRNAME "$path"`"
57147         base="`$BASENAME "$path"`"
57148         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57149       fi
57150     fi
57151   fi
57152 
57153       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57154 $as_echo_n "checking for $DLL_NAME... " >&6; }
57155       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57156 $as_echo "$MSVC_DLL" >&6; }
57157     else
57158       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57159 $as_echo "incorrect, ignoring" >&6; }
57160       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57161 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57162     fi
57163   fi
57164 
57165       if test "x$MSVC_DLL" = x; then
57166         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
57167       fi
57168       MSVCP_DLL="$MSVC_DLL"
57169     else
57170 
57171   DLL_NAME="${MSVCP_NAME}"
57172   MSVC_DLL=
57173 
57174   if test "x$MSVC_DLL" = x; then
57175     # Probe: Using well-known location from Visual Studio 10.0
57176     if test "x$VCINSTALLDIR" != x; then
57177       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
57178 
57179   windows_path="$CYGWIN_VC_INSTALL_DIR"
57180   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57181     unix_path=`$CYGPATH -u "$windows_path"`
57182     CYGWIN_VC_INSTALL_DIR="$unix_path"
57183   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57184     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57185     CYGWIN_VC_INSTALL_DIR="$unix_path"
57186   fi
57187 
57188       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57189         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
57190       else
57191         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
57192       fi
57193       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
57194 
57195   DLL_NAME="$DLL_NAME"
57196   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57197   METHOD="well-known location in VCINSTALLDIR"
57198   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57199     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57200 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57201 
57202     # Need to check if the found msvcr is correct architecture
57203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57204 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57205     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57206     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57207       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57208       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57209       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57210         CORRECT_MSVCR_ARCH="PE32 executable"
57211       else
57212         CORRECT_MSVCR_ARCH="PE32+ executable"
57213       fi
57214     else
57215       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57216         CORRECT_MSVCR_ARCH=386
57217       else
57218         CORRECT_MSVCR_ARCH=x86-64
57219       fi
57220     fi
57221     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57222       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57223 $as_echo "ok" >&6; }
57224       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57225 
57226   # Only process if variable expands to non-empty
57227 
57228   if test "x$MSVC_DLL" != x; then
57229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57230 
57231   # Input might be given as Windows format, start by converting to
57232   # unix format.
57233   path="$MSVC_DLL"
57234   new_path=`$CYGPATH -u "$path"`
57235 
57236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57239   # "foo.exe" is OK but "foo" is an error.
57240   #
57241   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57242   # It is also a way to make sure we got the proper file name for the real test later on.
57243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57244   if test "x$test_shortpath" = x; then
57245     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57246 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57247     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57248   fi
57249 
57250   # Call helper function which possibly converts this using DOS-style short mode.
57251   # If so, the updated path is stored in $new_path.
57252 
57253   input_path="$new_path"
57254   # Check if we need to convert this using DOS-style short mode. If the path
57255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57256   # take no chances and rewrite it.
57257   # Note: m4 eats our [], so we need to use [ and ] instead.
57258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57259   if test "x$has_forbidden_chars" != x; then
57260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57261     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57262     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57263     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57264       # Going to short mode and back again did indeed matter. Since short mode is
57265       # case insensitive, let's make it lowercase to improve readability.
57266       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57267       # Now convert it back to Unix-style (cygpath)
57268       input_path=`$CYGPATH -u "$shortmode_path"`
57269       new_path="$input_path"
57270     fi
57271   fi
57272 
57273   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57274   if test "x$test_cygdrive_prefix" = x; then
57275     # As a simple fix, exclude /usr/bin since it's not a real path.
57276     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57277       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57278       # a path prefixed by /cygdrive for fixpath to work.
57279       new_path="$CYGWIN_ROOT_PATH$input_path"
57280     fi
57281   fi
57282 
57283 
57284   if test "x$path" != "x$new_path"; then
57285     MSVC_DLL="$new_path"
57286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57287 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57288   fi
57289 
57290     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57291 
57292   path="$MSVC_DLL"
57293   has_colon=`$ECHO $path | $GREP ^.:`
57294   new_path="$path"
57295   if test "x$has_colon" = x; then
57296     # Not in mixed or Windows style, start by that.
57297     new_path=`cmd //c echo $path`
57298   fi
57299 
57300 
57301   input_path="$new_path"
57302   # Check if we need to convert this using DOS-style short mode. If the path
57303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57304   # take no chances and rewrite it.
57305   # Note: m4 eats our [], so we need to use [ and ] instead.
57306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57307   if test "x$has_forbidden_chars" != x; then
57308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57310   fi
57311 
57312 
57313   windows_path="$new_path"
57314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57315     unix_path=`$CYGPATH -u "$windows_path"`
57316     new_path="$unix_path"
57317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57319     new_path="$unix_path"
57320   fi
57321 
57322   if test "x$path" != "x$new_path"; then
57323     MSVC_DLL="$new_path"
57324     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57325 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57326   fi
57327 
57328   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57329   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57330 
57331     else
57332       # We're on a unix platform. Hooray! :)
57333       path="$MSVC_DLL"
57334       has_space=`$ECHO "$path" | $GREP " "`
57335       if test "x$has_space" != x; then
57336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57337 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57338         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57339       fi
57340 
57341       # Use eval to expand a potential ~
57342       eval path="$path"
57343       if test ! -f "$path" && test ! -d "$path"; then
57344         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57345       fi
57346 
57347       if test -d "$path"; then
57348         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57349       else
57350         dir="`$DIRNAME "$path"`"
57351         base="`$BASENAME "$path"`"
57352         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57353       fi
57354     fi
57355   fi
57356 
57357       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57358 $as_echo_n "checking for $DLL_NAME... " >&6; }
57359       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57360 $as_echo "$MSVC_DLL" >&6; }
57361     else
57362       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57363 $as_echo "incorrect, ignoring" >&6; }
57364       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57365 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57366     fi
57367   fi
57368 
57369     fi
57370   fi
57371 
57372   if test "x$MSVC_DLL" = x; then
57373     # Probe: Check in the Boot JDK directory.
57374     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
57375 
57376   DLL_NAME="$DLL_NAME"
57377   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57378   METHOD="well-known location in Boot JDK"
57379   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57380     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57381 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57382 
57383     # Need to check if the found msvcr is correct architecture
57384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57385 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57386     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57387     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57388       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57389       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57390       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57391         CORRECT_MSVCR_ARCH="PE32 executable"
57392       else
57393         CORRECT_MSVCR_ARCH="PE32+ executable"
57394       fi
57395     else
57396       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57397         CORRECT_MSVCR_ARCH=386
57398       else
57399         CORRECT_MSVCR_ARCH=x86-64
57400       fi
57401     fi
57402     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57403       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57404 $as_echo "ok" >&6; }
57405       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57406 
57407   # Only process if variable expands to non-empty
57408 
57409   if test "x$MSVC_DLL" != x; then
57410     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57411 
57412   # Input might be given as Windows format, start by converting to
57413   # unix format.
57414   path="$MSVC_DLL"
57415   new_path=`$CYGPATH -u "$path"`
57416 
57417   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57418   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57419   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57420   # "foo.exe" is OK but "foo" is an error.
57421   #
57422   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57423   # It is also a way to make sure we got the proper file name for the real test later on.
57424   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57425   if test "x$test_shortpath" = x; then
57426     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57427 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57428     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57429   fi
57430 
57431   # Call helper function which possibly converts this using DOS-style short mode.
57432   # If so, the updated path is stored in $new_path.
57433 
57434   input_path="$new_path"
57435   # Check if we need to convert this using DOS-style short mode. If the path
57436   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57437   # take no chances and rewrite it.
57438   # Note: m4 eats our [], so we need to use [ and ] instead.
57439   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57440   if test "x$has_forbidden_chars" != x; then
57441     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57442     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57443     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57444     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57445       # Going to short mode and back again did indeed matter. Since short mode is
57446       # case insensitive, let's make it lowercase to improve readability.
57447       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57448       # Now convert it back to Unix-style (cygpath)
57449       input_path=`$CYGPATH -u "$shortmode_path"`
57450       new_path="$input_path"
57451     fi
57452   fi
57453 
57454   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57455   if test "x$test_cygdrive_prefix" = x; then
57456     # As a simple fix, exclude /usr/bin since it's not a real path.
57457     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57458       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57459       # a path prefixed by /cygdrive for fixpath to work.
57460       new_path="$CYGWIN_ROOT_PATH$input_path"
57461     fi
57462   fi
57463 
57464 
57465   if test "x$path" != "x$new_path"; then
57466     MSVC_DLL="$new_path"
57467     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57468 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57469   fi
57470 
57471     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57472 
57473   path="$MSVC_DLL"
57474   has_colon=`$ECHO $path | $GREP ^.:`
57475   new_path="$path"
57476   if test "x$has_colon" = x; then
57477     # Not in mixed or Windows style, start by that.
57478     new_path=`cmd //c echo $path`
57479   fi
57480 
57481 
57482   input_path="$new_path"
57483   # Check if we need to convert this using DOS-style short mode. If the path
57484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57485   # take no chances and rewrite it.
57486   # Note: m4 eats our [], so we need to use [ and ] instead.
57487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57488   if test "x$has_forbidden_chars" != x; then
57489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57490     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57491   fi
57492 
57493 
57494   windows_path="$new_path"
57495   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57496     unix_path=`$CYGPATH -u "$windows_path"`
57497     new_path="$unix_path"
57498   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57499     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57500     new_path="$unix_path"
57501   fi
57502 
57503   if test "x$path" != "x$new_path"; then
57504     MSVC_DLL="$new_path"
57505     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57506 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57507   fi
57508 
57509   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57510   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57511 
57512     else
57513       # We're on a unix platform. Hooray! :)
57514       path="$MSVC_DLL"
57515       has_space=`$ECHO "$path" | $GREP " "`
57516       if test "x$has_space" != x; then
57517         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57518 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57519         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57520       fi
57521 
57522       # Use eval to expand a potential ~
57523       eval path="$path"
57524       if test ! -f "$path" && test ! -d "$path"; then
57525         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57526       fi
57527 
57528       if test -d "$path"; then
57529         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57530       else
57531         dir="`$DIRNAME "$path"`"
57532         base="`$BASENAME "$path"`"
57533         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57534       fi
57535     fi
57536   fi
57537 
57538       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57539 $as_echo_n "checking for $DLL_NAME... " >&6; }
57540       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57541 $as_echo "$MSVC_DLL" >&6; }
57542     else
57543       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57544 $as_echo "incorrect, ignoring" >&6; }
57545       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57546 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57547     fi
57548   fi
57549 
57550   fi
57551 
57552   if test "x$MSVC_DLL" = x; then
57553     # Probe: Look in the Windows system32 directory
57554     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
57555 
57556   windows_path="$CYGWIN_SYSTEMROOT"
57557   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57558     unix_path=`$CYGPATH -u "$windows_path"`
57559     CYGWIN_SYSTEMROOT="$unix_path"
57560   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57561     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57562     CYGWIN_SYSTEMROOT="$unix_path"
57563   fi
57564 
57565     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
57566 
57567   DLL_NAME="$DLL_NAME"
57568   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57569   METHOD="well-known location in SYSTEMROOT"
57570   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57571     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57572 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57573 
57574     # Need to check if the found msvcr is correct architecture
57575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57576 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57577     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57579       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57580       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57581       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57582         CORRECT_MSVCR_ARCH="PE32 executable"
57583       else
57584         CORRECT_MSVCR_ARCH="PE32+ executable"
57585       fi
57586     else
57587       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57588         CORRECT_MSVCR_ARCH=386
57589       else
57590         CORRECT_MSVCR_ARCH=x86-64
57591       fi
57592     fi
57593     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57594       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57595 $as_echo "ok" >&6; }
57596       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57597 
57598   # Only process if variable expands to non-empty
57599 
57600   if test "x$MSVC_DLL" != x; then
57601     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57602 
57603   # Input might be given as Windows format, start by converting to
57604   # unix format.
57605   path="$MSVC_DLL"
57606   new_path=`$CYGPATH -u "$path"`
57607 
57608   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57609   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57610   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57611   # "foo.exe" is OK but "foo" is an error.
57612   #
57613   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57614   # It is also a way to make sure we got the proper file name for the real test later on.
57615   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57616   if test "x$test_shortpath" = x; then
57617     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57618 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57619     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57620   fi
57621 
57622   # Call helper function which possibly converts this using DOS-style short mode.
57623   # If so, the updated path is stored in $new_path.
57624 
57625   input_path="$new_path"
57626   # Check if we need to convert this using DOS-style short mode. If the path
57627   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57628   # take no chances and rewrite it.
57629   # Note: m4 eats our [], so we need to use [ and ] instead.
57630   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57631   if test "x$has_forbidden_chars" != x; then
57632     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57633     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57634     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57635     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57636       # Going to short mode and back again did indeed matter. Since short mode is
57637       # case insensitive, let's make it lowercase to improve readability.
57638       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57639       # Now convert it back to Unix-style (cygpath)
57640       input_path=`$CYGPATH -u "$shortmode_path"`
57641       new_path="$input_path"
57642     fi
57643   fi
57644 
57645   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57646   if test "x$test_cygdrive_prefix" = x; then
57647     # As a simple fix, exclude /usr/bin since it's not a real path.
57648     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57649       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57650       # a path prefixed by /cygdrive for fixpath to work.
57651       new_path="$CYGWIN_ROOT_PATH$input_path"
57652     fi
57653   fi
57654 
57655 
57656   if test "x$path" != "x$new_path"; then
57657     MSVC_DLL="$new_path"
57658     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57659 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57660   fi
57661 
57662     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57663 
57664   path="$MSVC_DLL"
57665   has_colon=`$ECHO $path | $GREP ^.:`
57666   new_path="$path"
57667   if test "x$has_colon" = x; then
57668     # Not in mixed or Windows style, start by that.
57669     new_path=`cmd //c echo $path`
57670   fi
57671 
57672 
57673   input_path="$new_path"
57674   # Check if we need to convert this using DOS-style short mode. If the path
57675   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57676   # take no chances and rewrite it.
57677   # Note: m4 eats our [], so we need to use [ and ] instead.
57678   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57679   if test "x$has_forbidden_chars" != x; then
57680     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57681     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57682   fi
57683 
57684 
57685   windows_path="$new_path"
57686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57687     unix_path=`$CYGPATH -u "$windows_path"`
57688     new_path="$unix_path"
57689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57691     new_path="$unix_path"
57692   fi
57693 
57694   if test "x$path" != "x$new_path"; then
57695     MSVC_DLL="$new_path"
57696     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57697 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57698   fi
57699 
57700   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57701   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57702 
57703     else
57704       # We're on a unix platform. Hooray! :)
57705       path="$MSVC_DLL"
57706       has_space=`$ECHO "$path" | $GREP " "`
57707       if test "x$has_space" != x; then
57708         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57709 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57710         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57711       fi
57712 
57713       # Use eval to expand a potential ~
57714       eval path="$path"
57715       if test ! -f "$path" && test ! -d "$path"; then
57716         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57717       fi
57718 
57719       if test -d "$path"; then
57720         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57721       else
57722         dir="`$DIRNAME "$path"`"
57723         base="`$BASENAME "$path"`"
57724         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57725       fi
57726     fi
57727   fi
57728 
57729       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57730 $as_echo_n "checking for $DLL_NAME... " >&6; }
57731       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57732 $as_echo "$MSVC_DLL" >&6; }
57733     else
57734       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57735 $as_echo "incorrect, ignoring" >&6; }
57736       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57737 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57738     fi
57739   fi
57740 
57741   fi
57742 
57743   if test "x$MSVC_DLL" = x; then
57744     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
57745     if test "x$VS100COMNTOOLS" != x; then
57746       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
57747 
57748   windows_path="$CYGWIN_VS_TOOLS_DIR"
57749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57750     unix_path=`$CYGPATH -u "$windows_path"`
57751     CYGWIN_VS_TOOLS_DIR="$unix_path"
57752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57754     CYGWIN_VS_TOOLS_DIR="$unix_path"
57755   fi
57756 
57757       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57758         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
57759             | $GREP -i /x64/ | $HEAD --lines 1`
57760       else
57761         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
57762             | $GREP -i /x86/ | $HEAD --lines 1`
57763       fi
57764 
57765   DLL_NAME="$DLL_NAME"
57766   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57767   METHOD="search of VS100COMNTOOLS"
57768   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57769     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57770 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57771 
57772     # Need to check if the found msvcr is correct architecture
57773     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57774 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57775     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57776     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57777       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57778       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57779       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57780         CORRECT_MSVCR_ARCH="PE32 executable"
57781       else
57782         CORRECT_MSVCR_ARCH="PE32+ executable"
57783       fi
57784     else
57785       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57786         CORRECT_MSVCR_ARCH=386
57787       else
57788         CORRECT_MSVCR_ARCH=x86-64
57789       fi
57790     fi
57791     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57792       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57793 $as_echo "ok" >&6; }
57794       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57795 
57796   # Only process if variable expands to non-empty
57797 
57798   if test "x$MSVC_DLL" != x; then
57799     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57800 
57801   # Input might be given as Windows format, start by converting to
57802   # unix format.
57803   path="$MSVC_DLL"
57804   new_path=`$CYGPATH -u "$path"`
57805 
57806   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57807   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57808   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57809   # "foo.exe" is OK but "foo" is an error.
57810   #
57811   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57812   # It is also a way to make sure we got the proper file name for the real test later on.
57813   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57814   if test "x$test_shortpath" = x; then
57815     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57816 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57817     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57818   fi
57819 
57820   # Call helper function which possibly converts this using DOS-style short mode.
57821   # If so, the updated path is stored in $new_path.
57822 
57823   input_path="$new_path"
57824   # Check if we need to convert this using DOS-style short mode. If the path
57825   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57826   # take no chances and rewrite it.
57827   # Note: m4 eats our [], so we need to use [ and ] instead.
57828   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57829   if test "x$has_forbidden_chars" != x; then
57830     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57831     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57832     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57833     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57834       # Going to short mode and back again did indeed matter. Since short mode is
57835       # case insensitive, let's make it lowercase to improve readability.
57836       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57837       # Now convert it back to Unix-style (cygpath)
57838       input_path=`$CYGPATH -u "$shortmode_path"`
57839       new_path="$input_path"
57840     fi
57841   fi
57842 
57843   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57844   if test "x$test_cygdrive_prefix" = x; then
57845     # As a simple fix, exclude /usr/bin since it's not a real path.
57846     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57847       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57848       # a path prefixed by /cygdrive for fixpath to work.
57849       new_path="$CYGWIN_ROOT_PATH$input_path"
57850     fi
57851   fi
57852 
57853 
57854   if test "x$path" != "x$new_path"; then
57855     MSVC_DLL="$new_path"
57856     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57857 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57858   fi
57859 
57860     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57861 
57862   path="$MSVC_DLL"
57863   has_colon=`$ECHO $path | $GREP ^.:`
57864   new_path="$path"
57865   if test "x$has_colon" = x; then
57866     # Not in mixed or Windows style, start by that.
57867     new_path=`cmd //c echo $path`
57868   fi
57869 
57870 
57871   input_path="$new_path"
57872   # Check if we need to convert this using DOS-style short mode. If the path
57873   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57874   # take no chances and rewrite it.
57875   # Note: m4 eats our [], so we need to use [ and ] instead.
57876   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57877   if test "x$has_forbidden_chars" != x; then
57878     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57879     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57880   fi
57881 
57882 
57883   windows_path="$new_path"
57884   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57885     unix_path=`$CYGPATH -u "$windows_path"`
57886     new_path="$unix_path"
57887   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57888     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57889     new_path="$unix_path"
57890   fi
57891 
57892   if test "x$path" != "x$new_path"; then
57893     MSVC_DLL="$new_path"
57894     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57895 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57896   fi
57897 
57898   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57899   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57900 
57901     else
57902       # We're on a unix platform. Hooray! :)
57903       path="$MSVC_DLL"
57904       has_space=`$ECHO "$path" | $GREP " "`
57905       if test "x$has_space" != x; then
57906         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57907 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57908         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57909       fi
57910 
57911       # Use eval to expand a potential ~
57912       eval path="$path"
57913       if test ! -f "$path" && test ! -d "$path"; then
57914         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57915       fi
57916 
57917       if test -d "$path"; then
57918         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57919       else
57920         dir="`$DIRNAME "$path"`"
57921         base="`$BASENAME "$path"`"
57922         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57923       fi
57924     fi
57925   fi
57926 
57927       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57928 $as_echo_n "checking for $DLL_NAME... " >&6; }
57929       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57930 $as_echo "$MSVC_DLL" >&6; }
57931     else
57932       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57933 $as_echo "incorrect, ignoring" >&6; }
57934       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57935 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57936     fi
57937   fi
57938 
57939     fi
57940   fi
57941 
57942   if test "x$MSVC_DLL" = x; then
57943     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
57944     # (This was the original behaviour; kept since it might turn something up)
57945     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
57946       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57947         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57948             | $GREP x64 | $HEAD --lines 1`
57949       else
57950         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57951             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
57952         if test "x$POSSIBLE_MSVC_DLL" = x; then
57953           # We're grasping at straws now...
57954           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
57955               | $HEAD --lines 1`
57956         fi
57957       fi
57958 
57959 
57960   DLL_NAME="$DLL_NAME"
57961   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57962   METHOD="search of VCINSTALLDIR"
57963   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57964     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57965 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57966 
57967     # Need to check if the found msvcr is correct architecture
57968     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57969 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57970     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57971     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57972       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57973       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57974       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57975         CORRECT_MSVCR_ARCH="PE32 executable"
57976       else
57977         CORRECT_MSVCR_ARCH="PE32+ executable"
57978       fi
57979     else
57980       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57981         CORRECT_MSVCR_ARCH=386
57982       else
57983         CORRECT_MSVCR_ARCH=x86-64
57984       fi
57985     fi
57986     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57987       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57988 $as_echo "ok" >&6; }
57989       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57990 
57991   # Only process if variable expands to non-empty
57992 
57993   if test "x$MSVC_DLL" != x; then
57994     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57995 
57996   # Input might be given as Windows format, start by converting to
57997   # unix format.
57998   path="$MSVC_DLL"
57999   new_path=`$CYGPATH -u "$path"`
58000 
58001   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58002   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58003   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58004   # "foo.exe" is OK but "foo" is an error.
58005   #
58006   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58007   # It is also a way to make sure we got the proper file name for the real test later on.
58008   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58009   if test "x$test_shortpath" = x; then
58010     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
58011 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
58012     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
58013   fi
58014 
58015   # Call helper function which possibly converts this using DOS-style short mode.
58016   # If so, the updated path is stored in $new_path.
58017 
58018   input_path="$new_path"
58019   # Check if we need to convert this using DOS-style short mode. If the path
58020   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58021   # take no chances and rewrite it.
58022   # Note: m4 eats our [], so we need to use [ and ] instead.
58023   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58024   if test "x$has_forbidden_chars" != x; then
58025     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58026     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58027     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58028     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58029       # Going to short mode and back again did indeed matter. Since short mode is
58030       # case insensitive, let's make it lowercase to improve readability.
58031       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58032       # Now convert it back to Unix-style (cygpath)
58033       input_path=`$CYGPATH -u "$shortmode_path"`
58034       new_path="$input_path"
58035     fi
58036   fi
58037 
58038   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58039   if test "x$test_cygdrive_prefix" = x; then
58040     # As a simple fix, exclude /usr/bin since it's not a real path.
58041     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58042       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58043       # a path prefixed by /cygdrive for fixpath to work.
58044       new_path="$CYGWIN_ROOT_PATH$input_path"
58045     fi
58046   fi
58047 
58048 
58049   if test "x$path" != "x$new_path"; then
58050     MSVC_DLL="$new_path"
58051     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
58052 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
58053   fi
58054 
58055     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58056 
58057   path="$MSVC_DLL"
58058   has_colon=`$ECHO $path | $GREP ^.:`
58059   new_path="$path"
58060   if test "x$has_colon" = x; then
58061     # Not in mixed or Windows style, start by that.
58062     new_path=`cmd //c echo $path`
58063   fi
58064 
58065 
58066   input_path="$new_path"
58067   # Check if we need to convert this using DOS-style short mode. If the path
58068   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58069   # take no chances and rewrite it.
58070   # Note: m4 eats our [], so we need to use [ and ] instead.
58071   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58072   if test "x$has_forbidden_chars" != x; then
58073     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58074     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58075   fi
58076 
58077 
58078   windows_path="$new_path"
58079   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58080     unix_path=`$CYGPATH -u "$windows_path"`
58081     new_path="$unix_path"
58082   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58083     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58084     new_path="$unix_path"
58085   fi
58086 
58087   if test "x$path" != "x$new_path"; then
58088     MSVC_DLL="$new_path"
58089     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
58090 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
58091   fi
58092 
58093   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58094   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58095 
58096     else
58097       # We're on a unix platform. Hooray! :)
58098       path="$MSVC_DLL"
58099       has_space=`$ECHO "$path" | $GREP " "`
58100       if test "x$has_space" != x; then
58101         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
58102 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
58103         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58104       fi
58105 
58106       # Use eval to expand a potential ~
58107       eval path="$path"
58108       if test ! -f "$path" && test ! -d "$path"; then
58109         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
58110       fi
58111 
58112       if test -d "$path"; then
58113         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
58114       else
58115         dir="`$DIRNAME "$path"`"
58116         base="`$BASENAME "$path"`"
58117         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
58118       fi
58119     fi
58120   fi
58121 
58122       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
58123 $as_echo_n "checking for $DLL_NAME... " >&6; }
58124       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
58125 $as_echo "$MSVC_DLL" >&6; }
58126     else
58127       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
58128 $as_echo "incorrect, ignoring" >&6; }
58129       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
58130 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
58131     fi
58132   fi
58133 
58134     fi
58135   fi
58136 
58137   if test "x$MSVC_DLL" = x; then
58138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
58139 $as_echo_n "checking for $DLL_NAME... " >&6; }
58140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58141 $as_echo "no" >&6; }
58142     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
58143   fi
58144 
58145       MSVCP_DLL="$MSVC_DLL"
58146     fi
58147 
58148   fi
58149 
58150   fi
58151 
58152 
58153   if test "x$NEEDS_LIB_X11" = xfalse; then
58154     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
58155       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
58156 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
58157     fi
58158     X_CFLAGS=
58159     X_LIBS=
58160   else
58161 
58162     if test "x${with_x}" = xno; then
58163       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
58164     fi
58165 
58166     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
58167       # The user has specified a X11 base directory. Use it for includes and
58168       # libraries, unless explicitly overridden.
58169       if test "x$x_includes" = xNONE; then
58170         x_includes="${with_x}/include"
58171       fi
58172       if test "x$x_libraries" = xNONE; then
58173         x_libraries="${with_x}/lib"
58174       fi
58175     else
58176       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
58177       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
58178       # --x-libraries for the sysroot, if that seems to be correct.
58179       if test "x$SYSROOT" != "x"; then
58180         if test "x$x_includes" = xNONE; then
58181           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
58182             x_includes="$SYSROOT/usr/X11R6/include"
58183           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
58184             x_includes="$SYSROOT/usr/include"
58185           fi
58186         fi
58187         if test "x$x_libraries" = xNONE; then
58188           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
58189             x_libraries="$SYSROOT/usr/X11R6/lib"
58190           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58191             x_libraries="$SYSROOT/usr/lib64"
58192           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
58193             x_libraries="$SYSROOT/usr/lib"
58194           fi
58195         fi
58196       fi
58197     fi
58198 
58199     # Now let autoconf do it's magic
58200     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
58201 $as_echo_n "checking for X... " >&6; }
58202 
58203 
58204 # Check whether --with-x was given.
58205 if test "${with_x+set}" = set; then :
58206   withval=$with_x;
58207 fi
58208 
58209 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
58210 if test "x$with_x" = xno; then
58211   # The user explicitly disabled X.
58212   have_x=disabled
58213 else
58214   case $x_includes,$x_libraries in #(
58215     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
58216     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
58217   $as_echo_n "(cached) " >&6
58218 else
58219   # One or both of the vars are not set, and there is no cached value.
58220 ac_x_includes=no ac_x_libraries=no
58221 rm -f -r conftest.dir
58222 if mkdir conftest.dir; then
58223   cd conftest.dir
58224   cat >Imakefile <<'_ACEOF'
58225 incroot:
58226         @echo incroot='${INCROOT}'
58227 usrlibdir:
58228         @echo usrlibdir='${USRLIBDIR}'
58229 libdir:
58230         @echo libdir='${LIBDIR}'
58231 _ACEOF
58232   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
58233     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
58234     for ac_var in incroot usrlibdir libdir; do
58235       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
58236     done
58237     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
58238     for ac_extension in a so sl dylib la dll; do
58239       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
58240          test -f "$ac_im_libdir/libX11.$ac_extension"; then
58241         ac_im_usrlibdir=$ac_im_libdir; break
58242       fi
58243     done
58244     # Screen out bogus values from the imake configuration.  They are
58245     # bogus both because they are the default anyway, and because
58246     # using them would break gcc on systems where it needs fixed includes.
58247     case $ac_im_incroot in
58248         /usr/include) ac_x_includes= ;;
58249         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
58250     esac
58251     case $ac_im_usrlibdir in
58252         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
58253         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
58254     esac
58255   fi
58256   cd ..
58257   rm -f -r conftest.dir
58258 fi
58259 
58260 # Standard set of common directories for X headers.
58261 # Check X11 before X11Rn because it is often a symlink to the current release.
58262 ac_x_header_dirs='
58263 /usr/X11/include
58264 /usr/X11R7/include
58265 /usr/X11R6/include
58266 /usr/X11R5/include
58267 /usr/X11R4/include
58268 
58269 /usr/include/X11
58270 /usr/include/X11R7
58271 /usr/include/X11R6
58272 /usr/include/X11R5
58273 /usr/include/X11R4
58274 
58275 /usr/local/X11/include
58276 /usr/local/X11R7/include
58277 /usr/local/X11R6/include
58278 /usr/local/X11R5/include
58279 /usr/local/X11R4/include
58280 
58281 /usr/local/include/X11
58282 /usr/local/include/X11R7
58283 /usr/local/include/X11R6
58284 /usr/local/include/X11R5
58285 /usr/local/include/X11R4
58286 
58287 /usr/X386/include
58288 /usr/x386/include
58289 /usr/XFree86/include/X11
58290 
58291 /usr/include
58292 /usr/local/include
58293 /usr/unsupported/include
58294 /usr/athena/include
58295 /usr/local/x11r5/include
58296 /usr/lpp/Xamples/include
58297 
58298 /usr/openwin/include
58299 /usr/openwin/share/include'
58300 
58301 if test "$ac_x_includes" = no; then
58302   # Guess where to find include files, by looking for Xlib.h.
58303   # First, try using that file with no special directory specified.
58304   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58305 /* end confdefs.h.  */
58306 #include <X11/Xlib.h>
58307 _ACEOF
58308 if ac_fn_cxx_try_cpp "$LINENO"; then :
58309   # We can compile using X headers with no special include directory.
58310 ac_x_includes=
58311 else
58312   for ac_dir in $ac_x_header_dirs; do
58313   if test -r "$ac_dir/X11/Xlib.h"; then
58314     ac_x_includes=$ac_dir
58315     break
58316   fi
58317 done
58318 fi
58319 rm -f conftest.err conftest.i conftest.$ac_ext
58320 fi # $ac_x_includes = no
58321 
58322 if test "$ac_x_libraries" = no; then
58323   # Check for the libraries.
58324   # See if we find them without any special options.
58325   # Don't add to $LIBS permanently.
58326   ac_save_LIBS=$LIBS
58327   LIBS="-lX11 $LIBS"
58328   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58329 /* end confdefs.h.  */
58330 #include <X11/Xlib.h>
58331 int
58332 main ()
58333 {
58334 XrmInitialize ()
58335   ;
58336   return 0;
58337 }
58338 _ACEOF
58339 if ac_fn_cxx_try_link "$LINENO"; then :
58340   LIBS=$ac_save_LIBS
58341 # We can link X programs with no special library path.
58342 ac_x_libraries=
58343 else
58344   LIBS=$ac_save_LIBS
58345 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
58346 do
58347   # Don't even attempt the hair of trying to link an X program!
58348   for ac_extension in a so sl dylib la dll; do
58349     if test -r "$ac_dir/libX11.$ac_extension"; then
58350       ac_x_libraries=$ac_dir
58351       break 2
58352     fi
58353   done
58354 done
58355 fi
58356 rm -f core conftest.err conftest.$ac_objext \
58357     conftest$ac_exeext conftest.$ac_ext
58358 fi # $ac_x_libraries = no
58359 
58360 case $ac_x_includes,$ac_x_libraries in #(
58361   no,* | *,no | *\'*)
58362     # Didn't find X, or a directory has "'" in its name.
58363     ac_cv_have_x="have_x=no";; #(
58364   *)
58365     # Record where we found X for the cache.
58366     ac_cv_have_x="have_x=yes\
58367         ac_x_includes='$ac_x_includes'\
58368         ac_x_libraries='$ac_x_libraries'"
58369 esac
58370 fi
58371 ;; #(
58372     *) have_x=yes;;
58373   esac
58374   eval "$ac_cv_have_x"
58375 fi # $with_x != no
58376 
58377 if test "$have_x" != yes; then
58378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
58379 $as_echo "$have_x" >&6; }
58380   no_x=yes
58381 else
58382   # If each of the values was on the command line, it overrides each guess.
58383   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
58384   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
58385   # Update the cache value to reflect the command line values.
58386   ac_cv_have_x="have_x=yes\
58387         ac_x_includes='$x_includes'\
58388         ac_x_libraries='$x_libraries'"
58389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
58390 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
58391 fi
58392 
58393     if test "$no_x" = yes; then
58394   # Not all programs may use this symbol, but it does not hurt to define it.
58395 
58396 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
58397 
58398   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
58399 else
58400   if test -n "$x_includes"; then
58401     X_CFLAGS="$X_CFLAGS -I$x_includes"
58402   fi
58403 
58404   # It would also be nice to do this for all -L options, not just this one.
58405   if test -n "$x_libraries"; then
58406     X_LIBS="$X_LIBS -L$x_libraries"
58407     # For Solaris; some versions of Sun CC require a space after -R and
58408     # others require no space.  Words are not sufficient . . . .
58409     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
58410 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
58411     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
58412     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
58413     ac_cxx_werror_flag=yes
58414     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58415 /* end confdefs.h.  */
58416 
58417 int
58418 main ()
58419 {
58420 
58421   ;
58422   return 0;
58423 }
58424 _ACEOF
58425 if ac_fn_cxx_try_link "$LINENO"; then :
58426   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58427 $as_echo "no" >&6; }
58428        X_LIBS="$X_LIBS -R$x_libraries"
58429 else
58430   LIBS="$ac_xsave_LIBS -R $x_libraries"
58431        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58432 /* end confdefs.h.  */
58433 
58434 int
58435 main ()
58436 {
58437 
58438   ;
58439   return 0;
58440 }
58441 _ACEOF
58442 if ac_fn_cxx_try_link "$LINENO"; then :
58443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58444 $as_echo "yes" >&6; }
58445           X_LIBS="$X_LIBS -R $x_libraries"
58446 else
58447   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
58448 $as_echo "neither works" >&6; }
58449 fi
58450 rm -f core conftest.err conftest.$ac_objext \
58451     conftest$ac_exeext conftest.$ac_ext
58452 fi
58453 rm -f core conftest.err conftest.$ac_objext \
58454     conftest$ac_exeext conftest.$ac_ext
58455     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
58456     LIBS=$ac_xsave_LIBS
58457   fi
58458 
58459   # Check for system-dependent libraries X programs must link with.
58460   # Do this before checking for the system-independent R6 libraries
58461   # (-lICE), since we may need -lsocket or whatever for X linking.
58462 
58463   if test "$ISC" = yes; then
58464     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
58465   else
58466     # Martyn Johnson says this is needed for Ultrix, if the X
58467     # libraries were built with DECnet support.  And Karl Berry says
58468     # the Alpha needs dnet_stub (dnet does not exist).
58469     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
58470     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58471 /* end confdefs.h.  */
58472 
58473 /* Override any GCC internal prototype to avoid an error.
58474    Use char because int might match the return type of a GCC
58475    builtin and then its argument prototype would still apply.  */
58476 #ifdef __cplusplus
58477 extern "C"
58478 #endif
58479 char XOpenDisplay ();
58480 int
58481 main ()
58482 {
58483 return XOpenDisplay ();
58484   ;
58485   return 0;
58486 }
58487 _ACEOF
58488 if ac_fn_cxx_try_link "$LINENO"; then :
58489 
58490 else
58491   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
58492 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
58493 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
58494   $as_echo_n "(cached) " >&6
58495 else
58496   ac_check_lib_save_LIBS=$LIBS
58497 LIBS="-ldnet  $LIBS"
58498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58499 /* end confdefs.h.  */
58500 
58501 /* Override any GCC internal prototype to avoid an error.
58502    Use char because int might match the return type of a GCC
58503    builtin and then its argument prototype would still apply.  */
58504 #ifdef __cplusplus
58505 extern "C"
58506 #endif
58507 char dnet_ntoa ();
58508 int
58509 main ()
58510 {
58511 return dnet_ntoa ();
58512   ;
58513   return 0;
58514 }
58515 _ACEOF
58516 if ac_fn_cxx_try_link "$LINENO"; then :
58517   ac_cv_lib_dnet_dnet_ntoa=yes
58518 else
58519   ac_cv_lib_dnet_dnet_ntoa=no
58520 fi
58521 rm -f core conftest.err conftest.$ac_objext \
58522     conftest$ac_exeext conftest.$ac_ext
58523 LIBS=$ac_check_lib_save_LIBS
58524 fi
58525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
58526 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
58527 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
58528   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
58529 fi
58530 
58531     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
58532       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
58533 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
58534 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
58535   $as_echo_n "(cached) " >&6
58536 else
58537   ac_check_lib_save_LIBS=$LIBS
58538 LIBS="-ldnet_stub  $LIBS"
58539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58540 /* end confdefs.h.  */
58541 
58542 /* Override any GCC internal prototype to avoid an error.
58543    Use char because int might match the return type of a GCC
58544    builtin and then its argument prototype would still apply.  */
58545 #ifdef __cplusplus
58546 extern "C"
58547 #endif
58548 char dnet_ntoa ();
58549 int
58550 main ()
58551 {
58552 return dnet_ntoa ();
58553   ;
58554   return 0;
58555 }
58556 _ACEOF
58557 if ac_fn_cxx_try_link "$LINENO"; then :
58558   ac_cv_lib_dnet_stub_dnet_ntoa=yes
58559 else
58560   ac_cv_lib_dnet_stub_dnet_ntoa=no
58561 fi
58562 rm -f core conftest.err conftest.$ac_objext \
58563     conftest$ac_exeext conftest.$ac_ext
58564 LIBS=$ac_check_lib_save_LIBS
58565 fi
58566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
58567 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
58568 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
58569   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
58570 fi
58571 
58572     fi
58573 fi
58574 rm -f core conftest.err conftest.$ac_objext \
58575     conftest$ac_exeext conftest.$ac_ext
58576     LIBS="$ac_xsave_LIBS"
58577 
58578     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
58579     # to get the SysV transport functions.
58580     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
58581     # needs -lnsl.
58582     # The nsl library prevents programs from opening the X display
58583     # on Irix 5.2, according to T.E. Dickey.
58584     # The functions gethostbyname, getservbyname, and inet_addr are
58585     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
58586     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
58587 if test "x$ac_cv_func_gethostbyname" = xyes; then :
58588 
58589 fi
58590 
58591     if test $ac_cv_func_gethostbyname = no; then
58592       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
58593 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
58594 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
58595   $as_echo_n "(cached) " >&6
58596 else
58597   ac_check_lib_save_LIBS=$LIBS
58598 LIBS="-lnsl  $LIBS"
58599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58600 /* end confdefs.h.  */
58601 
58602 /* Override any GCC internal prototype to avoid an error.
58603    Use char because int might match the return type of a GCC
58604    builtin and then its argument prototype would still apply.  */
58605 #ifdef __cplusplus
58606 extern "C"
58607 #endif
58608 char gethostbyname ();
58609 int
58610 main ()
58611 {
58612 return gethostbyname ();
58613   ;
58614   return 0;
58615 }
58616 _ACEOF
58617 if ac_fn_cxx_try_link "$LINENO"; then :
58618   ac_cv_lib_nsl_gethostbyname=yes
58619 else
58620   ac_cv_lib_nsl_gethostbyname=no
58621 fi
58622 rm -f core conftest.err conftest.$ac_objext \
58623     conftest$ac_exeext conftest.$ac_ext
58624 LIBS=$ac_check_lib_save_LIBS
58625 fi
58626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
58627 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
58628 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
58629   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
58630 fi
58631 
58632       if test $ac_cv_lib_nsl_gethostbyname = no; then
58633         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
58634 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
58635 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
58636   $as_echo_n "(cached) " >&6
58637 else
58638   ac_check_lib_save_LIBS=$LIBS
58639 LIBS="-lbsd  $LIBS"
58640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58641 /* end confdefs.h.  */
58642 
58643 /* Override any GCC internal prototype to avoid an error.
58644    Use char because int might match the return type of a GCC
58645    builtin and then its argument prototype would still apply.  */
58646 #ifdef __cplusplus
58647 extern "C"
58648 #endif
58649 char gethostbyname ();
58650 int
58651 main ()
58652 {
58653 return gethostbyname ();
58654   ;
58655   return 0;
58656 }
58657 _ACEOF
58658 if ac_fn_cxx_try_link "$LINENO"; then :
58659   ac_cv_lib_bsd_gethostbyname=yes
58660 else
58661   ac_cv_lib_bsd_gethostbyname=no
58662 fi
58663 rm -f core conftest.err conftest.$ac_objext \
58664     conftest$ac_exeext conftest.$ac_ext
58665 LIBS=$ac_check_lib_save_LIBS
58666 fi
58667 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
58668 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
58669 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
58670   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
58671 fi
58672 
58673       fi
58674     fi
58675 
58676     # lieder@skyler.mavd.honeywell.com says without -lsocket,
58677     # socket/setsockopt and other routines are undefined under SCO ODT
58678     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
58679     # on later versions), says Simon Leinen: it contains gethostby*
58680     # variants that don't use the name server (or something).  -lsocket
58681     # must be given before -lnsl if both are needed.  We assume that
58682     # if connect needs -lnsl, so does gethostbyname.
58683     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
58684 if test "x$ac_cv_func_connect" = xyes; then :
58685 
58686 fi
58687 
58688     if test $ac_cv_func_connect = no; then
58689       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
58690 $as_echo_n "checking for connect in -lsocket... " >&6; }
58691 if ${ac_cv_lib_socket_connect+:} false; then :
58692   $as_echo_n "(cached) " >&6
58693 else
58694   ac_check_lib_save_LIBS=$LIBS
58695 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
58696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58697 /* end confdefs.h.  */
58698 
58699 /* Override any GCC internal prototype to avoid an error.
58700    Use char because int might match the return type of a GCC
58701    builtin and then its argument prototype would still apply.  */
58702 #ifdef __cplusplus
58703 extern "C"
58704 #endif
58705 char connect ();
58706 int
58707 main ()
58708 {
58709 return connect ();
58710   ;
58711   return 0;
58712 }
58713 _ACEOF
58714 if ac_fn_cxx_try_link "$LINENO"; then :
58715   ac_cv_lib_socket_connect=yes
58716 else
58717   ac_cv_lib_socket_connect=no
58718 fi
58719 rm -f core conftest.err conftest.$ac_objext \
58720     conftest$ac_exeext conftest.$ac_ext
58721 LIBS=$ac_check_lib_save_LIBS
58722 fi
58723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
58724 $as_echo "$ac_cv_lib_socket_connect" >&6; }
58725 if test "x$ac_cv_lib_socket_connect" = xyes; then :
58726   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
58727 fi
58728 
58729     fi
58730 
58731     # Guillermo Gomez says -lposix is necessary on A/UX.
58732     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
58733 if test "x$ac_cv_func_remove" = xyes; then :
58734 
58735 fi
58736 
58737     if test $ac_cv_func_remove = no; then
58738       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
58739 $as_echo_n "checking for remove in -lposix... " >&6; }
58740 if ${ac_cv_lib_posix_remove+:} false; then :
58741   $as_echo_n "(cached) " >&6
58742 else
58743   ac_check_lib_save_LIBS=$LIBS
58744 LIBS="-lposix  $LIBS"
58745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58746 /* end confdefs.h.  */
58747 
58748 /* Override any GCC internal prototype to avoid an error.
58749    Use char because int might match the return type of a GCC
58750    builtin and then its argument prototype would still apply.  */
58751 #ifdef __cplusplus
58752 extern "C"
58753 #endif
58754 char remove ();
58755 int
58756 main ()
58757 {
58758 return remove ();
58759   ;
58760   return 0;
58761 }
58762 _ACEOF
58763 if ac_fn_cxx_try_link "$LINENO"; then :
58764   ac_cv_lib_posix_remove=yes
58765 else
58766   ac_cv_lib_posix_remove=no
58767 fi
58768 rm -f core conftest.err conftest.$ac_objext \
58769     conftest$ac_exeext conftest.$ac_ext
58770 LIBS=$ac_check_lib_save_LIBS
58771 fi
58772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
58773 $as_echo "$ac_cv_lib_posix_remove" >&6; }
58774 if test "x$ac_cv_lib_posix_remove" = xyes; then :
58775   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
58776 fi
58777 
58778     fi
58779 
58780     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
58781     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
58782 if test "x$ac_cv_func_shmat" = xyes; then :
58783 
58784 fi
58785 
58786     if test $ac_cv_func_shmat = no; then
58787       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
58788 $as_echo_n "checking for shmat in -lipc... " >&6; }
58789 if ${ac_cv_lib_ipc_shmat+:} false; then :
58790   $as_echo_n "(cached) " >&6
58791 else
58792   ac_check_lib_save_LIBS=$LIBS
58793 LIBS="-lipc  $LIBS"
58794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58795 /* end confdefs.h.  */
58796 
58797 /* Override any GCC internal prototype to avoid an error.
58798    Use char because int might match the return type of a GCC
58799    builtin and then its argument prototype would still apply.  */
58800 #ifdef __cplusplus
58801 extern "C"
58802 #endif
58803 char shmat ();
58804 int
58805 main ()
58806 {
58807 return shmat ();
58808   ;
58809   return 0;
58810 }
58811 _ACEOF
58812 if ac_fn_cxx_try_link "$LINENO"; then :
58813   ac_cv_lib_ipc_shmat=yes
58814 else
58815   ac_cv_lib_ipc_shmat=no
58816 fi
58817 rm -f core conftest.err conftest.$ac_objext \
58818     conftest$ac_exeext conftest.$ac_ext
58819 LIBS=$ac_check_lib_save_LIBS
58820 fi
58821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
58822 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
58823 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
58824   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
58825 fi
58826 
58827     fi
58828   fi
58829 
58830   # Check for libraries that X11R6 Xt/Xaw programs need.
58831   ac_save_LDFLAGS=$LDFLAGS
58832   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
58833   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
58834   # check for ICE first), but we must link in the order -lSM -lICE or
58835   # we get undefined symbols.  So assume we have SM if we have ICE.
58836   # These have to be linked with before -lX11, unlike the other
58837   # libraries we check for below, so use a different variable.
58838   # John Interrante, Karl Berry
58839   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
58840 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
58841 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
58842   $as_echo_n "(cached) " >&6
58843 else
58844   ac_check_lib_save_LIBS=$LIBS
58845 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
58846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58847 /* end confdefs.h.  */
58848 
58849 /* Override any GCC internal prototype to avoid an error.
58850    Use char because int might match the return type of a GCC
58851    builtin and then its argument prototype would still apply.  */
58852 #ifdef __cplusplus
58853 extern "C"
58854 #endif
58855 char IceConnectionNumber ();
58856 int
58857 main ()
58858 {
58859 return IceConnectionNumber ();
58860   ;
58861   return 0;
58862 }
58863 _ACEOF
58864 if ac_fn_cxx_try_link "$LINENO"; then :
58865   ac_cv_lib_ICE_IceConnectionNumber=yes
58866 else
58867   ac_cv_lib_ICE_IceConnectionNumber=no
58868 fi
58869 rm -f core conftest.err conftest.$ac_objext \
58870     conftest$ac_exeext conftest.$ac_ext
58871 LIBS=$ac_check_lib_save_LIBS
58872 fi
58873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
58874 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
58875 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
58876   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
58877 fi
58878 
58879   LDFLAGS=$ac_save_LDFLAGS
58880 
58881 fi
58882 
58883 
58884     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
58885     # this doesn't make sense so we remove it.
58886     if test "x$COMPILE_TYPE" = xcross; then
58887       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
58888     fi
58889 
58890     if test "x$no_x" = xyes; then
58891 
58892   # Print a helpful message on how to acquire the necessary build dependency.
58893   # x11 is the help tag: freetype, cups, alsa etc
58894   MISSING_DEPENDENCY=x11
58895 
58896   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58897     cygwin_help $MISSING_DEPENDENCY
58898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58899     msys_help $MISSING_DEPENDENCY
58900   else
58901     PKGHANDLER_COMMAND=
58902 
58903     case $PKGHANDLER in
58904       apt-get)
58905         apt_help     $MISSING_DEPENDENCY ;;
58906       yum)
58907         yum_help     $MISSING_DEPENDENCY ;;
58908       brew)
58909         brew_help    $MISSING_DEPENDENCY ;;
58910       port)
58911         port_help    $MISSING_DEPENDENCY ;;
58912       pkgutil)
58913         pkgutil_help $MISSING_DEPENDENCY ;;
58914       pkgadd)
58915         pkgadd_help  $MISSING_DEPENDENCY ;;
58916     esac
58917 
58918     if test "x$PKGHANDLER_COMMAND" != x; then
58919       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58920     fi
58921   fi
58922 
58923       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
58924     fi
58925 
58926     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
58927       OPENWIN_HOME="/usr/openwin"
58928       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
58929       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
58930           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
58931     fi
58932 
58933     ac_ext=c
58934 ac_cpp='$CPP $CPPFLAGS'
58935 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
58936 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
58937 ac_compiler_gnu=$ac_cv_c_compiler_gnu
58938 
58939     OLD_CFLAGS="$CFLAGS"
58940     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
58941 
58942     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
58943     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
58944 do :
58945   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
58946 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
58947           # include <X11/Xlib.h>
58948           # include <X11/Xutil.h>
58949 
58950 
58951 "
58952 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
58953   cat >>confdefs.h <<_ACEOF
58954 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
58955 _ACEOF
58956  X11_HEADERS_OK=yes
58957 else
58958   X11_HEADERS_OK=no; break
58959 fi
58960 
58961 done
58962 
58963 
58964     if test "x$X11_HEADERS_OK" = xno; then
58965 
58966   # Print a helpful message on how to acquire the necessary build dependency.
58967   # x11 is the help tag: freetype, cups, alsa etc
58968   MISSING_DEPENDENCY=x11
58969 
58970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58971     cygwin_help $MISSING_DEPENDENCY
58972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58973     msys_help $MISSING_DEPENDENCY
58974   else
58975     PKGHANDLER_COMMAND=
58976 
58977     case $PKGHANDLER in
58978       apt-get)
58979         apt_help     $MISSING_DEPENDENCY ;;
58980       yum)
58981         yum_help     $MISSING_DEPENDENCY ;;
58982       brew)
58983         brew_help    $MISSING_DEPENDENCY ;;
58984       port)
58985         port_help    $MISSING_DEPENDENCY ;;
58986       pkgutil)
58987         pkgutil_help $MISSING_DEPENDENCY ;;
58988       pkgadd)
58989         pkgadd_help  $MISSING_DEPENDENCY ;;
58990     esac
58991 
58992     if test "x$PKGHANDLER_COMMAND" != x; then
58993       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
58994     fi
58995   fi
58996 
58997       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
58998     fi
58999 
59000     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
59001     # defined in libawt_xawt.
59002     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
59003 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
59004     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59005 /* end confdefs.h.  */
59006 #include <X11/extensions/Xrender.h>
59007 int
59008 main ()
59009 {
59010 XLinearGradient x;
59011   ;
59012   return 0;
59013 }
59014 _ACEOF
59015 if ac_fn_c_try_compile "$LINENO"; then :
59016   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59017 $as_echo "yes" >&6; }
59018 else
59019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59020 $as_echo "no" >&6; }
59021          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
59022 fi
59023 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59024 
59025     CFLAGS="$OLD_CFLAGS"
59026     ac_ext=cpp
59027 ac_cpp='$CXXCPP $CPPFLAGS'
59028 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59029 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59030 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59031 
59032   fi # NEEDS_LIB_X11
59033 
59034 
59035 
59036 
59037 
59038 
59039 # Check whether --with-cups was given.
59040 if test "${with_cups+set}" = set; then :
59041   withval=$with_cups;
59042 fi
59043 
59044 
59045 # Check whether --with-cups-include was given.
59046 if test "${with_cups_include+set}" = set; then :
59047   withval=$with_cups_include;
59048 fi
59049 
59050 
59051   if test "x$NEEDS_LIB_CUPS" = xfalse; then
59052     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
59053         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
59054       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
59055 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
59056     fi
59057     CUPS_CFLAGS=
59058   else
59059     CUPS_FOUND=no
59060 
59061     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
59062       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
59063     fi
59064 
59065     if test "x${with_cups}" != x; then
59066       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
59067 $as_echo_n "checking for cups headers... " >&6; }
59068       if test -s "${with_cups}/include/cups/cups.h"; then
59069         CUPS_CFLAGS="-I${with_cups}/include"
59070         CUPS_FOUND=yes
59071         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
59072 $as_echo "$CUPS_FOUND" >&6; }
59073       else
59074         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
59075       fi
59076     fi
59077     if test "x${with_cups_include}" != x; then
59078       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
59079 $as_echo_n "checking for cups headers... " >&6; }
59080       if test -s "${with_cups_include}/cups/cups.h"; then
59081         CUPS_CFLAGS="-I${with_cups_include}"
59082         CUPS_FOUND=yes
59083         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
59084 $as_echo "$CUPS_FOUND" >&6; }
59085       else
59086         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
59087       fi
59088     fi
59089     if test "x$CUPS_FOUND" = xno; then
59090       # Are the cups headers installed in the default /usr/include location?
59091       for ac_header in cups/cups.h cups/ppd.h
59092 do :
59093   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
59094 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
59095 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
59096   cat >>confdefs.h <<_ACEOF
59097 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
59098 _ACEOF
59099 
59100           CUPS_FOUND=yes
59101           CUPS_CFLAGS=
59102           DEFAULT_CUPS=yes
59103 
59104 fi
59105 
59106 done
59107 
59108     fi
59109     if test "x$CUPS_FOUND" = xno; then
59110 
59111   # Print a helpful message on how to acquire the necessary build dependency.
59112   # cups is the help tag: freetype, cups, alsa etc
59113   MISSING_DEPENDENCY=cups
59114 
59115   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59116     cygwin_help $MISSING_DEPENDENCY
59117   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59118     msys_help $MISSING_DEPENDENCY
59119   else
59120     PKGHANDLER_COMMAND=
59121 
59122     case $PKGHANDLER in
59123       apt-get)
59124         apt_help     $MISSING_DEPENDENCY ;;
59125       yum)
59126         yum_help     $MISSING_DEPENDENCY ;;
59127       brew)
59128         brew_help    $MISSING_DEPENDENCY ;;
59129       port)
59130         port_help    $MISSING_DEPENDENCY ;;
59131       pkgutil)
59132         pkgutil_help $MISSING_DEPENDENCY ;;
59133       pkgadd)
59134         pkgadd_help  $MISSING_DEPENDENCY ;;
59135     esac
59136 
59137     if test "x$PKGHANDLER_COMMAND" != x; then
59138       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59139     fi
59140   fi
59141 
59142       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
59143     fi
59144   fi
59145 
59146 
59147 
59148 
59149 
59150 # Check whether --with-fontconfig was given.
59151 if test "${with_fontconfig+set}" = set; then :
59152   withval=$with_fontconfig;
59153 fi
59154 
59155 
59156 # Check whether --with-fontconfig-include was given.
59157 if test "${with_fontconfig_include+set}" = set; then :
59158   withval=$with_fontconfig_include;
59159 fi
59160 
59161 
59162   if test "x$NEEDS_LIB_FONTCONFIG" = xfalse; then
59163     if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
59164         (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
59165       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
59166 $as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
59167     fi
59168     FONTCONFIG_CFLAGS=
59169   else
59170     FONTCONFIG_FOUND=no
59171 
59172     if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
59173       as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
59174     fi
59175 
59176     if test "x${with_fontconfig}" != x; then
59177       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
59178 $as_echo_n "checking for fontconfig headers... " >&6; }
59179       if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
59180         FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
59181         FONTCONFIG_FOUND=yes
59182         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
59183 $as_echo "$FONTCONFIG_FOUND" >&6; }
59184       else
59185         as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
59186       fi
59187     fi
59188     if test "x${with_fontconfig_include}" != x; then
59189       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
59190 $as_echo_n "checking for fontconfig headers... " >&6; }
59191       if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
59192         FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
59193         FONTCONFIG_FOUND=yes
59194         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
59195 $as_echo "$FONTCONFIG_FOUND" >&6; }
59196       else
59197         as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
59198       fi
59199     fi
59200     if test "x$FONTCONFIG_FOUND" = xno; then
59201       # Are the fontconfig headers installed in the default /usr/include location?
59202       for ac_header in fontconfig/fontconfig.h
59203 do :
59204   ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
59205 if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
59206   cat >>confdefs.h <<_ACEOF
59207 #define HAVE_FONTCONFIG_FONTCONFIG_H 1
59208 _ACEOF
59209 
59210           FONTCONFIG_FOUND=yes
59211           FONTCONFIG_CFLAGS=
59212           DEFAULT_FONTCONFIG=yes
59213 
59214 fi
59215 
59216 done
59217 
59218     fi
59219     if test "x$FONTCONFIG_FOUND" = xno; then
59220 
59221   # Print a helpful message on how to acquire the necessary build dependency.
59222   # fontconfig is the help tag: freetype, cups, alsa etc
59223   MISSING_DEPENDENCY=fontconfig
59224 
59225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59226     cygwin_help $MISSING_DEPENDENCY
59227   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59228     msys_help $MISSING_DEPENDENCY
59229   else
59230     PKGHANDLER_COMMAND=
59231 
59232     case $PKGHANDLER in
59233       apt-get)
59234         apt_help     $MISSING_DEPENDENCY ;;
59235       yum)
59236         yum_help     $MISSING_DEPENDENCY ;;
59237       brew)
59238         brew_help    $MISSING_DEPENDENCY ;;
59239       port)
59240         port_help    $MISSING_DEPENDENCY ;;
59241       pkgutil)
59242         pkgutil_help $MISSING_DEPENDENCY ;;
59243       pkgadd)
59244         pkgadd_help  $MISSING_DEPENDENCY ;;
59245     esac
59246 
59247     if test "x$PKGHANDLER_COMMAND" != x; then
59248       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59249     fi
59250   fi
59251 
59252       as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
59253     fi
59254   fi
59255 
59256 
59257 
59258 
59259 
59260 # Check whether --with-freetype was given.
59261 if test "${with_freetype+set}" = set; then :
59262   withval=$with_freetype;
59263 fi
59264 
59265 
59266 # Check whether --with-freetype-include was given.
59267 if test "${with_freetype_include+set}" = set; then :
59268   withval=$with_freetype_include;
59269 fi
59270 
59271 
59272 # Check whether --with-freetype-lib was given.
59273 if test "${with_freetype_lib+set}" = set; then :
59274   withval=$with_freetype_lib;
59275 fi
59276 
59277 
59278 # Check whether --with-freetype-src was given.
59279 if test "${with_freetype_src+set}" = set; then :
59280   withval=$with_freetype_src;
59281 fi
59282 
59283   # Check whether --enable-freetype-bundling was given.
59284 if test "${enable_freetype_bundling+set}" = set; then :
59285   enableval=$enable_freetype_bundling;
59286 fi
59287 
59288 
59289 # Check whether --with-freetype-license was given.
59290 if test "${with_freetype_license+set}" = set; then :
59291   withval=$with_freetype_license;
59292 fi
59293 
59294 
59295   # Need to specify explicitly since it needs to be overridden on some versions of macosx
59296   FREETYPE_BASE_NAME=freetype
59297   FREETYPE_CFLAGS=
59298   FREETYPE_LIBS=
59299   FREETYPE_BUNDLE_LIB_PATH=
59300 
59301   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
59302     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
59303         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
59304         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
59305         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
59306       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
59307 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
59308     fi
59309     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
59310       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
59311 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
59312     fi
59313   else
59314     # freetype is needed to build; go get it!
59315 
59316     BUNDLE_FREETYPE="$enable_freetype_bundling"
59317 
59318     if  test "x$with_freetype_src" != x; then
59319       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59320         # Try to build freetype if --with-freetype-src was given on Windows
59321 
59322   FREETYPE_SRC_PATH="$with_freetype_src"
59323   BUILD_FREETYPE=yes
59324 
59325   # Check if the freetype sources are acessible..
59326   if ! test -d $FREETYPE_SRC_PATH; then
59327     { $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
59328 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59329     BUILD_FREETYPE=no
59330   fi
59331   # ..and contain a vc2010 project file
59332   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59333   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59334     { $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
59335 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59336     BUILD_FREETYPE=no
59337   fi
59338   # Now check if configure found a version of 'msbuild.exe'
59339   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59340     { $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
59341 $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;}
59342     BUILD_FREETYPE=no
59343   fi
59344 
59345   # Ready to go..
59346   if test "x$BUILD_FREETYPE" = xyes; then
59347     # msbuild requires trailing slashes for output directories
59348     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59349     freetype_lib_path_unix="$freetype_lib_path"
59350     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59351 
59352   unix_path="$vcxproj_path"
59353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59354     windows_path=`$CYGPATH -m "$unix_path"`
59355     vcxproj_path="$windows_path"
59356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59357     windows_path=`cmd //c echo $unix_path`
59358     vcxproj_path="$windows_path"
59359   fi
59360 
59361 
59362   unix_path="$freetype_lib_path"
59363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59364     windows_path=`$CYGPATH -m "$unix_path"`
59365     freetype_lib_path="$windows_path"
59366   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59367     windows_path=`cmd //c echo $unix_path`
59368     freetype_lib_path="$windows_path"
59369   fi
59370 
59371 
59372   unix_path="$freetype_obj_path"
59373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59374     windows_path=`$CYGPATH -m "$unix_path"`
59375     freetype_obj_path="$windows_path"
59376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59377     windows_path=`cmd //c echo $unix_path`
59378     freetype_obj_path="$windows_path"
59379   fi
59380 
59381     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59382       freetype_platform=x64
59383     else
59384       freetype_platform=win32
59385     fi
59386 
59387     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59388     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59389     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59390     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59391     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59392 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59393 
59394     # First we try to build the freetype.dll
59395     $ECHO -e "@echo off\n"\
59396         "$MSBUILD $vcxproj_path "\
59397         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59398         "/p:Configuration=\"Release Multithreaded\" "\
59399         "/p:Platform=$freetype_platform "\
59400         "/p:ConfigurationType=DynamicLibrary "\
59401         "/p:TargetName=freetype "\
59402         "/p:OutDir=\"$freetype_lib_path\" "\
59403         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59404     cmd /c freetype.bat
59405 
59406     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59407       # If that succeeds we also build freetype.lib
59408       $ECHO -e "@echo off\n"\
59409           "$MSBUILD $vcxproj_path "\
59410           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59411           "/p:Configuration=\"Release Multithreaded\" "\
59412           "/p:Platform=$freetype_platform "\
59413           "/p:ConfigurationType=StaticLibrary "\
59414           "/p:TargetName=freetype "\
59415           "/p:OutDir=\"$freetype_lib_path\" "\
59416           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59417       cmd /c freetype.bat
59418 
59419       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59420         # Once we build both, lib and dll, set freetype lib and include path appropriately
59421         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59422         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59423         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59424 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59425       else
59426         BUILD_FREETYPE=no
59427       fi
59428     else
59429       BUILD_FREETYPE=no
59430     fi
59431   fi
59432 
59433         if test "x$BUILD_FREETYPE" = xyes; then
59434           # Okay, we built it. Check that it works.
59435 
59436   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59437   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59438   METHOD="--with-freetype-src"
59439 
59440   # Let's start with an optimistic view of the world :-)
59441   FOUND_FREETYPE=yes
59442 
59443   # First look for the canonical freetype main include file ft2build.h.
59444   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59445     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59446     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59447     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59448       # Fail.
59449       FOUND_FREETYPE=no
59450     fi
59451   fi
59452 
59453   if test "x$FOUND_FREETYPE" = xyes; then
59454     # Include file found, let's continue the sanity check.
59455     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59456 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59457 
59458     # Reset to default value
59459     FREETYPE_BASE_NAME=freetype
59460     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59461     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59462       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59463           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59464         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59465         # for the .6 version explicitly.
59466         FREETYPE_BASE_NAME=freetype.6
59467         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59468         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59469 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59470       else
59471         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59472 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59473         FOUND_FREETYPE=no
59474       fi
59475     else
59476       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59477         # On Windows, we will need both .lib and .dll file.
59478         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59479           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59480 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59481           FOUND_FREETYPE=no
59482         fi
59483       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59484           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59485         # Found lib in isa dir, use that instead.
59486         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59487         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59488 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59489       fi
59490     fi
59491   fi
59492 
59493   if test "x$FOUND_FREETYPE" = xyes; then
59494 
59495   # Only process if variable expands to non-empty
59496 
59497   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59498     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59499 
59500   # Input might be given as Windows format, start by converting to
59501   # unix format.
59502   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59503   new_path=`$CYGPATH -u "$path"`
59504 
59505   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59506   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59507   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59508   # "foo.exe" is OK but "foo" is an error.
59509   #
59510   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59511   # It is also a way to make sure we got the proper file name for the real test later on.
59512   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59513   if test "x$test_shortpath" = x; then
59514     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59515 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59516     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59517   fi
59518 
59519   # Call helper function which possibly converts this using DOS-style short mode.
59520   # If so, the updated path is stored in $new_path.
59521 
59522   input_path="$new_path"
59523   # Check if we need to convert this using DOS-style short mode. If the path
59524   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59525   # take no chances and rewrite it.
59526   # Note: m4 eats our [], so we need to use [ and ] instead.
59527   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59528   if test "x$has_forbidden_chars" != x; then
59529     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59530     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59531     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59532     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59533       # Going to short mode and back again did indeed matter. Since short mode is
59534       # case insensitive, let's make it lowercase to improve readability.
59535       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59536       # Now convert it back to Unix-style (cygpath)
59537       input_path=`$CYGPATH -u "$shortmode_path"`
59538       new_path="$input_path"
59539     fi
59540   fi
59541 
59542   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59543   if test "x$test_cygdrive_prefix" = x; then
59544     # As a simple fix, exclude /usr/bin since it's not a real path.
59545     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59546       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59547       # a path prefixed by /cygdrive for fixpath to work.
59548       new_path="$CYGWIN_ROOT_PATH$input_path"
59549     fi
59550   fi
59551 
59552 
59553   if test "x$path" != "x$new_path"; then
59554     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59555     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59556 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59557   fi
59558 
59559     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59560 
59561   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59562   has_colon=`$ECHO $path | $GREP ^.:`
59563   new_path="$path"
59564   if test "x$has_colon" = x; then
59565     # Not in mixed or Windows style, start by that.
59566     new_path=`cmd //c echo $path`
59567   fi
59568 
59569 
59570   input_path="$new_path"
59571   # Check if we need to convert this using DOS-style short mode. If the path
59572   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59573   # take no chances and rewrite it.
59574   # Note: m4 eats our [], so we need to use [ and ] instead.
59575   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59576   if test "x$has_forbidden_chars" != x; then
59577     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59578     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59579   fi
59580 
59581 
59582   windows_path="$new_path"
59583   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59584     unix_path=`$CYGPATH -u "$windows_path"`
59585     new_path="$unix_path"
59586   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59587     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59588     new_path="$unix_path"
59589   fi
59590 
59591   if test "x$path" != "x$new_path"; then
59592     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59593     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59594 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59595   fi
59596 
59597   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59598   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59599 
59600     else
59601       # We're on a unix platform. Hooray! :)
59602       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59603       has_space=`$ECHO "$path" | $GREP " "`
59604       if test "x$has_space" != x; then
59605         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59606 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59607         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59608       fi
59609 
59610       # Use eval to expand a potential ~
59611       eval path="$path"
59612       if test ! -f "$path" && test ! -d "$path"; then
59613         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59614       fi
59615 
59616       if test -d "$path"; then
59617         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59618       else
59619         dir="`$DIRNAME "$path"`"
59620         base="`$BASENAME "$path"`"
59621         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59622       fi
59623     fi
59624   fi
59625 
59626 
59627   # Only process if variable expands to non-empty
59628 
59629   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59630     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59631 
59632   # Input might be given as Windows format, start by converting to
59633   # unix format.
59634   path="$POTENTIAL_FREETYPE_LIB_PATH"
59635   new_path=`$CYGPATH -u "$path"`
59636 
59637   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59638   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59639   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59640   # "foo.exe" is OK but "foo" is an error.
59641   #
59642   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59643   # It is also a way to make sure we got the proper file name for the real test later on.
59644   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59645   if test "x$test_shortpath" = x; then
59646     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59647 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59648     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59649   fi
59650 
59651   # Call helper function which possibly converts this using DOS-style short mode.
59652   # If so, the updated path is stored in $new_path.
59653 
59654   input_path="$new_path"
59655   # Check if we need to convert this using DOS-style short mode. If the path
59656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59657   # take no chances and rewrite it.
59658   # Note: m4 eats our [], so we need to use [ and ] instead.
59659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59660   if test "x$has_forbidden_chars" != x; then
59661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59665       # Going to short mode and back again did indeed matter. Since short mode is
59666       # case insensitive, let's make it lowercase to improve readability.
59667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59668       # Now convert it back to Unix-style (cygpath)
59669       input_path=`$CYGPATH -u "$shortmode_path"`
59670       new_path="$input_path"
59671     fi
59672   fi
59673 
59674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59675   if test "x$test_cygdrive_prefix" = x; then
59676     # As a simple fix, exclude /usr/bin since it's not a real path.
59677     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59679       # a path prefixed by /cygdrive for fixpath to work.
59680       new_path="$CYGWIN_ROOT_PATH$input_path"
59681     fi
59682   fi
59683 
59684 
59685   if test "x$path" != "x$new_path"; then
59686     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59688 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59689   fi
59690 
59691     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59692 
59693   path="$POTENTIAL_FREETYPE_LIB_PATH"
59694   has_colon=`$ECHO $path | $GREP ^.:`
59695   new_path="$path"
59696   if test "x$has_colon" = x; then
59697     # Not in mixed or Windows style, start by that.
59698     new_path=`cmd //c echo $path`
59699   fi
59700 
59701 
59702   input_path="$new_path"
59703   # Check if we need to convert this using DOS-style short mode. If the path
59704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59705   # take no chances and rewrite it.
59706   # Note: m4 eats our [], so we need to use [ and ] instead.
59707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59708   if test "x$has_forbidden_chars" != x; then
59709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59710     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59711   fi
59712 
59713 
59714   windows_path="$new_path"
59715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59716     unix_path=`$CYGPATH -u "$windows_path"`
59717     new_path="$unix_path"
59718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59720     new_path="$unix_path"
59721   fi
59722 
59723   if test "x$path" != "x$new_path"; then
59724     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59726 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59727   fi
59728 
59729   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59730   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59731 
59732     else
59733       # We're on a unix platform. Hooray! :)
59734       path="$POTENTIAL_FREETYPE_LIB_PATH"
59735       has_space=`$ECHO "$path" | $GREP " "`
59736       if test "x$has_space" != x; then
59737         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59738 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59739         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59740       fi
59741 
59742       # Use eval to expand a potential ~
59743       eval path="$path"
59744       if test ! -f "$path" && test ! -d "$path"; then
59745         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59746       fi
59747 
59748       if test -d "$path"; then
59749         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59750       else
59751         dir="`$DIRNAME "$path"`"
59752         base="`$BASENAME "$path"`"
59753         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59754       fi
59755     fi
59756   fi
59757 
59758 
59759     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59760     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59761 $as_echo_n "checking for freetype includes... " >&6; }
59762     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59763 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59764     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59765     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59766 $as_echo_n "checking for freetype libraries... " >&6; }
59767     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59768 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59769   fi
59770 
59771           if test "x$FOUND_FREETYPE" != xyes; then
59772             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
59773           fi
59774         else
59775           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
59776 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
59777           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
59778         fi
59779       else
59780         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
59781 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
59782       fi
59783     fi
59784 
59785     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
59786       # User has specified settings
59787 
59788       if test "x$BUNDLE_FREETYPE" = x; then
59789         # If not specified, default is to bundle freetype
59790         BUNDLE_FREETYPE=yes
59791       fi
59792 
59793       if test "x$with_freetype" != x; then
59794         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
59795         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
59796       fi
59797 
59798       # Allow --with-freetype-lib and --with-freetype-include to override
59799       if test "x$with_freetype_include" != x; then
59800         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
59801       fi
59802       if test "x$with_freetype_lib" != x; then
59803         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
59804       fi
59805 
59806       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59807         # Okay, we got it. Check that it works.
59808 
59809   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59810   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59811   METHOD="--with-freetype"
59812 
59813   # Let's start with an optimistic view of the world :-)
59814   FOUND_FREETYPE=yes
59815 
59816   # First look for the canonical freetype main include file ft2build.h.
59817   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59818     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59819     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59820     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59821       # Fail.
59822       FOUND_FREETYPE=no
59823     fi
59824   fi
59825 
59826   if test "x$FOUND_FREETYPE" = xyes; then
59827     # Include file found, let's continue the sanity check.
59828     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59829 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59830 
59831     # Reset to default value
59832     FREETYPE_BASE_NAME=freetype
59833     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59834     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59835       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59836           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59837         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59838         # for the .6 version explicitly.
59839         FREETYPE_BASE_NAME=freetype.6
59840         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59841         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59842 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59843       else
59844         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59845 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59846         FOUND_FREETYPE=no
59847       fi
59848     else
59849       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59850         # On Windows, we will need both .lib and .dll file.
59851         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59852           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59853 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59854           FOUND_FREETYPE=no
59855         fi
59856       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59857           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59858         # Found lib in isa dir, use that instead.
59859         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59860         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59861 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59862       fi
59863     fi
59864   fi
59865 
59866   if test "x$FOUND_FREETYPE" = xyes; then
59867 
59868   # Only process if variable expands to non-empty
59869 
59870   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59872 
59873   # Input might be given as Windows format, start by converting to
59874   # unix format.
59875   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59876   new_path=`$CYGPATH -u "$path"`
59877 
59878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59881   # "foo.exe" is OK but "foo" is an error.
59882   #
59883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59884   # It is also a way to make sure we got the proper file name for the real test later on.
59885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59886   if test "x$test_shortpath" = x; then
59887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59888 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59889     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59890   fi
59891 
59892   # Call helper function which possibly converts this using DOS-style short mode.
59893   # If so, the updated path is stored in $new_path.
59894 
59895   input_path="$new_path"
59896   # Check if we need to convert this using DOS-style short mode. If the path
59897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59898   # take no chances and rewrite it.
59899   # Note: m4 eats our [], so we need to use [ and ] instead.
59900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59901   if test "x$has_forbidden_chars" != x; then
59902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59906       # Going to short mode and back again did indeed matter. Since short mode is
59907       # case insensitive, let's make it lowercase to improve readability.
59908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59909       # Now convert it back to Unix-style (cygpath)
59910       input_path=`$CYGPATH -u "$shortmode_path"`
59911       new_path="$input_path"
59912     fi
59913   fi
59914 
59915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59916   if test "x$test_cygdrive_prefix" = x; then
59917     # As a simple fix, exclude /usr/bin since it's not a real path.
59918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59920       # a path prefixed by /cygdrive for fixpath to work.
59921       new_path="$CYGWIN_ROOT_PATH$input_path"
59922     fi
59923   fi
59924 
59925 
59926   if test "x$path" != "x$new_path"; then
59927     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59929 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59930   fi
59931 
59932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59933 
59934   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59935   has_colon=`$ECHO $path | $GREP ^.:`
59936   new_path="$path"
59937   if test "x$has_colon" = x; then
59938     # Not in mixed or Windows style, start by that.
59939     new_path=`cmd //c echo $path`
59940   fi
59941 
59942 
59943   input_path="$new_path"
59944   # Check if we need to convert this using DOS-style short mode. If the path
59945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59946   # take no chances and rewrite it.
59947   # Note: m4 eats our [], so we need to use [ and ] instead.
59948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59949   if test "x$has_forbidden_chars" != x; then
59950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59952   fi
59953 
59954 
59955   windows_path="$new_path"
59956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59957     unix_path=`$CYGPATH -u "$windows_path"`
59958     new_path="$unix_path"
59959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59961     new_path="$unix_path"
59962   fi
59963 
59964   if test "x$path" != "x$new_path"; then
59965     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59967 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59968   fi
59969 
59970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59972 
59973     else
59974       # We're on a unix platform. Hooray! :)
59975       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59976       has_space=`$ECHO "$path" | $GREP " "`
59977       if test "x$has_space" != x; then
59978         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59979 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59980         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59981       fi
59982 
59983       # Use eval to expand a potential ~
59984       eval path="$path"
59985       if test ! -f "$path" && test ! -d "$path"; then
59986         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59987       fi
59988 
59989       if test -d "$path"; then
59990         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59991       else
59992         dir="`$DIRNAME "$path"`"
59993         base="`$BASENAME "$path"`"
59994         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59995       fi
59996     fi
59997   fi
59998 
59999 
60000   # Only process if variable expands to non-empty
60001 
60002   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60003     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60004 
60005   # Input might be given as Windows format, start by converting to
60006   # unix format.
60007   path="$POTENTIAL_FREETYPE_LIB_PATH"
60008   new_path=`$CYGPATH -u "$path"`
60009 
60010   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60011   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60012   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60013   # "foo.exe" is OK but "foo" is an error.
60014   #
60015   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60016   # It is also a way to make sure we got the proper file name for the real test later on.
60017   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60018   if test "x$test_shortpath" = x; then
60019     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60020 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60021     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60022   fi
60023 
60024   # Call helper function which possibly converts this using DOS-style short mode.
60025   # If so, the updated path is stored in $new_path.
60026 
60027   input_path="$new_path"
60028   # Check if we need to convert this using DOS-style short mode. If the path
60029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60030   # take no chances and rewrite it.
60031   # Note: m4 eats our [], so we need to use [ and ] instead.
60032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60033   if test "x$has_forbidden_chars" != x; then
60034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60035     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60036     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60037     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60038       # Going to short mode and back again did indeed matter. Since short mode is
60039       # case insensitive, let's make it lowercase to improve readability.
60040       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60041       # Now convert it back to Unix-style (cygpath)
60042       input_path=`$CYGPATH -u "$shortmode_path"`
60043       new_path="$input_path"
60044     fi
60045   fi
60046 
60047   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60048   if test "x$test_cygdrive_prefix" = x; then
60049     # As a simple fix, exclude /usr/bin since it's not a real path.
60050     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60051       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60052       # a path prefixed by /cygdrive for fixpath to work.
60053       new_path="$CYGWIN_ROOT_PATH$input_path"
60054     fi
60055   fi
60056 
60057 
60058   if test "x$path" != "x$new_path"; then
60059     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60061 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60062   fi
60063 
60064     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60065 
60066   path="$POTENTIAL_FREETYPE_LIB_PATH"
60067   has_colon=`$ECHO $path | $GREP ^.:`
60068   new_path="$path"
60069   if test "x$has_colon" = x; then
60070     # Not in mixed or Windows style, start by that.
60071     new_path=`cmd //c echo $path`
60072   fi
60073 
60074 
60075   input_path="$new_path"
60076   # Check if we need to convert this using DOS-style short mode. If the path
60077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60078   # take no chances and rewrite it.
60079   # Note: m4 eats our [], so we need to use [ and ] instead.
60080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60081   if test "x$has_forbidden_chars" != x; then
60082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60084   fi
60085 
60086 
60087   windows_path="$new_path"
60088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60089     unix_path=`$CYGPATH -u "$windows_path"`
60090     new_path="$unix_path"
60091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60093     new_path="$unix_path"
60094   fi
60095 
60096   if test "x$path" != "x$new_path"; then
60097     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60099 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60100   fi
60101 
60102   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60103   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60104 
60105     else
60106       # We're on a unix platform. Hooray! :)
60107       path="$POTENTIAL_FREETYPE_LIB_PATH"
60108       has_space=`$ECHO "$path" | $GREP " "`
60109       if test "x$has_space" != x; then
60110         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60111 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60112         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60113       fi
60114 
60115       # Use eval to expand a potential ~
60116       eval path="$path"
60117       if test ! -f "$path" && test ! -d "$path"; then
60118         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60119       fi
60120 
60121       if test -d "$path"; then
60122         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60123       else
60124         dir="`$DIRNAME "$path"`"
60125         base="`$BASENAME "$path"`"
60126         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60127       fi
60128     fi
60129   fi
60130 
60131 
60132     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60134 $as_echo_n "checking for freetype includes... " >&6; }
60135     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60136 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60137     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60139 $as_echo_n "checking for freetype libraries... " >&6; }
60140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60141 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60142   fi
60143 
60144         if test "x$FOUND_FREETYPE" != xyes; then
60145           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
60146         fi
60147       else
60148         # User specified only one of lib or include. This is an error.
60149         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
60150           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
60151 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
60152           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
60153         else
60154           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
60155 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
60156           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
60157         fi
60158       fi
60159     else
60160       # User did not specify settings, but we need freetype. Try to locate it.
60161 
60162       if test "x$BUNDLE_FREETYPE" = x; then
60163         # If not specified, default is to bundle freetype only on windows
60164         if test "x$OPENJDK_TARGET_OS" = xwindows; then
60165           BUNDLE_FREETYPE=yes
60166         else
60167           BUNDLE_FREETYPE=no
60168         fi
60169       fi
60170 
60171       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
60172       if test "x$SYSROOT" = x; then
60173         if test "x$FOUND_FREETYPE" != xyes; then
60174           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
60175           if test "x$PKG_CONFIG" != x; then
60176 
60177 pkg_failed=no
60178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
60179 $as_echo_n "checking for FREETYPE... " >&6; }
60180 
60181 if test -n "$FREETYPE_CFLAGS"; then
60182     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
60183  elif test -n "$PKG_CONFIG"; then
60184     if test -n "$PKG_CONFIG" && \
60185     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
60186   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
60187   ac_status=$?
60188   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60189   test $ac_status = 0; }; then
60190   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
60191 else
60192   pkg_failed=yes
60193 fi
60194  else
60195     pkg_failed=untried
60196 fi
60197 if test -n "$FREETYPE_LIBS"; then
60198     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
60199  elif test -n "$PKG_CONFIG"; then
60200     if test -n "$PKG_CONFIG" && \
60201     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
60202   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
60203   ac_status=$?
60204   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60205   test $ac_status = 0; }; then
60206   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
60207 else
60208   pkg_failed=yes
60209 fi
60210  else
60211     pkg_failed=untried
60212 fi
60213 
60214 
60215 
60216 if test $pkg_failed = yes; then
60217 
60218 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60219         _pkg_short_errors_supported=yes
60220 else
60221         _pkg_short_errors_supported=no
60222 fi
60223         if test $_pkg_short_errors_supported = yes; then
60224                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
60225         else
60226                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
60227         fi
60228         # Put the nasty error message in config.log where it belongs
60229         echo "$FREETYPE_PKG_ERRORS" >&5
60230 
60231         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60232 $as_echo "no" >&6; }
60233                 FOUND_FREETYPE=no
60234 elif test $pkg_failed = untried; then
60235         FOUND_FREETYPE=no
60236 else
60237         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
60238         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
60239         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60240 $as_echo "yes" >&6; }
60241         FOUND_FREETYPE=yes
60242 fi
60243             if test "x$FOUND_FREETYPE" = xyes; then
60244               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
60245               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
60246               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
60247               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
60248                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
60249               fi
60250               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
60251               if test "x$BUNDLE_FREETYPE" = xyes; then
60252                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
60253 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
60254                 FOUND_FREETYPE=no
60255               else
60256                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
60257 $as_echo_n "checking for freetype... " >&6; }
60258                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
60259 $as_echo "yes (using pkg-config)" >&6; }
60260               fi
60261             fi
60262           fi
60263         fi
60264       fi
60265 
60266       if test "x$FOUND_FREETYPE" != xyes; then
60267         # Check in well-known locations
60268         if test "x$OPENJDK_TARGET_OS" = xwindows; then
60269           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
60270 
60271   windows_path="$FREETYPE_BASE_DIR"
60272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60273     unix_path=`$CYGPATH -u "$windows_path"`
60274     FREETYPE_BASE_DIR="$unix_path"
60275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60277     FREETYPE_BASE_DIR="$unix_path"
60278   fi
60279 
60280 
60281   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60282   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60283   METHOD="well-known location"
60284 
60285   # Let's start with an optimistic view of the world :-)
60286   FOUND_FREETYPE=yes
60287 
60288   # First look for the canonical freetype main include file ft2build.h.
60289   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60290     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60291     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60292     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60293       # Fail.
60294       FOUND_FREETYPE=no
60295     fi
60296   fi
60297 
60298   if test "x$FOUND_FREETYPE" = xyes; then
60299     # Include file found, let's continue the sanity check.
60300     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60301 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60302 
60303     # Reset to default value
60304     FREETYPE_BASE_NAME=freetype
60305     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60306     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60307       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60308           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60309         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60310         # for the .6 version explicitly.
60311         FREETYPE_BASE_NAME=freetype.6
60312         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60313         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60314 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60315       else
60316         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60317 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60318         FOUND_FREETYPE=no
60319       fi
60320     else
60321       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60322         # On Windows, we will need both .lib and .dll file.
60323         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60324           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60325 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60326           FOUND_FREETYPE=no
60327         fi
60328       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60329           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60330         # Found lib in isa dir, use that instead.
60331         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60332         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60333 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60334       fi
60335     fi
60336   fi
60337 
60338   if test "x$FOUND_FREETYPE" = xyes; then
60339 
60340   # Only process if variable expands to non-empty
60341 
60342   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60343     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60344 
60345   # Input might be given as Windows format, start by converting to
60346   # unix format.
60347   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60348   new_path=`$CYGPATH -u "$path"`
60349 
60350   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60351   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60352   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60353   # "foo.exe" is OK but "foo" is an error.
60354   #
60355   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60356   # It is also a way to make sure we got the proper file name for the real test later on.
60357   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60358   if test "x$test_shortpath" = x; then
60359     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60360 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60361     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60362   fi
60363 
60364   # Call helper function which possibly converts this using DOS-style short mode.
60365   # If so, the updated path is stored in $new_path.
60366 
60367   input_path="$new_path"
60368   # Check if we need to convert this using DOS-style short mode. If the path
60369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60370   # take no chances and rewrite it.
60371   # Note: m4 eats our [], so we need to use [ and ] instead.
60372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60373   if test "x$has_forbidden_chars" != x; then
60374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60375     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60376     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60377     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60378       # Going to short mode and back again did indeed matter. Since short mode is
60379       # case insensitive, let's make it lowercase to improve readability.
60380       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60381       # Now convert it back to Unix-style (cygpath)
60382       input_path=`$CYGPATH -u "$shortmode_path"`
60383       new_path="$input_path"
60384     fi
60385   fi
60386 
60387   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60388   if test "x$test_cygdrive_prefix" = x; then
60389     # As a simple fix, exclude /usr/bin since it's not a real path.
60390     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60391       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60392       # a path prefixed by /cygdrive for fixpath to work.
60393       new_path="$CYGWIN_ROOT_PATH$input_path"
60394     fi
60395   fi
60396 
60397 
60398   if test "x$path" != "x$new_path"; then
60399     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60400     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60401 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60402   fi
60403 
60404     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60405 
60406   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60407   has_colon=`$ECHO $path | $GREP ^.:`
60408   new_path="$path"
60409   if test "x$has_colon" = x; then
60410     # Not in mixed or Windows style, start by that.
60411     new_path=`cmd //c echo $path`
60412   fi
60413 
60414 
60415   input_path="$new_path"
60416   # Check if we need to convert this using DOS-style short mode. If the path
60417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60418   # take no chances and rewrite it.
60419   # Note: m4 eats our [], so we need to use [ and ] instead.
60420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60421   if test "x$has_forbidden_chars" != x; then
60422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60423     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60424   fi
60425 
60426 
60427   windows_path="$new_path"
60428   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60429     unix_path=`$CYGPATH -u "$windows_path"`
60430     new_path="$unix_path"
60431   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60432     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60433     new_path="$unix_path"
60434   fi
60435 
60436   if test "x$path" != "x$new_path"; then
60437     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60438     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60439 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60440   fi
60441 
60442   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60443   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60444 
60445     else
60446       # We're on a unix platform. Hooray! :)
60447       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60448       has_space=`$ECHO "$path" | $GREP " "`
60449       if test "x$has_space" != x; then
60450         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60451 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60452         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60453       fi
60454 
60455       # Use eval to expand a potential ~
60456       eval path="$path"
60457       if test ! -f "$path" && test ! -d "$path"; then
60458         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60459       fi
60460 
60461       if test -d "$path"; then
60462         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60463       else
60464         dir="`$DIRNAME "$path"`"
60465         base="`$BASENAME "$path"`"
60466         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60467       fi
60468     fi
60469   fi
60470 
60471 
60472   # Only process if variable expands to non-empty
60473 
60474   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60475     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60476 
60477   # Input might be given as Windows format, start by converting to
60478   # unix format.
60479   path="$POTENTIAL_FREETYPE_LIB_PATH"
60480   new_path=`$CYGPATH -u "$path"`
60481 
60482   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60483   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60484   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60485   # "foo.exe" is OK but "foo" is an error.
60486   #
60487   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60488   # It is also a way to make sure we got the proper file name for the real test later on.
60489   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60490   if test "x$test_shortpath" = x; then
60491     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60492 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60493     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60494   fi
60495 
60496   # Call helper function which possibly converts this using DOS-style short mode.
60497   # If so, the updated path is stored in $new_path.
60498 
60499   input_path="$new_path"
60500   # Check if we need to convert this using DOS-style short mode. If the path
60501   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60502   # take no chances and rewrite it.
60503   # Note: m4 eats our [], so we need to use [ and ] instead.
60504   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60505   if test "x$has_forbidden_chars" != x; then
60506     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60507     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60508     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60509     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60510       # Going to short mode and back again did indeed matter. Since short mode is
60511       # case insensitive, let's make it lowercase to improve readability.
60512       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60513       # Now convert it back to Unix-style (cygpath)
60514       input_path=`$CYGPATH -u "$shortmode_path"`
60515       new_path="$input_path"
60516     fi
60517   fi
60518 
60519   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60520   if test "x$test_cygdrive_prefix" = x; then
60521     # As a simple fix, exclude /usr/bin since it's not a real path.
60522     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60523       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60524       # a path prefixed by /cygdrive for fixpath to work.
60525       new_path="$CYGWIN_ROOT_PATH$input_path"
60526     fi
60527   fi
60528 
60529 
60530   if test "x$path" != "x$new_path"; then
60531     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60532     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60533 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60534   fi
60535 
60536     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60537 
60538   path="$POTENTIAL_FREETYPE_LIB_PATH"
60539   has_colon=`$ECHO $path | $GREP ^.:`
60540   new_path="$path"
60541   if test "x$has_colon" = x; then
60542     # Not in mixed or Windows style, start by that.
60543     new_path=`cmd //c echo $path`
60544   fi
60545 
60546 
60547   input_path="$new_path"
60548   # Check if we need to convert this using DOS-style short mode. If the path
60549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60550   # take no chances and rewrite it.
60551   # Note: m4 eats our [], so we need to use [ and ] instead.
60552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60553   if test "x$has_forbidden_chars" != x; then
60554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60555     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60556   fi
60557 
60558 
60559   windows_path="$new_path"
60560   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60561     unix_path=`$CYGPATH -u "$windows_path"`
60562     new_path="$unix_path"
60563   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60564     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60565     new_path="$unix_path"
60566   fi
60567 
60568   if test "x$path" != "x$new_path"; then
60569     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60570     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60571 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60572   fi
60573 
60574   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60575   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60576 
60577     else
60578       # We're on a unix platform. Hooray! :)
60579       path="$POTENTIAL_FREETYPE_LIB_PATH"
60580       has_space=`$ECHO "$path" | $GREP " "`
60581       if test "x$has_space" != x; then
60582         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60583 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60584         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60585       fi
60586 
60587       # Use eval to expand a potential ~
60588       eval path="$path"
60589       if test ! -f "$path" && test ! -d "$path"; then
60590         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60591       fi
60592 
60593       if test -d "$path"; then
60594         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60595       else
60596         dir="`$DIRNAME "$path"`"
60597         base="`$BASENAME "$path"`"
60598         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60599       fi
60600     fi
60601   fi
60602 
60603 
60604     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60605     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60606 $as_echo_n "checking for freetype includes... " >&6; }
60607     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60608 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60609     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60610     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60611 $as_echo_n "checking for freetype libraries... " >&6; }
60612     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60613 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60614   fi
60615 
60616           if test "x$FOUND_FREETYPE" != xyes; then
60617             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
60618 
60619   windows_path="$FREETYPE_BASE_DIR"
60620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60621     unix_path=`$CYGPATH -u "$windows_path"`
60622     FREETYPE_BASE_DIR="$unix_path"
60623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60625     FREETYPE_BASE_DIR="$unix_path"
60626   fi
60627 
60628 
60629   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60630   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60631   METHOD="well-known location"
60632 
60633   # Let's start with an optimistic view of the world :-)
60634   FOUND_FREETYPE=yes
60635 
60636   # First look for the canonical freetype main include file ft2build.h.
60637   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60638     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60639     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60640     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60641       # Fail.
60642       FOUND_FREETYPE=no
60643     fi
60644   fi
60645 
60646   if test "x$FOUND_FREETYPE" = xyes; then
60647     # Include file found, let's continue the sanity check.
60648     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60649 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60650 
60651     # Reset to default value
60652     FREETYPE_BASE_NAME=freetype
60653     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60654     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60655       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60656           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60657         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60658         # for the .6 version explicitly.
60659         FREETYPE_BASE_NAME=freetype.6
60660         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60661         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60662 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60663       else
60664         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60665 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60666         FOUND_FREETYPE=no
60667       fi
60668     else
60669       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60670         # On Windows, we will need both .lib and .dll file.
60671         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60672           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60673 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60674           FOUND_FREETYPE=no
60675         fi
60676       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60677           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60678         # Found lib in isa dir, use that instead.
60679         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60680         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60681 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60682       fi
60683     fi
60684   fi
60685 
60686   if test "x$FOUND_FREETYPE" = xyes; then
60687 
60688   # Only process if variable expands to non-empty
60689 
60690   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60691     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60692 
60693   # Input might be given as Windows format, start by converting to
60694   # unix format.
60695   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60696   new_path=`$CYGPATH -u "$path"`
60697 
60698   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60699   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60700   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60701   # "foo.exe" is OK but "foo" is an error.
60702   #
60703   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60704   # It is also a way to make sure we got the proper file name for the real test later on.
60705   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60706   if test "x$test_shortpath" = x; then
60707     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60708 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60709     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60710   fi
60711 
60712   # Call helper function which possibly converts this using DOS-style short mode.
60713   # If so, the updated path is stored in $new_path.
60714 
60715   input_path="$new_path"
60716   # Check if we need to convert this using DOS-style short mode. If the path
60717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60718   # take no chances and rewrite it.
60719   # Note: m4 eats our [], so we need to use [ and ] instead.
60720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60721   if test "x$has_forbidden_chars" != x; then
60722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60723     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60724     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60725     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60726       # Going to short mode and back again did indeed matter. Since short mode is
60727       # case insensitive, let's make it lowercase to improve readability.
60728       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60729       # Now convert it back to Unix-style (cygpath)
60730       input_path=`$CYGPATH -u "$shortmode_path"`
60731       new_path="$input_path"
60732     fi
60733   fi
60734 
60735   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60736   if test "x$test_cygdrive_prefix" = x; then
60737     # As a simple fix, exclude /usr/bin since it's not a real path.
60738     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60739       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60740       # a path prefixed by /cygdrive for fixpath to work.
60741       new_path="$CYGWIN_ROOT_PATH$input_path"
60742     fi
60743   fi
60744 
60745 
60746   if test "x$path" != "x$new_path"; then
60747     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60748     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60749 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60750   fi
60751 
60752     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60753 
60754   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60755   has_colon=`$ECHO $path | $GREP ^.:`
60756   new_path="$path"
60757   if test "x$has_colon" = x; then
60758     # Not in mixed or Windows style, start by that.
60759     new_path=`cmd //c echo $path`
60760   fi
60761 
60762 
60763   input_path="$new_path"
60764   # Check if we need to convert this using DOS-style short mode. If the path
60765   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60766   # take no chances and rewrite it.
60767   # Note: m4 eats our [], so we need to use [ and ] instead.
60768   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60769   if test "x$has_forbidden_chars" != x; then
60770     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60771     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60772   fi
60773 
60774 
60775   windows_path="$new_path"
60776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60777     unix_path=`$CYGPATH -u "$windows_path"`
60778     new_path="$unix_path"
60779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60781     new_path="$unix_path"
60782   fi
60783 
60784   if test "x$path" != "x$new_path"; then
60785     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60786     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60787 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60788   fi
60789 
60790   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60791   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60792 
60793     else
60794       # We're on a unix platform. Hooray! :)
60795       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60796       has_space=`$ECHO "$path" | $GREP " "`
60797       if test "x$has_space" != x; then
60798         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60799 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60800         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60801       fi
60802 
60803       # Use eval to expand a potential ~
60804       eval path="$path"
60805       if test ! -f "$path" && test ! -d "$path"; then
60806         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60807       fi
60808 
60809       if test -d "$path"; then
60810         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60811       else
60812         dir="`$DIRNAME "$path"`"
60813         base="`$BASENAME "$path"`"
60814         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60815       fi
60816     fi
60817   fi
60818 
60819 
60820   # Only process if variable expands to non-empty
60821 
60822   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60823     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60824 
60825   # Input might be given as Windows format, start by converting to
60826   # unix format.
60827   path="$POTENTIAL_FREETYPE_LIB_PATH"
60828   new_path=`$CYGPATH -u "$path"`
60829 
60830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60833   # "foo.exe" is OK but "foo" is an error.
60834   #
60835   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60836   # It is also a way to make sure we got the proper file name for the real test later on.
60837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60838   if test "x$test_shortpath" = x; then
60839     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60840 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60841     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60842   fi
60843 
60844   # Call helper function which possibly converts this using DOS-style short mode.
60845   # If so, the updated path is stored in $new_path.
60846 
60847   input_path="$new_path"
60848   # Check if we need to convert this using DOS-style short mode. If the path
60849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60850   # take no chances and rewrite it.
60851   # Note: m4 eats our [], so we need to use [ and ] instead.
60852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60853   if test "x$has_forbidden_chars" != x; then
60854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60858       # Going to short mode and back again did indeed matter. Since short mode is
60859       # case insensitive, let's make it lowercase to improve readability.
60860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60861       # Now convert it back to Unix-style (cygpath)
60862       input_path=`$CYGPATH -u "$shortmode_path"`
60863       new_path="$input_path"
60864     fi
60865   fi
60866 
60867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60868   if test "x$test_cygdrive_prefix" = x; then
60869     # As a simple fix, exclude /usr/bin since it's not a real path.
60870     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60872       # a path prefixed by /cygdrive for fixpath to work.
60873       new_path="$CYGWIN_ROOT_PATH$input_path"
60874     fi
60875   fi
60876 
60877 
60878   if test "x$path" != "x$new_path"; then
60879     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60881 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60882   fi
60883 
60884     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60885 
60886   path="$POTENTIAL_FREETYPE_LIB_PATH"
60887   has_colon=`$ECHO $path | $GREP ^.:`
60888   new_path="$path"
60889   if test "x$has_colon" = x; then
60890     # Not in mixed or Windows style, start by that.
60891     new_path=`cmd //c echo $path`
60892   fi
60893 
60894 
60895   input_path="$new_path"
60896   # Check if we need to convert this using DOS-style short mode. If the path
60897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60898   # take no chances and rewrite it.
60899   # Note: m4 eats our [], so we need to use [ and ] instead.
60900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60901   if test "x$has_forbidden_chars" != x; then
60902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60904   fi
60905 
60906 
60907   windows_path="$new_path"
60908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60909     unix_path=`$CYGPATH -u "$windows_path"`
60910     new_path="$unix_path"
60911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60913     new_path="$unix_path"
60914   fi
60915 
60916   if test "x$path" != "x$new_path"; then
60917     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60919 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60920   fi
60921 
60922   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60923   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60924 
60925     else
60926       # We're on a unix platform. Hooray! :)
60927       path="$POTENTIAL_FREETYPE_LIB_PATH"
60928       has_space=`$ECHO "$path" | $GREP " "`
60929       if test "x$has_space" != x; then
60930         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60931 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60932         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60933       fi
60934 
60935       # Use eval to expand a potential ~
60936       eval path="$path"
60937       if test ! -f "$path" && test ! -d "$path"; then
60938         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60939       fi
60940 
60941       if test -d "$path"; then
60942         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60943       else
60944         dir="`$DIRNAME "$path"`"
60945         base="`$BASENAME "$path"`"
60946         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60947       fi
60948     fi
60949   fi
60950 
60951 
60952     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60953     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60954 $as_echo_n "checking for freetype includes... " >&6; }
60955     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60956 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60957     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60958     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60959 $as_echo_n "checking for freetype libraries... " >&6; }
60960     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60961 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60962   fi
60963 
60964           fi
60965           if test "x$FOUND_FREETYPE" != xyes; then
60966             FREETYPE_BASE_DIR="$HOME/freetype"
60967 
60968   windows_path="$FREETYPE_BASE_DIR"
60969   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60970     unix_path=`$CYGPATH -u "$windows_path"`
60971     FREETYPE_BASE_DIR="$unix_path"
60972   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60973     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60974     FREETYPE_BASE_DIR="$unix_path"
60975   fi
60976 
60977             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60978 
60979   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60980   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60981   METHOD="well-known location"
60982 
60983   # Let's start with an optimistic view of the world :-)
60984   FOUND_FREETYPE=yes
60985 
60986   # First look for the canonical freetype main include file ft2build.h.
60987   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60988     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60989     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60990     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60991       # Fail.
60992       FOUND_FREETYPE=no
60993     fi
60994   fi
60995 
60996   if test "x$FOUND_FREETYPE" = xyes; then
60997     # Include file found, let's continue the sanity check.
60998     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60999 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61000 
61001     # Reset to default value
61002     FREETYPE_BASE_NAME=freetype
61003     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61004     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61005       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61006           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61007         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61008         # for the .6 version explicitly.
61009         FREETYPE_BASE_NAME=freetype.6
61010         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61011         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61012 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61013       else
61014         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61015 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61016         FOUND_FREETYPE=no
61017       fi
61018     else
61019       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61020         # On Windows, we will need both .lib and .dll file.
61021         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61022           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61023 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61024           FOUND_FREETYPE=no
61025         fi
61026       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61027           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61028         # Found lib in isa dir, use that instead.
61029         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61030         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61031 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61032       fi
61033     fi
61034   fi
61035 
61036   if test "x$FOUND_FREETYPE" = xyes; then
61037 
61038   # Only process if variable expands to non-empty
61039 
61040   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61041     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61042 
61043   # Input might be given as Windows format, start by converting to
61044   # unix format.
61045   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61046   new_path=`$CYGPATH -u "$path"`
61047 
61048   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61049   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61050   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61051   # "foo.exe" is OK but "foo" is an error.
61052   #
61053   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61054   # It is also a way to make sure we got the proper file name for the real test later on.
61055   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61056   if test "x$test_shortpath" = x; then
61057     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61058 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61059     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61060   fi
61061 
61062   # Call helper function which possibly converts this using DOS-style short mode.
61063   # If so, the updated path is stored in $new_path.
61064 
61065   input_path="$new_path"
61066   # Check if we need to convert this using DOS-style short mode. If the path
61067   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61068   # take no chances and rewrite it.
61069   # Note: m4 eats our [], so we need to use [ and ] instead.
61070   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61071   if test "x$has_forbidden_chars" != x; then
61072     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61073     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61074     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61075     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61076       # Going to short mode and back again did indeed matter. Since short mode is
61077       # case insensitive, let's make it lowercase to improve readability.
61078       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61079       # Now convert it back to Unix-style (cygpath)
61080       input_path=`$CYGPATH -u "$shortmode_path"`
61081       new_path="$input_path"
61082     fi
61083   fi
61084 
61085   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61086   if test "x$test_cygdrive_prefix" = x; then
61087     # As a simple fix, exclude /usr/bin since it's not a real path.
61088     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61089       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61090       # a path prefixed by /cygdrive for fixpath to work.
61091       new_path="$CYGWIN_ROOT_PATH$input_path"
61092     fi
61093   fi
61094 
61095 
61096   if test "x$path" != "x$new_path"; then
61097     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61099 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61100   fi
61101 
61102     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61103 
61104   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61105   has_colon=`$ECHO $path | $GREP ^.:`
61106   new_path="$path"
61107   if test "x$has_colon" = x; then
61108     # Not in mixed or Windows style, start by that.
61109     new_path=`cmd //c echo $path`
61110   fi
61111 
61112 
61113   input_path="$new_path"
61114   # Check if we need to convert this using DOS-style short mode. If the path
61115   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61116   # take no chances and rewrite it.
61117   # Note: m4 eats our [], so we need to use [ and ] instead.
61118   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61119   if test "x$has_forbidden_chars" != x; then
61120     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61121     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61122   fi
61123 
61124 
61125   windows_path="$new_path"
61126   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61127     unix_path=`$CYGPATH -u "$windows_path"`
61128     new_path="$unix_path"
61129   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61130     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61131     new_path="$unix_path"
61132   fi
61133 
61134   if test "x$path" != "x$new_path"; then
61135     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61137 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61138   fi
61139 
61140   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61141   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61142 
61143     else
61144       # We're on a unix platform. Hooray! :)
61145       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61146       has_space=`$ECHO "$path" | $GREP " "`
61147       if test "x$has_space" != x; then
61148         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61149 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61150         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61151       fi
61152 
61153       # Use eval to expand a potential ~
61154       eval path="$path"
61155       if test ! -f "$path" && test ! -d "$path"; then
61156         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61157       fi
61158 
61159       if test -d "$path"; then
61160         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61161       else
61162         dir="`$DIRNAME "$path"`"
61163         base="`$BASENAME "$path"`"
61164         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61165       fi
61166     fi
61167   fi
61168 
61169 
61170   # Only process if variable expands to non-empty
61171 
61172   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61173     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61174 
61175   # Input might be given as Windows format, start by converting to
61176   # unix format.
61177   path="$POTENTIAL_FREETYPE_LIB_PATH"
61178   new_path=`$CYGPATH -u "$path"`
61179 
61180   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61181   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61182   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61183   # "foo.exe" is OK but "foo" is an error.
61184   #
61185   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61186   # It is also a way to make sure we got the proper file name for the real test later on.
61187   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61188   if test "x$test_shortpath" = x; then
61189     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61190 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61191     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61192   fi
61193 
61194   # Call helper function which possibly converts this using DOS-style short mode.
61195   # If so, the updated path is stored in $new_path.
61196 
61197   input_path="$new_path"
61198   # Check if we need to convert this using DOS-style short mode. If the path
61199   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61200   # take no chances and rewrite it.
61201   # Note: m4 eats our [], so we need to use [ and ] instead.
61202   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61203   if test "x$has_forbidden_chars" != x; then
61204     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61205     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61206     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61207     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61208       # Going to short mode and back again did indeed matter. Since short mode is
61209       # case insensitive, let's make it lowercase to improve readability.
61210       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61211       # Now convert it back to Unix-style (cygpath)
61212       input_path=`$CYGPATH -u "$shortmode_path"`
61213       new_path="$input_path"
61214     fi
61215   fi
61216 
61217   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61218   if test "x$test_cygdrive_prefix" = x; then
61219     # As a simple fix, exclude /usr/bin since it's not a real path.
61220     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61221       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61222       # a path prefixed by /cygdrive for fixpath to work.
61223       new_path="$CYGWIN_ROOT_PATH$input_path"
61224     fi
61225   fi
61226 
61227 
61228   if test "x$path" != "x$new_path"; then
61229     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61230     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61231 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61232   fi
61233 
61234     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61235 
61236   path="$POTENTIAL_FREETYPE_LIB_PATH"
61237   has_colon=`$ECHO $path | $GREP ^.:`
61238   new_path="$path"
61239   if test "x$has_colon" = x; then
61240     # Not in mixed or Windows style, start by that.
61241     new_path=`cmd //c echo $path`
61242   fi
61243 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61254   fi
61255 
61256 
61257   windows_path="$new_path"
61258   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61259     unix_path=`$CYGPATH -u "$windows_path"`
61260     new_path="$unix_path"
61261   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61262     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61263     new_path="$unix_path"
61264   fi
61265 
61266   if test "x$path" != "x$new_path"; then
61267     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61269 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61270   fi
61271 
61272   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61273   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61274 
61275     else
61276       # We're on a unix platform. Hooray! :)
61277       path="$POTENTIAL_FREETYPE_LIB_PATH"
61278       has_space=`$ECHO "$path" | $GREP " "`
61279       if test "x$has_space" != x; then
61280         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61281 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61282         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61283       fi
61284 
61285       # Use eval to expand a potential ~
61286       eval path="$path"
61287       if test ! -f "$path" && test ! -d "$path"; then
61288         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61289       fi
61290 
61291       if test -d "$path"; then
61292         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61293       else
61294         dir="`$DIRNAME "$path"`"
61295         base="`$BASENAME "$path"`"
61296         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61297       fi
61298     fi
61299   fi
61300 
61301 
61302     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61303     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61304 $as_echo_n "checking for freetype includes... " >&6; }
61305     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61306 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61307     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61308     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61309 $as_echo_n "checking for freetype libraries... " >&6; }
61310     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61311 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61312   fi
61313 
61314             else
61315 
61316   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61317   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61318   METHOD="well-known location"
61319 
61320   # Let's start with an optimistic view of the world :-)
61321   FOUND_FREETYPE=yes
61322 
61323   # First look for the canonical freetype main include file ft2build.h.
61324   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61325     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61326     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61327     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61328       # Fail.
61329       FOUND_FREETYPE=no
61330     fi
61331   fi
61332 
61333   if test "x$FOUND_FREETYPE" = xyes; then
61334     # Include file found, let's continue the sanity check.
61335     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61336 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61337 
61338     # Reset to default value
61339     FREETYPE_BASE_NAME=freetype
61340     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61341     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61342       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61343           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61344         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61345         # for the .6 version explicitly.
61346         FREETYPE_BASE_NAME=freetype.6
61347         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61348         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61349 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61350       else
61351         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61352 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61353         FOUND_FREETYPE=no
61354       fi
61355     else
61356       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61357         # On Windows, we will need both .lib and .dll file.
61358         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61359           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61360 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61361           FOUND_FREETYPE=no
61362         fi
61363       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61364           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61365         # Found lib in isa dir, use that instead.
61366         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61367         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61368 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61369       fi
61370     fi
61371   fi
61372 
61373   if test "x$FOUND_FREETYPE" = xyes; then
61374 
61375   # Only process if variable expands to non-empty
61376 
61377   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61378     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61379 
61380   # Input might be given as Windows format, start by converting to
61381   # unix format.
61382   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61383   new_path=`$CYGPATH -u "$path"`
61384 
61385   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61386   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61387   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61388   # "foo.exe" is OK but "foo" is an error.
61389   #
61390   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61391   # It is also a way to make sure we got the proper file name for the real test later on.
61392   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61393   if test "x$test_shortpath" = x; then
61394     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61395 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61396     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61397   fi
61398 
61399   # Call helper function which possibly converts this using DOS-style short mode.
61400   # If so, the updated path is stored in $new_path.
61401 
61402   input_path="$new_path"
61403   # Check if we need to convert this using DOS-style short mode. If the path
61404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61405   # take no chances and rewrite it.
61406   # Note: m4 eats our [], so we need to use [ and ] instead.
61407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61408   if test "x$has_forbidden_chars" != x; then
61409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61413       # Going to short mode and back again did indeed matter. Since short mode is
61414       # case insensitive, let's make it lowercase to improve readability.
61415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61416       # Now convert it back to Unix-style (cygpath)
61417       input_path=`$CYGPATH -u "$shortmode_path"`
61418       new_path="$input_path"
61419     fi
61420   fi
61421 
61422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61423   if test "x$test_cygdrive_prefix" = x; then
61424     # As a simple fix, exclude /usr/bin since it's not a real path.
61425     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61427       # a path prefixed by /cygdrive for fixpath to work.
61428       new_path="$CYGWIN_ROOT_PATH$input_path"
61429     fi
61430   fi
61431 
61432 
61433   if test "x$path" != "x$new_path"; then
61434     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61436 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61437   fi
61438 
61439     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61440 
61441   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61442   has_colon=`$ECHO $path | $GREP ^.:`
61443   new_path="$path"
61444   if test "x$has_colon" = x; then
61445     # Not in mixed or Windows style, start by that.
61446     new_path=`cmd //c echo $path`
61447   fi
61448 
61449 
61450   input_path="$new_path"
61451   # Check if we need to convert this using DOS-style short mode. If the path
61452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61453   # take no chances and rewrite it.
61454   # Note: m4 eats our [], so we need to use [ and ] instead.
61455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61456   if test "x$has_forbidden_chars" != x; then
61457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61459   fi
61460 
61461 
61462   windows_path="$new_path"
61463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61464     unix_path=`$CYGPATH -u "$windows_path"`
61465     new_path="$unix_path"
61466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61468     new_path="$unix_path"
61469   fi
61470 
61471   if test "x$path" != "x$new_path"; then
61472     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61473     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61474 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61475   fi
61476 
61477   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61478   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61479 
61480     else
61481       # We're on a unix platform. Hooray! :)
61482       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61483       has_space=`$ECHO "$path" | $GREP " "`
61484       if test "x$has_space" != x; then
61485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61486 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61487         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61488       fi
61489 
61490       # Use eval to expand a potential ~
61491       eval path="$path"
61492       if test ! -f "$path" && test ! -d "$path"; then
61493         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61494       fi
61495 
61496       if test -d "$path"; then
61497         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61498       else
61499         dir="`$DIRNAME "$path"`"
61500         base="`$BASENAME "$path"`"
61501         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61502       fi
61503     fi
61504   fi
61505 
61506 
61507   # Only process if variable expands to non-empty
61508 
61509   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61510     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61511 
61512   # Input might be given as Windows format, start by converting to
61513   # unix format.
61514   path="$POTENTIAL_FREETYPE_LIB_PATH"
61515   new_path=`$CYGPATH -u "$path"`
61516 
61517   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61518   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61519   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61520   # "foo.exe" is OK but "foo" is an error.
61521   #
61522   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61523   # It is also a way to make sure we got the proper file name for the real test later on.
61524   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61525   if test "x$test_shortpath" = x; then
61526     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61527 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61528     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61529   fi
61530 
61531   # Call helper function which possibly converts this using DOS-style short mode.
61532   # If so, the updated path is stored in $new_path.
61533 
61534   input_path="$new_path"
61535   # Check if we need to convert this using DOS-style short mode. If the path
61536   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61537   # take no chances and rewrite it.
61538   # Note: m4 eats our [], so we need to use [ and ] instead.
61539   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61540   if test "x$has_forbidden_chars" != x; then
61541     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61542     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61543     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61544     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61545       # Going to short mode and back again did indeed matter. Since short mode is
61546       # case insensitive, let's make it lowercase to improve readability.
61547       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61548       # Now convert it back to Unix-style (cygpath)
61549       input_path=`$CYGPATH -u "$shortmode_path"`
61550       new_path="$input_path"
61551     fi
61552   fi
61553 
61554   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61555   if test "x$test_cygdrive_prefix" = x; then
61556     # As a simple fix, exclude /usr/bin since it's not a real path.
61557     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61558       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61559       # a path prefixed by /cygdrive for fixpath to work.
61560       new_path="$CYGWIN_ROOT_PATH$input_path"
61561     fi
61562   fi
61563 
61564 
61565   if test "x$path" != "x$new_path"; then
61566     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61567     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61568 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61569   fi
61570 
61571     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61572 
61573   path="$POTENTIAL_FREETYPE_LIB_PATH"
61574   has_colon=`$ECHO $path | $GREP ^.:`
61575   new_path="$path"
61576   if test "x$has_colon" = x; then
61577     # Not in mixed or Windows style, start by that.
61578     new_path=`cmd //c echo $path`
61579   fi
61580 
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61591   fi
61592 
61593 
61594   windows_path="$new_path"
61595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61596     unix_path=`$CYGPATH -u "$windows_path"`
61597     new_path="$unix_path"
61598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61600     new_path="$unix_path"
61601   fi
61602 
61603   if test "x$path" != "x$new_path"; then
61604     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61606 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61607   fi
61608 
61609   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61610   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61611 
61612     else
61613       # We're on a unix platform. Hooray! :)
61614       path="$POTENTIAL_FREETYPE_LIB_PATH"
61615       has_space=`$ECHO "$path" | $GREP " "`
61616       if test "x$has_space" != x; then
61617         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61618 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61619         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61620       fi
61621 
61622       # Use eval to expand a potential ~
61623       eval path="$path"
61624       if test ! -f "$path" && test ! -d "$path"; then
61625         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61626       fi
61627 
61628       if test -d "$path"; then
61629         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61630       else
61631         dir="`$DIRNAME "$path"`"
61632         base="`$BASENAME "$path"`"
61633         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61634       fi
61635     fi
61636   fi
61637 
61638 
61639     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61640     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61641 $as_echo_n "checking for freetype includes... " >&6; }
61642     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61643 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61644     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61645     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61646 $as_echo_n "checking for freetype libraries... " >&6; }
61647     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61648 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61649   fi
61650 
61651             fi
61652             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
61653                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
61654               # Source is available, as a last resort try to build freetype in default location
61655 
61656   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
61657   BUILD_FREETYPE=yes
61658 
61659   # Check if the freetype sources are acessible..
61660   if ! test -d $FREETYPE_SRC_PATH; then
61661     { $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
61662 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
61663     BUILD_FREETYPE=no
61664   fi
61665   # ..and contain a vc2010 project file
61666   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
61667   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
61668     { $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
61669 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
61670     BUILD_FREETYPE=no
61671   fi
61672   # Now check if configure found a version of 'msbuild.exe'
61673   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
61674     { $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
61675 $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;}
61676     BUILD_FREETYPE=no
61677   fi
61678 
61679   # Ready to go..
61680   if test "x$BUILD_FREETYPE" = xyes; then
61681     # msbuild requires trailing slashes for output directories
61682     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
61683     freetype_lib_path_unix="$freetype_lib_path"
61684     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
61685 
61686   unix_path="$vcxproj_path"
61687   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61688     windows_path=`$CYGPATH -m "$unix_path"`
61689     vcxproj_path="$windows_path"
61690   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61691     windows_path=`cmd //c echo $unix_path`
61692     vcxproj_path="$windows_path"
61693   fi
61694 
61695 
61696   unix_path="$freetype_lib_path"
61697   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61698     windows_path=`$CYGPATH -m "$unix_path"`
61699     freetype_lib_path="$windows_path"
61700   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61701     windows_path=`cmd //c echo $unix_path`
61702     freetype_lib_path="$windows_path"
61703   fi
61704 
61705 
61706   unix_path="$freetype_obj_path"
61707   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61708     windows_path=`$CYGPATH -m "$unix_path"`
61709     freetype_obj_path="$windows_path"
61710   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61711     windows_path=`cmd //c echo $unix_path`
61712     freetype_obj_path="$windows_path"
61713   fi
61714 
61715     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61716       freetype_platform=x64
61717     else
61718       freetype_platform=win32
61719     fi
61720 
61721     # The original freetype project file is for VS 2010 (i.e. 'v100'),
61722     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
61723     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
61724     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
61725     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
61726 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
61727 
61728     # First we try to build the freetype.dll
61729     $ECHO -e "@echo off\n"\
61730         "$MSBUILD $vcxproj_path "\
61731         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
61732         "/p:Configuration=\"Release Multithreaded\" "\
61733         "/p:Platform=$freetype_platform "\
61734         "/p:ConfigurationType=DynamicLibrary "\
61735         "/p:TargetName=freetype "\
61736         "/p:OutDir=\"$freetype_lib_path\" "\
61737         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
61738     cmd /c freetype.bat
61739 
61740     if test -s "$freetype_lib_path_unix/freetype.dll"; then
61741       # If that succeeds we also build freetype.lib
61742       $ECHO -e "@echo off\n"\
61743           "$MSBUILD $vcxproj_path "\
61744           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
61745           "/p:Configuration=\"Release Multithreaded\" "\
61746           "/p:Platform=$freetype_platform "\
61747           "/p:ConfigurationType=StaticLibrary "\
61748           "/p:TargetName=freetype "\
61749           "/p:OutDir=\"$freetype_lib_path\" "\
61750           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
61751       cmd /c freetype.bat
61752 
61753       if test -s "$freetype_lib_path_unix/freetype.lib"; then
61754         # Once we build both, lib and dll, set freetype lib and include path appropriately
61755         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
61756         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
61757         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
61758 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
61759       else
61760         BUILD_FREETYPE=no
61761       fi
61762     else
61763       BUILD_FREETYPE=no
61764     fi
61765   fi
61766 
61767               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61768 
61769   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61770   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
61771   METHOD="well-known location"
61772 
61773   # Let's start with an optimistic view of the world :-)
61774   FOUND_FREETYPE=yes
61775 
61776   # First look for the canonical freetype main include file ft2build.h.
61777   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61778     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61779     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61780     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61781       # Fail.
61782       FOUND_FREETYPE=no
61783     fi
61784   fi
61785 
61786   if test "x$FOUND_FREETYPE" = xyes; then
61787     # Include file found, let's continue the sanity check.
61788     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61789 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61790 
61791     # Reset to default value
61792     FREETYPE_BASE_NAME=freetype
61793     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61794     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61795       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61796           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61797         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61798         # for the .6 version explicitly.
61799         FREETYPE_BASE_NAME=freetype.6
61800         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61801         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61802 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61803       else
61804         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61805 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61806         FOUND_FREETYPE=no
61807       fi
61808     else
61809       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61810         # On Windows, we will need both .lib and .dll file.
61811         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61812           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61813 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61814           FOUND_FREETYPE=no
61815         fi
61816       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61817           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61818         # Found lib in isa dir, use that instead.
61819         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61820         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61821 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61822       fi
61823     fi
61824   fi
61825 
61826   if test "x$FOUND_FREETYPE" = xyes; then
61827 
61828   # Only process if variable expands to non-empty
61829 
61830   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61831     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61832 
61833   # Input might be given as Windows format, start by converting to
61834   # unix format.
61835   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61836   new_path=`$CYGPATH -u "$path"`
61837 
61838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61841   # "foo.exe" is OK but "foo" is an error.
61842   #
61843   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61844   # It is also a way to make sure we got the proper file name for the real test later on.
61845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61846   if test "x$test_shortpath" = x; then
61847     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61848 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61849     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61850   fi
61851 
61852   # Call helper function which possibly converts this using DOS-style short mode.
61853   # If so, the updated path is stored in $new_path.
61854 
61855   input_path="$new_path"
61856   # Check if we need to convert this using DOS-style short mode. If the path
61857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61858   # take no chances and rewrite it.
61859   # Note: m4 eats our [], so we need to use [ and ] instead.
61860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61861   if test "x$has_forbidden_chars" != x; then
61862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61863     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61864     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61865     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61866       # Going to short mode and back again did indeed matter. Since short mode is
61867       # case insensitive, let's make it lowercase to improve readability.
61868       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61869       # Now convert it back to Unix-style (cygpath)
61870       input_path=`$CYGPATH -u "$shortmode_path"`
61871       new_path="$input_path"
61872     fi
61873   fi
61874 
61875   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61876   if test "x$test_cygdrive_prefix" = x; then
61877     # As a simple fix, exclude /usr/bin since it's not a real path.
61878     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61879       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61880       # a path prefixed by /cygdrive for fixpath to work.
61881       new_path="$CYGWIN_ROOT_PATH$input_path"
61882     fi
61883   fi
61884 
61885 
61886   if test "x$path" != "x$new_path"; then
61887     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61889 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61890   fi
61891 
61892     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61893 
61894   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61895   has_colon=`$ECHO $path | $GREP ^.:`
61896   new_path="$path"
61897   if test "x$has_colon" = x; then
61898     # Not in mixed or Windows style, start by that.
61899     new_path=`cmd //c echo $path`
61900   fi
61901 
61902 
61903   input_path="$new_path"
61904   # Check if we need to convert this using DOS-style short mode. If the path
61905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61906   # take no chances and rewrite it.
61907   # Note: m4 eats our [], so we need to use [ and ] instead.
61908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61909   if test "x$has_forbidden_chars" != x; then
61910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61912   fi
61913 
61914 
61915   windows_path="$new_path"
61916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61917     unix_path=`$CYGPATH -u "$windows_path"`
61918     new_path="$unix_path"
61919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61921     new_path="$unix_path"
61922   fi
61923 
61924   if test "x$path" != "x$new_path"; then
61925     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61926     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61927 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61928   fi
61929 
61930   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61931   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61932 
61933     else
61934       # We're on a unix platform. Hooray! :)
61935       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61936       has_space=`$ECHO "$path" | $GREP " "`
61937       if test "x$has_space" != x; then
61938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61939 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61940         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61941       fi
61942 
61943       # Use eval to expand a potential ~
61944       eval path="$path"
61945       if test ! -f "$path" && test ! -d "$path"; then
61946         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61947       fi
61948 
61949       if test -d "$path"; then
61950         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61951       else
61952         dir="`$DIRNAME "$path"`"
61953         base="`$BASENAME "$path"`"
61954         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61955       fi
61956     fi
61957   fi
61958 
61959 
61960   # Only process if variable expands to non-empty
61961 
61962   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61963     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61964 
61965   # Input might be given as Windows format, start by converting to
61966   # unix format.
61967   path="$POTENTIAL_FREETYPE_LIB_PATH"
61968   new_path=`$CYGPATH -u "$path"`
61969 
61970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61973   # "foo.exe" is OK but "foo" is an error.
61974   #
61975   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61976   # It is also a way to make sure we got the proper file name for the real test later on.
61977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61978   if test "x$test_shortpath" = x; then
61979     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61980 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61981     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61982   fi
61983 
61984   # Call helper function which possibly converts this using DOS-style short mode.
61985   # If so, the updated path is stored in $new_path.
61986 
61987   input_path="$new_path"
61988   # Check if we need to convert this using DOS-style short mode. If the path
61989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61990   # take no chances and rewrite it.
61991   # Note: m4 eats our [], so we need to use [ and ] instead.
61992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61993   if test "x$has_forbidden_chars" != x; then
61994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61998       # Going to short mode and back again did indeed matter. Since short mode is
61999       # case insensitive, let's make it lowercase to improve readability.
62000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62001       # Now convert it back to Unix-style (cygpath)
62002       input_path=`$CYGPATH -u "$shortmode_path"`
62003       new_path="$input_path"
62004     fi
62005   fi
62006 
62007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62008   if test "x$test_cygdrive_prefix" = x; then
62009     # As a simple fix, exclude /usr/bin since it's not a real path.
62010     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62012       # a path prefixed by /cygdrive for fixpath to work.
62013       new_path="$CYGWIN_ROOT_PATH$input_path"
62014     fi
62015   fi
62016 
62017 
62018   if test "x$path" != "x$new_path"; then
62019     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62022   fi
62023 
62024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62025 
62026   path="$POTENTIAL_FREETYPE_LIB_PATH"
62027   has_colon=`$ECHO $path | $GREP ^.:`
62028   new_path="$path"
62029   if test "x$has_colon" = x; then
62030     # Not in mixed or Windows style, start by that.
62031     new_path=`cmd //c echo $path`
62032   fi
62033 
62034 
62035   input_path="$new_path"
62036   # Check if we need to convert this using DOS-style short mode. If the path
62037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62038   # take no chances and rewrite it.
62039   # Note: m4 eats our [], so we need to use [ and ] instead.
62040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62041   if test "x$has_forbidden_chars" != x; then
62042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62044   fi
62045 
62046 
62047   windows_path="$new_path"
62048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62049     unix_path=`$CYGPATH -u "$windows_path"`
62050     new_path="$unix_path"
62051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62053     new_path="$unix_path"
62054   fi
62055 
62056   if test "x$path" != "x$new_path"; then
62057     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62059 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62060   fi
62061 
62062   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62063   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62064 
62065     else
62066       # We're on a unix platform. Hooray! :)
62067       path="$POTENTIAL_FREETYPE_LIB_PATH"
62068       has_space=`$ECHO "$path" | $GREP " "`
62069       if test "x$has_space" != x; then
62070         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62072         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62073       fi
62074 
62075       # Use eval to expand a potential ~
62076       eval path="$path"
62077       if test ! -f "$path" && test ! -d "$path"; then
62078         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62079       fi
62080 
62081       if test -d "$path"; then
62082         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62083       else
62084         dir="`$DIRNAME "$path"`"
62085         base="`$BASENAME "$path"`"
62086         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62087       fi
62088     fi
62089   fi
62090 
62091 
62092     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62094 $as_echo_n "checking for freetype includes... " >&6; }
62095     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62096 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62097     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62099 $as_echo_n "checking for freetype libraries... " >&6; }
62100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62101 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62102   fi
62103 
62104               else
62105 
62106   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62107   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62108   METHOD="well-known location"
62109 
62110   # Let's start with an optimistic view of the world :-)
62111   FOUND_FREETYPE=yes
62112 
62113   # First look for the canonical freetype main include file ft2build.h.
62114   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62115     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62116     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62117     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62118       # Fail.
62119       FOUND_FREETYPE=no
62120     fi
62121   fi
62122 
62123   if test "x$FOUND_FREETYPE" = xyes; then
62124     # Include file found, let's continue the sanity check.
62125     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62126 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62127 
62128     # Reset to default value
62129     FREETYPE_BASE_NAME=freetype
62130     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62131     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62132       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62133           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62134         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62135         # for the .6 version explicitly.
62136         FREETYPE_BASE_NAME=freetype.6
62137         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62138         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62139 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62140       else
62141         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62142 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62143         FOUND_FREETYPE=no
62144       fi
62145     else
62146       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62147         # On Windows, we will need both .lib and .dll file.
62148         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62149           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62150 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62151           FOUND_FREETYPE=no
62152         fi
62153       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62154           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62155         # Found lib in isa dir, use that instead.
62156         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62157         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62158 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62159       fi
62160     fi
62161   fi
62162 
62163   if test "x$FOUND_FREETYPE" = xyes; then
62164 
62165   # Only process if variable expands to non-empty
62166 
62167   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62168     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62169 
62170   # Input might be given as Windows format, start by converting to
62171   # unix format.
62172   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62173   new_path=`$CYGPATH -u "$path"`
62174 
62175   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62176   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62177   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62178   # "foo.exe" is OK but "foo" is an error.
62179   #
62180   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62181   # It is also a way to make sure we got the proper file name for the real test later on.
62182   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62183   if test "x$test_shortpath" = x; then
62184     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62185 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62186     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62187   fi
62188 
62189   # Call helper function which possibly converts this using DOS-style short mode.
62190   # If so, the updated path is stored in $new_path.
62191 
62192   input_path="$new_path"
62193   # Check if we need to convert this using DOS-style short mode. If the path
62194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62195   # take no chances and rewrite it.
62196   # Note: m4 eats our [], so we need to use [ and ] instead.
62197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62198   if test "x$has_forbidden_chars" != x; then
62199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62203       # Going to short mode and back again did indeed matter. Since short mode is
62204       # case insensitive, let's make it lowercase to improve readability.
62205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62206       # Now convert it back to Unix-style (cygpath)
62207       input_path=`$CYGPATH -u "$shortmode_path"`
62208       new_path="$input_path"
62209     fi
62210   fi
62211 
62212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62213   if test "x$test_cygdrive_prefix" = x; then
62214     # As a simple fix, exclude /usr/bin since it's not a real path.
62215     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62217       # a path prefixed by /cygdrive for fixpath to work.
62218       new_path="$CYGWIN_ROOT_PATH$input_path"
62219     fi
62220   fi
62221 
62222 
62223   if test "x$path" != "x$new_path"; then
62224     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62226 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62227   fi
62228 
62229     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62230 
62231   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62232   has_colon=`$ECHO $path | $GREP ^.:`
62233   new_path="$path"
62234   if test "x$has_colon" = x; then
62235     # Not in mixed or Windows style, start by that.
62236     new_path=`cmd //c echo $path`
62237   fi
62238 
62239 
62240   input_path="$new_path"
62241   # Check if we need to convert this using DOS-style short mode. If the path
62242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62243   # take no chances and rewrite it.
62244   # Note: m4 eats our [], so we need to use [ and ] instead.
62245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62246   if test "x$has_forbidden_chars" != x; then
62247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62248     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62249   fi
62250 
62251 
62252   windows_path="$new_path"
62253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62254     unix_path=`$CYGPATH -u "$windows_path"`
62255     new_path="$unix_path"
62256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62258     new_path="$unix_path"
62259   fi
62260 
62261   if test "x$path" != "x$new_path"; then
62262     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62264 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62265   fi
62266 
62267   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62268   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62269 
62270     else
62271       # We're on a unix platform. Hooray! :)
62272       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62273       has_space=`$ECHO "$path" | $GREP " "`
62274       if test "x$has_space" != x; then
62275         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62276 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62277         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62278       fi
62279 
62280       # Use eval to expand a potential ~
62281       eval path="$path"
62282       if test ! -f "$path" && test ! -d "$path"; then
62283         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62284       fi
62285 
62286       if test -d "$path"; then
62287         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62288       else
62289         dir="`$DIRNAME "$path"`"
62290         base="`$BASENAME "$path"`"
62291         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62292       fi
62293     fi
62294   fi
62295 
62296 
62297   # Only process if variable expands to non-empty
62298 
62299   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62300     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62301 
62302   # Input might be given as Windows format, start by converting to
62303   # unix format.
62304   path="$POTENTIAL_FREETYPE_LIB_PATH"
62305   new_path=`$CYGPATH -u "$path"`
62306 
62307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62310   # "foo.exe" is OK but "foo" is an error.
62311   #
62312   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62313   # It is also a way to make sure we got the proper file name for the real test later on.
62314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62315   if test "x$test_shortpath" = x; then
62316     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62317 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62318     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62319   fi
62320 
62321   # Call helper function which possibly converts this using DOS-style short mode.
62322   # If so, the updated path is stored in $new_path.
62323 
62324   input_path="$new_path"
62325   # Check if we need to convert this using DOS-style short mode. If the path
62326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62327   # take no chances and rewrite it.
62328   # Note: m4 eats our [], so we need to use [ and ] instead.
62329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62330   if test "x$has_forbidden_chars" != x; then
62331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62332     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62333     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62334     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62335       # Going to short mode and back again did indeed matter. Since short mode is
62336       # case insensitive, let's make it lowercase to improve readability.
62337       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62338       # Now convert it back to Unix-style (cygpath)
62339       input_path=`$CYGPATH -u "$shortmode_path"`
62340       new_path="$input_path"
62341     fi
62342   fi
62343 
62344   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62345   if test "x$test_cygdrive_prefix" = x; then
62346     # As a simple fix, exclude /usr/bin since it's not a real path.
62347     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62348       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62349       # a path prefixed by /cygdrive for fixpath to work.
62350       new_path="$CYGWIN_ROOT_PATH$input_path"
62351     fi
62352   fi
62353 
62354 
62355   if test "x$path" != "x$new_path"; then
62356     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62358 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62359   fi
62360 
62361     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62362 
62363   path="$POTENTIAL_FREETYPE_LIB_PATH"
62364   has_colon=`$ECHO $path | $GREP ^.:`
62365   new_path="$path"
62366   if test "x$has_colon" = x; then
62367     # Not in mixed or Windows style, start by that.
62368     new_path=`cmd //c echo $path`
62369   fi
62370 
62371 
62372   input_path="$new_path"
62373   # Check if we need to convert this using DOS-style short mode. If the path
62374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62375   # take no chances and rewrite it.
62376   # Note: m4 eats our [], so we need to use [ and ] instead.
62377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62378   if test "x$has_forbidden_chars" != x; then
62379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62381   fi
62382 
62383 
62384   windows_path="$new_path"
62385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62386     unix_path=`$CYGPATH -u "$windows_path"`
62387     new_path="$unix_path"
62388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62390     new_path="$unix_path"
62391   fi
62392 
62393   if test "x$path" != "x$new_path"; then
62394     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62396 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62397   fi
62398 
62399   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62400   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62401 
62402     else
62403       # We're on a unix platform. Hooray! :)
62404       path="$POTENTIAL_FREETYPE_LIB_PATH"
62405       has_space=`$ECHO "$path" | $GREP " "`
62406       if test "x$has_space" != x; then
62407         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62408 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62409         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62410       fi
62411 
62412       # Use eval to expand a potential ~
62413       eval path="$path"
62414       if test ! -f "$path" && test ! -d "$path"; then
62415         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62416       fi
62417 
62418       if test -d "$path"; then
62419         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62420       else
62421         dir="`$DIRNAME "$path"`"
62422         base="`$BASENAME "$path"`"
62423         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62424       fi
62425     fi
62426   fi
62427 
62428 
62429     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62431 $as_echo_n "checking for freetype includes... " >&6; }
62432     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62433 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62434     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62436 $as_echo_n "checking for freetype libraries... " >&6; }
62437     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62438 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62439   fi
62440 
62441               fi
62442             fi
62443           fi
62444         else
62445           FREETYPE_BASE_DIR="$SYSROOT/usr"
62446 
62447   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62448   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62449   METHOD="well-known location"
62450 
62451   # Let's start with an optimistic view of the world :-)
62452   FOUND_FREETYPE=yes
62453 
62454   # First look for the canonical freetype main include file ft2build.h.
62455   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62456     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62457     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62458     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62459       # Fail.
62460       FOUND_FREETYPE=no
62461     fi
62462   fi
62463 
62464   if test "x$FOUND_FREETYPE" = xyes; then
62465     # Include file found, let's continue the sanity check.
62466     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62467 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62468 
62469     # Reset to default value
62470     FREETYPE_BASE_NAME=freetype
62471     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62472     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62473       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62474           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62475         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62476         # for the .6 version explicitly.
62477         FREETYPE_BASE_NAME=freetype.6
62478         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62479         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62480 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62481       else
62482         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62483 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62484         FOUND_FREETYPE=no
62485       fi
62486     else
62487       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62488         # On Windows, we will need both .lib and .dll file.
62489         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62490           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62491 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62492           FOUND_FREETYPE=no
62493         fi
62494       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62495           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62496         # Found lib in isa dir, use that instead.
62497         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62498         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62499 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62500       fi
62501     fi
62502   fi
62503 
62504   if test "x$FOUND_FREETYPE" = xyes; then
62505 
62506   # Only process if variable expands to non-empty
62507 
62508   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62509     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62510 
62511   # Input might be given as Windows format, start by converting to
62512   # unix format.
62513   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62514   new_path=`$CYGPATH -u "$path"`
62515 
62516   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62517   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62518   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62519   # "foo.exe" is OK but "foo" is an error.
62520   #
62521   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62522   # It is also a way to make sure we got the proper file name for the real test later on.
62523   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62524   if test "x$test_shortpath" = x; then
62525     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62526 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62527     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62528   fi
62529 
62530   # Call helper function which possibly converts this using DOS-style short mode.
62531   # If so, the updated path is stored in $new_path.
62532 
62533   input_path="$new_path"
62534   # Check if we need to convert this using DOS-style short mode. If the path
62535   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62536   # take no chances and rewrite it.
62537   # Note: m4 eats our [], so we need to use [ and ] instead.
62538   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62539   if test "x$has_forbidden_chars" != x; then
62540     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62541     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62542     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62543     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62544       # Going to short mode and back again did indeed matter. Since short mode is
62545       # case insensitive, let's make it lowercase to improve readability.
62546       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62547       # Now convert it back to Unix-style (cygpath)
62548       input_path=`$CYGPATH -u "$shortmode_path"`
62549       new_path="$input_path"
62550     fi
62551   fi
62552 
62553   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62554   if test "x$test_cygdrive_prefix" = x; then
62555     # As a simple fix, exclude /usr/bin since it's not a real path.
62556     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62557       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62558       # a path prefixed by /cygdrive for fixpath to work.
62559       new_path="$CYGWIN_ROOT_PATH$input_path"
62560     fi
62561   fi
62562 
62563 
62564   if test "x$path" != "x$new_path"; then
62565     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62567 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62568   fi
62569 
62570     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62571 
62572   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62573   has_colon=`$ECHO $path | $GREP ^.:`
62574   new_path="$path"
62575   if test "x$has_colon" = x; then
62576     # Not in mixed or Windows style, start by that.
62577     new_path=`cmd //c echo $path`
62578   fi
62579 
62580 
62581   input_path="$new_path"
62582   # Check if we need to convert this using DOS-style short mode. If the path
62583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62584   # take no chances and rewrite it.
62585   # Note: m4 eats our [], so we need to use [ and ] instead.
62586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62587   if test "x$has_forbidden_chars" != x; then
62588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62589     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62590   fi
62591 
62592 
62593   windows_path="$new_path"
62594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62595     unix_path=`$CYGPATH -u "$windows_path"`
62596     new_path="$unix_path"
62597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62599     new_path="$unix_path"
62600   fi
62601 
62602   if test "x$path" != "x$new_path"; then
62603     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62604     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62605 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62606   fi
62607 
62608   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62609   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62610 
62611     else
62612       # We're on a unix platform. Hooray! :)
62613       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62614       has_space=`$ECHO "$path" | $GREP " "`
62615       if test "x$has_space" != x; then
62616         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62617 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62618         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62619       fi
62620 
62621       # Use eval to expand a potential ~
62622       eval path="$path"
62623       if test ! -f "$path" && test ! -d "$path"; then
62624         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62625       fi
62626 
62627       if test -d "$path"; then
62628         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62629       else
62630         dir="`$DIRNAME "$path"`"
62631         base="`$BASENAME "$path"`"
62632         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62633       fi
62634     fi
62635   fi
62636 
62637 
62638   # Only process if variable expands to non-empty
62639 
62640   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62641     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62642 
62643   # Input might be given as Windows format, start by converting to
62644   # unix format.
62645   path="$POTENTIAL_FREETYPE_LIB_PATH"
62646   new_path=`$CYGPATH -u "$path"`
62647 
62648   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62649   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62650   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62651   # "foo.exe" is OK but "foo" is an error.
62652   #
62653   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62654   # It is also a way to make sure we got the proper file name for the real test later on.
62655   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62656   if test "x$test_shortpath" = x; then
62657     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62658 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62659     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62660   fi
62661 
62662   # Call helper function which possibly converts this using DOS-style short mode.
62663   # If so, the updated path is stored in $new_path.
62664 
62665   input_path="$new_path"
62666   # Check if we need to convert this using DOS-style short mode. If the path
62667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62668   # take no chances and rewrite it.
62669   # Note: m4 eats our [], so we need to use [ and ] instead.
62670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62671   if test "x$has_forbidden_chars" != x; then
62672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62676       # Going to short mode and back again did indeed matter. Since short mode is
62677       # case insensitive, let's make it lowercase to improve readability.
62678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62679       # Now convert it back to Unix-style (cygpath)
62680       input_path=`$CYGPATH -u "$shortmode_path"`
62681       new_path="$input_path"
62682     fi
62683   fi
62684 
62685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62686   if test "x$test_cygdrive_prefix" = x; then
62687     # As a simple fix, exclude /usr/bin since it's not a real path.
62688     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62690       # a path prefixed by /cygdrive for fixpath to work.
62691       new_path="$CYGWIN_ROOT_PATH$input_path"
62692     fi
62693   fi
62694 
62695 
62696   if test "x$path" != "x$new_path"; then
62697     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62699 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62700   fi
62701 
62702     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62703 
62704   path="$POTENTIAL_FREETYPE_LIB_PATH"
62705   has_colon=`$ECHO $path | $GREP ^.:`
62706   new_path="$path"
62707   if test "x$has_colon" = x; then
62708     # Not in mixed or Windows style, start by that.
62709     new_path=`cmd //c echo $path`
62710   fi
62711 
62712 
62713   input_path="$new_path"
62714   # Check if we need to convert this using DOS-style short mode. If the path
62715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62716   # take no chances and rewrite it.
62717   # Note: m4 eats our [], so we need to use [ and ] instead.
62718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62719   if test "x$has_forbidden_chars" != x; then
62720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62722   fi
62723 
62724 
62725   windows_path="$new_path"
62726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62727     unix_path=`$CYGPATH -u "$windows_path"`
62728     new_path="$unix_path"
62729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62731     new_path="$unix_path"
62732   fi
62733 
62734   if test "x$path" != "x$new_path"; then
62735     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62737 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62738   fi
62739 
62740   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62741   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62742 
62743     else
62744       # We're on a unix platform. Hooray! :)
62745       path="$POTENTIAL_FREETYPE_LIB_PATH"
62746       has_space=`$ECHO "$path" | $GREP " "`
62747       if test "x$has_space" != x; then
62748         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62749 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62750         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62751       fi
62752 
62753       # Use eval to expand a potential ~
62754       eval path="$path"
62755       if test ! -f "$path" && test ! -d "$path"; then
62756         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62757       fi
62758 
62759       if test -d "$path"; then
62760         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62761       else
62762         dir="`$DIRNAME "$path"`"
62763         base="`$BASENAME "$path"`"
62764         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62765       fi
62766     fi
62767   fi
62768 
62769 
62770     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62771     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62772 $as_echo_n "checking for freetype includes... " >&6; }
62773     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62774 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62775     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62776     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62777 $as_echo_n "checking for freetype libraries... " >&6; }
62778     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62779 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62780   fi
62781 
62782 
62783           if test "x$FOUND_FREETYPE" != xyes; then
62784             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
62785 
62786   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62787   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62788   METHOD="well-known location"
62789 
62790   # Let's start with an optimistic view of the world :-)
62791   FOUND_FREETYPE=yes
62792 
62793   # First look for the canonical freetype main include file ft2build.h.
62794   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62795     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62796     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62797     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62798       # Fail.
62799       FOUND_FREETYPE=no
62800     fi
62801   fi
62802 
62803   if test "x$FOUND_FREETYPE" = xyes; then
62804     # Include file found, let's continue the sanity check.
62805     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62806 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62807 
62808     # Reset to default value
62809     FREETYPE_BASE_NAME=freetype
62810     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62811     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62812       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62813           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62814         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62815         # for the .6 version explicitly.
62816         FREETYPE_BASE_NAME=freetype.6
62817         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62818         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62819 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62820       else
62821         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62822 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62823         FOUND_FREETYPE=no
62824       fi
62825     else
62826       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62827         # On Windows, we will need both .lib and .dll file.
62828         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62829           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62830 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62831           FOUND_FREETYPE=no
62832         fi
62833       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62834           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62835         # Found lib in isa dir, use that instead.
62836         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62837         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62838 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62839       fi
62840     fi
62841   fi
62842 
62843   if test "x$FOUND_FREETYPE" = xyes; then
62844 
62845   # Only process if variable expands to non-empty
62846 
62847   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62848     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62849 
62850   # Input might be given as Windows format, start by converting to
62851   # unix format.
62852   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62853   new_path=`$CYGPATH -u "$path"`
62854 
62855   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62856   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62857   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62858   # "foo.exe" is OK but "foo" is an error.
62859   #
62860   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62861   # It is also a way to make sure we got the proper file name for the real test later on.
62862   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62863   if test "x$test_shortpath" = x; then
62864     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62865 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62866     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62867   fi
62868 
62869   # Call helper function which possibly converts this using DOS-style short mode.
62870   # If so, the updated path is stored in $new_path.
62871 
62872   input_path="$new_path"
62873   # Check if we need to convert this using DOS-style short mode. If the path
62874   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62875   # take no chances and rewrite it.
62876   # Note: m4 eats our [], so we need to use [ and ] instead.
62877   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62878   if test "x$has_forbidden_chars" != x; then
62879     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62880     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62881     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62882     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62883       # Going to short mode and back again did indeed matter. Since short mode is
62884       # case insensitive, let's make it lowercase to improve readability.
62885       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62886       # Now convert it back to Unix-style (cygpath)
62887       input_path=`$CYGPATH -u "$shortmode_path"`
62888       new_path="$input_path"
62889     fi
62890   fi
62891 
62892   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62893   if test "x$test_cygdrive_prefix" = x; then
62894     # As a simple fix, exclude /usr/bin since it's not a real path.
62895     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62896       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62897       # a path prefixed by /cygdrive for fixpath to work.
62898       new_path="$CYGWIN_ROOT_PATH$input_path"
62899     fi
62900   fi
62901 
62902 
62903   if test "x$path" != "x$new_path"; then
62904     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62906 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62907   fi
62908 
62909     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62910 
62911   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62912   has_colon=`$ECHO $path | $GREP ^.:`
62913   new_path="$path"
62914   if test "x$has_colon" = x; then
62915     # Not in mixed or Windows style, start by that.
62916     new_path=`cmd //c echo $path`
62917   fi
62918 
62919 
62920   input_path="$new_path"
62921   # Check if we need to convert this using DOS-style short mode. If the path
62922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62923   # take no chances and rewrite it.
62924   # Note: m4 eats our [], so we need to use [ and ] instead.
62925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62926   if test "x$has_forbidden_chars" != x; then
62927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62928     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62929   fi
62930 
62931 
62932   windows_path="$new_path"
62933   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62934     unix_path=`$CYGPATH -u "$windows_path"`
62935     new_path="$unix_path"
62936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62937     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62938     new_path="$unix_path"
62939   fi
62940 
62941   if test "x$path" != "x$new_path"; then
62942     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62943     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62944 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62945   fi
62946 
62947   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62948   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62949 
62950     else
62951       # We're on a unix platform. Hooray! :)
62952       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62953       has_space=`$ECHO "$path" | $GREP " "`
62954       if test "x$has_space" != x; then
62955         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62956 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62957         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62958       fi
62959 
62960       # Use eval to expand a potential ~
62961       eval path="$path"
62962       if test ! -f "$path" && test ! -d "$path"; then
62963         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62964       fi
62965 
62966       if test -d "$path"; then
62967         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62968       else
62969         dir="`$DIRNAME "$path"`"
62970         base="`$BASENAME "$path"`"
62971         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62972       fi
62973     fi
62974   fi
62975 
62976 
62977   # Only process if variable expands to non-empty
62978 
62979   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62980     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62981 
62982   # Input might be given as Windows format, start by converting to
62983   # unix format.
62984   path="$POTENTIAL_FREETYPE_LIB_PATH"
62985   new_path=`$CYGPATH -u "$path"`
62986 
62987   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62988   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62989   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62990   # "foo.exe" is OK but "foo" is an error.
62991   #
62992   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62993   # It is also a way to make sure we got the proper file name for the real test later on.
62994   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62995   if test "x$test_shortpath" = x; then
62996     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62997 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62998     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62999   fi
63000 
63001   # Call helper function which possibly converts this using DOS-style short mode.
63002   # If so, the updated path is stored in $new_path.
63003 
63004   input_path="$new_path"
63005   # Check if we need to convert this using DOS-style short mode. If the path
63006   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63007   # take no chances and rewrite it.
63008   # Note: m4 eats our [], so we need to use [ and ] instead.
63009   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63010   if test "x$has_forbidden_chars" != x; then
63011     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63012     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63013     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63014     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63015       # Going to short mode and back again did indeed matter. Since short mode is
63016       # case insensitive, let's make it lowercase to improve readability.
63017       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63018       # Now convert it back to Unix-style (cygpath)
63019       input_path=`$CYGPATH -u "$shortmode_path"`
63020       new_path="$input_path"
63021     fi
63022   fi
63023 
63024   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63025   if test "x$test_cygdrive_prefix" = x; then
63026     # As a simple fix, exclude /usr/bin since it's not a real path.
63027     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63028       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63029       # a path prefixed by /cygdrive for fixpath to work.
63030       new_path="$CYGWIN_ROOT_PATH$input_path"
63031     fi
63032   fi
63033 
63034 
63035   if test "x$path" != "x$new_path"; then
63036     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63037     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63038 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63039   fi
63040 
63041     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63042 
63043   path="$POTENTIAL_FREETYPE_LIB_PATH"
63044   has_colon=`$ECHO $path | $GREP ^.:`
63045   new_path="$path"
63046   if test "x$has_colon" = x; then
63047     # Not in mixed or Windows style, start by that.
63048     new_path=`cmd //c echo $path`
63049   fi
63050 
63051 
63052   input_path="$new_path"
63053   # Check if we need to convert this using DOS-style short mode. If the path
63054   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63055   # take no chances and rewrite it.
63056   # Note: m4 eats our [], so we need to use [ and ] instead.
63057   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63058   if test "x$has_forbidden_chars" != x; then
63059     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63060     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63061   fi
63062 
63063 
63064   windows_path="$new_path"
63065   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63066     unix_path=`$CYGPATH -u "$windows_path"`
63067     new_path="$unix_path"
63068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63069     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63070     new_path="$unix_path"
63071   fi
63072 
63073   if test "x$path" != "x$new_path"; then
63074     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63075     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63076 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63077   fi
63078 
63079   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63080   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63081 
63082     else
63083       # We're on a unix platform. Hooray! :)
63084       path="$POTENTIAL_FREETYPE_LIB_PATH"
63085       has_space=`$ECHO "$path" | $GREP " "`
63086       if test "x$has_space" != x; then
63087         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63088 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63089         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63090       fi
63091 
63092       # Use eval to expand a potential ~
63093       eval path="$path"
63094       if test ! -f "$path" && test ! -d "$path"; then
63095         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63096       fi
63097 
63098       if test -d "$path"; then
63099         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63100       else
63101         dir="`$DIRNAME "$path"`"
63102         base="`$BASENAME "$path"`"
63103         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63104       fi
63105     fi
63106   fi
63107 
63108 
63109     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63110     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63111 $as_echo_n "checking for freetype includes... " >&6; }
63112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63113 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63114     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63115     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63116 $as_echo_n "checking for freetype libraries... " >&6; }
63117     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63118 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63119   fi
63120 
63121           fi
63122           if test "x$FOUND_FREETYPE" != xyes; then
63123             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
63124 
63125   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63126   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
63127   METHOD="well-known location"
63128 
63129   # Let's start with an optimistic view of the world :-)
63130   FOUND_FREETYPE=yes
63131 
63132   # First look for the canonical freetype main include file ft2build.h.
63133   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63134     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63135     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63136     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63137       # Fail.
63138       FOUND_FREETYPE=no
63139     fi
63140   fi
63141 
63142   if test "x$FOUND_FREETYPE" = xyes; then
63143     # Include file found, let's continue the sanity check.
63144     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63145 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63146 
63147     # Reset to default value
63148     FREETYPE_BASE_NAME=freetype
63149     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63150     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63151       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63152           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63153         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63154         # for the .6 version explicitly.
63155         FREETYPE_BASE_NAME=freetype.6
63156         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63157         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63158 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63159       else
63160         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63161 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63162         FOUND_FREETYPE=no
63163       fi
63164     else
63165       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63166         # On Windows, we will need both .lib and .dll file.
63167         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63168           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63169 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63170           FOUND_FREETYPE=no
63171         fi
63172       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63173           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63174         # Found lib in isa dir, use that instead.
63175         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63176         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63177 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63178       fi
63179     fi
63180   fi
63181 
63182   if test "x$FOUND_FREETYPE" = xyes; then
63183 
63184   # Only process if variable expands to non-empty
63185 
63186   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63187     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63188 
63189   # Input might be given as Windows format, start by converting to
63190   # unix format.
63191   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63192   new_path=`$CYGPATH -u "$path"`
63193 
63194   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63195   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63196   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63197   # "foo.exe" is OK but "foo" is an error.
63198   #
63199   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63200   # It is also a way to make sure we got the proper file name for the real test later on.
63201   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63202   if test "x$test_shortpath" = x; then
63203     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63204 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63205     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63206   fi
63207 
63208   # Call helper function which possibly converts this using DOS-style short mode.
63209   # If so, the updated path is stored in $new_path.
63210 
63211   input_path="$new_path"
63212   # Check if we need to convert this using DOS-style short mode. If the path
63213   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63214   # take no chances and rewrite it.
63215   # Note: m4 eats our [], so we need to use [ and ] instead.
63216   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63217   if test "x$has_forbidden_chars" != x; then
63218     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63219     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63220     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63221     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63222       # Going to short mode and back again did indeed matter. Since short mode is
63223       # case insensitive, let's make it lowercase to improve readability.
63224       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63225       # Now convert it back to Unix-style (cygpath)
63226       input_path=`$CYGPATH -u "$shortmode_path"`
63227       new_path="$input_path"
63228     fi
63229   fi
63230 
63231   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63232   if test "x$test_cygdrive_prefix" = x; then
63233     # As a simple fix, exclude /usr/bin since it's not a real path.
63234     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63235       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63236       # a path prefixed by /cygdrive for fixpath to work.
63237       new_path="$CYGWIN_ROOT_PATH$input_path"
63238     fi
63239   fi
63240 
63241 
63242   if test "x$path" != "x$new_path"; then
63243     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63244     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63245 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63246   fi
63247 
63248     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63249 
63250   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63251   has_colon=`$ECHO $path | $GREP ^.:`
63252   new_path="$path"
63253   if test "x$has_colon" = x; then
63254     # Not in mixed or Windows style, start by that.
63255     new_path=`cmd //c echo $path`
63256   fi
63257 
63258 
63259   input_path="$new_path"
63260   # Check if we need to convert this using DOS-style short mode. If the path
63261   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63262   # take no chances and rewrite it.
63263   # Note: m4 eats our [], so we need to use [ and ] instead.
63264   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63265   if test "x$has_forbidden_chars" != x; then
63266     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63267     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63268   fi
63269 
63270 
63271   windows_path="$new_path"
63272   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63273     unix_path=`$CYGPATH -u "$windows_path"`
63274     new_path="$unix_path"
63275   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63276     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63277     new_path="$unix_path"
63278   fi
63279 
63280   if test "x$path" != "x$new_path"; then
63281     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63282     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63283 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63284   fi
63285 
63286   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63287   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63288 
63289     else
63290       # We're on a unix platform. Hooray! :)
63291       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63292       has_space=`$ECHO "$path" | $GREP " "`
63293       if test "x$has_space" != x; then
63294         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63295 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63296         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63297       fi
63298 
63299       # Use eval to expand a potential ~
63300       eval path="$path"
63301       if test ! -f "$path" && test ! -d "$path"; then
63302         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63303       fi
63304 
63305       if test -d "$path"; then
63306         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63307       else
63308         dir="`$DIRNAME "$path"`"
63309         base="`$BASENAME "$path"`"
63310         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63311       fi
63312     fi
63313   fi
63314 
63315 
63316   # Only process if variable expands to non-empty
63317 
63318   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63319     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63320 
63321   # Input might be given as Windows format, start by converting to
63322   # unix format.
63323   path="$POTENTIAL_FREETYPE_LIB_PATH"
63324   new_path=`$CYGPATH -u "$path"`
63325 
63326   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63327   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63328   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63329   # "foo.exe" is OK but "foo" is an error.
63330   #
63331   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63332   # It is also a way to make sure we got the proper file name for the real test later on.
63333   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63334   if test "x$test_shortpath" = x; then
63335     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63336 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63337     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63338   fi
63339 
63340   # Call helper function which possibly converts this using DOS-style short mode.
63341   # If so, the updated path is stored in $new_path.
63342 
63343   input_path="$new_path"
63344   # Check if we need to convert this using DOS-style short mode. If the path
63345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63346   # take no chances and rewrite it.
63347   # Note: m4 eats our [], so we need to use [ and ] instead.
63348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63349   if test "x$has_forbidden_chars" != x; then
63350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63354       # Going to short mode and back again did indeed matter. Since short mode is
63355       # case insensitive, let's make it lowercase to improve readability.
63356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63357       # Now convert it back to Unix-style (cygpath)
63358       input_path=`$CYGPATH -u "$shortmode_path"`
63359       new_path="$input_path"
63360     fi
63361   fi
63362 
63363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63364   if test "x$test_cygdrive_prefix" = x; then
63365     # As a simple fix, exclude /usr/bin since it's not a real path.
63366     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63368       # a path prefixed by /cygdrive for fixpath to work.
63369       new_path="$CYGWIN_ROOT_PATH$input_path"
63370     fi
63371   fi
63372 
63373 
63374   if test "x$path" != "x$new_path"; then
63375     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63377 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63378   fi
63379 
63380     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63381 
63382   path="$POTENTIAL_FREETYPE_LIB_PATH"
63383   has_colon=`$ECHO $path | $GREP ^.:`
63384   new_path="$path"
63385   if test "x$has_colon" = x; then
63386     # Not in mixed or Windows style, start by that.
63387     new_path=`cmd //c echo $path`
63388   fi
63389 
63390 
63391   input_path="$new_path"
63392   # Check if we need to convert this using DOS-style short mode. If the path
63393   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63394   # take no chances and rewrite it.
63395   # Note: m4 eats our [], so we need to use [ and ] instead.
63396   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63397   if test "x$has_forbidden_chars" != x; then
63398     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63399     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63400   fi
63401 
63402 
63403   windows_path="$new_path"
63404   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63405     unix_path=`$CYGPATH -u "$windows_path"`
63406     new_path="$unix_path"
63407   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63408     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63409     new_path="$unix_path"
63410   fi
63411 
63412   if test "x$path" != "x$new_path"; then
63413     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63414     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63415 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63416   fi
63417 
63418   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63419   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63420 
63421     else
63422       # We're on a unix platform. Hooray! :)
63423       path="$POTENTIAL_FREETYPE_LIB_PATH"
63424       has_space=`$ECHO "$path" | $GREP " "`
63425       if test "x$has_space" != x; then
63426         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63427 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63428         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63429       fi
63430 
63431       # Use eval to expand a potential ~
63432       eval path="$path"
63433       if test ! -f "$path" && test ! -d "$path"; then
63434         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63435       fi
63436 
63437       if test -d "$path"; then
63438         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63439       else
63440         dir="`$DIRNAME "$path"`"
63441         base="`$BASENAME "$path"`"
63442         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63443       fi
63444     fi
63445   fi
63446 
63447 
63448     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63449     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63450 $as_echo_n "checking for freetype includes... " >&6; }
63451     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63452 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63453     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63454     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63455 $as_echo_n "checking for freetype libraries... " >&6; }
63456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63457 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63458   fi
63459 
63460           fi
63461 
63462           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
63463             if test "x$FOUND_FREETYPE" != xyes; then
63464               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
63465               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
63466 
63467   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63468   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
63469   METHOD="well-known location"
63470 
63471   # Let's start with an optimistic view of the world :-)
63472   FOUND_FREETYPE=yes
63473 
63474   # First look for the canonical freetype main include file ft2build.h.
63475   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63476     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63477     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63478     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63479       # Fail.
63480       FOUND_FREETYPE=no
63481     fi
63482   fi
63483 
63484   if test "x$FOUND_FREETYPE" = xyes; then
63485     # Include file found, let's continue the sanity check.
63486     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63487 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63488 
63489     # Reset to default value
63490     FREETYPE_BASE_NAME=freetype
63491     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63492     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63493       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63494           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63495         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63496         # for the .6 version explicitly.
63497         FREETYPE_BASE_NAME=freetype.6
63498         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63499         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63500 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63501       else
63502         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63503 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63504         FOUND_FREETYPE=no
63505       fi
63506     else
63507       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63508         # On Windows, we will need both .lib and .dll file.
63509         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63510           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63511 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63512           FOUND_FREETYPE=no
63513         fi
63514       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63515           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63516         # Found lib in isa dir, use that instead.
63517         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63518         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63519 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63520       fi
63521     fi
63522   fi
63523 
63524   if test "x$FOUND_FREETYPE" = xyes; then
63525 
63526   # Only process if variable expands to non-empty
63527 
63528   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63529     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63530 
63531   # Input might be given as Windows format, start by converting to
63532   # unix format.
63533   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63534   new_path=`$CYGPATH -u "$path"`
63535 
63536   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63537   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63538   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63539   # "foo.exe" is OK but "foo" is an error.
63540   #
63541   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63542   # It is also a way to make sure we got the proper file name for the real test later on.
63543   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63544   if test "x$test_shortpath" = x; then
63545     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63546 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63547     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63548   fi
63549 
63550   # Call helper function which possibly converts this using DOS-style short mode.
63551   # If so, the updated path is stored in $new_path.
63552 
63553   input_path="$new_path"
63554   # Check if we need to convert this using DOS-style short mode. If the path
63555   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63556   # take no chances and rewrite it.
63557   # Note: m4 eats our [], so we need to use [ and ] instead.
63558   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63559   if test "x$has_forbidden_chars" != x; then
63560     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63561     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63562     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63563     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63564       # Going to short mode and back again did indeed matter. Since short mode is
63565       # case insensitive, let's make it lowercase to improve readability.
63566       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63567       # Now convert it back to Unix-style (cygpath)
63568       input_path=`$CYGPATH -u "$shortmode_path"`
63569       new_path="$input_path"
63570     fi
63571   fi
63572 
63573   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63574   if test "x$test_cygdrive_prefix" = x; then
63575     # As a simple fix, exclude /usr/bin since it's not a real path.
63576     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63577       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63578       # a path prefixed by /cygdrive for fixpath to work.
63579       new_path="$CYGWIN_ROOT_PATH$input_path"
63580     fi
63581   fi
63582 
63583 
63584   if test "x$path" != "x$new_path"; then
63585     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63586     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63587 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63588   fi
63589 
63590     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63591 
63592   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63593   has_colon=`$ECHO $path | $GREP ^.:`
63594   new_path="$path"
63595   if test "x$has_colon" = x; then
63596     # Not in mixed or Windows style, start by that.
63597     new_path=`cmd //c echo $path`
63598   fi
63599 
63600 
63601   input_path="$new_path"
63602   # Check if we need to convert this using DOS-style short mode. If the path
63603   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63604   # take no chances and rewrite it.
63605   # Note: m4 eats our [], so we need to use [ and ] instead.
63606   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63607   if test "x$has_forbidden_chars" != x; then
63608     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63609     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63610   fi
63611 
63612 
63613   windows_path="$new_path"
63614   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63615     unix_path=`$CYGPATH -u "$windows_path"`
63616     new_path="$unix_path"
63617   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63618     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63619     new_path="$unix_path"
63620   fi
63621 
63622   if test "x$path" != "x$new_path"; then
63623     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63625 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63626   fi
63627 
63628   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63629   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63630 
63631     else
63632       # We're on a unix platform. Hooray! :)
63633       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63634       has_space=`$ECHO "$path" | $GREP " "`
63635       if test "x$has_space" != x; then
63636         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63637 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63638         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63639       fi
63640 
63641       # Use eval to expand a potential ~
63642       eval path="$path"
63643       if test ! -f "$path" && test ! -d "$path"; then
63644         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63645       fi
63646 
63647       if test -d "$path"; then
63648         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63649       else
63650         dir="`$DIRNAME "$path"`"
63651         base="`$BASENAME "$path"`"
63652         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63653       fi
63654     fi
63655   fi
63656 
63657 
63658   # Only process if variable expands to non-empty
63659 
63660   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63661     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63662 
63663   # Input might be given as Windows format, start by converting to
63664   # unix format.
63665   path="$POTENTIAL_FREETYPE_LIB_PATH"
63666   new_path=`$CYGPATH -u "$path"`
63667 
63668   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63669   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63670   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63671   # "foo.exe" is OK but "foo" is an error.
63672   #
63673   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63674   # It is also a way to make sure we got the proper file name for the real test later on.
63675   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63676   if test "x$test_shortpath" = x; then
63677     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63678 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63679     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63680   fi
63681 
63682   # Call helper function which possibly converts this using DOS-style short mode.
63683   # If so, the updated path is stored in $new_path.
63684 
63685   input_path="$new_path"
63686   # Check if we need to convert this using DOS-style short mode. If the path
63687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63688   # take no chances and rewrite it.
63689   # Note: m4 eats our [], so we need to use [ and ] instead.
63690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63691   if test "x$has_forbidden_chars" != x; then
63692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63693     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63694     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63695     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63696       # Going to short mode and back again did indeed matter. Since short mode is
63697       # case insensitive, let's make it lowercase to improve readability.
63698       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63699       # Now convert it back to Unix-style (cygpath)
63700       input_path=`$CYGPATH -u "$shortmode_path"`
63701       new_path="$input_path"
63702     fi
63703   fi
63704 
63705   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63706   if test "x$test_cygdrive_prefix" = x; then
63707     # As a simple fix, exclude /usr/bin since it's not a real path.
63708     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63709       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63710       # a path prefixed by /cygdrive for fixpath to work.
63711       new_path="$CYGWIN_ROOT_PATH$input_path"
63712     fi
63713   fi
63714 
63715 
63716   if test "x$path" != "x$new_path"; then
63717     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63719 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63720   fi
63721 
63722     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63723 
63724   path="$POTENTIAL_FREETYPE_LIB_PATH"
63725   has_colon=`$ECHO $path | $GREP ^.:`
63726   new_path="$path"
63727   if test "x$has_colon" = x; then
63728     # Not in mixed or Windows style, start by that.
63729     new_path=`cmd //c echo $path`
63730   fi
63731 
63732 
63733   input_path="$new_path"
63734   # Check if we need to convert this using DOS-style short mode. If the path
63735   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63736   # take no chances and rewrite it.
63737   # Note: m4 eats our [], so we need to use [ and ] instead.
63738   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63739   if test "x$has_forbidden_chars" != x; then
63740     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63741     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63742   fi
63743 
63744 
63745   windows_path="$new_path"
63746   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63747     unix_path=`$CYGPATH -u "$windows_path"`
63748     new_path="$unix_path"
63749   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63750     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63751     new_path="$unix_path"
63752   fi
63753 
63754   if test "x$path" != "x$new_path"; then
63755     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63756     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63757 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63758   fi
63759 
63760   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63761   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63762 
63763     else
63764       # We're on a unix platform. Hooray! :)
63765       path="$POTENTIAL_FREETYPE_LIB_PATH"
63766       has_space=`$ECHO "$path" | $GREP " "`
63767       if test "x$has_space" != x; then
63768         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63769 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63770         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63771       fi
63772 
63773       # Use eval to expand a potential ~
63774       eval path="$path"
63775       if test ! -f "$path" && test ! -d "$path"; then
63776         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63777       fi
63778 
63779       if test -d "$path"; then
63780         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63781       else
63782         dir="`$DIRNAME "$path"`"
63783         base="`$BASENAME "$path"`"
63784         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63785       fi
63786     fi
63787   fi
63788 
63789 
63790     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63791     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63792 $as_echo_n "checking for freetype includes... " >&6; }
63793     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63794 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63795     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63796     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63797 $as_echo_n "checking for freetype libraries... " >&6; }
63798     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63799 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63800   fi
63801 
63802             fi
63803           fi
63804 
63805           if test "x$FOUND_FREETYPE" != xyes; then
63806             FREETYPE_BASE_DIR="$SYSROOT/usr"
63807             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
63808 
63809   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63810   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
63811   METHOD="well-known location"
63812 
63813   # Let's start with an optimistic view of the world :-)
63814   FOUND_FREETYPE=yes
63815 
63816   # First look for the canonical freetype main include file ft2build.h.
63817   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63818     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63819     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63820     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63821       # Fail.
63822       FOUND_FREETYPE=no
63823     fi
63824   fi
63825 
63826   if test "x$FOUND_FREETYPE" = xyes; then
63827     # Include file found, let's continue the sanity check.
63828     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63829 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63830 
63831     # Reset to default value
63832     FREETYPE_BASE_NAME=freetype
63833     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63834     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63835       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63836           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63837         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63838         # for the .6 version explicitly.
63839         FREETYPE_BASE_NAME=freetype.6
63840         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63841         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63842 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63843       else
63844         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63845 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63846         FOUND_FREETYPE=no
63847       fi
63848     else
63849       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63850         # On Windows, we will need both .lib and .dll file.
63851         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63852           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63853 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63854           FOUND_FREETYPE=no
63855         fi
63856       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63857           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63858         # Found lib in isa dir, use that instead.
63859         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63860         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63861 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63862       fi
63863     fi
63864   fi
63865 
63866   if test "x$FOUND_FREETYPE" = xyes; then
63867 
63868   # Only process if variable expands to non-empty
63869 
63870   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63872 
63873   # Input might be given as Windows format, start by converting to
63874   # unix format.
63875   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63876   new_path=`$CYGPATH -u "$path"`
63877 
63878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63881   # "foo.exe" is OK but "foo" is an error.
63882   #
63883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63884   # It is also a way to make sure we got the proper file name for the real test later on.
63885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63886   if test "x$test_shortpath" = x; then
63887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63888 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63889     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63890   fi
63891 
63892   # Call helper function which possibly converts this using DOS-style short mode.
63893   # If so, the updated path is stored in $new_path.
63894 
63895   input_path="$new_path"
63896   # Check if we need to convert this using DOS-style short mode. If the path
63897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63898   # take no chances and rewrite it.
63899   # Note: m4 eats our [], so we need to use [ and ] instead.
63900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63901   if test "x$has_forbidden_chars" != x; then
63902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63906       # Going to short mode and back again did indeed matter. Since short mode is
63907       # case insensitive, let's make it lowercase to improve readability.
63908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63909       # Now convert it back to Unix-style (cygpath)
63910       input_path=`$CYGPATH -u "$shortmode_path"`
63911       new_path="$input_path"
63912     fi
63913   fi
63914 
63915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63916   if test "x$test_cygdrive_prefix" = x; then
63917     # As a simple fix, exclude /usr/bin since it's not a real path.
63918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63920       # a path prefixed by /cygdrive for fixpath to work.
63921       new_path="$CYGWIN_ROOT_PATH$input_path"
63922     fi
63923   fi
63924 
63925 
63926   if test "x$path" != "x$new_path"; then
63927     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63929 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63930   fi
63931 
63932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63933 
63934   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63935   has_colon=`$ECHO $path | $GREP ^.:`
63936   new_path="$path"
63937   if test "x$has_colon" = x; then
63938     # Not in mixed or Windows style, start by that.
63939     new_path=`cmd //c echo $path`
63940   fi
63941 
63942 
63943   input_path="$new_path"
63944   # Check if we need to convert this using DOS-style short mode. If the path
63945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63946   # take no chances and rewrite it.
63947   # Note: m4 eats our [], so we need to use [ and ] instead.
63948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63949   if test "x$has_forbidden_chars" != x; then
63950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63952   fi
63953 
63954 
63955   windows_path="$new_path"
63956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63957     unix_path=`$CYGPATH -u "$windows_path"`
63958     new_path="$unix_path"
63959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63961     new_path="$unix_path"
63962   fi
63963 
63964   if test "x$path" != "x$new_path"; then
63965     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63967 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63968   fi
63969 
63970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63972 
63973     else
63974       # We're on a unix platform. Hooray! :)
63975       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63976       has_space=`$ECHO "$path" | $GREP " "`
63977       if test "x$has_space" != x; then
63978         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63979 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63980         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63981       fi
63982 
63983       # Use eval to expand a potential ~
63984       eval path="$path"
63985       if test ! -f "$path" && test ! -d "$path"; then
63986         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63987       fi
63988 
63989       if test -d "$path"; then
63990         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63991       else
63992         dir="`$DIRNAME "$path"`"
63993         base="`$BASENAME "$path"`"
63994         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63995       fi
63996     fi
63997   fi
63998 
63999 
64000   # Only process if variable expands to non-empty
64001 
64002   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
64003     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64004 
64005   # Input might be given as Windows format, start by converting to
64006   # unix format.
64007   path="$POTENTIAL_FREETYPE_LIB_PATH"
64008   new_path=`$CYGPATH -u "$path"`
64009 
64010   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64011   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64012   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64013   # "foo.exe" is OK but "foo" is an error.
64014   #
64015   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64016   # It is also a way to make sure we got the proper file name for the real test later on.
64017   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64018   if test "x$test_shortpath" = x; then
64019     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64020 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64021     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
64022   fi
64023 
64024   # Call helper function which possibly converts this using DOS-style short mode.
64025   # If so, the updated path is stored in $new_path.
64026 
64027   input_path="$new_path"
64028   # Check if we need to convert this using DOS-style short mode. If the path
64029   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64030   # take no chances and rewrite it.
64031   # Note: m4 eats our [], so we need to use [ and ] instead.
64032   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64033   if test "x$has_forbidden_chars" != x; then
64034     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64035     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64036     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64037     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64038       # Going to short mode and back again did indeed matter. Since short mode is
64039       # case insensitive, let's make it lowercase to improve readability.
64040       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64041       # Now convert it back to Unix-style (cygpath)
64042       input_path=`$CYGPATH -u "$shortmode_path"`
64043       new_path="$input_path"
64044     fi
64045   fi
64046 
64047   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64048   if test "x$test_cygdrive_prefix" = x; then
64049     # As a simple fix, exclude /usr/bin since it's not a real path.
64050     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64051       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64052       # a path prefixed by /cygdrive for fixpath to work.
64053       new_path="$CYGWIN_ROOT_PATH$input_path"
64054     fi
64055   fi
64056 
64057 
64058   if test "x$path" != "x$new_path"; then
64059     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64060     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64061 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64062   fi
64063 
64064     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64065 
64066   path="$POTENTIAL_FREETYPE_LIB_PATH"
64067   has_colon=`$ECHO $path | $GREP ^.:`
64068   new_path="$path"
64069   if test "x$has_colon" = x; then
64070     # Not in mixed or Windows style, start by that.
64071     new_path=`cmd //c echo $path`
64072   fi
64073 
64074 
64075   input_path="$new_path"
64076   # Check if we need to convert this using DOS-style short mode. If the path
64077   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64078   # take no chances and rewrite it.
64079   # Note: m4 eats our [], so we need to use [ and ] instead.
64080   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64081   if test "x$has_forbidden_chars" != x; then
64082     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64083     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64084   fi
64085 
64086 
64087   windows_path="$new_path"
64088   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64089     unix_path=`$CYGPATH -u "$windows_path"`
64090     new_path="$unix_path"
64091   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64092     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64093     new_path="$unix_path"
64094   fi
64095 
64096   if test "x$path" != "x$new_path"; then
64097     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64098     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64099 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64100   fi
64101 
64102   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64103   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64104 
64105     else
64106       # We're on a unix platform. Hooray! :)
64107       path="$POTENTIAL_FREETYPE_LIB_PATH"
64108       has_space=`$ECHO "$path" | $GREP " "`
64109       if test "x$has_space" != x; then
64110         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64111 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64112         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64113       fi
64114 
64115       # Use eval to expand a potential ~
64116       eval path="$path"
64117       if test ! -f "$path" && test ! -d "$path"; then
64118         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64119       fi
64120 
64121       if test -d "$path"; then
64122         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64123       else
64124         dir="`$DIRNAME "$path"`"
64125         base="`$BASENAME "$path"`"
64126         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64127       fi
64128     fi
64129   fi
64130 
64131 
64132     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64133     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
64134 $as_echo_n "checking for freetype includes... " >&6; }
64135     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
64136 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
64137     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
64138     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
64139 $as_echo_n "checking for freetype libraries... " >&6; }
64140     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
64141 $as_echo "$FREETYPE_LIB_PATH" >&6; }
64142   fi
64143 
64144             else
64145 
64146   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
64147   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
64148   METHOD="well-known location"
64149 
64150   # Let's start with an optimistic view of the world :-)
64151   FOUND_FREETYPE=yes
64152 
64153   # First look for the canonical freetype main include file ft2build.h.
64154   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64155     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
64156     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
64157     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64158       # Fail.
64159       FOUND_FREETYPE=no
64160     fi
64161   fi
64162 
64163   if test "x$FOUND_FREETYPE" = xyes; then
64164     # Include file found, let's continue the sanity check.
64165     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
64166 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
64167 
64168     # Reset to default value
64169     FREETYPE_BASE_NAME=freetype
64170     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64171     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
64172       if test "x$OPENJDK_TARGET_OS" = xmacosx \
64173           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
64174         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
64175         # for the .6 version explicitly.
64176         FREETYPE_BASE_NAME=freetype.6
64177         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64178         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
64179 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
64180       else
64181         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
64182 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
64183         FOUND_FREETYPE=no
64184       fi
64185     else
64186       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64187         # On Windows, we will need both .lib and .dll file.
64188         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
64189           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
64190 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
64191           FOUND_FREETYPE=no
64192         fi
64193       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
64194           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
64195         # Found lib in isa dir, use that instead.
64196         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
64197         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
64198 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
64199       fi
64200     fi
64201   fi
64202 
64203   if test "x$FOUND_FREETYPE" = xyes; then
64204 
64205   # Only process if variable expands to non-empty
64206 
64207   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
64208     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64209 
64210   # Input might be given as Windows format, start by converting to
64211   # unix format.
64212   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64213   new_path=`$CYGPATH -u "$path"`
64214 
64215   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64216   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64217   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64218   # "foo.exe" is OK but "foo" is an error.
64219   #
64220   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64221   # It is also a way to make sure we got the proper file name for the real test later on.
64222   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64223   if test "x$test_shortpath" = x; then
64224     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64225 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64226     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
64227   fi
64228 
64229   # Call helper function which possibly converts this using DOS-style short mode.
64230   # If so, the updated path is stored in $new_path.
64231 
64232   input_path="$new_path"
64233   # Check if we need to convert this using DOS-style short mode. If the path
64234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64235   # take no chances and rewrite it.
64236   # Note: m4 eats our [], so we need to use [ and ] instead.
64237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64238   if test "x$has_forbidden_chars" != x; then
64239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64243       # Going to short mode and back again did indeed matter. Since short mode is
64244       # case insensitive, let's make it lowercase to improve readability.
64245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64246       # Now convert it back to Unix-style (cygpath)
64247       input_path=`$CYGPATH -u "$shortmode_path"`
64248       new_path="$input_path"
64249     fi
64250   fi
64251 
64252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64253   if test "x$test_cygdrive_prefix" = x; then
64254     # As a simple fix, exclude /usr/bin since it's not a real path.
64255     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64257       # a path prefixed by /cygdrive for fixpath to work.
64258       new_path="$CYGWIN_ROOT_PATH$input_path"
64259     fi
64260   fi
64261 
64262 
64263   if test "x$path" != "x$new_path"; then
64264     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64265     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64266 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64267   fi
64268 
64269     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64270 
64271   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64272   has_colon=`$ECHO $path | $GREP ^.:`
64273   new_path="$path"
64274   if test "x$has_colon" = x; then
64275     # Not in mixed or Windows style, start by that.
64276     new_path=`cmd //c echo $path`
64277   fi
64278 
64279 
64280   input_path="$new_path"
64281   # Check if we need to convert this using DOS-style short mode. If the path
64282   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64283   # take no chances and rewrite it.
64284   # Note: m4 eats our [], so we need to use [ and ] instead.
64285   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64286   if test "x$has_forbidden_chars" != x; then
64287     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64288     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64289   fi
64290 
64291 
64292   windows_path="$new_path"
64293   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64294     unix_path=`$CYGPATH -u "$windows_path"`
64295     new_path="$unix_path"
64296   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64297     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64298     new_path="$unix_path"
64299   fi
64300 
64301   if test "x$path" != "x$new_path"; then
64302     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64304 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64305   fi
64306 
64307   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64308   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64309 
64310     else
64311       # We're on a unix platform. Hooray! :)
64312       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64313       has_space=`$ECHO "$path" | $GREP " "`
64314       if test "x$has_space" != x; then
64315         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64316 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64317         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64318       fi
64319 
64320       # Use eval to expand a potential ~
64321       eval path="$path"
64322       if test ! -f "$path" && test ! -d "$path"; then
64323         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64324       fi
64325 
64326       if test -d "$path"; then
64327         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
64328       else
64329         dir="`$DIRNAME "$path"`"
64330         base="`$BASENAME "$path"`"
64331         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64332       fi
64333     fi
64334   fi
64335 
64336 
64337   # Only process if variable expands to non-empty
64338 
64339   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
64340     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64341 
64342   # Input might be given as Windows format, start by converting to
64343   # unix format.
64344   path="$POTENTIAL_FREETYPE_LIB_PATH"
64345   new_path=`$CYGPATH -u "$path"`
64346 
64347   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64348   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64349   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64350   # "foo.exe" is OK but "foo" is an error.
64351   #
64352   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64353   # It is also a way to make sure we got the proper file name for the real test later on.
64354   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64355   if test "x$test_shortpath" = x; then
64356     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64357 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64358     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
64359   fi
64360 
64361   # Call helper function which possibly converts this using DOS-style short mode.
64362   # If so, the updated path is stored in $new_path.
64363 
64364   input_path="$new_path"
64365   # Check if we need to convert this using DOS-style short mode. If the path
64366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64367   # take no chances and rewrite it.
64368   # Note: m4 eats our [], so we need to use [ and ] instead.
64369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64370   if test "x$has_forbidden_chars" != x; then
64371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64375       # Going to short mode and back again did indeed matter. Since short mode is
64376       # case insensitive, let's make it lowercase to improve readability.
64377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64378       # Now convert it back to Unix-style (cygpath)
64379       input_path=`$CYGPATH -u "$shortmode_path"`
64380       new_path="$input_path"
64381     fi
64382   fi
64383 
64384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64385   if test "x$test_cygdrive_prefix" = x; then
64386     # As a simple fix, exclude /usr/bin since it's not a real path.
64387     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64389       # a path prefixed by /cygdrive for fixpath to work.
64390       new_path="$CYGWIN_ROOT_PATH$input_path"
64391     fi
64392   fi
64393 
64394 
64395   if test "x$path" != "x$new_path"; then
64396     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64397     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64398 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64399   fi
64400 
64401     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64402 
64403   path="$POTENTIAL_FREETYPE_LIB_PATH"
64404   has_colon=`$ECHO $path | $GREP ^.:`
64405   new_path="$path"
64406   if test "x$has_colon" = x; then
64407     # Not in mixed or Windows style, start by that.
64408     new_path=`cmd //c echo $path`
64409   fi
64410 
64411 
64412   input_path="$new_path"
64413   # Check if we need to convert this using DOS-style short mode. If the path
64414   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64415   # take no chances and rewrite it.
64416   # Note: m4 eats our [], so we need to use [ and ] instead.
64417   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64418   if test "x$has_forbidden_chars" != x; then
64419     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64420     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64421   fi
64422 
64423 
64424   windows_path="$new_path"
64425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64426     unix_path=`$CYGPATH -u "$windows_path"`
64427     new_path="$unix_path"
64428   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64429     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64430     new_path="$unix_path"
64431   fi
64432 
64433   if test "x$path" != "x$new_path"; then
64434     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64436 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64437   fi
64438 
64439   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64440   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64441 
64442     else
64443       # We're on a unix platform. Hooray! :)
64444       path="$POTENTIAL_FREETYPE_LIB_PATH"
64445       has_space=`$ECHO "$path" | $GREP " "`
64446       if test "x$has_space" != x; then
64447         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64448 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64449         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64450       fi
64451 
64452       # Use eval to expand a potential ~
64453       eval path="$path"
64454       if test ! -f "$path" && test ! -d "$path"; then
64455         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64456       fi
64457 
64458       if test -d "$path"; then
64459         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64460       else
64461         dir="`$DIRNAME "$path"`"
64462         base="`$BASENAME "$path"`"
64463         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64464       fi
64465     fi
64466   fi
64467 
64468 
64469     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64470     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
64471 $as_echo_n "checking for freetype includes... " >&6; }
64472     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
64473 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
64474     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
64475     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
64476 $as_echo_n "checking for freetype libraries... " >&6; }
64477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
64478 $as_echo "$FREETYPE_LIB_PATH" >&6; }
64479   fi
64480 
64481               if test "x$FOUND_FREETYPE" != xyes; then
64482 
64483   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
64484   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
64485   METHOD="well-known location"
64486 
64487   # Let's start with an optimistic view of the world :-)
64488   FOUND_FREETYPE=yes
64489 
64490   # First look for the canonical freetype main include file ft2build.h.
64491   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64492     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
64493     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
64494     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64495       # Fail.
64496       FOUND_FREETYPE=no
64497     fi
64498   fi
64499 
64500   if test "x$FOUND_FREETYPE" = xyes; then
64501     # Include file found, let's continue the sanity check.
64502     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
64503 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
64504 
64505     # Reset to default value
64506     FREETYPE_BASE_NAME=freetype
64507     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64508     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
64509       if test "x$OPENJDK_TARGET_OS" = xmacosx \
64510           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
64511         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
64512         # for the .6 version explicitly.
64513         FREETYPE_BASE_NAME=freetype.6
64514         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64515         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
64516 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
64517       else
64518         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
64519 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
64520         FOUND_FREETYPE=no
64521       fi
64522     else
64523       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64524         # On Windows, we will need both .lib and .dll file.
64525         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
64526           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
64527 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
64528           FOUND_FREETYPE=no
64529         fi
64530       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
64531           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
64532         # Found lib in isa dir, use that instead.
64533         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
64534         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
64535 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
64536       fi
64537     fi
64538   fi
64539 
64540   if test "x$FOUND_FREETYPE" = xyes; then
64541 
64542   # Only process if variable expands to non-empty
64543 
64544   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
64545     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64546 
64547   # Input might be given as Windows format, start by converting to
64548   # unix format.
64549   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64550   new_path=`$CYGPATH -u "$path"`
64551 
64552   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64553   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64554   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64555   # "foo.exe" is OK but "foo" is an error.
64556   #
64557   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64558   # It is also a way to make sure we got the proper file name for the real test later on.
64559   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64560   if test "x$test_shortpath" = x; then
64561     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64562 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64563     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
64564   fi
64565 
64566   # Call helper function which possibly converts this using DOS-style short mode.
64567   # If so, the updated path is stored in $new_path.
64568 
64569   input_path="$new_path"
64570   # Check if we need to convert this using DOS-style short mode. If the path
64571   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64572   # take no chances and rewrite it.
64573   # Note: m4 eats our [], so we need to use [ and ] instead.
64574   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64575   if test "x$has_forbidden_chars" != x; then
64576     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64577     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64578     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64579     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64580       # Going to short mode and back again did indeed matter. Since short mode is
64581       # case insensitive, let's make it lowercase to improve readability.
64582       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64583       # Now convert it back to Unix-style (cygpath)
64584       input_path=`$CYGPATH -u "$shortmode_path"`
64585       new_path="$input_path"
64586     fi
64587   fi
64588 
64589   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64590   if test "x$test_cygdrive_prefix" = x; then
64591     # As a simple fix, exclude /usr/bin since it's not a real path.
64592     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64593       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64594       # a path prefixed by /cygdrive for fixpath to work.
64595       new_path="$CYGWIN_ROOT_PATH$input_path"
64596     fi
64597   fi
64598 
64599 
64600   if test "x$path" != "x$new_path"; then
64601     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64602     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64603 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64604   fi
64605 
64606     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64607 
64608   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64609   has_colon=`$ECHO $path | $GREP ^.:`
64610   new_path="$path"
64611   if test "x$has_colon" = x; then
64612     # Not in mixed or Windows style, start by that.
64613     new_path=`cmd //c echo $path`
64614   fi
64615 
64616 
64617   input_path="$new_path"
64618   # Check if we need to convert this using DOS-style short mode. If the path
64619   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64620   # take no chances and rewrite it.
64621   # Note: m4 eats our [], so we need to use [ and ] instead.
64622   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64623   if test "x$has_forbidden_chars" != x; then
64624     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64625     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64626   fi
64627 
64628 
64629   windows_path="$new_path"
64630   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64631     unix_path=`$CYGPATH -u "$windows_path"`
64632     new_path="$unix_path"
64633   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64634     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64635     new_path="$unix_path"
64636   fi
64637 
64638   if test "x$path" != "x$new_path"; then
64639     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64640     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64641 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64642   fi
64643 
64644   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64645   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64646 
64647     else
64648       # We're on a unix platform. Hooray! :)
64649       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64650       has_space=`$ECHO "$path" | $GREP " "`
64651       if test "x$has_space" != x; then
64652         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64653 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64654         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64655       fi
64656 
64657       # Use eval to expand a potential ~
64658       eval path="$path"
64659       if test ! -f "$path" && test ! -d "$path"; then
64660         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64661       fi
64662 
64663       if test -d "$path"; then
64664         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
64665       else
64666         dir="`$DIRNAME "$path"`"
64667         base="`$BASENAME "$path"`"
64668         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64669       fi
64670     fi
64671   fi
64672 
64673 
64674   # Only process if variable expands to non-empty
64675 
64676   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
64677     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64678 
64679   # Input might be given as Windows format, start by converting to
64680   # unix format.
64681   path="$POTENTIAL_FREETYPE_LIB_PATH"
64682   new_path=`$CYGPATH -u "$path"`
64683 
64684   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64685   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64686   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64687   # "foo.exe" is OK but "foo" is an error.
64688   #
64689   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64690   # It is also a way to make sure we got the proper file name for the real test later on.
64691   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64692   if test "x$test_shortpath" = x; then
64693     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64694 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64695     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
64696   fi
64697 
64698   # Call helper function which possibly converts this using DOS-style short mode.
64699   # If so, the updated path is stored in $new_path.
64700 
64701   input_path="$new_path"
64702   # Check if we need to convert this using DOS-style short mode. If the path
64703   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64704   # take no chances and rewrite it.
64705   # Note: m4 eats our [], so we need to use [ and ] instead.
64706   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64707   if test "x$has_forbidden_chars" != x; then
64708     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64709     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64710     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64711     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64712       # Going to short mode and back again did indeed matter. Since short mode is
64713       # case insensitive, let's make it lowercase to improve readability.
64714       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64715       # Now convert it back to Unix-style (cygpath)
64716       input_path=`$CYGPATH -u "$shortmode_path"`
64717       new_path="$input_path"
64718     fi
64719   fi
64720 
64721   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64722   if test "x$test_cygdrive_prefix" = x; then
64723     # As a simple fix, exclude /usr/bin since it's not a real path.
64724     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64725       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64726       # a path prefixed by /cygdrive for fixpath to work.
64727       new_path="$CYGWIN_ROOT_PATH$input_path"
64728     fi
64729   fi
64730 
64731 
64732   if test "x$path" != "x$new_path"; then
64733     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64734     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64735 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64736   fi
64737 
64738     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64739 
64740   path="$POTENTIAL_FREETYPE_LIB_PATH"
64741   has_colon=`$ECHO $path | $GREP ^.:`
64742   new_path="$path"
64743   if test "x$has_colon" = x; then
64744     # Not in mixed or Windows style, start by that.
64745     new_path=`cmd //c echo $path`
64746   fi
64747 
64748 
64749   input_path="$new_path"
64750   # Check if we need to convert this using DOS-style short mode. If the path
64751   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64752   # take no chances and rewrite it.
64753   # Note: m4 eats our [], so we need to use [ and ] instead.
64754   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64755   if test "x$has_forbidden_chars" != x; then
64756     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64757     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64758   fi
64759 
64760 
64761   windows_path="$new_path"
64762   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64763     unix_path=`$CYGPATH -u "$windows_path"`
64764     new_path="$unix_path"
64765   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64766     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64767     new_path="$unix_path"
64768   fi
64769 
64770   if test "x$path" != "x$new_path"; then
64771     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64772     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64773 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64774   fi
64775 
64776   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64777   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64778 
64779     else
64780       # We're on a unix platform. Hooray! :)
64781       path="$POTENTIAL_FREETYPE_LIB_PATH"
64782       has_space=`$ECHO "$path" | $GREP " "`
64783       if test "x$has_space" != x; then
64784         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64785 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64786         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64787       fi
64788 
64789       # Use eval to expand a potential ~
64790       eval path="$path"
64791       if test ! -f "$path" && test ! -d "$path"; then
64792         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64793       fi
64794 
64795       if test -d "$path"; then
64796         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64797       else
64798         dir="`$DIRNAME "$path"`"
64799         base="`$BASENAME "$path"`"
64800         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64801       fi
64802     fi
64803   fi
64804 
64805 
64806     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64807     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
64808 $as_echo_n "checking for freetype includes... " >&6; }
64809     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
64810 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
64811     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
64812     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
64813 $as_echo_n "checking for freetype libraries... " >&6; }
64814     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
64815 $as_echo "$FREETYPE_LIB_PATH" >&6; }
64816   fi
64817 
64818               fi
64819             fi
64820           fi
64821         fi
64822       fi # end check in well-known locations
64823 
64824       if test "x$FOUND_FREETYPE" != xyes; then
64825 
64826   # Print a helpful message on how to acquire the necessary build dependency.
64827   # freetype is the help tag: freetype, cups, alsa etc
64828   MISSING_DEPENDENCY=freetype
64829 
64830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64831     cygwin_help $MISSING_DEPENDENCY
64832   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64833     msys_help $MISSING_DEPENDENCY
64834   else
64835     PKGHANDLER_COMMAND=
64836 
64837     case $PKGHANDLER in
64838       apt-get)
64839         apt_help     $MISSING_DEPENDENCY ;;
64840       yum)
64841         yum_help     $MISSING_DEPENDENCY ;;
64842       brew)
64843         brew_help    $MISSING_DEPENDENCY ;;
64844       port)
64845         port_help    $MISSING_DEPENDENCY ;;
64846       pkgutil)
64847         pkgutil_help $MISSING_DEPENDENCY ;;
64848       pkgadd)
64849         pkgadd_help  $MISSING_DEPENDENCY ;;
64850     esac
64851 
64852     if test "x$PKGHANDLER_COMMAND" != x; then
64853       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64854     fi
64855   fi
64856 
64857         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
64858       fi
64859     fi # end user specified settings
64860 
64861     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
64862     if test "x$FREETYPE_CFLAGS" = x; then
64863 
64864   # Only process if variable expands to non-empty
64865 
64866   if test "x$FREETYPE_INCLUDE_PATH" != x; then
64867     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64868 
64869   # Input might be given as Windows format, start by converting to
64870   # unix format.
64871   path="$FREETYPE_INCLUDE_PATH"
64872   new_path=`$CYGPATH -u "$path"`
64873 
64874   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64875   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64876   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64877   # "foo.exe" is OK but "foo" is an error.
64878   #
64879   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64880   # It is also a way to make sure we got the proper file name for the real test later on.
64881   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64882   if test "x$test_shortpath" = x; then
64883     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64884 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64885     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
64886   fi
64887 
64888   # Call helper function which possibly converts this using DOS-style short mode.
64889   # If so, the updated path is stored in $new_path.
64890 
64891   input_path="$new_path"
64892   # Check if we need to convert this using DOS-style short mode. If the path
64893   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64894   # take no chances and rewrite it.
64895   # Note: m4 eats our [], so we need to use [ and ] instead.
64896   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64897   if test "x$has_forbidden_chars" != x; then
64898     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64899     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64900     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64901     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64902       # Going to short mode and back again did indeed matter. Since short mode is
64903       # case insensitive, let's make it lowercase to improve readability.
64904       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64905       # Now convert it back to Unix-style (cygpath)
64906       input_path=`$CYGPATH -u "$shortmode_path"`
64907       new_path="$input_path"
64908     fi
64909   fi
64910 
64911   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64912   if test "x$test_cygdrive_prefix" = x; then
64913     # As a simple fix, exclude /usr/bin since it's not a real path.
64914     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64915       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64916       # a path prefixed by /cygdrive for fixpath to work.
64917       new_path="$CYGWIN_ROOT_PATH$input_path"
64918     fi
64919   fi
64920 
64921 
64922   if test "x$path" != "x$new_path"; then
64923     FREETYPE_INCLUDE_PATH="$new_path"
64924     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64925 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64926   fi
64927 
64928     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64929 
64930   path="$FREETYPE_INCLUDE_PATH"
64931   has_colon=`$ECHO $path | $GREP ^.:`
64932   new_path="$path"
64933   if test "x$has_colon" = x; then
64934     # Not in mixed or Windows style, start by that.
64935     new_path=`cmd //c echo $path`
64936   fi
64937 
64938 
64939   input_path="$new_path"
64940   # Check if we need to convert this using DOS-style short mode. If the path
64941   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64942   # take no chances and rewrite it.
64943   # Note: m4 eats our [], so we need to use [ and ] instead.
64944   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64945   if test "x$has_forbidden_chars" != x; then
64946     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64947     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64948   fi
64949 
64950 
64951   windows_path="$new_path"
64952   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64953     unix_path=`$CYGPATH -u "$windows_path"`
64954     new_path="$unix_path"
64955   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64956     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64957     new_path="$unix_path"
64958   fi
64959 
64960   if test "x$path" != "x$new_path"; then
64961     FREETYPE_INCLUDE_PATH="$new_path"
64962     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64963 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64964   fi
64965 
64966   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64967   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64968 
64969     else
64970       # We're on a unix platform. Hooray! :)
64971       path="$FREETYPE_INCLUDE_PATH"
64972       has_space=`$ECHO "$path" | $GREP " "`
64973       if test "x$has_space" != x; then
64974         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64975 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64976         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64977       fi
64978 
64979       # Use eval to expand a potential ~
64980       eval path="$path"
64981       if test ! -f "$path" && test ! -d "$path"; then
64982         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64983       fi
64984 
64985       if test -d "$path"; then
64986         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
64987       else
64988         dir="`$DIRNAME "$path"`"
64989         base="`$BASENAME "$path"`"
64990         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64991       fi
64992     fi
64993   fi
64994 
64995       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
64996         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
64997       else
64998         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
64999       fi
65000     fi
65001 
65002     if test "x$FREETYPE_LIBS" = x; then
65003 
65004   # Only process if variable expands to non-empty
65005 
65006   if test "x$FREETYPE_LIB_PATH" != x; then
65007     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65008 
65009   # Input might be given as Windows format, start by converting to
65010   # unix format.
65011   path="$FREETYPE_LIB_PATH"
65012   new_path=`$CYGPATH -u "$path"`
65013 
65014   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65015   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65016   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65017   # "foo.exe" is OK but "foo" is an error.
65018   #
65019   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65020   # It is also a way to make sure we got the proper file name for the real test later on.
65021   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65022   if test "x$test_shortpath" = x; then
65023     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
65024 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
65025     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
65026   fi
65027 
65028   # Call helper function which possibly converts this using DOS-style short mode.
65029   # If so, the updated path is stored in $new_path.
65030 
65031   input_path="$new_path"
65032   # Check if we need to convert this using DOS-style short mode. If the path
65033   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65034   # take no chances and rewrite it.
65035   # Note: m4 eats our [], so we need to use [ and ] instead.
65036   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65037   if test "x$has_forbidden_chars" != x; then
65038     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65039     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65040     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65041     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65042       # Going to short mode and back again did indeed matter. Since short mode is
65043       # case insensitive, let's make it lowercase to improve readability.
65044       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65045       # Now convert it back to Unix-style (cygpath)
65046       input_path=`$CYGPATH -u "$shortmode_path"`
65047       new_path="$input_path"
65048     fi
65049   fi
65050 
65051   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65052   if test "x$test_cygdrive_prefix" = x; then
65053     # As a simple fix, exclude /usr/bin since it's not a real path.
65054     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65055       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65056       # a path prefixed by /cygdrive for fixpath to work.
65057       new_path="$CYGWIN_ROOT_PATH$input_path"
65058     fi
65059   fi
65060 
65061 
65062   if test "x$path" != "x$new_path"; then
65063     FREETYPE_LIB_PATH="$new_path"
65064     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
65065 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
65066   fi
65067 
65068     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65069 
65070   path="$FREETYPE_LIB_PATH"
65071   has_colon=`$ECHO $path | $GREP ^.:`
65072   new_path="$path"
65073   if test "x$has_colon" = x; then
65074     # Not in mixed or Windows style, start by that.
65075     new_path=`cmd //c echo $path`
65076   fi
65077 
65078 
65079   input_path="$new_path"
65080   # Check if we need to convert this using DOS-style short mode. If the path
65081   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65082   # take no chances and rewrite it.
65083   # Note: m4 eats our [], so we need to use [ and ] instead.
65084   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65085   if test "x$has_forbidden_chars" != x; then
65086     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65087     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65088   fi
65089 
65090 
65091   windows_path="$new_path"
65092   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65093     unix_path=`$CYGPATH -u "$windows_path"`
65094     new_path="$unix_path"
65095   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65096     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65097     new_path="$unix_path"
65098   fi
65099 
65100   if test "x$path" != "x$new_path"; then
65101     FREETYPE_LIB_PATH="$new_path"
65102     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
65103 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
65104   fi
65105 
65106   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65107   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65108 
65109     else
65110       # We're on a unix platform. Hooray! :)
65111       path="$FREETYPE_LIB_PATH"
65112       has_space=`$ECHO "$path" | $GREP " "`
65113       if test "x$has_space" != x; then
65114         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
65115 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
65116         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65117       fi
65118 
65119       # Use eval to expand a potential ~
65120       eval path="$path"
65121       if test ! -f "$path" && test ! -d "$path"; then
65122         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
65123       fi
65124 
65125       if test -d "$path"; then
65126         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
65127       else
65128         dir="`$DIRNAME "$path"`"
65129         base="`$BASENAME "$path"`"
65130         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
65131       fi
65132     fi
65133   fi
65134 
65135       if test "x$OPENJDK_TARGET_OS" = xwindows; then
65136         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
65137       else
65138         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
65139       fi
65140     fi
65141 
65142     # Try to compile it
65143     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
65144 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
65145     ac_ext=cpp
65146 ac_cpp='$CXXCPP $CPPFLAGS'
65147 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65148 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65149 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65150 
65151     PREV_CXXCFLAGS="$CXXFLAGS"
65152     PREV_LIBS="$LIBS"
65153     PREV_CXX="$CXX"
65154     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
65155     LIBS="$LIBS $FREETYPE_LIBS"
65156     CXX="$FIXPATH $CXX"
65157     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65158 /* end confdefs.h.  */
65159 
65160           #include<ft2build.h>
65161           #include FT_FREETYPE_H
65162           int main () {
65163             FT_Init_FreeType(NULL);
65164             return 0;
65165           }
65166 
65167 _ACEOF
65168 if ac_fn_cxx_try_link "$LINENO"; then :
65169 
65170           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65171 $as_echo "yes" >&6; }
65172 
65173 else
65174 
65175           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65176 $as_echo "no" >&6; }
65177           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
65178 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
65179           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
65180 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
65181 
65182 
65183   # Print a helpful message on how to acquire the necessary build dependency.
65184   # freetype is the help tag: freetype, cups, alsa etc
65185   MISSING_DEPENDENCY=freetype
65186 
65187   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65188     cygwin_help $MISSING_DEPENDENCY
65189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65190     msys_help $MISSING_DEPENDENCY
65191   else
65192     PKGHANDLER_COMMAND=
65193 
65194     case $PKGHANDLER in
65195       apt-get)
65196         apt_help     $MISSING_DEPENDENCY ;;
65197       yum)
65198         yum_help     $MISSING_DEPENDENCY ;;
65199       brew)
65200         brew_help    $MISSING_DEPENDENCY ;;
65201       port)
65202         port_help    $MISSING_DEPENDENCY ;;
65203       pkgutil)
65204         pkgutil_help $MISSING_DEPENDENCY ;;
65205       pkgadd)
65206         pkgadd_help  $MISSING_DEPENDENCY ;;
65207     esac
65208 
65209     if test "x$PKGHANDLER_COMMAND" != x; then
65210       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65211     fi
65212   fi
65213 
65214 
65215           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
65216 
65217 
65218 fi
65219 rm -f core conftest.err conftest.$ac_objext \
65220     conftest$ac_exeext conftest.$ac_ext
65221     CXXCFLAGS="$PREV_CXXFLAGS"
65222     LIBS="$PREV_LIBS"
65223     CXX="$PREV_CXX"
65224     ac_ext=cpp
65225 ac_cpp='$CXXCPP $CPPFLAGS'
65226 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65227 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65228 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65229 
65230 
65231     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
65232 $as_echo_n "checking if we should bundle freetype... " >&6; }
65233     if test "x$BUNDLE_FREETYPE" = xyes; then
65234       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
65235     fi
65236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
65237 $as_echo "$BUNDLE_FREETYPE" >&6; }
65238 
65239     if test "x$BUNDLE_FREETYPE" = xyes; then
65240       FREETYPE_LICENSE=""
65241       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
65242 $as_echo_n "checking for freetype license... " >&6; }
65243       if test "x$with_freetype_license" = "xyes"; then
65244         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65245 $as_echo "no" >&6; }
65246         as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
65247       elif test "x$with_freetype_license" != "x"; then
65248         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
65249 $as_echo "$with_freetype_license" >&6; }
65250         FREETYPE_LICENSE="$with_freetype_license"
65251 
65252   # Only process if variable expands to non-empty
65253 
65254   if test "x$FREETYPE_LICENSE" != x; then
65255     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65256 
65257   # Input might be given as Windows format, start by converting to
65258   # unix format.
65259   path="$FREETYPE_LICENSE"
65260   new_path=`$CYGPATH -u "$path"`
65261 
65262   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65263   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65264   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65265   # "foo.exe" is OK but "foo" is an error.
65266   #
65267   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65268   # It is also a way to make sure we got the proper file name for the real test later on.
65269   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65270   if test "x$test_shortpath" = x; then
65271     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65272 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65273     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
65274   fi
65275 
65276   # Call helper function which possibly converts this using DOS-style short mode.
65277   # If so, the updated path is stored in $new_path.
65278 
65279   input_path="$new_path"
65280   # Check if we need to convert this using DOS-style short mode. If the path
65281   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65282   # take no chances and rewrite it.
65283   # Note: m4 eats our [], so we need to use [ and ] instead.
65284   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65285   if test "x$has_forbidden_chars" != x; then
65286     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65287     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65288     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65289     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65290       # Going to short mode and back again did indeed matter. Since short mode is
65291       # case insensitive, let's make it lowercase to improve readability.
65292       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65293       # Now convert it back to Unix-style (cygpath)
65294       input_path=`$CYGPATH -u "$shortmode_path"`
65295       new_path="$input_path"
65296     fi
65297   fi
65298 
65299   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65300   if test "x$test_cygdrive_prefix" = x; then
65301     # As a simple fix, exclude /usr/bin since it's not a real path.
65302     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65303       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65304       # a path prefixed by /cygdrive for fixpath to work.
65305       new_path="$CYGWIN_ROOT_PATH$input_path"
65306     fi
65307   fi
65308 
65309 
65310   if test "x$path" != "x$new_path"; then
65311     FREETYPE_LICENSE="$new_path"
65312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65313 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65314   fi
65315 
65316     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65317 
65318   path="$FREETYPE_LICENSE"
65319   has_colon=`$ECHO $path | $GREP ^.:`
65320   new_path="$path"
65321   if test "x$has_colon" = x; then
65322     # Not in mixed or Windows style, start by that.
65323     new_path=`cmd //c echo $path`
65324   fi
65325 
65326 
65327   input_path="$new_path"
65328   # Check if we need to convert this using DOS-style short mode. If the path
65329   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65330   # take no chances and rewrite it.
65331   # Note: m4 eats our [], so we need to use [ and ] instead.
65332   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65333   if test "x$has_forbidden_chars" != x; then
65334     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65335     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65336   fi
65337 
65338 
65339   windows_path="$new_path"
65340   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65341     unix_path=`$CYGPATH -u "$windows_path"`
65342     new_path="$unix_path"
65343   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65344     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65345     new_path="$unix_path"
65346   fi
65347 
65348   if test "x$path" != "x$new_path"; then
65349     FREETYPE_LICENSE="$new_path"
65350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65351 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65352   fi
65353 
65354   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65355   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65356 
65357     else
65358       # We're on a unix platform. Hooray! :)
65359       path="$FREETYPE_LICENSE"
65360       has_space=`$ECHO "$path" | $GREP " "`
65361       if test "x$has_space" != x; then
65362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65363 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65364         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65365       fi
65366 
65367       # Use eval to expand a potential ~
65368       eval path="$path"
65369       if test ! -f "$path" && test ! -d "$path"; then
65370         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
65371       fi
65372 
65373       if test -d "$path"; then
65374         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
65375       else
65376         dir="`$DIRNAME "$path"`"
65377         base="`$BASENAME "$path"`"
65378         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
65379       fi
65380     fi
65381   fi
65382 
65383         if test ! -f "$FREETYPE_LICENSE"; then
65384           as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
65385         fi
65386       else
65387         if test "x$with_freetype" != "x" && test -f $with_freetype/freetype.md; then
65388           FREETYPE_LICENSE="$with_freetype/freetype.md"
65389           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LICENSE" >&5
65390 $as_echo "$FREETYPE_LICENSE" >&6; }
65391 
65392   # Only process if variable expands to non-empty
65393 
65394   if test "x$FREETYPE_LICENSE" != x; then
65395     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65396 
65397   # Input might be given as Windows format, start by converting to
65398   # unix format.
65399   path="$FREETYPE_LICENSE"
65400   new_path=`$CYGPATH -u "$path"`
65401 
65402   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65403   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65404   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65405   # "foo.exe" is OK but "foo" is an error.
65406   #
65407   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65408   # It is also a way to make sure we got the proper file name for the real test later on.
65409   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65410   if test "x$test_shortpath" = x; then
65411     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65412 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65413     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
65414   fi
65415 
65416   # Call helper function which possibly converts this using DOS-style short mode.
65417   # If so, the updated path is stored in $new_path.
65418 
65419   input_path="$new_path"
65420   # Check if we need to convert this using DOS-style short mode. If the path
65421   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65422   # take no chances and rewrite it.
65423   # Note: m4 eats our [], so we need to use [ and ] instead.
65424   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65425   if test "x$has_forbidden_chars" != x; then
65426     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65427     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65428     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65429     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65430       # Going to short mode and back again did indeed matter. Since short mode is
65431       # case insensitive, let's make it lowercase to improve readability.
65432       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65433       # Now convert it back to Unix-style (cygpath)
65434       input_path=`$CYGPATH -u "$shortmode_path"`
65435       new_path="$input_path"
65436     fi
65437   fi
65438 
65439   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65440   if test "x$test_cygdrive_prefix" = x; then
65441     # As a simple fix, exclude /usr/bin since it's not a real path.
65442     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65443       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65444       # a path prefixed by /cygdrive for fixpath to work.
65445       new_path="$CYGWIN_ROOT_PATH$input_path"
65446     fi
65447   fi
65448 
65449 
65450   if test "x$path" != "x$new_path"; then
65451     FREETYPE_LICENSE="$new_path"
65452     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65453 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65454   fi
65455 
65456     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65457 
65458   path="$FREETYPE_LICENSE"
65459   has_colon=`$ECHO $path | $GREP ^.:`
65460   new_path="$path"
65461   if test "x$has_colon" = x; then
65462     # Not in mixed or Windows style, start by that.
65463     new_path=`cmd //c echo $path`
65464   fi
65465 
65466 
65467   input_path="$new_path"
65468   # Check if we need to convert this using DOS-style short mode. If the path
65469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65470   # take no chances and rewrite it.
65471   # Note: m4 eats our [], so we need to use [ and ] instead.
65472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65473   if test "x$has_forbidden_chars" != x; then
65474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65475     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65476   fi
65477 
65478 
65479   windows_path="$new_path"
65480   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65481     unix_path=`$CYGPATH -u "$windows_path"`
65482     new_path="$unix_path"
65483   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65484     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65485     new_path="$unix_path"
65486   fi
65487 
65488   if test "x$path" != "x$new_path"; then
65489     FREETYPE_LICENSE="$new_path"
65490     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65491 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65492   fi
65493 
65494   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65495   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65496 
65497     else
65498       # We're on a unix platform. Hooray! :)
65499       path="$FREETYPE_LICENSE"
65500       has_space=`$ECHO "$path" | $GREP " "`
65501       if test "x$has_space" != x; then
65502         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65503 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65504         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65505       fi
65506 
65507       # Use eval to expand a potential ~
65508       eval path="$path"
65509       if test ! -f "$path" && test ! -d "$path"; then
65510         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
65511       fi
65512 
65513       if test -d "$path"; then
65514         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
65515       else
65516         dir="`$DIRNAME "$path"`"
65517         base="`$BASENAME "$path"`"
65518         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
65519       fi
65520     fi
65521   fi
65522 
65523         else
65524           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65525 $as_echo "no" >&6; }
65526         fi
65527       fi
65528     fi
65529 
65530   fi # end freetype needed
65531 
65532 
65533 
65534 
65535 
65536 
65537 
65538 
65539 # Check whether --with-alsa was given.
65540 if test "${with_alsa+set}" = set; then :
65541   withval=$with_alsa;
65542 fi
65543 
65544 
65545 # Check whether --with-alsa-include was given.
65546 if test "${with_alsa_include+set}" = set; then :
65547   withval=$with_alsa_include;
65548 fi
65549 
65550 
65551 # Check whether --with-alsa-lib was given.
65552 if test "${with_alsa_lib+set}" = set; then :
65553   withval=$with_alsa_lib;
65554 fi
65555 
65556 
65557   if test "x$NEEDS_LIB_ALSA" = xfalse; then
65558     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
65559         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
65560         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
65561       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
65562 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
65563     fi
65564     ALSA_CFLAGS=
65565     ALSA_LIBS=
65566   else
65567     ALSA_FOUND=no
65568 
65569     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
65570       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
65571     fi
65572 
65573     if test "x${with_alsa}" != x; then
65574       ALSA_LIBS="-L${with_alsa}/lib -lasound"
65575       ALSA_CFLAGS="-I${with_alsa}/include"
65576       ALSA_FOUND=yes
65577     fi
65578     if test "x${with_alsa_include}" != x; then
65579       ALSA_CFLAGS="-I${with_alsa_include}"
65580       ALSA_FOUND=yes
65581     fi
65582     if test "x${with_alsa_lib}" != x; then
65583       ALSA_LIBS="-L${with_alsa_lib} -lasound"
65584       ALSA_FOUND=yes
65585     fi
65586     # Do not try pkg-config if we have a sysroot set.
65587     if test "x$SYSROOT" = x; then
65588       if test "x$ALSA_FOUND" = xno; then
65589 
65590 pkg_failed=no
65591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
65592 $as_echo_n "checking for ALSA... " >&6; }
65593 
65594 if test -n "$ALSA_CFLAGS"; then
65595     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
65596  elif test -n "$PKG_CONFIG"; then
65597     if test -n "$PKG_CONFIG" && \
65598     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
65599   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
65600   ac_status=$?
65601   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65602   test $ac_status = 0; }; then
65603   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
65604 else
65605   pkg_failed=yes
65606 fi
65607  else
65608     pkg_failed=untried
65609 fi
65610 if test -n "$ALSA_LIBS"; then
65611     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
65612  elif test -n "$PKG_CONFIG"; then
65613     if test -n "$PKG_CONFIG" && \
65614     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
65615   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
65616   ac_status=$?
65617   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65618   test $ac_status = 0; }; then
65619   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
65620 else
65621   pkg_failed=yes
65622 fi
65623  else
65624     pkg_failed=untried
65625 fi
65626 
65627 
65628 
65629 if test $pkg_failed = yes; then
65630 
65631 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65632         _pkg_short_errors_supported=yes
65633 else
65634         _pkg_short_errors_supported=no
65635 fi
65636         if test $_pkg_short_errors_supported = yes; then
65637                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
65638         else
65639                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
65640         fi
65641         # Put the nasty error message in config.log where it belongs
65642         echo "$ALSA_PKG_ERRORS" >&5
65643 
65644         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65645 $as_echo "no" >&6; }
65646                 ALSA_FOUND=no
65647 elif test $pkg_failed = untried; then
65648         ALSA_FOUND=no
65649 else
65650         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
65651         ALSA_LIBS=$pkg_cv_ALSA_LIBS
65652         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65653 $as_echo "yes" >&6; }
65654         ALSA_FOUND=yes
65655 fi
65656       fi
65657     fi
65658     if test "x$ALSA_FOUND" = xno; then
65659       for ac_header in alsa/asoundlib.h
65660 do :
65661   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
65662 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
65663   cat >>confdefs.h <<_ACEOF
65664 #define HAVE_ALSA_ASOUNDLIB_H 1
65665 _ACEOF
65666 
65667             ALSA_FOUND=yes
65668             ALSA_CFLAGS=-Iignoreme
65669             ALSA_LIBS=-lasound
65670             DEFAULT_ALSA=yes
65671 
65672 else
65673   ALSA_FOUND=no
65674 
65675 fi
65676 
65677 done
65678 
65679     fi
65680     if test "x$ALSA_FOUND" = xno; then
65681 
65682   # Print a helpful message on how to acquire the necessary build dependency.
65683   # alsa is the help tag: freetype, cups, alsa etc
65684   MISSING_DEPENDENCY=alsa
65685 
65686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65687     cygwin_help $MISSING_DEPENDENCY
65688   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65689     msys_help $MISSING_DEPENDENCY
65690   else
65691     PKGHANDLER_COMMAND=
65692 
65693     case $PKGHANDLER in
65694       apt-get)
65695         apt_help     $MISSING_DEPENDENCY ;;
65696       yum)
65697         yum_help     $MISSING_DEPENDENCY ;;
65698       brew)
65699         brew_help    $MISSING_DEPENDENCY ;;
65700       port)
65701         port_help    $MISSING_DEPENDENCY ;;
65702       pkgutil)
65703         pkgutil_help $MISSING_DEPENDENCY ;;
65704       pkgadd)
65705         pkgadd_help  $MISSING_DEPENDENCY ;;
65706     esac
65707 
65708     if test "x$PKGHANDLER_COMMAND" != x; then
65709       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65710     fi
65711   fi
65712 
65713       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
65714     fi
65715   fi
65716 
65717 
65718 
65719 
65720 
65721 
65722 # Check whether --with-libffi was given.
65723 if test "${with_libffi+set}" = set; then :
65724   withval=$with_libffi;
65725 fi
65726 
65727 
65728 # Check whether --with-libffi-include was given.
65729 if test "${with_libffi_include+set}" = set; then :
65730   withval=$with_libffi_include;
65731 fi
65732 
65733 
65734 # Check whether --with-libffi-lib was given.
65735 if test "${with_libffi_lib+set}" = set; then :
65736   withval=$with_libffi_lib;
65737 fi
65738 
65739   # Check whether --enable-libffi-bundling was given.
65740 if test "${enable_libffi_bundling+set}" = set; then :
65741   enableval=$enable_libffi_bundling;
65742 fi
65743 
65744 
65745   if test "x$NEEDS_LIB_FFI" = xfalse; then
65746     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
65747         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
65748         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
65749       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
65750 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
65751     fi
65752     LIBFFI_CFLAGS=
65753     LIBFFI_LIBS=
65754   else
65755     LIBFFI_FOUND=no
65756 
65757     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
65758       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
65759     fi
65760 
65761     if test "x${with_libffi}" != x; then
65762       LIBFFI_LIB_PATH="${with_libffi}/lib"
65763       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
65764       LIBFFI_CFLAGS="-I${with_libffi}/include"
65765       LIBFFI_FOUND=yes
65766     fi
65767     if test "x${with_libffi_include}" != x; then
65768       LIBFFI_CFLAGS="-I${with_libffi_include}"
65769       LIBFFI_FOUND=yes
65770     fi
65771     if test "x${with_libffi_lib}" != x; then
65772       LIBFFI_LIB_PATH="${with_libffi_lib}"
65773       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
65774       LIBFFI_FOUND=yes
65775     fi
65776     # Do not try pkg-config if we have a sysroot set.
65777     if test "x$SYSROOT" = x; then
65778       if test "x$LIBFFI_FOUND" = xno; then
65779         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
65780 
65781 pkg_failed=no
65782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
65783 $as_echo_n "checking for LIBFFI... " >&6; }
65784 
65785 if test -n "$LIBFFI_CFLAGS"; then
65786     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
65787  elif test -n "$PKG_CONFIG"; then
65788     if test -n "$PKG_CONFIG" && \
65789     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
65790   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
65791   ac_status=$?
65792   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65793   test $ac_status = 0; }; then
65794   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
65795 else
65796   pkg_failed=yes
65797 fi
65798  else
65799     pkg_failed=untried
65800 fi
65801 if test -n "$LIBFFI_LIBS"; then
65802     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
65803  elif test -n "$PKG_CONFIG"; then
65804     if test -n "$PKG_CONFIG" && \
65805     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
65806   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
65807   ac_status=$?
65808   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65809   test $ac_status = 0; }; then
65810   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
65811 else
65812   pkg_failed=yes
65813 fi
65814  else
65815     pkg_failed=untried
65816 fi
65817 
65818 
65819 
65820 if test $pkg_failed = yes; then
65821 
65822 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65823         _pkg_short_errors_supported=yes
65824 else
65825         _pkg_short_errors_supported=no
65826 fi
65827         if test $_pkg_short_errors_supported = yes; then
65828                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
65829         else
65830                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
65831         fi
65832         # Put the nasty error message in config.log where it belongs
65833         echo "$LIBFFI_PKG_ERRORS" >&5
65834 
65835         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65836 $as_echo "no" >&6; }
65837                 LIBFFI_FOUND=no
65838 elif test $pkg_failed = untried; then
65839         LIBFFI_FOUND=no
65840 else
65841         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
65842         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
65843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65844 $as_echo "yes" >&6; }
65845         LIBFFI_FOUND=yes
65846 fi
65847       fi
65848     fi
65849     if test "x$LIBFFI_FOUND" = xno; then
65850       for ac_header in ffi.h
65851 do :
65852   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
65853 if test "x$ac_cv_header_ffi_h" = xyes; then :
65854   cat >>confdefs.h <<_ACEOF
65855 #define HAVE_FFI_H 1
65856 _ACEOF
65857 
65858             LIBFFI_FOUND=yes
65859             LIBFFI_CFLAGS=
65860             LIBFFI_LIBS=-lffi
65861 
65862 else
65863   LIBFFI_FOUND=no
65864 
65865 fi
65866 
65867 done
65868 
65869     fi
65870     if test "x$LIBFFI_FOUND" = xno; then
65871 
65872   # Print a helpful message on how to acquire the necessary build dependency.
65873   # ffi is the help tag: freetype, cups, alsa etc
65874   MISSING_DEPENDENCY=ffi
65875 
65876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65877     cygwin_help $MISSING_DEPENDENCY
65878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65879     msys_help $MISSING_DEPENDENCY
65880   else
65881     PKGHANDLER_COMMAND=
65882 
65883     case $PKGHANDLER in
65884       apt-get)
65885         apt_help     $MISSING_DEPENDENCY ;;
65886       yum)
65887         yum_help     $MISSING_DEPENDENCY ;;
65888       brew)
65889         brew_help    $MISSING_DEPENDENCY ;;
65890       port)
65891         port_help    $MISSING_DEPENDENCY ;;
65892       pkgutil)
65893         pkgutil_help $MISSING_DEPENDENCY ;;
65894       pkgadd)
65895         pkgadd_help  $MISSING_DEPENDENCY ;;
65896     esac
65897 
65898     if test "x$PKGHANDLER_COMMAND" != x; then
65899       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65900     fi
65901   fi
65902 
65903       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
65904     fi
65905 
65906     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
65907 $as_echo_n "checking if libffi works... " >&6; }
65908     ac_ext=c
65909 ac_cpp='$CPP $CPPFLAGS'
65910 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65911 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65912 ac_compiler_gnu=$ac_cv_c_compiler_gnu
65913 
65914     OLD_CFLAGS="$CFLAGS"
65915     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
65916     OLD_LIBS="$LIBS"
65917     LIBS="$LIBS $LIBFFI_LIBS"
65918     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65919 /* end confdefs.h.  */
65920 #include <ffi.h>
65921 int
65922 main ()
65923 {
65924 
65925           ffi_call(NULL, NULL, NULL, NULL);
65926           return 0;
65927 
65928   ;
65929   return 0;
65930 }
65931 _ACEOF
65932 if ac_fn_c_try_link "$LINENO"; then :
65933   LIBFFI_WORKS=yes
65934 else
65935   LIBFFI_WORKS=no
65936 
65937 fi
65938 rm -f core conftest.err conftest.$ac_objext \
65939     conftest$ac_exeext conftest.$ac_ext
65940     CFLAGS="$OLD_CFLAGS"
65941     LIBS="$OLD_LIBS"
65942     ac_ext=cpp
65943 ac_cpp='$CXXCPP $CPPFLAGS'
65944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65945 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65947 
65948     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
65949 $as_echo "$LIBFFI_WORKS" >&6; }
65950 
65951     if test "x$LIBFFI_WORKS" = xno; then
65952 
65953   # Print a helpful message on how to acquire the necessary build dependency.
65954   # ffi is the help tag: freetype, cups, alsa etc
65955   MISSING_DEPENDENCY=ffi
65956 
65957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65958     cygwin_help $MISSING_DEPENDENCY
65959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65960     msys_help $MISSING_DEPENDENCY
65961   else
65962     PKGHANDLER_COMMAND=
65963 
65964     case $PKGHANDLER in
65965       apt-get)
65966         apt_help     $MISSING_DEPENDENCY ;;
65967       yum)
65968         yum_help     $MISSING_DEPENDENCY ;;
65969       brew)
65970         brew_help    $MISSING_DEPENDENCY ;;
65971       port)
65972         port_help    $MISSING_DEPENDENCY ;;
65973       pkgutil)
65974         pkgutil_help $MISSING_DEPENDENCY ;;
65975       pkgadd)
65976         pkgadd_help  $MISSING_DEPENDENCY ;;
65977     esac
65978 
65979     if test "x$PKGHANDLER_COMMAND" != x; then
65980       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65981     fi
65982   fi
65983 
65984       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
65985     fi
65986 
65987     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
65988 $as_echo_n "checking if libffi should be bundled... " >&6; }
65989     if test "x$enable_libffi_bundling" = "x"; then
65990       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65991 $as_echo "no" >&6; }
65992       ENABLE_LIBFFI_BUNDLING=false
65993     elif  test "x$enable_libffi_bundling" = "xno"; then
65994       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65995 $as_echo "no, forced" >&6; }
65996       ENABLE_LIBFFI_BUNDLING=false
65997     elif  test "x$enable_libffi_bundling" = "xyes"; then
65998       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65999 $as_echo "yes, forced" >&6; }
66000       ENABLE_LIBFFI_BUNDLING=true
66001     else
66002       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
66003     fi
66004 
66005     # Find the libffi.so.X to bundle
66006     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
66007       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
66008 $as_echo_n "checking for libffi lib file location... " >&6; }
66009       if test "x${LIBFFI_LIB_PATH}" != x; then
66010         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
66011           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
66012         else
66013           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
66014         fi
66015       else
66016         # If we don't have an explicit path, look in a few obvious places
66017         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
66018           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
66019             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
66020           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
66021             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
66022           else
66023             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
66024           fi
66025         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
66026           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
66027             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
66028           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
66029             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
66030           else
66031             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
66032           fi
66033         else
66034           # Fallback on the default /usr/lib dir
66035           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
66036             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
66037           else
66038             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
66039           fi
66040         fi
66041       fi
66042       # Make sure the wildcard is evaluated
66043       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
66044       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
66045 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
66046     fi
66047   fi
66048 
66049 
66050 
66051 
66052 
66053 
66054 
66055 
66056 # Check whether --with-libjpeg was given.
66057 if test "${with_libjpeg+set}" = set; then :
66058   withval=$with_libjpeg;
66059 fi
66060 
66061 
66062   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
66063 $as_echo_n "checking for which libjpeg to use... " >&6; }
66064   # default is bundled
66065   DEFAULT_LIBJPEG=bundled
66066   # if user didn't specify, use DEFAULT_LIBJPEG
66067   if test "x${with_libjpeg}" = "x"; then
66068     with_libjpeg=${DEFAULT_LIBJPEG}
66069   fi
66070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
66071 $as_echo "${with_libjpeg}" >&6; }
66072 
66073   if test "x${with_libjpeg}" = "xbundled"; then
66074     USE_EXTERNAL_LIBJPEG=false
66075   elif test "x${with_libjpeg}" = "xsystem"; then
66076     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
66077 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
66078 
66079 else
66080    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
66081 fi
66082 
66083 
66084     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
66085 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
66086 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
66087   $as_echo_n "(cached) " >&6
66088 else
66089   ac_check_lib_save_LIBS=$LIBS
66090 LIBS="-ljpeg  $LIBS"
66091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66092 /* end confdefs.h.  */
66093 
66094 /* Override any GCC internal prototype to avoid an error.
66095    Use char because int might match the return type of a GCC
66096    builtin and then its argument prototype would still apply.  */
66097 #ifdef __cplusplus
66098 extern "C"
66099 #endif
66100 char jpeg_CreateDecompress ();
66101 int
66102 main ()
66103 {
66104 return jpeg_CreateDecompress ();
66105   ;
66106   return 0;
66107 }
66108 _ACEOF
66109 if ac_fn_cxx_try_link "$LINENO"; then :
66110   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
66111 else
66112   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
66113 fi
66114 rm -f core conftest.err conftest.$ac_objext \
66115     conftest$ac_exeext conftest.$ac_ext
66116 LIBS=$ac_check_lib_save_LIBS
66117 fi
66118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
66119 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
66120 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
66121   cat >>confdefs.h <<_ACEOF
66122 #define HAVE_LIBJPEG 1
66123 _ACEOF
66124 
66125   LIBS="-ljpeg $LIBS"
66126 
66127 else
66128    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
66129 fi
66130 
66131 
66132     USE_EXTERNAL_LIBJPEG=true
66133   else
66134     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
66135   fi
66136 
66137 
66138 
66139 
66140 
66141 # Check whether --with-giflib was given.
66142 if test "${with_giflib+set}" = set; then :
66143   withval=$with_giflib;
66144 fi
66145 
66146 
66147   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
66148 $as_echo_n "checking for which giflib to use... " >&6; }
66149   # default is bundled
66150   DEFAULT_GIFLIB=bundled
66151   # if user didn't specify, use DEFAULT_GIFLIB
66152   if test "x${with_giflib}" = "x"; then
66153     with_giflib=${DEFAULT_GIFLIB}
66154   fi
66155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
66156 $as_echo "${with_giflib}" >&6; }
66157 
66158   if test "x${with_giflib}" = "xbundled"; then
66159     USE_EXTERNAL_LIBGIF=false
66160   elif test "x${with_giflib}" = "xsystem"; then
66161     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
66162 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
66163 
66164 else
66165    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
66166 fi
66167 
66168 
66169     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
66170 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
66171 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
66172   $as_echo_n "(cached) " >&6
66173 else
66174   ac_check_lib_save_LIBS=$LIBS
66175 LIBS="-lgif  $LIBS"
66176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66177 /* end confdefs.h.  */
66178 
66179 /* Override any GCC internal prototype to avoid an error.
66180    Use char because int might match the return type of a GCC
66181    builtin and then its argument prototype would still apply.  */
66182 #ifdef __cplusplus
66183 extern "C"
66184 #endif
66185 char DGifGetCode ();
66186 int
66187 main ()
66188 {
66189 return DGifGetCode ();
66190   ;
66191   return 0;
66192 }
66193 _ACEOF
66194 if ac_fn_cxx_try_link "$LINENO"; then :
66195   ac_cv_lib_gif_DGifGetCode=yes
66196 else
66197   ac_cv_lib_gif_DGifGetCode=no
66198 fi
66199 rm -f core conftest.err conftest.$ac_objext \
66200     conftest$ac_exeext conftest.$ac_ext
66201 LIBS=$ac_check_lib_save_LIBS
66202 fi
66203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
66204 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
66205 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
66206   cat >>confdefs.h <<_ACEOF
66207 #define HAVE_LIBGIF 1
66208 _ACEOF
66209 
66210   LIBS="-lgif $LIBS"
66211 
66212 else
66213    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
66214 fi
66215 
66216 
66217     USE_EXTERNAL_LIBGIF=true
66218   else
66219     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
66220   fi
66221 
66222 
66223 
66224 
66225 
66226 # Check whether --with-libpng was given.
66227 if test "${with_libpng+set}" = set; then :
66228   withval=$with_libpng;
66229 fi
66230 
66231 
66232 
66233 pkg_failed=no
66234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
66235 $as_echo_n "checking for PNG... " >&6; }
66236 
66237 if test -n "$PNG_CFLAGS"; then
66238     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
66239  elif test -n "$PKG_CONFIG"; then
66240     if test -n "$PKG_CONFIG" && \
66241     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
66242   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
66243   ac_status=$?
66244   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66245   test $ac_status = 0; }; then
66246   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
66247 else
66248   pkg_failed=yes
66249 fi
66250  else
66251     pkg_failed=untried
66252 fi
66253 if test -n "$PNG_LIBS"; then
66254     pkg_cv_PNG_LIBS="$PNG_LIBS"
66255  elif test -n "$PKG_CONFIG"; then
66256     if test -n "$PKG_CONFIG" && \
66257     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
66258   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
66259   ac_status=$?
66260   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66261   test $ac_status = 0; }; then
66262   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
66263 else
66264   pkg_failed=yes
66265 fi
66266  else
66267     pkg_failed=untried
66268 fi
66269 
66270 
66271 
66272 if test $pkg_failed = yes; then
66273 
66274 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
66275         _pkg_short_errors_supported=yes
66276 else
66277         _pkg_short_errors_supported=no
66278 fi
66279         if test $_pkg_short_errors_supported = yes; then
66280                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
66281         else
66282                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
66283         fi
66284         # Put the nasty error message in config.log where it belongs
66285         echo "$PNG_PKG_ERRORS" >&5
66286 
66287         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66288 $as_echo "no" >&6; }
66289                 LIBPNG_FOUND=no
66290 elif test $pkg_failed = untried; then
66291         LIBPNG_FOUND=no
66292 else
66293         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
66294         PNG_LIBS=$pkg_cv_PNG_LIBS
66295         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66296 $as_echo "yes" >&6; }
66297         LIBPNG_FOUND=yes
66298 fi
66299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
66300 $as_echo_n "checking for which libpng to use... " >&6; }
66301 
66302   # default is bundled
66303   DEFAULT_LIBPNG=bundled
66304   # if user didn't specify, use DEFAULT_LIBPNG
66305   if test "x${with_libpng}" = "x"; then
66306     with_libpng=${DEFAULT_LIBPNG}
66307   fi
66308 
66309   if test "x${with_libpng}" = "xbundled"; then
66310     USE_EXTERNAL_LIBPNG=false
66311     PNG_CFLAGS=""
66312     PNG_LIBS=""
66313     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
66314 $as_echo "bundled" >&6; }
66315   elif test "x${with_libpng}" = "xsystem"; then
66316     if test "x${LIBPNG_FOUND}" = "xyes"; then
66317       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
66318       USE_EXTERNAL_LIBPNG=true
66319       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
66320 $as_echo "system" >&6; }
66321     else
66322       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
66323 $as_echo "system not found" >&6; }
66324       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
66325     fi
66326   else
66327     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
66328   fi
66329 
66330 
66331 
66332 
66333 
66334 
66335 
66336 # Check whether --with-zlib was given.
66337 if test "${with_zlib+set}" = set; then :
66338   withval=$with_zlib;
66339 fi
66340 
66341 
66342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
66343 $as_echo_n "checking for compress in -lz... " >&6; }
66344 if ${ac_cv_lib_z_compress+:} false; then :
66345   $as_echo_n "(cached) " >&6
66346 else
66347   ac_check_lib_save_LIBS=$LIBS
66348 LIBS="-lz  $LIBS"
66349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66350 /* end confdefs.h.  */
66351 
66352 /* Override any GCC internal prototype to avoid an error.
66353    Use char because int might match the return type of a GCC
66354    builtin and then its argument prototype would still apply.  */
66355 #ifdef __cplusplus
66356 extern "C"
66357 #endif
66358 char compress ();
66359 int
66360 main ()
66361 {
66362 return compress ();
66363   ;
66364   return 0;
66365 }
66366 _ACEOF
66367 if ac_fn_cxx_try_link "$LINENO"; then :
66368   ac_cv_lib_z_compress=yes
66369 else
66370   ac_cv_lib_z_compress=no
66371 fi
66372 rm -f core conftest.err conftest.$ac_objext \
66373     conftest$ac_exeext conftest.$ac_ext
66374 LIBS=$ac_check_lib_save_LIBS
66375 fi
66376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
66377 $as_echo "$ac_cv_lib_z_compress" >&6; }
66378 if test "x$ac_cv_lib_z_compress" = xyes; then :
66379    ZLIB_FOUND=yes
66380 else
66381    ZLIB_FOUND=no
66382 fi
66383 
66384 
66385   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
66386 $as_echo_n "checking for which zlib to use... " >&6; }
66387 
66388   DEFAULT_ZLIB=system
66389   if test "x$OPENJDK_TARGET_OS" = xwindows; then
66390     # On windows default is bundled...on others default is system
66391     DEFAULT_ZLIB=bundled
66392   fi
66393 
66394   if test "x${ZLIB_FOUND}" != "xyes"; then
66395     # If we don't find any system...set default to bundled
66396     DEFAULT_ZLIB=bundled
66397   fi
66398 
66399   # If user didn't specify, use DEFAULT_ZLIB
66400   if test "x${with_zlib}" = "x"; then
66401     with_zlib=${DEFAULT_ZLIB}
66402   fi
66403 
66404   if test "x${with_zlib}" = "xbundled"; then
66405     USE_EXTERNAL_LIBZ=false
66406     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
66407 $as_echo "bundled" >&6; }
66408   elif test "x${with_zlib}" = "xsystem"; then
66409     if test "x${ZLIB_FOUND}" = "xyes"; then
66410       USE_EXTERNAL_LIBZ=true
66411       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
66412 $as_echo "system" >&6; }
66413 
66414       if test "x$USE_EXTERNAL_LIBPNG" != "xtrue"; then
66415         # If we use bundled libpng, we must verify that we have a proper zlib.
66416         # For instance zlib-ng has had issues with inflateValidate().
66417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system zlib functionality" >&5
66418 $as_echo_n "checking for system zlib functionality... " >&6; }
66419         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66420 /* end confdefs.h.  */
66421 #include "zlib.h"
66422 int
66423 main ()
66424 {
66425 
66426                 #if ZLIB_VERNUM >= 0x1281
66427                   inflateValidate(NULL, 0);
66428                 #endif
66429 
66430   ;
66431   return 0;
66432 }
66433 _ACEOF
66434 if ac_fn_cxx_try_compile "$LINENO"; then :
66435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
66436 $as_echo "ok" >&6; }
66437 else
66438 
66439                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not ok" >&5
66440 $as_echo "not ok" >&6; }
66441                 as_fn_error $? "System zlib not working correctly" "$LINENO" 5
66442 
66443 
66444 fi
66445 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66446       fi
66447     else
66448       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
66449 $as_echo "system not found" >&6; }
66450       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
66451     fi
66452   else
66453     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
66454   fi
66455 
66456 
66457 
66458 
66459 
66460 # Check whether --with-lcms was given.
66461 if test "${with_lcms+set}" = set; then :
66462   withval=$with_lcms;
66463 fi
66464 
66465 
66466   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
66467 $as_echo_n "checking for which lcms to use... " >&6; }
66468 
66469   DEFAULT_LCMS=bundled
66470   # If user didn't specify, use DEFAULT_LCMS
66471   if test "x${with_lcms}" = "x"; then
66472     with_lcms=${DEFAULT_LCMS}
66473   fi
66474 
66475   if test "x${with_lcms}" = "xbundled"; then
66476     USE_EXTERNAL_LCMS=false
66477     LCMS_CFLAGS=""
66478     LCMS_LIBS=""
66479     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
66480 $as_echo "bundled" >&6; }
66481   elif test "x${with_lcms}" = "xsystem"; then
66482     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
66483 $as_echo "system" >&6; }
66484 
66485 pkg_failed=no
66486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
66487 $as_echo_n "checking for LCMS... " >&6; }
66488 
66489 if test -n "$LCMS_CFLAGS"; then
66490     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
66491  elif test -n "$PKG_CONFIG"; then
66492     if test -n "$PKG_CONFIG" && \
66493     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
66494   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
66495   ac_status=$?
66496   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66497   test $ac_status = 0; }; then
66498   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
66499 else
66500   pkg_failed=yes
66501 fi
66502  else
66503     pkg_failed=untried
66504 fi
66505 if test -n "$LCMS_LIBS"; then
66506     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
66507  elif test -n "$PKG_CONFIG"; then
66508     if test -n "$PKG_CONFIG" && \
66509     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
66510   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
66511   ac_status=$?
66512   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66513   test $ac_status = 0; }; then
66514   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
66515 else
66516   pkg_failed=yes
66517 fi
66518  else
66519     pkg_failed=untried
66520 fi
66521 
66522 
66523 
66524 if test $pkg_failed = yes; then
66525 
66526 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
66527         _pkg_short_errors_supported=yes
66528 else
66529         _pkg_short_errors_supported=no
66530 fi
66531         if test $_pkg_short_errors_supported = yes; then
66532                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
66533         else
66534                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
66535         fi
66536         # Put the nasty error message in config.log where it belongs
66537         echo "$LCMS_PKG_ERRORS" >&5
66538 
66539         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66540 $as_echo "no" >&6; }
66541                 LCMS_FOUND=no
66542 elif test $pkg_failed = untried; then
66543         LCMS_FOUND=no
66544 else
66545         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
66546         LCMS_LIBS=$pkg_cv_LCMS_LIBS
66547         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66548 $as_echo "yes" >&6; }
66549         LCMS_FOUND=yes
66550 fi
66551     if test "x${LCMS_FOUND}" = "xyes"; then
66552       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
66553       USE_EXTERNAL_LCMS=true
66554     else
66555       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
66556     fi
66557   else
66558     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
66559   fi
66560 
66561 
66562 
66563 
66564 
66565 
66566 
66567 
66568 
66569 
66570 
66571 
66572 
66573   # Setup libm (the maths library)
66574   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
66575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
66576 $as_echo_n "checking for cos in -lm... " >&6; }
66577 if ${ac_cv_lib_m_cos+:} false; then :
66578   $as_echo_n "(cached) " >&6
66579 else
66580   ac_check_lib_save_LIBS=$LIBS
66581 LIBS="-lm  $LIBS"
66582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66583 /* end confdefs.h.  */
66584 
66585 /* Override any GCC internal prototype to avoid an error.
66586    Use char because int might match the return type of a GCC
66587    builtin and then its argument prototype would still apply.  */
66588 #ifdef __cplusplus
66589 extern "C"
66590 #endif
66591 char cos ();
66592 int
66593 main ()
66594 {
66595 return cos ();
66596   ;
66597   return 0;
66598 }
66599 _ACEOF
66600 if ac_fn_cxx_try_link "$LINENO"; then :
66601   ac_cv_lib_m_cos=yes
66602 else
66603   ac_cv_lib_m_cos=no
66604 fi
66605 rm -f core conftest.err conftest.$ac_objext \
66606     conftest$ac_exeext conftest.$ac_ext
66607 LIBS=$ac_check_lib_save_LIBS
66608 fi
66609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
66610 $as_echo "$ac_cv_lib_m_cos" >&6; }
66611 if test "x$ac_cv_lib_m_cos" = xyes; then :
66612   cat >>confdefs.h <<_ACEOF
66613 #define HAVE_LIBM 1
66614 _ACEOF
66615 
66616   LIBS="-lm $LIBS"
66617 
66618 else
66619 
66620         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
66621 $as_echo "$as_me: Maths library was not found" >&6;}
66622 
66623 fi
66624 
66625     LIBM="-lm"
66626   else
66627     LIBM=""
66628   fi
66629 
66630 
66631   # Setup libdl (for dynamic library loading)
66632   save_LIBS="$LIBS"
66633   LIBS=""
66634   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
66635 $as_echo_n "checking for dlopen in -ldl... " >&6; }
66636 if ${ac_cv_lib_dl_dlopen+:} false; then :
66637   $as_echo_n "(cached) " >&6
66638 else
66639   ac_check_lib_save_LIBS=$LIBS
66640 LIBS="-ldl  $LIBS"
66641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66642 /* end confdefs.h.  */
66643 
66644 /* Override any GCC internal prototype to avoid an error.
66645    Use char because int might match the return type of a GCC
66646    builtin and then its argument prototype would still apply.  */
66647 #ifdef __cplusplus
66648 extern "C"
66649 #endif
66650 char dlopen ();
66651 int
66652 main ()
66653 {
66654 return dlopen ();
66655   ;
66656   return 0;
66657 }
66658 _ACEOF
66659 if ac_fn_cxx_try_link "$LINENO"; then :
66660   ac_cv_lib_dl_dlopen=yes
66661 else
66662   ac_cv_lib_dl_dlopen=no
66663 fi
66664 rm -f core conftest.err conftest.$ac_objext \
66665     conftest$ac_exeext conftest.$ac_ext
66666 LIBS=$ac_check_lib_save_LIBS
66667 fi
66668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
66669 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
66670 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
66671   cat >>confdefs.h <<_ACEOF
66672 #define HAVE_LIBDL 1
66673 _ACEOF
66674 
66675   LIBS="-ldl $LIBS"
66676 
66677 fi
66678 
66679   LIBDL="$LIBS"
66680 
66681   LIBS="$save_LIBS"
66682 
66683   # Deprecated libraries, keep the flags for backwards compatibility
66684   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
66685 
66686 
66687 # Check whether --with-dxsdk was given.
66688 if test "${with_dxsdk+set}" = set; then :
66689   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
66690 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
66691 fi
66692 
66693 
66694 
66695 
66696 # Check whether --with-dxsdk-lib was given.
66697 if test "${with_dxsdk_lib+set}" = set; then :
66698   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
66699 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
66700 fi
66701 
66702 
66703 
66704 
66705 # Check whether --with-dxsdk-include was given.
66706 if test "${with_dxsdk_include+set}" = set; then :
66707   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
66708 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
66709 fi
66710 
66711 
66712   fi
66713 
66714   # Control if libzip can use mmap. Available for purposes of overriding.
66715   LIBZIP_CAN_USE_MMAP=true
66716 
66717 
66718 
66719   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
66720     # Find the root of the Solaris Studio installation from the compiler path
66721     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
66722     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
66723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
66724 $as_echo_n "checking for libstlport.so.1... " >&6; }
66725     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
66726       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
66727       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
66728     fi
66729     if test -f "$STLPORT_LIB"; then
66730       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
66731 $as_echo "yes, $STLPORT_LIB" >&6; }
66732 
66733   # Only process if variable expands to non-empty
66734 
66735   if test "x$STLPORT_LIB" != x; then
66736     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66737 
66738   # Input might be given as Windows format, start by converting to
66739   # unix format.
66740   path="$STLPORT_LIB"
66741   new_path=`$CYGPATH -u "$path"`
66742 
66743   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
66744   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
66745   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
66746   # "foo.exe" is OK but "foo" is an error.
66747   #
66748   # This test is therefore slightly more accurate than "test -f" to check for file precense.
66749   # It is also a way to make sure we got the proper file name for the real test later on.
66750   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
66751   if test "x$test_shortpath" = x; then
66752     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
66753 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
66754     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
66755   fi
66756 
66757   # Call helper function which possibly converts this using DOS-style short mode.
66758   # If so, the updated path is stored in $new_path.
66759 
66760   input_path="$new_path"
66761   # Check if we need to convert this using DOS-style short mode. If the path
66762   # contains just simple characters, use it. Otherwise (spaces, weird characters),
66763   # take no chances and rewrite it.
66764   # Note: m4 eats our [], so we need to use [ and ] instead.
66765   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
66766   if test "x$has_forbidden_chars" != x; then
66767     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
66768     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
66769     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
66770     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
66771       # Going to short mode and back again did indeed matter. Since short mode is
66772       # case insensitive, let's make it lowercase to improve readability.
66773       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
66774       # Now convert it back to Unix-style (cygpath)
66775       input_path=`$CYGPATH -u "$shortmode_path"`
66776       new_path="$input_path"
66777     fi
66778   fi
66779 
66780   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
66781   if test "x$test_cygdrive_prefix" = x; then
66782     # As a simple fix, exclude /usr/bin since it's not a real path.
66783     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
66784       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
66785       # a path prefixed by /cygdrive for fixpath to work.
66786       new_path="$CYGWIN_ROOT_PATH$input_path"
66787     fi
66788   fi
66789 
66790 
66791   if test "x$path" != "x$new_path"; then
66792     STLPORT_LIB="$new_path"
66793     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
66794 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
66795   fi
66796 
66797     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66798 
66799   path="$STLPORT_LIB"
66800   has_colon=`$ECHO $path | $GREP ^.:`
66801   new_path="$path"
66802   if test "x$has_colon" = x; then
66803     # Not in mixed or Windows style, start by that.
66804     new_path=`cmd //c echo $path`
66805   fi
66806 
66807 
66808   input_path="$new_path"
66809   # Check if we need to convert this using DOS-style short mode. If the path
66810   # contains just simple characters, use it. Otherwise (spaces, weird characters),
66811   # take no chances and rewrite it.
66812   # Note: m4 eats our [], so we need to use [ and ] instead.
66813   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
66814   if test "x$has_forbidden_chars" != x; then
66815     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
66816     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
66817   fi
66818 
66819 
66820   windows_path="$new_path"
66821   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66822     unix_path=`$CYGPATH -u "$windows_path"`
66823     new_path="$unix_path"
66824   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66825     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
66826     new_path="$unix_path"
66827   fi
66828 
66829   if test "x$path" != "x$new_path"; then
66830     STLPORT_LIB="$new_path"
66831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
66832 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
66833   fi
66834 
66835   # Save the first 10 bytes of this path to the storage, so fixpath can work.
66836   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
66837 
66838     else
66839       # We're on a unix platform. Hooray! :)
66840       path="$STLPORT_LIB"
66841       has_space=`$ECHO "$path" | $GREP " "`
66842       if test "x$has_space" != x; then
66843         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
66844 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
66845         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
66846       fi
66847 
66848       # Use eval to expand a potential ~
66849       eval path="$path"
66850       if test ! -f "$path" && test ! -d "$path"; then
66851         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
66852       fi
66853 
66854       if test -d "$path"; then
66855         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
66856       else
66857         dir="`$DIRNAME "$path"`"
66858         base="`$BASENAME "$path"`"
66859         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
66860       fi
66861     fi
66862   fi
66863 
66864     else
66865       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
66866 $as_echo "no, not found at $STLPORT_LIB" >&6; }
66867       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
66868     fi
66869 
66870   fi
66871 
66872 
66873 
66874 
66875 
66876 
66877 
66878 
66879 
66880 
66881 
66882 
66883 
66884 
66885 # Hotspot setup depends on lib checks.
66886 
66887 
66888   # The user can in some cases supply additional jvm features. For the custom
66889   # variant, this defines the entire variant.
66890 
66891 # Check whether --with-jvm-features was given.
66892 if test "${with_jvm_features+set}" = set; then :
66893   withval=$with_jvm_features;
66894 fi
66895 
66896   if test "x$with_jvm_features" != x; then
66897     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
66898 $as_echo_n "checking additional JVM features... " >&6; }
66899     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
66900     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
66901 $as_echo "$JVM_FEATURES" >&6; }
66902   fi
66903 
66904   # Override hotspot cpu definitions for ARM platforms
66905   if test "x$OPENJDK_TARGET_CPU" = xarm; then
66906     HOTSPOT_TARGET_CPU=arm_32
66907     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
66908     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
66909     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
66910   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
66911     HOTSPOT_TARGET_CPU=arm_64
66912     HOTSPOT_TARGET_CPU_ARCH=arm
66913     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
66914     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
66915   fi
66916 
66917   # Verify that dependencies are met for explicitly set features.
66918   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
66919     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
66920   fi
66921 
66922   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
66923     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
66924   fi
66925 
66926   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
66927     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
66928   fi
66929 
66930   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
66931     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
66932   fi
66933 
66934   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
66935     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
66936   fi
66937 
66938   # Turn on additional features based on other parts of configure
66939   if test "x$INCLUDE_DTRACE" = "xtrue"; then
66940     JVM_FEATURES="$JVM_FEATURES dtrace"
66941   else
66942     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
66943       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
66944     fi
66945   fi
66946 
66947   if test "x$STATIC_BUILD" = "xtrue"; then
66948     JVM_FEATURES="$JVM_FEATURES static-build"
66949   else
66950     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
66951       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
66952     fi
66953   fi
66954 
66955   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
66956     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
66957       as_fn_error $? "To enable zero, you must use --with-jvm-variants=zero" "$LINENO" 5
66958     fi
66959   fi
66960 
66961   # Only enable jvmci on x86_64, sparcv9 and aarch64.
66962   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
66963      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
66964      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
66965     JVM_FEATURES_jvmci="jvmci"
66966   else
66967     JVM_FEATURES_jvmci=""
66968   fi
66969 
66970   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
66971 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
66972   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
66973     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
66974 $as_echo "yes, forced" >&6; }
66975     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
66976       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
66977     fi
66978     INCLUDE_GRAAL="true"
66979   else
66980     # By default enable graal build on linux-x64 or where AOT is available.
66981     # graal build requires jvmci.
66982     if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
66983         (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
66984          test "x$OPENJDK_TARGET_OS" = "xlinux" || \
66985          test "x$ENABLE_AOT" = "xtrue") ; then
66986       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66987 $as_echo "yes" >&6; }
66988       JVM_FEATURES_graal="graal"
66989       INCLUDE_GRAAL="true"
66990     else
66991       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66992 $as_echo "no" >&6; }
66993       JVM_FEATURES_graal=""
66994       INCLUDE_GRAAL="false"
66995     fi
66996   fi
66997 
66998 
66999 
67000   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
67001 $as_echo_n "checking if aot should be enabled... " >&6; }
67002   if test "x$ENABLE_AOT" = "xtrue"; then
67003     if test "x$enable_aot" = "xyes"; then
67004       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67005 $as_echo "yes, forced" >&6; }
67006     else
67007       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67008 $as_echo "yes" >&6; }
67009     fi
67010     JVM_FEATURES_aot="aot"
67011   else
67012     if test "x$enable_aot" = "xno"; then
67013       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67014 $as_echo "no, forced" >&6; }
67015     else
67016       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67017 $as_echo "no" >&6; }
67018     fi
67019     JVM_FEATURES_aot=""
67020   fi
67021 
67022   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
67023     # Default to use link time optimizations on minimal on arm
67024     JVM_FEATURES_link_time_opt="link-time-opt"
67025   else
67026     JVM_FEATURES_link_time_opt=""
67027   fi
67028 
67029   # All variants but minimal (and custom) get these features
67030   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
67031   if test "x$ENABLE_CDS" = "xtrue"; then
67032     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
67033   fi
67034 
67035   # Enable features depending on variant.
67036   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
67037   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
67038   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
67039   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
67040   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
67041   JVM_FEATURES_custom="$JVM_FEATURES"
67042 
67043 
67044 
67045 
67046 
67047 
67048 
67049 
67050   # Used for verification of Makefiles by check-jvm-feature
67051 
67052 
67053   # We don't support --with-jvm-interpreter anymore, use zero instead.
67054 
67055 
67056 # Check whether --with-jvm-interpreter was given.
67057 if test "${with_jvm_interpreter+set}" = set; then :
67058   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
67059 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
67060 fi
67061 
67062 
67063 
67064 
67065 ###############################################################################
67066 #
67067 # We need to do some final tweaking, when everything else is done.
67068 #
67069 ###############################################################################
67070 
67071 
67072   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
67073 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
67074 
67075   if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then
67076     ENABLE_INTREE_EC=true
67077     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67078 $as_echo "yes" >&6; }
67079   else
67080     ENABLE_INTREE_EC=false
67081     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67082 $as_echo "no" >&6; }
67083   fi
67084 
67085 
67086 
67087 
67088   # Check whether --enable-jtreg-failure-handler was given.
67089 if test "${enable_jtreg_failure_handler+set}" = set; then :
67090   enableval=$enable_jtreg_failure_handler;
67091 fi
67092 
67093 
67094   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
67095 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
67096 
67097   if test "x$enable_jtreg_failure_handler" = "xyes"; then
67098     if test "x$JT_HOME" = "x"; then
67099       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
67100     else
67101       BUILD_FAILURE_HANDLER=true
67102       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67103 $as_echo "yes, forced" >&6; }
67104     fi
67105   elif test "x$enable_jtreg_failure_handler" = "xno"; then
67106     BUILD_FAILURE_HANDLER=false
67107     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67108 $as_echo "no, forced" >&6; }
67109   elif test "x$enable_jtreg_failure_handler" = "xauto" \
67110       || test "x$enable_jtreg_failure_handler" = "x"; then
67111     if test "x$JT_HOME" = "x"; then
67112       BUILD_FAILURE_HANDLER=false
67113       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
67114 $as_echo "no, missing jtreg" >&6; }
67115     else
67116       BUILD_FAILURE_HANDLER=true
67117       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
67118 $as_echo "yes, jtreg present" >&6; }
67119     fi
67120   else
67121     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
67122   fi
67123 
67124 
67125 
67126 
67127   # Check whether --enable-generate-classlist was given.
67128 if test "${enable_generate_classlist+set}" = set; then :
67129   enableval=$enable_generate_classlist;
67130 fi
67131 
67132 
67133   # Check if it's likely that it's possible to generate the classlist. Depending
67134   # on exact jvm configuration it could be possible anyway.
67135   if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
67136     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
67137   else
67138     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
67139   fi
67140 
67141   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
67142 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
67143   if test "x$enable_generate_classlist" = "xyes"; then
67144     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67145 $as_echo "yes, forced" >&6; }
67146     ENABLE_GENERATE_CLASSLIST="true"
67147     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
67148       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&5
67149 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
67150     fi
67151   elif test "x$enable_generate_classlist" = "xno"; then
67152     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67153 $as_echo "no, forced" >&6; }
67154     ENABLE_GENERATE_CLASSLIST="false"
67155   elif test "x$enable_generate_classlist" = "x"; then
67156     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
67157       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67158 $as_echo "yes" >&6; }
67159       ENABLE_GENERATE_CLASSLIST="true"
67160     else
67161       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67162 $as_echo "no" >&6; }
67163       ENABLE_GENERATE_CLASSLIST="false"
67164     fi
67165   else
67166     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
67167   fi
67168 
67169 
67170 
67171 
67172 ###############################################################################
67173 #
67174 # Configure parts of the build that only affect the build performance,
67175 # not the result.
67176 #
67177 ###############################################################################
67178 
67179 
67180   # How many cores do we have on this build system?
67181 
67182 # Check whether --with-num-cores was given.
67183 if test "${with_num_cores+set}" = set; then :
67184   withval=$with_num_cores;
67185 fi
67186 
67187   if test "x$with_num_cores" = x; then
67188     # The number of cores were not specified, try to probe them.
67189 
67190   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
67191 $as_echo_n "checking for number of cores... " >&6; }
67192   NUM_CORES=1
67193   FOUND_CORES=no
67194 
67195   if test -f /proc/cpuinfo; then
67196     # Looks like a Linux (or cygwin) system
67197     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
67198     FOUND_CORES=yes
67199   elif test -x /usr/sbin/psrinfo; then
67200     # Looks like a Solaris system
67201     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
67202     FOUND_CORES=yes
67203   elif test -x /usr/sbin/sysctl; then
67204     # Looks like a MacOSX system
67205     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
67206     FOUND_CORES=yes
67207   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
67208     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
67209     FOUND_CORES=yes
67210   elif test -n "$NUMBER_OF_PROCESSORS"; then
67211     # On windows, look in the env
67212     NUM_CORES=$NUMBER_OF_PROCESSORS
67213     FOUND_CORES=yes
67214   fi
67215 
67216   if test "x$FOUND_CORES" = xyes; then
67217     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
67218 $as_echo "$NUM_CORES" >&6; }
67219   else
67220     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
67221 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
67222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
67223 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
67224   fi
67225 
67226   else
67227     NUM_CORES=$with_num_cores
67228   fi
67229 
67230 
67231 
67232   # How much memory do we have on this build system?
67233 
67234 # Check whether --with-memory-size was given.
67235 if test "${with_memory_size+set}" = set; then :
67236   withval=$with_memory_size;
67237 fi
67238 
67239   if test "x$with_memory_size" = x; then
67240     # The memory size was not specified, try to probe it.
67241 
67242   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
67243 $as_echo_n "checking for memory size... " >&6; }
67244   # Default to 1024 MB
67245   MEMORY_SIZE=1024
67246   FOUND_MEM=no
67247 
67248   if test -f /proc/meminfo; then
67249     # Looks like a Linux (or cygwin) system
67250     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
67251     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
67252     FOUND_MEM=yes
67253   elif test -x /usr/sbin/prtconf; then
67254     # Looks like a Solaris or AIX system
67255     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
67256     FOUND_MEM=yes
67257   elif test -x /usr/sbin/sysctl; then
67258     # Looks like a MacOSX system
67259     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
67260     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
67261     FOUND_MEM=yes
67262   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
67263     # Windows, but without cygwin
67264     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
67265     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
67266     FOUND_MEM=yes
67267   fi
67268 
67269   if test "x$FOUND_MEM" = xyes; then
67270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
67271 $as_echo "$MEMORY_SIZE MB" >&6; }
67272   else
67273     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
67274 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
67275     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
67276 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
67277   fi
67278 
67279   else
67280     MEMORY_SIZE=$with_memory_size
67281   fi
67282 
67283 
67284 
67285   # Provide a decent default number of parallel jobs for make depending on
67286   # number of cores, amount of memory and machine architecture.
67287 
67288 # Check whether --with-jobs was given.
67289 if test "${with_jobs+set}" = set; then :
67290   withval=$with_jobs;
67291 fi
67292 
67293   if test "x$with_jobs" = x; then
67294     # Number of jobs was not specified, calculate.
67295     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
67296 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
67297     # Approximate memory in GB.
67298     memory_gb=`expr $MEMORY_SIZE / 1024`
67299     # Pick the lowest of memory in gb and number of cores.
67300     if test "$memory_gb" -lt "$NUM_CORES"; then
67301       JOBS="$memory_gb"
67302     else
67303       JOBS="$NUM_CORES"
67304     fi
67305     if test "$JOBS" -eq "0"; then
67306       JOBS=1
67307     fi
67308     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
67309 $as_echo "$JOBS" >&6; }
67310   else
67311     JOBS=$with_jobs
67312   fi
67313 
67314 
67315 
67316   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
67317 
67318 # Check whether --with-test-jobs was given.
67319 if test "${with_test_jobs+set}" = set; then :
67320   withval=$with_test_jobs;
67321 fi
67322 
67323   if test "x$with_test_jobs" = x; then
67324       TEST_JOBS=0
67325   else
67326       TEST_JOBS=$with_test_jobs
67327   fi
67328 
67329 
67330 
67331 # Setup arguments for the boot jdk (after cores and memory have been setup)
67332 
67333   ##############################################################################
67334   #
67335   # Specify jvm options for anything that is run with the Boot JDK.
67336   # Not all JVM:s accept the same arguments on the command line.
67337   #
67338 
67339 # Check whether --with-boot-jdk-jvmargs was given.
67340 if test "${with_boot_jdk_jvmargs+set}" = set; then :
67341   withval=$with_boot_jdk_jvmargs;
67342 fi
67343 
67344 
67345   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
67346 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
67347 
67348   # Force en-US environment
67349 
67350   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
67351   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
67352   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
67353   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67354   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67355   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67356     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
67357     JVM_ARG_OK=true
67358   else
67359     $ECHO "Arg failed:" >&5
67360     $ECHO "$OUTPUT" >&5
67361     JVM_ARG_OK=false
67362   fi
67363 
67364 
67365   if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
67366     # Use our own CDS archive
67367 
67368   $ECHO "Check if jvm arg is ok: $boot_jdk_cds_args -Xshare:auto" >&5
67369   $ECHO "Command: $JAVA $boot_jdk_cds_args -Xshare:auto -version" >&5
67370   OUTPUT=`$JAVA $boot_jdk_cds_args -Xshare:auto -version 2>&1`
67371   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67372   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67373   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67374     boot_jdk_jvmargs="$boot_jdk_jvmargs $boot_jdk_cds_args -Xshare:auto"
67375     JVM_ARG_OK=true
67376   else
67377     $ECHO "Arg failed:" >&5
67378     $ECHO "$OUTPUT" >&5
67379     JVM_ARG_OK=false
67380   fi
67381 
67382   else
67383     # Otherwise optimistically use the system-wide one, if one is present
67384 
67385   $ECHO "Check if jvm arg is ok: -Xshare:auto" >&5
67386   $ECHO "Command: $JAVA -Xshare:auto -version" >&5
67387   OUTPUT=`$JAVA -Xshare:auto -version 2>&1`
67388   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67389   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67390   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67391     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xshare:auto"
67392     JVM_ARG_OK=true
67393   else
67394     $ECHO "Arg failed:" >&5
67395     $ECHO "$OUTPUT" >&5
67396     JVM_ARG_OK=false
67397   fi
67398 
67399   fi
67400 
67401   # Apply user provided options.
67402 
67403   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
67404   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
67405   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
67406   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67407   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67408   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67409     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
67410     JVM_ARG_OK=true
67411   else
67412     $ECHO "Arg failed:" >&5
67413     $ECHO "$OUTPUT" >&5
67414     JVM_ARG_OK=false
67415   fi
67416 
67417 
67418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
67419 $as_echo "$boot_jdk_jvmargs" >&6; }
67420 
67421   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
67422   JAVA_FLAGS=$boot_jdk_jvmargs
67423 
67424 
67425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
67426 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
67427 
67428   # Starting amount of heap memory.
67429 
67430   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
67431   $ECHO "Command: $JAVA -Xms64M -version" >&5
67432   OUTPUT=`$JAVA -Xms64M -version 2>&1`
67433   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67434   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67435   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67436     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
67437     JVM_ARG_OK=true
67438   else
67439     $ECHO "Arg failed:" >&5
67440     $ECHO "$OUTPUT" >&5
67441     JVM_ARG_OK=false
67442   fi
67443 
67444   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
67445 
67446   # Maximum amount of heap memory and stack size.
67447   JVM_HEAP_LIMIT_32="1024"
67448   # Running a 64 bit JVM allows for and requires a bigger heap
67449   JVM_HEAP_LIMIT_64="1600"
67450   STACK_SIZE_32=768
67451   STACK_SIZE_64=1536
67452   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
67453   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
67454     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
67455   fi
67456   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
67457     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
67458   fi
67459   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
67460     JVM_HEAP_LIMIT_32=512
67461     JVM_HEAP_LIMIT_64=512
67462   fi
67463 
67464   if test "x$BOOT_JDK_BITS" = "x32"; then
67465     STACK_SIZE=$STACK_SIZE_32
67466     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
67467   else
67468     STACK_SIZE=$STACK_SIZE_64
67469     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
67470   fi
67471 
67472   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
67473   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
67474   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
67475   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67476   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67477   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67478     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
67479     JVM_ARG_OK=true
67480   else
67481     $ECHO "Arg failed:" >&5
67482     $ECHO "$OUTPUT" >&5
67483     JVM_ARG_OK=false
67484   fi
67485 
67486 
67487   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
67488   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
67489   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
67490   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67491   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67492   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67493     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
67494     JVM_ARG_OK=true
67495   else
67496     $ECHO "Arg failed:" >&5
67497     $ECHO "$OUTPUT" >&5
67498     JVM_ARG_OK=false
67499   fi
67500 
67501 
67502   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
67503 $as_echo "$boot_jdk_jvmargs_big" >&6; }
67504 
67505   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
67506 
67507 
67508   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
67509     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
67510     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
67511   else
67512     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
67513     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
67514   fi
67515   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
67516   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
67517   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
67518 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
67519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
67520 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
67521 
67522 
67523   # By default, the main javac compilations use big
67524   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
67525 
67526 
67527   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
67528 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
67529 
67530   # Use serial gc for small short lived tools if possible
67531 
67532   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
67533   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
67534   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
67535   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67536   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67537   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67538     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
67539     JVM_ARG_OK=true
67540   else
67541     $ECHO "Arg failed:" >&5
67542     $ECHO "$OUTPUT" >&5
67543     JVM_ARG_OK=false
67544   fi
67545 
67546 
67547   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
67548   $ECHO "Command: $JAVA -Xms32M -version" >&5
67549   OUTPUT=`$JAVA -Xms32M -version 2>&1`
67550   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67551   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67552   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67553     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
67554     JVM_ARG_OK=true
67555   else
67556     $ECHO "Arg failed:" >&5
67557     $ECHO "$OUTPUT" >&5
67558     JVM_ARG_OK=false
67559   fi
67560 
67561 
67562   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
67563   $ECHO "Command: $JAVA -Xmx512M -version" >&5
67564   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
67565   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67566   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67567   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67568     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
67569     JVM_ARG_OK=true
67570   else
67571     $ECHO "Arg failed:" >&5
67572     $ECHO "$OUTPUT" >&5
67573     JVM_ARG_OK=false
67574   fi
67575 
67576 
67577   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
67578   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
67579   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
67580   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67581   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67582   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67583     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
67584     JVM_ARG_OK=true
67585   else
67586     $ECHO "Arg failed:" >&5
67587     $ECHO "$OUTPUT" >&5
67588     JVM_ARG_OK=false
67589   fi
67590 
67591 
67592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
67593 $as_echo "$boot_jdk_jvmargs_small" >&6; }
67594 
67595   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
67596 
67597 
67598   JAVA_TOOL_FLAGS_SMALL=""
67599   for f in $JAVA_FLAGS_SMALL; do
67600     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
67601   done
67602 
67603 
67604 
67605 # Setup smart javac (after cores and memory have been setup)
67606 
67607 
67608 # Check whether --with-sjavac-server-java was given.
67609 if test "${with_sjavac_server_java+set}" = set; then :
67610   withval=$with_sjavac_server_java;
67611 fi
67612 
67613 
67614   if test "x$with_sjavac_server_java" != x; then
67615     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
67616     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
67617     if test "x$FOUND_VERSION" = x; then
67618       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
67619     fi
67620   else
67621     SJAVAC_SERVER_JAVA="$JAVA"
67622   fi
67623 
67624 
67625   if test "$MEMORY_SIZE" -gt "3000"; then
67626     if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
67627       JVM_64BIT=true
67628     fi
67629   fi
67630 
67631   MX_VALUE=`expr $MEMORY_SIZE / 2`
67632   if test "$JVM_64BIT" = true; then
67633     # Set ms lower than mx since more than one instance of the server might
67634     # get launched at the same time before they figure out which instance won.
67635     MS_VALUE=512
67636     if test "$MX_VALUE" -gt "2048"; then
67637       MX_VALUE=2048
67638     fi
67639   else
67640     MS_VALUE=256
67641     if test "$MX_VALUE" -gt "1500"; then
67642       MX_VALUE=1500
67643     fi
67644   fi
67645   if test "$MX_VALUE" -lt "512"; then
67646     MX_VALUE=512
67647   fi
67648 
67649   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
67650   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
67651   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
67652   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67653   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67654   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67655     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
67656     JVM_ARG_OK=true
67657   else
67658     $ECHO "Arg failed:" >&5
67659     $ECHO "$OUTPUT" >&5
67660     JVM_ARG_OK=false
67661   fi
67662 
67663 
67664 
67665   # Check whether --enable-sjavac was given.
67666 if test "${enable_sjavac+set}" = set; then :
67667   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
67668 else
67669   ENABLE_SJAVAC="no"
67670 fi
67671 
67672   if test "x$JVM_ARG_OK" = "xfalse"; then
67673     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
67674 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
67675     ENABLE_SJAVAC="no"
67676   fi
67677   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
67678 $as_echo_n "checking whether to use sjavac... " >&6; }
67679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
67680 $as_echo "$ENABLE_SJAVAC" >&6; }
67681 
67682 
67683   # Check whether --enable-javac-server was given.
67684 if test "${enable_javac_server+set}" = set; then :
67685   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
67686 else
67687   ENABLE_JAVAC_SERVER="yes"
67688 fi
67689 
67690   if test "x$JVM_ARG_OK" = "xfalse"; then
67691     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
67692 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
67693     ENABLE_JAVAC_SERVER="no"
67694   fi
67695   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
67696 $as_echo_n "checking whether to use javac server... " >&6; }
67697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
67698 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
67699 
67700 
67701   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
67702     # When using a server javac, the small client instances do not need much
67703     # resources.
67704     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
67705   fi
67706 
67707 
67708 # Setup use of icecc if requested
67709 
67710   # Check whether --enable-icecc was given.
67711 if test "${enable_icecc+set}" = set; then :
67712   enableval=$enable_icecc;
67713 fi
67714 
67715 
67716   if test "x${enable_icecc}" = "xyes"; then
67717 
67718 
67719 
67720   # Publish this variable in the help.
67721 
67722 
67723   if [ -z "${ICECC_CMD+x}" ]; then
67724     # The variable is not set by user, try to locate tool using the code snippet
67725     for ac_prog in icecc
67726 do
67727   # Extract the first word of "$ac_prog", so it can be a program name with args.
67728 set dummy $ac_prog; ac_word=$2
67729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67730 $as_echo_n "checking for $ac_word... " >&6; }
67731 if ${ac_cv_path_ICECC_CMD+:} false; then :
67732   $as_echo_n "(cached) " >&6
67733 else
67734   case $ICECC_CMD in
67735   [\\/]* | ?:[\\/]*)
67736   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
67737   ;;
67738   *)
67739   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67740 for as_dir in $PATH
67741 do
67742   IFS=$as_save_IFS
67743   test -z "$as_dir" && as_dir=.
67744     for ac_exec_ext in '' $ac_executable_extensions; do
67745   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67746     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
67747     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67748     break 2
67749   fi
67750 done
67751   done
67752 IFS=$as_save_IFS
67753 
67754   ;;
67755 esac
67756 fi
67757 ICECC_CMD=$ac_cv_path_ICECC_CMD
67758 if test -n "$ICECC_CMD"; then
67759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
67760 $as_echo "$ICECC_CMD" >&6; }
67761 else
67762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67763 $as_echo "no" >&6; }
67764 fi
67765 
67766 
67767   test -n "$ICECC_CMD" && break
67768 done
67769 
67770   else
67771     # The variable is set, but is it from the command line or the environment?
67772 
67773     # Try to remove the string !ICECC_CMD! from our list.
67774     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
67775     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67776       # If it failed, the variable was not from the command line. Ignore it,
67777       # but warn the user (except for BASH, which is always set by the calling BASH).
67778       if test "xICECC_CMD" != xBASH; then
67779         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
67780 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
67781       fi
67782       # Try to locate tool using the code snippet
67783       for ac_prog in icecc
67784 do
67785   # Extract the first word of "$ac_prog", so it can be a program name with args.
67786 set dummy $ac_prog; ac_word=$2
67787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67788 $as_echo_n "checking for $ac_word... " >&6; }
67789 if ${ac_cv_path_ICECC_CMD+:} false; then :
67790   $as_echo_n "(cached) " >&6
67791 else
67792   case $ICECC_CMD in
67793   [\\/]* | ?:[\\/]*)
67794   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
67795   ;;
67796   *)
67797   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67798 for as_dir in $PATH
67799 do
67800   IFS=$as_save_IFS
67801   test -z "$as_dir" && as_dir=.
67802     for ac_exec_ext in '' $ac_executable_extensions; do
67803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67804     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
67805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67806     break 2
67807   fi
67808 done
67809   done
67810 IFS=$as_save_IFS
67811 
67812   ;;
67813 esac
67814 fi
67815 ICECC_CMD=$ac_cv_path_ICECC_CMD
67816 if test -n "$ICECC_CMD"; then
67817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
67818 $as_echo "$ICECC_CMD" >&6; }
67819 else
67820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67821 $as_echo "no" >&6; }
67822 fi
67823 
67824 
67825   test -n "$ICECC_CMD" && break
67826 done
67827 
67828     else
67829       # If it succeeded, then it was overridden by the user. We will use it
67830       # for the tool.
67831 
67832       # First remove it from the list of overridden variables, so we can test
67833       # for unknown variables in the end.
67834       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67835 
67836       # Check if we try to supply an empty value
67837       if test "x$ICECC_CMD" = x; then
67838         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
67839 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
67840         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
67841 $as_echo_n "checking for ICECC_CMD... " >&6; }
67842         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67843 $as_echo "disabled" >&6; }
67844       else
67845         # Check if the provided tool contains a complete path.
67846         tool_specified="$ICECC_CMD"
67847         tool_basename="${tool_specified##*/}"
67848         if test "x$tool_basename" = "x$tool_specified"; then
67849           # A command without a complete path is provided, search $PATH.
67850           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
67851 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
67852           # Extract the first word of "$tool_basename", so it can be a program name with args.
67853 set dummy $tool_basename; ac_word=$2
67854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67855 $as_echo_n "checking for $ac_word... " >&6; }
67856 if ${ac_cv_path_ICECC_CMD+:} false; then :
67857   $as_echo_n "(cached) " >&6
67858 else
67859   case $ICECC_CMD in
67860   [\\/]* | ?:[\\/]*)
67861   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
67862   ;;
67863   *)
67864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67865 for as_dir in $PATH
67866 do
67867   IFS=$as_save_IFS
67868   test -z "$as_dir" && as_dir=.
67869     for ac_exec_ext in '' $ac_executable_extensions; do
67870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67871     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
67872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67873     break 2
67874   fi
67875 done
67876   done
67877 IFS=$as_save_IFS
67878 
67879   ;;
67880 esac
67881 fi
67882 ICECC_CMD=$ac_cv_path_ICECC_CMD
67883 if test -n "$ICECC_CMD"; then
67884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
67885 $as_echo "$ICECC_CMD" >&6; }
67886 else
67887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67888 $as_echo "no" >&6; }
67889 fi
67890 
67891 
67892           if test "x$ICECC_CMD" = x; then
67893             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67894           fi
67895         else
67896           # Otherwise we believe it is a complete path. Use it as it is.
67897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
67898 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
67899           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
67900 $as_echo_n "checking for ICECC_CMD... " >&6; }
67901           if test ! -x "$tool_specified"; then
67902             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67903 $as_echo "not found" >&6; }
67904             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
67905           fi
67906           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67907 $as_echo "$tool_specified" >&6; }
67908         fi
67909       fi
67910     fi
67911 
67912   fi
67913 
67914 
67915 
67916   if test "x$ICECC_CMD" = x; then
67917     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
67918   fi
67919 
67920 
67921     old_path="$PATH"
67922 
67923     # Look for icecc-create-env in some known places
67924     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
67925 
67926 
67927 
67928   # Publish this variable in the help.
67929 
67930 
67931   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
67932     # The variable is not set by user, try to locate tool using the code snippet
67933     for ac_prog in icecc-create-env
67934 do
67935   # Extract the first word of "$ac_prog", so it can be a program name with args.
67936 set dummy $ac_prog; ac_word=$2
67937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67938 $as_echo_n "checking for $ac_word... " >&6; }
67939 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
67940   $as_echo_n "(cached) " >&6
67941 else
67942   case $ICECC_CREATE_ENV in
67943   [\\/]* | ?:[\\/]*)
67944   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
67945   ;;
67946   *)
67947   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67948 for as_dir in $PATH
67949 do
67950   IFS=$as_save_IFS
67951   test -z "$as_dir" && as_dir=.
67952     for ac_exec_ext in '' $ac_executable_extensions; do
67953   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67954     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
67955     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67956     break 2
67957   fi
67958 done
67959   done
67960 IFS=$as_save_IFS
67961 
67962   ;;
67963 esac
67964 fi
67965 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
67966 if test -n "$ICECC_CREATE_ENV"; then
67967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
67968 $as_echo "$ICECC_CREATE_ENV" >&6; }
67969 else
67970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67971 $as_echo "no" >&6; }
67972 fi
67973 
67974 
67975   test -n "$ICECC_CREATE_ENV" && break
67976 done
67977 
67978   else
67979     # The variable is set, but is it from the command line or the environment?
67980 
67981     # Try to remove the string !ICECC_CREATE_ENV! from our list.
67982     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
67983     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67984       # If it failed, the variable was not from the command line. Ignore it,
67985       # but warn the user (except for BASH, which is always set by the calling BASH).
67986       if test "xICECC_CREATE_ENV" != xBASH; then
67987         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
67988 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
67989       fi
67990       # Try to locate tool using the code snippet
67991       for ac_prog in icecc-create-env
67992 do
67993   # Extract the first word of "$ac_prog", so it can be a program name with args.
67994 set dummy $ac_prog; ac_word=$2
67995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67996 $as_echo_n "checking for $ac_word... " >&6; }
67997 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
67998   $as_echo_n "(cached) " >&6
67999 else
68000   case $ICECC_CREATE_ENV in
68001   [\\/]* | ?:[\\/]*)
68002   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
68003   ;;
68004   *)
68005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68006 for as_dir in $PATH
68007 do
68008   IFS=$as_save_IFS
68009   test -z "$as_dir" && as_dir=.
68010     for ac_exec_ext in '' $ac_executable_extensions; do
68011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68012     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
68013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68014     break 2
68015   fi
68016 done
68017   done
68018 IFS=$as_save_IFS
68019 
68020   ;;
68021 esac
68022 fi
68023 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
68024 if test -n "$ICECC_CREATE_ENV"; then
68025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
68026 $as_echo "$ICECC_CREATE_ENV" >&6; }
68027 else
68028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68029 $as_echo "no" >&6; }
68030 fi
68031 
68032 
68033   test -n "$ICECC_CREATE_ENV" && break
68034 done
68035 
68036     else
68037       # If it succeeded, then it was overridden by the user. We will use it
68038       # for the tool.
68039 
68040       # First remove it from the list of overridden variables, so we can test
68041       # for unknown variables in the end.
68042       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68043 
68044       # Check if we try to supply an empty value
68045       if test "x$ICECC_CREATE_ENV" = x; then
68046         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
68047 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
68048         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
68049 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
68050         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68051 $as_echo "disabled" >&6; }
68052       else
68053         # Check if the provided tool contains a complete path.
68054         tool_specified="$ICECC_CREATE_ENV"
68055         tool_basename="${tool_specified##*/}"
68056         if test "x$tool_basename" = "x$tool_specified"; then
68057           # A command without a complete path is provided, search $PATH.
68058           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
68059 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
68060           # Extract the first word of "$tool_basename", so it can be a program name with args.
68061 set dummy $tool_basename; ac_word=$2
68062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68063 $as_echo_n "checking for $ac_word... " >&6; }
68064 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
68065   $as_echo_n "(cached) " >&6
68066 else
68067   case $ICECC_CREATE_ENV in
68068   [\\/]* | ?:[\\/]*)
68069   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
68070   ;;
68071   *)
68072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68073 for as_dir in $PATH
68074 do
68075   IFS=$as_save_IFS
68076   test -z "$as_dir" && as_dir=.
68077     for ac_exec_ext in '' $ac_executable_extensions; do
68078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68079     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
68080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68081     break 2
68082   fi
68083 done
68084   done
68085 IFS=$as_save_IFS
68086 
68087   ;;
68088 esac
68089 fi
68090 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
68091 if test -n "$ICECC_CREATE_ENV"; then
68092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
68093 $as_echo "$ICECC_CREATE_ENV" >&6; }
68094 else
68095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68096 $as_echo "no" >&6; }
68097 fi
68098 
68099 
68100           if test "x$ICECC_CREATE_ENV" = x; then
68101             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68102           fi
68103         else
68104           # Otherwise we believe it is a complete path. Use it as it is.
68105           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
68106 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
68107           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
68108 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
68109           if test ! -x "$tool_specified"; then
68110             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68111 $as_echo "not found" >&6; }
68112             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
68113           fi
68114           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68115 $as_echo "$tool_specified" >&6; }
68116         fi
68117       fi
68118     fi
68119 
68120   fi
68121 
68122 
68123 
68124   if test "x$ICECC_CREATE_ENV" = x; then
68125     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
68126   fi
68127 
68128 
68129     # Use icecc-create-env to create a minimal compilation environment that can
68130     # be sent to the other hosts in the icecream cluster.
68131     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
68132     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
68133     # Older versions of icecc does not have the --gcc parameter
68134     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
68135       icecc_gcc_arg="--gcc"
68136     fi
68137     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
68138 
68139   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68140       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
68141           ${icecc_create_env_log} 2>&1 )
68142   if test "$?" != "0"; then
68143     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68144 $as_echo "$as_me: icecc-create-env output:" >&6;}
68145     cat \
68146           ${icecc_create_env_log}
68147     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68148   fi
68149 
68150     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
68151       # For clang, the icecc compilerwrapper is needed. It usually resides next
68152       # to icecc-create-env.
68153 
68154 
68155 
68156   # Publish this variable in the help.
68157 
68158 
68159   if [ -z "${ICECC_WRAPPER+x}" ]; then
68160     # The variable is not set by user, try to locate tool using the code snippet
68161     for ac_prog in compilerwrapper
68162 do
68163   # Extract the first word of "$ac_prog", so it can be a program name with args.
68164 set dummy $ac_prog; ac_word=$2
68165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68166 $as_echo_n "checking for $ac_word... " >&6; }
68167 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
68168   $as_echo_n "(cached) " >&6
68169 else
68170   case $ICECC_WRAPPER in
68171   [\\/]* | ?:[\\/]*)
68172   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
68173   ;;
68174   *)
68175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68176 for as_dir in $PATH
68177 do
68178   IFS=$as_save_IFS
68179   test -z "$as_dir" && as_dir=.
68180     for ac_exec_ext in '' $ac_executable_extensions; do
68181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68182     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
68183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68184     break 2
68185   fi
68186 done
68187   done
68188 IFS=$as_save_IFS
68189 
68190   ;;
68191 esac
68192 fi
68193 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
68194 if test -n "$ICECC_WRAPPER"; then
68195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
68196 $as_echo "$ICECC_WRAPPER" >&6; }
68197 else
68198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68199 $as_echo "no" >&6; }
68200 fi
68201 
68202 
68203   test -n "$ICECC_WRAPPER" && break
68204 done
68205 
68206   else
68207     # The variable is set, but is it from the command line or the environment?
68208 
68209     # Try to remove the string !ICECC_WRAPPER! from our list.
68210     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
68211     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
68212       # If it failed, the variable was not from the command line. Ignore it,
68213       # but warn the user (except for BASH, which is always set by the calling BASH).
68214       if test "xICECC_WRAPPER" != xBASH; then
68215         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
68216 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
68217       fi
68218       # Try to locate tool using the code snippet
68219       for ac_prog in compilerwrapper
68220 do
68221   # Extract the first word of "$ac_prog", so it can be a program name with args.
68222 set dummy $ac_prog; ac_word=$2
68223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68224 $as_echo_n "checking for $ac_word... " >&6; }
68225 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
68226   $as_echo_n "(cached) " >&6
68227 else
68228   case $ICECC_WRAPPER in
68229   [\\/]* | ?:[\\/]*)
68230   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
68231   ;;
68232   *)
68233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68234 for as_dir in $PATH
68235 do
68236   IFS=$as_save_IFS
68237   test -z "$as_dir" && as_dir=.
68238     for ac_exec_ext in '' $ac_executable_extensions; do
68239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68240     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
68241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68242     break 2
68243   fi
68244 done
68245   done
68246 IFS=$as_save_IFS
68247 
68248   ;;
68249 esac
68250 fi
68251 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
68252 if test -n "$ICECC_WRAPPER"; then
68253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
68254 $as_echo "$ICECC_WRAPPER" >&6; }
68255 else
68256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68257 $as_echo "no" >&6; }
68258 fi
68259 
68260 
68261   test -n "$ICECC_WRAPPER" && break
68262 done
68263 
68264     else
68265       # If it succeeded, then it was overridden by the user. We will use it
68266       # for the tool.
68267 
68268       # First remove it from the list of overridden variables, so we can test
68269       # for unknown variables in the end.
68270       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68271 
68272       # Check if we try to supply an empty value
68273       if test "x$ICECC_WRAPPER" = x; then
68274         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
68275 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
68276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
68277 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
68278         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68279 $as_echo "disabled" >&6; }
68280       else
68281         # Check if the provided tool contains a complete path.
68282         tool_specified="$ICECC_WRAPPER"
68283         tool_basename="${tool_specified##*/}"
68284         if test "x$tool_basename" = "x$tool_specified"; then
68285           # A command without a complete path is provided, search $PATH.
68286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
68287 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
68288           # Extract the first word of "$tool_basename", so it can be a program name with args.
68289 set dummy $tool_basename; ac_word=$2
68290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68291 $as_echo_n "checking for $ac_word... " >&6; }
68292 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
68293   $as_echo_n "(cached) " >&6
68294 else
68295   case $ICECC_WRAPPER in
68296   [\\/]* | ?:[\\/]*)
68297   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
68298   ;;
68299   *)
68300   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68301 for as_dir in $PATH
68302 do
68303   IFS=$as_save_IFS
68304   test -z "$as_dir" && as_dir=.
68305     for ac_exec_ext in '' $ac_executable_extensions; do
68306   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68307     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
68308     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68309     break 2
68310   fi
68311 done
68312   done
68313 IFS=$as_save_IFS
68314 
68315   ;;
68316 esac
68317 fi
68318 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
68319 if test -n "$ICECC_WRAPPER"; then
68320   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
68321 $as_echo "$ICECC_WRAPPER" >&6; }
68322 else
68323   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68324 $as_echo "no" >&6; }
68325 fi
68326 
68327 
68328           if test "x$ICECC_WRAPPER" = x; then
68329             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68330           fi
68331         else
68332           # Otherwise we believe it is a complete path. Use it as it is.
68333           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
68334 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
68335           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
68336 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
68337           if test ! -x "$tool_specified"; then
68338             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68339 $as_echo "not found" >&6; }
68340             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
68341           fi
68342           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68343 $as_echo "$tool_specified" >&6; }
68344         fi
68345       fi
68346     fi
68347 
68348   fi
68349 
68350 
68351 
68352   if test "x$ICECC_WRAPPER" = x; then
68353     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
68354   fi
68355 
68356 
68357 
68358   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68359       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
68360   if test "$?" != "0"; then
68361     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68362 $as_echo "$as_me: icecc-create-env output:" >&6;}
68363     cat ${icecc_create_env_log}
68364     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68365   fi
68366 
68367     else
68368       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
68369     fi
68370     PATH="$old_path"
68371     # The bundle with the compiler gets a name based on checksums. Parse log file
68372     # to find it.
68373     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
68374     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
68375     if test ! -f ${ICECC_ENV_BUNDLE}; then
68376       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
68377     fi
68378     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
68379 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
68380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
68381 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
68382     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
68383 
68384     if test "x${COMPILE_TYPE}" = "xcross"; then
68385       # If cross compiling, create a separate env package for the build compiler
68386       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
68387       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
68388       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
68389 
68390   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68391       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
68392             ${icecc_create_env_log_build} 2>&1 )
68393   if test "$?" != "0"; then
68394     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68395 $as_echo "$as_me: icecc-create-env output:" >&6;}
68396     cat \
68397             ${icecc_create_env_log_build}
68398     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68399   fi
68400 
68401       elif test "x${BUILD_CC##*/}" = "xclang"; then
68402 
68403   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68404       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
68405   if test "$?" != "0"; then
68406     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68407 $as_echo "$as_me: icecc-create-env output:" >&6;}
68408     cat ${icecc_create_env_log_build}
68409     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68410   fi
68411 
68412       else
68413         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
68414       fi
68415       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
68416       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
68417       if test ! -f ${ICECC_ENV_BUNDLE}; then
68418         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
68419       fi
68420       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
68421 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
68422       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
68423 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
68424       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
68425           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
68426     else
68427       BUILD_ICECC="${ICECC}"
68428     fi
68429 
68430 
68431   fi
68432 
68433 
68434 # Can the C/C++ compiler use precompiled headers?
68435 
68436 
68437   ###############################################################################
68438   #
68439   # Can the C/C++ compiler use precompiled headers?
68440   #
68441   # Check whether --enable-precompiled-headers was given.
68442 if test "${enable_precompiled_headers+set}" = set; then :
68443   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
68444 else
68445   ENABLE_PRECOMPH=yes
68446 fi
68447 
68448 
68449   USE_PRECOMPILED_HEADER=true
68450   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
68451 $as_echo_n "checking If precompiled header is enabled... " >&6; }
68452   if test "x$ENABLE_PRECOMPH" = xno; then
68453     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
68454 $as_echo "no, forced" >&6; }
68455     USE_PRECOMPILED_HEADER=false
68456   elif test "x$ICECC" != "x"; then
68457     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
68458 $as_echo "no, does not work effectively with icecc" >&6; }
68459     USE_PRECOMPILED_HEADER=false
68460   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
68461     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
68462 $as_echo "no, does not work with Solaris Studio" >&6; }
68463     USE_PRECOMPILED_HEADER=false
68464   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
68465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
68466 $as_echo "no, does not work with xlc" >&6; }
68467     USE_PRECOMPILED_HEADER=false
68468   else
68469     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68470 $as_echo "yes" >&6; }
68471   fi
68472 
68473   if test "x$ENABLE_PRECOMPH" = xyes; then
68474     # Check that the compiler actually supports precomp headers.
68475     if test "x$TOOLCHAIN_TYPE" = xgcc; then
68476       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
68477 $as_echo_n "checking that precompiled headers work... " >&6; }
68478       echo "int alfa();" > conftest.h
68479       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
68480       if test ! -f conftest.hpp.gch; then
68481         USE_PRECOMPILED_HEADER=false
68482         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68483 $as_echo "no" >&6; }
68484       else
68485         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68486 $as_echo "yes" >&6; }
68487       fi
68488       $RM conftest.h conftest.hpp.gch
68489     fi
68490   fi
68491 
68492 
68493 
68494 
68495 # Setup use of ccache, if available
68496 
68497   # Check whether --enable-ccache was given.
68498 if test "${enable_ccache+set}" = set; then :
68499   enableval=$enable_ccache;
68500 fi
68501 
68502 
68503   CCACHE_STATUS=
68504   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
68505 $as_echo_n "checking is ccache enabled... " >&6; }
68506   if test "x$enable_ccache" = xyes; then
68507     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
68508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68509 $as_echo "yes" >&6; }
68510       OLD_PATH="$PATH"
68511       if test "x$TOOLCHAIN_PATH" != x; then
68512         PATH=$TOOLCHAIN_PATH:$PATH
68513       fi
68514 
68515 
68516 
68517   # Publish this variable in the help.
68518 
68519 
68520   if [ -z "${CCACHE+x}" ]; then
68521     # The variable is not set by user, try to locate tool using the code snippet
68522     for ac_prog in ccache
68523 do
68524   # Extract the first word of "$ac_prog", so it can be a program name with args.
68525 set dummy $ac_prog; ac_word=$2
68526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68527 $as_echo_n "checking for $ac_word... " >&6; }
68528 if ${ac_cv_path_CCACHE+:} false; then :
68529   $as_echo_n "(cached) " >&6
68530 else
68531   case $CCACHE in
68532   [\\/]* | ?:[\\/]*)
68533   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
68534   ;;
68535   *)
68536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68537 for as_dir in $PATH
68538 do
68539   IFS=$as_save_IFS
68540   test -z "$as_dir" && as_dir=.
68541     for ac_exec_ext in '' $ac_executable_extensions; do
68542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68543     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
68544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68545     break 2
68546   fi
68547 done
68548   done
68549 IFS=$as_save_IFS
68550 
68551   ;;
68552 esac
68553 fi
68554 CCACHE=$ac_cv_path_CCACHE
68555 if test -n "$CCACHE"; then
68556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
68557 $as_echo "$CCACHE" >&6; }
68558 else
68559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68560 $as_echo "no" >&6; }
68561 fi
68562 
68563 
68564   test -n "$CCACHE" && break
68565 done
68566 
68567   else
68568     # The variable is set, but is it from the command line or the environment?
68569 
68570     # Try to remove the string !CCACHE! from our list.
68571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
68572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
68573       # If it failed, the variable was not from the command line. Ignore it,
68574       # but warn the user (except for BASH, which is always set by the calling BASH).
68575       if test "xCCACHE" != xBASH; then
68576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
68577 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
68578       fi
68579       # Try to locate tool using the code snippet
68580       for ac_prog in ccache
68581 do
68582   # Extract the first word of "$ac_prog", so it can be a program name with args.
68583 set dummy $ac_prog; ac_word=$2
68584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68585 $as_echo_n "checking for $ac_word... " >&6; }
68586 if ${ac_cv_path_CCACHE+:} false; then :
68587   $as_echo_n "(cached) " >&6
68588 else
68589   case $CCACHE in
68590   [\\/]* | ?:[\\/]*)
68591   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
68592   ;;
68593   *)
68594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68595 for as_dir in $PATH
68596 do
68597   IFS=$as_save_IFS
68598   test -z "$as_dir" && as_dir=.
68599     for ac_exec_ext in '' $ac_executable_extensions; do
68600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68601     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
68602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68603     break 2
68604   fi
68605 done
68606   done
68607 IFS=$as_save_IFS
68608 
68609   ;;
68610 esac
68611 fi
68612 CCACHE=$ac_cv_path_CCACHE
68613 if test -n "$CCACHE"; then
68614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
68615 $as_echo "$CCACHE" >&6; }
68616 else
68617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68618 $as_echo "no" >&6; }
68619 fi
68620 
68621 
68622   test -n "$CCACHE" && break
68623 done
68624 
68625     else
68626       # If it succeeded, then it was overridden by the user. We will use it
68627       # for the tool.
68628 
68629       # First remove it from the list of overridden variables, so we can test
68630       # for unknown variables in the end.
68631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68632 
68633       # Check if we try to supply an empty value
68634       if test "x$CCACHE" = x; then
68635         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
68636 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
68637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
68638 $as_echo_n "checking for CCACHE... " >&6; }
68639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68640 $as_echo "disabled" >&6; }
68641       else
68642         # Check if the provided tool contains a complete path.
68643         tool_specified="$CCACHE"
68644         tool_basename="${tool_specified##*/}"
68645         if test "x$tool_basename" = "x$tool_specified"; then
68646           # A command without a complete path is provided, search $PATH.
68647           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
68648 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
68649           # Extract the first word of "$tool_basename", so it can be a program name with args.
68650 set dummy $tool_basename; ac_word=$2
68651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68652 $as_echo_n "checking for $ac_word... " >&6; }
68653 if ${ac_cv_path_CCACHE+:} false; then :
68654   $as_echo_n "(cached) " >&6
68655 else
68656   case $CCACHE in
68657   [\\/]* | ?:[\\/]*)
68658   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
68659   ;;
68660   *)
68661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68662 for as_dir in $PATH
68663 do
68664   IFS=$as_save_IFS
68665   test -z "$as_dir" && as_dir=.
68666     for ac_exec_ext in '' $ac_executable_extensions; do
68667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68668     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
68669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68670     break 2
68671   fi
68672 done
68673   done
68674 IFS=$as_save_IFS
68675 
68676   ;;
68677 esac
68678 fi
68679 CCACHE=$ac_cv_path_CCACHE
68680 if test -n "$CCACHE"; then
68681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
68682 $as_echo "$CCACHE" >&6; }
68683 else
68684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68685 $as_echo "no" >&6; }
68686 fi
68687 
68688 
68689           if test "x$CCACHE" = x; then
68690             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68691           fi
68692         else
68693           # Otherwise we believe it is a complete path. Use it as it is.
68694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
68695 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
68696           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
68697 $as_echo_n "checking for CCACHE... " >&6; }
68698           if test ! -x "$tool_specified"; then
68699             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68700 $as_echo "not found" >&6; }
68701             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
68702           fi
68703           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68704 $as_echo "$tool_specified" >&6; }
68705         fi
68706       fi
68707     fi
68708 
68709   fi
68710 
68711 
68712 
68713   if test "x$CCACHE" = x; then
68714     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
68715   fi
68716 
68717 
68718       PATH="$OLD_PATH"
68719       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
68720       CCACHE_STATUS="Active ($CCACHE_VERSION)"
68721     else
68722       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68723 $as_echo "no" >&6; }
68724       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
68725 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
68726     fi
68727   elif test "x$enable_ccache" = xno; then
68728     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
68729 $as_echo "no, explicitly disabled" >&6; }
68730     CCACHE_STATUS="Disabled"
68731   elif test "x$enable_ccache" = x; then
68732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68733 $as_echo "no" >&6; }
68734   else
68735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
68736 $as_echo "unknown" >&6; }
68737     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
68738   fi
68739 
68740 
68741 
68742 # Check whether --with-ccache-dir was given.
68743 if test "${with_ccache_dir+set}" = set; then :
68744   withval=$with_ccache_dir;
68745 fi
68746 
68747 
68748   if test "x$with_ccache_dir" != x; then
68749     # When using a non home ccache directory, assume the use is to share ccache files
68750     # with other users. Thus change the umask.
68751     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
68752     if test "x$CCACHE" = x; then
68753       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
68754 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
68755     fi
68756   fi
68757 
68758   if test "x$CCACHE" != x; then
68759 
68760   if test "x$CCACHE" != x; then
68761     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
68762       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
68763           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
68764       if test "x$HAS_BAD_CCACHE" != "x"; then
68765         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
68766       fi
68767     fi
68768     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
68769       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
68770           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
68771       if test "x$HAS_BAD_CCACHE" != "x"; then
68772         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
68773       fi
68774       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
68775 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
68776       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
68777       PUSHED_FLAGS="$CXXFLAGS"
68778       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
68779       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
68780 /* end confdefs.h.  */
68781 
68782 int
68783 main ()
68784 {
68785 
68786   ;
68787   return 0;
68788 }
68789 _ACEOF
68790 if ac_fn_cxx_try_compile "$LINENO"; then :
68791   CC_KNOWS_CCACHE_TRICK=yes
68792 else
68793   CC_KNOWS_CCACHE_TRICK=no
68794 fi
68795 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
68796       CXXFLAGS="$PUSHED_FLAGS"
68797       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
68798         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68799 $as_echo "yes" >&6; }
68800         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
68801 
68802         CCACHE_SLOPPINESS=pch_defines,time_macros
68803       else
68804         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68805 $as_echo "no" >&6; }
68806         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
68807       fi
68808     fi
68809 
68810     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
68811         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
68812 
68813     if test "x$SET_CCACHE_DIR" != x; then
68814       mkdir -p $CCACHE_DIR > /dev/null 2>&1
68815       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
68816     fi
68817   fi
68818 
68819   fi
68820 
68821 
68822 ###############################################################################
68823 #
68824 # And now the finish...
68825 #
68826 ###############################################################################
68827 
68828 # Check for some common pitfalls
68829 
68830   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
68831     file_to_test="$TOPDIR/LICENSE"
68832     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
68833       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
68834     fi
68835   fi
68836 
68837 
68838   # Did user specify any unknown variables?
68839 
68840   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
68841     # Replace the separating ! with spaces before presenting for end user.
68842     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
68843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
68844 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
68845   fi
68846 
68847 
68848   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
68849 $as_echo_n "checking if build directory is on local disk... " >&6; }
68850 
68851   # df -l lists only local disks; if the given directory is not found then
68852   # a non-zero exit code is given
68853   if test "x$DF" = x; then
68854     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
68855       # msys does not have df; use Windows "net use" instead.
68856       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
68857       if test "x$IS_NETWORK_DISK" = x; then
68858         OUTPUT_DIR_IS_LOCAL="yes"
68859       else
68860         OUTPUT_DIR_IS_LOCAL="no"
68861       fi
68862     else
68863       # No df here, say it's local
68864       OUTPUT_DIR_IS_LOCAL="yes"
68865     fi
68866   else
68867     # JDK-8189619
68868     # df on AIX does not understand -l. On modern AIXes it understands "-T local" which
68869     # is the same. On older AIXes we just continue to live with a "not local build" warning.
68870     if test "x$OPENJDK_TARGET_OS" = xaix; then
68871       DF_LOCAL_ONLY_OPTION='-T local'
68872     else
68873       DF_LOCAL_ONLY_OPTION='-l'
68874     fi
68875     if $DF $DF_LOCAL_ONLY_OPTION $OUTPUTDIR > /dev/null 2>&1; then
68876       OUTPUT_DIR_IS_LOCAL="yes"
68877     else
68878       OUTPUT_DIR_IS_LOCAL="no"
68879     fi
68880   fi
68881 
68882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
68883 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
68884 
68885 
68886 
68887   # Check if the user has any old-style ALT_ variables set.
68888   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
68889 
68890   # Before generating output files, test if they exist. If they do, this is a reconfigure.
68891   # Since we can't properly handle the dependencies for this, warn the user about the situation
68892   if test -e $OUTPUTDIR/spec.gmk; then
68893     IS_RECONFIGURE=yes
68894   else
68895     IS_RECONFIGURE=no
68896   fi
68897 
68898 
68899 # At the end, call the custom hook. (Dummy macro if no custom sources available)
68900 
68901 
68902 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
68903 
68904   # Keep feature lists sorted and free of duplicates
68905   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
68906   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
68907   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
68908   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
68909   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
68910   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
68911 
68912   # Validate features
68913   for variant in $JVM_VARIANTS; do
68914     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
68915 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
68916     features_var_name=JVM_FEATURES_$variant
68917     JVM_FEATURES_TO_TEST=${!features_var_name}
68918     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
68919 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
68920     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
68921     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
68922     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
68923     if test "x$INVALID_FEATURES" != x; then
68924       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
68925     fi
68926   done
68927 
68928 
68929 # We're messing a bit with internal autoconf variables to put the config.status
68930 # in the output directory instead of the current directory.
68931 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
68932 
68933 # Create the actual output files. Now the main work of configure is done.
68934 cat >confcache <<\_ACEOF
68935 # This file is a shell script that caches the results of configure
68936 # tests run on this system so they can be shared between configure
68937 # scripts and configure runs, see configure's option --config-cache.
68938 # It is not useful on other systems.  If it contains results you don't
68939 # want to keep, you may remove or edit it.
68940 #
68941 # config.status only pays attention to the cache file if you give it
68942 # the --recheck option to rerun configure.
68943 #
68944 # `ac_cv_env_foo' variables (set or unset) will be overridden when
68945 # loading this file, other *unset* `ac_cv_foo' will be assigned the
68946 # following values.
68947 
68948 _ACEOF
68949 
68950 # The following way of writing the cache mishandles newlines in values,
68951 # but we know of no workaround that is simple, portable, and efficient.
68952 # So, we kill variables containing newlines.
68953 # Ultrix sh set writes to stderr and can't be redirected directly,
68954 # and sets the high bit in the cache file unless we assign to the vars.
68955 (
68956   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
68957     eval ac_val=\$$ac_var
68958     case $ac_val in #(
68959     *${as_nl}*)
68960       case $ac_var in #(
68961       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
68962 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
68963       esac
68964       case $ac_var in #(
68965       _ | IFS | as_nl) ;; #(
68966       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
68967       *) { eval $ac_var=; unset $ac_var;} ;;
68968       esac ;;
68969     esac
68970   done
68971 
68972   (set) 2>&1 |
68973     case $as_nl`(ac_space=' '; set) 2>&1` in #(
68974     *${as_nl}ac_space=\ *)
68975       # `set' does not quote correctly, so add quotes: double-quote
68976       # substitution turns \\\\ into \\, and sed turns \\ into \.
68977       sed -n \
68978         "s/'/'\\\\''/g;
68979           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
68980       ;; #(
68981     *)
68982       # `set' quotes correctly as required by POSIX, so do not add quotes.
68983       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
68984       ;;
68985     esac |
68986     sort
68987 ) |
68988   sed '
68989      /^ac_cv_env_/b end
68990      t clear
68991      :clear
68992      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
68993      t end
68994      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
68995      :end' >>confcache
68996 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
68997   if test -w "$cache_file"; then
68998     if test "x$cache_file" != "x/dev/null"; then
68999       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
69000 $as_echo "$as_me: updating cache $cache_file" >&6;}
69001       if test ! -f "$cache_file" || test -h "$cache_file"; then
69002         cat confcache >"$cache_file"
69003       else
69004         case $cache_file in #(
69005         */* | ?:*)
69006           mv -f confcache "$cache_file"$$ &&
69007           mv -f "$cache_file"$$ "$cache_file" ;; #(
69008         *)
69009           mv -f confcache "$cache_file" ;;
69010         esac
69011       fi
69012     fi
69013   else
69014     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
69015 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
69016   fi
69017 fi
69018 rm -f confcache
69019 
69020 test "x$prefix" = xNONE && prefix=$ac_default_prefix
69021 # Let make expand exec_prefix.
69022 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
69023 
69024 # Transform confdefs.h into DEFS.
69025 # Protect against shell expansion while executing Makefile rules.
69026 # Protect against Makefile macro expansion.
69027 #
69028 # If the first sed substitution is executed (which looks for macros that
69029 # take arguments), then branch to the quote section.  Otherwise,
69030 # look for a macro that doesn't take arguments.
69031 ac_script='
69032 :mline
69033 /\\$/{
69034  N
69035  s,\\\n,,
69036  b mline
69037 }
69038 t clear
69039 :clear
69040 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
69041 t quote
69042 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
69043 t quote
69044 b any
69045 :quote
69046 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
69047 s/\[/\\&/g
69048 s/\]/\\&/g
69049 s/\$/$$/g
69050 H
69051 :any
69052 ${
69053         g
69054         s/^\n//
69055         s/\n/ /g
69056         p
69057 }
69058 '
69059 DEFS=`sed -n "$ac_script" confdefs.h`
69060 
69061 
69062 ac_libobjs=
69063 ac_ltlibobjs=
69064 U=
69065 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
69066   # 1. Remove the extension, and $U if already installed.
69067   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
69068   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
69069   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
69070   #    will be set to the directory where LIBOBJS objects are built.
69071   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
69072   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
69073 done
69074 LIBOBJS=$ac_libobjs
69075 
69076 LTLIBOBJS=$ac_ltlibobjs
69077 
69078 
69079 
69080 : "${CONFIG_STATUS=./config.status}"
69081 ac_write_fail=0
69082 ac_clean_files_save=$ac_clean_files
69083 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
69084 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
69085 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
69086 as_write_fail=0
69087 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
69088 #! $SHELL
69089 # Generated by $as_me.
69090 # Run this file to recreate the current configuration.
69091 # Compiler output produced by configure, useful for debugging
69092 # configure, is in config.log if it exists.
69093 
69094 debug=false
69095 ac_cs_recheck=false
69096 ac_cs_silent=false
69097 
69098 SHELL=\${CONFIG_SHELL-$SHELL}
69099 export SHELL
69100 _ASEOF
69101 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
69102 ## -------------------- ##
69103 ## M4sh Initialization. ##
69104 ## -------------------- ##
69105 
69106 # Be more Bourne compatible
69107 DUALCASE=1; export DUALCASE # for MKS sh
69108 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
69109   emulate sh
69110   NULLCMD=:
69111   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
69112   # is contrary to our usage.  Disable this feature.
69113   alias -g '${1+"$@"}'='"$@"'
69114   setopt NO_GLOB_SUBST
69115 else
69116   case `(set -o) 2>/dev/null` in #(
69117   *posix*) :
69118     set -o posix ;; #(
69119   *) :
69120      ;;
69121 esac
69122 fi
69123 
69124 
69125 as_nl='
69126 '
69127 export as_nl
69128 # Printing a long string crashes Solaris 7 /usr/bin/printf.
69129 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
69130 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
69131 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
69132 # Prefer a ksh shell builtin over an external printf program on Solaris,
69133 # but without wasting forks for bash or zsh.
69134 if test -z "$BASH_VERSION$ZSH_VERSION" \
69135     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
69136   as_echo='print -r --'
69137   as_echo_n='print -rn --'
69138 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
69139   as_echo='printf %s\n'
69140   as_echo_n='printf %s'
69141 else
69142   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
69143     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
69144     as_echo_n='/usr/ucb/echo -n'
69145   else
69146     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
69147     as_echo_n_body='eval
69148       arg=$1;
69149       case $arg in #(
69150       *"$as_nl"*)
69151         expr "X$arg" : "X\\(.*\\)$as_nl";
69152         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
69153       esac;
69154       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69155     '
69156     export as_echo_n_body
69157     as_echo_n='sh -c $as_echo_n_body as_echo'
69158   fi
69159   export as_echo_body
69160   as_echo='sh -c $as_echo_body as_echo'
69161 fi
69162 
69163 # The user is always right.
69164 if test "${PATH_SEPARATOR+set}" != set; then
69165   PATH_SEPARATOR=:
69166   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
69167     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
69168       PATH_SEPARATOR=';'
69169   }
69170 fi
69171 
69172 
69173 # IFS
69174 # We need space, tab and new line, in precisely that order.  Quoting is
69175 # there to prevent editors from complaining about space-tab.
69176 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
69177 # splitting by setting IFS to empty value.)
69178 IFS=" ""        $as_nl"
69179 
69180 # Find who we are.  Look in the path if we contain no directory separator.
69181 as_myself=
69182 case $0 in #((
69183   *[\\/]* ) as_myself=$0 ;;
69184   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
69185 for as_dir in $PATH
69186 do
69187   IFS=$as_save_IFS
69188   test -z "$as_dir" && as_dir=.
69189     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
69190   done
69191 IFS=$as_save_IFS
69192 
69193      ;;
69194 esac
69195 # We did not find ourselves, most probably we were run as `sh COMMAND'
69196 # in which case we are not to be found in the path.
69197 if test "x$as_myself" = x; then
69198   as_myself=$0
69199 fi
69200 if test ! -f "$as_myself"; then
69201   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
69202   exit 1
69203 fi
69204 
69205 # Unset variables that we do not need and which cause bugs (e.g. in
69206 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
69207 # suppresses any "Segmentation fault" message there.  '((' could
69208 # trigger a bug in pdksh 5.2.14.
69209 for as_var in BASH_ENV ENV MAIL MAILPATH
69210 do eval test x\${$as_var+set} = xset \
69211   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
69212 done
69213 PS1='$ '
69214 PS2='> '
69215 PS4='+ '
69216 
69217 # NLS nuisances.
69218 LC_ALL=C
69219 export LC_ALL
69220 LANGUAGE=C
69221 export LANGUAGE
69222 
69223 # CDPATH.
69224 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
69225 
69226 
69227 # as_fn_error STATUS ERROR [LINENO LOG_FD]
69228 # ----------------------------------------
69229 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
69230 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
69231 # script with STATUS, using 1 if that was 0.
69232 as_fn_error ()
69233 {
69234   as_status=$1; test $as_status -eq 0 && as_status=1
69235   if test "$4"; then
69236     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
69237     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
69238   fi
69239   $as_echo "$as_me: error: $2" >&2
69240   as_fn_exit $as_status
69241 } # as_fn_error
69242 
69243 
69244 # as_fn_set_status STATUS
69245 # -----------------------
69246 # Set $? to STATUS, without forking.
69247 as_fn_set_status ()
69248 {
69249   return $1
69250 } # as_fn_set_status
69251 
69252 # as_fn_exit STATUS
69253 # -----------------
69254 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
69255 as_fn_exit ()
69256 {
69257   set +e
69258   as_fn_set_status $1
69259   exit $1
69260 } # as_fn_exit
69261 
69262 # as_fn_unset VAR
69263 # ---------------
69264 # Portably unset VAR.
69265 as_fn_unset ()
69266 {
69267   { eval $1=; unset $1;}
69268 }
69269 as_unset=as_fn_unset
69270 # as_fn_append VAR VALUE
69271 # ----------------------
69272 # Append the text in VALUE to the end of the definition contained in VAR. Take
69273 # advantage of any shell optimizations that allow amortized linear growth over
69274 # repeated appends, instead of the typical quadratic growth present in naive
69275 # implementations.
69276 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
69277   eval 'as_fn_append ()
69278   {
69279     eval $1+=\$2
69280   }'
69281 else
69282   as_fn_append ()
69283   {
69284     eval $1=\$$1\$2
69285   }
69286 fi # as_fn_append
69287 
69288 # as_fn_arith ARG...
69289 # ------------------
69290 # Perform arithmetic evaluation on the ARGs, and store the result in the
69291 # global $as_val. Take advantage of shells that can avoid forks. The arguments
69292 # must be portable across $(()) and expr.
69293 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
69294   eval 'as_fn_arith ()
69295   {
69296     as_val=$(( $* ))
69297   }'
69298 else
69299   as_fn_arith ()
69300   {
69301     as_val=`expr "$@" || test $? -eq 1`
69302   }
69303 fi # as_fn_arith
69304 
69305 
69306 if expr a : '\(a\)' >/dev/null 2>&1 &&
69307    test "X`expr 00001 : '.*\(...\)'`" = X001; then
69308   as_expr=expr
69309 else
69310   as_expr=false
69311 fi
69312 
69313 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
69314   as_basename=basename
69315 else
69316   as_basename=false
69317 fi
69318 
69319 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
69320   as_dirname=dirname
69321 else
69322   as_dirname=false
69323 fi
69324 
69325 as_me=`$as_basename -- "$0" ||
69326 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69327          X"$0" : 'X\(//\)$' \| \
69328          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
69329 $as_echo X/"$0" |
69330     sed '/^.*\/\([^/][^/]*\)\/*$/{
69331             s//\1/
69332             q
69333           }
69334           /^X\/\(\/\/\)$/{
69335             s//\1/
69336             q
69337           }
69338           /^X\/\(\/\).*/{
69339             s//\1/
69340             q
69341           }
69342           s/.*/./; q'`
69343 
69344 # Avoid depending upon Character Ranges.
69345 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
69346 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
69347 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
69348 as_cr_digits='0123456789'
69349 as_cr_alnum=$as_cr_Letters$as_cr_digits
69350 
69351 ECHO_C= ECHO_N= ECHO_T=
69352 case `echo -n x` in #(((((
69353 -n*)
69354   case `echo 'xy\c'` in
69355   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
69356   xy)  ECHO_C='\c';;
69357   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
69358        ECHO_T=' ';;
69359   esac;;
69360 *)
69361   ECHO_N='-n';;
69362 esac
69363 
69364 rm -f conf$$ conf$$.exe conf$$.file
69365 if test -d conf$$.dir; then
69366   rm -f conf$$.dir/conf$$.file
69367 else
69368   rm -f conf$$.dir
69369   mkdir conf$$.dir 2>/dev/null
69370 fi
69371 if (echo >conf$$.file) 2>/dev/null; then
69372   if ln -s conf$$.file conf$$ 2>/dev/null; then
69373     as_ln_s='ln -s'
69374     # ... but there are two gotchas:
69375     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
69376     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
69377     # In both cases, we have to default to `cp -pR'.
69378     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
69379       as_ln_s='cp -pR'
69380   elif ln conf$$.file conf$$ 2>/dev/null; then
69381     as_ln_s=ln
69382   else
69383     as_ln_s='cp -pR'
69384   fi
69385 else
69386   as_ln_s='cp -pR'
69387 fi
69388 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
69389 rmdir conf$$.dir 2>/dev/null
69390 
69391 
69392 # as_fn_mkdir_p
69393 # -------------
69394 # Create "$as_dir" as a directory, including parents if necessary.
69395 as_fn_mkdir_p ()
69396 {
69397 
69398   case $as_dir in #(
69399   -*) as_dir=./$as_dir;;
69400   esac
69401   test -d "$as_dir" || eval $as_mkdir_p || {
69402     as_dirs=
69403     while :; do
69404       case $as_dir in #(
69405       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
69406       *) as_qdir=$as_dir;;
69407       esac
69408       as_dirs="'$as_qdir' $as_dirs"
69409       as_dir=`$as_dirname -- "$as_dir" ||
69410 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
69411          X"$as_dir" : 'X\(//\)[^/]' \| \
69412          X"$as_dir" : 'X\(//\)$' \| \
69413          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
69414 $as_echo X"$as_dir" |
69415     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
69416             s//\1/
69417             q
69418           }
69419           /^X\(\/\/\)[^/].*/{
69420             s//\1/
69421             q
69422           }
69423           /^X\(\/\/\)$/{
69424             s//\1/
69425             q
69426           }
69427           /^X\(\/\).*/{
69428             s//\1/
69429             q
69430           }
69431           s/.*/./; q'`
69432       test -d "$as_dir" && break
69433     done
69434     test -z "$as_dirs" || eval "mkdir $as_dirs"
69435   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
69436 
69437 
69438 } # as_fn_mkdir_p
69439 if mkdir -p . 2>/dev/null; then
69440   as_mkdir_p='mkdir -p "$as_dir"'
69441 else
69442   test -d ./-p && rmdir ./-p
69443   as_mkdir_p=false
69444 fi
69445 
69446 
69447 # as_fn_executable_p FILE
69448 # -----------------------
69449 # Test if FILE is an executable regular file.
69450 as_fn_executable_p ()
69451 {
69452   test -f "$1" && test -x "$1"
69453 } # as_fn_executable_p
69454 as_test_x='test -x'
69455 as_executable_p=as_fn_executable_p
69456 
69457 # Sed expression to map a string onto a valid CPP name.
69458 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
69459 
69460 # Sed expression to map a string onto a valid variable name.
69461 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
69462 
69463 
69464 exec 6>&1
69465 ## ----------------------------------- ##
69466 ## Main body of $CONFIG_STATUS script. ##
69467 ## ----------------------------------- ##
69468 _ASEOF
69469 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
69470 
69471 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69472 # Save the log message, to keep $0 and so on meaningful, and to
69473 # report actual input values of CONFIG_FILES etc. instead of their
69474 # values after options handling.
69475 ac_log="
69476 This file was extended by OpenJDK $as_me jdk9, which was
69477 generated by GNU Autoconf 2.69.  Invocation command line was
69478 
69479   CONFIG_FILES    = $CONFIG_FILES
69480   CONFIG_HEADERS  = $CONFIG_HEADERS
69481   CONFIG_LINKS    = $CONFIG_LINKS
69482   CONFIG_COMMANDS = $CONFIG_COMMANDS
69483   $ $0 $@
69484 
69485 on `(hostname || uname -n) 2>/dev/null | sed 1q`
69486 "
69487 
69488 _ACEOF
69489 
69490 case $ac_config_files in *"
69491 "*) set x $ac_config_files; shift; ac_config_files=$*;;
69492 esac
69493 
69494 
69495 
69496 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69497 # Files that config.status was made for.
69498 config_files="$ac_config_files"
69499 
69500 _ACEOF
69501 
69502 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69503 ac_cs_usage="\
69504 \`$as_me' instantiates files and other configuration actions
69505 from templates according to the current configuration.  Unless the files
69506 and actions are specified as TAGs, all are instantiated by default.
69507 
69508 Usage: $0 [OPTION]... [TAG]...
69509 
69510   -h, --help       print this help, then exit
69511   -V, --version    print version number and configuration settings, then exit
69512       --config     print configuration, then exit
69513   -q, --quiet, --silent
69514                    do not print progress messages
69515   -d, --debug      don't remove temporary files
69516       --recheck    update $as_me by reconfiguring in the same conditions
69517       --file=FILE[:TEMPLATE]
69518                    instantiate the configuration file FILE
69519 
69520 Configuration files:
69521 $config_files
69522 
69523 Report bugs to <build-dev@openjdk.java.net>.
69524 OpenJDK home page: <http://openjdk.java.net>."
69525 
69526 _ACEOF
69527 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69528 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
69529 ac_cs_version="\\
69530 OpenJDK config.status jdk9
69531 configured by $0, generated by GNU Autoconf 2.69,
69532   with options \\"\$ac_cs_config\\"
69533 
69534 Copyright (C) 2012 Free Software Foundation, Inc.
69535 This config.status script is free software; the Free Software Foundation
69536 gives unlimited permission to copy, distribute and modify it."
69537 
69538 ac_pwd='$ac_pwd'
69539 srcdir='$srcdir'
69540 AWK='$AWK'
69541 test -n "\$AWK" || AWK=awk
69542 _ACEOF
69543 
69544 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69545 # The default lists apply if the user does not specify any file.
69546 ac_need_defaults=:
69547 while test $# != 0
69548 do
69549   case $1 in
69550   --*=?*)
69551     ac_option=`expr "X$1" : 'X\([^=]*\)='`
69552     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
69553     ac_shift=:
69554     ;;
69555   --*=)
69556     ac_option=`expr "X$1" : 'X\([^=]*\)='`
69557     ac_optarg=
69558     ac_shift=:
69559     ;;
69560   *)
69561     ac_option=$1
69562     ac_optarg=$2
69563     ac_shift=shift
69564     ;;
69565   esac
69566 
69567   case $ac_option in
69568   # Handling of the options.
69569   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
69570     ac_cs_recheck=: ;;
69571   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
69572     $as_echo "$ac_cs_version"; exit ;;
69573   --config | --confi | --conf | --con | --co | --c )
69574     $as_echo "$ac_cs_config"; exit ;;
69575   --debug | --debu | --deb | --de | --d | -d )
69576     debug=: ;;
69577   --file | --fil | --fi | --f )
69578     $ac_shift
69579     case $ac_optarg in
69580     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
69581     '') as_fn_error $? "missing file argument" ;;
69582     esac
69583     as_fn_append CONFIG_FILES " '$ac_optarg'"
69584     ac_need_defaults=false;;
69585   --he | --h |  --help | --hel | -h )
69586     $as_echo "$ac_cs_usage"; exit ;;
69587   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
69588   | -silent | --silent | --silen | --sile | --sil | --si | --s)
69589     ac_cs_silent=: ;;
69590 
69591   # This is an error.
69592   -*) as_fn_error $? "unrecognized option: \`$1'
69593 Try \`$0 --help' for more information." ;;
69594 
69595   *) as_fn_append ac_config_targets " $1"
69596      ac_need_defaults=false ;;
69597 
69598   esac
69599   shift
69600 done
69601 
69602 ac_configure_extra_args=
69603 
69604 if $ac_cs_silent; then
69605   exec 6>/dev/null
69606   ac_configure_extra_args="$ac_configure_extra_args --silent"
69607 fi
69608 
69609 _ACEOF
69610 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69611 if \$ac_cs_recheck; then
69612   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
69613   shift
69614   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
69615   CONFIG_SHELL='$SHELL'
69616   export CONFIG_SHELL
69617   exec "\$@"
69618 fi
69619 
69620 _ACEOF
69621 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69622 exec 5>>config.log
69623 {
69624   echo
69625   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
69626 ## Running $as_me. ##
69627 _ASBOX
69628   $as_echo "$ac_log"
69629 } >&5
69630 
69631 _ACEOF
69632 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69633 _ACEOF
69634 
69635 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69636 
69637 # Handling of arguments.
69638 for ac_config_target in $ac_config_targets
69639 do
69640   case $ac_config_target in
69641     "$OUTPUTDIR/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
69642     "$OUTPUTDIR/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
69643     "$OUTPUTDIR/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
69644     "$OUTPUTDIR/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
69645     "$OUTPUTDIR/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
69646 
69647   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
69648   esac
69649 done
69650 
69651 
69652 # If the user did not use the arguments to specify the items to instantiate,
69653 # then the envvar interface is used.  Set only those that are not.
69654 # We use the long form for the default assignment because of an extremely
69655 # bizarre bug on SunOS 4.1.3.
69656 if $ac_need_defaults; then
69657   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
69658 fi
69659 
69660 # Have a temporary directory for convenience.  Make it in the build tree
69661 # simply because there is no reason against having it here, and in addition,
69662 # creating and moving files from /tmp can sometimes cause problems.
69663 # Hook for its removal unless debugging.
69664 # Note that there is a small window in which the directory will not be cleaned:
69665 # after its creation but before its name has been assigned to `$tmp'.
69666 $debug ||
69667 {
69668   tmp= ac_tmp=
69669   trap 'exit_status=$?
69670   : "${ac_tmp:=$tmp}"
69671   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
69672 ' 0
69673   trap 'as_fn_exit 1' 1 2 13 15
69674 }
69675 # Create a (secure) tmp directory for tmp files.
69676 
69677 {
69678   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
69679   test -d "$tmp"
69680 }  ||
69681 {
69682   tmp=./conf$$-$RANDOM
69683   (umask 077 && mkdir "$tmp")
69684 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
69685 ac_tmp=$tmp
69686 
69687 # Set up the scripts for CONFIG_FILES section.
69688 # No need to generate them if there are no CONFIG_FILES.
69689 # This happens for instance with `./config.status config.h'.
69690 if test -n "$CONFIG_FILES"; then
69691 
69692 
69693 ac_cr=`echo X | tr X '\015'`
69694 # On cygwin, bash can eat \r inside `` if the user requested igncr.
69695 # But we know of no other shell where ac_cr would be empty at this
69696 # point, so we can use a bashism as a fallback.
69697 if test "x$ac_cr" = x; then
69698   eval ac_cr=\$\'\\r\'
69699 fi
69700 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
69701 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
69702   ac_cs_awk_cr='\\r'
69703 else
69704   ac_cs_awk_cr=$ac_cr
69705 fi
69706 
69707 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
69708 _ACEOF
69709 
69710 
69711 {
69712   echo "cat >conf$$subs.awk <<_ACEOF" &&
69713   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
69714   echo "_ACEOF"
69715 } >conf$$subs.sh ||
69716   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
69717 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
69718 ac_delim='%!_!# '
69719 for ac_last_try in false false false false false :; do
69720   . ./conf$$subs.sh ||
69721     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
69722 
69723   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
69724   if test $ac_delim_n = $ac_delim_num; then
69725     break
69726   elif $ac_last_try; then
69727     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
69728   else
69729     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
69730   fi
69731 done
69732 rm -f conf$$subs.sh
69733 
69734 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69735 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
69736 _ACEOF
69737 sed -n '
69738 h
69739 s/^/S["/; s/!.*/"]=/
69740 p
69741 g
69742 s/^[^!]*!//
69743 :repl
69744 t repl
69745 s/'"$ac_delim"'$//
69746 t delim
69747 :nl
69748 h
69749 s/\(.\{148\}\)..*/\1/
69750 t more1
69751 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
69752 p
69753 n
69754 b repl
69755 :more1
69756 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
69757 p
69758 g
69759 s/.\{148\}//
69760 t nl
69761 :delim
69762 h
69763 s/\(.\{148\}\)..*/\1/
69764 t more2
69765 s/["\\]/\\&/g; s/^/"/; s/$/"/
69766 p
69767 b
69768 :more2
69769 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
69770 p
69771 g
69772 s/.\{148\}//
69773 t delim
69774 ' <conf$$subs.awk | sed '
69775 /^[^""]/{
69776   N
69777   s/\n//
69778 }
69779 ' >>$CONFIG_STATUS || ac_write_fail=1
69780 rm -f conf$$subs.awk
69781 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69782 _ACAWK
69783 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
69784   for (key in S) S_is_set[key] = 1
69785   FS = ""
69786 
69787 }
69788 {
69789   line = $ 0
69790   nfields = split(line, field, "@")
69791   substed = 0
69792   len = length(field[1])
69793   for (i = 2; i < nfields; i++) {
69794     key = field[i]
69795     keylen = length(key)
69796     if (S_is_set[key]) {
69797       value = S[key]
69798       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
69799       len += length(value) + length(field[++i])
69800       substed = 1
69801     } else
69802       len += 1 + keylen
69803   }
69804 
69805   print line
69806 }
69807 
69808 _ACAWK
69809 _ACEOF
69810 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69811 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
69812   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
69813 else
69814   cat
69815 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
69816   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
69817 _ACEOF
69818 
69819 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
69820 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
69821 # trailing colons and then remove the whole line if VPATH becomes empty
69822 # (actually we leave an empty line to preserve line numbers).
69823 if test "x$srcdir" = x.; then
69824   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
69825 h
69826 s///
69827 s/^/:/
69828 s/[      ]*$/:/
69829 s/:\$(srcdir):/:/g
69830 s/:\${srcdir}:/:/g
69831 s/:@srcdir@:/:/g
69832 s/^:*//
69833 s/:*$//
69834 x
69835 s/\(=[   ]*\).*/\1/
69836 G
69837 s/\n//
69838 s/^[^=]*=[       ]*$//
69839 }'
69840 fi
69841 
69842 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69843 fi # test -n "$CONFIG_FILES"
69844 
69845 
69846 eval set X "  :F $CONFIG_FILES      "
69847 shift
69848 for ac_tag
69849 do
69850   case $ac_tag in
69851   :[FHLC]) ac_mode=$ac_tag; continue;;
69852   esac
69853   case $ac_mode$ac_tag in
69854   :[FHL]*:*);;
69855   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
69856   :[FH]-) ac_tag=-:-;;
69857   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
69858   esac
69859   ac_save_IFS=$IFS
69860   IFS=:
69861   set x $ac_tag
69862   IFS=$ac_save_IFS
69863   shift
69864   ac_file=$1
69865   shift
69866 
69867   case $ac_mode in
69868   :L) ac_source=$1;;
69869   :[FH])
69870     ac_file_inputs=
69871     for ac_f
69872     do
69873       case $ac_f in
69874       -) ac_f="$ac_tmp/stdin";;
69875       *) # Look for the file first in the build tree, then in the source tree
69876          # (if the path is not absolute).  The absolute path cannot be DOS-style,
69877          # because $ac_f cannot contain `:'.
69878          test -f "$ac_f" ||
69879            case $ac_f in
69880            [\\/$]*) false;;
69881            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
69882            esac ||
69883            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
69884       esac
69885       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
69886       as_fn_append ac_file_inputs " '$ac_f'"
69887     done
69888 
69889     # Let's still pretend it is `configure' which instantiates (i.e., don't
69890     # use $as_me), people would be surprised to read:
69891     #    /* config.h.  Generated by config.status.  */
69892     configure_input='Generated from '`
69893           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
69894         `' by configure.'
69895     if test x"$ac_file" != x-; then
69896       configure_input="$ac_file.  $configure_input"
69897       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
69898 $as_echo "$as_me: creating $ac_file" >&6;}
69899     fi
69900     # Neutralize special characters interpreted by sed in replacement strings.
69901     case $configure_input in #(
69902     *\&* | *\|* | *\\* )
69903        ac_sed_conf_input=`$as_echo "$configure_input" |
69904        sed 's/[\\\\&|]/\\\\&/g'`;; #(
69905     *) ac_sed_conf_input=$configure_input;;
69906     esac
69907 
69908     case $ac_tag in
69909     *:-:* | *:-) cat >"$ac_tmp/stdin" \
69910       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
69911     esac
69912     ;;
69913   esac
69914 
69915   ac_dir=`$as_dirname -- "$ac_file" ||
69916 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
69917          X"$ac_file" : 'X\(//\)[^/]' \| \
69918          X"$ac_file" : 'X\(//\)$' \| \
69919          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
69920 $as_echo X"$ac_file" |
69921     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
69922             s//\1/
69923             q
69924           }
69925           /^X\(\/\/\)[^/].*/{
69926             s//\1/
69927             q
69928           }
69929           /^X\(\/\/\)$/{
69930             s//\1/
69931             q
69932           }
69933           /^X\(\/\).*/{
69934             s//\1/
69935             q
69936           }
69937           s/.*/./; q'`
69938   as_dir="$ac_dir"; as_fn_mkdir_p
69939   ac_builddir=.
69940 
69941 case "$ac_dir" in
69942 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
69943 *)
69944   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
69945   # A ".." for each directory in $ac_dir_suffix.
69946   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
69947   case $ac_top_builddir_sub in
69948   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
69949   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
69950   esac ;;
69951 esac
69952 ac_abs_top_builddir=$ac_pwd
69953 ac_abs_builddir=$ac_pwd$ac_dir_suffix
69954 # for backward compatibility:
69955 ac_top_builddir=$ac_top_build_prefix
69956 
69957 case $srcdir in
69958   .)  # We are building in place.
69959     ac_srcdir=.
69960     ac_top_srcdir=$ac_top_builddir_sub
69961     ac_abs_top_srcdir=$ac_pwd ;;
69962   [\\/]* | ?:[\\/]* )  # Absolute name.
69963     ac_srcdir=$srcdir$ac_dir_suffix;
69964     ac_top_srcdir=$srcdir
69965     ac_abs_top_srcdir=$srcdir ;;
69966   *) # Relative name.
69967     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
69968     ac_top_srcdir=$ac_top_build_prefix$srcdir
69969     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
69970 esac
69971 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
69972 
69973 
69974   case $ac_mode in
69975   :F)
69976   #
69977   # CONFIG_FILE
69978   #
69979 
69980 _ACEOF
69981 
69982 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69983 # If the template does not know about datarootdir, expand it.
69984 # FIXME: This hack should be removed a few years after 2.60.
69985 ac_datarootdir_hack=; ac_datarootdir_seen=
69986 ac_sed_dataroot='
69987 /datarootdir/ {
69988   p
69989   q
69990 }
69991 /@datadir@/p
69992 /@docdir@/p
69993 /@infodir@/p
69994 /@localedir@/p
69995 /@mandir@/p'
69996 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
69997 *datarootdir*) ac_datarootdir_seen=yes;;
69998 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
69999   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
70000 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
70001 _ACEOF
70002 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70003   ac_datarootdir_hack='
70004   s&@datadir@&$datadir&g
70005   s&@docdir@&$docdir&g
70006   s&@infodir@&$infodir&g
70007   s&@localedir@&$localedir&g
70008   s&@mandir@&$mandir&g
70009   s&\\\${datarootdir}&$datarootdir&g' ;;
70010 esac
70011 _ACEOF
70012 
70013 # Neutralize VPATH when `$srcdir' = `.'.
70014 # Shell code in configure.ac might set extrasub.
70015 # FIXME: do we really want to maintain this feature?
70016 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70017 ac_sed_extra="$ac_vpsub
70018 $extrasub
70019 _ACEOF
70020 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
70021 :t
70022 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
70023 s|@configure_input@|$ac_sed_conf_input|;t t
70024 s&@top_builddir@&$ac_top_builddir_sub&;t t
70025 s&@top_build_prefix@&$ac_top_build_prefix&;t t
70026 s&@srcdir@&$ac_srcdir&;t t
70027 s&@abs_srcdir@&$ac_abs_srcdir&;t t
70028 s&@top_srcdir@&$ac_top_srcdir&;t t
70029 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
70030 s&@builddir@&$ac_builddir&;t t
70031 s&@abs_builddir@&$ac_abs_builddir&;t t
70032 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
70033 $ac_datarootdir_hack
70034 "
70035 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
70036   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
70037 
70038 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
70039   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
70040   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
70041       "$ac_tmp/out"`; test -z "$ac_out"; } &&
70042   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
70043 which seems to be undefined.  Please make sure it is defined" >&5
70044 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
70045 which seems to be undefined.  Please make sure it is defined" >&2;}
70046 
70047   rm -f "$ac_tmp/stdin"
70048   case $ac_file in
70049   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
70050   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
70051   esac \
70052   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
70053  ;;
70054 
70055 
70056 
70057   esac
70058 
70059 done # for ac_tag
70060 
70061 
70062 as_fn_exit 0
70063 _ACEOF
70064 ac_clean_files=$ac_clean_files_save
70065 
70066 test $ac_write_fail = 0 ||
70067   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
70068 
70069 
70070 # configure is writing to config.log, and then calls config.status.
70071 # config.status does its own redirection, appending to config.log.
70072 # Unfortunately, on DOS this fails, as config.log is still kept open
70073 # by configure, so config.status won't be able to write to it; its
70074 # output is simply discarded.  So we exec the FD to /dev/null,
70075 # effectively closing config.log, so it can be properly (re)opened and
70076 # appended to by config.status.  When coming back to configure, we
70077 # need to make the FD available again.
70078 if test "$no_create" != yes; then
70079   ac_cs_success=:
70080   ac_config_status_args=
70081   test "$silent" = yes &&
70082     ac_config_status_args="$ac_config_status_args --quiet"
70083   exec 5>/dev/null
70084   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
70085   exec 5>>config.log
70086   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
70087   # would make configure fail if this is the last instruction.
70088   $ac_cs_success || as_fn_exit 1
70089 fi
70090 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
70091   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
70092 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
70093 fi
70094 
70095 
70096 # After AC_OUTPUT, we need to do final work
70097 
70098 
70099   # Try to move config.log (generated by autoconf) to the configure-support directory.
70100   if test -e ./config.log; then
70101     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
70102   fi
70103 
70104   # Rotate our log file (configure.log)
70105   if test -e "$OUTPUTDIR/configure.log.old"; then
70106     $RM -f "$OUTPUTDIR/configure.log.old"
70107   fi
70108   if test -e "$OUTPUTDIR/configure.log"; then
70109     $MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
70110   fi
70111 
70112   # Move configure.log from current directory to the build output root
70113   if test -e ./configure.log; then
70114     $MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
70115   fi
70116 
70117   # Make the compare script executable
70118   $CHMOD +x $OUTPUTDIR/compare.sh
70119 
70120 
70121 # Finally output some useful information to the user
70122 
70123   # Finally output some useful information to the user
70124 
70125   printf "\n"
70126   printf "====================================================\n"
70127   if test "x$no_create" != "xyes"; then
70128     if test "x$IS_RECONFIGURE" != "xyes"; then
70129       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
70130     else
70131       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
70132     fi
70133   else
70134     if test "x$IS_RECONFIGURE" != "xyes"; then
70135       printf "A configuration has been successfully checked but not created\n"
70136     else
70137       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
70138     fi
70139   fi
70140   if test "x$CONFIGURE_COMMAND_LINE" != x; then
70141     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
70142   else
70143     printf "using default settings.\n"
70144   fi
70145 
70146   printf "\n"
70147   printf "Configuration summary:\n"
70148   printf "* Debug level:    $DEBUG_LEVEL\n"
70149   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
70150   printf "* JDK variant:    $JDK_VARIANT\n"
70151   printf "* JVM variants:   $JVM_VARIANTS\n"
70152   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
70153   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
70154 
70155   printf "\n"
70156   printf "Tools summary:\n"
70157   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
70158     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
70159   fi
70160   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
70161   if test "x$TOOLCHAIN_VERSION" != "x"; then
70162     print_version=" $TOOLCHAIN_VERSION"
70163   fi
70164   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
70165   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
70166   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
70167 
70168   printf "\n"
70169   printf "Build performance summary:\n"
70170   printf "* Cores to use:   $JOBS\n"
70171   printf "* Memory limit:   $MEMORY_SIZE MB\n"
70172   if test "x$CCACHE_STATUS" != "x"; then
70173     printf "* ccache status:  $CCACHE_STATUS\n"
70174   fi
70175   printf "\n"
70176 
70177   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
70178     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
70179     printf "will result in longer build times.\n"
70180     printf "\n"
70181   fi
70182 
70183   if test "x$FOUND_ALT_VARIABLES" != "x"; then
70184     printf "WARNING: You have old-style ALT_ environment variables set.\n"
70185     printf "These are not respected, and will be ignored. It is recommended\n"
70186     printf "that you clean your environment. The following variables are set:\n"
70187     printf "$FOUND_ALT_VARIABLES\n"
70188     printf "\n"
70189   fi
70190 
70191   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
70192     printf "WARNING: Your build output directory is not on a local disk.\n"
70193     printf "This will severely degrade build performance!\n"
70194     printf "It is recommended that you create an output directory on a local disk,\n"
70195     printf "and run the configure script again from that directory.\n"
70196     printf "\n"
70197   fi
70198 
70199   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
70200     printf "WARNING: The result of this configuration has overridden an older\n"
70201     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
70202     printf "proper build. Failure to do so might result in strange build problems.\n"
70203     printf "\n"
70204   fi
70205 
70206   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
70207     printf "WARNING: The result of this configuration was not saved.\n"
70208     printf "You should run without '--no-create | -n' to create the configuration.\n"
70209     printf "\n"
70210   fi
70211 
70212 
70213 
70214   # Locate config.log.
70215   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
70216     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
70217   elif test -e "./config.log"; then
70218     CONFIG_LOG_PATH="."
70219   fi
70220 
70221   if test -e "$CONFIG_LOG_PATH/config.log"; then
70222     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
70223     if test $? -eq 0; then
70224       printf "The following warnings were produced. Repeated here for convenience:\n"
70225       # We must quote sed expression (using []) to stop m4 from eating the [].
70226       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
70227       printf "\n"
70228     fi
70229   fi
70230