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 VENDOR_URL_VM_BUG
 906 VENDOR_URL_BUG
 907 VENDOR_URL
 908 COMPANY_NAME
 909 MACOSX_BUNDLE_ID_BASE
 910 MACOSX_BUNDLE_NAME_BASE
 911 HOTSPOT_VM_DISTRO
 912 JDK_RC_PLATFORM_NAME
 913 PRODUCT_SUFFIX
 914 PRODUCT_NAME
 915 LAUNCHER_NAME
 916 JLINK_KEEP_PACKAGED_MODULES
 917 COPYRIGHT_YEAR
 918 COMPRESS_JARS
 919 INCLUDE_SA
 920 UNLIMITED_CRYPTO
 921 CACERTS_FILE
 922 ENABLE_FULL_DOCS
 923 ENABLE_HEADLESS_ONLY
 924 DEFAULT_MAKE_TARGET
 925 OS_VERSION_MICRO
 926 OS_VERSION_MINOR
 927 OS_VERSION_MAJOR
 928 PKG_CONFIG
 929 BASH_ARGS
 930 SETFILE
 931 CODESIGN
 932 XATTR
 933 DSYMUTIL
 934 IS_GNU_TIME
 935 PATCH
 936 DTRACE
 937 FLOCK
 938 TIME
 939 STAT
 940 HG
 941 DOT
 942 READELF
 943 LDD
 944 ZIPEXE
 945 UNZIP
 946 TAR_SUPPORTS_TRANSFORM
 947 TAR_INCLUDE_PARAM
 948 TAR_CREATE_EXTRA_PARAM
 949 TAR_TYPE
 950 FIND_DELETE
 951 OUTPUT_SYNC
 952 OUTPUT_SYNC_SUPPORTED
 953 CHECK_TOOLSDIR_MAKE
 954 CHECK_TOOLSDIR_GMAKE
 955 CHECK_MAKE
 956 CHECK_GMAKE
 957 MAKE
 958 PKGHANDLER
 959 CONFIGURESUPPORT_OUTPUTDIR
 960 OUTPUTDIR
 961 CONF_NAME
 962 SPEC
 963 SDKROOT
 964 XCODEBUILD
 965 DEVKIT_LIB_DIR
 966 JVM_VARIANT_MAIN
 967 VALID_JVM_VARIANTS
 968 JVM_VARIANTS
 969 DEBUG_LEVEL
 970 HOTSPOT_DEBUG_LEVEL
 971 JDK_VARIANT
 972 USERNAME
 973 TOPDIR
 974 PATH_SEP
 975 OPENJDK_BUILD_OS_INCLUDE_SUBDIR
 976 HOTSPOT_BUILD_CPU_DEFINE
 977 HOTSPOT_BUILD_CPU_ARCH
 978 HOTSPOT_BUILD_CPU
 979 HOTSPOT_BUILD_OS_TYPE
 980 HOTSPOT_BUILD_OS
 981 OPENJDK_BUILD_BUNDLE_PLATFORM
 982 OPENJDK_BUILD_CPU_OSARCH
 983 OPENJDK_BUILD_CPU_ISADIR
 984 OPENJDK_BUILD_CPU_LEGACY_LIB
 985 OPENJDK_BUILD_CPU_LEGACY
 986 OPENJDK_TARGET_OS_INCLUDE_SUBDIR
 987 HOTSPOT_TARGET_CPU_DEFINE
 988 HOTSPOT_TARGET_CPU_ARCH
 989 HOTSPOT_TARGET_CPU
 990 HOTSPOT_TARGET_OS_TYPE
 991 HOTSPOT_TARGET_OS
 992 DEFINE_CROSS_COMPILE_ARCH
 993 OPENJDK_TARGET_BUNDLE_PLATFORM
 994 OPENJDK_TARGET_CPU_OSARCH
 995 OPENJDK_TARGET_CPU_ISADIR
 996 OPENJDK_TARGET_CPU_LEGACY_LIB
 997 OPENJDK_TARGET_CPU_LEGACY
 998 RELEASE_FILE_OS_ARCH
 999 RELEASE_FILE_OS_NAME
1000 OPENJDK_MODULE_TARGET_PLATFORM
1001 COMPILE_TYPE
1002 OPENJDK_TARGET_CPU_ENDIAN
1003 OPENJDK_TARGET_CPU_BITS
1004 OPENJDK_TARGET_CPU_ARCH
1005 OPENJDK_TARGET_CPU
1006 OPENJDK_TARGET_OS_ENV
1007 OPENJDK_TARGET_OS_TYPE
1008 OPENJDK_TARGET_OS
1009 OPENJDK_BUILD_CPU_ENDIAN
1010 OPENJDK_BUILD_CPU_BITS
1011 OPENJDK_BUILD_CPU_ARCH
1012 OPENJDK_BUILD_CPU
1013 OPENJDK_BUILD_OS_ENV
1014 OPENJDK_BUILD_OS_TYPE
1015 OPENJDK_BUILD_OS
1016 OPENJDK_BUILD_AUTOCONF_NAME
1017 OPENJDK_TARGET_AUTOCONF_NAME
1018 target_os
1019 target_vendor
1020 target_cpu
1021 target
1022 host_os
1023 host_vendor
1024 host_cpu
1025 host
1026 build_os
1027 build_vendor
1028 build_cpu
1029 build
1030 PANDOC
1031 NICE
1032 CPIO
1033 DF
1034 READLINK
1035 CYGPATH
1036 SED
1037 FGREP
1038 EGREP
1039 GREP
1040 AWK
1041 XARGS
1042 WHICH
1043 WC
1044 UNIQ
1045 UNAME
1046 TR
1047 TOUCH
1048 TEE
1049 TAR
1050 TAIL
1051 SORT
1052 SH
1053 RMDIR
1054 RM
1055 PRINTF
1056 NAWK
1057 MV
1058 MKTEMP
1059 MKDIR
1060 LS
1061 LN
1062 GZIP
1063 GUNZIP
1064 HEAD
1065 FIND
1066 FILE
1067 EXPR
1068 ECHO
1069 DIRNAME
1070 DIFF
1071 DATE
1072 CUT
1073 CP
1074 COMM
1075 CMP
1076 CHMOD
1077 CAT
1078 BASH
1079 BASENAME
1080 DATE_WHEN_CONFIGURED
1081 ORIGINAL_PATH
1082 CONFIGURE_COMMAND_LINE
1083 target_alias
1084 host_alias
1085 build_alias
1086 LIBS
1087 ECHO_T
1088 ECHO_N
1089 ECHO_C
1090 DEFS
1091 mandir
1092 localedir
1093 libdir
1094 psdir
1095 pdfdir
1096 dvidir
1097 htmldir
1098 infodir
1099 docdir
1100 oldincludedir
1101 includedir
1102 localstatedir
1103 sharedstatedir
1104 sysconfdir
1105 datadir
1106 datarootdir
1107 libexecdir
1108 sbindir
1109 bindir
1110 program_transform_name
1111 prefix
1112 exec_prefix
1113 PACKAGE_URL
1114 PACKAGE_BUGREPORT
1115 PACKAGE_STRING
1116 PACKAGE_VERSION
1117 PACKAGE_TARNAME
1118 PACKAGE_NAME
1119 PATH_SEPARATOR
1120 SHELL'
1121 ac_subst_files=''
1122 ac_user_opts='
1123 enable_option_checking
1124 with_target_bits
1125 enable_openjdk_only
1126 with_custom_make_dir
1127 with_jdk_variant
1128 enable_debug
1129 with_debug_level
1130 with_jvm_variants
1131 with_cpu_port
1132 with_devkit
1133 with_sys_root
1134 with_sysroot
1135 with_tools_dir
1136 with_toolchain_path
1137 with_extra_path
1138 with_sdk_name
1139 with_conf_name
1140 with_output_sync
1141 with_default_make_target
1142 enable_headless_only
1143 enable_full_docs
1144 with_cacerts_file
1145 enable_unlimited_crypto
1146 with_copyright_year
1147 enable_keep_packaged_modules
1148 with_milestone
1149 with_update_version
1150 with_user_release_suffix
1151 with_build_number
1152 with_version_major
1153 with_version_minor
1154 with_version_security
1155 with_vendor_name
1156 with_vendor_url
1157 with_vendor_bug_url
1158 with_vendor_vm_bug_url
1159 with_version_string
1160 with_version_pre
1161 with_version_opt
1162 with_version_build
1163 with_version_feature
1164 with_version_interim
1165 with_version_update
1166 with_version_patch
1167 with_version_date
1168 with_vendor_version_string
1169 with_boot_jdk
1170 with_build_jdk
1171 with_import_modules
1172 enable_static_build
1173 with_toolchain_type
1174 with_extra_cflags
1175 with_extra_cxxflags
1176 with_extra_ldflags
1177 with_toolchain_version
1178 with_build_devkit
1179 with_jtreg
1180 with_jib
1181 with_abi_profile
1182 with_macosx_version_max
1183 enable_warnings_as_errors
1184 with_native_debug_symbols
1185 enable_debug_symbols
1186 enable_zip_debug_info
1187 enable_native_coverage
1188 enable_asan
1189 enable_dtrace
1190 enable_aot
1191 enable_cds
1192 enable_hotspot_gtest
1193 with_stdc__lib
1194 with_msvcr_dll
1195 with_msvcp_dll
1196 with_x
1197 with_cups
1198 with_cups_include
1199 with_fontconfig
1200 with_fontconfig_include
1201 with_freetype
1202 with_freetype_include
1203 with_freetype_lib
1204 with_freetype_src
1205 enable_freetype_bundling
1206 with_freetype_license
1207 with_alsa
1208 with_alsa_include
1209 with_alsa_lib
1210 with_libffi
1211 with_libffi_include
1212 with_libffi_lib
1213 enable_libffi_bundling
1214 with_libjpeg
1215 with_giflib
1216 with_libpng
1217 with_zlib
1218 with_lcms
1219 with_dxsdk
1220 with_dxsdk_lib
1221 with_dxsdk_include
1222 with_jvm_features
1223 with_jvm_interpreter
1224 enable_jtreg_failure_handler
1225 enable_generate_classlist
1226 with_num_cores
1227 with_memory_size
1228 with_jobs
1229 with_test_jobs
1230 with_boot_jdk_jvmargs
1231 with_sjavac_server_java
1232 enable_sjavac
1233 enable_javac_server
1234 enable_icecc
1235 enable_precompiled_headers
1236 enable_ccache
1237 with_ccache_dir
1238 '
1239       ac_precious_vars='build_alias
1240 host_alias
1241 target_alias
1242 BASENAME
1243 BASH
1244 CAT
1245 CHMOD
1246 CMP
1247 COMM
1248 CP
1249 CUT
1250 DATE
1251 DIFF
1252 DIRNAME
1253 ECHO
1254 EXPR
1255 FILE
1256 FIND
1257 HEAD
1258 GUNZIP
1259 GZIP
1260 LN
1261 LS
1262 MKDIR
1263 MKTEMP
1264 MV
1265 NAWK
1266 PRINTF
1267 RM
1268 RMDIR
1269 SH
1270 SORT
1271 TAIL
1272 TAR
1273 TEE
1274 TOUCH
1275 TR
1276 UNAME
1277 UNIQ
1278 WC
1279 WHICH
1280 XARGS
1281 AWK
1282 GREP
1283 EGREP
1284 FGREP
1285 SED
1286 CYGPATH
1287 READLINK
1288 DF
1289 CPIO
1290 NICE
1291 PANDOC
1292 MAKE
1293 UNZIP
1294 ZIPEXE
1295 LDD
1296 READELF
1297 DOT
1298 HG
1299 STAT
1300 TIME
1301 FLOCK
1302 DTRACE
1303 PATCH
1304 DSYMUTIL
1305 XATTR
1306 CODESIGN
1307 SETFILE
1308 PKG_CONFIG
1309 JAVA
1310 JAVAC
1311 JAVADOC
1312 JAR
1313 JARSIGNER
1314 CC
1315 CFLAGS
1316 LDFLAGS
1317 LIBS
1318 CPPFLAGS
1319 CXX
1320 CXXFLAGS
1321 CCC
1322 CPP
1323 CXXCPP
1324 AS
1325 AR
1326 LIPO
1327 OTOOL
1328 INSTALL_NAME_TOOL
1329 STRIP
1330 NM
1331 GNM
1332 OBJCOPY
1333 OBJDUMP
1334 BUILD_CC
1335 BUILD_CXX
1336 BUILD_NM
1337 BUILD_AR
1338 BUILD_OBJCOPY
1339 BUILD_STRIP
1340 JTREGEXE
1341 XMKMF
1342 FREETYPE_CFLAGS
1343 FREETYPE_LIBS
1344 ALSA_CFLAGS
1345 ALSA_LIBS
1346 LIBFFI_CFLAGS
1347 LIBFFI_LIBS
1348 PNG_CFLAGS
1349 PNG_LIBS
1350 LCMS_CFLAGS
1351 LCMS_LIBS
1352 ICECC_CMD
1353 ICECC_CREATE_ENV
1354 ICECC_WRAPPER
1355 CCACHE'
1356 
1357 
1358 # Initialize some variables set by options.
1359 ac_init_help=
1360 ac_init_version=false
1361 ac_unrecognized_opts=
1362 ac_unrecognized_sep=
1363 # The variables have the same names as the options, with
1364 # dashes changed to underlines.
1365 cache_file=/dev/null
1366 exec_prefix=NONE
1367 no_create=
1368 no_recursion=
1369 prefix=NONE
1370 program_prefix=NONE
1371 program_suffix=NONE
1372 program_transform_name=s,x,x,
1373 silent=
1374 site=
1375 srcdir=
1376 verbose=
1377 x_includes=NONE
1378 x_libraries=NONE
1379 
1380 # Installation directory options.
1381 # These are left unexpanded so users can "make install exec_prefix=/foo"
1382 # and all the variables that are supposed to be based on exec_prefix
1383 # by default will actually change.
1384 # Use braces instead of parens because sh, perl, etc. also accept them.
1385 # (The list follows the same order as the GNU Coding Standards.)
1386 bindir='${exec_prefix}/bin'
1387 sbindir='${exec_prefix}/sbin'
1388 libexecdir='${exec_prefix}/libexec'
1389 datarootdir='${prefix}/share'
1390 datadir='${datarootdir}'
1391 sysconfdir='${prefix}/etc'
1392 sharedstatedir='${prefix}/com'
1393 localstatedir='${prefix}/var'
1394 includedir='${prefix}/include'
1395 oldincludedir='/usr/include'
1396 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1397 infodir='${datarootdir}/info'
1398 htmldir='${docdir}'
1399 dvidir='${docdir}'
1400 pdfdir='${docdir}'
1401 psdir='${docdir}'
1402 libdir='${exec_prefix}/lib'
1403 localedir='${datarootdir}/locale'
1404 mandir='${datarootdir}/man'
1405 
1406 ac_prev=
1407 ac_dashdash=
1408 for ac_option
1409 do
1410   # If the previous option needs an argument, assign it.
1411   if test -n "$ac_prev"; then
1412     eval $ac_prev=\$ac_option
1413     ac_prev=
1414     continue
1415   fi
1416 
1417   case $ac_option in
1418   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1419   *=)   ac_optarg= ;;
1420   *)    ac_optarg=yes ;;
1421   esac
1422 
1423   # Accept the important Cygnus configure options, so we can diagnose typos.
1424 
1425   case $ac_dashdash$ac_option in
1426   --)
1427     ac_dashdash=yes ;;
1428 
1429   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1430     ac_prev=bindir ;;
1431   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1432     bindir=$ac_optarg ;;
1433 
1434   -build | --build | --buil | --bui | --bu)
1435     ac_prev=build_alias ;;
1436   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1437     build_alias=$ac_optarg ;;
1438 
1439   -cache-file | --cache-file | --cache-fil | --cache-fi \
1440   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1441     ac_prev=cache_file ;;
1442   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1443   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1444     cache_file=$ac_optarg ;;
1445 
1446   --config-cache | -C)
1447     cache_file=config.cache ;;
1448 
1449   -datadir | --datadir | --datadi | --datad)
1450     ac_prev=datadir ;;
1451   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1452     datadir=$ac_optarg ;;
1453 
1454   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1455   | --dataroo | --dataro | --datar)
1456     ac_prev=datarootdir ;;
1457   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1458   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1459     datarootdir=$ac_optarg ;;
1460 
1461   -disable-* | --disable-*)
1462     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1463     # Reject names that are not valid shell variable names.
1464     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1465       as_fn_error $? "invalid feature name: $ac_useropt"
1466     ac_useropt_orig=$ac_useropt
1467     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1468     case $ac_user_opts in
1469       *"
1470 "enable_$ac_useropt"
1471 "*) ;;
1472       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1473          ac_unrecognized_sep=', ';;
1474     esac
1475     eval enable_$ac_useropt=no ;;
1476 
1477   -docdir | --docdir | --docdi | --doc | --do)
1478     ac_prev=docdir ;;
1479   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1480     docdir=$ac_optarg ;;
1481 
1482   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1483     ac_prev=dvidir ;;
1484   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1485     dvidir=$ac_optarg ;;
1486 
1487   -enable-* | --enable-*)
1488     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1489     # Reject names that are not valid shell variable names.
1490     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1491       as_fn_error $? "invalid feature name: $ac_useropt"
1492     ac_useropt_orig=$ac_useropt
1493     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1494     case $ac_user_opts in
1495       *"
1496 "enable_$ac_useropt"
1497 "*) ;;
1498       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1499          ac_unrecognized_sep=', ';;
1500     esac
1501     eval enable_$ac_useropt=\$ac_optarg ;;
1502 
1503   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1504   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1505   | --exec | --exe | --ex)
1506     ac_prev=exec_prefix ;;
1507   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1508   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1509   | --exec=* | --exe=* | --ex=*)
1510     exec_prefix=$ac_optarg ;;
1511 
1512   -gas | --gas | --ga | --g)
1513     # Obsolete; use --with-gas.
1514     with_gas=yes ;;
1515 
1516   -help | --help | --hel | --he | -h)
1517     ac_init_help=long ;;
1518   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1519     ac_init_help=recursive ;;
1520   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1521     ac_init_help=short ;;
1522 
1523   -host | --host | --hos | --ho)
1524     ac_prev=host_alias ;;
1525   -host=* | --host=* | --hos=* | --ho=*)
1526     host_alias=$ac_optarg ;;
1527 
1528   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1529     ac_prev=htmldir ;;
1530   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1531   | --ht=*)
1532     htmldir=$ac_optarg ;;
1533 
1534   -includedir | --includedir | --includedi | --included | --include \
1535   | --includ | --inclu | --incl | --inc)
1536     ac_prev=includedir ;;
1537   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1538   | --includ=* | --inclu=* | --incl=* | --inc=*)
1539     includedir=$ac_optarg ;;
1540 
1541   -infodir | --infodir | --infodi | --infod | --info | --inf)
1542     ac_prev=infodir ;;
1543   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1544     infodir=$ac_optarg ;;
1545 
1546   -libdir | --libdir | --libdi | --libd)
1547     ac_prev=libdir ;;
1548   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1549     libdir=$ac_optarg ;;
1550 
1551   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1552   | --libexe | --libex | --libe)
1553     ac_prev=libexecdir ;;
1554   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1555   | --libexe=* | --libex=* | --libe=*)
1556     libexecdir=$ac_optarg ;;
1557 
1558   -localedir | --localedir | --localedi | --localed | --locale)
1559     ac_prev=localedir ;;
1560   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1561     localedir=$ac_optarg ;;
1562 
1563   -localstatedir | --localstatedir | --localstatedi | --localstated \
1564   | --localstate | --localstat | --localsta | --localst | --locals)
1565     ac_prev=localstatedir ;;
1566   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1567   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1568     localstatedir=$ac_optarg ;;
1569 
1570   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1571     ac_prev=mandir ;;
1572   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1573     mandir=$ac_optarg ;;
1574 
1575   -nfp | --nfp | --nf)
1576     # Obsolete; use --without-fp.
1577     with_fp=no ;;
1578 
1579   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1580   | --no-cr | --no-c | -n)
1581     no_create=yes ;;
1582 
1583   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1584   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1585     no_recursion=yes ;;
1586 
1587   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1588   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1589   | --oldin | --oldi | --old | --ol | --o)
1590     ac_prev=oldincludedir ;;
1591   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1592   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1593   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1594     oldincludedir=$ac_optarg ;;
1595 
1596   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1597     ac_prev=prefix ;;
1598   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1599     prefix=$ac_optarg ;;
1600 
1601   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1602   | --program-pre | --program-pr | --program-p)
1603     ac_prev=program_prefix ;;
1604   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1605   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1606     program_prefix=$ac_optarg ;;
1607 
1608   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1609   | --program-suf | --program-su | --program-s)
1610     ac_prev=program_suffix ;;
1611   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1612   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1613     program_suffix=$ac_optarg ;;
1614 
1615   -program-transform-name | --program-transform-name \
1616   | --program-transform-nam | --program-transform-na \
1617   | --program-transform-n | --program-transform- \
1618   | --program-transform | --program-transfor \
1619   | --program-transfo | --program-transf \
1620   | --program-trans | --program-tran \
1621   | --progr-tra | --program-tr | --program-t)
1622     ac_prev=program_transform_name ;;
1623   -program-transform-name=* | --program-transform-name=* \
1624   | --program-transform-nam=* | --program-transform-na=* \
1625   | --program-transform-n=* | --program-transform-=* \
1626   | --program-transform=* | --program-transfor=* \
1627   | --program-transfo=* | --program-transf=* \
1628   | --program-trans=* | --program-tran=* \
1629   | --progr-tra=* | --program-tr=* | --program-t=*)
1630     program_transform_name=$ac_optarg ;;
1631 
1632   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1633     ac_prev=pdfdir ;;
1634   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1635     pdfdir=$ac_optarg ;;
1636 
1637   -psdir | --psdir | --psdi | --psd | --ps)
1638     ac_prev=psdir ;;
1639   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1640     psdir=$ac_optarg ;;
1641 
1642   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1643   | -silent | --silent | --silen | --sile | --sil)
1644     silent=yes ;;
1645 
1646   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1647     ac_prev=sbindir ;;
1648   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1649   | --sbi=* | --sb=*)
1650     sbindir=$ac_optarg ;;
1651 
1652   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1653   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1654   | --sharedst | --shareds | --shared | --share | --shar \
1655   | --sha | --sh)
1656     ac_prev=sharedstatedir ;;
1657   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1658   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1659   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1660   | --sha=* | --sh=*)
1661     sharedstatedir=$ac_optarg ;;
1662 
1663   -site | --site | --sit)
1664     ac_prev=site ;;
1665   -site=* | --site=* | --sit=*)
1666     site=$ac_optarg ;;
1667 
1668   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1669     ac_prev=srcdir ;;
1670   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1671     srcdir=$ac_optarg ;;
1672 
1673   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1674   | --syscon | --sysco | --sysc | --sys | --sy)
1675     ac_prev=sysconfdir ;;
1676   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1677   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1678     sysconfdir=$ac_optarg ;;
1679 
1680   -target | --target | --targe | --targ | --tar | --ta | --t)
1681     ac_prev=target_alias ;;
1682   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1683     target_alias=$ac_optarg ;;
1684 
1685   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1686     verbose=yes ;;
1687 
1688   -version | --version | --versio | --versi | --vers | -V)
1689     ac_init_version=: ;;
1690 
1691   -with-* | --with-*)
1692     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1693     # Reject names that are not valid shell variable names.
1694     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1695       as_fn_error $? "invalid package name: $ac_useropt"
1696     ac_useropt_orig=$ac_useropt
1697     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1698     case $ac_user_opts in
1699       *"
1700 "with_$ac_useropt"
1701 "*) ;;
1702       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1703          ac_unrecognized_sep=', ';;
1704     esac
1705     eval with_$ac_useropt=\$ac_optarg ;;
1706 
1707   -without-* | --without-*)
1708     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1709     # Reject names that are not valid shell variable names.
1710     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1711       as_fn_error $? "invalid package name: $ac_useropt"
1712     ac_useropt_orig=$ac_useropt
1713     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1714     case $ac_user_opts in
1715       *"
1716 "with_$ac_useropt"
1717 "*) ;;
1718       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1719          ac_unrecognized_sep=', ';;
1720     esac
1721     eval with_$ac_useropt=no ;;
1722 
1723   --x)
1724     # Obsolete; use --with-x.
1725     with_x=yes ;;
1726 
1727   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1728   | --x-incl | --x-inc | --x-in | --x-i)
1729     ac_prev=x_includes ;;
1730   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1731   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1732     x_includes=$ac_optarg ;;
1733 
1734   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1735   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1736     ac_prev=x_libraries ;;
1737   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1738   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1739     x_libraries=$ac_optarg ;;
1740 
1741   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1742 Try \`$0 --help' for more information"
1743     ;;
1744 
1745   *=*)
1746     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1747     # Reject names that are not valid shell variable names.
1748     case $ac_envvar in #(
1749       '' | [0-9]* | *[!_$as_cr_alnum]* )
1750       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1751     esac
1752     eval $ac_envvar=\$ac_optarg
1753     export $ac_envvar ;;
1754 
1755   *)
1756     # FIXME: should be removed in autoconf 3.0.
1757     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1758     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1759       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1760     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1761     ;;
1762 
1763   esac
1764 done
1765 
1766 if test -n "$ac_prev"; then
1767   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1768   as_fn_error $? "missing argument to $ac_option"
1769 fi
1770 
1771 if test -n "$ac_unrecognized_opts"; then
1772   case $enable_option_checking in
1773     no) ;;
1774     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1775     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1776   esac
1777 fi
1778 
1779 # Check all directory arguments for consistency.
1780 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1781                 datadir sysconfdir sharedstatedir localstatedir includedir \
1782                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1783                 libdir localedir mandir
1784 do
1785   eval ac_val=\$$ac_var
1786   # Remove trailing slashes.
1787   case $ac_val in
1788     */ )
1789       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1790       eval $ac_var=\$ac_val;;
1791   esac
1792   # Be sure to have absolute directory names.
1793   case $ac_val in
1794     [\\/$]* | ?:[\\/]* )  continue;;
1795     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1796   esac
1797   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1798 done
1799 
1800 # There might be people who depend on the old broken behavior: `$host'
1801 # used to hold the argument of --host etc.
1802 # FIXME: To remove some day.
1803 build=$build_alias
1804 host=$host_alias
1805 target=$target_alias
1806 
1807 # FIXME: To remove some day.
1808 if test "x$host_alias" != x; then
1809   if test "x$build_alias" = x; then
1810     cross_compiling=maybe
1811   elif test "x$build_alias" != "x$host_alias"; then
1812     cross_compiling=yes
1813   fi
1814 fi
1815 
1816 ac_tool_prefix=
1817 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1818 
1819 test "$silent" = yes && exec 6>/dev/null
1820 
1821 
1822 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1823 ac_ls_di=`ls -di .` &&
1824 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1825   as_fn_error $? "working directory cannot be determined"
1826 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1827   as_fn_error $? "pwd does not report name of working directory"
1828 
1829 
1830 # Find the source files, if location was not specified.
1831 if test -z "$srcdir"; then
1832   ac_srcdir_defaulted=yes
1833   # Try the directory containing this script, then the parent directory.
1834   ac_confdir=`$as_dirname -- "$as_myself" ||
1835 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1836          X"$as_myself" : 'X\(//\)[^/]' \| \
1837          X"$as_myself" : 'X\(//\)$' \| \
1838          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1839 $as_echo X"$as_myself" |
1840     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1841             s//\1/
1842             q
1843           }
1844           /^X\(\/\/\)[^/].*/{
1845             s//\1/
1846             q
1847           }
1848           /^X\(\/\/\)$/{
1849             s//\1/
1850             q
1851           }
1852           /^X\(\/\).*/{
1853             s//\1/
1854             q
1855           }
1856           s/.*/./; q'`
1857   srcdir=$ac_confdir
1858   if test ! -r "$srcdir/$ac_unique_file"; then
1859     srcdir=..
1860   fi
1861 else
1862   ac_srcdir_defaulted=no
1863 fi
1864 if test ! -r "$srcdir/$ac_unique_file"; then
1865   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1866   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1867 fi
1868 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1869 ac_abs_confdir=`(
1870         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1871         pwd)`
1872 # When building in place, set srcdir=.
1873 if test "$ac_abs_confdir" = "$ac_pwd"; then
1874   srcdir=.
1875 fi
1876 # Remove unnecessary trailing slashes from srcdir.
1877 # Double slashes in file names in object file debugging info
1878 # mess up M-x gdb in Emacs.
1879 case $srcdir in
1880 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1881 esac
1882 for ac_var in $ac_precious_vars; do
1883   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1884   eval ac_env_${ac_var}_value=\$${ac_var}
1885   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1886   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1887 done
1888 
1889 #
1890 # Report the --help message.
1891 #
1892 if test "$ac_init_help" = "long"; then
1893   # Omit some internal or obsolete options to make the list less imposing.
1894   # This message is too long to be a string in the A/UX 3.1 sh.
1895   cat <<_ACEOF
1896 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1897 
1898 Usage: $0 [OPTION]... [VAR=VALUE]...
1899 
1900 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1901 VAR=VALUE.  See below for descriptions of some of the useful variables.
1902 
1903 Defaults for the options are specified in brackets.
1904 
1905 Configuration:
1906   -h, --help              display this help and exit
1907       --help=short        display options specific to this package
1908       --help=recursive    display the short help of all the included packages
1909   -V, --version           display version information and exit
1910   -q, --quiet, --silent   do not print \`checking ...' messages
1911       --cache-file=FILE   cache test results in FILE [disabled]
1912   -C, --config-cache      alias for \`--cache-file=config.cache'
1913   -n, --no-create         do not create output files
1914       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1915 
1916 Installation directories:
1917   --prefix=PREFIX         install architecture-independent files in PREFIX
1918                           [$ac_default_prefix]
1919   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1920                           [PREFIX]
1921 
1922 By default, \`make install' will install all the files in
1923 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1924 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1925 for instance \`--prefix=\$HOME'.
1926 
1927 For better control, use the options below.
1928 
1929 Fine tuning of the installation directories:
1930   --bindir=DIR            user executables [EPREFIX/bin]
1931   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1932   --libexecdir=DIR        program executables [EPREFIX/libexec]
1933   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1934   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1935   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1936   --libdir=DIR            object code libraries [EPREFIX/lib]
1937   --includedir=DIR        C header files [PREFIX/include]
1938   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1939   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1940   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1941   --infodir=DIR           info documentation [DATAROOTDIR/info]
1942   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1943   --mandir=DIR            man documentation [DATAROOTDIR/man]
1944   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1945   --htmldir=DIR           html documentation [DOCDIR]
1946   --dvidir=DIR            dvi documentation [DOCDIR]
1947   --pdfdir=DIR            pdf documentation [DOCDIR]
1948   --psdir=DIR             ps documentation [DOCDIR]
1949 _ACEOF
1950 
1951   cat <<\_ACEOF
1952 
1953 X features:
1954   --x-includes=DIR    X include files are in DIR
1955   --x-libraries=DIR   X library files are in DIR
1956 
1957 System types:
1958   --build=BUILD     configure for building on BUILD [guessed]
1959   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1960   --target=TARGET   configure for building compilers for TARGET [HOST]
1961 _ACEOF
1962 fi
1963 
1964 if test -n "$ac_init_help"; then
1965   case $ac_init_help in
1966      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1967    esac
1968   cat <<\_ACEOF
1969 
1970 Optional Features:
1971   --disable-option-checking  ignore unrecognized --enable/--with options
1972   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1973   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1974   --enable-openjdk-only   suppress building custom source even if present
1975                           [disabled]
1976   --enable-debug          set the debug level to fastdebug (shorthand for
1977                           --with-debug-level=fastdebug) [disabled]
1978   --enable-headless-only  only build headless (no GUI) support [disabled]
1979   --enable-full-docs      build complete documentation [enabled if all tools
1980                           found]
1981   --disable-unlimited-crypto
1982                           Disable unlimited crypto policy [enabled]
1983   --disable-keep-packaged-modules
1984                           Do not keep packaged modules in jdk image [enable]
1985   --enable-static-build   enable static library build [disabled]
1986   --disable-warnings-as-errors
1987                           do not consider native warnings to be an error
1988                           [enabled]
1989   --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                           compatibility and is ignored
1991   --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                           compatibility and is ignored
1993   --enable-native-coverage
1994                           enable native compilation with code coverage
1995                           data[disabled]
1996   --enable-asan           enable AddressSanitizer if possible [disabled]
1997   --enable-dtrace[=yes/no/auto]
1998                           enable dtrace. Default is auto, where dtrace is
1999                           enabled if all dependencies are present.
2000   --enable-aot[=yes/no/auto]
2001                           enable ahead of time compilation feature. Default is
2002                           auto, where aot is enabled if all dependencies are
2003                           present.
2004   --enable-cds[=yes/no]   enable class data sharing feature in non-minimal VM.
2005                           Default is yes.
2006   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2007                           [enabled]
2008   --disable-freetype-bundling
2009                           disable bundling of the freetype library with the
2010                           build result [enabled on Windows or when using
2011                           --with-freetype, disabled otherwise]
2012   --enable-libffi-bundling
2013                           enable bundling of libffi.so to make the built JDK
2014                           runnable on more systems
2015   --enable-jtreg-failure-handler
2016                           forces build of the jtreg failure handler to be
2017                           enabled, missing dependencies become fatal errors.
2018                           Default is auto, where the failure handler is built
2019                           if all dependencies are present and otherwise just
2020                           disabled.
2021   --disable-generate-classlist
2022                           forces enabling or disabling of the generation of a
2023                           CDS classlist at build time. Default is to generate
2024                           it when either the server or client JVMs are built
2025                           and enable-cds is true.
2026   --enable-sjavac         use sjavac to do fast incremental compiles
2027                           [disabled]
2028   --disable-javac-server  disable javac server [enabled]
2029   --enable-icecc          enable distribted compilation of native code using
2030                           icecc/icecream [disabled]
2031   --disable-precompiled-headers
2032                           disable using precompiled headers when compiling C++
2033                           [enabled]
2034   --enable-ccache         enable using ccache to speed up recompilations
2035                           [disabled]
2036 
2037 Optional Packages:
2038   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2039   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2040   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2041                           support it), e.g. --with-target-bits=32 [guessed]
2042   --with-custom-make-dir  Deprecated. Option is kept for backwards
2043                           compatibility and is ignored
2044   --with-jdk-variant      JDK variant to build (normal) [normal]
2045   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2046                           optimized) [release]
2047   --with-jvm-variants     JVM variants (separated by commas) to build
2048                           (server,client,minimal,core,zero,custom) [server]
2049   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2050                           (arm64,aarch64) [aarch64]
2051   --with-devkit           use this devkit for compilers, tools and resources
2052   --with-sys-root         alias for --with-sysroot for backwards compatability
2053   --with-sysroot          use this directory as sysroot
2054   --with-tools-dir        alias for --with-toolchain-path for backwards
2055                           compatibility
2056   --with-toolchain-path   prepend these directories when searching for
2057                           toolchain binaries (compilers etc)
2058   --with-extra-path       prepend these directories to the default path
2059   --with-sdk-name         use the platform SDK of the given name. [macosx]
2060   --with-conf-name        use this as the name of the configuration [generated
2061                           from important configuration options]
2062   --with-output-sync      set make output sync type if supported by make.
2063                           [recurse]
2064   --with-default-make-target
2065                           set the default make target [exploded-image]
2066   --with-cacerts-file     specify alternative cacerts file
2067   --with-copyright-year   Set copyright year value for build [current year]
2068   --with-milestone        Deprecated. Option is kept for backwards
2069                           compatibility and is ignored
2070   --with-update-version   Deprecated. Option is kept for backwards
2071                           compatibility and is ignored
2072   --with-user-release-suffix
2073                           Deprecated. Option is kept for backwards
2074                           compatibility and is ignored
2075   --with-build-number     Deprecated. Option is kept for backwards
2076                           compatibility and is ignored
2077   --with-version-major    Deprecated. Option is kept for backwards
2078                           compatibility and is ignored
2079   --with-version-minor    Deprecated. Option is kept for backwards
2080                           compatibility and is ignored
2081   --with-version-security Deprecated. Option is kept for backwards
2082                           compatibility and is ignored
2083   --with-vendor-name      Set vendor name. Among others, used to set the
2084                           'java.vendor' and 'java.vm.vendor' system
2085                           properties. [not specified]
2086   --with-vendor-url       Set the 'java.vendor.url' system property [not
2087                           specified]
2088   --with-vendor-bug-url   Set the 'java.vendor.url.bug' system property [not
2089                           specified]
2090   --with-vendor-vm-bug-url
2091                           Sets the bug URL which will be displayed when the VM
2092                           crashes [not specified]
2093   --with-version-string   Set version string [calculated]
2094   --with-version-pre      Set the base part of the version 'PRE' field
2095                           (pre-release identifier) ['internal']
2096   --with-version-opt      Set version 'OPT' field (build metadata)
2097                           [<timestamp>.<user>.<dirname>]
2098   --with-version-build    Set version 'BUILD' field (build number) [not
2099                           specified]
2100   --with-version-feature  Set version 'FEATURE' field (first number) [current
2101                           source value]
2102   --with-version-interim  Set version 'INTERIM' field (second number) [current
2103                           source value]
2104   --with-version-update   Set version 'UPDATE' field (third number) [current
2105                           source value]
2106   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2107                           specified]
2108   --with-version-date     Set version date [current source value]
2109   --with-vendor-version-string
2110                           Set vendor version string [not specified]
2111   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2112   --with-build-jdk        path to JDK of same version as is being built[the
2113                           newly built JDK]
2114   --with-import-modules   import a set of prebuilt modules either as a zip
2115                           file or an exploded directory
2116   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2117                           to show possible values [platform dependent]
2118   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2119   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2120   --with-extra-ldflags    extra flags to be used when linking jdk
2121   --with-toolchain-version
2122                           the version of the toolchain to look for, use
2123                           '--help' to show possible values [platform
2124                           dependent]
2125   --with-build-devkit     Devkit to use for the build platform toolchain
2126   --with-jtreg            Regression Test Harness [probed]
2127   --with-jib              Jib dependency management tool [not used]
2128   --with-abi-profile      specify ABI profile for ARM builds
2129                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2130                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2131                           [toolchain dependent]
2132   --with-macosx-version-max
2133                           error on use of newer functionality. [macosx]
2134   --with-native-debug-symbols
2135                           set the native debug symbol configuration (none,
2136                           internal, external, zipped) [varying]
2137   --with-stdc++lib=<static>,<dynamic>,<default>
2138                           force linking of the C++ runtime on Linux to either
2139                           static or dynamic, default is static with dynamic as
2140                           fallback
2141   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2142                           (Windows only) [probed]
2143   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2144                           (Windows only) [probed]
2145   --with-x                use the X Window System
2146   --with-cups             specify prefix directory for the cups package
2147                           (expecting the headers under PATH/include)
2148   --with-cups-include     specify directory for the cups include files
2149   --with-fontconfig       specify prefix directory for the fontconfig package
2150                           (expecting the headers under PATH/include)
2151   --with-fontconfig-include
2152                           specify directory for the fontconfig include files
2153   --with-freetype         specify prefix directory for the freetype package
2154                           (expecting the libraries under PATH/lib and the
2155                           headers under PATH/include)
2156   --with-freetype-include specify directory for the freetype include files
2157   --with-freetype-lib     specify directory for the freetype library
2158   --with-freetype-src     specify directory with freetype sources to
2159                           automatically build the library (experimental,
2160                           Windows-only)
2161   --with-freetype-license if bundling freetype, also bundle this license file
2162   --with-alsa             specify prefix directory for the alsa package
2163                           (expecting the libraries under PATH/lib and the
2164                           headers under PATH/include)
2165   --with-alsa-include     specify directory for the alsa include files
2166   --with-alsa-lib         specify directory for the alsa library
2167   --with-libffi           specify prefix directory for the libffi package
2168                           (expecting the libraries under PATH/lib and the
2169                           headers under PATH/include)
2170   --with-libffi-include   specify directory for the libffi include files
2171   --with-libffi-lib       specify directory for the libffi library
2172   --with-libjpeg          use libjpeg from build system or OpenJDK source
2173                           (system, bundled) [bundled]
2174   --with-giflib           use giflib from build system or OpenJDK source
2175                           (system, bundled) [bundled]
2176   --with-libpng           use libpng from build system or OpenJDK source
2177                           (system, bundled) [bundled]
2178   --with-zlib             use zlib from build system or OpenJDK source
2179                           (system, bundled) [bundled]
2180   --with-lcms             use lcms2 from build system or OpenJDK source
2181                           (system, bundled) [bundled]
2182   --with-dxsdk            Deprecated. Option is kept for backwards
2183                           compatibility and is ignored
2184   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2185                           compatibility and is ignored
2186   --with-dxsdk-include    Deprecated. Option is kept for backwards
2187                           compatibility and is ignored
2188   --with-jvm-features     additional JVM features to enable (separated by
2189                           comma), use '--help' to show possible values [none]
2190   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2191                           compatibility and is ignored
2192   --with-num-cores        number of cores in the build system, e.g.
2193                           --with-num-cores=8 [probed]
2194   --with-memory-size      memory (in MB) available in the build system, e.g.
2195                           --with-memory-size=1024 [probed]
2196   --with-jobs             number of parallel jobs to let make run [calculated
2197                           based on cores and memory]
2198   --with-test-jobs        number of parallel tests jobs to run [based on build
2199                           jobs]
2200   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2201                           invocations of boot JDK, overriding the default
2202                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2203                           -enableassertions"
2204   --with-sjavac-server-java
2205                           use this java binary for running the sjavac
2206                           background server [Boot JDK java]
2207   --with-ccache-dir       where to store ccache files [~/.ccache]
2208 
2209 Some influential environment variables:
2210   BASENAME    Override default value for BASENAME
2211   BASH        Override default value for BASH
2212   CAT         Override default value for CAT
2213   CHMOD       Override default value for CHMOD
2214   CMP         Override default value for CMP
2215   COMM        Override default value for COMM
2216   CP          Override default value for CP
2217   CUT         Override default value for CUT
2218   DATE        Override default value for DATE
2219   DIFF        Override default value for DIFF
2220   DIRNAME     Override default value for DIRNAME
2221   ECHO        Override default value for ECHO
2222   EXPR        Override default value for EXPR
2223   FILE        Override default value for FILE
2224   FIND        Override default value for FIND
2225   HEAD        Override default value for HEAD
2226   GUNZIP      Override default value for GUNZIP
2227   GZIP        Override default value for GZIP
2228   LN          Override default value for LN
2229   LS          Override default value for LS
2230   MKDIR       Override default value for MKDIR
2231   MKTEMP      Override default value for MKTEMP
2232   MV          Override default value for MV
2233   NAWK        Override default value for NAWK
2234   PRINTF      Override default value for PRINTF
2235   RM          Override default value for RM
2236   RMDIR       Override default value for RMDIR
2237   SH          Override default value for SH
2238   SORT        Override default value for SORT
2239   TAIL        Override default value for TAIL
2240   TAR         Override default value for TAR
2241   TEE         Override default value for TEE
2242   TOUCH       Override default value for TOUCH
2243   TR          Override default value for TR
2244   UNAME       Override default value for UNAME
2245   UNIQ        Override default value for UNIQ
2246   WC          Override default value for WC
2247   WHICH       Override default value for WHICH
2248   XARGS       Override default value for XARGS
2249   AWK         Override default value for AWK
2250   GREP        Override default value for GREP
2251   EGREP       Override default value for EGREP
2252   FGREP       Override default value for FGREP
2253   SED         Override default value for SED
2254   CYGPATH     Override default value for CYGPATH
2255   READLINK    Override default value for READLINK
2256   DF          Override default value for DF
2257   CPIO        Override default value for CPIO
2258   NICE        Override default value for NICE
2259   PANDOC      Override default value for PANDOC
2260   MAKE        Override default value for MAKE
2261   UNZIP       Override default value for UNZIP
2262   ZIPEXE      Override default value for ZIPEXE
2263   LDD         Override default value for LDD
2264   READELF     Override default value for READELF
2265   DOT         Override default value for DOT
2266   HG          Override default value for HG
2267   STAT        Override default value for STAT
2268   TIME        Override default value for TIME
2269   FLOCK       Override default value for FLOCK
2270   DTRACE      Override default value for DTRACE
2271   PATCH       Override default value for PATCH
2272   DSYMUTIL    Override default value for DSYMUTIL
2273   XATTR       Override default value for XATTR
2274   CODESIGN    Override default value for CODESIGN
2275   SETFILE     Override default value for SETFILE
2276   PKG_CONFIG  path to pkg-config utility
2277   JAVA        Override default value for JAVA
2278   JAVAC       Override default value for JAVAC
2279   JAVADOC     Override default value for JAVADOC
2280   JAR         Override default value for JAR
2281   JARSIGNER   Override default value for JARSIGNER
2282   CC          C compiler command
2283   CFLAGS      C compiler flags
2284   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2285               nonstandard directory <lib dir>
2286   LIBS        libraries to pass to the linker, e.g. -l<library>
2287   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2288               you have headers in a nonstandard directory <include dir>
2289   CXX         C++ compiler command
2290   CXXFLAGS    C++ compiler flags
2291   CPP         C preprocessor
2292   CXXCPP      C++ preprocessor
2293   AS          Override default value for AS
2294   AR          Override default value for AR
2295   LIPO        Override default value for LIPO
2296   OTOOL       Override default value for OTOOL
2297   INSTALL_NAME_TOOL
2298               Override default value for INSTALL_NAME_TOOL
2299   STRIP       Override default value for STRIP
2300   NM          Override default value for NM
2301   GNM         Override default value for GNM
2302   OBJCOPY     Override default value for OBJCOPY
2303   OBJDUMP     Override default value for OBJDUMP
2304   BUILD_CC    Override default value for BUILD_CC
2305   BUILD_CXX   Override default value for BUILD_CXX
2306   BUILD_NM    Override default value for BUILD_NM
2307   BUILD_AR    Override default value for BUILD_AR
2308   BUILD_OBJCOPY
2309               Override default value for BUILD_OBJCOPY
2310   BUILD_STRIP Override default value for BUILD_STRIP
2311   JTREGEXE    Override default value for JTREGEXE
2312   XMKMF       Path to xmkmf, Makefile generator for X Window System
2313   FREETYPE_CFLAGS
2314               C compiler flags for FREETYPE, overriding pkg-config
2315   FREETYPE_LIBS
2316               linker flags for FREETYPE, overriding pkg-config
2317   ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2318   ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2319   LIBFFI_CFLAGS
2320               C compiler flags for LIBFFI, overriding pkg-config
2321   LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2322   PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2323   PNG_LIBS    linker flags for PNG, overriding pkg-config
2324   LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2325   LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2326   ICECC_CMD   Override default value for ICECC_CMD
2327   ICECC_CREATE_ENV
2328               Override default value for ICECC_CREATE_ENV
2329   ICECC_WRAPPER
2330               Override default value for ICECC_WRAPPER
2331   CCACHE      Override default value for CCACHE
2332 
2333 Use these variables to override the choices made by `configure' or to help
2334 it to find libraries and programs with nonstandard names/locations.
2335 
2336 Report bugs to <build-dev@openjdk.java.net>.
2337 OpenJDK home page: <http://openjdk.java.net>.
2338 _ACEOF
2339 ac_status=$?
2340 fi
2341 
2342 if test "$ac_init_help" = "recursive"; then
2343   # If there are subdirs, report their specific --help.
2344   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2345     test -d "$ac_dir" ||
2346       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2347       continue
2348     ac_builddir=.
2349 
2350 case "$ac_dir" in
2351 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2352 *)
2353   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2354   # A ".." for each directory in $ac_dir_suffix.
2355   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2356   case $ac_top_builddir_sub in
2357   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2358   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2359   esac ;;
2360 esac
2361 ac_abs_top_builddir=$ac_pwd
2362 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2363 # for backward compatibility:
2364 ac_top_builddir=$ac_top_build_prefix
2365 
2366 case $srcdir in
2367   .)  # We are building in place.
2368     ac_srcdir=.
2369     ac_top_srcdir=$ac_top_builddir_sub
2370     ac_abs_top_srcdir=$ac_pwd ;;
2371   [\\/]* | ?:[\\/]* )  # Absolute name.
2372     ac_srcdir=$srcdir$ac_dir_suffix;
2373     ac_top_srcdir=$srcdir
2374     ac_abs_top_srcdir=$srcdir ;;
2375   *) # Relative name.
2376     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2377     ac_top_srcdir=$ac_top_build_prefix$srcdir
2378     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2379 esac
2380 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2381 
2382     cd "$ac_dir" || { ac_status=$?; continue; }
2383     # Check for guested configure.
2384     if test -f "$ac_srcdir/configure.gnu"; then
2385       echo &&
2386       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2387     elif test -f "$ac_srcdir/configure"; then
2388       echo &&
2389       $SHELL "$ac_srcdir/configure" --help=recursive
2390     else
2391       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2392     fi || ac_status=$?
2393     cd "$ac_pwd" || { ac_status=$?; break; }
2394   done
2395 fi
2396 
2397 test -n "$ac_init_help" && exit $ac_status
2398 if $ac_init_version; then
2399   cat <<\_ACEOF
2400 OpenJDK configure jdk9
2401 generated by GNU Autoconf 2.69
2402 
2403 Copyright (C) 2012 Free Software Foundation, Inc.
2404 This configure script is free software; the Free Software Foundation
2405 gives unlimited permission to copy, distribute and modify it.
2406 _ACEOF
2407   exit
2408 fi
2409 
2410 ## ------------------------ ##
2411 ## Autoconf initialization. ##
2412 ## ------------------------ ##
2413 
2414 # ac_fn_c_try_compile LINENO
2415 # --------------------------
2416 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2417 ac_fn_c_try_compile ()
2418 {
2419   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2420   rm -f conftest.$ac_objext
2421   if { { ac_try="$ac_compile"
2422 case "(($ac_try" in
2423   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2424   *) ac_try_echo=$ac_try;;
2425 esac
2426 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2427 $as_echo "$ac_try_echo"; } >&5
2428   (eval "$ac_compile") 2>conftest.err
2429   ac_status=$?
2430   if test -s conftest.err; then
2431     grep -v '^ *+' conftest.err >conftest.er1
2432     cat conftest.er1 >&5
2433     mv -f conftest.er1 conftest.err
2434   fi
2435   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2436   test $ac_status = 0; } && {
2437          test -z "$ac_c_werror_flag" ||
2438          test ! -s conftest.err
2439        } && test -s conftest.$ac_objext; then :
2440   ac_retval=0
2441 else
2442   $as_echo "$as_me: failed program was:" >&5
2443 sed 's/^/| /' conftest.$ac_ext >&5
2444 
2445         ac_retval=1
2446 fi
2447   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2448   as_fn_set_status $ac_retval
2449 
2450 } # ac_fn_c_try_compile
2451 
2452 # ac_fn_cxx_try_compile LINENO
2453 # ----------------------------
2454 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2455 ac_fn_cxx_try_compile ()
2456 {
2457   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2458   rm -f conftest.$ac_objext
2459   if { { ac_try="$ac_compile"
2460 case "(($ac_try" in
2461   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2462   *) ac_try_echo=$ac_try;;
2463 esac
2464 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2465 $as_echo "$ac_try_echo"; } >&5
2466   (eval "$ac_compile") 2>conftest.err
2467   ac_status=$?
2468   if test -s conftest.err; then
2469     grep -v '^ *+' conftest.err >conftest.er1
2470     cat conftest.er1 >&5
2471     mv -f conftest.er1 conftest.err
2472   fi
2473   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2474   test $ac_status = 0; } && {
2475          test -z "$ac_cxx_werror_flag" ||
2476          test ! -s conftest.err
2477        } && test -s conftest.$ac_objext; then :
2478   ac_retval=0
2479 else
2480   $as_echo "$as_me: failed program was:" >&5
2481 sed 's/^/| /' conftest.$ac_ext >&5
2482 
2483         ac_retval=1
2484 fi
2485   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2486   as_fn_set_status $ac_retval
2487 
2488 } # ac_fn_cxx_try_compile
2489 
2490 # ac_fn_c_try_cpp LINENO
2491 # ----------------------
2492 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2493 ac_fn_c_try_cpp ()
2494 {
2495   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2496   if { { ac_try="$ac_cpp conftest.$ac_ext"
2497 case "(($ac_try" in
2498   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499   *) ac_try_echo=$ac_try;;
2500 esac
2501 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2502 $as_echo "$ac_try_echo"; } >&5
2503   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2504   ac_status=$?
2505   if test -s conftest.err; then
2506     grep -v '^ *+' conftest.err >conftest.er1
2507     cat conftest.er1 >&5
2508     mv -f conftest.er1 conftest.err
2509   fi
2510   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2511   test $ac_status = 0; } > conftest.i && {
2512          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2513          test ! -s conftest.err
2514        }; then :
2515   ac_retval=0
2516 else
2517   $as_echo "$as_me: failed program was:" >&5
2518 sed 's/^/| /' conftest.$ac_ext >&5
2519 
2520     ac_retval=1
2521 fi
2522   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523   as_fn_set_status $ac_retval
2524 
2525 } # ac_fn_c_try_cpp
2526 
2527 # ac_fn_cxx_try_cpp LINENO
2528 # ------------------------
2529 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2530 ac_fn_cxx_try_cpp ()
2531 {
2532   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2533   if { { ac_try="$ac_cpp conftest.$ac_ext"
2534 case "(($ac_try" in
2535   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2536   *) ac_try_echo=$ac_try;;
2537 esac
2538 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2539 $as_echo "$ac_try_echo"; } >&5
2540   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2541   ac_status=$?
2542   if test -s conftest.err; then
2543     grep -v '^ *+' conftest.err >conftest.er1
2544     cat conftest.er1 >&5
2545     mv -f conftest.er1 conftest.err
2546   fi
2547   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2548   test $ac_status = 0; } > conftest.i && {
2549          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2550          test ! -s conftest.err
2551        }; then :
2552   ac_retval=0
2553 else
2554   $as_echo "$as_me: failed program was:" >&5
2555 sed 's/^/| /' conftest.$ac_ext >&5
2556 
2557     ac_retval=1
2558 fi
2559   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560   as_fn_set_status $ac_retval
2561 
2562 } # ac_fn_cxx_try_cpp
2563 
2564 # ac_fn_c_try_link LINENO
2565 # -----------------------
2566 # Try to link conftest.$ac_ext, and return whether this succeeded.
2567 ac_fn_c_try_link ()
2568 {
2569   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2570   rm -f conftest.$ac_objext conftest$ac_exeext
2571   if { { ac_try="$ac_link"
2572 case "(($ac_try" in
2573   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2574   *) ac_try_echo=$ac_try;;
2575 esac
2576 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2577 $as_echo "$ac_try_echo"; } >&5
2578   (eval "$ac_link") 2>conftest.err
2579   ac_status=$?
2580   if test -s conftest.err; then
2581     grep -v '^ *+' conftest.err >conftest.er1
2582     cat conftest.er1 >&5
2583     mv -f conftest.er1 conftest.err
2584   fi
2585   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2586   test $ac_status = 0; } && {
2587          test -z "$ac_c_werror_flag" ||
2588          test ! -s conftest.err
2589        } && test -s conftest$ac_exeext && {
2590          test "$cross_compiling" = yes ||
2591          test -x conftest$ac_exeext
2592        }; then :
2593   ac_retval=0
2594 else
2595   $as_echo "$as_me: failed program was:" >&5
2596 sed 's/^/| /' conftest.$ac_ext >&5
2597 
2598         ac_retval=1
2599 fi
2600   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2601   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2602   # interfere with the next link command; also delete a directory that is
2603   # left behind by Apple's compiler.  We do this before executing the actions.
2604   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2605   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2606   as_fn_set_status $ac_retval
2607 
2608 } # ac_fn_c_try_link
2609 
2610 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2611 # ---------------------------------------------------------
2612 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2613 # the include files in INCLUDES and setting the cache variable VAR
2614 # accordingly.
2615 ac_fn_cxx_check_header_mongrel ()
2616 {
2617   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2618   if eval \${$3+:} false; then :
2619   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2620 $as_echo_n "checking for $2... " >&6; }
2621 if eval \${$3+:} false; then :
2622   $as_echo_n "(cached) " >&6
2623 fi
2624 eval ac_res=\$$3
2625                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2626 $as_echo "$ac_res" >&6; }
2627 else
2628   # Is the header compilable?
2629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2630 $as_echo_n "checking $2 usability... " >&6; }
2631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632 /* end confdefs.h.  */
2633 $4
2634 #include <$2>
2635 _ACEOF
2636 if ac_fn_cxx_try_compile "$LINENO"; then :
2637   ac_header_compiler=yes
2638 else
2639   ac_header_compiler=no
2640 fi
2641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2643 $as_echo "$ac_header_compiler" >&6; }
2644 
2645 # Is the header present?
2646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2647 $as_echo_n "checking $2 presence... " >&6; }
2648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2649 /* end confdefs.h.  */
2650 #include <$2>
2651 _ACEOF
2652 if ac_fn_cxx_try_cpp "$LINENO"; then :
2653   ac_header_preproc=yes
2654 else
2655   ac_header_preproc=no
2656 fi
2657 rm -f conftest.err conftest.i conftest.$ac_ext
2658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2659 $as_echo "$ac_header_preproc" >&6; }
2660 
2661 # So?  What about this header?
2662 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2663   yes:no: )
2664     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2665 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2666     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2667 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2668     ;;
2669   no:yes:* )
2670     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2671 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2672     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2673 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2674     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2675 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2676     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2677 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2678     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2679 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2680 ( $as_echo "## ----------------------------------------- ##
2681 ## Report this to build-dev@openjdk.java.net ##
2682 ## ----------------------------------------- ##"
2683      ) | sed "s/^/$as_me: WARNING:     /" >&2
2684     ;;
2685 esac
2686   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2687 $as_echo_n "checking for $2... " >&6; }
2688 if eval \${$3+:} false; then :
2689   $as_echo_n "(cached) " >&6
2690 else
2691   eval "$3=\$ac_header_compiler"
2692 fi
2693 eval ac_res=\$$3
2694                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2695 $as_echo "$ac_res" >&6; }
2696 fi
2697   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2698 
2699 } # ac_fn_cxx_check_header_mongrel
2700 
2701 # ac_fn_cxx_try_run LINENO
2702 # ------------------------
2703 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2704 # that executables *can* be run.
2705 ac_fn_cxx_try_run ()
2706 {
2707   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2708   if { { ac_try="$ac_link"
2709 case "(($ac_try" in
2710   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2711   *) ac_try_echo=$ac_try;;
2712 esac
2713 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2714 $as_echo "$ac_try_echo"; } >&5
2715   (eval "$ac_link") 2>&5
2716   ac_status=$?
2717   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2718   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2719   { { case "(($ac_try" in
2720   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2721   *) ac_try_echo=$ac_try;;
2722 esac
2723 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2724 $as_echo "$ac_try_echo"; } >&5
2725   (eval "$ac_try") 2>&5
2726   ac_status=$?
2727   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2728   test $ac_status = 0; }; }; then :
2729   ac_retval=0
2730 else
2731   $as_echo "$as_me: program exited with status $ac_status" >&5
2732        $as_echo "$as_me: failed program was:" >&5
2733 sed 's/^/| /' conftest.$ac_ext >&5
2734 
2735        ac_retval=$ac_status
2736 fi
2737   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2738   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739   as_fn_set_status $ac_retval
2740 
2741 } # ac_fn_cxx_try_run
2742 
2743 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2744 # ---------------------------------------------------------
2745 # Tests whether HEADER exists and can be compiled using the include files in
2746 # INCLUDES, setting the cache variable VAR accordingly.
2747 ac_fn_cxx_check_header_compile ()
2748 {
2749   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2750   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2751 $as_echo_n "checking for $2... " >&6; }
2752 if eval \${$3+:} false; then :
2753   $as_echo_n "(cached) " >&6
2754 else
2755   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2756 /* end confdefs.h.  */
2757 $4
2758 #include <$2>
2759 _ACEOF
2760 if ac_fn_cxx_try_compile "$LINENO"; then :
2761   eval "$3=yes"
2762 else
2763   eval "$3=no"
2764 fi
2765 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2766 fi
2767 eval ac_res=\$$3
2768                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2769 $as_echo "$ac_res" >&6; }
2770   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2771 
2772 } # ac_fn_cxx_check_header_compile
2773 
2774 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2775 # ----------------------------------------------
2776 # Tries to find the compile-time value of EXPR in a program that includes
2777 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2778 # computed
2779 ac_fn_cxx_compute_int ()
2780 {
2781   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2782   if test "$cross_compiling" = yes; then
2783     # Depending upon the size, compute the lo and hi bounds.
2784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2785 /* end confdefs.h.  */
2786 $4
2787 int
2788 main ()
2789 {
2790 static int test_array [1 - 2 * !(($2) >= 0)];
2791 test_array [0] = 0;
2792 return test_array [0];
2793 
2794   ;
2795   return 0;
2796 }
2797 _ACEOF
2798 if ac_fn_cxx_try_compile "$LINENO"; then :
2799   ac_lo=0 ac_mid=0
2800   while :; do
2801     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2802 /* end confdefs.h.  */
2803 $4
2804 int
2805 main ()
2806 {
2807 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2808 test_array [0] = 0;
2809 return test_array [0];
2810 
2811   ;
2812   return 0;
2813 }
2814 _ACEOF
2815 if ac_fn_cxx_try_compile "$LINENO"; then :
2816   ac_hi=$ac_mid; break
2817 else
2818   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2819                         if test $ac_lo -le $ac_mid; then
2820                           ac_lo= ac_hi=
2821                           break
2822                         fi
2823                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2824 fi
2825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2826   done
2827 else
2828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2829 /* end confdefs.h.  */
2830 $4
2831 int
2832 main ()
2833 {
2834 static int test_array [1 - 2 * !(($2) < 0)];
2835 test_array [0] = 0;
2836 return test_array [0];
2837 
2838   ;
2839   return 0;
2840 }
2841 _ACEOF
2842 if ac_fn_cxx_try_compile "$LINENO"; then :
2843   ac_hi=-1 ac_mid=-1
2844   while :; do
2845     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2846 /* end confdefs.h.  */
2847 $4
2848 int
2849 main ()
2850 {
2851 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2852 test_array [0] = 0;
2853 return test_array [0];
2854 
2855   ;
2856   return 0;
2857 }
2858 _ACEOF
2859 if ac_fn_cxx_try_compile "$LINENO"; then :
2860   ac_lo=$ac_mid; break
2861 else
2862   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2863                         if test $ac_mid -le $ac_hi; then
2864                           ac_lo= ac_hi=
2865                           break
2866                         fi
2867                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2868 fi
2869 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2870   done
2871 else
2872   ac_lo= ac_hi=
2873 fi
2874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875 fi
2876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877 # Binary search between lo and hi bounds.
2878 while test "x$ac_lo" != "x$ac_hi"; do
2879   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2880   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2881 /* end confdefs.h.  */
2882 $4
2883 int
2884 main ()
2885 {
2886 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2887 test_array [0] = 0;
2888 return test_array [0];
2889 
2890   ;
2891   return 0;
2892 }
2893 _ACEOF
2894 if ac_fn_cxx_try_compile "$LINENO"; then :
2895   ac_hi=$ac_mid
2896 else
2897   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2898 fi
2899 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2900 done
2901 case $ac_lo in #((
2902 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2903 '') ac_retval=1 ;;
2904 esac
2905   else
2906     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2907 /* end confdefs.h.  */
2908 $4
2909 static long int longval () { return $2; }
2910 static unsigned long int ulongval () { return $2; }
2911 #include <stdio.h>
2912 #include <stdlib.h>
2913 int
2914 main ()
2915 {
2916 
2917   FILE *f = fopen ("conftest.val", "w");
2918   if (! f)
2919     return 1;
2920   if (($2) < 0)
2921     {
2922       long int i = longval ();
2923       if (i != ($2))
2924         return 1;
2925       fprintf (f, "%ld", i);
2926     }
2927   else
2928     {
2929       unsigned long int i = ulongval ();
2930       if (i != ($2))
2931         return 1;
2932       fprintf (f, "%lu", i);
2933     }
2934   /* Do not output a trailing newline, as this causes \r\n confusion
2935      on some platforms.  */
2936   return ferror (f) || fclose (f) != 0;
2937 
2938   ;
2939   return 0;
2940 }
2941 _ACEOF
2942 if ac_fn_cxx_try_run "$LINENO"; then :
2943   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2944 else
2945   ac_retval=1
2946 fi
2947 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2948   conftest.$ac_objext conftest.beam conftest.$ac_ext
2949 rm -f conftest.val
2950 
2951   fi
2952   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2953   as_fn_set_status $ac_retval
2954 
2955 } # ac_fn_cxx_compute_int
2956 
2957 # ac_fn_cxx_try_link LINENO
2958 # -------------------------
2959 # Try to link conftest.$ac_ext, and return whether this succeeded.
2960 ac_fn_cxx_try_link ()
2961 {
2962   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2963   rm -f conftest.$ac_objext conftest$ac_exeext
2964   if { { ac_try="$ac_link"
2965 case "(($ac_try" in
2966   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2967   *) ac_try_echo=$ac_try;;
2968 esac
2969 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2970 $as_echo "$ac_try_echo"; } >&5
2971   (eval "$ac_link") 2>conftest.err
2972   ac_status=$?
2973   if test -s conftest.err; then
2974     grep -v '^ *+' conftest.err >conftest.er1
2975     cat conftest.er1 >&5
2976     mv -f conftest.er1 conftest.err
2977   fi
2978   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2979   test $ac_status = 0; } && {
2980          test -z "$ac_cxx_werror_flag" ||
2981          test ! -s conftest.err
2982        } && test -s conftest$ac_exeext && {
2983          test "$cross_compiling" = yes ||
2984          test -x conftest$ac_exeext
2985        }; then :
2986   ac_retval=0
2987 else
2988   $as_echo "$as_me: failed program was:" >&5
2989 sed 's/^/| /' conftest.$ac_ext >&5
2990 
2991         ac_retval=1
2992 fi
2993   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2994   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2995   # interfere with the next link command; also delete a directory that is
2996   # left behind by Apple's compiler.  We do this before executing the actions.
2997   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2998   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2999   as_fn_set_status $ac_retval
3000 
3001 } # ac_fn_cxx_try_link
3002 
3003 # ac_fn_cxx_check_func LINENO FUNC VAR
3004 # ------------------------------------
3005 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3006 ac_fn_cxx_check_func ()
3007 {
3008   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3009   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3010 $as_echo_n "checking for $2... " >&6; }
3011 if eval \${$3+:} false; then :
3012   $as_echo_n "(cached) " >&6
3013 else
3014   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3015 /* end confdefs.h.  */
3016 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3017    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3018 #define $2 innocuous_$2
3019 
3020 /* System header to define __stub macros and hopefully few prototypes,
3021     which can conflict with char $2 (); below.
3022     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3023     <limits.h> exists even on freestanding compilers.  */
3024 
3025 #ifdef __STDC__
3026 # include <limits.h>
3027 #else
3028 # include <assert.h>
3029 #endif
3030 
3031 #undef $2
3032 
3033 /* Override any GCC internal prototype to avoid an error.
3034    Use char because int might match the return type of a GCC
3035    builtin and then its argument prototype would still apply.  */
3036 #ifdef __cplusplus
3037 extern "C"
3038 #endif
3039 char $2 ();
3040 /* The GNU C library defines this for functions which it implements
3041     to always fail with ENOSYS.  Some functions are actually named
3042     something starting with __ and the normal name is an alias.  */
3043 #if defined __stub_$2 || defined __stub___$2
3044 choke me
3045 #endif
3046 
3047 int
3048 main ()
3049 {
3050 return $2 ();
3051   ;
3052   return 0;
3053 }
3054 _ACEOF
3055 if ac_fn_cxx_try_link "$LINENO"; then :
3056   eval "$3=yes"
3057 else
3058   eval "$3=no"
3059 fi
3060 rm -f core conftest.err conftest.$ac_objext \
3061     conftest$ac_exeext conftest.$ac_ext
3062 fi
3063 eval ac_res=\$$3
3064                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3065 $as_echo "$ac_res" >&6; }
3066   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3067 
3068 } # ac_fn_cxx_check_func
3069 
3070 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3071 # -------------------------------------------------------
3072 # Tests whether HEADER exists and can be compiled using the include files in
3073 # INCLUDES, setting the cache variable VAR accordingly.
3074 ac_fn_c_check_header_compile ()
3075 {
3076   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3077   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3078 $as_echo_n "checking for $2... " >&6; }
3079 if eval \${$3+:} false; then :
3080   $as_echo_n "(cached) " >&6
3081 else
3082   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3083 /* end confdefs.h.  */
3084 $4
3085 #include <$2>
3086 _ACEOF
3087 if ac_fn_c_try_compile "$LINENO"; then :
3088   eval "$3=yes"
3089 else
3090   eval "$3=no"
3091 fi
3092 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3093 fi
3094 eval ac_res=\$$3
3095                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3096 $as_echo "$ac_res" >&6; }
3097   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3098 
3099 } # ac_fn_c_check_header_compile
3100 cat >config.log <<_ACEOF
3101 This file contains any messages produced by compilers while
3102 running configure, to aid debugging if configure makes a mistake.
3103 
3104 It was created by OpenJDK $as_me jdk9, which was
3105 generated by GNU Autoconf 2.69.  Invocation command line was
3106 
3107   $ $0 $@
3108 
3109 _ACEOF
3110 exec 5>>config.log
3111 {
3112 cat <<_ASUNAME
3113 ## --------- ##
3114 ## Platform. ##
3115 ## --------- ##
3116 
3117 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3118 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3119 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3120 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3121 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3122 
3123 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3124 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3125 
3126 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3127 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3128 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3129 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3130 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3131 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3132 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3133 
3134 _ASUNAME
3135 
3136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3137 for as_dir in $PATH
3138 do
3139   IFS=$as_save_IFS
3140   test -z "$as_dir" && as_dir=.
3141     $as_echo "PATH: $as_dir"
3142   done
3143 IFS=$as_save_IFS
3144 
3145 } >&5
3146 
3147 cat >&5 <<_ACEOF
3148 
3149 
3150 ## ----------- ##
3151 ## Core tests. ##
3152 ## ----------- ##
3153 
3154 _ACEOF
3155 
3156 
3157 # Keep a trace of the command line.
3158 # Strip out --no-create and --no-recursion so they do not pile up.
3159 # Strip out --silent because we don't want to record it for future runs.
3160 # Also quote any args containing shell meta-characters.
3161 # Make two passes to allow for proper duplicate-argument suppression.
3162 ac_configure_args=
3163 ac_configure_args0=
3164 ac_configure_args1=
3165 ac_must_keep_next=false
3166 for ac_pass in 1 2
3167 do
3168   for ac_arg
3169   do
3170     case $ac_arg in
3171     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3172     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3173     | -silent | --silent | --silen | --sile | --sil)
3174       continue ;;
3175     *\'*)
3176       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3177     esac
3178     case $ac_pass in
3179     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3180     2)
3181       as_fn_append ac_configure_args1 " '$ac_arg'"
3182       if test $ac_must_keep_next = true; then
3183         ac_must_keep_next=false # Got value, back to normal.
3184       else
3185         case $ac_arg in
3186           *=* | --config-cache | -C | -disable-* | --disable-* \
3187           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3188           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3189           | -with-* | --with-* | -without-* | --without-* | --x)
3190             case "$ac_configure_args0 " in
3191               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3192             esac
3193             ;;
3194           -* ) ac_must_keep_next=true ;;
3195         esac
3196       fi
3197       as_fn_append ac_configure_args " '$ac_arg'"
3198       ;;
3199     esac
3200   done
3201 done
3202 { ac_configure_args0=; unset ac_configure_args0;}
3203 { ac_configure_args1=; unset ac_configure_args1;}
3204 
3205 # When interrupted or exit'd, cleanup temporary files, and complete
3206 # config.log.  We remove comments because anyway the quotes in there
3207 # would cause problems or look ugly.
3208 # WARNING: Use '\'' to represent an apostrophe within the trap.
3209 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3210 trap 'exit_status=$?
3211   # Save into config.log some information that might help in debugging.
3212   {
3213     echo
3214 
3215     $as_echo "## ---------------- ##
3216 ## Cache variables. ##
3217 ## ---------------- ##"
3218     echo
3219     # The following way of writing the cache mishandles newlines in values,
3220 (
3221   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3222     eval ac_val=\$$ac_var
3223     case $ac_val in #(
3224     *${as_nl}*)
3225       case $ac_var in #(
3226       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3227 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3228       esac
3229       case $ac_var in #(
3230       _ | IFS | as_nl) ;; #(
3231       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3232       *) { eval $ac_var=; unset $ac_var;} ;;
3233       esac ;;
3234     esac
3235   done
3236   (set) 2>&1 |
3237     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3238     *${as_nl}ac_space=\ *)
3239       sed -n \
3240         "s/'\''/'\''\\\\'\'''\''/g;
3241           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3242       ;; #(
3243     *)
3244       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3245       ;;
3246     esac |
3247     sort
3248 )
3249     echo
3250 
3251     $as_echo "## ----------------- ##
3252 ## Output variables. ##
3253 ## ----------------- ##"
3254     echo
3255     for ac_var in $ac_subst_vars
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 
3265     if test -n "$ac_subst_files"; then
3266       $as_echo "## ------------------- ##
3267 ## File substitutions. ##
3268 ## ------------------- ##"
3269       echo
3270       for ac_var in $ac_subst_files
3271       do
3272         eval ac_val=\$$ac_var
3273         case $ac_val in
3274         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3275         esac
3276         $as_echo "$ac_var='\''$ac_val'\''"
3277       done | sort
3278       echo
3279     fi
3280 
3281     if test -s confdefs.h; then
3282       $as_echo "## ----------- ##
3283 ## confdefs.h. ##
3284 ## ----------- ##"
3285       echo
3286       cat confdefs.h
3287       echo
3288     fi
3289     test "$ac_signal" != 0 &&
3290       $as_echo "$as_me: caught signal $ac_signal"
3291     $as_echo "$as_me: exit $exit_status"
3292   } >&5
3293   rm -f core *.core core.conftest.* &&
3294     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3295     exit $exit_status
3296 ' 0
3297 for ac_signal in 1 2 13 15; do
3298   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3299 done
3300 ac_signal=0
3301 
3302 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3303 rm -f -r conftest* confdefs.h
3304 
3305 $as_echo "/* confdefs.h */" > confdefs.h
3306 
3307 # Predefined preprocessor variables.
3308 
3309 cat >>confdefs.h <<_ACEOF
3310 #define PACKAGE_NAME "$PACKAGE_NAME"
3311 _ACEOF
3312 
3313 cat >>confdefs.h <<_ACEOF
3314 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3315 _ACEOF
3316 
3317 cat >>confdefs.h <<_ACEOF
3318 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3319 _ACEOF
3320 
3321 cat >>confdefs.h <<_ACEOF
3322 #define PACKAGE_STRING "$PACKAGE_STRING"
3323 _ACEOF
3324 
3325 cat >>confdefs.h <<_ACEOF
3326 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3327 _ACEOF
3328 
3329 cat >>confdefs.h <<_ACEOF
3330 #define PACKAGE_URL "$PACKAGE_URL"
3331 _ACEOF
3332 
3333 
3334 # Let the site file select an alternate cache file if it wants to.
3335 # Prefer an explicitly selected file to automatically selected ones.
3336 ac_site_file1=NONE
3337 ac_site_file2=NONE
3338 if test -n "$CONFIG_SITE"; then
3339   # We do not want a PATH search for config.site.
3340   case $CONFIG_SITE in #((
3341     -*)  ac_site_file1=./$CONFIG_SITE;;
3342     */*) ac_site_file1=$CONFIG_SITE;;
3343     *)   ac_site_file1=./$CONFIG_SITE;;
3344   esac
3345 elif test "x$prefix" != xNONE; then
3346   ac_site_file1=$prefix/share/config.site
3347   ac_site_file2=$prefix/etc/config.site
3348 else
3349   ac_site_file1=$ac_default_prefix/share/config.site
3350   ac_site_file2=$ac_default_prefix/etc/config.site
3351 fi
3352 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3353 do
3354   test "x$ac_site_file" = xNONE && continue
3355   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3356     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3357 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3358     sed 's/^/| /' "$ac_site_file" >&5
3359     . "$ac_site_file" \
3360       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3361 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3362 as_fn_error $? "failed to load site script $ac_site_file
3363 See \`config.log' for more details" "$LINENO" 5; }
3364   fi
3365 done
3366 
3367 if test -r "$cache_file"; then
3368   # Some versions of bash will fail to source /dev/null (special files
3369   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3370   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3371     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3372 $as_echo "$as_me: loading cache $cache_file" >&6;}
3373     case $cache_file in
3374       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3375       *)                      . "./$cache_file";;
3376     esac
3377   fi
3378 else
3379   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3380 $as_echo "$as_me: creating cache $cache_file" >&6;}
3381   >$cache_file
3382 fi
3383 
3384 # Check that the precious variables saved in the cache have kept the same
3385 # value.
3386 ac_cache_corrupted=false
3387 for ac_var in $ac_precious_vars; do
3388   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3389   eval ac_new_set=\$ac_env_${ac_var}_set
3390   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3391   eval ac_new_val=\$ac_env_${ac_var}_value
3392   case $ac_old_set,$ac_new_set in
3393     set,)
3394       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3395 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3396       ac_cache_corrupted=: ;;
3397     ,set)
3398       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3399 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3400       ac_cache_corrupted=: ;;
3401     ,);;
3402     *)
3403       if test "x$ac_old_val" != "x$ac_new_val"; then
3404         # differences in whitespace do not lead to failure.
3405         ac_old_val_w=`echo x $ac_old_val`
3406         ac_new_val_w=`echo x $ac_new_val`
3407         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3408           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3409 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3410           ac_cache_corrupted=:
3411         else
3412           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3413 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3414           eval $ac_var=\$ac_old_val
3415         fi
3416         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3417 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3418         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3419 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3420       fi;;
3421   esac
3422   # Pass precious variables to config.status.
3423   if test "$ac_new_set" = set; then
3424     case $ac_new_val in
3425     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3426     *) ac_arg=$ac_var=$ac_new_val ;;
3427     esac
3428     case " $ac_configure_args " in
3429       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3430       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3431     esac
3432   fi
3433 done
3434 if $ac_cache_corrupted; then
3435   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3436 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3437   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3438 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3439   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3440 fi
3441 ## -------------------- ##
3442 ## Main body of script. ##
3443 ## -------------------- ##
3444 
3445 ac_ext=c
3446 ac_cpp='$CPP $CPPFLAGS'
3447 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3448 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3449 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3450 
3451 
3452 
3453 ac_aux_dir=
3454 for ac_dir in $TOPDIR/make/autoconf/build-aux "$srcdir"/$TOPDIR/make/autoconf/build-aux; do
3455   if test -f "$ac_dir/install-sh"; then
3456     ac_aux_dir=$ac_dir
3457     ac_install_sh="$ac_aux_dir/install-sh -c"
3458     break
3459   elif test -f "$ac_dir/install.sh"; then
3460     ac_aux_dir=$ac_dir
3461     ac_install_sh="$ac_aux_dir/install.sh -c"
3462     break
3463   elif test -f "$ac_dir/shtool"; then
3464     ac_aux_dir=$ac_dir
3465     ac_install_sh="$ac_aux_dir/shtool install -c"
3466     break
3467   fi
3468 done
3469 if test -z "$ac_aux_dir"; then
3470   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
3471 fi
3472 
3473 # These three variables are undocumented and unsupported,
3474 # and are intended to be withdrawn in a future Autoconf release.
3475 # They can cause serious problems if a builder's source tree is in a directory
3476 # whose full name contains unusual characters.
3477 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3478 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3479 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3480 
3481 
3482 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3483 
3484 #
3485 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3486 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3487 #
3488 # This code is free software; you can redistribute it and/or modify it
3489 # under the terms of the GNU General Public License version 2 only, as
3490 # published by the Free Software Foundation.  Oracle designates this
3491 # particular file as subject to the "Classpath" exception as provided
3492 # by Oracle in the LICENSE file that accompanied this code.
3493 #
3494 # This code is distributed in the hope that it will be useful, but WITHOUT
3495 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3496 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3497 # version 2 for more details (a copy is included in the LICENSE file that
3498 # accompanied this code).
3499 #
3500 # You should have received a copy of the GNU General Public License version
3501 # 2 along with this work; if not, write to the Free Software Foundation,
3502 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3503 #
3504 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3505 # or visit www.oracle.com if you need additional information or have any
3506 # questions.
3507 #
3508 
3509 #
3510 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3511 #
3512 # This program is free software; you can redistribute it and/or modify
3513 # it under the terms of the GNU General Public License as published by
3514 # the Free Software Foundation; either version 2 of the License, or
3515 # (at your option) any later version.
3516 #
3517 # This program is distributed in the hope that it will be useful, but
3518 # WITHOUT ANY WARRANTY; without even the implied warranty of
3519 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3520 # General Public License for more details.
3521 #
3522 # You should have received a copy of the GNU General Public License
3523 # along with this program; if not, write to the Free Software
3524 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3525 #
3526 # As a special exception to the GNU General Public License, if you
3527 # distribute this file as part of a program that contains a
3528 # configuration script generated by Autoconf, you may include it under
3529 # the same distribution terms that you use for the rest of that program.
3530 
3531 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3532 # ----------------------------------
3533 # PKG_PROG_PKG_CONFIG
3534 
3535 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3536 #
3537 # Check to see whether a particular set of modules exists.  Similar
3538 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3539 #
3540 #
3541 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3542 # this or PKG_CHECK_MODULES is called, or make sure to call
3543 # PKG_CHECK_EXISTS manually
3544 # --------------------------------------------------------------
3545 
3546 
3547 
3548 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3549 # ---------------------------------------------
3550 # _PKG_CONFIG
3551 
3552 # _PKG_SHORT_ERRORS_SUPPORTED
3553 # -----------------------------
3554 # _PKG_SHORT_ERRORS_SUPPORTED
3555 
3556 
3557 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3558 # [ACTION-IF-NOT-FOUND])
3559 #
3560 #
3561 # Note that if there is a possibility the first call to
3562 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3563 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3564 #
3565 #
3566 # --------------------------------------------------------------
3567 # PKG_CHECK_MODULES
3568 
3569 
3570 # Include these first...
3571 #
3572 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3573 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3574 #
3575 # This code is free software; you can redistribute it and/or modify it
3576 # under the terms of the GNU General Public License version 2 only, as
3577 # published by the Free Software Foundation.  Oracle designates this
3578 # particular file as subject to the "Classpath" exception as provided
3579 # by Oracle in the LICENSE file that accompanied this code.
3580 #
3581 # This code is distributed in the hope that it will be useful, but WITHOUT
3582 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3583 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3584 # version 2 for more details (a copy is included in the LICENSE file that
3585 # accompanied this code).
3586 #
3587 # You should have received a copy of the GNU General Public License version
3588 # 2 along with this work; if not, write to the Free Software Foundation,
3589 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3590 #
3591 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3592 # or visit www.oracle.com if you need additional information or have any
3593 # questions.
3594 #
3595 
3596 # Create a function/macro that takes a series of named arguments. The call is
3597 # similar to AC_DEFUN, but the setup of the function looks like this:
3598 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3599 # ... do something
3600 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3601 # ])
3602 # A star (*) in front of a named argument means that it is required and it's
3603 # presence will be verified. To pass e.g. the first value as a normal indexed
3604 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3605 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3606 # "ARG_FOO".
3607 #
3608 # The generated function can be called like this:
3609 # MYFUNC(FOO: [foo-val],
3610 #     BAR: [
3611 #         $ECHO hello world
3612 #     ])
3613 # Note that the argument value must start on the same line as the argument name.
3614 #
3615 # Argument 1: Name of the function to define
3616 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3617 # Argument 3: Argument array to treat as named, typically $@
3618 # Argument 4: The main function body
3619 
3620 
3621 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3622 # If so, then append $1 to $2 \
3623 # Also set JVM_ARG_OK to true/false depending on outcome.
3624 
3625 
3626 # Appends a string to a path variable, only adding the : when needed.
3627 
3628 
3629 # Prepends a string to a path variable, only adding the : when needed.
3630 
3631 
3632 # This will make sure the given variable points to a full and proper
3633 # path. This means:
3634 # 1) There will be no spaces in the path. On unix platforms,
3635 #    spaces in the path will result in an error. On Windows,
3636 #    the path will be rewritten using short-style to be space-free.
3637 # 2) The path will be absolute, and it will be in unix-style (on
3638 #     cygwin).
3639 # $1: The name of the variable to fix
3640 
3641 
3642 # This will make sure the given variable points to a executable
3643 # with a full and proper path. This means:
3644 # 1) There will be no spaces in the path. On unix platforms,
3645 #    spaces in the path will result in an error. On Windows,
3646 #    the path will be rewritten using short-style to be space-free.
3647 # 2) The path will be absolute, and it will be in unix-style (on
3648 #     cygwin).
3649 # Any arguments given to the executable is preserved.
3650 # If the input variable does not have a directory specification, then
3651 # it need to be in the PATH.
3652 # $1: The name of the variable to fix
3653 
3654 
3655 
3656 
3657 # Register a --with argument but mark it as deprecated
3658 # $1: The name of the with argument to deprecate, not including --with-
3659 
3660 
3661 # Register a --enable argument but mark it as deprecated
3662 # $1: The name of the with argument to deprecate, not including --enable-
3663 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3664 # $3: Messages to user.
3665 
3666 
3667 
3668 
3669 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3670 # $1: variable to check
3671 
3672 
3673 # Check that there are no unprocessed overridden variables left.
3674 # If so, they are an incorrect argument and we will exit with an error.
3675 
3676 
3677 # Setup a tool for the given variable. If correctly specified by the user,
3678 # use that value, otherwise search for the tool using the supplied code snippet.
3679 # $1: variable to set
3680 # $2: code snippet to call to look for the tool
3681 # $3: code snippet to call if variable was used to find tool
3682 
3683 
3684 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3685 # $1: variable to set
3686 # $2: executable name (or list of names) to look for
3687 # $3: [path]
3688 
3689 
3690 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3691 # $1: variable to set
3692 # $2: executable name (or list of names) to look for
3693 
3694 
3695 # Like BASIC_PATH_PROGS but fails if no tool was found.
3696 # $1: variable to set
3697 # $2: executable name (or list of names) to look for
3698 # $3: [path]
3699 
3700 
3701 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3702 # $1: variable to set
3703 # $2: autoconf macro to call to look for the special tool
3704 
3705 
3706 # Setup the most fundamental tools that relies on not much else to set up,
3707 # but is used by much of the early bootstrap code.
3708 
3709 
3710 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3711 
3712 
3713 # Evaluates platform specific overrides for devkit variables.
3714 # $1: Name of variable
3715 
3716 
3717 
3718 
3719 
3720 
3721 #%%% Simple tools %%%
3722 
3723 # Check if we have found a usable version of make
3724 # $1: the path to a potential make binary (or empty)
3725 # $2: the description on how we found this
3726 
3727 
3728 
3729 
3730 # Goes looking for a usable version of GNU make.
3731 
3732 
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 # Check if build directory is on local disk. If not possible to determine,
3742 # we prefer to claim it's local.
3743 # Argument 1: directory to test
3744 # Argument 2: what to do if it is on local disk
3745 # Argument 3: what to do otherwise (remote disk or failure)
3746 
3747 
3748 # Check that source files have basic read permissions set. This might
3749 # not be the case in cygwin in certain conditions.
3750 
3751 
3752 
3753 
3754 # Check for support for specific options in bash
3755 
3756 
3757 ################################################################################
3758 #
3759 # Default make target
3760 #
3761 
3762 
3763 # Code to run after AC_OUTPUT
3764 
3765 
3766 #
3767 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3768 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3769 #
3770 # This code is free software; you can redistribute it and/or modify it
3771 # under the terms of the GNU General Public License version 2 only, as
3772 # published by the Free Software Foundation.  Oracle designates this
3773 # particular file as subject to the "Classpath" exception as provided
3774 # by Oracle in the LICENSE file that accompanied this code.
3775 #
3776 # This code is distributed in the hope that it will be useful, but WITHOUT
3777 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3778 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3779 # version 2 for more details (a copy is included in the LICENSE file that
3780 # accompanied this code).
3781 #
3782 # You should have received a copy of the GNU General Public License version
3783 # 2 along with this work; if not, write to the Free Software Foundation,
3784 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3785 #
3786 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3787 # or visit www.oracle.com if you need additional information or have any
3788 # questions.
3789 #
3790 
3791 
3792 
3793 
3794 
3795 # Helper function which possibly converts a path using DOS-style short mode.
3796 # If so, the updated path is stored in $new_path.
3797 # $1: The path to check
3798 
3799 
3800 # Helper function which possibly converts a path using DOS-style short mode.
3801 # If so, the updated path is stored in $new_path.
3802 # $1: The path to check
3803 
3804 
3805 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3806 # and could probably be heavily simplified. However, all changes in this
3807 # area tend to need lot of testing in different scenarios, and in lack of
3808 # proper unit testing, cleaning this up has not been deemed worth the effort
3809 # at the moment.
3810 
3811 
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3820 
3821 
3822 
3823 
3824 # ... then the rest
3825 #
3826 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3827 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3828 #
3829 # This code is free software; you can redistribute it and/or modify it
3830 # under the terms of the GNU General Public License version 2 only, as
3831 # published by the Free Software Foundation.  Oracle designates this
3832 # particular file as subject to the "Classpath" exception as provided
3833 # by Oracle in the LICENSE file that accompanied this code.
3834 #
3835 # This code is distributed in the hope that it will be useful, but WITHOUT
3836 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3837 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3838 # version 2 for more details (a copy is included in the LICENSE file that
3839 # accompanied this code).
3840 #
3841 # You should have received a copy of the GNU General Public License version
3842 # 2 along with this work; if not, write to the Free Software Foundation,
3843 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3844 #
3845 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3846 # or visit www.oracle.com if you need additional information or have any
3847 # questions.
3848 #
3849 
3850 ########################################################################
3851 # This file handles detection of the Boot JDK. The Boot JDK detection
3852 # process has been developed as a response to solve a complex real-world
3853 # problem. Initially, it was simple, but it has grown as platform after
3854 # platform, idiosyncracy after idiosyncracy has been supported.
3855 #
3856 # The basic idea is this:
3857 # 1) You need an acceptable *) JDK to use as a Boot JDK
3858 # 2) There are several ways to locate a JDK, that are mostly platform
3859 #    dependent **)
3860 # 3) You can have multiple JDKs installed
3861 # 4) If possible, configure should try to dig out an acceptable JDK
3862 #    automatically, without having to resort to command-line options
3863 #
3864 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3865 #     javac) and not a JRE, etc.
3866 #
3867 # **) On Windows we typically use a well-known path.
3868 #     On MacOSX we typically use the tool java_home.
3869 #     On Linux we typically find javac in the $PATH, and then follow a
3870 #     chain of symlinks that often ends up in a real JDK.
3871 #
3872 # This leads to the code where we check in different ways to locate a
3873 # JDK, and if one is found, check if it is acceptable. If not, we print
3874 # our reasons for rejecting it (useful when debugging non-working
3875 # configure situations) and continue checking the next one.
3876 ########################################################################
3877 
3878 # Execute the check given as argument, and verify the result
3879 # If the Boot JDK was previously found, do nothing
3880 # $1 A command line (typically autoconf macro) to execute
3881 
3882 
3883 # Test: Is bootjdk explicitly set by command line arguments?
3884 
3885 
3886 # Test: Is $JAVA_HOME set?
3887 
3888 
3889 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3890 
3891 
3892 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3893 # $1: Argument to the java_home binary (optional)
3894 
3895 
3896 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3897 
3898 
3899 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3900 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3901 # $1 = Path to directory containing jdk installations.
3902 # $2 = String to append to the found JDK directory to get the proper JDK home
3903 
3904 
3905 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3906 # environmental variable as base for where to look.
3907 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3908 
3909 
3910 # Test: Is there a JDK installed in default, well-known locations?
3911 
3912 
3913 # Check that a command-line tool in the Boot JDK is correct
3914 # $1 = name of variable to assign
3915 # $2 = name of binary
3916 
3917 
3918 ###############################################################################
3919 #
3920 # We need a Boot JDK to bootstrap the build.
3921 #
3922 
3923 
3924 
3925 
3926 
3927 # BUILD_JDK: the location of the latest JDK that can run
3928 #   on the host system and supports the target class file version
3929 #   generated in this JDK build.  This variable should only be
3930 #   used after the launchers are built.
3931 #
3932 
3933 # Execute the check given as argument, and verify the result.
3934 # If the JDK was previously found, do nothing.
3935 # $1 A command line (typically autoconf macro) to execute
3936 
3937 
3938 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3939 # is different than the host system doing the build (e.g. cross-compilation),
3940 # a special BUILD_JDK is built as part of the build process.  An external
3941 # prebuilt BUILD_JDK can also be supplied.
3942 
3943 
3944 #
3945 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3946 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3947 #
3948 # This code is free software; you can redistribute it and/or modify it
3949 # under the terms of the GNU General Public License version 2 only, as
3950 # published by the Free Software Foundation.  Oracle designates this
3951 # particular file as subject to the "Classpath" exception as provided
3952 # by Oracle in the LICENSE file that accompanied this code.
3953 #
3954 # This code is distributed in the hope that it will be useful, but WITHOUT
3955 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3956 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3957 # version 2 for more details (a copy is included in the LICENSE file that
3958 # accompanied this code).
3959 #
3960 # You should have received a copy of the GNU General Public License version
3961 # 2 along with this work; if not, write to the Free Software Foundation,
3962 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3963 #
3964 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3965 # or visit www.oracle.com if you need additional information or have any
3966 # questions.
3967 #
3968 
3969 
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3980 
3981 
3982 
3983 
3984 
3985 ################################################################################
3986 #
3987 # Runs icecc-create-env once and prints the error if it fails
3988 #
3989 # $1: arguments to icecc-create-env
3990 # $2: log file
3991 #
3992 
3993 
3994 ################################################################################
3995 #
3996 # Optionally enable distributed compilation of native code using icecc/icecream
3997 #
3998 
3999 
4000 
4001 
4002 
4003 
4004 
4005 #
4006 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4007 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4008 #
4009 # This code is free software; you can redistribute it and/or modify it
4010 # under the terms of the GNU General Public License version 2 only, as
4011 # published by the Free Software Foundation.  Oracle designates this
4012 # particular file as subject to the "Classpath" exception as provided
4013 # by Oracle in the LICENSE file that accompanied this code.
4014 #
4015 # This code is distributed in the hope that it will be useful, but WITHOUT
4016 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4017 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4018 # version 2 for more details (a copy is included in the LICENSE file that
4019 # accompanied this code).
4020 #
4021 # You should have received a copy of the GNU General Public License version
4022 # 2 along with this work; if not, write to the Free Software Foundation,
4023 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4024 #
4025 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4026 # or visit www.oracle.com if you need additional information or have any
4027 # questions.
4028 #
4029 
4030 ################################################################################
4031 #
4032 # Setup ABI profile (for arm)
4033 #
4034 
4035 
4036 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4037 # corresponding configure arguments instead
4038 
4039 
4040 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4041 # that configure can use them while detecting compilers.
4042 # TOOLCHAIN_TYPE is available here.
4043 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4044 
4045 
4046 
4047 
4048 
4049 
4050 # Documentation on common flags used for solstudio in HIGHEST.
4051 #
4052 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4053 #          done with care, there are some assumptions below that need to
4054 #          be understood about the use of pointers, and IEEE behavior.
4055 #
4056 # -fns: Use non-standard floating point mode (not IEEE 754)
4057 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4058 # -fsingle: Use single precision floating point with 'float'
4059 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4060 #   (Source with excessing pointer casting and data access with mixed
4061 #    pointer types are not recommended)
4062 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4063 #   (If you expect perfect errno behavior, do not use this)
4064 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4065 # -xrestrict: Pointer parameters to functions do not overlap
4066 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4067 #    If you pass in multiple pointers to the same data, do not use this)
4068 # -xlibmil: Inline some library routines
4069 #   (If you expect perfect errno behavior, do not use this)
4070 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4071 #   (If you expect perfect errno behavior, do not use this)
4072 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4073 
4074     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4075     # Bug?
4076     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4077     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4078     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4079     #fi
4080 
4081 
4082 
4083 
4084 
4085 
4086 ################################################################################
4087 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4088 #      conditionals against.
4089 # $2 - Optional prefix for each variable defined.
4090 
4091 
4092 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4093 #                                  IF_FALSE: [RUN-IF-FALSE])
4094 # ------------------------------------------------------------
4095 # Check that the C compiler supports an argument
4096 
4097 
4098 
4099 
4100 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4101 #                                    IF_FALSE: [RUN-IF-FALSE])
4102 # ------------------------------------------------------------
4103 # Check that the C++ compiler supports an argument
4104 
4105 
4106 
4107 
4108 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4109 #                                IF_FALSE: [RUN-IF-FALSE])
4110 # ------------------------------------------------------------
4111 # Check that the C and C++ compilers support an argument
4112 
4113 
4114 
4115 
4116 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4117 #                                   IF_FALSE: [RUN-IF-FALSE])
4118 # ------------------------------------------------------------
4119 # Check that the linker support an argument
4120 
4121 
4122 
4123 
4124 
4125 
4126 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4127 # Arguments:
4128 # $1 - Optional prefix for each variable defined.
4129 
4130 
4131 #
4132 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4133 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4134 #
4135 # This code is free software; you can redistribute it and/or modify it
4136 # under the terms of the GNU General Public License version 2 only, as
4137 # published by the Free Software Foundation.  Oracle designates this
4138 # particular file as subject to the "Classpath" exception as provided
4139 # by Oracle in the LICENSE file that accompanied this code.
4140 #
4141 # This code is distributed in the hope that it will be useful, but WITHOUT
4142 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4143 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4144 # version 2 for more details (a copy is included in the LICENSE file that
4145 # accompanied this code).
4146 #
4147 # You should have received a copy of the GNU General Public License version
4148 # 2 along with this work; if not, write to the Free Software Foundation,
4149 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4150 #
4151 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4152 # or visit www.oracle.com if you need additional information or have any
4153 # questions.
4154 #
4155 
4156 
4157 
4158 
4159 
4160 cygwin_help() {
4161   case $1 in
4162     unzip)
4163       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4164       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4165       ;;
4166     zip)
4167       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4168       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4169       ;;
4170     make)
4171       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4172       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4173       ;;
4174     freetype)
4175       HELP_MSG="
4176 The freetype library can now be build during the configure process.
4177 Download the freetype sources and unpack them into an arbitrary directory:
4178 
4179 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4180 tar -xzf freetype-2.5.3.tar.gz
4181 
4182 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4183 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4184 builds or into '<freetype_src>/lib32' for 32-bit builds.
4185 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4186 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4187 
4188 Alternatively you can unpack the sources like this to use the default directory:
4189 
4190 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4191       ;;
4192   esac
4193 }
4194 
4195 msys_help() {
4196   PKGHANDLER_COMMAND=""
4197 }
4198 
4199 apt_help() {
4200   case $1 in
4201     reduced)
4202       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4203     devkit)
4204       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4205     openjdk)
4206       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4207     alsa)
4208       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4209     cups)
4210       PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4211     fontconfig)
4212       PKGHANDLER_COMMAND="sudo apt-get install libfontconfig1-dev" ;;
4213     freetype)
4214       PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4215     ffi)
4216       PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4217     x11)
4218       PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4219     ccache)
4220       PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4221     dtrace)
4222       PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4223   esac
4224 }
4225 
4226 yum_help() {
4227   case $1 in
4228     devkit)
4229       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4230     openjdk)
4231       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4232     alsa)
4233       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4234     cups)
4235       PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4236     fontconfig)
4237       PKGHANDLER_COMMAND="sudo yum install fontconfig-devel" ;;
4238     freetype)
4239       PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4240     x11)
4241       PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4242     ccache)
4243       PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4244   esac
4245 }
4246 
4247 brew_help() {
4248   case $1 in
4249     openjdk)
4250       PKGHANDLER_COMMAND="brew cask install java" ;;
4251     freetype)
4252       PKGHANDLER_COMMAND="brew install freetype" ;;
4253     ccache)
4254       PKGHANDLER_COMMAND="brew install ccache" ;;
4255   esac
4256 }
4257 
4258 port_help() {
4259   PKGHANDLER_COMMAND=""
4260 }
4261 
4262 pkgutil_help() {
4263   PKGHANDLER_COMMAND=""
4264 }
4265 
4266 pkgadd_help() {
4267   PKGHANDLER_COMMAND=""
4268 }
4269 
4270 # This function will check if we're called from the "configure" wrapper while
4271 # printing --help. If so, we will print out additional information that can
4272 # only be extracted within the autoconf script, and then exit. This must be
4273 # called at the very beginning in configure.ac.
4274 
4275 
4276 
4277 
4278 
4279 
4280 #
4281 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4282 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4283 #
4284 # This code is free software; you can redistribute it and/or modify it
4285 # under the terms of the GNU General Public License version 2 only, as
4286 # published by the Free Software Foundation.  Oracle designates this
4287 # particular file as subject to the "Classpath" exception as provided
4288 # by Oracle in the LICENSE file that accompanied this code.
4289 #
4290 # This code is distributed in the hope that it will be useful, but WITHOUT
4291 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4292 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4293 # version 2 for more details (a copy is included in the LICENSE file that
4294 # accompanied this code).
4295 #
4296 # You should have received a copy of the GNU General Public License version
4297 # 2 along with this work; if not, write to the Free Software Foundation,
4298 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4299 #
4300 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4301 # or visit www.oracle.com if you need additional information or have any
4302 # questions.
4303 #
4304 
4305 # All valid JVM features, regardless of platform
4306 VALID_JVM_FEATURES="compiler1 compiler2 zero minimal dtrace jvmti jvmci \
4307     graal vm-structs jni-check services management all-gcs nmt cds \
4308     static-build link-time-opt aot"
4309 
4310 # All valid JVM variants
4311 VALID_JVM_VARIANTS="server client minimal core zero custom"
4312 
4313 ###############################################################################
4314 # Check if the specified JVM variant should be built. To be used in shell if
4315 # constructs, like this:
4316 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4317 #
4318 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4319 
4320 # Definition kept in one line to allow inlining in if statements.
4321 # Additional [] needed to keep m4 from mangling shell constructs.
4322 
4323 
4324 ###############################################################################
4325 # Check if the specified JVM features are explicitly enabled. To be used in
4326 # shell if constructs, like this:
4327 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4328 #
4329 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4330 
4331 # Definition kept in one line to allow inlining in if statements.
4332 # Additional [] needed to keep m4 from mangling shell constructs.
4333 
4334 
4335 ###############################################################################
4336 # Check which variants of the JVM that we want to build. Available variants are:
4337 #   server: normal interpreter, and a tiered C1/C2 compiler
4338 #   client: normal interpreter, and C1 (no C2 compiler)
4339 #   minimal: reduced form of client with optional features stripped out
4340 #   core: normal interpreter only, no compiler
4341 #   zero: C++ based interpreter only, no compiler
4342 #   custom: baseline JVM with no default features
4343 #
4344 
4345 
4346 ###############################################################################
4347 # Check if dtrace should be enabled and has all prerequisites present.
4348 #
4349 
4350 
4351 ################################################################################
4352 # Check if AOT should be enabled
4353 #
4354 
4355 
4356 ################################################################################
4357 # Allow to disable CDS
4358 #
4359 
4360 
4361 ###############################################################################
4362 # Set up all JVM features for each JVM variant.
4363 #
4364 
4365 
4366 ###############################################################################
4367 # Validate JVM features once all setup is complete, including custom setup.
4368 #
4369 
4370 
4371 ################################################################################
4372 #
4373 # Specify which sources will be used to build the 64-bit ARM port
4374 #
4375 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4376 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4377 #
4378 
4379 
4380 
4381 ################################################################################
4382 # Check if gtest should be built
4383 #
4384 
4385 
4386 #
4387 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4388 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4389 #
4390 # This code is free software; you can redistribute it and/or modify it
4391 # under the terms of the GNU General Public License version 2 only, as
4392 # published by the Free Software Foundation.  Oracle designates this
4393 # particular file as subject to the "Classpath" exception as provided
4394 # by Oracle in the LICENSE file that accompanied this code.
4395 #
4396 # This code is distributed in the hope that it will be useful, but WITHOUT
4397 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4398 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4399 # version 2 for more details (a copy is included in the LICENSE file that
4400 # accompanied this code).
4401 #
4402 # You should have received a copy of the GNU General Public License version
4403 # 2 along with this work; if not, write to the Free Software Foundation,
4404 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4405 #
4406 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4407 # or visit www.oracle.com if you need additional information or have any
4408 # questions.
4409 #
4410 
4411 ###############################################################################
4412 # Check which variant of the JDK that we want to build.
4413 # Currently we have:
4414 #    normal:   standard edition
4415 # but the custom make system may add other variants
4416 #
4417 # Effectively the JDK variant gives a name to a specific set of
4418 # modules to compile into the JDK.
4419 
4420 
4421 ###############################################################################
4422 # Set the debug level
4423 #    release: no debug information, all optimizations, no asserts.
4424 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4425 #    fastdebug: debug information (-g), all optimizations, all asserts
4426 #    slowdebug: debug information (-g), no optimizations, all asserts
4427 
4428 
4429 ###############################################################################
4430 #
4431 # Should we build only OpenJDK even if closed sources are present?
4432 #
4433 
4434 
4435 
4436 
4437 ###############################################################################
4438 #
4439 # Enable or disable the elliptic curve crypto implementation
4440 #
4441 
4442 
4443 
4444 
4445 ################################################################################
4446 #
4447 # Gcov coverage data for hotspot
4448 #
4449 
4450 
4451 ###############################################################################
4452 #
4453 # AddressSanitizer
4454 #
4455 
4456 
4457 ################################################################################
4458 #
4459 # Static build support.  When enabled will generate static
4460 # libraries instead of shared libraries for all JDK libs.
4461 #
4462 
4463 
4464 ################################################################################
4465 #
4466 # jlink options.
4467 # We always keep packaged modules in JDK image.
4468 #
4469 
4470 
4471 ################################################################################
4472 #
4473 # Check if building of the jtreg failure handler should be enabled.
4474 #
4475 
4476 
4477 ################################################################################
4478 #
4479 # Enable or disable generation of the classlist at build time
4480 #
4481 
4482 
4483 #
4484 # Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
4485 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4486 #
4487 # This code is free software; you can redistribute it and/or modify it
4488 # under the terms of the GNU General Public License version 2 only, as
4489 # published by the Free Software Foundation.  Oracle designates this
4490 # particular file as subject to the "Classpath" exception as provided
4491 # by Oracle in the LICENSE file that accompanied this code.
4492 #
4493 # This code is distributed in the hope that it will be useful, but WITHOUT
4494 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4495 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4496 # version 2 for more details (a copy is included in the LICENSE file that
4497 # accompanied this code).
4498 #
4499 # You should have received a copy of the GNU General Public License version
4500 # 2 along with this work; if not, write to the Free Software Foundation,
4501 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4502 #
4503 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4504 # or visit www.oracle.com if you need additional information or have any
4505 # questions.
4506 #
4507 
4508 ###############################################################################
4509 #
4510 # Setup version numbers
4511 #
4512 
4513 # Verify that a given string represents a valid version number, and assign it
4514 # to a variable.
4515 
4516 # Argument 1: the variable to assign to
4517 # Argument 2: the value given by the user
4518 
4519 
4520 
4521 
4522 #
4523 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4524 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4525 #
4526 # This code is free software; you can redistribute it and/or modify it
4527 # under the terms of the GNU General Public License version 2 only, as
4528 # published by the Free Software Foundation.  Oracle designates this
4529 # particular file as subject to the "Classpath" exception as provided
4530 # by Oracle in the LICENSE file that accompanied this code.
4531 #
4532 # This code is distributed in the hope that it will be useful, but WITHOUT
4533 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4534 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4535 # version 2 for more details (a copy is included in the LICENSE file that
4536 # accompanied this code).
4537 #
4538 # You should have received a copy of the GNU General Public License version
4539 # 2 along with this work; if not, write to the Free Software Foundation,
4540 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4541 #
4542 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4543 # or visit www.oracle.com if you need additional information or have any
4544 # questions.
4545 #
4546 
4547 # Major library component reside in separate files.
4548 #
4549 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4550 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4551 #
4552 # This code is free software; you can redistribute it and/or modify it
4553 # under the terms of the GNU General Public License version 2 only, as
4554 # published by the Free Software Foundation.  Oracle designates this
4555 # particular file as subject to the "Classpath" exception as provided
4556 # by Oracle in the LICENSE file that accompanied this code.
4557 #
4558 # This code is distributed in the hope that it will be useful, but WITHOUT
4559 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4560 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4561 # version 2 for more details (a copy is included in the LICENSE file that
4562 # accompanied this code).
4563 #
4564 # You should have received a copy of the GNU General Public License version
4565 # 2 along with this work; if not, write to the Free Software Foundation,
4566 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4567 #
4568 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4569 # or visit www.oracle.com if you need additional information or have any
4570 # questions.
4571 #
4572 
4573 ################################################################################
4574 # Setup alsa (Advanced Linux Sound Architecture)
4575 ################################################################################
4576 
4577 
4578 #
4579 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4580 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4581 #
4582 # This code is free software; you can redistribute it and/or modify it
4583 # under the terms of the GNU General Public License version 2 only, as
4584 # published by the Free Software Foundation.  Oracle designates this
4585 # particular file as subject to the "Classpath" exception as provided
4586 # by Oracle in the LICENSE file that accompanied this code.
4587 #
4588 # This code is distributed in the hope that it will be useful, but WITHOUT
4589 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4590 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4591 # version 2 for more details (a copy is included in the LICENSE file that
4592 # accompanied this code).
4593 #
4594 # You should have received a copy of the GNU General Public License version
4595 # 2 along with this work; if not, write to the Free Software Foundation,
4596 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4597 #
4598 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4599 # or visit www.oracle.com if you need additional information or have any
4600 # questions.
4601 #
4602 
4603 ################################################################################
4604 # Setup bundled libraries.
4605 #
4606 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4607 # OpenJDK repository. Default is to use these libraries as bundled, but they
4608 # might be replaced by en external version by the user.
4609 ################################################################################
4610 
4611 
4612 ################################################################################
4613 # Setup libjpeg
4614 ################################################################################
4615 
4616 
4617 ################################################################################
4618 # Setup giflib
4619 ################################################################################
4620 
4621 
4622 ################################################################################
4623 # Setup libpng
4624 ################################################################################
4625 
4626 
4627 ################################################################################
4628 # Setup zlib
4629 ################################################################################
4630 
4631 
4632 ################################################################################
4633 # Setup lcms (Little CMS)
4634 ################################################################################
4635 
4636 
4637 #
4638 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4639 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4640 #
4641 # This code is free software; you can redistribute it and/or modify it
4642 # under the terms of the GNU General Public License version 2 only, as
4643 # published by the Free Software Foundation.  Oracle designates this
4644 # particular file as subject to the "Classpath" exception as provided
4645 # by Oracle in the LICENSE file that accompanied this code.
4646 #
4647 # This code is distributed in the hope that it will be useful, but WITHOUT
4648 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4649 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4650 # version 2 for more details (a copy is included in the LICENSE file that
4651 # accompanied this code).
4652 #
4653 # You should have received a copy of the GNU General Public License version
4654 # 2 along with this work; if not, write to the Free Software Foundation,
4655 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4656 #
4657 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4658 # or visit www.oracle.com if you need additional information or have any
4659 # questions.
4660 #
4661 
4662 ################################################################################
4663 # Setup cups (Common Unix Printing System)
4664 ################################################################################
4665 
4666 
4667 #
4668 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4669 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4670 #
4671 # This code is free software; you can redistribute it and/or modify it
4672 # under the terms of the GNU General Public License version 2 only, as
4673 # published by the Free Software Foundation.  Oracle designates this
4674 # particular file as subject to the "Classpath" exception as provided
4675 # by Oracle in the LICENSE file that accompanied this code.
4676 #
4677 # This code is distributed in the hope that it will be useful, but WITHOUT
4678 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4679 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4680 # version 2 for more details (a copy is included in the LICENSE file that
4681 # accompanied this code).
4682 #
4683 # You should have received a copy of the GNU General Public License version
4684 # 2 along with this work; if not, write to the Free Software Foundation,
4685 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4686 #
4687 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4688 # or visit www.oracle.com if you need additional information or have any
4689 # questions.
4690 #
4691 
4692 ################################################################################
4693 # Setup libffi (Foreign Function Interface)
4694 ################################################################################
4695 
4696 
4697 #
4698 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4699 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4700 #
4701 # This code is free software; you can redistribute it and/or modify it
4702 # under the terms of the GNU General Public License version 2 only, as
4703 # published by the Free Software Foundation.  Oracle designates this
4704 # particular file as subject to the "Classpath" exception as provided
4705 # by Oracle in the LICENSE file that accompanied this code.
4706 #
4707 # This code is distributed in the hope that it will be useful, but WITHOUT
4708 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4709 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4710 # version 2 for more details (a copy is included in the LICENSE file that
4711 # accompanied this code).
4712 #
4713 # You should have received a copy of the GNU General Public License version
4714 # 2 along with this work; if not, write to the Free Software Foundation,
4715 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4716 #
4717 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4718 # or visit www.oracle.com if you need additional information or have any
4719 # questions.
4720 #
4721 
4722 ################################################################################
4723 # Build the freetype lib from source
4724 ################################################################################
4725 
4726 
4727 ################################################################################
4728 # Check if a potential freeype library match is correct and usable
4729 ################################################################################
4730 
4731 
4732 ################################################################################
4733 # Setup freetype (The FreeType2 font rendering library)
4734 ################################################################################
4735 
4736 
4737 #
4738 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4739 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4740 #
4741 # This code is free software; you can redistribute it and/or modify it
4742 # under the terms of the GNU General Public License version 2 only, as
4743 # published by the Free Software Foundation.  Oracle designates this
4744 # particular file as subject to the "Classpath" exception as provided
4745 # by Oracle in the LICENSE file that accompanied this code.
4746 #
4747 # This code is distributed in the hope that it will be useful, but WITHOUT
4748 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4749 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4750 # version 2 for more details (a copy is included in the LICENSE file that
4751 # accompanied this code).
4752 #
4753 # You should have received a copy of the GNU General Public License version
4754 # 2 along with this work; if not, write to the Free Software Foundation,
4755 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4756 #
4757 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4758 # or visit www.oracle.com if you need additional information or have any
4759 # questions.
4760 #
4761 
4762 ################################################################################
4763 # Setup the standard C/C++ runtime libraries.
4764 #
4765 # Most importantly, determine if stdc++ should be linked statically or
4766 # dynamically.
4767 ################################################################################
4768 
4769 
4770 #
4771 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4772 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4773 #
4774 # This code is free software; you can redistribute it and/or modify it
4775 # under the terms of the GNU General Public License version 2 only, as
4776 # published by the Free Software Foundation.  Oracle designates this
4777 # particular file as subject to the "Classpath" exception as provided
4778 # by Oracle in the LICENSE file that accompanied this code.
4779 #
4780 # This code is distributed in the hope that it will be useful, but WITHOUT
4781 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4782 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4783 # version 2 for more details (a copy is included in the LICENSE file that
4784 # accompanied this code).
4785 #
4786 # You should have received a copy of the GNU General Public License version
4787 # 2 along with this work; if not, write to the Free Software Foundation,
4788 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4789 #
4790 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4791 # or visit www.oracle.com if you need additional information or have any
4792 # questions.
4793 #
4794 
4795 ################################################################################
4796 # Setup X11 Windows system
4797 ################################################################################
4798 
4799 
4800 #
4801 # Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
4802 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4803 #
4804 # This code is free software; you can redistribute it and/or modify it
4805 # under the terms of the GNU General Public License version 2 only, as
4806 # published by the Free Software Foundation.  Oracle designates this
4807 # particular file as subject to the "Classpath" exception as provided
4808 # by Oracle in the LICENSE file that accompanied this code.
4809 #
4810 # This code is distributed in the hope that it will be useful, but WITHOUT
4811 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4812 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4813 # version 2 for more details (a copy is included in the LICENSE file that
4814 # accompanied this code).
4815 #
4816 # You should have received a copy of the GNU General Public License version
4817 # 2 along with this work; if not, write to the Free Software Foundation,
4818 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4819 #
4820 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4821 # or visit www.oracle.com if you need additional information or have any
4822 # questions.
4823 #
4824 
4825 ################################################################################
4826 # Setup fontconfig
4827 ################################################################################
4828 
4829 
4830 
4831 ################################################################################
4832 # Determine which libraries are needed for this configuration
4833 ################################################################################
4834 
4835 
4836 ################################################################################
4837 # Parse library options, and setup needed libraries
4838 ################################################################################
4839 
4840 
4841 ################################################################################
4842 # Setup various libraries, typically small system libraries
4843 ################################################################################
4844 
4845 
4846 ################################################################################
4847 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4848 # redistribute it in the test image.
4849 ################################################################################
4850 
4851 
4852 
4853 #
4854 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4855 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4856 #
4857 # This code is free software; you can redistribute it and/or modify it
4858 # under the terms of the GNU General Public License version 2 only, as
4859 # published by the Free Software Foundation.  Oracle designates this
4860 # particular file as subject to the "Classpath" exception as provided
4861 # by Oracle in the LICENSE file that accompanied this code.
4862 #
4863 # This code is distributed in the hope that it will be useful, but WITHOUT
4864 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4865 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4866 # version 2 for more details (a copy is included in the LICENSE file that
4867 # accompanied this code).
4868 #
4869 # You should have received a copy of the GNU General Public License version
4870 # 2 along with this work; if not, write to the Free Software Foundation,
4871 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4872 #
4873 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4874 # or visit www.oracle.com if you need additional information or have any
4875 # questions.
4876 #
4877 
4878 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4879 # Converts autoconf style CPU name to OpenJDK style, into
4880 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4881 
4882 
4883 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4884 # Converts autoconf style OS name to OpenJDK style, into
4885 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4886 
4887 
4888 # Expects $host_os $host_cpu $build_os and $build_cpu
4889 # and $with_target_bits to have been setup!
4890 #
4891 # Translate the standard triplet(quadruplet) definition
4892 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4893 # OPENJDK_BUILD_OS, etc.
4894 
4895 
4896 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4897 # accordingly. Must be done after setting up build and target system, but before
4898 # doing anything else with these values.
4899 
4900 
4901 # Setup the legacy variables, for controlling the old makefiles.
4902 #
4903 
4904 
4905 # $1 - Either TARGET or BUILD to setup the variables for.
4906 
4907 
4908 
4909 
4910 
4911 
4912 #%%% Build and target systems %%%
4913 
4914 
4915 
4916 
4917 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4918 # Add -mX to various FLAGS variables.
4919 
4920 
4921 
4922 
4923 
4924 
4925 #
4926 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4927 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4928 #
4929 # This code is free software; you can redistribute it and/or modify it
4930 # under the terms of the GNU General Public License version 2 only, as
4931 # published by the Free Software Foundation.  Oracle designates this
4932 # particular file as subject to the "Classpath" exception as provided
4933 # by Oracle in the LICENSE file that accompanied this code.
4934 #
4935 # This code is distributed in the hope that it will be useful, but WITHOUT
4936 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4937 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4938 # version 2 for more details (a copy is included in the LICENSE file that
4939 # accompanied this code).
4940 #
4941 # You should have received a copy of the GNU General Public License version
4942 # 2 along with this work; if not, write to the Free Software Foundation,
4943 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4944 #
4945 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4946 # or visit www.oracle.com if you need additional information or have any
4947 # questions.
4948 #
4949 
4950 
4951 
4952 ################################################################################
4953 # Define a mechanism for importing extra prebuilt modules
4954 #
4955 
4956 
4957 
4958 #
4959 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4960 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4961 #
4962 # This code is free software; you can redistribute it and/or modify it
4963 # under the terms of the GNU General Public License version 2 only, as
4964 # published by the Free Software Foundation.  Oracle designates this
4965 # particular file as subject to the "Classpath" exception as provided
4966 # by Oracle in the LICENSE file that accompanied this code.
4967 #
4968 # This code is distributed in the hope that it will be useful, but WITHOUT
4969 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4970 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4971 # version 2 for more details (a copy is included in the LICENSE file that
4972 # accompanied this code).
4973 #
4974 # You should have received a copy of the GNU General Public License version
4975 # 2 along with this work; if not, write to the Free Software Foundation,
4976 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4977 #
4978 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4979 # or visit www.oracle.com if you need additional information or have any
4980 # questions.
4981 #
4982 
4983 ########################################################################
4984 # This file is responsible for detecting, verifying and setting up the
4985 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4986 # proper paths to the binaries, but it will not setup any flags.
4987 #
4988 # The binaries used is determined by the toolchain type, which is the family of
4989 # compilers and related tools that are used.
4990 ########################################################################
4991 
4992 
4993 # All valid toolchains, regardless of platform (used by help.m4)
4994 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4995 
4996 # These toolchains are valid on different platforms
4997 VALID_TOOLCHAINS_linux="gcc clang"
4998 VALID_TOOLCHAINS_solaris="solstudio"
4999 VALID_TOOLCHAINS_macosx="gcc clang"
5000 VALID_TOOLCHAINS_aix="xlc"
5001 VALID_TOOLCHAINS_windows="microsoft"
5002 
5003 # Toolchain descriptions
5004 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5005 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5006 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5007 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5008 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5009 
5010 # Minimum supported versions, empty means unspecified
5011 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5012 TOOLCHAIN_MINIMUM_VERSION_gcc="4.7"
5013 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5014 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5015 TOOLCHAIN_MINIMUM_VERSION_xlc=""
5016 
5017 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5018 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5019 # $1 - optional variable prefix for compiler and version variables (BUILD_)
5020 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5021 
5022 
5023 # Check if the configured compiler (C and C++) is of a specific version or
5024 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5025 #
5026 # Arguments:
5027 #   VERSION:   The version string to check against the found version
5028 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5029 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5030 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5031 
5032 
5033 
5034 
5035 # Setup a number of variables describing how native output files are
5036 # named on this platform/toolchain.
5037 
5038 
5039 # Determine which toolchain type to use, and make sure it is valid for this
5040 # platform. Setup various information about the selected toolchain.
5041 
5042 
5043 # Before we start detecting the toolchain executables, we might need some
5044 # special setup, e.g. additional paths etc.
5045 
5046 
5047 # Restore path, etc
5048 
5049 
5050 # Check if a compiler is of the toolchain type we expect, and save the version
5051 # information from it. If the compiler does not match the expected type,
5052 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5053 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5054 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5055 #
5056 # $1 = compiler to test (CC or CXX)
5057 # $2 = human readable name of compiler (C or C++)
5058 
5059 
5060 # Try to locate the given C or C++ compiler in the path, or otherwise.
5061 #
5062 # $1 = compiler to test (CC or CXX)
5063 # $2 = human readable name of compiler (C or C++)
5064 # $3 = compiler name to search for
5065 
5066 
5067 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5068 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5069 # archiver (AR). Verify that the compilers are correct according to the
5070 # toolchain type.
5071 
5072 
5073 # Setup additional tools that is considered a part of the toolchain, but not the
5074 # core part. Many of these are highly platform-specific and do not exist,
5075 # and/or are not needed on all platforms.
5076 
5077 
5078 # Setup the build tools (i.e, the compiler and linker used to build programs
5079 # that should be run on the build platform, not the target platform, as a build
5080 # helper). Since the non-cross-compile case uses the normal, target compilers
5081 # for this, we can only do this after these have been setup.
5082 
5083 
5084 # Do some additional checks on the detected tools.
5085 
5086 
5087 # Setup the JTReg Regression Test Harness.
5088 
5089 
5090 # Setup the JIB dependency resolver
5091 
5092 
5093 #
5094 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5095 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5096 #
5097 # This code is free software; you can redistribute it and/or modify it
5098 # under the terms of the GNU General Public License version 2 only, as
5099 # published by the Free Software Foundation.  Oracle designates this
5100 # particular file as subject to the "Classpath" exception as provided
5101 # by Oracle in the LICENSE file that accompanied this code.
5102 #
5103 # This code is distributed in the hope that it will be useful, but WITHOUT
5104 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5105 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5106 # version 2 for more details (a copy is included in the LICENSE file that
5107 # accompanied this code).
5108 #
5109 # You should have received a copy of the GNU General Public License version
5110 # 2 along with this work; if not, write to the Free Software Foundation,
5111 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5112 #
5113 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5114 # or visit www.oracle.com if you need additional information or have any
5115 # questions.
5116 #
5117 
5118 ################################################################################
5119 # The order of these defines the priority by which we try to find them.
5120 VALID_VS_VERSIONS="2013 2012 2010 2015 2017"
5121 
5122 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5123 VS_VERSION_INTERNAL_2010=100
5124 VS_MSVCR_2010=msvcr100.dll
5125 # We don't use msvcp on Visual Studio 2010
5126 #VS_MSVCP_2010=msvcp100.dll
5127 VS_ENVVAR_2010="VS100COMNTOOLS"
5128 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5129 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5130 VS_VS_PLATFORM_NAME_2010="v100"
5131 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5132 
5133 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5134 VS_VERSION_INTERNAL_2012=110
5135 VS_MSVCR_2012=msvcr110.dll
5136 VS_MSVCP_2012=msvcp110.dll
5137 VS_ENVVAR_2012="VS110COMNTOOLS"
5138 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5139 VS_SDK_INSTALLDIR_2012=
5140 VS_VS_PLATFORM_NAME_2012="v110"
5141 VS_SDK_PLATFORM_NAME_2012=
5142 
5143 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5144 VS_VERSION_INTERNAL_2013=120
5145 VS_MSVCR_2013=msvcr120.dll
5146 VS_MSVCP_2013=msvcp120.dll
5147 VS_ENVVAR_2013="VS120COMNTOOLS"
5148 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5149 VS_SDK_INSTALLDIR_2013=
5150 VS_VS_PLATFORM_NAME_2013="v120"
5151 VS_SDK_PLATFORM_NAME_2013=
5152 
5153 VS_DESCRIPTION_2015="Microsoft Visual Studio 2015 - CURRENTLY NOT WORKING"
5154 VS_VERSION_INTERNAL_2015=140
5155 VS_MSVCR_2015=vcruntime140.dll
5156 VS_MSVCP_2015=msvcp140.dll
5157 VS_ENVVAR_2015="VS140COMNTOOLS"
5158 VS_VS_INSTALLDIR_2015="Microsoft Visual Studio 14.0"
5159 VS_SDK_INSTALLDIR_2015=
5160 VS_VS_PLATFORM_NAME_2015="v140"
5161 VS_SDK_PLATFORM_NAME_2015=
5162 # The vcvars of 2015 breaks if 2017 is also installed. Work around this by
5163 # explicitly specifying Windows Kit 8.1 to be used.
5164 VS_ENV_ARGS_2015="8.1"
5165 
5166 VS_DESCRIPTION_2017="Microsoft Visual Studio 2017 - CURRENTLY NOT WORKING"
5167 VS_VERSION_INTERNAL_2017=141
5168 VS_MSVCR_2017=vcruntime140.dll
5169 VS_MSVCP_2017=msvcp140.dll
5170 VS_ENVVAR_2017="VS150COMNTOOLS"
5171 VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
5172 VS_EDITIONS_2017="Community Professional Enterprise"
5173 VS_SDK_INSTALLDIR_2017=
5174 VS_VS_PLATFORM_NAME_2017="v141"
5175 VS_SDK_PLATFORM_NAME_2017=
5176 
5177 ################################################################################
5178 
5179 
5180 
5181 ################################################################################
5182 
5183 
5184 
5185 ################################################################################
5186 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5187 # build environment and assigns it to VS_ENV_CMD
5188 
5189 
5190 ################################################################################
5191 
5192 
5193 
5194 ################################################################################
5195 # Check if the VS env variables were setup prior to running configure.
5196 # If not, then find vcvarsall.bat and run it automatically, and integrate
5197 # the set env variables into the spec file.
5198 
5199 
5200 
5201 
5202 
5203 
5204 
5205 
5206 
5207 
5208 
5209 
5210 
5211 
5212 # This line needs to be here, verbatim, after all includes and the dummy hook
5213 # definitions. It is replaced with custom functionality when building
5214 # custom sources.
5215 #CUSTOM_AUTOCONF_INCLUDE
5216 
5217 # Do not change or remove the following line, it is needed for consistency checks:
5218 DATE_WHEN_GENERATED=1521480822
5219 
5220 ###############################################################################
5221 #
5222 # Initialization / Boot-strapping
5223 #
5224 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5225 # thus it jumps back and forth, each time gaining something needed later on.
5226 #
5227 ###############################################################################
5228 
5229 # If we are requested to print additional help, do that and then exit.
5230 # This must be the very first call.
5231 
5232   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5233 
5234     # Print available toolchains
5235     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5236     $PRINTF "Which are valid to use depends on the build platform.\n"
5237     for toolchain in $VALID_TOOLCHAINS_all; do
5238       # Use indirect variable referencing
5239       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5240       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5241       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5242     done
5243     $PRINTF "\n"
5244 
5245     # Print available jvm features
5246     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5247     $PRINTF "Which are valid to use depends on the target platform.\n  "
5248     $PRINTF "%s " $VALID_JVM_FEATURES
5249     $PRINTF "\n"
5250 
5251     # And now exit directly
5252     exit 0
5253   fi
5254 
5255 
5256 # Basic initialization that must happen first of all in the normal process.
5257 
5258   # Save the original command line. This is passed to us by the wrapper configure script.
5259 
5260   # Save the path variable before it gets changed
5261   ORIGINAL_PATH="$PATH"
5262 
5263   DATE_WHEN_CONFIGURED=`LANG=C date`
5264 
5265   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5266 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5267   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5268 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5269 
5270 
5271   # Start with tools that do not need have cross compilation support
5272   # and can be expected to be found in the default PATH. These tools are
5273   # used by configure.
5274 
5275   # First are all the simple required tools.
5276 
5277 
5278 
5279   # Publish this variable in the help.
5280 
5281 
5282   if [ -z "${BASENAME+x}" ]; then
5283     # The variable is not set by user, try to locate tool using the code snippet
5284     for ac_prog in basename
5285 do
5286   # Extract the first word of "$ac_prog", so it can be a program name with args.
5287 set dummy $ac_prog; ac_word=$2
5288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5289 $as_echo_n "checking for $ac_word... " >&6; }
5290 if ${ac_cv_path_BASENAME+:} false; then :
5291   $as_echo_n "(cached) " >&6
5292 else
5293   case $BASENAME in
5294   [\\/]* | ?:[\\/]*)
5295   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5296   ;;
5297   *)
5298   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5299 for as_dir in $PATH
5300 do
5301   IFS=$as_save_IFS
5302   test -z "$as_dir" && as_dir=.
5303     for ac_exec_ext in '' $ac_executable_extensions; do
5304   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5305     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5306     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5307     break 2
5308   fi
5309 done
5310   done
5311 IFS=$as_save_IFS
5312 
5313   ;;
5314 esac
5315 fi
5316 BASENAME=$ac_cv_path_BASENAME
5317 if test -n "$BASENAME"; then
5318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5319 $as_echo "$BASENAME" >&6; }
5320 else
5321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5322 $as_echo "no" >&6; }
5323 fi
5324 
5325 
5326   test -n "$BASENAME" && break
5327 done
5328 
5329   else
5330     # The variable is set, but is it from the command line or the environment?
5331 
5332     # Try to remove the string !BASENAME! from our list.
5333     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5334     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5335       # If it failed, the variable was not from the command line. Ignore it,
5336       # but warn the user (except for BASH, which is always set by the calling BASH).
5337       if test "xBASENAME" != xBASH; then
5338         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5339 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5340       fi
5341       # Try to locate tool using the code snippet
5342       for ac_prog in basename
5343 do
5344   # Extract the first word of "$ac_prog", so it can be a program name with args.
5345 set dummy $ac_prog; ac_word=$2
5346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5347 $as_echo_n "checking for $ac_word... " >&6; }
5348 if ${ac_cv_path_BASENAME+:} false; then :
5349   $as_echo_n "(cached) " >&6
5350 else
5351   case $BASENAME in
5352   [\\/]* | ?:[\\/]*)
5353   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5354   ;;
5355   *)
5356   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5357 for as_dir in $PATH
5358 do
5359   IFS=$as_save_IFS
5360   test -z "$as_dir" && as_dir=.
5361     for ac_exec_ext in '' $ac_executable_extensions; do
5362   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5363     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5364     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5365     break 2
5366   fi
5367 done
5368   done
5369 IFS=$as_save_IFS
5370 
5371   ;;
5372 esac
5373 fi
5374 BASENAME=$ac_cv_path_BASENAME
5375 if test -n "$BASENAME"; then
5376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5377 $as_echo "$BASENAME" >&6; }
5378 else
5379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5380 $as_echo "no" >&6; }
5381 fi
5382 
5383 
5384   test -n "$BASENAME" && break
5385 done
5386 
5387     else
5388       # If it succeeded, then it was overridden by the user. We will use it
5389       # for the tool.
5390 
5391       # First remove it from the list of overridden variables, so we can test
5392       # for unknown variables in the end.
5393       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5394 
5395       # Check if we try to supply an empty value
5396       if test "x$BASENAME" = x; then
5397         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5398 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5399         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5400 $as_echo_n "checking for BASENAME... " >&6; }
5401         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5402 $as_echo "disabled" >&6; }
5403       else
5404         # Check if the provided tool contains a complete path.
5405         tool_specified="$BASENAME"
5406         tool_basename="${tool_specified##*/}"
5407         if test "x$tool_basename" = "x$tool_specified"; then
5408           # A command without a complete path is provided, search $PATH.
5409           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5410 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5411           # Extract the first word of "$tool_basename", so it can be a program name with args.
5412 set dummy $tool_basename; ac_word=$2
5413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5414 $as_echo_n "checking for $ac_word... " >&6; }
5415 if ${ac_cv_path_BASENAME+:} false; then :
5416   $as_echo_n "(cached) " >&6
5417 else
5418   case $BASENAME in
5419   [\\/]* | ?:[\\/]*)
5420   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5421   ;;
5422   *)
5423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5424 for as_dir in $PATH
5425 do
5426   IFS=$as_save_IFS
5427   test -z "$as_dir" && as_dir=.
5428     for ac_exec_ext in '' $ac_executable_extensions; do
5429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5430     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432     break 2
5433   fi
5434 done
5435   done
5436 IFS=$as_save_IFS
5437 
5438   ;;
5439 esac
5440 fi
5441 BASENAME=$ac_cv_path_BASENAME
5442 if test -n "$BASENAME"; then
5443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5444 $as_echo "$BASENAME" >&6; }
5445 else
5446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5447 $as_echo "no" >&6; }
5448 fi
5449 
5450 
5451           if test "x$BASENAME" = x; then
5452             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5453           fi
5454         else
5455           # Otherwise we believe it is a complete path. Use it as it is.
5456           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5457 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5458           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5459 $as_echo_n "checking for BASENAME... " >&6; }
5460           if test ! -x "$tool_specified"; then
5461             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5462 $as_echo "not found" >&6; }
5463             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5464           fi
5465           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5466 $as_echo "$tool_specified" >&6; }
5467         fi
5468       fi
5469     fi
5470 
5471   fi
5472 
5473 
5474 
5475   if test "x$BASENAME" = x; then
5476     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5477   fi
5478 
5479 
5480 
5481 
5482 
5483   # Publish this variable in the help.
5484 
5485 
5486   if [ -z "${BASH+x}" ]; then
5487     # The variable is not set by user, try to locate tool using the code snippet
5488     for ac_prog in bash
5489 do
5490   # Extract the first word of "$ac_prog", so it can be a program name with args.
5491 set dummy $ac_prog; ac_word=$2
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5493 $as_echo_n "checking for $ac_word... " >&6; }
5494 if ${ac_cv_path_BASH+:} false; then :
5495   $as_echo_n "(cached) " >&6
5496 else
5497   case $BASH in
5498   [\\/]* | ?:[\\/]*)
5499   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5500   ;;
5501   *)
5502   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5503 for as_dir in $PATH
5504 do
5505   IFS=$as_save_IFS
5506   test -z "$as_dir" && as_dir=.
5507     for ac_exec_ext in '' $ac_executable_extensions; do
5508   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5509     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5510     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5511     break 2
5512   fi
5513 done
5514   done
5515 IFS=$as_save_IFS
5516 
5517   ;;
5518 esac
5519 fi
5520 BASH=$ac_cv_path_BASH
5521 if test -n "$BASH"; then
5522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5523 $as_echo "$BASH" >&6; }
5524 else
5525   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5526 $as_echo "no" >&6; }
5527 fi
5528 
5529 
5530   test -n "$BASH" && break
5531 done
5532 
5533   else
5534     # The variable is set, but is it from the command line or the environment?
5535 
5536     # Try to remove the string !BASH! from our list.
5537     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5538     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5539       # If it failed, the variable was not from the command line. Ignore it,
5540       # but warn the user (except for BASH, which is always set by the calling BASH).
5541       if test "xBASH" != xBASH; then
5542         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5543 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5544       fi
5545       # Try to locate tool using the code snippet
5546       for ac_prog in bash
5547 do
5548   # Extract the first word of "$ac_prog", so it can be a program name with args.
5549 set dummy $ac_prog; ac_word=$2
5550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5551 $as_echo_n "checking for $ac_word... " >&6; }
5552 if ${ac_cv_path_BASH+:} false; then :
5553   $as_echo_n "(cached) " >&6
5554 else
5555   case $BASH in
5556   [\\/]* | ?:[\\/]*)
5557   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5558   ;;
5559   *)
5560   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5561 for as_dir in $PATH
5562 do
5563   IFS=$as_save_IFS
5564   test -z "$as_dir" && as_dir=.
5565     for ac_exec_ext in '' $ac_executable_extensions; do
5566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5567     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5569     break 2
5570   fi
5571 done
5572   done
5573 IFS=$as_save_IFS
5574 
5575   ;;
5576 esac
5577 fi
5578 BASH=$ac_cv_path_BASH
5579 if test -n "$BASH"; then
5580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5581 $as_echo "$BASH" >&6; }
5582 else
5583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5585 fi
5586 
5587 
5588   test -n "$BASH" && break
5589 done
5590 
5591     else
5592       # If it succeeded, then it was overridden by the user. We will use it
5593       # for the tool.
5594 
5595       # First remove it from the list of overridden variables, so we can test
5596       # for unknown variables in the end.
5597       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5598 
5599       # Check if we try to supply an empty value
5600       if test "x$BASH" = x; then
5601         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5602 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5604 $as_echo_n "checking for BASH... " >&6; }
5605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5606 $as_echo "disabled" >&6; }
5607       else
5608         # Check if the provided tool contains a complete path.
5609         tool_specified="$BASH"
5610         tool_basename="${tool_specified##*/}"
5611         if test "x$tool_basename" = "x$tool_specified"; then
5612           # A command without a complete path is provided, search $PATH.
5613           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5614 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5615           # Extract the first word of "$tool_basename", so it can be a program name with args.
5616 set dummy $tool_basename; ac_word=$2
5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5618 $as_echo_n "checking for $ac_word... " >&6; }
5619 if ${ac_cv_path_BASH+:} false; then :
5620   $as_echo_n "(cached) " >&6
5621 else
5622   case $BASH in
5623   [\\/]* | ?:[\\/]*)
5624   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5625   ;;
5626   *)
5627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5628 for as_dir in $PATH
5629 do
5630   IFS=$as_save_IFS
5631   test -z "$as_dir" && as_dir=.
5632     for ac_exec_ext in '' $ac_executable_extensions; do
5633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5634     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5636     break 2
5637   fi
5638 done
5639   done
5640 IFS=$as_save_IFS
5641 
5642   ;;
5643 esac
5644 fi
5645 BASH=$ac_cv_path_BASH
5646 if test -n "$BASH"; then
5647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5648 $as_echo "$BASH" >&6; }
5649 else
5650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651 $as_echo "no" >&6; }
5652 fi
5653 
5654 
5655           if test "x$BASH" = x; then
5656             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5657           fi
5658         else
5659           # Otherwise we believe it is a complete path. Use it as it is.
5660           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5661 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5662           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5663 $as_echo_n "checking for BASH... " >&6; }
5664           if test ! -x "$tool_specified"; then
5665             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5666 $as_echo "not found" >&6; }
5667             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5668           fi
5669           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5670 $as_echo "$tool_specified" >&6; }
5671         fi
5672       fi
5673     fi
5674 
5675   fi
5676 
5677 
5678 
5679   if test "x$BASH" = x; then
5680     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5681   fi
5682 
5683 
5684 
5685 
5686 
5687   # Publish this variable in the help.
5688 
5689 
5690   if [ -z "${CAT+x}" ]; then
5691     # The variable is not set by user, try to locate tool using the code snippet
5692     for ac_prog in cat
5693 do
5694   # Extract the first word of "$ac_prog", so it can be a program name with args.
5695 set dummy $ac_prog; ac_word=$2
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5697 $as_echo_n "checking for $ac_word... " >&6; }
5698 if ${ac_cv_path_CAT+:} false; then :
5699   $as_echo_n "(cached) " >&6
5700 else
5701   case $CAT in
5702   [\\/]* | ?:[\\/]*)
5703   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5704   ;;
5705   *)
5706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5707 for as_dir in $PATH
5708 do
5709   IFS=$as_save_IFS
5710   test -z "$as_dir" && as_dir=.
5711     for ac_exec_ext in '' $ac_executable_extensions; do
5712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5713     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5715     break 2
5716   fi
5717 done
5718   done
5719 IFS=$as_save_IFS
5720 
5721   ;;
5722 esac
5723 fi
5724 CAT=$ac_cv_path_CAT
5725 if test -n "$CAT"; then
5726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5727 $as_echo "$CAT" >&6; }
5728 else
5729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5730 $as_echo "no" >&6; }
5731 fi
5732 
5733 
5734   test -n "$CAT" && break
5735 done
5736 
5737   else
5738     # The variable is set, but is it from the command line or the environment?
5739 
5740     # Try to remove the string !CAT! from our list.
5741     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5742     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5743       # If it failed, the variable was not from the command line. Ignore it,
5744       # but warn the user (except for BASH, which is always set by the calling BASH).
5745       if test "xCAT" != xBASH; then
5746         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5747 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5748       fi
5749       # Try to locate tool using the code snippet
5750       for ac_prog in cat
5751 do
5752   # Extract the first word of "$ac_prog", so it can be a program name with args.
5753 set dummy $ac_prog; ac_word=$2
5754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5755 $as_echo_n "checking for $ac_word... " >&6; }
5756 if ${ac_cv_path_CAT+:} false; then :
5757   $as_echo_n "(cached) " >&6
5758 else
5759   case $CAT in
5760   [\\/]* | ?:[\\/]*)
5761   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5762   ;;
5763   *)
5764   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5765 for as_dir in $PATH
5766 do
5767   IFS=$as_save_IFS
5768   test -z "$as_dir" && as_dir=.
5769     for ac_exec_ext in '' $ac_executable_extensions; do
5770   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5771     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5772     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5773     break 2
5774   fi
5775 done
5776   done
5777 IFS=$as_save_IFS
5778 
5779   ;;
5780 esac
5781 fi
5782 CAT=$ac_cv_path_CAT
5783 if test -n "$CAT"; then
5784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5785 $as_echo "$CAT" >&6; }
5786 else
5787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5788 $as_echo "no" >&6; }
5789 fi
5790 
5791 
5792   test -n "$CAT" && break
5793 done
5794 
5795     else
5796       # If it succeeded, then it was overridden by the user. We will use it
5797       # for the tool.
5798 
5799       # First remove it from the list of overridden variables, so we can test
5800       # for unknown variables in the end.
5801       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5802 
5803       # Check if we try to supply an empty value
5804       if test "x$CAT" = x; then
5805         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5806 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5807         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5808 $as_echo_n "checking for CAT... " >&6; }
5809         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5810 $as_echo "disabled" >&6; }
5811       else
5812         # Check if the provided tool contains a complete path.
5813         tool_specified="$CAT"
5814         tool_basename="${tool_specified##*/}"
5815         if test "x$tool_basename" = "x$tool_specified"; then
5816           # A command without a complete path is provided, search $PATH.
5817           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5818 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5819           # Extract the first word of "$tool_basename", so it can be a program name with args.
5820 set dummy $tool_basename; ac_word=$2
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5822 $as_echo_n "checking for $ac_word... " >&6; }
5823 if ${ac_cv_path_CAT+:} false; then :
5824   $as_echo_n "(cached) " >&6
5825 else
5826   case $CAT in
5827   [\\/]* | ?:[\\/]*)
5828   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5829   ;;
5830   *)
5831   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5832 for as_dir in $PATH
5833 do
5834   IFS=$as_save_IFS
5835   test -z "$as_dir" && as_dir=.
5836     for ac_exec_ext in '' $ac_executable_extensions; do
5837   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5838     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5839     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5840     break 2
5841   fi
5842 done
5843   done
5844 IFS=$as_save_IFS
5845 
5846   ;;
5847 esac
5848 fi
5849 CAT=$ac_cv_path_CAT
5850 if test -n "$CAT"; then
5851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5852 $as_echo "$CAT" >&6; }
5853 else
5854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5855 $as_echo "no" >&6; }
5856 fi
5857 
5858 
5859           if test "x$CAT" = x; then
5860             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5861           fi
5862         else
5863           # Otherwise we believe it is a complete path. Use it as it is.
5864           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5865 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5866           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5867 $as_echo_n "checking for CAT... " >&6; }
5868           if test ! -x "$tool_specified"; then
5869             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5870 $as_echo "not found" >&6; }
5871             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5872           fi
5873           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5874 $as_echo "$tool_specified" >&6; }
5875         fi
5876       fi
5877     fi
5878 
5879   fi
5880 
5881 
5882 
5883   if test "x$CAT" = x; then
5884     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5885   fi
5886 
5887 
5888 
5889 
5890 
5891   # Publish this variable in the help.
5892 
5893 
5894   if [ -z "${CHMOD+x}" ]; then
5895     # The variable is not set by user, try to locate tool using the code snippet
5896     for ac_prog in chmod
5897 do
5898   # Extract the first word of "$ac_prog", so it can be a program name with args.
5899 set dummy $ac_prog; ac_word=$2
5900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5901 $as_echo_n "checking for $ac_word... " >&6; }
5902 if ${ac_cv_path_CHMOD+:} false; then :
5903   $as_echo_n "(cached) " >&6
5904 else
5905   case $CHMOD in
5906   [\\/]* | ?:[\\/]*)
5907   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5908   ;;
5909   *)
5910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5911 for as_dir in $PATH
5912 do
5913   IFS=$as_save_IFS
5914   test -z "$as_dir" && as_dir=.
5915     for ac_exec_ext in '' $ac_executable_extensions; do
5916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5917     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5919     break 2
5920   fi
5921 done
5922   done
5923 IFS=$as_save_IFS
5924 
5925   ;;
5926 esac
5927 fi
5928 CHMOD=$ac_cv_path_CHMOD
5929 if test -n "$CHMOD"; then
5930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5931 $as_echo "$CHMOD" >&6; }
5932 else
5933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5934 $as_echo "no" >&6; }
5935 fi
5936 
5937 
5938   test -n "$CHMOD" && break
5939 done
5940 
5941   else
5942     # The variable is set, but is it from the command line or the environment?
5943 
5944     # Try to remove the string !CHMOD! from our list.
5945     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5946     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5947       # If it failed, the variable was not from the command line. Ignore it,
5948       # but warn the user (except for BASH, which is always set by the calling BASH).
5949       if test "xCHMOD" != xBASH; then
5950         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5951 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5952       fi
5953       # Try to locate tool using the code snippet
5954       for ac_prog in chmod
5955 do
5956   # Extract the first word of "$ac_prog", so it can be a program name with args.
5957 set dummy $ac_prog; ac_word=$2
5958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5959 $as_echo_n "checking for $ac_word... " >&6; }
5960 if ${ac_cv_path_CHMOD+:} false; then :
5961   $as_echo_n "(cached) " >&6
5962 else
5963   case $CHMOD in
5964   [\\/]* | ?:[\\/]*)
5965   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5966   ;;
5967   *)
5968   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5969 for as_dir in $PATH
5970 do
5971   IFS=$as_save_IFS
5972   test -z "$as_dir" && as_dir=.
5973     for ac_exec_ext in '' $ac_executable_extensions; do
5974   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5975     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5976     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5977     break 2
5978   fi
5979 done
5980   done
5981 IFS=$as_save_IFS
5982 
5983   ;;
5984 esac
5985 fi
5986 CHMOD=$ac_cv_path_CHMOD
5987 if test -n "$CHMOD"; then
5988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5989 $as_echo "$CHMOD" >&6; }
5990 else
5991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5992 $as_echo "no" >&6; }
5993 fi
5994 
5995 
5996   test -n "$CHMOD" && break
5997 done
5998 
5999     else
6000       # If it succeeded, then it was overridden by the user. We will use it
6001       # for the tool.
6002 
6003       # First remove it from the list of overridden variables, so we can test
6004       # for unknown variables in the end.
6005       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6006 
6007       # Check if we try to supply an empty value
6008       if test "x$CHMOD" = x; then
6009         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
6010 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
6011         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6012 $as_echo_n "checking for CHMOD... " >&6; }
6013         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6014 $as_echo "disabled" >&6; }
6015       else
6016         # Check if the provided tool contains a complete path.
6017         tool_specified="$CHMOD"
6018         tool_basename="${tool_specified##*/}"
6019         if test "x$tool_basename" = "x$tool_specified"; then
6020           # A command without a complete path is provided, search $PATH.
6021           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
6022 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
6023           # Extract the first word of "$tool_basename", so it can be a program name with args.
6024 set dummy $tool_basename; ac_word=$2
6025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6026 $as_echo_n "checking for $ac_word... " >&6; }
6027 if ${ac_cv_path_CHMOD+:} false; then :
6028   $as_echo_n "(cached) " >&6
6029 else
6030   case $CHMOD in
6031   [\\/]* | ?:[\\/]*)
6032   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6033   ;;
6034   *)
6035   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6036 for as_dir in $PATH
6037 do
6038   IFS=$as_save_IFS
6039   test -z "$as_dir" && as_dir=.
6040     for ac_exec_ext in '' $ac_executable_extensions; do
6041   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6042     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6043     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6044     break 2
6045   fi
6046 done
6047   done
6048 IFS=$as_save_IFS
6049 
6050   ;;
6051 esac
6052 fi
6053 CHMOD=$ac_cv_path_CHMOD
6054 if test -n "$CHMOD"; then
6055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6056 $as_echo "$CHMOD" >&6; }
6057 else
6058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6059 $as_echo "no" >&6; }
6060 fi
6061 
6062 
6063           if test "x$CHMOD" = x; then
6064             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6065           fi
6066         else
6067           # Otherwise we believe it is a complete path. Use it as it is.
6068           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6069 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6070           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6071 $as_echo_n "checking for CHMOD... " >&6; }
6072           if test ! -x "$tool_specified"; then
6073             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6074 $as_echo "not found" >&6; }
6075             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6076           fi
6077           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6078 $as_echo "$tool_specified" >&6; }
6079         fi
6080       fi
6081     fi
6082 
6083   fi
6084 
6085 
6086 
6087   if test "x$CHMOD" = x; then
6088     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6089   fi
6090 
6091 
6092 
6093 
6094 
6095   # Publish this variable in the help.
6096 
6097 
6098   if [ -z "${CMP+x}" ]; then
6099     # The variable is not set by user, try to locate tool using the code snippet
6100     for ac_prog in cmp
6101 do
6102   # Extract the first word of "$ac_prog", so it can be a program name with args.
6103 set dummy $ac_prog; ac_word=$2
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6105 $as_echo_n "checking for $ac_word... " >&6; }
6106 if ${ac_cv_path_CMP+:} false; then :
6107   $as_echo_n "(cached) " >&6
6108 else
6109   case $CMP in
6110   [\\/]* | ?:[\\/]*)
6111   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6112   ;;
6113   *)
6114   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6115 for as_dir in $PATH
6116 do
6117   IFS=$as_save_IFS
6118   test -z "$as_dir" && as_dir=.
6119     for ac_exec_ext in '' $ac_executable_extensions; do
6120   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6121     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6122     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6123     break 2
6124   fi
6125 done
6126   done
6127 IFS=$as_save_IFS
6128 
6129   ;;
6130 esac
6131 fi
6132 CMP=$ac_cv_path_CMP
6133 if test -n "$CMP"; then
6134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6135 $as_echo "$CMP" >&6; }
6136 else
6137   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6138 $as_echo "no" >&6; }
6139 fi
6140 
6141 
6142   test -n "$CMP" && break
6143 done
6144 
6145   else
6146     # The variable is set, but is it from the command line or the environment?
6147 
6148     # Try to remove the string !CMP! from our list.
6149     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6150     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6151       # If it failed, the variable was not from the command line. Ignore it,
6152       # but warn the user (except for BASH, which is always set by the calling BASH).
6153       if test "xCMP" != xBASH; then
6154         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6155 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6156       fi
6157       # Try to locate tool using the code snippet
6158       for ac_prog in cmp
6159 do
6160   # Extract the first word of "$ac_prog", so it can be a program name with args.
6161 set dummy $ac_prog; ac_word=$2
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6163 $as_echo_n "checking for $ac_word... " >&6; }
6164 if ${ac_cv_path_CMP+:} false; then :
6165   $as_echo_n "(cached) " >&6
6166 else
6167   case $CMP in
6168   [\\/]* | ?:[\\/]*)
6169   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6170   ;;
6171   *)
6172   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6173 for as_dir in $PATH
6174 do
6175   IFS=$as_save_IFS
6176   test -z "$as_dir" && as_dir=.
6177     for ac_exec_ext in '' $ac_executable_extensions; do
6178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6179     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6181     break 2
6182   fi
6183 done
6184   done
6185 IFS=$as_save_IFS
6186 
6187   ;;
6188 esac
6189 fi
6190 CMP=$ac_cv_path_CMP
6191 if test -n "$CMP"; then
6192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6193 $as_echo "$CMP" >&6; }
6194 else
6195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6196 $as_echo "no" >&6; }
6197 fi
6198 
6199 
6200   test -n "$CMP" && break
6201 done
6202 
6203     else
6204       # If it succeeded, then it was overridden by the user. We will use it
6205       # for the tool.
6206 
6207       # First remove it from the list of overridden variables, so we can test
6208       # for unknown variables in the end.
6209       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6210 
6211       # Check if we try to supply an empty value
6212       if test "x$CMP" = x; then
6213         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6214 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6215         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6216 $as_echo_n "checking for CMP... " >&6; }
6217         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6218 $as_echo "disabled" >&6; }
6219       else
6220         # Check if the provided tool contains a complete path.
6221         tool_specified="$CMP"
6222         tool_basename="${tool_specified##*/}"
6223         if test "x$tool_basename" = "x$tool_specified"; then
6224           # A command without a complete path is provided, search $PATH.
6225           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6226 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6227           # Extract the first word of "$tool_basename", so it can be a program name with args.
6228 set dummy $tool_basename; ac_word=$2
6229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230 $as_echo_n "checking for $ac_word... " >&6; }
6231 if ${ac_cv_path_CMP+:} false; then :
6232   $as_echo_n "(cached) " >&6
6233 else
6234   case $CMP in
6235   [\\/]* | ?:[\\/]*)
6236   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6237   ;;
6238   *)
6239   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240 for as_dir in $PATH
6241 do
6242   IFS=$as_save_IFS
6243   test -z "$as_dir" && as_dir=.
6244     for ac_exec_ext in '' $ac_executable_extensions; do
6245   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6247     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248     break 2
6249   fi
6250 done
6251   done
6252 IFS=$as_save_IFS
6253 
6254   ;;
6255 esac
6256 fi
6257 CMP=$ac_cv_path_CMP
6258 if test -n "$CMP"; then
6259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6260 $as_echo "$CMP" >&6; }
6261 else
6262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263 $as_echo "no" >&6; }
6264 fi
6265 
6266 
6267           if test "x$CMP" = x; then
6268             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6269           fi
6270         else
6271           # Otherwise we believe it is a complete path. Use it as it is.
6272           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6273 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6274           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6275 $as_echo_n "checking for CMP... " >&6; }
6276           if test ! -x "$tool_specified"; then
6277             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6278 $as_echo "not found" >&6; }
6279             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6280           fi
6281           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6282 $as_echo "$tool_specified" >&6; }
6283         fi
6284       fi
6285     fi
6286 
6287   fi
6288 
6289 
6290 
6291   if test "x$CMP" = x; then
6292     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6293   fi
6294 
6295 
6296 
6297 
6298 
6299   # Publish this variable in the help.
6300 
6301 
6302   if [ -z "${COMM+x}" ]; then
6303     # The variable is not set by user, try to locate tool using the code snippet
6304     for ac_prog in comm
6305 do
6306   # Extract the first word of "$ac_prog", so it can be a program name with args.
6307 set dummy $ac_prog; ac_word=$2
6308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6309 $as_echo_n "checking for $ac_word... " >&6; }
6310 if ${ac_cv_path_COMM+:} false; then :
6311   $as_echo_n "(cached) " >&6
6312 else
6313   case $COMM in
6314   [\\/]* | ?:[\\/]*)
6315   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6316   ;;
6317   *)
6318   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6319 for as_dir in $PATH
6320 do
6321   IFS=$as_save_IFS
6322   test -z "$as_dir" && as_dir=.
6323     for ac_exec_ext in '' $ac_executable_extensions; do
6324   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6325     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6326     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6327     break 2
6328   fi
6329 done
6330   done
6331 IFS=$as_save_IFS
6332 
6333   ;;
6334 esac
6335 fi
6336 COMM=$ac_cv_path_COMM
6337 if test -n "$COMM"; then
6338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6339 $as_echo "$COMM" >&6; }
6340 else
6341   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6342 $as_echo "no" >&6; }
6343 fi
6344 
6345 
6346   test -n "$COMM" && break
6347 done
6348 
6349   else
6350     # The variable is set, but is it from the command line or the environment?
6351 
6352     # Try to remove the string !COMM! from our list.
6353     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6354     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6355       # If it failed, the variable was not from the command line. Ignore it,
6356       # but warn the user (except for BASH, which is always set by the calling BASH).
6357       if test "xCOMM" != xBASH; then
6358         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6359 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6360       fi
6361       # Try to locate tool using the code snippet
6362       for ac_prog in comm
6363 do
6364   # Extract the first word of "$ac_prog", so it can be a program name with args.
6365 set dummy $ac_prog; ac_word=$2
6366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6367 $as_echo_n "checking for $ac_word... " >&6; }
6368 if ${ac_cv_path_COMM+:} false; then :
6369   $as_echo_n "(cached) " >&6
6370 else
6371   case $COMM in
6372   [\\/]* | ?:[\\/]*)
6373   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6374   ;;
6375   *)
6376   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6377 for as_dir in $PATH
6378 do
6379   IFS=$as_save_IFS
6380   test -z "$as_dir" && as_dir=.
6381     for ac_exec_ext in '' $ac_executable_extensions; do
6382   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6383     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6384     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6385     break 2
6386   fi
6387 done
6388   done
6389 IFS=$as_save_IFS
6390 
6391   ;;
6392 esac
6393 fi
6394 COMM=$ac_cv_path_COMM
6395 if test -n "$COMM"; then
6396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6397 $as_echo "$COMM" >&6; }
6398 else
6399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6400 $as_echo "no" >&6; }
6401 fi
6402 
6403 
6404   test -n "$COMM" && break
6405 done
6406 
6407     else
6408       # If it succeeded, then it was overridden by the user. We will use it
6409       # for the tool.
6410 
6411       # First remove it from the list of overridden variables, so we can test
6412       # for unknown variables in the end.
6413       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6414 
6415       # Check if we try to supply an empty value
6416       if test "x$COMM" = x; then
6417         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6418 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6419         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6420 $as_echo_n "checking for COMM... " >&6; }
6421         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6422 $as_echo "disabled" >&6; }
6423       else
6424         # Check if the provided tool contains a complete path.
6425         tool_specified="$COMM"
6426         tool_basename="${tool_specified##*/}"
6427         if test "x$tool_basename" = "x$tool_specified"; then
6428           # A command without a complete path is provided, search $PATH.
6429           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6430 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6431           # Extract the first word of "$tool_basename", so it can be a program name with args.
6432 set dummy $tool_basename; ac_word=$2
6433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6434 $as_echo_n "checking for $ac_word... " >&6; }
6435 if ${ac_cv_path_COMM+:} false; then :
6436   $as_echo_n "(cached) " >&6
6437 else
6438   case $COMM in
6439   [\\/]* | ?:[\\/]*)
6440   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6441   ;;
6442   *)
6443   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6444 for as_dir in $PATH
6445 do
6446   IFS=$as_save_IFS
6447   test -z "$as_dir" && as_dir=.
6448     for ac_exec_ext in '' $ac_executable_extensions; do
6449   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6450     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6451     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6452     break 2
6453   fi
6454 done
6455   done
6456 IFS=$as_save_IFS
6457 
6458   ;;
6459 esac
6460 fi
6461 COMM=$ac_cv_path_COMM
6462 if test -n "$COMM"; then
6463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6464 $as_echo "$COMM" >&6; }
6465 else
6466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6467 $as_echo "no" >&6; }
6468 fi
6469 
6470 
6471           if test "x$COMM" = x; then
6472             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6473           fi
6474         else
6475           # Otherwise we believe it is a complete path. Use it as it is.
6476           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6477 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6478           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6479 $as_echo_n "checking for COMM... " >&6; }
6480           if test ! -x "$tool_specified"; then
6481             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6482 $as_echo "not found" >&6; }
6483             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6484           fi
6485           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6486 $as_echo "$tool_specified" >&6; }
6487         fi
6488       fi
6489     fi
6490 
6491   fi
6492 
6493 
6494 
6495   if test "x$COMM" = x; then
6496     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6497   fi
6498 
6499 
6500 
6501 
6502 
6503   # Publish this variable in the help.
6504 
6505 
6506   if [ -z "${CP+x}" ]; then
6507     # The variable is not set by user, try to locate tool using the code snippet
6508     for ac_prog in cp
6509 do
6510   # Extract the first word of "$ac_prog", so it can be a program name with args.
6511 set dummy $ac_prog; ac_word=$2
6512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6513 $as_echo_n "checking for $ac_word... " >&6; }
6514 if ${ac_cv_path_CP+:} false; then :
6515   $as_echo_n "(cached) " >&6
6516 else
6517   case $CP in
6518   [\\/]* | ?:[\\/]*)
6519   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6520   ;;
6521   *)
6522   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6523 for as_dir in $PATH
6524 do
6525   IFS=$as_save_IFS
6526   test -z "$as_dir" && as_dir=.
6527     for ac_exec_ext in '' $ac_executable_extensions; do
6528   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6529     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6531     break 2
6532   fi
6533 done
6534   done
6535 IFS=$as_save_IFS
6536 
6537   ;;
6538 esac
6539 fi
6540 CP=$ac_cv_path_CP
6541 if test -n "$CP"; then
6542   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6543 $as_echo "$CP" >&6; }
6544 else
6545   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6546 $as_echo "no" >&6; }
6547 fi
6548 
6549 
6550   test -n "$CP" && break
6551 done
6552 
6553   else
6554     # The variable is set, but is it from the command line or the environment?
6555 
6556     # Try to remove the string !CP! from our list.
6557     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6558     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6559       # If it failed, the variable was not from the command line. Ignore it,
6560       # but warn the user (except for BASH, which is always set by the calling BASH).
6561       if test "xCP" != xBASH; then
6562         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6563 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6564       fi
6565       # Try to locate tool using the code snippet
6566       for ac_prog in cp
6567 do
6568   # Extract the first word of "$ac_prog", so it can be a program name with args.
6569 set dummy $ac_prog; ac_word=$2
6570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6571 $as_echo_n "checking for $ac_word... " >&6; }
6572 if ${ac_cv_path_CP+:} false; then :
6573   $as_echo_n "(cached) " >&6
6574 else
6575   case $CP in
6576   [\\/]* | ?:[\\/]*)
6577   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6578   ;;
6579   *)
6580   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6581 for as_dir in $PATH
6582 do
6583   IFS=$as_save_IFS
6584   test -z "$as_dir" && as_dir=.
6585     for ac_exec_ext in '' $ac_executable_extensions; do
6586   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6587     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6588     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6589     break 2
6590   fi
6591 done
6592   done
6593 IFS=$as_save_IFS
6594 
6595   ;;
6596 esac
6597 fi
6598 CP=$ac_cv_path_CP
6599 if test -n "$CP"; then
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6601 $as_echo "$CP" >&6; }
6602 else
6603   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6604 $as_echo "no" >&6; }
6605 fi
6606 
6607 
6608   test -n "$CP" && break
6609 done
6610 
6611     else
6612       # If it succeeded, then it was overridden by the user. We will use it
6613       # for the tool.
6614 
6615       # First remove it from the list of overridden variables, so we can test
6616       # for unknown variables in the end.
6617       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6618 
6619       # Check if we try to supply an empty value
6620       if test "x$CP" = x; then
6621         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6622 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6623         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6624 $as_echo_n "checking for CP... " >&6; }
6625         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6626 $as_echo "disabled" >&6; }
6627       else
6628         # Check if the provided tool contains a complete path.
6629         tool_specified="$CP"
6630         tool_basename="${tool_specified##*/}"
6631         if test "x$tool_basename" = "x$tool_specified"; then
6632           # A command without a complete path is provided, search $PATH.
6633           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6634 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6635           # Extract the first word of "$tool_basename", so it can be a program name with args.
6636 set dummy $tool_basename; ac_word=$2
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6638 $as_echo_n "checking for $ac_word... " >&6; }
6639 if ${ac_cv_path_CP+:} false; then :
6640   $as_echo_n "(cached) " >&6
6641 else
6642   case $CP in
6643   [\\/]* | ?:[\\/]*)
6644   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6645   ;;
6646   *)
6647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6648 for as_dir in $PATH
6649 do
6650   IFS=$as_save_IFS
6651   test -z "$as_dir" && as_dir=.
6652     for ac_exec_ext in '' $ac_executable_extensions; do
6653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6654     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6656     break 2
6657   fi
6658 done
6659   done
6660 IFS=$as_save_IFS
6661 
6662   ;;
6663 esac
6664 fi
6665 CP=$ac_cv_path_CP
6666 if test -n "$CP"; then
6667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6668 $as_echo "$CP" >&6; }
6669 else
6670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6671 $as_echo "no" >&6; }
6672 fi
6673 
6674 
6675           if test "x$CP" = x; then
6676             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6677           fi
6678         else
6679           # Otherwise we believe it is a complete path. Use it as it is.
6680           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6681 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6682           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6683 $as_echo_n "checking for CP... " >&6; }
6684           if test ! -x "$tool_specified"; then
6685             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6686 $as_echo "not found" >&6; }
6687             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6688           fi
6689           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6690 $as_echo "$tool_specified" >&6; }
6691         fi
6692       fi
6693     fi
6694 
6695   fi
6696 
6697 
6698 
6699   if test "x$CP" = x; then
6700     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6701   fi
6702 
6703 
6704 
6705 
6706 
6707   # Publish this variable in the help.
6708 
6709 
6710   if [ -z "${CUT+x}" ]; then
6711     # The variable is not set by user, try to locate tool using the code snippet
6712     for ac_prog in cut
6713 do
6714   # Extract the first word of "$ac_prog", so it can be a program name with args.
6715 set dummy $ac_prog; ac_word=$2
6716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6717 $as_echo_n "checking for $ac_word... " >&6; }
6718 if ${ac_cv_path_CUT+:} false; then :
6719   $as_echo_n "(cached) " >&6
6720 else
6721   case $CUT in
6722   [\\/]* | ?:[\\/]*)
6723   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6724   ;;
6725   *)
6726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6727 for as_dir in $PATH
6728 do
6729   IFS=$as_save_IFS
6730   test -z "$as_dir" && as_dir=.
6731     for ac_exec_ext in '' $ac_executable_extensions; do
6732   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6733     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6734     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6735     break 2
6736   fi
6737 done
6738   done
6739 IFS=$as_save_IFS
6740 
6741   ;;
6742 esac
6743 fi
6744 CUT=$ac_cv_path_CUT
6745 if test -n "$CUT"; then
6746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6747 $as_echo "$CUT" >&6; }
6748 else
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6750 $as_echo "no" >&6; }
6751 fi
6752 
6753 
6754   test -n "$CUT" && break
6755 done
6756 
6757   else
6758     # The variable is set, but is it from the command line or the environment?
6759 
6760     # Try to remove the string !CUT! from our list.
6761     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6762     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6763       # If it failed, the variable was not from the command line. Ignore it,
6764       # but warn the user (except for BASH, which is always set by the calling BASH).
6765       if test "xCUT" != xBASH; then
6766         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6767 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6768       fi
6769       # Try to locate tool using the code snippet
6770       for ac_prog in cut
6771 do
6772   # Extract the first word of "$ac_prog", so it can be a program name with args.
6773 set dummy $ac_prog; ac_word=$2
6774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6775 $as_echo_n "checking for $ac_word... " >&6; }
6776 if ${ac_cv_path_CUT+:} false; then :
6777   $as_echo_n "(cached) " >&6
6778 else
6779   case $CUT in
6780   [\\/]* | ?:[\\/]*)
6781   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6782   ;;
6783   *)
6784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6785 for as_dir in $PATH
6786 do
6787   IFS=$as_save_IFS
6788   test -z "$as_dir" && as_dir=.
6789     for ac_exec_ext in '' $ac_executable_extensions; do
6790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6791     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6793     break 2
6794   fi
6795 done
6796   done
6797 IFS=$as_save_IFS
6798 
6799   ;;
6800 esac
6801 fi
6802 CUT=$ac_cv_path_CUT
6803 if test -n "$CUT"; then
6804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6805 $as_echo "$CUT" >&6; }
6806 else
6807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6808 $as_echo "no" >&6; }
6809 fi
6810 
6811 
6812   test -n "$CUT" && break
6813 done
6814 
6815     else
6816       # If it succeeded, then it was overridden by the user. We will use it
6817       # for the tool.
6818 
6819       # First remove it from the list of overridden variables, so we can test
6820       # for unknown variables in the end.
6821       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6822 
6823       # Check if we try to supply an empty value
6824       if test "x$CUT" = x; then
6825         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6826 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6827         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6828 $as_echo_n "checking for CUT... " >&6; }
6829         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6830 $as_echo "disabled" >&6; }
6831       else
6832         # Check if the provided tool contains a complete path.
6833         tool_specified="$CUT"
6834         tool_basename="${tool_specified##*/}"
6835         if test "x$tool_basename" = "x$tool_specified"; then
6836           # A command without a complete path is provided, search $PATH.
6837           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6838 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6839           # Extract the first word of "$tool_basename", so it can be a program name with args.
6840 set dummy $tool_basename; ac_word=$2
6841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6842 $as_echo_n "checking for $ac_word... " >&6; }
6843 if ${ac_cv_path_CUT+:} false; then :
6844   $as_echo_n "(cached) " >&6
6845 else
6846   case $CUT in
6847   [\\/]* | ?:[\\/]*)
6848   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6849   ;;
6850   *)
6851   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6852 for as_dir in $PATH
6853 do
6854   IFS=$as_save_IFS
6855   test -z "$as_dir" && as_dir=.
6856     for ac_exec_ext in '' $ac_executable_extensions; do
6857   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6858     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6859     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6860     break 2
6861   fi
6862 done
6863   done
6864 IFS=$as_save_IFS
6865 
6866   ;;
6867 esac
6868 fi
6869 CUT=$ac_cv_path_CUT
6870 if test -n "$CUT"; then
6871   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6872 $as_echo "$CUT" >&6; }
6873 else
6874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6875 $as_echo "no" >&6; }
6876 fi
6877 
6878 
6879           if test "x$CUT" = x; then
6880             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6881           fi
6882         else
6883           # Otherwise we believe it is a complete path. Use it as it is.
6884           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6885 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6886           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6887 $as_echo_n "checking for CUT... " >&6; }
6888           if test ! -x "$tool_specified"; then
6889             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6890 $as_echo "not found" >&6; }
6891             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6892           fi
6893           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6894 $as_echo "$tool_specified" >&6; }
6895         fi
6896       fi
6897     fi
6898 
6899   fi
6900 
6901 
6902 
6903   if test "x$CUT" = x; then
6904     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6905   fi
6906 
6907 
6908 
6909 
6910 
6911   # Publish this variable in the help.
6912 
6913 
6914   if [ -z "${DATE+x}" ]; then
6915     # The variable is not set by user, try to locate tool using the code snippet
6916     for ac_prog in date
6917 do
6918   # Extract the first word of "$ac_prog", so it can be a program name with args.
6919 set dummy $ac_prog; ac_word=$2
6920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6921 $as_echo_n "checking for $ac_word... " >&6; }
6922 if ${ac_cv_path_DATE+:} false; then :
6923   $as_echo_n "(cached) " >&6
6924 else
6925   case $DATE in
6926   [\\/]* | ?:[\\/]*)
6927   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6928   ;;
6929   *)
6930   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6931 for as_dir in $PATH
6932 do
6933   IFS=$as_save_IFS
6934   test -z "$as_dir" && as_dir=.
6935     for ac_exec_ext in '' $ac_executable_extensions; do
6936   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6937     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6938     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6939     break 2
6940   fi
6941 done
6942   done
6943 IFS=$as_save_IFS
6944 
6945   ;;
6946 esac
6947 fi
6948 DATE=$ac_cv_path_DATE
6949 if test -n "$DATE"; then
6950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6951 $as_echo "$DATE" >&6; }
6952 else
6953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6954 $as_echo "no" >&6; }
6955 fi
6956 
6957 
6958   test -n "$DATE" && break
6959 done
6960 
6961   else
6962     # The variable is set, but is it from the command line or the environment?
6963 
6964     # Try to remove the string !DATE! from our list.
6965     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6966     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6967       # If it failed, the variable was not from the command line. Ignore it,
6968       # but warn the user (except for BASH, which is always set by the calling BASH).
6969       if test "xDATE" != xBASH; then
6970         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6971 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6972       fi
6973       # Try to locate tool using the code snippet
6974       for ac_prog in date
6975 do
6976   # Extract the first word of "$ac_prog", so it can be a program name with args.
6977 set dummy $ac_prog; ac_word=$2
6978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6979 $as_echo_n "checking for $ac_word... " >&6; }
6980 if ${ac_cv_path_DATE+:} false; then :
6981   $as_echo_n "(cached) " >&6
6982 else
6983   case $DATE in
6984   [\\/]* | ?:[\\/]*)
6985   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6986   ;;
6987   *)
6988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6989 for as_dir in $PATH
6990 do
6991   IFS=$as_save_IFS
6992   test -z "$as_dir" && as_dir=.
6993     for ac_exec_ext in '' $ac_executable_extensions; do
6994   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6995     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6997     break 2
6998   fi
6999 done
7000   done
7001 IFS=$as_save_IFS
7002 
7003   ;;
7004 esac
7005 fi
7006 DATE=$ac_cv_path_DATE
7007 if test -n "$DATE"; then
7008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7009 $as_echo "$DATE" >&6; }
7010 else
7011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7012 $as_echo "no" >&6; }
7013 fi
7014 
7015 
7016   test -n "$DATE" && break
7017 done
7018 
7019     else
7020       # If it succeeded, then it was overridden by the user. We will use it
7021       # for the tool.
7022 
7023       # First remove it from the list of overridden variables, so we can test
7024       # for unknown variables in the end.
7025       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7026 
7027       # Check if we try to supply an empty value
7028       if test "x$DATE" = x; then
7029         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
7030 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
7031         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7032 $as_echo_n "checking for DATE... " >&6; }
7033         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7034 $as_echo "disabled" >&6; }
7035       else
7036         # Check if the provided tool contains a complete path.
7037         tool_specified="$DATE"
7038         tool_basename="${tool_specified##*/}"
7039         if test "x$tool_basename" = "x$tool_specified"; then
7040           # A command without a complete path is provided, search $PATH.
7041           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7042 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7043           # Extract the first word of "$tool_basename", so it can be a program name with args.
7044 set dummy $tool_basename; ac_word=$2
7045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7046 $as_echo_n "checking for $ac_word... " >&6; }
7047 if ${ac_cv_path_DATE+:} false; then :
7048   $as_echo_n "(cached) " >&6
7049 else
7050   case $DATE in
7051   [\\/]* | ?:[\\/]*)
7052   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7053   ;;
7054   *)
7055   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7056 for as_dir in $PATH
7057 do
7058   IFS=$as_save_IFS
7059   test -z "$as_dir" && as_dir=.
7060     for ac_exec_ext in '' $ac_executable_extensions; do
7061   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7062     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7063     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7064     break 2
7065   fi
7066 done
7067   done
7068 IFS=$as_save_IFS
7069 
7070   ;;
7071 esac
7072 fi
7073 DATE=$ac_cv_path_DATE
7074 if test -n "$DATE"; then
7075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7076 $as_echo "$DATE" >&6; }
7077 else
7078   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7079 $as_echo "no" >&6; }
7080 fi
7081 
7082 
7083           if test "x$DATE" = x; then
7084             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7085           fi
7086         else
7087           # Otherwise we believe it is a complete path. Use it as it is.
7088           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7089 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7090           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7091 $as_echo_n "checking for DATE... " >&6; }
7092           if test ! -x "$tool_specified"; then
7093             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7094 $as_echo "not found" >&6; }
7095             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7096           fi
7097           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7098 $as_echo "$tool_specified" >&6; }
7099         fi
7100       fi
7101     fi
7102 
7103   fi
7104 
7105 
7106 
7107   if test "x$DATE" = x; then
7108     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7109   fi
7110 
7111 
7112 
7113 
7114 
7115   # Publish this variable in the help.
7116 
7117 
7118   if [ -z "${DIFF+x}" ]; then
7119     # The variable is not set by user, try to locate tool using the code snippet
7120     for ac_prog in gdiff diff
7121 do
7122   # Extract the first word of "$ac_prog", so it can be a program name with args.
7123 set dummy $ac_prog; ac_word=$2
7124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7125 $as_echo_n "checking for $ac_word... " >&6; }
7126 if ${ac_cv_path_DIFF+:} false; then :
7127   $as_echo_n "(cached) " >&6
7128 else
7129   case $DIFF in
7130   [\\/]* | ?:[\\/]*)
7131   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7132   ;;
7133   *)
7134   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7135 for as_dir in $PATH
7136 do
7137   IFS=$as_save_IFS
7138   test -z "$as_dir" && as_dir=.
7139     for ac_exec_ext in '' $ac_executable_extensions; do
7140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7141     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7143     break 2
7144   fi
7145 done
7146   done
7147 IFS=$as_save_IFS
7148 
7149   ;;
7150 esac
7151 fi
7152 DIFF=$ac_cv_path_DIFF
7153 if test -n "$DIFF"; then
7154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7155 $as_echo "$DIFF" >&6; }
7156 else
7157   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7158 $as_echo "no" >&6; }
7159 fi
7160 
7161 
7162   test -n "$DIFF" && break
7163 done
7164 
7165   else
7166     # The variable is set, but is it from the command line or the environment?
7167 
7168     # Try to remove the string !DIFF! from our list.
7169     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7170     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7171       # If it failed, the variable was not from the command line. Ignore it,
7172       # but warn the user (except for BASH, which is always set by the calling BASH).
7173       if test "xDIFF" != xBASH; then
7174         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7175 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7176       fi
7177       # Try to locate tool using the code snippet
7178       for ac_prog in gdiff diff
7179 do
7180   # Extract the first word of "$ac_prog", so it can be a program name with args.
7181 set dummy $ac_prog; ac_word=$2
7182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7183 $as_echo_n "checking for $ac_word... " >&6; }
7184 if ${ac_cv_path_DIFF+:} false; then :
7185   $as_echo_n "(cached) " >&6
7186 else
7187   case $DIFF in
7188   [\\/]* | ?:[\\/]*)
7189   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7190   ;;
7191   *)
7192   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7193 for as_dir in $PATH
7194 do
7195   IFS=$as_save_IFS
7196   test -z "$as_dir" && as_dir=.
7197     for ac_exec_ext in '' $ac_executable_extensions; do
7198   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7199     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7200     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7201     break 2
7202   fi
7203 done
7204   done
7205 IFS=$as_save_IFS
7206 
7207   ;;
7208 esac
7209 fi
7210 DIFF=$ac_cv_path_DIFF
7211 if test -n "$DIFF"; then
7212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7213 $as_echo "$DIFF" >&6; }
7214 else
7215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7216 $as_echo "no" >&6; }
7217 fi
7218 
7219 
7220   test -n "$DIFF" && break
7221 done
7222 
7223     else
7224       # If it succeeded, then it was overridden by the user. We will use it
7225       # for the tool.
7226 
7227       # First remove it from the list of overridden variables, so we can test
7228       # for unknown variables in the end.
7229       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7230 
7231       # Check if we try to supply an empty value
7232       if test "x$DIFF" = x; then
7233         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7234 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7235         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7236 $as_echo_n "checking for DIFF... " >&6; }
7237         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7238 $as_echo "disabled" >&6; }
7239       else
7240         # Check if the provided tool contains a complete path.
7241         tool_specified="$DIFF"
7242         tool_basename="${tool_specified##*/}"
7243         if test "x$tool_basename" = "x$tool_specified"; then
7244           # A command without a complete path is provided, search $PATH.
7245           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7246 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7247           # Extract the first word of "$tool_basename", so it can be a program name with args.
7248 set dummy $tool_basename; ac_word=$2
7249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7250 $as_echo_n "checking for $ac_word... " >&6; }
7251 if ${ac_cv_path_DIFF+:} false; then :
7252   $as_echo_n "(cached) " >&6
7253 else
7254   case $DIFF in
7255   [\\/]* | ?:[\\/]*)
7256   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7257   ;;
7258   *)
7259   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7260 for as_dir in $PATH
7261 do
7262   IFS=$as_save_IFS
7263   test -z "$as_dir" && as_dir=.
7264     for ac_exec_ext in '' $ac_executable_extensions; do
7265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7266     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7268     break 2
7269   fi
7270 done
7271   done
7272 IFS=$as_save_IFS
7273 
7274   ;;
7275 esac
7276 fi
7277 DIFF=$ac_cv_path_DIFF
7278 if test -n "$DIFF"; then
7279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7280 $as_echo "$DIFF" >&6; }
7281 else
7282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7283 $as_echo "no" >&6; }
7284 fi
7285 
7286 
7287           if test "x$DIFF" = x; then
7288             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7289           fi
7290         else
7291           # Otherwise we believe it is a complete path. Use it as it is.
7292           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7293 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7294           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7295 $as_echo_n "checking for DIFF... " >&6; }
7296           if test ! -x "$tool_specified"; then
7297             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7298 $as_echo "not found" >&6; }
7299             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7300           fi
7301           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7302 $as_echo "$tool_specified" >&6; }
7303         fi
7304       fi
7305     fi
7306 
7307   fi
7308 
7309 
7310 
7311   if test "x$DIFF" = x; then
7312     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7313   fi
7314 
7315 
7316 
7317 
7318 
7319   # Publish this variable in the help.
7320 
7321 
7322   if [ -z "${DIRNAME+x}" ]; then
7323     # The variable is not set by user, try to locate tool using the code snippet
7324     for ac_prog in dirname
7325 do
7326   # Extract the first word of "$ac_prog", so it can be a program name with args.
7327 set dummy $ac_prog; ac_word=$2
7328 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7329 $as_echo_n "checking for $ac_word... " >&6; }
7330 if ${ac_cv_path_DIRNAME+:} false; then :
7331   $as_echo_n "(cached) " >&6
7332 else
7333   case $DIRNAME in
7334   [\\/]* | ?:[\\/]*)
7335   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7336   ;;
7337   *)
7338   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7339 for as_dir in $PATH
7340 do
7341   IFS=$as_save_IFS
7342   test -z "$as_dir" && as_dir=.
7343     for ac_exec_ext in '' $ac_executable_extensions; do
7344   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7345     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7346     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7347     break 2
7348   fi
7349 done
7350   done
7351 IFS=$as_save_IFS
7352 
7353   ;;
7354 esac
7355 fi
7356 DIRNAME=$ac_cv_path_DIRNAME
7357 if test -n "$DIRNAME"; then
7358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7359 $as_echo "$DIRNAME" >&6; }
7360 else
7361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7362 $as_echo "no" >&6; }
7363 fi
7364 
7365 
7366   test -n "$DIRNAME" && break
7367 done
7368 
7369   else
7370     # The variable is set, but is it from the command line or the environment?
7371 
7372     # Try to remove the string !DIRNAME! from our list.
7373     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7374     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7375       # If it failed, the variable was not from the command line. Ignore it,
7376       # but warn the user (except for BASH, which is always set by the calling BASH).
7377       if test "xDIRNAME" != xBASH; then
7378         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7379 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7380       fi
7381       # Try to locate tool using the code snippet
7382       for ac_prog in dirname
7383 do
7384   # Extract the first word of "$ac_prog", so it can be a program name with args.
7385 set dummy $ac_prog; ac_word=$2
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387 $as_echo_n "checking for $ac_word... " >&6; }
7388 if ${ac_cv_path_DIRNAME+:} false; then :
7389   $as_echo_n "(cached) " >&6
7390 else
7391   case $DIRNAME in
7392   [\\/]* | ?:[\\/]*)
7393   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7394   ;;
7395   *)
7396   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7397 for as_dir in $PATH
7398 do
7399   IFS=$as_save_IFS
7400   test -z "$as_dir" && as_dir=.
7401     for ac_exec_ext in '' $ac_executable_extensions; do
7402   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7403     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7404     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7405     break 2
7406   fi
7407 done
7408   done
7409 IFS=$as_save_IFS
7410 
7411   ;;
7412 esac
7413 fi
7414 DIRNAME=$ac_cv_path_DIRNAME
7415 if test -n "$DIRNAME"; then
7416   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7417 $as_echo "$DIRNAME" >&6; }
7418 else
7419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7420 $as_echo "no" >&6; }
7421 fi
7422 
7423 
7424   test -n "$DIRNAME" && break
7425 done
7426 
7427     else
7428       # If it succeeded, then it was overridden by the user. We will use it
7429       # for the tool.
7430 
7431       # First remove it from the list of overridden variables, so we can test
7432       # for unknown variables in the end.
7433       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7434 
7435       # Check if we try to supply an empty value
7436       if test "x$DIRNAME" = x; then
7437         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7438 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7440 $as_echo_n "checking for DIRNAME... " >&6; }
7441         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7442 $as_echo "disabled" >&6; }
7443       else
7444         # Check if the provided tool contains a complete path.
7445         tool_specified="$DIRNAME"
7446         tool_basename="${tool_specified##*/}"
7447         if test "x$tool_basename" = "x$tool_specified"; then
7448           # A command without a complete path is provided, search $PATH.
7449           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7450 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7451           # Extract the first word of "$tool_basename", so it can be a program name with args.
7452 set dummy $tool_basename; ac_word=$2
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7454 $as_echo_n "checking for $ac_word... " >&6; }
7455 if ${ac_cv_path_DIRNAME+:} false; then :
7456   $as_echo_n "(cached) " >&6
7457 else
7458   case $DIRNAME in
7459   [\\/]* | ?:[\\/]*)
7460   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7461   ;;
7462   *)
7463   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7464 for as_dir in $PATH
7465 do
7466   IFS=$as_save_IFS
7467   test -z "$as_dir" && as_dir=.
7468     for ac_exec_ext in '' $ac_executable_extensions; do
7469   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7470     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7471     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7472     break 2
7473   fi
7474 done
7475   done
7476 IFS=$as_save_IFS
7477 
7478   ;;
7479 esac
7480 fi
7481 DIRNAME=$ac_cv_path_DIRNAME
7482 if test -n "$DIRNAME"; then
7483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7484 $as_echo "$DIRNAME" >&6; }
7485 else
7486   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7487 $as_echo "no" >&6; }
7488 fi
7489 
7490 
7491           if test "x$DIRNAME" = x; then
7492             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7493           fi
7494         else
7495           # Otherwise we believe it is a complete path. Use it as it is.
7496           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7497 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7498           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7499 $as_echo_n "checking for DIRNAME... " >&6; }
7500           if test ! -x "$tool_specified"; then
7501             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7502 $as_echo "not found" >&6; }
7503             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7504           fi
7505           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7506 $as_echo "$tool_specified" >&6; }
7507         fi
7508       fi
7509     fi
7510 
7511   fi
7512 
7513 
7514 
7515   if test "x$DIRNAME" = x; then
7516     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7517   fi
7518 
7519 
7520 
7521 
7522 
7523   # Publish this variable in the help.
7524 
7525 
7526   if [ -z "${ECHO+x}" ]; then
7527     # The variable is not set by user, try to locate tool using the code snippet
7528     for ac_prog in echo
7529 do
7530   # Extract the first word of "$ac_prog", so it can be a program name with args.
7531 set dummy $ac_prog; ac_word=$2
7532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7533 $as_echo_n "checking for $ac_word... " >&6; }
7534 if ${ac_cv_path_ECHO+:} false; then :
7535   $as_echo_n "(cached) " >&6
7536 else
7537   case $ECHO in
7538   [\\/]* | ?:[\\/]*)
7539   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7540   ;;
7541   *)
7542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7543 for as_dir in $PATH
7544 do
7545   IFS=$as_save_IFS
7546   test -z "$as_dir" && as_dir=.
7547     for ac_exec_ext in '' $ac_executable_extensions; do
7548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7549     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7551     break 2
7552   fi
7553 done
7554   done
7555 IFS=$as_save_IFS
7556 
7557   ;;
7558 esac
7559 fi
7560 ECHO=$ac_cv_path_ECHO
7561 if test -n "$ECHO"; then
7562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7563 $as_echo "$ECHO" >&6; }
7564 else
7565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7566 $as_echo "no" >&6; }
7567 fi
7568 
7569 
7570   test -n "$ECHO" && break
7571 done
7572 
7573   else
7574     # The variable is set, but is it from the command line or the environment?
7575 
7576     # Try to remove the string !ECHO! from our list.
7577     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7578     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7579       # If it failed, the variable was not from the command line. Ignore it,
7580       # but warn the user (except for BASH, which is always set by the calling BASH).
7581       if test "xECHO" != xBASH; then
7582         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7583 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7584       fi
7585       # Try to locate tool using the code snippet
7586       for ac_prog in echo
7587 do
7588   # Extract the first word of "$ac_prog", so it can be a program name with args.
7589 set dummy $ac_prog; ac_word=$2
7590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7591 $as_echo_n "checking for $ac_word... " >&6; }
7592 if ${ac_cv_path_ECHO+:} false; then :
7593   $as_echo_n "(cached) " >&6
7594 else
7595   case $ECHO in
7596   [\\/]* | ?:[\\/]*)
7597   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7598   ;;
7599   *)
7600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7601 for as_dir in $PATH
7602 do
7603   IFS=$as_save_IFS
7604   test -z "$as_dir" && as_dir=.
7605     for ac_exec_ext in '' $ac_executable_extensions; do
7606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7607     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7609     break 2
7610   fi
7611 done
7612   done
7613 IFS=$as_save_IFS
7614 
7615   ;;
7616 esac
7617 fi
7618 ECHO=$ac_cv_path_ECHO
7619 if test -n "$ECHO"; then
7620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7621 $as_echo "$ECHO" >&6; }
7622 else
7623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7624 $as_echo "no" >&6; }
7625 fi
7626 
7627 
7628   test -n "$ECHO" && break
7629 done
7630 
7631     else
7632       # If it succeeded, then it was overridden by the user. We will use it
7633       # for the tool.
7634 
7635       # First remove it from the list of overridden variables, so we can test
7636       # for unknown variables in the end.
7637       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7638 
7639       # Check if we try to supply an empty value
7640       if test "x$ECHO" = x; then
7641         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7642 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7643         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7644 $as_echo_n "checking for ECHO... " >&6; }
7645         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7646 $as_echo "disabled" >&6; }
7647       else
7648         # Check if the provided tool contains a complete path.
7649         tool_specified="$ECHO"
7650         tool_basename="${tool_specified##*/}"
7651         if test "x$tool_basename" = "x$tool_specified"; then
7652           # A command without a complete path is provided, search $PATH.
7653           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7654 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7655           # Extract the first word of "$tool_basename", so it can be a program name with args.
7656 set dummy $tool_basename; ac_word=$2
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7658 $as_echo_n "checking for $ac_word... " >&6; }
7659 if ${ac_cv_path_ECHO+:} false; then :
7660   $as_echo_n "(cached) " >&6
7661 else
7662   case $ECHO in
7663   [\\/]* | ?:[\\/]*)
7664   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7665   ;;
7666   *)
7667   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7668 for as_dir in $PATH
7669 do
7670   IFS=$as_save_IFS
7671   test -z "$as_dir" && as_dir=.
7672     for ac_exec_ext in '' $ac_executable_extensions; do
7673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7674     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7676     break 2
7677   fi
7678 done
7679   done
7680 IFS=$as_save_IFS
7681 
7682   ;;
7683 esac
7684 fi
7685 ECHO=$ac_cv_path_ECHO
7686 if test -n "$ECHO"; then
7687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7688 $as_echo "$ECHO" >&6; }
7689 else
7690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7691 $as_echo "no" >&6; }
7692 fi
7693 
7694 
7695           if test "x$ECHO" = x; then
7696             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7697           fi
7698         else
7699           # Otherwise we believe it is a complete path. Use it as it is.
7700           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7701 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7702           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7703 $as_echo_n "checking for ECHO... " >&6; }
7704           if test ! -x "$tool_specified"; then
7705             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7706 $as_echo "not found" >&6; }
7707             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7708           fi
7709           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7710 $as_echo "$tool_specified" >&6; }
7711         fi
7712       fi
7713     fi
7714 
7715   fi
7716 
7717 
7718 
7719   if test "x$ECHO" = x; then
7720     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7721   fi
7722 
7723 
7724 
7725 
7726 
7727   # Publish this variable in the help.
7728 
7729 
7730   if [ -z "${EXPR+x}" ]; then
7731     # The variable is not set by user, try to locate tool using the code snippet
7732     for ac_prog in expr
7733 do
7734   # Extract the first word of "$ac_prog", so it can be a program name with args.
7735 set dummy $ac_prog; ac_word=$2
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7737 $as_echo_n "checking for $ac_word... " >&6; }
7738 if ${ac_cv_path_EXPR+:} false; then :
7739   $as_echo_n "(cached) " >&6
7740 else
7741   case $EXPR in
7742   [\\/]* | ?:[\\/]*)
7743   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7744   ;;
7745   *)
7746   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7747 for as_dir in $PATH
7748 do
7749   IFS=$as_save_IFS
7750   test -z "$as_dir" && as_dir=.
7751     for ac_exec_ext in '' $ac_executable_extensions; do
7752   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7753     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7754     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7755     break 2
7756   fi
7757 done
7758   done
7759 IFS=$as_save_IFS
7760 
7761   ;;
7762 esac
7763 fi
7764 EXPR=$ac_cv_path_EXPR
7765 if test -n "$EXPR"; then
7766   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7767 $as_echo "$EXPR" >&6; }
7768 else
7769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7770 $as_echo "no" >&6; }
7771 fi
7772 
7773 
7774   test -n "$EXPR" && break
7775 done
7776 
7777   else
7778     # The variable is set, but is it from the command line or the environment?
7779 
7780     # Try to remove the string !EXPR! from our list.
7781     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7782     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7783       # If it failed, the variable was not from the command line. Ignore it,
7784       # but warn the user (except for BASH, which is always set by the calling BASH).
7785       if test "xEXPR" != xBASH; then
7786         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7787 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7788       fi
7789       # Try to locate tool using the code snippet
7790       for ac_prog in expr
7791 do
7792   # Extract the first word of "$ac_prog", so it can be a program name with args.
7793 set dummy $ac_prog; ac_word=$2
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7795 $as_echo_n "checking for $ac_word... " >&6; }
7796 if ${ac_cv_path_EXPR+:} false; then :
7797   $as_echo_n "(cached) " >&6
7798 else
7799   case $EXPR in
7800   [\\/]* | ?:[\\/]*)
7801   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7802   ;;
7803   *)
7804   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7805 for as_dir in $PATH
7806 do
7807   IFS=$as_save_IFS
7808   test -z "$as_dir" && as_dir=.
7809     for ac_exec_ext in '' $ac_executable_extensions; do
7810   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7811     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7812     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7813     break 2
7814   fi
7815 done
7816   done
7817 IFS=$as_save_IFS
7818 
7819   ;;
7820 esac
7821 fi
7822 EXPR=$ac_cv_path_EXPR
7823 if test -n "$EXPR"; then
7824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7825 $as_echo "$EXPR" >&6; }
7826 else
7827   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7828 $as_echo "no" >&6; }
7829 fi
7830 
7831 
7832   test -n "$EXPR" && break
7833 done
7834 
7835     else
7836       # If it succeeded, then it was overridden by the user. We will use it
7837       # for the tool.
7838 
7839       # First remove it from the list of overridden variables, so we can test
7840       # for unknown variables in the end.
7841       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7842 
7843       # Check if we try to supply an empty value
7844       if test "x$EXPR" = x; then
7845         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7846 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7847         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7848 $as_echo_n "checking for EXPR... " >&6; }
7849         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7850 $as_echo "disabled" >&6; }
7851       else
7852         # Check if the provided tool contains a complete path.
7853         tool_specified="$EXPR"
7854         tool_basename="${tool_specified##*/}"
7855         if test "x$tool_basename" = "x$tool_specified"; then
7856           # A command without a complete path is provided, search $PATH.
7857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7858 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7859           # Extract the first word of "$tool_basename", so it can be a program name with args.
7860 set dummy $tool_basename; ac_word=$2
7861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7862 $as_echo_n "checking for $ac_word... " >&6; }
7863 if ${ac_cv_path_EXPR+:} false; then :
7864   $as_echo_n "(cached) " >&6
7865 else
7866   case $EXPR in
7867   [\\/]* | ?:[\\/]*)
7868   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7869   ;;
7870   *)
7871   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7872 for as_dir in $PATH
7873 do
7874   IFS=$as_save_IFS
7875   test -z "$as_dir" && as_dir=.
7876     for ac_exec_ext in '' $ac_executable_extensions; do
7877   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7878     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7879     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7880     break 2
7881   fi
7882 done
7883   done
7884 IFS=$as_save_IFS
7885 
7886   ;;
7887 esac
7888 fi
7889 EXPR=$ac_cv_path_EXPR
7890 if test -n "$EXPR"; then
7891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7892 $as_echo "$EXPR" >&6; }
7893 else
7894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7895 $as_echo "no" >&6; }
7896 fi
7897 
7898 
7899           if test "x$EXPR" = x; then
7900             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7901           fi
7902         else
7903           # Otherwise we believe it is a complete path. Use it as it is.
7904           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7905 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7906           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7907 $as_echo_n "checking for EXPR... " >&6; }
7908           if test ! -x "$tool_specified"; then
7909             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7910 $as_echo "not found" >&6; }
7911             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7912           fi
7913           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7914 $as_echo "$tool_specified" >&6; }
7915         fi
7916       fi
7917     fi
7918 
7919   fi
7920 
7921 
7922 
7923   if test "x$EXPR" = x; then
7924     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7925   fi
7926 
7927 
7928 
7929 
7930 
7931   # Publish this variable in the help.
7932 
7933 
7934   if [ -z "${FILE+x}" ]; then
7935     # The variable is not set by user, try to locate tool using the code snippet
7936     for ac_prog in file
7937 do
7938   # Extract the first word of "$ac_prog", so it can be a program name with args.
7939 set dummy $ac_prog; ac_word=$2
7940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7941 $as_echo_n "checking for $ac_word... " >&6; }
7942 if ${ac_cv_path_FILE+:} false; then :
7943   $as_echo_n "(cached) " >&6
7944 else
7945   case $FILE in
7946   [\\/]* | ?:[\\/]*)
7947   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7948   ;;
7949   *)
7950   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7951 for as_dir in $PATH
7952 do
7953   IFS=$as_save_IFS
7954   test -z "$as_dir" && as_dir=.
7955     for ac_exec_ext in '' $ac_executable_extensions; do
7956   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7957     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7958     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7959     break 2
7960   fi
7961 done
7962   done
7963 IFS=$as_save_IFS
7964 
7965   ;;
7966 esac
7967 fi
7968 FILE=$ac_cv_path_FILE
7969 if test -n "$FILE"; then
7970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7971 $as_echo "$FILE" >&6; }
7972 else
7973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7974 $as_echo "no" >&6; }
7975 fi
7976 
7977 
7978   test -n "$FILE" && break
7979 done
7980 
7981   else
7982     # The variable is set, but is it from the command line or the environment?
7983 
7984     # Try to remove the string !FILE! from our list.
7985     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7986     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7987       # If it failed, the variable was not from the command line. Ignore it,
7988       # but warn the user (except for BASH, which is always set by the calling BASH).
7989       if test "xFILE" != xBASH; then
7990         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7991 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7992       fi
7993       # Try to locate tool using the code snippet
7994       for ac_prog in file
7995 do
7996   # Extract the first word of "$ac_prog", so it can be a program name with args.
7997 set dummy $ac_prog; ac_word=$2
7998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7999 $as_echo_n "checking for $ac_word... " >&6; }
8000 if ${ac_cv_path_FILE+:} false; then :
8001   $as_echo_n "(cached) " >&6
8002 else
8003   case $FILE in
8004   [\\/]* | ?:[\\/]*)
8005   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8006   ;;
8007   *)
8008   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8009 for as_dir in $PATH
8010 do
8011   IFS=$as_save_IFS
8012   test -z "$as_dir" && as_dir=.
8013     for ac_exec_ext in '' $ac_executable_extensions; do
8014   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8015     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8016     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8017     break 2
8018   fi
8019 done
8020   done
8021 IFS=$as_save_IFS
8022 
8023   ;;
8024 esac
8025 fi
8026 FILE=$ac_cv_path_FILE
8027 if test -n "$FILE"; then
8028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8029 $as_echo "$FILE" >&6; }
8030 else
8031   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8032 $as_echo "no" >&6; }
8033 fi
8034 
8035 
8036   test -n "$FILE" && break
8037 done
8038 
8039     else
8040       # If it succeeded, then it was overridden by the user. We will use it
8041       # for the tool.
8042 
8043       # First remove it from the list of overridden variables, so we can test
8044       # for unknown variables in the end.
8045       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8046 
8047       # Check if we try to supply an empty value
8048       if test "x$FILE" = x; then
8049         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8050 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8051         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8052 $as_echo_n "checking for FILE... " >&6; }
8053         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8054 $as_echo "disabled" >&6; }
8055       else
8056         # Check if the provided tool contains a complete path.
8057         tool_specified="$FILE"
8058         tool_basename="${tool_specified##*/}"
8059         if test "x$tool_basename" = "x$tool_specified"; then
8060           # A command without a complete path is provided, search $PATH.
8061           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8062 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8063           # Extract the first word of "$tool_basename", so it can be a program name with args.
8064 set dummy $tool_basename; ac_word=$2
8065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8066 $as_echo_n "checking for $ac_word... " >&6; }
8067 if ${ac_cv_path_FILE+:} false; then :
8068   $as_echo_n "(cached) " >&6
8069 else
8070   case $FILE in
8071   [\\/]* | ?:[\\/]*)
8072   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8073   ;;
8074   *)
8075   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8076 for as_dir in $PATH
8077 do
8078   IFS=$as_save_IFS
8079   test -z "$as_dir" && as_dir=.
8080     for ac_exec_ext in '' $ac_executable_extensions; do
8081   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8082     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8083     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8084     break 2
8085   fi
8086 done
8087   done
8088 IFS=$as_save_IFS
8089 
8090   ;;
8091 esac
8092 fi
8093 FILE=$ac_cv_path_FILE
8094 if test -n "$FILE"; then
8095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8096 $as_echo "$FILE" >&6; }
8097 else
8098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8099 $as_echo "no" >&6; }
8100 fi
8101 
8102 
8103           if test "x$FILE" = x; then
8104             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8105           fi
8106         else
8107           # Otherwise we believe it is a complete path. Use it as it is.
8108           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8109 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8110           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8111 $as_echo_n "checking for FILE... " >&6; }
8112           if test ! -x "$tool_specified"; then
8113             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8114 $as_echo "not found" >&6; }
8115             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8116           fi
8117           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8118 $as_echo "$tool_specified" >&6; }
8119         fi
8120       fi
8121     fi
8122 
8123   fi
8124 
8125 
8126 
8127   if test "x$FILE" = x; then
8128     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8129   fi
8130 
8131 
8132 
8133 
8134 
8135   # Publish this variable in the help.
8136 
8137 
8138   if [ -z "${FIND+x}" ]; then
8139     # The variable is not set by user, try to locate tool using the code snippet
8140     for ac_prog in find
8141 do
8142   # Extract the first word of "$ac_prog", so it can be a program name with args.
8143 set dummy $ac_prog; ac_word=$2
8144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8145 $as_echo_n "checking for $ac_word... " >&6; }
8146 if ${ac_cv_path_FIND+:} false; then :
8147   $as_echo_n "(cached) " >&6
8148 else
8149   case $FIND in
8150   [\\/]* | ?:[\\/]*)
8151   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8152   ;;
8153   *)
8154   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8155 for as_dir in $PATH
8156 do
8157   IFS=$as_save_IFS
8158   test -z "$as_dir" && as_dir=.
8159     for ac_exec_ext in '' $ac_executable_extensions; do
8160   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8161     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8162     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8163     break 2
8164   fi
8165 done
8166   done
8167 IFS=$as_save_IFS
8168 
8169   ;;
8170 esac
8171 fi
8172 FIND=$ac_cv_path_FIND
8173 if test -n "$FIND"; then
8174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8175 $as_echo "$FIND" >&6; }
8176 else
8177   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8178 $as_echo "no" >&6; }
8179 fi
8180 
8181 
8182   test -n "$FIND" && break
8183 done
8184 
8185   else
8186     # The variable is set, but is it from the command line or the environment?
8187 
8188     # Try to remove the string !FIND! from our list.
8189     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8190     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8191       # If it failed, the variable was not from the command line. Ignore it,
8192       # but warn the user (except for BASH, which is always set by the calling BASH).
8193       if test "xFIND" != xBASH; then
8194         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8195 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8196       fi
8197       # Try to locate tool using the code snippet
8198       for ac_prog in find
8199 do
8200   # Extract the first word of "$ac_prog", so it can be a program name with args.
8201 set dummy $ac_prog; ac_word=$2
8202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8203 $as_echo_n "checking for $ac_word... " >&6; }
8204 if ${ac_cv_path_FIND+:} false; then :
8205   $as_echo_n "(cached) " >&6
8206 else
8207   case $FIND in
8208   [\\/]* | ?:[\\/]*)
8209   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8210   ;;
8211   *)
8212   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8213 for as_dir in $PATH
8214 do
8215   IFS=$as_save_IFS
8216   test -z "$as_dir" && as_dir=.
8217     for ac_exec_ext in '' $ac_executable_extensions; do
8218   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8219     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8220     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8221     break 2
8222   fi
8223 done
8224   done
8225 IFS=$as_save_IFS
8226 
8227   ;;
8228 esac
8229 fi
8230 FIND=$ac_cv_path_FIND
8231 if test -n "$FIND"; then
8232   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8233 $as_echo "$FIND" >&6; }
8234 else
8235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8236 $as_echo "no" >&6; }
8237 fi
8238 
8239 
8240   test -n "$FIND" && break
8241 done
8242 
8243     else
8244       # If it succeeded, then it was overridden by the user. We will use it
8245       # for the tool.
8246 
8247       # First remove it from the list of overridden variables, so we can test
8248       # for unknown variables in the end.
8249       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8250 
8251       # Check if we try to supply an empty value
8252       if test "x$FIND" = x; then
8253         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8254 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8256 $as_echo_n "checking for FIND... " >&6; }
8257         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8258 $as_echo "disabled" >&6; }
8259       else
8260         # Check if the provided tool contains a complete path.
8261         tool_specified="$FIND"
8262         tool_basename="${tool_specified##*/}"
8263         if test "x$tool_basename" = "x$tool_specified"; then
8264           # A command without a complete path is provided, search $PATH.
8265           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8266 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8267           # Extract the first word of "$tool_basename", so it can be a program name with args.
8268 set dummy $tool_basename; ac_word=$2
8269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270 $as_echo_n "checking for $ac_word... " >&6; }
8271 if ${ac_cv_path_FIND+:} false; then :
8272   $as_echo_n "(cached) " >&6
8273 else
8274   case $FIND in
8275   [\\/]* | ?:[\\/]*)
8276   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8277   ;;
8278   *)
8279   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280 for as_dir in $PATH
8281 do
8282   IFS=$as_save_IFS
8283   test -z "$as_dir" && as_dir=.
8284     for ac_exec_ext in '' $ac_executable_extensions; do
8285   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8286     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8287     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8288     break 2
8289   fi
8290 done
8291   done
8292 IFS=$as_save_IFS
8293 
8294   ;;
8295 esac
8296 fi
8297 FIND=$ac_cv_path_FIND
8298 if test -n "$FIND"; then
8299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8300 $as_echo "$FIND" >&6; }
8301 else
8302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303 $as_echo "no" >&6; }
8304 fi
8305 
8306 
8307           if test "x$FIND" = x; then
8308             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8309           fi
8310         else
8311           # Otherwise we believe it is a complete path. Use it as it is.
8312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8313 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8314           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8315 $as_echo_n "checking for FIND... " >&6; }
8316           if test ! -x "$tool_specified"; then
8317             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8318 $as_echo "not found" >&6; }
8319             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8320           fi
8321           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8322 $as_echo "$tool_specified" >&6; }
8323         fi
8324       fi
8325     fi
8326 
8327   fi
8328 
8329 
8330 
8331   if test "x$FIND" = x; then
8332     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8333   fi
8334 
8335 
8336 
8337 
8338 
8339   # Publish this variable in the help.
8340 
8341 
8342   if [ -z "${HEAD+x}" ]; then
8343     # The variable is not set by user, try to locate tool using the code snippet
8344     for ac_prog in head
8345 do
8346   # Extract the first word of "$ac_prog", so it can be a program name with args.
8347 set dummy $ac_prog; ac_word=$2
8348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8349 $as_echo_n "checking for $ac_word... " >&6; }
8350 if ${ac_cv_path_HEAD+:} false; then :
8351   $as_echo_n "(cached) " >&6
8352 else
8353   case $HEAD in
8354   [\\/]* | ?:[\\/]*)
8355   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8356   ;;
8357   *)
8358   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8359 for as_dir in $PATH
8360 do
8361   IFS=$as_save_IFS
8362   test -z "$as_dir" && as_dir=.
8363     for ac_exec_ext in '' $ac_executable_extensions; do
8364   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8365     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8366     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8367     break 2
8368   fi
8369 done
8370   done
8371 IFS=$as_save_IFS
8372 
8373   ;;
8374 esac
8375 fi
8376 HEAD=$ac_cv_path_HEAD
8377 if test -n "$HEAD"; then
8378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8379 $as_echo "$HEAD" >&6; }
8380 else
8381   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8382 $as_echo "no" >&6; }
8383 fi
8384 
8385 
8386   test -n "$HEAD" && break
8387 done
8388 
8389   else
8390     # The variable is set, but is it from the command line or the environment?
8391 
8392     # Try to remove the string !HEAD! from our list.
8393     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8394     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8395       # If it failed, the variable was not from the command line. Ignore it,
8396       # but warn the user (except for BASH, which is always set by the calling BASH).
8397       if test "xHEAD" != xBASH; then
8398         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8399 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8400       fi
8401       # Try to locate tool using the code snippet
8402       for ac_prog in head
8403 do
8404   # Extract the first word of "$ac_prog", so it can be a program name with args.
8405 set dummy $ac_prog; ac_word=$2
8406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8407 $as_echo_n "checking for $ac_word... " >&6; }
8408 if ${ac_cv_path_HEAD+:} false; then :
8409   $as_echo_n "(cached) " >&6
8410 else
8411   case $HEAD in
8412   [\\/]* | ?:[\\/]*)
8413   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8414   ;;
8415   *)
8416   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8417 for as_dir in $PATH
8418 do
8419   IFS=$as_save_IFS
8420   test -z "$as_dir" && as_dir=.
8421     for ac_exec_ext in '' $ac_executable_extensions; do
8422   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8423     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8424     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8425     break 2
8426   fi
8427 done
8428   done
8429 IFS=$as_save_IFS
8430 
8431   ;;
8432 esac
8433 fi
8434 HEAD=$ac_cv_path_HEAD
8435 if test -n "$HEAD"; then
8436   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8437 $as_echo "$HEAD" >&6; }
8438 else
8439   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8440 $as_echo "no" >&6; }
8441 fi
8442 
8443 
8444   test -n "$HEAD" && break
8445 done
8446 
8447     else
8448       # If it succeeded, then it was overridden by the user. We will use it
8449       # for the tool.
8450 
8451       # First remove it from the list of overridden variables, so we can test
8452       # for unknown variables in the end.
8453       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8454 
8455       # Check if we try to supply an empty value
8456       if test "x$HEAD" = x; then
8457         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8458 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8459         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8460 $as_echo_n "checking for HEAD... " >&6; }
8461         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8462 $as_echo "disabled" >&6; }
8463       else
8464         # Check if the provided tool contains a complete path.
8465         tool_specified="$HEAD"
8466         tool_basename="${tool_specified##*/}"
8467         if test "x$tool_basename" = "x$tool_specified"; then
8468           # A command without a complete path is provided, search $PATH.
8469           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8470 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8471           # Extract the first word of "$tool_basename", so it can be a program name with args.
8472 set dummy $tool_basename; ac_word=$2
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8474 $as_echo_n "checking for $ac_word... " >&6; }
8475 if ${ac_cv_path_HEAD+:} false; then :
8476   $as_echo_n "(cached) " >&6
8477 else
8478   case $HEAD in
8479   [\\/]* | ?:[\\/]*)
8480   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8481   ;;
8482   *)
8483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8484 for as_dir in $PATH
8485 do
8486   IFS=$as_save_IFS
8487   test -z "$as_dir" && as_dir=.
8488     for ac_exec_ext in '' $ac_executable_extensions; do
8489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8490     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8492     break 2
8493   fi
8494 done
8495   done
8496 IFS=$as_save_IFS
8497 
8498   ;;
8499 esac
8500 fi
8501 HEAD=$ac_cv_path_HEAD
8502 if test -n "$HEAD"; then
8503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8504 $as_echo "$HEAD" >&6; }
8505 else
8506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8507 $as_echo "no" >&6; }
8508 fi
8509 
8510 
8511           if test "x$HEAD" = x; then
8512             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8513           fi
8514         else
8515           # Otherwise we believe it is a complete path. Use it as it is.
8516           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8517 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8518           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8519 $as_echo_n "checking for HEAD... " >&6; }
8520           if test ! -x "$tool_specified"; then
8521             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8522 $as_echo "not found" >&6; }
8523             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8524           fi
8525           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8526 $as_echo "$tool_specified" >&6; }
8527         fi
8528       fi
8529     fi
8530 
8531   fi
8532 
8533 
8534 
8535   if test "x$HEAD" = x; then
8536     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8537   fi
8538 
8539 
8540 
8541 
8542 
8543   # Publish this variable in the help.
8544 
8545 
8546   if [ -z "${GUNZIP+x}" ]; then
8547     # The variable is not set by user, try to locate tool using the code snippet
8548     for ac_prog in gunzip
8549 do
8550   # Extract the first word of "$ac_prog", so it can be a program name with args.
8551 set dummy $ac_prog; ac_word=$2
8552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8553 $as_echo_n "checking for $ac_word... " >&6; }
8554 if ${ac_cv_path_GUNZIP+:} false; then :
8555   $as_echo_n "(cached) " >&6
8556 else
8557   case $GUNZIP in
8558   [\\/]* | ?:[\\/]*)
8559   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8560   ;;
8561   *)
8562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8563 for as_dir in $PATH
8564 do
8565   IFS=$as_save_IFS
8566   test -z "$as_dir" && as_dir=.
8567     for ac_exec_ext in '' $ac_executable_extensions; do
8568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8569     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8571     break 2
8572   fi
8573 done
8574   done
8575 IFS=$as_save_IFS
8576 
8577   ;;
8578 esac
8579 fi
8580 GUNZIP=$ac_cv_path_GUNZIP
8581 if test -n "$GUNZIP"; then
8582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8583 $as_echo "$GUNZIP" >&6; }
8584 else
8585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8586 $as_echo "no" >&6; }
8587 fi
8588 
8589 
8590   test -n "$GUNZIP" && break
8591 done
8592 
8593   else
8594     # The variable is set, but is it from the command line or the environment?
8595 
8596     # Try to remove the string !GUNZIP! from our list.
8597     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8598     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8599       # If it failed, the variable was not from the command line. Ignore it,
8600       # but warn the user (except for BASH, which is always set by the calling BASH).
8601       if test "xGUNZIP" != xBASH; then
8602         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8603 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8604       fi
8605       # Try to locate tool using the code snippet
8606       for ac_prog in gunzip
8607 do
8608   # Extract the first word of "$ac_prog", so it can be a program name with args.
8609 set dummy $ac_prog; ac_word=$2
8610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8611 $as_echo_n "checking for $ac_word... " >&6; }
8612 if ${ac_cv_path_GUNZIP+:} false; then :
8613   $as_echo_n "(cached) " >&6
8614 else
8615   case $GUNZIP in
8616   [\\/]* | ?:[\\/]*)
8617   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8618   ;;
8619   *)
8620   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8621 for as_dir in $PATH
8622 do
8623   IFS=$as_save_IFS
8624   test -z "$as_dir" && as_dir=.
8625     for ac_exec_ext in '' $ac_executable_extensions; do
8626   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8627     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8628     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8629     break 2
8630   fi
8631 done
8632   done
8633 IFS=$as_save_IFS
8634 
8635   ;;
8636 esac
8637 fi
8638 GUNZIP=$ac_cv_path_GUNZIP
8639 if test -n "$GUNZIP"; then
8640   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8641 $as_echo "$GUNZIP" >&6; }
8642 else
8643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8644 $as_echo "no" >&6; }
8645 fi
8646 
8647 
8648   test -n "$GUNZIP" && break
8649 done
8650 
8651     else
8652       # If it succeeded, then it was overridden by the user. We will use it
8653       # for the tool.
8654 
8655       # First remove it from the list of overridden variables, so we can test
8656       # for unknown variables in the end.
8657       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8658 
8659       # Check if we try to supply an empty value
8660       if test "x$GUNZIP" = x; then
8661         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8662 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8663         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8664 $as_echo_n "checking for GUNZIP... " >&6; }
8665         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8666 $as_echo "disabled" >&6; }
8667       else
8668         # Check if the provided tool contains a complete path.
8669         tool_specified="$GUNZIP"
8670         tool_basename="${tool_specified##*/}"
8671         if test "x$tool_basename" = "x$tool_specified"; then
8672           # A command without a complete path is provided, search $PATH.
8673           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8674 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8675           # Extract the first word of "$tool_basename", so it can be a program name with args.
8676 set dummy $tool_basename; ac_word=$2
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8678 $as_echo_n "checking for $ac_word... " >&6; }
8679 if ${ac_cv_path_GUNZIP+:} false; then :
8680   $as_echo_n "(cached) " >&6
8681 else
8682   case $GUNZIP in
8683   [\\/]* | ?:[\\/]*)
8684   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8685   ;;
8686   *)
8687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8688 for as_dir in $PATH
8689 do
8690   IFS=$as_save_IFS
8691   test -z "$as_dir" && as_dir=.
8692     for ac_exec_ext in '' $ac_executable_extensions; do
8693   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8694     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8695     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8696     break 2
8697   fi
8698 done
8699   done
8700 IFS=$as_save_IFS
8701 
8702   ;;
8703 esac
8704 fi
8705 GUNZIP=$ac_cv_path_GUNZIP
8706 if test -n "$GUNZIP"; then
8707   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8708 $as_echo "$GUNZIP" >&6; }
8709 else
8710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8711 $as_echo "no" >&6; }
8712 fi
8713 
8714 
8715           if test "x$GUNZIP" = x; then
8716             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8717           fi
8718         else
8719           # Otherwise we believe it is a complete path. Use it as it is.
8720           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8721 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8722           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8723 $as_echo_n "checking for GUNZIP... " >&6; }
8724           if test ! -x "$tool_specified"; then
8725             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8726 $as_echo "not found" >&6; }
8727             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8728           fi
8729           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8730 $as_echo "$tool_specified" >&6; }
8731         fi
8732       fi
8733     fi
8734 
8735   fi
8736 
8737 
8738 
8739   if test "x$GUNZIP" = x; then
8740     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8741   fi
8742 
8743 
8744 
8745 
8746 
8747   # Publish this variable in the help.
8748 
8749 
8750   if [ -z "${GZIP+x}" ]; then
8751     # The variable is not set by user, try to locate tool using the code snippet
8752     for ac_prog in pigz gzip
8753 do
8754   # Extract the first word of "$ac_prog", so it can be a program name with args.
8755 set dummy $ac_prog; ac_word=$2
8756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8757 $as_echo_n "checking for $ac_word... " >&6; }
8758 if ${ac_cv_path_GZIP+:} false; then :
8759   $as_echo_n "(cached) " >&6
8760 else
8761   case $GZIP in
8762   [\\/]* | ?:[\\/]*)
8763   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8764   ;;
8765   *)
8766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8767 for as_dir in $PATH
8768 do
8769   IFS=$as_save_IFS
8770   test -z "$as_dir" && as_dir=.
8771     for ac_exec_ext in '' $ac_executable_extensions; do
8772   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8773     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8774     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8775     break 2
8776   fi
8777 done
8778   done
8779 IFS=$as_save_IFS
8780 
8781   ;;
8782 esac
8783 fi
8784 GZIP=$ac_cv_path_GZIP
8785 if test -n "$GZIP"; then
8786   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8787 $as_echo "$GZIP" >&6; }
8788 else
8789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8790 $as_echo "no" >&6; }
8791 fi
8792 
8793 
8794   test -n "$GZIP" && break
8795 done
8796 
8797   else
8798     # The variable is set, but is it from the command line or the environment?
8799 
8800     # Try to remove the string !GZIP! from our list.
8801     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8802     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8803       # If it failed, the variable was not from the command line. Ignore it,
8804       # but warn the user (except for BASH, which is always set by the calling BASH).
8805       if test "xGZIP" != xBASH; then
8806         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8807 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8808       fi
8809       # Try to locate tool using the code snippet
8810       for ac_prog in pigz gzip
8811 do
8812   # Extract the first word of "$ac_prog", so it can be a program name with args.
8813 set dummy $ac_prog; ac_word=$2
8814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8815 $as_echo_n "checking for $ac_word... " >&6; }
8816 if ${ac_cv_path_GZIP+:} false; then :
8817   $as_echo_n "(cached) " >&6
8818 else
8819   case $GZIP in
8820   [\\/]* | ?:[\\/]*)
8821   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8822   ;;
8823   *)
8824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8825 for as_dir in $PATH
8826 do
8827   IFS=$as_save_IFS
8828   test -z "$as_dir" && as_dir=.
8829     for ac_exec_ext in '' $ac_executable_extensions; do
8830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8831     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8833     break 2
8834   fi
8835 done
8836   done
8837 IFS=$as_save_IFS
8838 
8839   ;;
8840 esac
8841 fi
8842 GZIP=$ac_cv_path_GZIP
8843 if test -n "$GZIP"; then
8844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8845 $as_echo "$GZIP" >&6; }
8846 else
8847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8848 $as_echo "no" >&6; }
8849 fi
8850 
8851 
8852   test -n "$GZIP" && break
8853 done
8854 
8855     else
8856       # If it succeeded, then it was overridden by the user. We will use it
8857       # for the tool.
8858 
8859       # First remove it from the list of overridden variables, so we can test
8860       # for unknown variables in the end.
8861       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8862 
8863       # Check if we try to supply an empty value
8864       if test "x$GZIP" = x; then
8865         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8866 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8867         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8868 $as_echo_n "checking for GZIP... " >&6; }
8869         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8870 $as_echo "disabled" >&6; }
8871       else
8872         # Check if the provided tool contains a complete path.
8873         tool_specified="$GZIP"
8874         tool_basename="${tool_specified##*/}"
8875         if test "x$tool_basename" = "x$tool_specified"; then
8876           # A command without a complete path is provided, search $PATH.
8877           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8878 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8879           # Extract the first word of "$tool_basename", so it can be a program name with args.
8880 set dummy $tool_basename; ac_word=$2
8881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8882 $as_echo_n "checking for $ac_word... " >&6; }
8883 if ${ac_cv_path_GZIP+:} false; then :
8884   $as_echo_n "(cached) " >&6
8885 else
8886   case $GZIP in
8887   [\\/]* | ?:[\\/]*)
8888   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8889   ;;
8890   *)
8891   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8892 for as_dir in $PATH
8893 do
8894   IFS=$as_save_IFS
8895   test -z "$as_dir" && as_dir=.
8896     for ac_exec_ext in '' $ac_executable_extensions; do
8897   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8898     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8899     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8900     break 2
8901   fi
8902 done
8903   done
8904 IFS=$as_save_IFS
8905 
8906   ;;
8907 esac
8908 fi
8909 GZIP=$ac_cv_path_GZIP
8910 if test -n "$GZIP"; then
8911   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8912 $as_echo "$GZIP" >&6; }
8913 else
8914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8915 $as_echo "no" >&6; }
8916 fi
8917 
8918 
8919           if test "x$GZIP" = x; then
8920             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8921           fi
8922         else
8923           # Otherwise we believe it is a complete path. Use it as it is.
8924           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8925 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8926           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8927 $as_echo_n "checking for GZIP... " >&6; }
8928           if test ! -x "$tool_specified"; then
8929             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8930 $as_echo "not found" >&6; }
8931             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8932           fi
8933           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8934 $as_echo "$tool_specified" >&6; }
8935         fi
8936       fi
8937     fi
8938 
8939   fi
8940 
8941 
8942 
8943   if test "x$GZIP" = x; then
8944     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8945   fi
8946 
8947 
8948 
8949 
8950 
8951   # Publish this variable in the help.
8952 
8953 
8954   if [ -z "${LN+x}" ]; then
8955     # The variable is not set by user, try to locate tool using the code snippet
8956     for ac_prog in ln
8957 do
8958   # Extract the first word of "$ac_prog", so it can be a program name with args.
8959 set dummy $ac_prog; ac_word=$2
8960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8961 $as_echo_n "checking for $ac_word... " >&6; }
8962 if ${ac_cv_path_LN+:} false; then :
8963   $as_echo_n "(cached) " >&6
8964 else
8965   case $LN in
8966   [\\/]* | ?:[\\/]*)
8967   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8968   ;;
8969   *)
8970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8971 for as_dir in $PATH
8972 do
8973   IFS=$as_save_IFS
8974   test -z "$as_dir" && as_dir=.
8975     for ac_exec_ext in '' $ac_executable_extensions; do
8976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8977     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8979     break 2
8980   fi
8981 done
8982   done
8983 IFS=$as_save_IFS
8984 
8985   ;;
8986 esac
8987 fi
8988 LN=$ac_cv_path_LN
8989 if test -n "$LN"; then
8990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8991 $as_echo "$LN" >&6; }
8992 else
8993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8994 $as_echo "no" >&6; }
8995 fi
8996 
8997 
8998   test -n "$LN" && break
8999 done
9000 
9001   else
9002     # The variable is set, but is it from the command line or the environment?
9003 
9004     # Try to remove the string !LN! from our list.
9005     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
9006     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9007       # If it failed, the variable was not from the command line. Ignore it,
9008       # but warn the user (except for BASH, which is always set by the calling BASH).
9009       if test "xLN" != xBASH; then
9010         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
9011 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
9012       fi
9013       # Try to locate tool using the code snippet
9014       for ac_prog in ln
9015 do
9016   # Extract the first word of "$ac_prog", so it can be a program name with args.
9017 set dummy $ac_prog; ac_word=$2
9018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9019 $as_echo_n "checking for $ac_word... " >&6; }
9020 if ${ac_cv_path_LN+:} false; then :
9021   $as_echo_n "(cached) " >&6
9022 else
9023   case $LN in
9024   [\\/]* | ?:[\\/]*)
9025   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9026   ;;
9027   *)
9028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9029 for as_dir in $PATH
9030 do
9031   IFS=$as_save_IFS
9032   test -z "$as_dir" && as_dir=.
9033     for ac_exec_ext in '' $ac_executable_extensions; do
9034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9035     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9037     break 2
9038   fi
9039 done
9040   done
9041 IFS=$as_save_IFS
9042 
9043   ;;
9044 esac
9045 fi
9046 LN=$ac_cv_path_LN
9047 if test -n "$LN"; then
9048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9049 $as_echo "$LN" >&6; }
9050 else
9051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9052 $as_echo "no" >&6; }
9053 fi
9054 
9055 
9056   test -n "$LN" && break
9057 done
9058 
9059     else
9060       # If it succeeded, then it was overridden by the user. We will use it
9061       # for the tool.
9062 
9063       # First remove it from the list of overridden variables, so we can test
9064       # for unknown variables in the end.
9065       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9066 
9067       # Check if we try to supply an empty value
9068       if test "x$LN" = x; then
9069         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9070 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9071         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9072 $as_echo_n "checking for LN... " >&6; }
9073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9074 $as_echo "disabled" >&6; }
9075       else
9076         # Check if the provided tool contains a complete path.
9077         tool_specified="$LN"
9078         tool_basename="${tool_specified##*/}"
9079         if test "x$tool_basename" = "x$tool_specified"; then
9080           # A command without a complete path is provided, search $PATH.
9081           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9082 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9083           # Extract the first word of "$tool_basename", so it can be a program name with args.
9084 set dummy $tool_basename; ac_word=$2
9085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9086 $as_echo_n "checking for $ac_word... " >&6; }
9087 if ${ac_cv_path_LN+:} false; then :
9088   $as_echo_n "(cached) " >&6
9089 else
9090   case $LN in
9091   [\\/]* | ?:[\\/]*)
9092   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9093   ;;
9094   *)
9095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9096 for as_dir in $PATH
9097 do
9098   IFS=$as_save_IFS
9099   test -z "$as_dir" && as_dir=.
9100     for ac_exec_ext in '' $ac_executable_extensions; do
9101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9102     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9104     break 2
9105   fi
9106 done
9107   done
9108 IFS=$as_save_IFS
9109 
9110   ;;
9111 esac
9112 fi
9113 LN=$ac_cv_path_LN
9114 if test -n "$LN"; then
9115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9116 $as_echo "$LN" >&6; }
9117 else
9118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9119 $as_echo "no" >&6; }
9120 fi
9121 
9122 
9123           if test "x$LN" = x; then
9124             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9125           fi
9126         else
9127           # Otherwise we believe it is a complete path. Use it as it is.
9128           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9129 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9130           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9131 $as_echo_n "checking for LN... " >&6; }
9132           if test ! -x "$tool_specified"; then
9133             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9134 $as_echo "not found" >&6; }
9135             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9136           fi
9137           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9138 $as_echo "$tool_specified" >&6; }
9139         fi
9140       fi
9141     fi
9142 
9143   fi
9144 
9145 
9146 
9147   if test "x$LN" = x; then
9148     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9149   fi
9150 
9151 
9152 
9153 
9154 
9155   # Publish this variable in the help.
9156 
9157 
9158   if [ -z "${LS+x}" ]; then
9159     # The variable is not set by user, try to locate tool using the code snippet
9160     for ac_prog in ls
9161 do
9162   # Extract the first word of "$ac_prog", so it can be a program name with args.
9163 set dummy $ac_prog; ac_word=$2
9164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9165 $as_echo_n "checking for $ac_word... " >&6; }
9166 if ${ac_cv_path_LS+:} false; then :
9167   $as_echo_n "(cached) " >&6
9168 else
9169   case $LS in
9170   [\\/]* | ?:[\\/]*)
9171   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9172   ;;
9173   *)
9174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9175 for as_dir in $PATH
9176 do
9177   IFS=$as_save_IFS
9178   test -z "$as_dir" && as_dir=.
9179     for ac_exec_ext in '' $ac_executable_extensions; do
9180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9181     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9183     break 2
9184   fi
9185 done
9186   done
9187 IFS=$as_save_IFS
9188 
9189   ;;
9190 esac
9191 fi
9192 LS=$ac_cv_path_LS
9193 if test -n "$LS"; then
9194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9195 $as_echo "$LS" >&6; }
9196 else
9197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9198 $as_echo "no" >&6; }
9199 fi
9200 
9201 
9202   test -n "$LS" && break
9203 done
9204 
9205   else
9206     # The variable is set, but is it from the command line or the environment?
9207 
9208     # Try to remove the string !LS! from our list.
9209     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9210     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9211       # If it failed, the variable was not from the command line. Ignore it,
9212       # but warn the user (except for BASH, which is always set by the calling BASH).
9213       if test "xLS" != xBASH; then
9214         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9215 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9216       fi
9217       # Try to locate tool using the code snippet
9218       for ac_prog in ls
9219 do
9220   # Extract the first word of "$ac_prog", so it can be a program name with args.
9221 set dummy $ac_prog; ac_word=$2
9222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9223 $as_echo_n "checking for $ac_word... " >&6; }
9224 if ${ac_cv_path_LS+:} false; then :
9225   $as_echo_n "(cached) " >&6
9226 else
9227   case $LS in
9228   [\\/]* | ?:[\\/]*)
9229   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9230   ;;
9231   *)
9232   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9233 for as_dir in $PATH
9234 do
9235   IFS=$as_save_IFS
9236   test -z "$as_dir" && as_dir=.
9237     for ac_exec_ext in '' $ac_executable_extensions; do
9238   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9239     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9240     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9241     break 2
9242   fi
9243 done
9244   done
9245 IFS=$as_save_IFS
9246 
9247   ;;
9248 esac
9249 fi
9250 LS=$ac_cv_path_LS
9251 if test -n "$LS"; then
9252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9253 $as_echo "$LS" >&6; }
9254 else
9255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9256 $as_echo "no" >&6; }
9257 fi
9258 
9259 
9260   test -n "$LS" && break
9261 done
9262 
9263     else
9264       # If it succeeded, then it was overridden by the user. We will use it
9265       # for the tool.
9266 
9267       # First remove it from the list of overridden variables, so we can test
9268       # for unknown variables in the end.
9269       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9270 
9271       # Check if we try to supply an empty value
9272       if test "x$LS" = x; then
9273         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9274 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9275         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9276 $as_echo_n "checking for LS... " >&6; }
9277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9278 $as_echo "disabled" >&6; }
9279       else
9280         # Check if the provided tool contains a complete path.
9281         tool_specified="$LS"
9282         tool_basename="${tool_specified##*/}"
9283         if test "x$tool_basename" = "x$tool_specified"; then
9284           # A command without a complete path is provided, search $PATH.
9285           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9286 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9287           # Extract the first word of "$tool_basename", so it can be a program name with args.
9288 set dummy $tool_basename; ac_word=$2
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9290 $as_echo_n "checking for $ac_word... " >&6; }
9291 if ${ac_cv_path_LS+:} false; then :
9292   $as_echo_n "(cached) " >&6
9293 else
9294   case $LS in
9295   [\\/]* | ?:[\\/]*)
9296   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9297   ;;
9298   *)
9299   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9300 for as_dir in $PATH
9301 do
9302   IFS=$as_save_IFS
9303   test -z "$as_dir" && as_dir=.
9304     for ac_exec_ext in '' $ac_executable_extensions; do
9305   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9306     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9307     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9308     break 2
9309   fi
9310 done
9311   done
9312 IFS=$as_save_IFS
9313 
9314   ;;
9315 esac
9316 fi
9317 LS=$ac_cv_path_LS
9318 if test -n "$LS"; then
9319   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9320 $as_echo "$LS" >&6; }
9321 else
9322   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9323 $as_echo "no" >&6; }
9324 fi
9325 
9326 
9327           if test "x$LS" = x; then
9328             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9329           fi
9330         else
9331           # Otherwise we believe it is a complete path. Use it as it is.
9332           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9333 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9334           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9335 $as_echo_n "checking for LS... " >&6; }
9336           if test ! -x "$tool_specified"; then
9337             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9338 $as_echo "not found" >&6; }
9339             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9340           fi
9341           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9342 $as_echo "$tool_specified" >&6; }
9343         fi
9344       fi
9345     fi
9346 
9347   fi
9348 
9349 
9350 
9351   if test "x$LS" = x; then
9352     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9353   fi
9354 
9355 
9356 
9357 
9358 
9359   # Publish this variable in the help.
9360 
9361 
9362   if [ -z "${MKDIR+x}" ]; then
9363     # The variable is not set by user, try to locate tool using the code snippet
9364     for ac_prog in mkdir
9365 do
9366   # Extract the first word of "$ac_prog", so it can be a program name with args.
9367 set dummy $ac_prog; ac_word=$2
9368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9369 $as_echo_n "checking for $ac_word... " >&6; }
9370 if ${ac_cv_path_MKDIR+:} false; then :
9371   $as_echo_n "(cached) " >&6
9372 else
9373   case $MKDIR in
9374   [\\/]* | ?:[\\/]*)
9375   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9376   ;;
9377   *)
9378   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9379 for as_dir in $PATH
9380 do
9381   IFS=$as_save_IFS
9382   test -z "$as_dir" && as_dir=.
9383     for ac_exec_ext in '' $ac_executable_extensions; do
9384   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9385     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9386     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9387     break 2
9388   fi
9389 done
9390   done
9391 IFS=$as_save_IFS
9392 
9393   ;;
9394 esac
9395 fi
9396 MKDIR=$ac_cv_path_MKDIR
9397 if test -n "$MKDIR"; then
9398   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9399 $as_echo "$MKDIR" >&6; }
9400 else
9401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9402 $as_echo "no" >&6; }
9403 fi
9404 
9405 
9406   test -n "$MKDIR" && break
9407 done
9408 
9409   else
9410     # The variable is set, but is it from the command line or the environment?
9411 
9412     # Try to remove the string !MKDIR! from our list.
9413     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9414     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9415       # If it failed, the variable was not from the command line. Ignore it,
9416       # but warn the user (except for BASH, which is always set by the calling BASH).
9417       if test "xMKDIR" != xBASH; then
9418         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9419 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9420       fi
9421       # Try to locate tool using the code snippet
9422       for ac_prog in mkdir
9423 do
9424   # Extract the first word of "$ac_prog", so it can be a program name with args.
9425 set dummy $ac_prog; ac_word=$2
9426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9427 $as_echo_n "checking for $ac_word... " >&6; }
9428 if ${ac_cv_path_MKDIR+:} false; then :
9429   $as_echo_n "(cached) " >&6
9430 else
9431   case $MKDIR in
9432   [\\/]* | ?:[\\/]*)
9433   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9434   ;;
9435   *)
9436   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9437 for as_dir in $PATH
9438 do
9439   IFS=$as_save_IFS
9440   test -z "$as_dir" && as_dir=.
9441     for ac_exec_ext in '' $ac_executable_extensions; do
9442   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9443     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9444     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9445     break 2
9446   fi
9447 done
9448   done
9449 IFS=$as_save_IFS
9450 
9451   ;;
9452 esac
9453 fi
9454 MKDIR=$ac_cv_path_MKDIR
9455 if test -n "$MKDIR"; then
9456   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9457 $as_echo "$MKDIR" >&6; }
9458 else
9459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9460 $as_echo "no" >&6; }
9461 fi
9462 
9463 
9464   test -n "$MKDIR" && break
9465 done
9466 
9467     else
9468       # If it succeeded, then it was overridden by the user. We will use it
9469       # for the tool.
9470 
9471       # First remove it from the list of overridden variables, so we can test
9472       # for unknown variables in the end.
9473       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9474 
9475       # Check if we try to supply an empty value
9476       if test "x$MKDIR" = x; then
9477         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9478 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9479         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9480 $as_echo_n "checking for MKDIR... " >&6; }
9481         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9482 $as_echo "disabled" >&6; }
9483       else
9484         # Check if the provided tool contains a complete path.
9485         tool_specified="$MKDIR"
9486         tool_basename="${tool_specified##*/}"
9487         if test "x$tool_basename" = "x$tool_specified"; then
9488           # A command without a complete path is provided, search $PATH.
9489           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9490 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9491           # Extract the first word of "$tool_basename", so it can be a program name with args.
9492 set dummy $tool_basename; ac_word=$2
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9494 $as_echo_n "checking for $ac_word... " >&6; }
9495 if ${ac_cv_path_MKDIR+:} false; then :
9496   $as_echo_n "(cached) " >&6
9497 else
9498   case $MKDIR in
9499   [\\/]* | ?:[\\/]*)
9500   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9501   ;;
9502   *)
9503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9504 for as_dir in $PATH
9505 do
9506   IFS=$as_save_IFS
9507   test -z "$as_dir" && as_dir=.
9508     for ac_exec_ext in '' $ac_executable_extensions; do
9509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9510     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9512     break 2
9513   fi
9514 done
9515   done
9516 IFS=$as_save_IFS
9517 
9518   ;;
9519 esac
9520 fi
9521 MKDIR=$ac_cv_path_MKDIR
9522 if test -n "$MKDIR"; then
9523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9524 $as_echo "$MKDIR" >&6; }
9525 else
9526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9527 $as_echo "no" >&6; }
9528 fi
9529 
9530 
9531           if test "x$MKDIR" = x; then
9532             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9533           fi
9534         else
9535           # Otherwise we believe it is a complete path. Use it as it is.
9536           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9537 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9538           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9539 $as_echo_n "checking for MKDIR... " >&6; }
9540           if test ! -x "$tool_specified"; then
9541             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9542 $as_echo "not found" >&6; }
9543             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9544           fi
9545           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9546 $as_echo "$tool_specified" >&6; }
9547         fi
9548       fi
9549     fi
9550 
9551   fi
9552 
9553 
9554 
9555   if test "x$MKDIR" = x; then
9556     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9557   fi
9558 
9559 
9560 
9561 
9562 
9563   # Publish this variable in the help.
9564 
9565 
9566   if [ -z "${MKTEMP+x}" ]; then
9567     # The variable is not set by user, try to locate tool using the code snippet
9568     for ac_prog in mktemp
9569 do
9570   # Extract the first word of "$ac_prog", so it can be a program name with args.
9571 set dummy $ac_prog; ac_word=$2
9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9573 $as_echo_n "checking for $ac_word... " >&6; }
9574 if ${ac_cv_path_MKTEMP+:} false; then :
9575   $as_echo_n "(cached) " >&6
9576 else
9577   case $MKTEMP in
9578   [\\/]* | ?:[\\/]*)
9579   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9580   ;;
9581   *)
9582   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9583 for as_dir in $PATH
9584 do
9585   IFS=$as_save_IFS
9586   test -z "$as_dir" && as_dir=.
9587     for ac_exec_ext in '' $ac_executable_extensions; do
9588   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9589     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9590     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9591     break 2
9592   fi
9593 done
9594   done
9595 IFS=$as_save_IFS
9596 
9597   ;;
9598 esac
9599 fi
9600 MKTEMP=$ac_cv_path_MKTEMP
9601 if test -n "$MKTEMP"; then
9602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9603 $as_echo "$MKTEMP" >&6; }
9604 else
9605   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9606 $as_echo "no" >&6; }
9607 fi
9608 
9609 
9610   test -n "$MKTEMP" && break
9611 done
9612 
9613   else
9614     # The variable is set, but is it from the command line or the environment?
9615 
9616     # Try to remove the string !MKTEMP! from our list.
9617     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9618     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9619       # If it failed, the variable was not from the command line. Ignore it,
9620       # but warn the user (except for BASH, which is always set by the calling BASH).
9621       if test "xMKTEMP" != xBASH; then
9622         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9623 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9624       fi
9625       # Try to locate tool using the code snippet
9626       for ac_prog in mktemp
9627 do
9628   # Extract the first word of "$ac_prog", so it can be a program name with args.
9629 set dummy $ac_prog; ac_word=$2
9630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9631 $as_echo_n "checking for $ac_word... " >&6; }
9632 if ${ac_cv_path_MKTEMP+:} false; then :
9633   $as_echo_n "(cached) " >&6
9634 else
9635   case $MKTEMP in
9636   [\\/]* | ?:[\\/]*)
9637   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9638   ;;
9639   *)
9640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9641 for as_dir in $PATH
9642 do
9643   IFS=$as_save_IFS
9644   test -z "$as_dir" && as_dir=.
9645     for ac_exec_ext in '' $ac_executable_extensions; do
9646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9647     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9649     break 2
9650   fi
9651 done
9652   done
9653 IFS=$as_save_IFS
9654 
9655   ;;
9656 esac
9657 fi
9658 MKTEMP=$ac_cv_path_MKTEMP
9659 if test -n "$MKTEMP"; then
9660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9661 $as_echo "$MKTEMP" >&6; }
9662 else
9663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9664 $as_echo "no" >&6; }
9665 fi
9666 
9667 
9668   test -n "$MKTEMP" && break
9669 done
9670 
9671     else
9672       # If it succeeded, then it was overridden by the user. We will use it
9673       # for the tool.
9674 
9675       # First remove it from the list of overridden variables, so we can test
9676       # for unknown variables in the end.
9677       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9678 
9679       # Check if we try to supply an empty value
9680       if test "x$MKTEMP" = x; then
9681         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9682 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9683         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9684 $as_echo_n "checking for MKTEMP... " >&6; }
9685         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9686 $as_echo "disabled" >&6; }
9687       else
9688         # Check if the provided tool contains a complete path.
9689         tool_specified="$MKTEMP"
9690         tool_basename="${tool_specified##*/}"
9691         if test "x$tool_basename" = "x$tool_specified"; then
9692           # A command without a complete path is provided, search $PATH.
9693           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9694 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9695           # Extract the first word of "$tool_basename", so it can be a program name with args.
9696 set dummy $tool_basename; ac_word=$2
9697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698 $as_echo_n "checking for $ac_word... " >&6; }
9699 if ${ac_cv_path_MKTEMP+:} false; then :
9700   $as_echo_n "(cached) " >&6
9701 else
9702   case $MKTEMP in
9703   [\\/]* | ?:[\\/]*)
9704   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9705   ;;
9706   *)
9707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708 for as_dir in $PATH
9709 do
9710   IFS=$as_save_IFS
9711   test -z "$as_dir" && as_dir=.
9712     for ac_exec_ext in '' $ac_executable_extensions; do
9713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716     break 2
9717   fi
9718 done
9719   done
9720 IFS=$as_save_IFS
9721 
9722   ;;
9723 esac
9724 fi
9725 MKTEMP=$ac_cv_path_MKTEMP
9726 if test -n "$MKTEMP"; then
9727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9728 $as_echo "$MKTEMP" >&6; }
9729 else
9730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731 $as_echo "no" >&6; }
9732 fi
9733 
9734 
9735           if test "x$MKTEMP" = x; then
9736             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9737           fi
9738         else
9739           # Otherwise we believe it is a complete path. Use it as it is.
9740           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9741 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9742           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9743 $as_echo_n "checking for MKTEMP... " >&6; }
9744           if test ! -x "$tool_specified"; then
9745             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9746 $as_echo "not found" >&6; }
9747             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9748           fi
9749           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9750 $as_echo "$tool_specified" >&6; }
9751         fi
9752       fi
9753     fi
9754 
9755   fi
9756 
9757 
9758 
9759   if test "x$MKTEMP" = x; then
9760     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9761   fi
9762 
9763 
9764 
9765 
9766 
9767   # Publish this variable in the help.
9768 
9769 
9770   if [ -z "${MV+x}" ]; then
9771     # The variable is not set by user, try to locate tool using the code snippet
9772     for ac_prog in mv
9773 do
9774   # Extract the first word of "$ac_prog", so it can be a program name with args.
9775 set dummy $ac_prog; ac_word=$2
9776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9777 $as_echo_n "checking for $ac_word... " >&6; }
9778 if ${ac_cv_path_MV+:} false; then :
9779   $as_echo_n "(cached) " >&6
9780 else
9781   case $MV in
9782   [\\/]* | ?:[\\/]*)
9783   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9784   ;;
9785   *)
9786   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9787 for as_dir in $PATH
9788 do
9789   IFS=$as_save_IFS
9790   test -z "$as_dir" && as_dir=.
9791     for ac_exec_ext in '' $ac_executable_extensions; do
9792   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9793     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9794     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9795     break 2
9796   fi
9797 done
9798   done
9799 IFS=$as_save_IFS
9800 
9801   ;;
9802 esac
9803 fi
9804 MV=$ac_cv_path_MV
9805 if test -n "$MV"; then
9806   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9807 $as_echo "$MV" >&6; }
9808 else
9809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9810 $as_echo "no" >&6; }
9811 fi
9812 
9813 
9814   test -n "$MV" && break
9815 done
9816 
9817   else
9818     # The variable is set, but is it from the command line or the environment?
9819 
9820     # Try to remove the string !MV! from our list.
9821     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9822     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9823       # If it failed, the variable was not from the command line. Ignore it,
9824       # but warn the user (except for BASH, which is always set by the calling BASH).
9825       if test "xMV" != xBASH; then
9826         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9827 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9828       fi
9829       # Try to locate tool using the code snippet
9830       for ac_prog in mv
9831 do
9832   # Extract the first word of "$ac_prog", so it can be a program name with args.
9833 set dummy $ac_prog; ac_word=$2
9834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9835 $as_echo_n "checking for $ac_word... " >&6; }
9836 if ${ac_cv_path_MV+:} false; then :
9837   $as_echo_n "(cached) " >&6
9838 else
9839   case $MV in
9840   [\\/]* | ?:[\\/]*)
9841   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9842   ;;
9843   *)
9844   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9845 for as_dir in $PATH
9846 do
9847   IFS=$as_save_IFS
9848   test -z "$as_dir" && as_dir=.
9849     for ac_exec_ext in '' $ac_executable_extensions; do
9850   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9851     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9852     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9853     break 2
9854   fi
9855 done
9856   done
9857 IFS=$as_save_IFS
9858 
9859   ;;
9860 esac
9861 fi
9862 MV=$ac_cv_path_MV
9863 if test -n "$MV"; then
9864   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9865 $as_echo "$MV" >&6; }
9866 else
9867   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9868 $as_echo "no" >&6; }
9869 fi
9870 
9871 
9872   test -n "$MV" && break
9873 done
9874 
9875     else
9876       # If it succeeded, then it was overridden by the user. We will use it
9877       # for the tool.
9878 
9879       # First remove it from the list of overridden variables, so we can test
9880       # for unknown variables in the end.
9881       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9882 
9883       # Check if we try to supply an empty value
9884       if test "x$MV" = x; then
9885         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9886 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9887         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9888 $as_echo_n "checking for MV... " >&6; }
9889         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9890 $as_echo "disabled" >&6; }
9891       else
9892         # Check if the provided tool contains a complete path.
9893         tool_specified="$MV"
9894         tool_basename="${tool_specified##*/}"
9895         if test "x$tool_basename" = "x$tool_specified"; then
9896           # A command without a complete path is provided, search $PATH.
9897           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9898 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9899           # Extract the first word of "$tool_basename", so it can be a program name with args.
9900 set dummy $tool_basename; ac_word=$2
9901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9902 $as_echo_n "checking for $ac_word... " >&6; }
9903 if ${ac_cv_path_MV+:} false; then :
9904   $as_echo_n "(cached) " >&6
9905 else
9906   case $MV in
9907   [\\/]* | ?:[\\/]*)
9908   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9909   ;;
9910   *)
9911   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9912 for as_dir in $PATH
9913 do
9914   IFS=$as_save_IFS
9915   test -z "$as_dir" && as_dir=.
9916     for ac_exec_ext in '' $ac_executable_extensions; do
9917   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9918     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9919     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9920     break 2
9921   fi
9922 done
9923   done
9924 IFS=$as_save_IFS
9925 
9926   ;;
9927 esac
9928 fi
9929 MV=$ac_cv_path_MV
9930 if test -n "$MV"; then
9931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9932 $as_echo "$MV" >&6; }
9933 else
9934   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9935 $as_echo "no" >&6; }
9936 fi
9937 
9938 
9939           if test "x$MV" = x; then
9940             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9941           fi
9942         else
9943           # Otherwise we believe it is a complete path. Use it as it is.
9944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9945 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9946           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9947 $as_echo_n "checking for MV... " >&6; }
9948           if test ! -x "$tool_specified"; then
9949             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9950 $as_echo "not found" >&6; }
9951             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9952           fi
9953           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9954 $as_echo "$tool_specified" >&6; }
9955         fi
9956       fi
9957     fi
9958 
9959   fi
9960 
9961 
9962 
9963   if test "x$MV" = x; then
9964     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9965   fi
9966 
9967 
9968 
9969 
9970 
9971   # Publish this variable in the help.
9972 
9973 
9974   if [ -z "${NAWK+x}" ]; then
9975     # The variable is not set by user, try to locate tool using the code snippet
9976     for ac_prog in nawk gawk awk
9977 do
9978   # Extract the first word of "$ac_prog", so it can be a program name with args.
9979 set dummy $ac_prog; ac_word=$2
9980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9981 $as_echo_n "checking for $ac_word... " >&6; }
9982 if ${ac_cv_path_NAWK+:} false; then :
9983   $as_echo_n "(cached) " >&6
9984 else
9985   case $NAWK in
9986   [\\/]* | ?:[\\/]*)
9987   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9988   ;;
9989   *)
9990   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9991 for as_dir in $PATH
9992 do
9993   IFS=$as_save_IFS
9994   test -z "$as_dir" && as_dir=.
9995     for ac_exec_ext in '' $ac_executable_extensions; do
9996   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9997     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9998     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9999     break 2
10000   fi
10001 done
10002   done
10003 IFS=$as_save_IFS
10004 
10005   ;;
10006 esac
10007 fi
10008 NAWK=$ac_cv_path_NAWK
10009 if test -n "$NAWK"; then
10010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10011 $as_echo "$NAWK" >&6; }
10012 else
10013   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10014 $as_echo "no" >&6; }
10015 fi
10016 
10017 
10018   test -n "$NAWK" && break
10019 done
10020 
10021   else
10022     # The variable is set, but is it from the command line or the environment?
10023 
10024     # Try to remove the string !NAWK! from our list.
10025     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
10026     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10027       # If it failed, the variable was not from the command line. Ignore it,
10028       # but warn the user (except for BASH, which is always set by the calling BASH).
10029       if test "xNAWK" != xBASH; then
10030         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
10031 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10032       fi
10033       # Try to locate tool using the code snippet
10034       for ac_prog in nawk gawk awk
10035 do
10036   # Extract the first word of "$ac_prog", so it can be a program name with args.
10037 set dummy $ac_prog; ac_word=$2
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10039 $as_echo_n "checking for $ac_word... " >&6; }
10040 if ${ac_cv_path_NAWK+:} false; then :
10041   $as_echo_n "(cached) " >&6
10042 else
10043   case $NAWK in
10044   [\\/]* | ?:[\\/]*)
10045   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10046   ;;
10047   *)
10048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10049 for as_dir in $PATH
10050 do
10051   IFS=$as_save_IFS
10052   test -z "$as_dir" && as_dir=.
10053     for ac_exec_ext in '' $ac_executable_extensions; do
10054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10055     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10057     break 2
10058   fi
10059 done
10060   done
10061 IFS=$as_save_IFS
10062 
10063   ;;
10064 esac
10065 fi
10066 NAWK=$ac_cv_path_NAWK
10067 if test -n "$NAWK"; then
10068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10069 $as_echo "$NAWK" >&6; }
10070 else
10071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10072 $as_echo "no" >&6; }
10073 fi
10074 
10075 
10076   test -n "$NAWK" && break
10077 done
10078 
10079     else
10080       # If it succeeded, then it was overridden by the user. We will use it
10081       # for the tool.
10082 
10083       # First remove it from the list of overridden variables, so we can test
10084       # for unknown variables in the end.
10085       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10086 
10087       # Check if we try to supply an empty value
10088       if test "x$NAWK" = x; then
10089         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10090 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10091         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10092 $as_echo_n "checking for NAWK... " >&6; }
10093         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10094 $as_echo "disabled" >&6; }
10095       else
10096         # Check if the provided tool contains a complete path.
10097         tool_specified="$NAWK"
10098         tool_basename="${tool_specified##*/}"
10099         if test "x$tool_basename" = "x$tool_specified"; then
10100           # A command without a complete path is provided, search $PATH.
10101           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10102 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10103           # Extract the first word of "$tool_basename", so it can be a program name with args.
10104 set dummy $tool_basename; ac_word=$2
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10106 $as_echo_n "checking for $ac_word... " >&6; }
10107 if ${ac_cv_path_NAWK+:} false; then :
10108   $as_echo_n "(cached) " >&6
10109 else
10110   case $NAWK in
10111   [\\/]* | ?:[\\/]*)
10112   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10113   ;;
10114   *)
10115   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10116 for as_dir in $PATH
10117 do
10118   IFS=$as_save_IFS
10119   test -z "$as_dir" && as_dir=.
10120     for ac_exec_ext in '' $ac_executable_extensions; do
10121   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10122     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10123     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10124     break 2
10125   fi
10126 done
10127   done
10128 IFS=$as_save_IFS
10129 
10130   ;;
10131 esac
10132 fi
10133 NAWK=$ac_cv_path_NAWK
10134 if test -n "$NAWK"; then
10135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10136 $as_echo "$NAWK" >&6; }
10137 else
10138   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10139 $as_echo "no" >&6; }
10140 fi
10141 
10142 
10143           if test "x$NAWK" = x; then
10144             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10145           fi
10146         else
10147           # Otherwise we believe it is a complete path. Use it as it is.
10148           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10149 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10150           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10151 $as_echo_n "checking for NAWK... " >&6; }
10152           if test ! -x "$tool_specified"; then
10153             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10154 $as_echo "not found" >&6; }
10155             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10156           fi
10157           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10158 $as_echo "$tool_specified" >&6; }
10159         fi
10160       fi
10161     fi
10162 
10163   fi
10164 
10165 
10166 
10167   if test "x$NAWK" = x; then
10168     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10169   fi
10170 
10171 
10172 
10173 
10174 
10175   # Publish this variable in the help.
10176 
10177 
10178   if [ -z "${PRINTF+x}" ]; then
10179     # The variable is not set by user, try to locate tool using the code snippet
10180     for ac_prog in printf
10181 do
10182   # Extract the first word of "$ac_prog", so it can be a program name with args.
10183 set dummy $ac_prog; ac_word=$2
10184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10185 $as_echo_n "checking for $ac_word... " >&6; }
10186 if ${ac_cv_path_PRINTF+:} false; then :
10187   $as_echo_n "(cached) " >&6
10188 else
10189   case $PRINTF in
10190   [\\/]* | ?:[\\/]*)
10191   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10192   ;;
10193   *)
10194   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10195 for as_dir in $PATH
10196 do
10197   IFS=$as_save_IFS
10198   test -z "$as_dir" && as_dir=.
10199     for ac_exec_ext in '' $ac_executable_extensions; do
10200   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10201     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10202     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10203     break 2
10204   fi
10205 done
10206   done
10207 IFS=$as_save_IFS
10208 
10209   ;;
10210 esac
10211 fi
10212 PRINTF=$ac_cv_path_PRINTF
10213 if test -n "$PRINTF"; then
10214   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10215 $as_echo "$PRINTF" >&6; }
10216 else
10217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218 $as_echo "no" >&6; }
10219 fi
10220 
10221 
10222   test -n "$PRINTF" && break
10223 done
10224 
10225   else
10226     # The variable is set, but is it from the command line or the environment?
10227 
10228     # Try to remove the string !PRINTF! from our list.
10229     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10230     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10231       # If it failed, the variable was not from the command line. Ignore it,
10232       # but warn the user (except for BASH, which is always set by the calling BASH).
10233       if test "xPRINTF" != xBASH; then
10234         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10235 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10236       fi
10237       # Try to locate tool using the code snippet
10238       for ac_prog in printf
10239 do
10240   # Extract the first word of "$ac_prog", so it can be a program name with args.
10241 set dummy $ac_prog; ac_word=$2
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10243 $as_echo_n "checking for $ac_word... " >&6; }
10244 if ${ac_cv_path_PRINTF+:} false; then :
10245   $as_echo_n "(cached) " >&6
10246 else
10247   case $PRINTF in
10248   [\\/]* | ?:[\\/]*)
10249   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10250   ;;
10251   *)
10252   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10253 for as_dir in $PATH
10254 do
10255   IFS=$as_save_IFS
10256   test -z "$as_dir" && as_dir=.
10257     for ac_exec_ext in '' $ac_executable_extensions; do
10258   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10259     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10260     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10261     break 2
10262   fi
10263 done
10264   done
10265 IFS=$as_save_IFS
10266 
10267   ;;
10268 esac
10269 fi
10270 PRINTF=$ac_cv_path_PRINTF
10271 if test -n "$PRINTF"; then
10272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10273 $as_echo "$PRINTF" >&6; }
10274 else
10275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10276 $as_echo "no" >&6; }
10277 fi
10278 
10279 
10280   test -n "$PRINTF" && break
10281 done
10282 
10283     else
10284       # If it succeeded, then it was overridden by the user. We will use it
10285       # for the tool.
10286 
10287       # First remove it from the list of overridden variables, so we can test
10288       # for unknown variables in the end.
10289       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10290 
10291       # Check if we try to supply an empty value
10292       if test "x$PRINTF" = x; then
10293         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10294 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10296 $as_echo_n "checking for PRINTF... " >&6; }
10297         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10298 $as_echo "disabled" >&6; }
10299       else
10300         # Check if the provided tool contains a complete path.
10301         tool_specified="$PRINTF"
10302         tool_basename="${tool_specified##*/}"
10303         if test "x$tool_basename" = "x$tool_specified"; then
10304           # A command without a complete path is provided, search $PATH.
10305           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10306 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10307           # Extract the first word of "$tool_basename", so it can be a program name with args.
10308 set dummy $tool_basename; ac_word=$2
10309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10310 $as_echo_n "checking for $ac_word... " >&6; }
10311 if ${ac_cv_path_PRINTF+:} false; then :
10312   $as_echo_n "(cached) " >&6
10313 else
10314   case $PRINTF in
10315   [\\/]* | ?:[\\/]*)
10316   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10317   ;;
10318   *)
10319   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10320 for as_dir in $PATH
10321 do
10322   IFS=$as_save_IFS
10323   test -z "$as_dir" && as_dir=.
10324     for ac_exec_ext in '' $ac_executable_extensions; do
10325   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10326     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10327     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10328     break 2
10329   fi
10330 done
10331   done
10332 IFS=$as_save_IFS
10333 
10334   ;;
10335 esac
10336 fi
10337 PRINTF=$ac_cv_path_PRINTF
10338 if test -n "$PRINTF"; then
10339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10340 $as_echo "$PRINTF" >&6; }
10341 else
10342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10343 $as_echo "no" >&6; }
10344 fi
10345 
10346 
10347           if test "x$PRINTF" = x; then
10348             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10349           fi
10350         else
10351           # Otherwise we believe it is a complete path. Use it as it is.
10352           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10353 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10354           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10355 $as_echo_n "checking for PRINTF... " >&6; }
10356           if test ! -x "$tool_specified"; then
10357             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10358 $as_echo "not found" >&6; }
10359             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10360           fi
10361           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10362 $as_echo "$tool_specified" >&6; }
10363         fi
10364       fi
10365     fi
10366 
10367   fi
10368 
10369 
10370 
10371   if test "x$PRINTF" = x; then
10372     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10373   fi
10374 
10375 
10376 
10377 
10378 
10379   # Publish this variable in the help.
10380 
10381 
10382   if [ -z "${RM+x}" ]; then
10383     # The variable is not set by user, try to locate tool using the code snippet
10384     for ac_prog in rm
10385 do
10386   # Extract the first word of "$ac_prog", so it can be a program name with args.
10387 set dummy $ac_prog; ac_word=$2
10388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10389 $as_echo_n "checking for $ac_word... " >&6; }
10390 if ${ac_cv_path_RM+:} false; then :
10391   $as_echo_n "(cached) " >&6
10392 else
10393   case $RM in
10394   [\\/]* | ?:[\\/]*)
10395   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10396   ;;
10397   *)
10398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10399 for as_dir in $PATH
10400 do
10401   IFS=$as_save_IFS
10402   test -z "$as_dir" && as_dir=.
10403     for ac_exec_ext in '' $ac_executable_extensions; do
10404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10405     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10407     break 2
10408   fi
10409 done
10410   done
10411 IFS=$as_save_IFS
10412 
10413   ;;
10414 esac
10415 fi
10416 RM=$ac_cv_path_RM
10417 if test -n "$RM"; then
10418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10419 $as_echo "$RM" >&6; }
10420 else
10421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10422 $as_echo "no" >&6; }
10423 fi
10424 
10425 
10426   test -n "$RM" && break
10427 done
10428 
10429   else
10430     # The variable is set, but is it from the command line or the environment?
10431 
10432     # Try to remove the string !RM! from our list.
10433     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10434     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10435       # If it failed, the variable was not from the command line. Ignore it,
10436       # but warn the user (except for BASH, which is always set by the calling BASH).
10437       if test "xRM" != xBASH; then
10438         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10439 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10440       fi
10441       # Try to locate tool using the code snippet
10442       for ac_prog in rm
10443 do
10444   # Extract the first word of "$ac_prog", so it can be a program name with args.
10445 set dummy $ac_prog; ac_word=$2
10446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10447 $as_echo_n "checking for $ac_word... " >&6; }
10448 if ${ac_cv_path_RM+:} false; then :
10449   $as_echo_n "(cached) " >&6
10450 else
10451   case $RM in
10452   [\\/]* | ?:[\\/]*)
10453   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10454   ;;
10455   *)
10456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10457 for as_dir in $PATH
10458 do
10459   IFS=$as_save_IFS
10460   test -z "$as_dir" && as_dir=.
10461     for ac_exec_ext in '' $ac_executable_extensions; do
10462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10463     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10465     break 2
10466   fi
10467 done
10468   done
10469 IFS=$as_save_IFS
10470 
10471   ;;
10472 esac
10473 fi
10474 RM=$ac_cv_path_RM
10475 if test -n "$RM"; then
10476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10477 $as_echo "$RM" >&6; }
10478 else
10479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10480 $as_echo "no" >&6; }
10481 fi
10482 
10483 
10484   test -n "$RM" && break
10485 done
10486 
10487     else
10488       # If it succeeded, then it was overridden by the user. We will use it
10489       # for the tool.
10490 
10491       # First remove it from the list of overridden variables, so we can test
10492       # for unknown variables in the end.
10493       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10494 
10495       # Check if we try to supply an empty value
10496       if test "x$RM" = x; then
10497         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10498 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10499         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10500 $as_echo_n "checking for RM... " >&6; }
10501         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10502 $as_echo "disabled" >&6; }
10503       else
10504         # Check if the provided tool contains a complete path.
10505         tool_specified="$RM"
10506         tool_basename="${tool_specified##*/}"
10507         if test "x$tool_basename" = "x$tool_specified"; then
10508           # A command without a complete path is provided, search $PATH.
10509           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10510 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10511           # Extract the first word of "$tool_basename", so it can be a program name with args.
10512 set dummy $tool_basename; ac_word=$2
10513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10514 $as_echo_n "checking for $ac_word... " >&6; }
10515 if ${ac_cv_path_RM+:} false; then :
10516   $as_echo_n "(cached) " >&6
10517 else
10518   case $RM in
10519   [\\/]* | ?:[\\/]*)
10520   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10521   ;;
10522   *)
10523   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10524 for as_dir in $PATH
10525 do
10526   IFS=$as_save_IFS
10527   test -z "$as_dir" && as_dir=.
10528     for ac_exec_ext in '' $ac_executable_extensions; do
10529   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10530     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10531     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10532     break 2
10533   fi
10534 done
10535   done
10536 IFS=$as_save_IFS
10537 
10538   ;;
10539 esac
10540 fi
10541 RM=$ac_cv_path_RM
10542 if test -n "$RM"; then
10543   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10544 $as_echo "$RM" >&6; }
10545 else
10546   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10547 $as_echo "no" >&6; }
10548 fi
10549 
10550 
10551           if test "x$RM" = x; then
10552             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10553           fi
10554         else
10555           # Otherwise we believe it is a complete path. Use it as it is.
10556           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10557 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10558           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10559 $as_echo_n "checking for RM... " >&6; }
10560           if test ! -x "$tool_specified"; then
10561             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10562 $as_echo "not found" >&6; }
10563             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10564           fi
10565           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10566 $as_echo "$tool_specified" >&6; }
10567         fi
10568       fi
10569     fi
10570 
10571   fi
10572 
10573 
10574 
10575   if test "x$RM" = x; then
10576     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10577   fi
10578 
10579 
10580 
10581 
10582 
10583   # Publish this variable in the help.
10584 
10585 
10586   if [ -z "${RMDIR+x}" ]; then
10587     # The variable is not set by user, try to locate tool using the code snippet
10588     for ac_prog in rmdir
10589 do
10590   # Extract the first word of "$ac_prog", so it can be a program name with args.
10591 set dummy $ac_prog; ac_word=$2
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10593 $as_echo_n "checking for $ac_word... " >&6; }
10594 if ${ac_cv_path_RMDIR+:} false; then :
10595   $as_echo_n "(cached) " >&6
10596 else
10597   case $RMDIR in
10598   [\\/]* | ?:[\\/]*)
10599   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10600   ;;
10601   *)
10602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10603 for as_dir in $PATH
10604 do
10605   IFS=$as_save_IFS
10606   test -z "$as_dir" && as_dir=.
10607     for ac_exec_ext in '' $ac_executable_extensions; do
10608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10609     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10611     break 2
10612   fi
10613 done
10614   done
10615 IFS=$as_save_IFS
10616 
10617   ;;
10618 esac
10619 fi
10620 RMDIR=$ac_cv_path_RMDIR
10621 if test -n "$RMDIR"; then
10622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10623 $as_echo "$RMDIR" >&6; }
10624 else
10625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10626 $as_echo "no" >&6; }
10627 fi
10628 
10629 
10630   test -n "$RMDIR" && break
10631 done
10632 
10633   else
10634     # The variable is set, but is it from the command line or the environment?
10635 
10636     # Try to remove the string !RMDIR! from our list.
10637     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10638     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10639       # If it failed, the variable was not from the command line. Ignore it,
10640       # but warn the user (except for BASH, which is always set by the calling BASH).
10641       if test "xRMDIR" != xBASH; then
10642         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10643 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10644       fi
10645       # Try to locate tool using the code snippet
10646       for ac_prog in rmdir
10647 do
10648   # Extract the first word of "$ac_prog", so it can be a program name with args.
10649 set dummy $ac_prog; ac_word=$2
10650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10651 $as_echo_n "checking for $ac_word... " >&6; }
10652 if ${ac_cv_path_RMDIR+:} false; then :
10653   $as_echo_n "(cached) " >&6
10654 else
10655   case $RMDIR in
10656   [\\/]* | ?:[\\/]*)
10657   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10658   ;;
10659   *)
10660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10661 for as_dir in $PATH
10662 do
10663   IFS=$as_save_IFS
10664   test -z "$as_dir" && as_dir=.
10665     for ac_exec_ext in '' $ac_executable_extensions; do
10666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10667     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10669     break 2
10670   fi
10671 done
10672   done
10673 IFS=$as_save_IFS
10674 
10675   ;;
10676 esac
10677 fi
10678 RMDIR=$ac_cv_path_RMDIR
10679 if test -n "$RMDIR"; then
10680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10681 $as_echo "$RMDIR" >&6; }
10682 else
10683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10684 $as_echo "no" >&6; }
10685 fi
10686 
10687 
10688   test -n "$RMDIR" && break
10689 done
10690 
10691     else
10692       # If it succeeded, then it was overridden by the user. We will use it
10693       # for the tool.
10694 
10695       # First remove it from the list of overridden variables, so we can test
10696       # for unknown variables in the end.
10697       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10698 
10699       # Check if we try to supply an empty value
10700       if test "x$RMDIR" = x; then
10701         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10702 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10703         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10704 $as_echo_n "checking for RMDIR... " >&6; }
10705         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10706 $as_echo "disabled" >&6; }
10707       else
10708         # Check if the provided tool contains a complete path.
10709         tool_specified="$RMDIR"
10710         tool_basename="${tool_specified##*/}"
10711         if test "x$tool_basename" = "x$tool_specified"; then
10712           # A command without a complete path is provided, search $PATH.
10713           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10714 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10715           # Extract the first word of "$tool_basename", so it can be a program name with args.
10716 set dummy $tool_basename; ac_word=$2
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10718 $as_echo_n "checking for $ac_word... " >&6; }
10719 if ${ac_cv_path_RMDIR+:} false; then :
10720   $as_echo_n "(cached) " >&6
10721 else
10722   case $RMDIR in
10723   [\\/]* | ?:[\\/]*)
10724   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10725   ;;
10726   *)
10727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10728 for as_dir in $PATH
10729 do
10730   IFS=$as_save_IFS
10731   test -z "$as_dir" && as_dir=.
10732     for ac_exec_ext in '' $ac_executable_extensions; do
10733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10734     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10736     break 2
10737   fi
10738 done
10739   done
10740 IFS=$as_save_IFS
10741 
10742   ;;
10743 esac
10744 fi
10745 RMDIR=$ac_cv_path_RMDIR
10746 if test -n "$RMDIR"; then
10747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10748 $as_echo "$RMDIR" >&6; }
10749 else
10750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751 $as_echo "no" >&6; }
10752 fi
10753 
10754 
10755           if test "x$RMDIR" = x; then
10756             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10757           fi
10758         else
10759           # Otherwise we believe it is a complete path. Use it as it is.
10760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10761 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10762           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10763 $as_echo_n "checking for RMDIR... " >&6; }
10764           if test ! -x "$tool_specified"; then
10765             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10766 $as_echo "not found" >&6; }
10767             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10768           fi
10769           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10770 $as_echo "$tool_specified" >&6; }
10771         fi
10772       fi
10773     fi
10774 
10775   fi
10776 
10777 
10778 
10779   if test "x$RMDIR" = x; then
10780     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10781   fi
10782 
10783 
10784 
10785 
10786 
10787   # Publish this variable in the help.
10788 
10789 
10790   if [ -z "${SH+x}" ]; then
10791     # The variable is not set by user, try to locate tool using the code snippet
10792     for ac_prog in sh
10793 do
10794   # Extract the first word of "$ac_prog", so it can be a program name with args.
10795 set dummy $ac_prog; ac_word=$2
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10797 $as_echo_n "checking for $ac_word... " >&6; }
10798 if ${ac_cv_path_SH+:} false; then :
10799   $as_echo_n "(cached) " >&6
10800 else
10801   case $SH in
10802   [\\/]* | ?:[\\/]*)
10803   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10804   ;;
10805   *)
10806   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10807 for as_dir in $PATH
10808 do
10809   IFS=$as_save_IFS
10810   test -z "$as_dir" && as_dir=.
10811     for ac_exec_ext in '' $ac_executable_extensions; do
10812   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10813     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10814     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10815     break 2
10816   fi
10817 done
10818   done
10819 IFS=$as_save_IFS
10820 
10821   ;;
10822 esac
10823 fi
10824 SH=$ac_cv_path_SH
10825 if test -n "$SH"; then
10826   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10827 $as_echo "$SH" >&6; }
10828 else
10829   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10830 $as_echo "no" >&6; }
10831 fi
10832 
10833 
10834   test -n "$SH" && break
10835 done
10836 
10837   else
10838     # The variable is set, but is it from the command line or the environment?
10839 
10840     # Try to remove the string !SH! from our list.
10841     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10842     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10843       # If it failed, the variable was not from the command line. Ignore it,
10844       # but warn the user (except for BASH, which is always set by the calling BASH).
10845       if test "xSH" != xBASH; then
10846         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10847 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10848       fi
10849       # Try to locate tool using the code snippet
10850       for ac_prog in sh
10851 do
10852   # Extract the first word of "$ac_prog", so it can be a program name with args.
10853 set dummy $ac_prog; ac_word=$2
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10855 $as_echo_n "checking for $ac_word... " >&6; }
10856 if ${ac_cv_path_SH+:} false; then :
10857   $as_echo_n "(cached) " >&6
10858 else
10859   case $SH in
10860   [\\/]* | ?:[\\/]*)
10861   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10862   ;;
10863   *)
10864   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10865 for as_dir in $PATH
10866 do
10867   IFS=$as_save_IFS
10868   test -z "$as_dir" && as_dir=.
10869     for ac_exec_ext in '' $ac_executable_extensions; do
10870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10871     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10873     break 2
10874   fi
10875 done
10876   done
10877 IFS=$as_save_IFS
10878 
10879   ;;
10880 esac
10881 fi
10882 SH=$ac_cv_path_SH
10883 if test -n "$SH"; then
10884   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10885 $as_echo "$SH" >&6; }
10886 else
10887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10888 $as_echo "no" >&6; }
10889 fi
10890 
10891 
10892   test -n "$SH" && break
10893 done
10894 
10895     else
10896       # If it succeeded, then it was overridden by the user. We will use it
10897       # for the tool.
10898 
10899       # First remove it from the list of overridden variables, so we can test
10900       # for unknown variables in the end.
10901       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10902 
10903       # Check if we try to supply an empty value
10904       if test "x$SH" = x; then
10905         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10906 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10907         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10908 $as_echo_n "checking for SH... " >&6; }
10909         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10910 $as_echo "disabled" >&6; }
10911       else
10912         # Check if the provided tool contains a complete path.
10913         tool_specified="$SH"
10914         tool_basename="${tool_specified##*/}"
10915         if test "x$tool_basename" = "x$tool_specified"; then
10916           # A command without a complete path is provided, search $PATH.
10917           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10918 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10919           # Extract the first word of "$tool_basename", so it can be a program name with args.
10920 set dummy $tool_basename; ac_word=$2
10921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10922 $as_echo_n "checking for $ac_word... " >&6; }
10923 if ${ac_cv_path_SH+:} false; then :
10924   $as_echo_n "(cached) " >&6
10925 else
10926   case $SH in
10927   [\\/]* | ?:[\\/]*)
10928   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10929   ;;
10930   *)
10931   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10932 for as_dir in $PATH
10933 do
10934   IFS=$as_save_IFS
10935   test -z "$as_dir" && as_dir=.
10936     for ac_exec_ext in '' $ac_executable_extensions; do
10937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10938     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10940     break 2
10941   fi
10942 done
10943   done
10944 IFS=$as_save_IFS
10945 
10946   ;;
10947 esac
10948 fi
10949 SH=$ac_cv_path_SH
10950 if test -n "$SH"; then
10951   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10952 $as_echo "$SH" >&6; }
10953 else
10954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10955 $as_echo "no" >&6; }
10956 fi
10957 
10958 
10959           if test "x$SH" = x; then
10960             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10961           fi
10962         else
10963           # Otherwise we believe it is a complete path. Use it as it is.
10964           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10965 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10966           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10967 $as_echo_n "checking for SH... " >&6; }
10968           if test ! -x "$tool_specified"; then
10969             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10970 $as_echo "not found" >&6; }
10971             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10972           fi
10973           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10974 $as_echo "$tool_specified" >&6; }
10975         fi
10976       fi
10977     fi
10978 
10979   fi
10980 
10981 
10982 
10983   if test "x$SH" = x; then
10984     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10985   fi
10986 
10987 
10988 
10989 
10990 
10991   # Publish this variable in the help.
10992 
10993 
10994   if [ -z "${SORT+x}" ]; then
10995     # The variable is not set by user, try to locate tool using the code snippet
10996     for ac_prog in sort
10997 do
10998   # Extract the first word of "$ac_prog", so it can be a program name with args.
10999 set dummy $ac_prog; ac_word=$2
11000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11001 $as_echo_n "checking for $ac_word... " >&6; }
11002 if ${ac_cv_path_SORT+:} false; then :
11003   $as_echo_n "(cached) " >&6
11004 else
11005   case $SORT in
11006   [\\/]* | ?:[\\/]*)
11007   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11008   ;;
11009   *)
11010   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11011 for as_dir in $PATH
11012 do
11013   IFS=$as_save_IFS
11014   test -z "$as_dir" && as_dir=.
11015     for ac_exec_ext in '' $ac_executable_extensions; do
11016   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11017     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11018     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11019     break 2
11020   fi
11021 done
11022   done
11023 IFS=$as_save_IFS
11024 
11025   ;;
11026 esac
11027 fi
11028 SORT=$ac_cv_path_SORT
11029 if test -n "$SORT"; then
11030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11031 $as_echo "$SORT" >&6; }
11032 else
11033   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11034 $as_echo "no" >&6; }
11035 fi
11036 
11037 
11038   test -n "$SORT" && break
11039 done
11040 
11041   else
11042     # The variable is set, but is it from the command line or the environment?
11043 
11044     # Try to remove the string !SORT! from our list.
11045     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11046     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11047       # If it failed, the variable was not from the command line. Ignore it,
11048       # but warn the user (except for BASH, which is always set by the calling BASH).
11049       if test "xSORT" != xBASH; then
11050         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11051 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11052       fi
11053       # Try to locate tool using the code snippet
11054       for ac_prog in sort
11055 do
11056   # Extract the first word of "$ac_prog", so it can be a program name with args.
11057 set dummy $ac_prog; ac_word=$2
11058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11059 $as_echo_n "checking for $ac_word... " >&6; }
11060 if ${ac_cv_path_SORT+:} false; then :
11061   $as_echo_n "(cached) " >&6
11062 else
11063   case $SORT in
11064   [\\/]* | ?:[\\/]*)
11065   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11066   ;;
11067   *)
11068   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11069 for as_dir in $PATH
11070 do
11071   IFS=$as_save_IFS
11072   test -z "$as_dir" && as_dir=.
11073     for ac_exec_ext in '' $ac_executable_extensions; do
11074   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11075     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11076     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11077     break 2
11078   fi
11079 done
11080   done
11081 IFS=$as_save_IFS
11082 
11083   ;;
11084 esac
11085 fi
11086 SORT=$ac_cv_path_SORT
11087 if test -n "$SORT"; then
11088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11089 $as_echo "$SORT" >&6; }
11090 else
11091   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11092 $as_echo "no" >&6; }
11093 fi
11094 
11095 
11096   test -n "$SORT" && break
11097 done
11098 
11099     else
11100       # If it succeeded, then it was overridden by the user. We will use it
11101       # for the tool.
11102 
11103       # First remove it from the list of overridden variables, so we can test
11104       # for unknown variables in the end.
11105       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11106 
11107       # Check if we try to supply an empty value
11108       if test "x$SORT" = x; then
11109         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11110 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11111         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11112 $as_echo_n "checking for SORT... " >&6; }
11113         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11114 $as_echo "disabled" >&6; }
11115       else
11116         # Check if the provided tool contains a complete path.
11117         tool_specified="$SORT"
11118         tool_basename="${tool_specified##*/}"
11119         if test "x$tool_basename" = "x$tool_specified"; then
11120           # A command without a complete path is provided, search $PATH.
11121           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11122 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11123           # Extract the first word of "$tool_basename", so it can be a program name with args.
11124 set dummy $tool_basename; ac_word=$2
11125 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11126 $as_echo_n "checking for $ac_word... " >&6; }
11127 if ${ac_cv_path_SORT+:} false; then :
11128   $as_echo_n "(cached) " >&6
11129 else
11130   case $SORT in
11131   [\\/]* | ?:[\\/]*)
11132   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11133   ;;
11134   *)
11135   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11136 for as_dir in $PATH
11137 do
11138   IFS=$as_save_IFS
11139   test -z "$as_dir" && as_dir=.
11140     for ac_exec_ext in '' $ac_executable_extensions; do
11141   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11142     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11143     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11144     break 2
11145   fi
11146 done
11147   done
11148 IFS=$as_save_IFS
11149 
11150   ;;
11151 esac
11152 fi
11153 SORT=$ac_cv_path_SORT
11154 if test -n "$SORT"; then
11155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11156 $as_echo "$SORT" >&6; }
11157 else
11158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11159 $as_echo "no" >&6; }
11160 fi
11161 
11162 
11163           if test "x$SORT" = x; then
11164             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11165           fi
11166         else
11167           # Otherwise we believe it is a complete path. Use it as it is.
11168           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11169 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11170           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11171 $as_echo_n "checking for SORT... " >&6; }
11172           if test ! -x "$tool_specified"; then
11173             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11174 $as_echo "not found" >&6; }
11175             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11176           fi
11177           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11178 $as_echo "$tool_specified" >&6; }
11179         fi
11180       fi
11181     fi
11182 
11183   fi
11184 
11185 
11186 
11187   if test "x$SORT" = x; then
11188     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11189   fi
11190 
11191 
11192 
11193 
11194 
11195   # Publish this variable in the help.
11196 
11197 
11198   if [ -z "${TAIL+x}" ]; then
11199     # The variable is not set by user, try to locate tool using the code snippet
11200     for ac_prog in tail
11201 do
11202   # Extract the first word of "$ac_prog", so it can be a program name with args.
11203 set dummy $ac_prog; ac_word=$2
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11205 $as_echo_n "checking for $ac_word... " >&6; }
11206 if ${ac_cv_path_TAIL+:} false; then :
11207   $as_echo_n "(cached) " >&6
11208 else
11209   case $TAIL in
11210   [\\/]* | ?:[\\/]*)
11211   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11212   ;;
11213   *)
11214   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11215 for as_dir in $PATH
11216 do
11217   IFS=$as_save_IFS
11218   test -z "$as_dir" && as_dir=.
11219     for ac_exec_ext in '' $ac_executable_extensions; do
11220   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11221     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11222     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11223     break 2
11224   fi
11225 done
11226   done
11227 IFS=$as_save_IFS
11228 
11229   ;;
11230 esac
11231 fi
11232 TAIL=$ac_cv_path_TAIL
11233 if test -n "$TAIL"; then
11234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11235 $as_echo "$TAIL" >&6; }
11236 else
11237   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11238 $as_echo "no" >&6; }
11239 fi
11240 
11241 
11242   test -n "$TAIL" && break
11243 done
11244 
11245   else
11246     # The variable is set, but is it from the command line or the environment?
11247 
11248     # Try to remove the string !TAIL! from our list.
11249     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11250     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11251       # If it failed, the variable was not from the command line. Ignore it,
11252       # but warn the user (except for BASH, which is always set by the calling BASH).
11253       if test "xTAIL" != xBASH; then
11254         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11255 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11256       fi
11257       # Try to locate tool using the code snippet
11258       for ac_prog in tail
11259 do
11260   # Extract the first word of "$ac_prog", so it can be a program name with args.
11261 set dummy $ac_prog; ac_word=$2
11262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11263 $as_echo_n "checking for $ac_word... " >&6; }
11264 if ${ac_cv_path_TAIL+:} false; then :
11265   $as_echo_n "(cached) " >&6
11266 else
11267   case $TAIL in
11268   [\\/]* | ?:[\\/]*)
11269   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11270   ;;
11271   *)
11272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11273 for as_dir in $PATH
11274 do
11275   IFS=$as_save_IFS
11276   test -z "$as_dir" && as_dir=.
11277     for ac_exec_ext in '' $ac_executable_extensions; do
11278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11279     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11281     break 2
11282   fi
11283 done
11284   done
11285 IFS=$as_save_IFS
11286 
11287   ;;
11288 esac
11289 fi
11290 TAIL=$ac_cv_path_TAIL
11291 if test -n "$TAIL"; then
11292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11293 $as_echo "$TAIL" >&6; }
11294 else
11295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296 $as_echo "no" >&6; }
11297 fi
11298 
11299 
11300   test -n "$TAIL" && break
11301 done
11302 
11303     else
11304       # If it succeeded, then it was overridden by the user. We will use it
11305       # for the tool.
11306 
11307       # First remove it from the list of overridden variables, so we can test
11308       # for unknown variables in the end.
11309       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11310 
11311       # Check if we try to supply an empty value
11312       if test "x$TAIL" = x; then
11313         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11314 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11315         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11316 $as_echo_n "checking for TAIL... " >&6; }
11317         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11318 $as_echo "disabled" >&6; }
11319       else
11320         # Check if the provided tool contains a complete path.
11321         tool_specified="$TAIL"
11322         tool_basename="${tool_specified##*/}"
11323         if test "x$tool_basename" = "x$tool_specified"; then
11324           # A command without a complete path is provided, search $PATH.
11325           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11326 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11327           # Extract the first word of "$tool_basename", so it can be a program name with args.
11328 set dummy $tool_basename; ac_word=$2
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11330 $as_echo_n "checking for $ac_word... " >&6; }
11331 if ${ac_cv_path_TAIL+:} false; then :
11332   $as_echo_n "(cached) " >&6
11333 else
11334   case $TAIL in
11335   [\\/]* | ?:[\\/]*)
11336   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11337   ;;
11338   *)
11339   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11340 for as_dir in $PATH
11341 do
11342   IFS=$as_save_IFS
11343   test -z "$as_dir" && as_dir=.
11344     for ac_exec_ext in '' $ac_executable_extensions; do
11345   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11346     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11347     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11348     break 2
11349   fi
11350 done
11351   done
11352 IFS=$as_save_IFS
11353 
11354   ;;
11355 esac
11356 fi
11357 TAIL=$ac_cv_path_TAIL
11358 if test -n "$TAIL"; then
11359   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11360 $as_echo "$TAIL" >&6; }
11361 else
11362   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11363 $as_echo "no" >&6; }
11364 fi
11365 
11366 
11367           if test "x$TAIL" = x; then
11368             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11369           fi
11370         else
11371           # Otherwise we believe it is a complete path. Use it as it is.
11372           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11373 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11374           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11375 $as_echo_n "checking for TAIL... " >&6; }
11376           if test ! -x "$tool_specified"; then
11377             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11378 $as_echo "not found" >&6; }
11379             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11380           fi
11381           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11382 $as_echo "$tool_specified" >&6; }
11383         fi
11384       fi
11385     fi
11386 
11387   fi
11388 
11389 
11390 
11391   if test "x$TAIL" = x; then
11392     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11393   fi
11394 
11395 
11396 
11397 
11398 
11399   # Publish this variable in the help.
11400 
11401 
11402   if [ -z "${TAR+x}" ]; then
11403     # The variable is not set by user, try to locate tool using the code snippet
11404     for ac_prog in gtar tar
11405 do
11406   # Extract the first word of "$ac_prog", so it can be a program name with args.
11407 set dummy $ac_prog; ac_word=$2
11408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11409 $as_echo_n "checking for $ac_word... " >&6; }
11410 if ${ac_cv_path_TAR+:} false; then :
11411   $as_echo_n "(cached) " >&6
11412 else
11413   case $TAR in
11414   [\\/]* | ?:[\\/]*)
11415   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11416   ;;
11417   *)
11418   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11419 for as_dir in $PATH
11420 do
11421   IFS=$as_save_IFS
11422   test -z "$as_dir" && as_dir=.
11423     for ac_exec_ext in '' $ac_executable_extensions; do
11424   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11425     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11426     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11427     break 2
11428   fi
11429 done
11430   done
11431 IFS=$as_save_IFS
11432 
11433   ;;
11434 esac
11435 fi
11436 TAR=$ac_cv_path_TAR
11437 if test -n "$TAR"; then
11438   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11439 $as_echo "$TAR" >&6; }
11440 else
11441   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11442 $as_echo "no" >&6; }
11443 fi
11444 
11445 
11446   test -n "$TAR" && break
11447 done
11448 
11449   else
11450     # The variable is set, but is it from the command line or the environment?
11451 
11452     # Try to remove the string !TAR! from our list.
11453     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11454     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11455       # If it failed, the variable was not from the command line. Ignore it,
11456       # but warn the user (except for BASH, which is always set by the calling BASH).
11457       if test "xTAR" != xBASH; then
11458         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11459 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11460       fi
11461       # Try to locate tool using the code snippet
11462       for ac_prog in gtar tar
11463 do
11464   # Extract the first word of "$ac_prog", so it can be a program name with args.
11465 set dummy $ac_prog; ac_word=$2
11466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11467 $as_echo_n "checking for $ac_word... " >&6; }
11468 if ${ac_cv_path_TAR+:} false; then :
11469   $as_echo_n "(cached) " >&6
11470 else
11471   case $TAR in
11472   [\\/]* | ?:[\\/]*)
11473   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11474   ;;
11475   *)
11476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11477 for as_dir in $PATH
11478 do
11479   IFS=$as_save_IFS
11480   test -z "$as_dir" && as_dir=.
11481     for ac_exec_ext in '' $ac_executable_extensions; do
11482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11483     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11485     break 2
11486   fi
11487 done
11488   done
11489 IFS=$as_save_IFS
11490 
11491   ;;
11492 esac
11493 fi
11494 TAR=$ac_cv_path_TAR
11495 if test -n "$TAR"; then
11496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11497 $as_echo "$TAR" >&6; }
11498 else
11499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11500 $as_echo "no" >&6; }
11501 fi
11502 
11503 
11504   test -n "$TAR" && break
11505 done
11506 
11507     else
11508       # If it succeeded, then it was overridden by the user. We will use it
11509       # for the tool.
11510 
11511       # First remove it from the list of overridden variables, so we can test
11512       # for unknown variables in the end.
11513       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11514 
11515       # Check if we try to supply an empty value
11516       if test "x$TAR" = x; then
11517         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11518 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11519         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11520 $as_echo_n "checking for TAR... " >&6; }
11521         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11522 $as_echo "disabled" >&6; }
11523       else
11524         # Check if the provided tool contains a complete path.
11525         tool_specified="$TAR"
11526         tool_basename="${tool_specified##*/}"
11527         if test "x$tool_basename" = "x$tool_specified"; then
11528           # A command without a complete path is provided, search $PATH.
11529           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11530 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11531           # Extract the first word of "$tool_basename", so it can be a program name with args.
11532 set dummy $tool_basename; ac_word=$2
11533 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11534 $as_echo_n "checking for $ac_word... " >&6; }
11535 if ${ac_cv_path_TAR+:} false; then :
11536   $as_echo_n "(cached) " >&6
11537 else
11538   case $TAR in
11539   [\\/]* | ?:[\\/]*)
11540   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11541   ;;
11542   *)
11543   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11544 for as_dir in $PATH
11545 do
11546   IFS=$as_save_IFS
11547   test -z "$as_dir" && as_dir=.
11548     for ac_exec_ext in '' $ac_executable_extensions; do
11549   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11550     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11551     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11552     break 2
11553   fi
11554 done
11555   done
11556 IFS=$as_save_IFS
11557 
11558   ;;
11559 esac
11560 fi
11561 TAR=$ac_cv_path_TAR
11562 if test -n "$TAR"; then
11563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11564 $as_echo "$TAR" >&6; }
11565 else
11566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11567 $as_echo "no" >&6; }
11568 fi
11569 
11570 
11571           if test "x$TAR" = x; then
11572             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11573           fi
11574         else
11575           # Otherwise we believe it is a complete path. Use it as it is.
11576           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11577 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11578           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11579 $as_echo_n "checking for TAR... " >&6; }
11580           if test ! -x "$tool_specified"; then
11581             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11582 $as_echo "not found" >&6; }
11583             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11584           fi
11585           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11586 $as_echo "$tool_specified" >&6; }
11587         fi
11588       fi
11589     fi
11590 
11591   fi
11592 
11593 
11594 
11595   if test "x$TAR" = x; then
11596     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11597   fi
11598 
11599 
11600 
11601 
11602 
11603   # Publish this variable in the help.
11604 
11605 
11606   if [ -z "${TEE+x}" ]; then
11607     # The variable is not set by user, try to locate tool using the code snippet
11608     for ac_prog in tee
11609 do
11610   # Extract the first word of "$ac_prog", so it can be a program name with args.
11611 set dummy $ac_prog; ac_word=$2
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11613 $as_echo_n "checking for $ac_word... " >&6; }
11614 if ${ac_cv_path_TEE+:} false; then :
11615   $as_echo_n "(cached) " >&6
11616 else
11617   case $TEE in
11618   [\\/]* | ?:[\\/]*)
11619   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11620   ;;
11621   *)
11622   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11623 for as_dir in $PATH
11624 do
11625   IFS=$as_save_IFS
11626   test -z "$as_dir" && as_dir=.
11627     for ac_exec_ext in '' $ac_executable_extensions; do
11628   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11629     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11630     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11631     break 2
11632   fi
11633 done
11634   done
11635 IFS=$as_save_IFS
11636 
11637   ;;
11638 esac
11639 fi
11640 TEE=$ac_cv_path_TEE
11641 if test -n "$TEE"; then
11642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11643 $as_echo "$TEE" >&6; }
11644 else
11645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11646 $as_echo "no" >&6; }
11647 fi
11648 
11649 
11650   test -n "$TEE" && break
11651 done
11652 
11653   else
11654     # The variable is set, but is it from the command line or the environment?
11655 
11656     # Try to remove the string !TEE! from our list.
11657     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11658     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11659       # If it failed, the variable was not from the command line. Ignore it,
11660       # but warn the user (except for BASH, which is always set by the calling BASH).
11661       if test "xTEE" != xBASH; then
11662         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11663 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11664       fi
11665       # Try to locate tool using the code snippet
11666       for ac_prog in tee
11667 do
11668   # Extract the first word of "$ac_prog", so it can be a program name with args.
11669 set dummy $ac_prog; ac_word=$2
11670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11671 $as_echo_n "checking for $ac_word... " >&6; }
11672 if ${ac_cv_path_TEE+:} false; then :
11673   $as_echo_n "(cached) " >&6
11674 else
11675   case $TEE in
11676   [\\/]* | ?:[\\/]*)
11677   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11678   ;;
11679   *)
11680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11681 for as_dir in $PATH
11682 do
11683   IFS=$as_save_IFS
11684   test -z "$as_dir" && as_dir=.
11685     for ac_exec_ext in '' $ac_executable_extensions; do
11686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11687     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11689     break 2
11690   fi
11691 done
11692   done
11693 IFS=$as_save_IFS
11694 
11695   ;;
11696 esac
11697 fi
11698 TEE=$ac_cv_path_TEE
11699 if test -n "$TEE"; then
11700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11701 $as_echo "$TEE" >&6; }
11702 else
11703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11704 $as_echo "no" >&6; }
11705 fi
11706 
11707 
11708   test -n "$TEE" && break
11709 done
11710 
11711     else
11712       # If it succeeded, then it was overridden by the user. We will use it
11713       # for the tool.
11714 
11715       # First remove it from the list of overridden variables, so we can test
11716       # for unknown variables in the end.
11717       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11718 
11719       # Check if we try to supply an empty value
11720       if test "x$TEE" = x; then
11721         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11722 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11723         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11724 $as_echo_n "checking for TEE... " >&6; }
11725         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11726 $as_echo "disabled" >&6; }
11727       else
11728         # Check if the provided tool contains a complete path.
11729         tool_specified="$TEE"
11730         tool_basename="${tool_specified##*/}"
11731         if test "x$tool_basename" = "x$tool_specified"; then
11732           # A command without a complete path is provided, search $PATH.
11733           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11734 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11735           # Extract the first word of "$tool_basename", so it can be a program name with args.
11736 set dummy $tool_basename; ac_word=$2
11737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11738 $as_echo_n "checking for $ac_word... " >&6; }
11739 if ${ac_cv_path_TEE+:} false; then :
11740   $as_echo_n "(cached) " >&6
11741 else
11742   case $TEE in
11743   [\\/]* | ?:[\\/]*)
11744   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11745   ;;
11746   *)
11747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11748 for as_dir in $PATH
11749 do
11750   IFS=$as_save_IFS
11751   test -z "$as_dir" && as_dir=.
11752     for ac_exec_ext in '' $ac_executable_extensions; do
11753   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11754     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11756     break 2
11757   fi
11758 done
11759   done
11760 IFS=$as_save_IFS
11761 
11762   ;;
11763 esac
11764 fi
11765 TEE=$ac_cv_path_TEE
11766 if test -n "$TEE"; then
11767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11768 $as_echo "$TEE" >&6; }
11769 else
11770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11771 $as_echo "no" >&6; }
11772 fi
11773 
11774 
11775           if test "x$TEE" = x; then
11776             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11777           fi
11778         else
11779           # Otherwise we believe it is a complete path. Use it as it is.
11780           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11781 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11782           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11783 $as_echo_n "checking for TEE... " >&6; }
11784           if test ! -x "$tool_specified"; then
11785             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11786 $as_echo "not found" >&6; }
11787             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11788           fi
11789           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11790 $as_echo "$tool_specified" >&6; }
11791         fi
11792       fi
11793     fi
11794 
11795   fi
11796 
11797 
11798 
11799   if test "x$TEE" = x; then
11800     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11801   fi
11802 
11803 
11804 
11805 
11806 
11807   # Publish this variable in the help.
11808 
11809 
11810   if [ -z "${TOUCH+x}" ]; then
11811     # The variable is not set by user, try to locate tool using the code snippet
11812     for ac_prog in touch
11813 do
11814   # Extract the first word of "$ac_prog", so it can be a program name with args.
11815 set dummy $ac_prog; ac_word=$2
11816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11817 $as_echo_n "checking for $ac_word... " >&6; }
11818 if ${ac_cv_path_TOUCH+:} false; then :
11819   $as_echo_n "(cached) " >&6
11820 else
11821   case $TOUCH in
11822   [\\/]* | ?:[\\/]*)
11823   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11824   ;;
11825   *)
11826   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11827 for as_dir in $PATH
11828 do
11829   IFS=$as_save_IFS
11830   test -z "$as_dir" && as_dir=.
11831     for ac_exec_ext in '' $ac_executable_extensions; do
11832   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11833     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11834     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11835     break 2
11836   fi
11837 done
11838   done
11839 IFS=$as_save_IFS
11840 
11841   ;;
11842 esac
11843 fi
11844 TOUCH=$ac_cv_path_TOUCH
11845 if test -n "$TOUCH"; then
11846   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11847 $as_echo "$TOUCH" >&6; }
11848 else
11849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11850 $as_echo "no" >&6; }
11851 fi
11852 
11853 
11854   test -n "$TOUCH" && break
11855 done
11856 
11857   else
11858     # The variable is set, but is it from the command line or the environment?
11859 
11860     # Try to remove the string !TOUCH! from our list.
11861     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11862     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11863       # If it failed, the variable was not from the command line. Ignore it,
11864       # but warn the user (except for BASH, which is always set by the calling BASH).
11865       if test "xTOUCH" != xBASH; then
11866         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11867 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11868       fi
11869       # Try to locate tool using the code snippet
11870       for ac_prog in touch
11871 do
11872   # Extract the first word of "$ac_prog", so it can be a program name with args.
11873 set dummy $ac_prog; ac_word=$2
11874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11875 $as_echo_n "checking for $ac_word... " >&6; }
11876 if ${ac_cv_path_TOUCH+:} false; then :
11877   $as_echo_n "(cached) " >&6
11878 else
11879   case $TOUCH in
11880   [\\/]* | ?:[\\/]*)
11881   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11882   ;;
11883   *)
11884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11885 for as_dir in $PATH
11886 do
11887   IFS=$as_save_IFS
11888   test -z "$as_dir" && as_dir=.
11889     for ac_exec_ext in '' $ac_executable_extensions; do
11890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11891     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11893     break 2
11894   fi
11895 done
11896   done
11897 IFS=$as_save_IFS
11898 
11899   ;;
11900 esac
11901 fi
11902 TOUCH=$ac_cv_path_TOUCH
11903 if test -n "$TOUCH"; then
11904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11905 $as_echo "$TOUCH" >&6; }
11906 else
11907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11908 $as_echo "no" >&6; }
11909 fi
11910 
11911 
11912   test -n "$TOUCH" && break
11913 done
11914 
11915     else
11916       # If it succeeded, then it was overridden by the user. We will use it
11917       # for the tool.
11918 
11919       # First remove it from the list of overridden variables, so we can test
11920       # for unknown variables in the end.
11921       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11922 
11923       # Check if we try to supply an empty value
11924       if test "x$TOUCH" = x; then
11925         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11926 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11927         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11928 $as_echo_n "checking for TOUCH... " >&6; }
11929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11930 $as_echo "disabled" >&6; }
11931       else
11932         # Check if the provided tool contains a complete path.
11933         tool_specified="$TOUCH"
11934         tool_basename="${tool_specified##*/}"
11935         if test "x$tool_basename" = "x$tool_specified"; then
11936           # A command without a complete path is provided, search $PATH.
11937           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11938 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11939           # Extract the first word of "$tool_basename", so it can be a program name with args.
11940 set dummy $tool_basename; ac_word=$2
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11942 $as_echo_n "checking for $ac_word... " >&6; }
11943 if ${ac_cv_path_TOUCH+:} false; then :
11944   $as_echo_n "(cached) " >&6
11945 else
11946   case $TOUCH in
11947   [\\/]* | ?:[\\/]*)
11948   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11949   ;;
11950   *)
11951   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11952 for as_dir in $PATH
11953 do
11954   IFS=$as_save_IFS
11955   test -z "$as_dir" && as_dir=.
11956     for ac_exec_ext in '' $ac_executable_extensions; do
11957   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11958     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11959     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11960     break 2
11961   fi
11962 done
11963   done
11964 IFS=$as_save_IFS
11965 
11966   ;;
11967 esac
11968 fi
11969 TOUCH=$ac_cv_path_TOUCH
11970 if test -n "$TOUCH"; then
11971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11972 $as_echo "$TOUCH" >&6; }
11973 else
11974   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11975 $as_echo "no" >&6; }
11976 fi
11977 
11978 
11979           if test "x$TOUCH" = x; then
11980             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11981           fi
11982         else
11983           # Otherwise we believe it is a complete path. Use it as it is.
11984           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11985 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11986           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11987 $as_echo_n "checking for TOUCH... " >&6; }
11988           if test ! -x "$tool_specified"; then
11989             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11990 $as_echo "not found" >&6; }
11991             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11992           fi
11993           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11994 $as_echo "$tool_specified" >&6; }
11995         fi
11996       fi
11997     fi
11998 
11999   fi
12000 
12001 
12002 
12003   if test "x$TOUCH" = x; then
12004     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
12005   fi
12006 
12007 
12008 
12009 
12010 
12011   # Publish this variable in the help.
12012 
12013 
12014   if [ -z "${TR+x}" ]; then
12015     # The variable is not set by user, try to locate tool using the code snippet
12016     for ac_prog in tr
12017 do
12018   # Extract the first word of "$ac_prog", so it can be a program name with args.
12019 set dummy $ac_prog; ac_word=$2
12020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12021 $as_echo_n "checking for $ac_word... " >&6; }
12022 if ${ac_cv_path_TR+:} false; then :
12023   $as_echo_n "(cached) " >&6
12024 else
12025   case $TR in
12026   [\\/]* | ?:[\\/]*)
12027   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12028   ;;
12029   *)
12030   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12031 for as_dir in $PATH
12032 do
12033   IFS=$as_save_IFS
12034   test -z "$as_dir" && as_dir=.
12035     for ac_exec_ext in '' $ac_executable_extensions; do
12036   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12037     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12038     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12039     break 2
12040   fi
12041 done
12042   done
12043 IFS=$as_save_IFS
12044 
12045   ;;
12046 esac
12047 fi
12048 TR=$ac_cv_path_TR
12049 if test -n "$TR"; then
12050   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12051 $as_echo "$TR" >&6; }
12052 else
12053   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12054 $as_echo "no" >&6; }
12055 fi
12056 
12057 
12058   test -n "$TR" && break
12059 done
12060 
12061   else
12062     # The variable is set, but is it from the command line or the environment?
12063 
12064     # Try to remove the string !TR! from our list.
12065     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12066     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12067       # If it failed, the variable was not from the command line. Ignore it,
12068       # but warn the user (except for BASH, which is always set by the calling BASH).
12069       if test "xTR" != xBASH; then
12070         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12071 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12072       fi
12073       # Try to locate tool using the code snippet
12074       for ac_prog in tr
12075 do
12076   # Extract the first word of "$ac_prog", so it can be a program name with args.
12077 set dummy $ac_prog; ac_word=$2
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12079 $as_echo_n "checking for $ac_word... " >&6; }
12080 if ${ac_cv_path_TR+:} false; then :
12081   $as_echo_n "(cached) " >&6
12082 else
12083   case $TR in
12084   [\\/]* | ?:[\\/]*)
12085   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12086   ;;
12087   *)
12088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12089 for as_dir in $PATH
12090 do
12091   IFS=$as_save_IFS
12092   test -z "$as_dir" && as_dir=.
12093     for ac_exec_ext in '' $ac_executable_extensions; do
12094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12095     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12097     break 2
12098   fi
12099 done
12100   done
12101 IFS=$as_save_IFS
12102 
12103   ;;
12104 esac
12105 fi
12106 TR=$ac_cv_path_TR
12107 if test -n "$TR"; then
12108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12109 $as_echo "$TR" >&6; }
12110 else
12111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12112 $as_echo "no" >&6; }
12113 fi
12114 
12115 
12116   test -n "$TR" && break
12117 done
12118 
12119     else
12120       # If it succeeded, then it was overridden by the user. We will use it
12121       # for the tool.
12122 
12123       # First remove it from the list of overridden variables, so we can test
12124       # for unknown variables in the end.
12125       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12126 
12127       # Check if we try to supply an empty value
12128       if test "x$TR" = x; then
12129         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12130 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12131         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12132 $as_echo_n "checking for TR... " >&6; }
12133         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12134 $as_echo "disabled" >&6; }
12135       else
12136         # Check if the provided tool contains a complete path.
12137         tool_specified="$TR"
12138         tool_basename="${tool_specified##*/}"
12139         if test "x$tool_basename" = "x$tool_specified"; then
12140           # A command without a complete path is provided, search $PATH.
12141           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12142 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12143           # Extract the first word of "$tool_basename", so it can be a program name with args.
12144 set dummy $tool_basename; ac_word=$2
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12146 $as_echo_n "checking for $ac_word... " >&6; }
12147 if ${ac_cv_path_TR+:} false; then :
12148   $as_echo_n "(cached) " >&6
12149 else
12150   case $TR in
12151   [\\/]* | ?:[\\/]*)
12152   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12153   ;;
12154   *)
12155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12156 for as_dir in $PATH
12157 do
12158   IFS=$as_save_IFS
12159   test -z "$as_dir" && as_dir=.
12160     for ac_exec_ext in '' $ac_executable_extensions; do
12161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12162     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12164     break 2
12165   fi
12166 done
12167   done
12168 IFS=$as_save_IFS
12169 
12170   ;;
12171 esac
12172 fi
12173 TR=$ac_cv_path_TR
12174 if test -n "$TR"; then
12175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12176 $as_echo "$TR" >&6; }
12177 else
12178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12179 $as_echo "no" >&6; }
12180 fi
12181 
12182 
12183           if test "x$TR" = x; then
12184             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12185           fi
12186         else
12187           # Otherwise we believe it is a complete path. Use it as it is.
12188           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12189 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12190           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12191 $as_echo_n "checking for TR... " >&6; }
12192           if test ! -x "$tool_specified"; then
12193             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12194 $as_echo "not found" >&6; }
12195             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12196           fi
12197           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12198 $as_echo "$tool_specified" >&6; }
12199         fi
12200       fi
12201     fi
12202 
12203   fi
12204 
12205 
12206 
12207   if test "x$TR" = x; then
12208     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12209   fi
12210 
12211 
12212 
12213 
12214 
12215   # Publish this variable in the help.
12216 
12217 
12218   if [ -z "${UNAME+x}" ]; then
12219     # The variable is not set by user, try to locate tool using the code snippet
12220     for ac_prog in uname
12221 do
12222   # Extract the first word of "$ac_prog", so it can be a program name with args.
12223 set dummy $ac_prog; ac_word=$2
12224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12225 $as_echo_n "checking for $ac_word... " >&6; }
12226 if ${ac_cv_path_UNAME+:} false; then :
12227   $as_echo_n "(cached) " >&6
12228 else
12229   case $UNAME in
12230   [\\/]* | ?:[\\/]*)
12231   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12232   ;;
12233   *)
12234   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12235 for as_dir in $PATH
12236 do
12237   IFS=$as_save_IFS
12238   test -z "$as_dir" && as_dir=.
12239     for ac_exec_ext in '' $ac_executable_extensions; do
12240   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12241     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12242     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12243     break 2
12244   fi
12245 done
12246   done
12247 IFS=$as_save_IFS
12248 
12249   ;;
12250 esac
12251 fi
12252 UNAME=$ac_cv_path_UNAME
12253 if test -n "$UNAME"; then
12254   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12255 $as_echo "$UNAME" >&6; }
12256 else
12257   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12258 $as_echo "no" >&6; }
12259 fi
12260 
12261 
12262   test -n "$UNAME" && break
12263 done
12264 
12265   else
12266     # The variable is set, but is it from the command line or the environment?
12267 
12268     # Try to remove the string !UNAME! from our list.
12269     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12270     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12271       # If it failed, the variable was not from the command line. Ignore it,
12272       # but warn the user (except for BASH, which is always set by the calling BASH).
12273       if test "xUNAME" != xBASH; then
12274         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12275 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12276       fi
12277       # Try to locate tool using the code snippet
12278       for ac_prog in uname
12279 do
12280   # Extract the first word of "$ac_prog", so it can be a program name with args.
12281 set dummy $ac_prog; ac_word=$2
12282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12283 $as_echo_n "checking for $ac_word... " >&6; }
12284 if ${ac_cv_path_UNAME+:} false; then :
12285   $as_echo_n "(cached) " >&6
12286 else
12287   case $UNAME in
12288   [\\/]* | ?:[\\/]*)
12289   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12290   ;;
12291   *)
12292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12293 for as_dir in $PATH
12294 do
12295   IFS=$as_save_IFS
12296   test -z "$as_dir" && as_dir=.
12297     for ac_exec_ext in '' $ac_executable_extensions; do
12298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12299     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12301     break 2
12302   fi
12303 done
12304   done
12305 IFS=$as_save_IFS
12306 
12307   ;;
12308 esac
12309 fi
12310 UNAME=$ac_cv_path_UNAME
12311 if test -n "$UNAME"; then
12312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12313 $as_echo "$UNAME" >&6; }
12314 else
12315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12316 $as_echo "no" >&6; }
12317 fi
12318 
12319 
12320   test -n "$UNAME" && break
12321 done
12322 
12323     else
12324       # If it succeeded, then it was overridden by the user. We will use it
12325       # for the tool.
12326 
12327       # First remove it from the list of overridden variables, so we can test
12328       # for unknown variables in the end.
12329       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12330 
12331       # Check if we try to supply an empty value
12332       if test "x$UNAME" = x; then
12333         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12334 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12335         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12336 $as_echo_n "checking for UNAME... " >&6; }
12337         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12338 $as_echo "disabled" >&6; }
12339       else
12340         # Check if the provided tool contains a complete path.
12341         tool_specified="$UNAME"
12342         tool_basename="${tool_specified##*/}"
12343         if test "x$tool_basename" = "x$tool_specified"; then
12344           # A command without a complete path is provided, search $PATH.
12345           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12346 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12347           # Extract the first word of "$tool_basename", so it can be a program name with args.
12348 set dummy $tool_basename; ac_word=$2
12349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12350 $as_echo_n "checking for $ac_word... " >&6; }
12351 if ${ac_cv_path_UNAME+:} false; then :
12352   $as_echo_n "(cached) " >&6
12353 else
12354   case $UNAME in
12355   [\\/]* | ?:[\\/]*)
12356   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12357   ;;
12358   *)
12359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12360 for as_dir in $PATH
12361 do
12362   IFS=$as_save_IFS
12363   test -z "$as_dir" && as_dir=.
12364     for ac_exec_ext in '' $ac_executable_extensions; do
12365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12366     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12368     break 2
12369   fi
12370 done
12371   done
12372 IFS=$as_save_IFS
12373 
12374   ;;
12375 esac
12376 fi
12377 UNAME=$ac_cv_path_UNAME
12378 if test -n "$UNAME"; then
12379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12380 $as_echo "$UNAME" >&6; }
12381 else
12382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12383 $as_echo "no" >&6; }
12384 fi
12385 
12386 
12387           if test "x$UNAME" = x; then
12388             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12389           fi
12390         else
12391           # Otherwise we believe it is a complete path. Use it as it is.
12392           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12393 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12394           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12395 $as_echo_n "checking for UNAME... " >&6; }
12396           if test ! -x "$tool_specified"; then
12397             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12398 $as_echo "not found" >&6; }
12399             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12400           fi
12401           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12402 $as_echo "$tool_specified" >&6; }
12403         fi
12404       fi
12405     fi
12406 
12407   fi
12408 
12409 
12410 
12411   if test "x$UNAME" = x; then
12412     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12413   fi
12414 
12415 
12416 
12417 
12418 
12419   # Publish this variable in the help.
12420 
12421 
12422   if [ -z "${UNIQ+x}" ]; then
12423     # The variable is not set by user, try to locate tool using the code snippet
12424     for ac_prog in uniq
12425 do
12426   # Extract the first word of "$ac_prog", so it can be a program name with args.
12427 set dummy $ac_prog; ac_word=$2
12428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12429 $as_echo_n "checking for $ac_word... " >&6; }
12430 if ${ac_cv_path_UNIQ+:} false; then :
12431   $as_echo_n "(cached) " >&6
12432 else
12433   case $UNIQ in
12434   [\\/]* | ?:[\\/]*)
12435   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12436   ;;
12437   *)
12438   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12439 for as_dir in $PATH
12440 do
12441   IFS=$as_save_IFS
12442   test -z "$as_dir" && as_dir=.
12443     for ac_exec_ext in '' $ac_executable_extensions; do
12444   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12445     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12446     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12447     break 2
12448   fi
12449 done
12450   done
12451 IFS=$as_save_IFS
12452 
12453   ;;
12454 esac
12455 fi
12456 UNIQ=$ac_cv_path_UNIQ
12457 if test -n "$UNIQ"; then
12458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12459 $as_echo "$UNIQ" >&6; }
12460 else
12461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12462 $as_echo "no" >&6; }
12463 fi
12464 
12465 
12466   test -n "$UNIQ" && break
12467 done
12468 
12469   else
12470     # The variable is set, but is it from the command line or the environment?
12471 
12472     # Try to remove the string !UNIQ! from our list.
12473     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12474     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12475       # If it failed, the variable was not from the command line. Ignore it,
12476       # but warn the user (except for BASH, which is always set by the calling BASH).
12477       if test "xUNIQ" != xBASH; then
12478         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12479 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12480       fi
12481       # Try to locate tool using the code snippet
12482       for ac_prog in uniq
12483 do
12484   # Extract the first word of "$ac_prog", so it can be a program name with args.
12485 set dummy $ac_prog; ac_word=$2
12486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12487 $as_echo_n "checking for $ac_word... " >&6; }
12488 if ${ac_cv_path_UNIQ+:} false; then :
12489   $as_echo_n "(cached) " >&6
12490 else
12491   case $UNIQ in
12492   [\\/]* | ?:[\\/]*)
12493   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12494   ;;
12495   *)
12496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12497 for as_dir in $PATH
12498 do
12499   IFS=$as_save_IFS
12500   test -z "$as_dir" && as_dir=.
12501     for ac_exec_ext in '' $ac_executable_extensions; do
12502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12503     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12505     break 2
12506   fi
12507 done
12508   done
12509 IFS=$as_save_IFS
12510 
12511   ;;
12512 esac
12513 fi
12514 UNIQ=$ac_cv_path_UNIQ
12515 if test -n "$UNIQ"; then
12516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12517 $as_echo "$UNIQ" >&6; }
12518 else
12519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12520 $as_echo "no" >&6; }
12521 fi
12522 
12523 
12524   test -n "$UNIQ" && break
12525 done
12526 
12527     else
12528       # If it succeeded, then it was overridden by the user. We will use it
12529       # for the tool.
12530 
12531       # First remove it from the list of overridden variables, so we can test
12532       # for unknown variables in the end.
12533       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12534 
12535       # Check if we try to supply an empty value
12536       if test "x$UNIQ" = x; then
12537         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12538 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12539         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12540 $as_echo_n "checking for UNIQ... " >&6; }
12541         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12542 $as_echo "disabled" >&6; }
12543       else
12544         # Check if the provided tool contains a complete path.
12545         tool_specified="$UNIQ"
12546         tool_basename="${tool_specified##*/}"
12547         if test "x$tool_basename" = "x$tool_specified"; then
12548           # A command without a complete path is provided, search $PATH.
12549           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12550 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12551           # Extract the first word of "$tool_basename", so it can be a program name with args.
12552 set dummy $tool_basename; ac_word=$2
12553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12554 $as_echo_n "checking for $ac_word... " >&6; }
12555 if ${ac_cv_path_UNIQ+:} false; then :
12556   $as_echo_n "(cached) " >&6
12557 else
12558   case $UNIQ in
12559   [\\/]* | ?:[\\/]*)
12560   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12561   ;;
12562   *)
12563   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12564 for as_dir in $PATH
12565 do
12566   IFS=$as_save_IFS
12567   test -z "$as_dir" && as_dir=.
12568     for ac_exec_ext in '' $ac_executable_extensions; do
12569   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12570     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12571     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12572     break 2
12573   fi
12574 done
12575   done
12576 IFS=$as_save_IFS
12577 
12578   ;;
12579 esac
12580 fi
12581 UNIQ=$ac_cv_path_UNIQ
12582 if test -n "$UNIQ"; then
12583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12584 $as_echo "$UNIQ" >&6; }
12585 else
12586   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12587 $as_echo "no" >&6; }
12588 fi
12589 
12590 
12591           if test "x$UNIQ" = x; then
12592             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12593           fi
12594         else
12595           # Otherwise we believe it is a complete path. Use it as it is.
12596           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12597 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12598           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12599 $as_echo_n "checking for UNIQ... " >&6; }
12600           if test ! -x "$tool_specified"; then
12601             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12602 $as_echo "not found" >&6; }
12603             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12604           fi
12605           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12606 $as_echo "$tool_specified" >&6; }
12607         fi
12608       fi
12609     fi
12610 
12611   fi
12612 
12613 
12614 
12615   if test "x$UNIQ" = x; then
12616     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12617   fi
12618 
12619 
12620 
12621 
12622 
12623   # Publish this variable in the help.
12624 
12625 
12626   if [ -z "${WC+x}" ]; then
12627     # The variable is not set by user, try to locate tool using the code snippet
12628     for ac_prog in wc
12629 do
12630   # Extract the first word of "$ac_prog", so it can be a program name with args.
12631 set dummy $ac_prog; ac_word=$2
12632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12633 $as_echo_n "checking for $ac_word... " >&6; }
12634 if ${ac_cv_path_WC+:} false; then :
12635   $as_echo_n "(cached) " >&6
12636 else
12637   case $WC in
12638   [\\/]* | ?:[\\/]*)
12639   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12640   ;;
12641   *)
12642   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12643 for as_dir in $PATH
12644 do
12645   IFS=$as_save_IFS
12646   test -z "$as_dir" && as_dir=.
12647     for ac_exec_ext in '' $ac_executable_extensions; do
12648   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12649     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12650     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12651     break 2
12652   fi
12653 done
12654   done
12655 IFS=$as_save_IFS
12656 
12657   ;;
12658 esac
12659 fi
12660 WC=$ac_cv_path_WC
12661 if test -n "$WC"; then
12662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12663 $as_echo "$WC" >&6; }
12664 else
12665   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12666 $as_echo "no" >&6; }
12667 fi
12668 
12669 
12670   test -n "$WC" && break
12671 done
12672 
12673   else
12674     # The variable is set, but is it from the command line or the environment?
12675 
12676     # Try to remove the string !WC! from our list.
12677     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12678     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12679       # If it failed, the variable was not from the command line. Ignore it,
12680       # but warn the user (except for BASH, which is always set by the calling BASH).
12681       if test "xWC" != xBASH; then
12682         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12683 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12684       fi
12685       # Try to locate tool using the code snippet
12686       for ac_prog in wc
12687 do
12688   # Extract the first word of "$ac_prog", so it can be a program name with args.
12689 set dummy $ac_prog; ac_word=$2
12690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12691 $as_echo_n "checking for $ac_word... " >&6; }
12692 if ${ac_cv_path_WC+:} false; then :
12693   $as_echo_n "(cached) " >&6
12694 else
12695   case $WC in
12696   [\\/]* | ?:[\\/]*)
12697   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12698   ;;
12699   *)
12700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12701 for as_dir in $PATH
12702 do
12703   IFS=$as_save_IFS
12704   test -z "$as_dir" && as_dir=.
12705     for ac_exec_ext in '' $ac_executable_extensions; do
12706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12707     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12709     break 2
12710   fi
12711 done
12712   done
12713 IFS=$as_save_IFS
12714 
12715   ;;
12716 esac
12717 fi
12718 WC=$ac_cv_path_WC
12719 if test -n "$WC"; then
12720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12721 $as_echo "$WC" >&6; }
12722 else
12723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12724 $as_echo "no" >&6; }
12725 fi
12726 
12727 
12728   test -n "$WC" && break
12729 done
12730 
12731     else
12732       # If it succeeded, then it was overridden by the user. We will use it
12733       # for the tool.
12734 
12735       # First remove it from the list of overridden variables, so we can test
12736       # for unknown variables in the end.
12737       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12738 
12739       # Check if we try to supply an empty value
12740       if test "x$WC" = x; then
12741         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12742 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12743         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12744 $as_echo_n "checking for WC... " >&6; }
12745         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12746 $as_echo "disabled" >&6; }
12747       else
12748         # Check if the provided tool contains a complete path.
12749         tool_specified="$WC"
12750         tool_basename="${tool_specified##*/}"
12751         if test "x$tool_basename" = "x$tool_specified"; then
12752           # A command without a complete path is provided, search $PATH.
12753           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12754 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12755           # Extract the first word of "$tool_basename", so it can be a program name with args.
12756 set dummy $tool_basename; ac_word=$2
12757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12758 $as_echo_n "checking for $ac_word... " >&6; }
12759 if ${ac_cv_path_WC+:} false; then :
12760   $as_echo_n "(cached) " >&6
12761 else
12762   case $WC in
12763   [\\/]* | ?:[\\/]*)
12764   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12765   ;;
12766   *)
12767   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12768 for as_dir in $PATH
12769 do
12770   IFS=$as_save_IFS
12771   test -z "$as_dir" && as_dir=.
12772     for ac_exec_ext in '' $ac_executable_extensions; do
12773   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12774     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12775     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12776     break 2
12777   fi
12778 done
12779   done
12780 IFS=$as_save_IFS
12781 
12782   ;;
12783 esac
12784 fi
12785 WC=$ac_cv_path_WC
12786 if test -n "$WC"; then
12787   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12788 $as_echo "$WC" >&6; }
12789 else
12790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12791 $as_echo "no" >&6; }
12792 fi
12793 
12794 
12795           if test "x$WC" = x; then
12796             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12797           fi
12798         else
12799           # Otherwise we believe it is a complete path. Use it as it is.
12800           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12801 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12802           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12803 $as_echo_n "checking for WC... " >&6; }
12804           if test ! -x "$tool_specified"; then
12805             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12806 $as_echo "not found" >&6; }
12807             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12808           fi
12809           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12810 $as_echo "$tool_specified" >&6; }
12811         fi
12812       fi
12813     fi
12814 
12815   fi
12816 
12817 
12818 
12819   if test "x$WC" = x; then
12820     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12821   fi
12822 
12823 
12824 
12825 
12826 
12827   # Publish this variable in the help.
12828 
12829 
12830   if [ -z "${WHICH+x}" ]; then
12831     # The variable is not set by user, try to locate tool using the code snippet
12832     for ac_prog in which
12833 do
12834   # Extract the first word of "$ac_prog", so it can be a program name with args.
12835 set dummy $ac_prog; ac_word=$2
12836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12837 $as_echo_n "checking for $ac_word... " >&6; }
12838 if ${ac_cv_path_WHICH+:} false; then :
12839   $as_echo_n "(cached) " >&6
12840 else
12841   case $WHICH in
12842   [\\/]* | ?:[\\/]*)
12843   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12844   ;;
12845   *)
12846   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12847 for as_dir in $PATH
12848 do
12849   IFS=$as_save_IFS
12850   test -z "$as_dir" && as_dir=.
12851     for ac_exec_ext in '' $ac_executable_extensions; do
12852   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12853     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12854     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12855     break 2
12856   fi
12857 done
12858   done
12859 IFS=$as_save_IFS
12860 
12861   ;;
12862 esac
12863 fi
12864 WHICH=$ac_cv_path_WHICH
12865 if test -n "$WHICH"; then
12866   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12867 $as_echo "$WHICH" >&6; }
12868 else
12869   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12870 $as_echo "no" >&6; }
12871 fi
12872 
12873 
12874   test -n "$WHICH" && break
12875 done
12876 
12877   else
12878     # The variable is set, but is it from the command line or the environment?
12879 
12880     # Try to remove the string !WHICH! from our list.
12881     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12882     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12883       # If it failed, the variable was not from the command line. Ignore it,
12884       # but warn the user (except for BASH, which is always set by the calling BASH).
12885       if test "xWHICH" != xBASH; then
12886         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12887 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12888       fi
12889       # Try to locate tool using the code snippet
12890       for ac_prog in which
12891 do
12892   # Extract the first word of "$ac_prog", so it can be a program name with args.
12893 set dummy $ac_prog; ac_word=$2
12894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12895 $as_echo_n "checking for $ac_word... " >&6; }
12896 if ${ac_cv_path_WHICH+:} false; then :
12897   $as_echo_n "(cached) " >&6
12898 else
12899   case $WHICH in
12900   [\\/]* | ?:[\\/]*)
12901   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12902   ;;
12903   *)
12904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12905 for as_dir in $PATH
12906 do
12907   IFS=$as_save_IFS
12908   test -z "$as_dir" && as_dir=.
12909     for ac_exec_ext in '' $ac_executable_extensions; do
12910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12911     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12913     break 2
12914   fi
12915 done
12916   done
12917 IFS=$as_save_IFS
12918 
12919   ;;
12920 esac
12921 fi
12922 WHICH=$ac_cv_path_WHICH
12923 if test -n "$WHICH"; then
12924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12925 $as_echo "$WHICH" >&6; }
12926 else
12927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12928 $as_echo "no" >&6; }
12929 fi
12930 
12931 
12932   test -n "$WHICH" && break
12933 done
12934 
12935     else
12936       # If it succeeded, then it was overridden by the user. We will use it
12937       # for the tool.
12938 
12939       # First remove it from the list of overridden variables, so we can test
12940       # for unknown variables in the end.
12941       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12942 
12943       # Check if we try to supply an empty value
12944       if test "x$WHICH" = x; then
12945         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12946 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12947         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12948 $as_echo_n "checking for WHICH... " >&6; }
12949         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12950 $as_echo "disabled" >&6; }
12951       else
12952         # Check if the provided tool contains a complete path.
12953         tool_specified="$WHICH"
12954         tool_basename="${tool_specified##*/}"
12955         if test "x$tool_basename" = "x$tool_specified"; then
12956           # A command without a complete path is provided, search $PATH.
12957           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12958 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12959           # Extract the first word of "$tool_basename", so it can be a program name with args.
12960 set dummy $tool_basename; ac_word=$2
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12962 $as_echo_n "checking for $ac_word... " >&6; }
12963 if ${ac_cv_path_WHICH+:} false; then :
12964   $as_echo_n "(cached) " >&6
12965 else
12966   case $WHICH in
12967   [\\/]* | ?:[\\/]*)
12968   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12969   ;;
12970   *)
12971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12972 for as_dir in $PATH
12973 do
12974   IFS=$as_save_IFS
12975   test -z "$as_dir" && as_dir=.
12976     for ac_exec_ext in '' $ac_executable_extensions; do
12977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12978     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12980     break 2
12981   fi
12982 done
12983   done
12984 IFS=$as_save_IFS
12985 
12986   ;;
12987 esac
12988 fi
12989 WHICH=$ac_cv_path_WHICH
12990 if test -n "$WHICH"; then
12991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12992 $as_echo "$WHICH" >&6; }
12993 else
12994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12995 $as_echo "no" >&6; }
12996 fi
12997 
12998 
12999           if test "x$WHICH" = x; then
13000             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13001           fi
13002         else
13003           # Otherwise we believe it is a complete path. Use it as it is.
13004           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
13005 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
13006           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
13007 $as_echo_n "checking for WHICH... " >&6; }
13008           if test ! -x "$tool_specified"; then
13009             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13010 $as_echo "not found" >&6; }
13011             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
13012           fi
13013           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13014 $as_echo "$tool_specified" >&6; }
13015         fi
13016       fi
13017     fi
13018 
13019   fi
13020 
13021 
13022 
13023   if test "x$WHICH" = x; then
13024     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
13025   fi
13026 
13027 
13028 
13029 
13030 
13031   # Publish this variable in the help.
13032 
13033 
13034   if [ -z "${XARGS+x}" ]; then
13035     # The variable is not set by user, try to locate tool using the code snippet
13036     for ac_prog in xargs
13037 do
13038   # Extract the first word of "$ac_prog", so it can be a program name with args.
13039 set dummy $ac_prog; ac_word=$2
13040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13041 $as_echo_n "checking for $ac_word... " >&6; }
13042 if ${ac_cv_path_XARGS+:} false; then :
13043   $as_echo_n "(cached) " >&6
13044 else
13045   case $XARGS in
13046   [\\/]* | ?:[\\/]*)
13047   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13048   ;;
13049   *)
13050   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13051 for as_dir in $PATH
13052 do
13053   IFS=$as_save_IFS
13054   test -z "$as_dir" && as_dir=.
13055     for ac_exec_ext in '' $ac_executable_extensions; do
13056   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13057     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13058     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13059     break 2
13060   fi
13061 done
13062   done
13063 IFS=$as_save_IFS
13064 
13065   ;;
13066 esac
13067 fi
13068 XARGS=$ac_cv_path_XARGS
13069 if test -n "$XARGS"; then
13070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13071 $as_echo "$XARGS" >&6; }
13072 else
13073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13074 $as_echo "no" >&6; }
13075 fi
13076 
13077 
13078   test -n "$XARGS" && break
13079 done
13080 
13081   else
13082     # The variable is set, but is it from the command line or the environment?
13083 
13084     # Try to remove the string !XARGS! from our list.
13085     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13086     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13087       # If it failed, the variable was not from the command line. Ignore it,
13088       # but warn the user (except for BASH, which is always set by the calling BASH).
13089       if test "xXARGS" != xBASH; then
13090         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13091 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13092       fi
13093       # Try to locate tool using the code snippet
13094       for ac_prog in xargs
13095 do
13096   # Extract the first word of "$ac_prog", so it can be a program name with args.
13097 set dummy $ac_prog; ac_word=$2
13098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13099 $as_echo_n "checking for $ac_word... " >&6; }
13100 if ${ac_cv_path_XARGS+:} false; then :
13101   $as_echo_n "(cached) " >&6
13102 else
13103   case $XARGS in
13104   [\\/]* | ?:[\\/]*)
13105   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13106   ;;
13107   *)
13108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13109 for as_dir in $PATH
13110 do
13111   IFS=$as_save_IFS
13112   test -z "$as_dir" && as_dir=.
13113     for ac_exec_ext in '' $ac_executable_extensions; do
13114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13115     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13117     break 2
13118   fi
13119 done
13120   done
13121 IFS=$as_save_IFS
13122 
13123   ;;
13124 esac
13125 fi
13126 XARGS=$ac_cv_path_XARGS
13127 if test -n "$XARGS"; then
13128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13129 $as_echo "$XARGS" >&6; }
13130 else
13131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13132 $as_echo "no" >&6; }
13133 fi
13134 
13135 
13136   test -n "$XARGS" && break
13137 done
13138 
13139     else
13140       # If it succeeded, then it was overridden by the user. We will use it
13141       # for the tool.
13142 
13143       # First remove it from the list of overridden variables, so we can test
13144       # for unknown variables in the end.
13145       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13146 
13147       # Check if we try to supply an empty value
13148       if test "x$XARGS" = x; then
13149         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13150 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13151         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13152 $as_echo_n "checking for XARGS... " >&6; }
13153         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13154 $as_echo "disabled" >&6; }
13155       else
13156         # Check if the provided tool contains a complete path.
13157         tool_specified="$XARGS"
13158         tool_basename="${tool_specified##*/}"
13159         if test "x$tool_basename" = "x$tool_specified"; then
13160           # A command without a complete path is provided, search $PATH.
13161           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13162 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13163           # Extract the first word of "$tool_basename", so it can be a program name with args.
13164 set dummy $tool_basename; ac_word=$2
13165 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13166 $as_echo_n "checking for $ac_word... " >&6; }
13167 if ${ac_cv_path_XARGS+:} false; then :
13168   $as_echo_n "(cached) " >&6
13169 else
13170   case $XARGS in
13171   [\\/]* | ?:[\\/]*)
13172   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13173   ;;
13174   *)
13175   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13176 for as_dir in $PATH
13177 do
13178   IFS=$as_save_IFS
13179   test -z "$as_dir" && as_dir=.
13180     for ac_exec_ext in '' $ac_executable_extensions; do
13181   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13182     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13183     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13184     break 2
13185   fi
13186 done
13187   done
13188 IFS=$as_save_IFS
13189 
13190   ;;
13191 esac
13192 fi
13193 XARGS=$ac_cv_path_XARGS
13194 if test -n "$XARGS"; then
13195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13196 $as_echo "$XARGS" >&6; }
13197 else
13198   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13199 $as_echo "no" >&6; }
13200 fi
13201 
13202 
13203           if test "x$XARGS" = x; then
13204             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13205           fi
13206         else
13207           # Otherwise we believe it is a complete path. Use it as it is.
13208           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13209 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13210           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13211 $as_echo_n "checking for XARGS... " >&6; }
13212           if test ! -x "$tool_specified"; then
13213             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13214 $as_echo "not found" >&6; }
13215             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13216           fi
13217           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13218 $as_echo "$tool_specified" >&6; }
13219         fi
13220       fi
13221     fi
13222 
13223   fi
13224 
13225 
13226 
13227   if test "x$XARGS" = x; then
13228     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13229   fi
13230 
13231 
13232 
13233   # Then required tools that require some special treatment.
13234 
13235 
13236   # Publish this variable in the help.
13237 
13238 
13239   if [ -z "${AWK+x}" ]; then
13240     # The variable is not set by user, try to locate tool using the code snippet
13241     for ac_prog in gawk mawk nawk awk
13242 do
13243   # Extract the first word of "$ac_prog", so it can be a program name with args.
13244 set dummy $ac_prog; ac_word=$2
13245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13246 $as_echo_n "checking for $ac_word... " >&6; }
13247 if ${ac_cv_prog_AWK+:} false; then :
13248   $as_echo_n "(cached) " >&6
13249 else
13250   if test -n "$AWK"; then
13251   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13252 else
13253 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13254 for as_dir in $PATH
13255 do
13256   IFS=$as_save_IFS
13257   test -z "$as_dir" && as_dir=.
13258     for ac_exec_ext in '' $ac_executable_extensions; do
13259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13260     ac_cv_prog_AWK="$ac_prog"
13261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13262     break 2
13263   fi
13264 done
13265   done
13266 IFS=$as_save_IFS
13267 
13268 fi
13269 fi
13270 AWK=$ac_cv_prog_AWK
13271 if test -n "$AWK"; then
13272   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13273 $as_echo "$AWK" >&6; }
13274 else
13275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13276 $as_echo "no" >&6; }
13277 fi
13278 
13279 
13280   test -n "$AWK" && break
13281 done
13282 
13283   else
13284     # The variable is set, but is it from the command line or the environment?
13285 
13286     # Try to remove the string !AWK! from our list.
13287     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13288     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13289       # If it failed, the variable was not from the command line. Ignore it,
13290       # but warn the user (except for BASH, which is always set by the calling BASH).
13291       if test "xAWK" != xBASH; then
13292         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13293 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13294       fi
13295       # Try to locate tool using the code snippet
13296       for ac_prog in gawk mawk nawk awk
13297 do
13298   # Extract the first word of "$ac_prog", so it can be a program name with args.
13299 set dummy $ac_prog; ac_word=$2
13300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13301 $as_echo_n "checking for $ac_word... " >&6; }
13302 if ${ac_cv_prog_AWK+:} false; then :
13303   $as_echo_n "(cached) " >&6
13304 else
13305   if test -n "$AWK"; then
13306   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13307 else
13308 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13309 for as_dir in $PATH
13310 do
13311   IFS=$as_save_IFS
13312   test -z "$as_dir" && as_dir=.
13313     for ac_exec_ext in '' $ac_executable_extensions; do
13314   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13315     ac_cv_prog_AWK="$ac_prog"
13316     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13317     break 2
13318   fi
13319 done
13320   done
13321 IFS=$as_save_IFS
13322 
13323 fi
13324 fi
13325 AWK=$ac_cv_prog_AWK
13326 if test -n "$AWK"; then
13327   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13328 $as_echo "$AWK" >&6; }
13329 else
13330   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13331 $as_echo "no" >&6; }
13332 fi
13333 
13334 
13335   test -n "$AWK" && break
13336 done
13337 
13338     else
13339       # If it succeeded, then it was overridden by the user. We will use it
13340       # for the tool.
13341 
13342       # First remove it from the list of overridden variables, so we can test
13343       # for unknown variables in the end.
13344       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13345 
13346       # Check if we try to supply an empty value
13347       if test "x$AWK" = x; then
13348         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13349 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13350         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13351 $as_echo_n "checking for AWK... " >&6; }
13352         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13353 $as_echo "disabled" >&6; }
13354       else
13355         # Check if the provided tool contains a complete path.
13356         tool_specified="$AWK"
13357         tool_basename="${tool_specified##*/}"
13358         if test "x$tool_basename" = "x$tool_specified"; then
13359           # A command without a complete path is provided, search $PATH.
13360           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13361 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13362           # Extract the first word of "$tool_basename", so it can be a program name with args.
13363 set dummy $tool_basename; ac_word=$2
13364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13365 $as_echo_n "checking for $ac_word... " >&6; }
13366 if ${ac_cv_path_AWK+:} false; then :
13367   $as_echo_n "(cached) " >&6
13368 else
13369   case $AWK in
13370   [\\/]* | ?:[\\/]*)
13371   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13372   ;;
13373   *)
13374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13375 for as_dir in $PATH
13376 do
13377   IFS=$as_save_IFS
13378   test -z "$as_dir" && as_dir=.
13379     for ac_exec_ext in '' $ac_executable_extensions; do
13380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13381     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13383     break 2
13384   fi
13385 done
13386   done
13387 IFS=$as_save_IFS
13388 
13389   ;;
13390 esac
13391 fi
13392 AWK=$ac_cv_path_AWK
13393 if test -n "$AWK"; then
13394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13395 $as_echo "$AWK" >&6; }
13396 else
13397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13398 $as_echo "no" >&6; }
13399 fi
13400 
13401 
13402           if test "x$AWK" = x; then
13403             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13404           fi
13405         else
13406           # Otherwise we believe it is a complete path. Use it as it is.
13407           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13408 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13409           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13410 $as_echo_n "checking for AWK... " >&6; }
13411           if test ! -x "$tool_specified"; then
13412             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13413 $as_echo "not found" >&6; }
13414             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13415           fi
13416           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13417 $as_echo "$tool_specified" >&6; }
13418         fi
13419       fi
13420     fi
13421 
13422   fi
13423 
13424 
13425   if test "x$AWK" = x; then
13426     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13427   fi
13428 
13429 
13430 
13431 
13432   # Publish this variable in the help.
13433 
13434 
13435   if [ -z "${GREP+x}" ]; then
13436     # The variable is not set by user, try to locate tool using the code snippet
13437     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13438 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13439 if ${ac_cv_path_GREP+:} false; then :
13440   $as_echo_n "(cached) " >&6
13441 else
13442   if test -z "$GREP"; then
13443   ac_path_GREP_found=false
13444   # Loop through the user's path and test for each of PROGNAME-LIST
13445   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13446 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13447 do
13448   IFS=$as_save_IFS
13449   test -z "$as_dir" && as_dir=.
13450     for ac_prog in grep ggrep; do
13451     for ac_exec_ext in '' $ac_executable_extensions; do
13452       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13453       as_fn_executable_p "$ac_path_GREP" || continue
13454 # Check for GNU ac_path_GREP and select it if it is found.
13455   # Check for GNU $ac_path_GREP
13456 case `"$ac_path_GREP" --version 2>&1` in
13457 *GNU*)
13458   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13459 *)
13460   ac_count=0
13461   $as_echo_n 0123456789 >"conftest.in"
13462   while :
13463   do
13464     cat "conftest.in" "conftest.in" >"conftest.tmp"
13465     mv "conftest.tmp" "conftest.in"
13466     cp "conftest.in" "conftest.nl"
13467     $as_echo 'GREP' >> "conftest.nl"
13468     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13469     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13470     as_fn_arith $ac_count + 1 && ac_count=$as_val
13471     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13472       # Best one so far, save it but keep looking for a better one
13473       ac_cv_path_GREP="$ac_path_GREP"
13474       ac_path_GREP_max=$ac_count
13475     fi
13476     # 10*(2^10) chars as input seems more than enough
13477     test $ac_count -gt 10 && break
13478   done
13479   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13480 esac
13481 
13482       $ac_path_GREP_found && break 3
13483     done
13484   done
13485   done
13486 IFS=$as_save_IFS
13487   if test -z "$ac_cv_path_GREP"; then
13488     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13489   fi
13490 else
13491   ac_cv_path_GREP=$GREP
13492 fi
13493 
13494 fi
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13496 $as_echo "$ac_cv_path_GREP" >&6; }
13497  GREP="$ac_cv_path_GREP"
13498 
13499 
13500   else
13501     # The variable is set, but is it from the command line or the environment?
13502 
13503     # Try to remove the string !GREP! from our list.
13504     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13505     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13506       # If it failed, the variable was not from the command line. Ignore it,
13507       # but warn the user (except for BASH, which is always set by the calling BASH).
13508       if test "xGREP" != xBASH; then
13509         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13510 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13511       fi
13512       # Try to locate tool using the code snippet
13513       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13514 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13515 if ${ac_cv_path_GREP+:} false; then :
13516   $as_echo_n "(cached) " >&6
13517 else
13518   if test -z "$GREP"; then
13519   ac_path_GREP_found=false
13520   # Loop through the user's path and test for each of PROGNAME-LIST
13521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13522 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13523 do
13524   IFS=$as_save_IFS
13525   test -z "$as_dir" && as_dir=.
13526     for ac_prog in grep ggrep; do
13527     for ac_exec_ext in '' $ac_executable_extensions; do
13528       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13529       as_fn_executable_p "$ac_path_GREP" || continue
13530 # Check for GNU ac_path_GREP and select it if it is found.
13531   # Check for GNU $ac_path_GREP
13532 case `"$ac_path_GREP" --version 2>&1` in
13533 *GNU*)
13534   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13535 *)
13536   ac_count=0
13537   $as_echo_n 0123456789 >"conftest.in"
13538   while :
13539   do
13540     cat "conftest.in" "conftest.in" >"conftest.tmp"
13541     mv "conftest.tmp" "conftest.in"
13542     cp "conftest.in" "conftest.nl"
13543     $as_echo 'GREP' >> "conftest.nl"
13544     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13545     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13546     as_fn_arith $ac_count + 1 && ac_count=$as_val
13547     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13548       # Best one so far, save it but keep looking for a better one
13549       ac_cv_path_GREP="$ac_path_GREP"
13550       ac_path_GREP_max=$ac_count
13551     fi
13552     # 10*(2^10) chars as input seems more than enough
13553     test $ac_count -gt 10 && break
13554   done
13555   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13556 esac
13557 
13558       $ac_path_GREP_found && break 3
13559     done
13560   done
13561   done
13562 IFS=$as_save_IFS
13563   if test -z "$ac_cv_path_GREP"; then
13564     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13565   fi
13566 else
13567   ac_cv_path_GREP=$GREP
13568 fi
13569 
13570 fi
13571 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13572 $as_echo "$ac_cv_path_GREP" >&6; }
13573  GREP="$ac_cv_path_GREP"
13574 
13575 
13576     else
13577       # If it succeeded, then it was overridden by the user. We will use it
13578       # for the tool.
13579 
13580       # First remove it from the list of overridden variables, so we can test
13581       # for unknown variables in the end.
13582       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13583 
13584       # Check if we try to supply an empty value
13585       if test "x$GREP" = x; then
13586         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13587 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13588         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13589 $as_echo_n "checking for GREP... " >&6; }
13590         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13591 $as_echo "disabled" >&6; }
13592       else
13593         # Check if the provided tool contains a complete path.
13594         tool_specified="$GREP"
13595         tool_basename="${tool_specified##*/}"
13596         if test "x$tool_basename" = "x$tool_specified"; then
13597           # A command without a complete path is provided, search $PATH.
13598           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13599 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13600           # Extract the first word of "$tool_basename", so it can be a program name with args.
13601 set dummy $tool_basename; ac_word=$2
13602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13603 $as_echo_n "checking for $ac_word... " >&6; }
13604 if ${ac_cv_path_GREP+:} false; then :
13605   $as_echo_n "(cached) " >&6
13606 else
13607   case $GREP in
13608   [\\/]* | ?:[\\/]*)
13609   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13610   ;;
13611   *)
13612   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13613 for as_dir in $PATH
13614 do
13615   IFS=$as_save_IFS
13616   test -z "$as_dir" && as_dir=.
13617     for ac_exec_ext in '' $ac_executable_extensions; do
13618   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13619     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13620     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13621     break 2
13622   fi
13623 done
13624   done
13625 IFS=$as_save_IFS
13626 
13627   ;;
13628 esac
13629 fi
13630 GREP=$ac_cv_path_GREP
13631 if test -n "$GREP"; then
13632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13633 $as_echo "$GREP" >&6; }
13634 else
13635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13636 $as_echo "no" >&6; }
13637 fi
13638 
13639 
13640           if test "x$GREP" = x; then
13641             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13642           fi
13643         else
13644           # Otherwise we believe it is a complete path. Use it as it is.
13645           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13646 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13647           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13648 $as_echo_n "checking for GREP... " >&6; }
13649           if test ! -x "$tool_specified"; then
13650             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13651 $as_echo "not found" >&6; }
13652             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13653           fi
13654           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13655 $as_echo "$tool_specified" >&6; }
13656         fi
13657       fi
13658     fi
13659 
13660   fi
13661 
13662 
13663   if test "x$GREP" = x; then
13664     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13665   fi
13666 
13667 
13668 
13669 
13670   # Publish this variable in the help.
13671 
13672 
13673   if [ -z "${EGREP+x}" ]; then
13674     # The variable is not set by user, try to locate tool using the code snippet
13675     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13676 $as_echo_n "checking for egrep... " >&6; }
13677 if ${ac_cv_path_EGREP+:} false; then :
13678   $as_echo_n "(cached) " >&6
13679 else
13680   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13681    then ac_cv_path_EGREP="$GREP -E"
13682    else
13683      if test -z "$EGREP"; then
13684   ac_path_EGREP_found=false
13685   # Loop through the user's path and test for each of PROGNAME-LIST
13686   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13687 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13688 do
13689   IFS=$as_save_IFS
13690   test -z "$as_dir" && as_dir=.
13691     for ac_prog in egrep; do
13692     for ac_exec_ext in '' $ac_executable_extensions; do
13693       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13694       as_fn_executable_p "$ac_path_EGREP" || continue
13695 # Check for GNU ac_path_EGREP and select it if it is found.
13696   # Check for GNU $ac_path_EGREP
13697 case `"$ac_path_EGREP" --version 2>&1` in
13698 *GNU*)
13699   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13700 *)
13701   ac_count=0
13702   $as_echo_n 0123456789 >"conftest.in"
13703   while :
13704   do
13705     cat "conftest.in" "conftest.in" >"conftest.tmp"
13706     mv "conftest.tmp" "conftest.in"
13707     cp "conftest.in" "conftest.nl"
13708     $as_echo 'EGREP' >> "conftest.nl"
13709     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13710     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13711     as_fn_arith $ac_count + 1 && ac_count=$as_val
13712     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13713       # Best one so far, save it but keep looking for a better one
13714       ac_cv_path_EGREP="$ac_path_EGREP"
13715       ac_path_EGREP_max=$ac_count
13716     fi
13717     # 10*(2^10) chars as input seems more than enough
13718     test $ac_count -gt 10 && break
13719   done
13720   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13721 esac
13722 
13723       $ac_path_EGREP_found && break 3
13724     done
13725   done
13726   done
13727 IFS=$as_save_IFS
13728   if test -z "$ac_cv_path_EGREP"; then
13729     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13730   fi
13731 else
13732   ac_cv_path_EGREP=$EGREP
13733 fi
13734 
13735    fi
13736 fi
13737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13738 $as_echo "$ac_cv_path_EGREP" >&6; }
13739  EGREP="$ac_cv_path_EGREP"
13740 
13741 
13742   else
13743     # The variable is set, but is it from the command line or the environment?
13744 
13745     # Try to remove the string !EGREP! from our list.
13746     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13747     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13748       # If it failed, the variable was not from the command line. Ignore it,
13749       # but warn the user (except for BASH, which is always set by the calling BASH).
13750       if test "xEGREP" != xBASH; then
13751         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13752 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13753       fi
13754       # Try to locate tool using the code snippet
13755       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13756 $as_echo_n "checking for egrep... " >&6; }
13757 if ${ac_cv_path_EGREP+:} false; then :
13758   $as_echo_n "(cached) " >&6
13759 else
13760   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13761    then ac_cv_path_EGREP="$GREP -E"
13762    else
13763      if test -z "$EGREP"; then
13764   ac_path_EGREP_found=false
13765   # Loop through the user's path and test for each of PROGNAME-LIST
13766   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13767 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13768 do
13769   IFS=$as_save_IFS
13770   test -z "$as_dir" && as_dir=.
13771     for ac_prog in egrep; do
13772     for ac_exec_ext in '' $ac_executable_extensions; do
13773       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13774       as_fn_executable_p "$ac_path_EGREP" || continue
13775 # Check for GNU ac_path_EGREP and select it if it is found.
13776   # Check for GNU $ac_path_EGREP
13777 case `"$ac_path_EGREP" --version 2>&1` in
13778 *GNU*)
13779   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13780 *)
13781   ac_count=0
13782   $as_echo_n 0123456789 >"conftest.in"
13783   while :
13784   do
13785     cat "conftest.in" "conftest.in" >"conftest.tmp"
13786     mv "conftest.tmp" "conftest.in"
13787     cp "conftest.in" "conftest.nl"
13788     $as_echo 'EGREP' >> "conftest.nl"
13789     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13790     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13791     as_fn_arith $ac_count + 1 && ac_count=$as_val
13792     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13793       # Best one so far, save it but keep looking for a better one
13794       ac_cv_path_EGREP="$ac_path_EGREP"
13795       ac_path_EGREP_max=$ac_count
13796     fi
13797     # 10*(2^10) chars as input seems more than enough
13798     test $ac_count -gt 10 && break
13799   done
13800   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13801 esac
13802 
13803       $ac_path_EGREP_found && break 3
13804     done
13805   done
13806   done
13807 IFS=$as_save_IFS
13808   if test -z "$ac_cv_path_EGREP"; then
13809     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13810   fi
13811 else
13812   ac_cv_path_EGREP=$EGREP
13813 fi
13814 
13815    fi
13816 fi
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13818 $as_echo "$ac_cv_path_EGREP" >&6; }
13819  EGREP="$ac_cv_path_EGREP"
13820 
13821 
13822     else
13823       # If it succeeded, then it was overridden by the user. We will use it
13824       # for the tool.
13825 
13826       # First remove it from the list of overridden variables, so we can test
13827       # for unknown variables in the end.
13828       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13829 
13830       # Check if we try to supply an empty value
13831       if test "x$EGREP" = x; then
13832         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13833 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13834         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13835 $as_echo_n "checking for EGREP... " >&6; }
13836         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13837 $as_echo "disabled" >&6; }
13838       else
13839         # Check if the provided tool contains a complete path.
13840         tool_specified="$EGREP"
13841         tool_basename="${tool_specified##*/}"
13842         if test "x$tool_basename" = "x$tool_specified"; then
13843           # A command without a complete path is provided, search $PATH.
13844           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13845 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13846           # Extract the first word of "$tool_basename", so it can be a program name with args.
13847 set dummy $tool_basename; ac_word=$2
13848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13849 $as_echo_n "checking for $ac_word... " >&6; }
13850 if ${ac_cv_path_EGREP+:} false; then :
13851   $as_echo_n "(cached) " >&6
13852 else
13853   case $EGREP in
13854   [\\/]* | ?:[\\/]*)
13855   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13856   ;;
13857   *)
13858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13859 for as_dir in $PATH
13860 do
13861   IFS=$as_save_IFS
13862   test -z "$as_dir" && as_dir=.
13863     for ac_exec_ext in '' $ac_executable_extensions; do
13864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13865     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13867     break 2
13868   fi
13869 done
13870   done
13871 IFS=$as_save_IFS
13872 
13873   ;;
13874 esac
13875 fi
13876 EGREP=$ac_cv_path_EGREP
13877 if test -n "$EGREP"; then
13878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13879 $as_echo "$EGREP" >&6; }
13880 else
13881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13882 $as_echo "no" >&6; }
13883 fi
13884 
13885 
13886           if test "x$EGREP" = x; then
13887             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13888           fi
13889         else
13890           # Otherwise we believe it is a complete path. Use it as it is.
13891           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13892 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13893           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13894 $as_echo_n "checking for EGREP... " >&6; }
13895           if test ! -x "$tool_specified"; then
13896             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13897 $as_echo "not found" >&6; }
13898             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13899           fi
13900           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13901 $as_echo "$tool_specified" >&6; }
13902         fi
13903       fi
13904     fi
13905 
13906   fi
13907 
13908 
13909   if test "x$EGREP" = x; then
13910     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13911   fi
13912 
13913 
13914 
13915 
13916   # Publish this variable in the help.
13917 
13918 
13919   if [ -z "${FGREP+x}" ]; then
13920     # The variable is not set by user, try to locate tool using the code snippet
13921     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13922 $as_echo_n "checking for fgrep... " >&6; }
13923 if ${ac_cv_path_FGREP+:} false; then :
13924   $as_echo_n "(cached) " >&6
13925 else
13926   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13927    then ac_cv_path_FGREP="$GREP -F"
13928    else
13929      if test -z "$FGREP"; then
13930   ac_path_FGREP_found=false
13931   # Loop through the user's path and test for each of PROGNAME-LIST
13932   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13933 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13934 do
13935   IFS=$as_save_IFS
13936   test -z "$as_dir" && as_dir=.
13937     for ac_prog in fgrep; do
13938     for ac_exec_ext in '' $ac_executable_extensions; do
13939       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13940       as_fn_executable_p "$ac_path_FGREP" || continue
13941 # Check for GNU ac_path_FGREP and select it if it is found.
13942   # Check for GNU $ac_path_FGREP
13943 case `"$ac_path_FGREP" --version 2>&1` in
13944 *GNU*)
13945   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13946 *)
13947   ac_count=0
13948   $as_echo_n 0123456789 >"conftest.in"
13949   while :
13950   do
13951     cat "conftest.in" "conftest.in" >"conftest.tmp"
13952     mv "conftest.tmp" "conftest.in"
13953     cp "conftest.in" "conftest.nl"
13954     $as_echo 'FGREP' >> "conftest.nl"
13955     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13956     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13957     as_fn_arith $ac_count + 1 && ac_count=$as_val
13958     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13959       # Best one so far, save it but keep looking for a better one
13960       ac_cv_path_FGREP="$ac_path_FGREP"
13961       ac_path_FGREP_max=$ac_count
13962     fi
13963     # 10*(2^10) chars as input seems more than enough
13964     test $ac_count -gt 10 && break
13965   done
13966   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13967 esac
13968 
13969       $ac_path_FGREP_found && break 3
13970     done
13971   done
13972   done
13973 IFS=$as_save_IFS
13974   if test -z "$ac_cv_path_FGREP"; then
13975     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13976   fi
13977 else
13978   ac_cv_path_FGREP=$FGREP
13979 fi
13980 
13981    fi
13982 fi
13983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13984 $as_echo "$ac_cv_path_FGREP" >&6; }
13985  FGREP="$ac_cv_path_FGREP"
13986 
13987 
13988   else
13989     # The variable is set, but is it from the command line or the environment?
13990 
13991     # Try to remove the string !FGREP! from our list.
13992     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13993     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13994       # If it failed, the variable was not from the command line. Ignore it,
13995       # but warn the user (except for BASH, which is always set by the calling BASH).
13996       if test "xFGREP" != xBASH; then
13997         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13998 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13999       fi
14000       # Try to locate tool using the code snippet
14001       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
14002 $as_echo_n "checking for fgrep... " >&6; }
14003 if ${ac_cv_path_FGREP+:} false; then :
14004   $as_echo_n "(cached) " >&6
14005 else
14006   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
14007    then ac_cv_path_FGREP="$GREP -F"
14008    else
14009      if test -z "$FGREP"; then
14010   ac_path_FGREP_found=false
14011   # Loop through the user's path and test for each of PROGNAME-LIST
14012   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14013 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
14014 do
14015   IFS=$as_save_IFS
14016   test -z "$as_dir" && as_dir=.
14017     for ac_prog in fgrep; do
14018     for ac_exec_ext in '' $ac_executable_extensions; do
14019       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
14020       as_fn_executable_p "$ac_path_FGREP" || continue
14021 # Check for GNU ac_path_FGREP and select it if it is found.
14022   # Check for GNU $ac_path_FGREP
14023 case `"$ac_path_FGREP" --version 2>&1` in
14024 *GNU*)
14025   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
14026 *)
14027   ac_count=0
14028   $as_echo_n 0123456789 >"conftest.in"
14029   while :
14030   do
14031     cat "conftest.in" "conftest.in" >"conftest.tmp"
14032     mv "conftest.tmp" "conftest.in"
14033     cp "conftest.in" "conftest.nl"
14034     $as_echo 'FGREP' >> "conftest.nl"
14035     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14036     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14037     as_fn_arith $ac_count + 1 && ac_count=$as_val
14038     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14039       # Best one so far, save it but keep looking for a better one
14040       ac_cv_path_FGREP="$ac_path_FGREP"
14041       ac_path_FGREP_max=$ac_count
14042     fi
14043     # 10*(2^10) chars as input seems more than enough
14044     test $ac_count -gt 10 && break
14045   done
14046   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14047 esac
14048 
14049       $ac_path_FGREP_found && break 3
14050     done
14051   done
14052   done
14053 IFS=$as_save_IFS
14054   if test -z "$ac_cv_path_FGREP"; then
14055     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14056   fi
14057 else
14058   ac_cv_path_FGREP=$FGREP
14059 fi
14060 
14061    fi
14062 fi
14063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14064 $as_echo "$ac_cv_path_FGREP" >&6; }
14065  FGREP="$ac_cv_path_FGREP"
14066 
14067 
14068     else
14069       # If it succeeded, then it was overridden by the user. We will use it
14070       # for the tool.
14071 
14072       # First remove it from the list of overridden variables, so we can test
14073       # for unknown variables in the end.
14074       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14075 
14076       # Check if we try to supply an empty value
14077       if test "x$FGREP" = x; then
14078         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14079 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14080         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14081 $as_echo_n "checking for FGREP... " >&6; }
14082         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14083 $as_echo "disabled" >&6; }
14084       else
14085         # Check if the provided tool contains a complete path.
14086         tool_specified="$FGREP"
14087         tool_basename="${tool_specified##*/}"
14088         if test "x$tool_basename" = "x$tool_specified"; then
14089           # A command without a complete path is provided, search $PATH.
14090           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14091 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14092           # Extract the first word of "$tool_basename", so it can be a program name with args.
14093 set dummy $tool_basename; ac_word=$2
14094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14095 $as_echo_n "checking for $ac_word... " >&6; }
14096 if ${ac_cv_path_FGREP+:} false; then :
14097   $as_echo_n "(cached) " >&6
14098 else
14099   case $FGREP in
14100   [\\/]* | ?:[\\/]*)
14101   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14102   ;;
14103   *)
14104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14105 for as_dir in $PATH
14106 do
14107   IFS=$as_save_IFS
14108   test -z "$as_dir" && as_dir=.
14109     for ac_exec_ext in '' $ac_executable_extensions; do
14110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14111     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14113     break 2
14114   fi
14115 done
14116   done
14117 IFS=$as_save_IFS
14118 
14119   ;;
14120 esac
14121 fi
14122 FGREP=$ac_cv_path_FGREP
14123 if test -n "$FGREP"; then
14124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14125 $as_echo "$FGREP" >&6; }
14126 else
14127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14128 $as_echo "no" >&6; }
14129 fi
14130 
14131 
14132           if test "x$FGREP" = x; then
14133             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14134           fi
14135         else
14136           # Otherwise we believe it is a complete path. Use it as it is.
14137           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14138 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14139           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14140 $as_echo_n "checking for FGREP... " >&6; }
14141           if test ! -x "$tool_specified"; then
14142             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14143 $as_echo "not found" >&6; }
14144             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14145           fi
14146           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14147 $as_echo "$tool_specified" >&6; }
14148         fi
14149       fi
14150     fi
14151 
14152   fi
14153 
14154 
14155   if test "x$FGREP" = x; then
14156     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14157   fi
14158 
14159 
14160 
14161 
14162   # Publish this variable in the help.
14163 
14164 
14165   if [ -z "${SED+x}" ]; then
14166     # The variable is not set by user, try to locate tool using the code snippet
14167     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14168 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14169 if ${ac_cv_path_SED+:} false; then :
14170   $as_echo_n "(cached) " >&6
14171 else
14172             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14173      for ac_i in 1 2 3 4 5 6 7; do
14174        ac_script="$ac_script$as_nl$ac_script"
14175      done
14176      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14177      { ac_script=; unset ac_script;}
14178      if test -z "$SED"; then
14179   ac_path_SED_found=false
14180   # Loop through the user's path and test for each of PROGNAME-LIST
14181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14182 for as_dir in $PATH
14183 do
14184   IFS=$as_save_IFS
14185   test -z "$as_dir" && as_dir=.
14186     for ac_prog in sed gsed; do
14187     for ac_exec_ext in '' $ac_executable_extensions; do
14188       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14189       as_fn_executable_p "$ac_path_SED" || continue
14190 # Check for GNU ac_path_SED and select it if it is found.
14191   # Check for GNU $ac_path_SED
14192 case `"$ac_path_SED" --version 2>&1` in
14193 *GNU*)
14194   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14195 *)
14196   ac_count=0
14197   $as_echo_n 0123456789 >"conftest.in"
14198   while :
14199   do
14200     cat "conftest.in" "conftest.in" >"conftest.tmp"
14201     mv "conftest.tmp" "conftest.in"
14202     cp "conftest.in" "conftest.nl"
14203     $as_echo '' >> "conftest.nl"
14204     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14205     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14206     as_fn_arith $ac_count + 1 && ac_count=$as_val
14207     if test $ac_count -gt ${ac_path_SED_max-0}; then
14208       # Best one so far, save it but keep looking for a better one
14209       ac_cv_path_SED="$ac_path_SED"
14210       ac_path_SED_max=$ac_count
14211     fi
14212     # 10*(2^10) chars as input seems more than enough
14213     test $ac_count -gt 10 && break
14214   done
14215   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14216 esac
14217 
14218       $ac_path_SED_found && break 3
14219     done
14220   done
14221   done
14222 IFS=$as_save_IFS
14223   if test -z "$ac_cv_path_SED"; then
14224     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14225   fi
14226 else
14227   ac_cv_path_SED=$SED
14228 fi
14229 
14230 fi
14231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14232 $as_echo "$ac_cv_path_SED" >&6; }
14233  SED="$ac_cv_path_SED"
14234   rm -f conftest.sed
14235 
14236   else
14237     # The variable is set, but is it from the command line or the environment?
14238 
14239     # Try to remove the string !SED! from our list.
14240     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14241     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14242       # If it failed, the variable was not from the command line. Ignore it,
14243       # but warn the user (except for BASH, which is always set by the calling BASH).
14244       if test "xSED" != xBASH; then
14245         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14246 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14247       fi
14248       # Try to locate tool using the code snippet
14249       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14250 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14251 if ${ac_cv_path_SED+:} false; then :
14252   $as_echo_n "(cached) " >&6
14253 else
14254             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14255      for ac_i in 1 2 3 4 5 6 7; do
14256        ac_script="$ac_script$as_nl$ac_script"
14257      done
14258      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14259      { ac_script=; unset ac_script;}
14260      if test -z "$SED"; then
14261   ac_path_SED_found=false
14262   # Loop through the user's path and test for each of PROGNAME-LIST
14263   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14264 for as_dir in $PATH
14265 do
14266   IFS=$as_save_IFS
14267   test -z "$as_dir" && as_dir=.
14268     for ac_prog in sed gsed; do
14269     for ac_exec_ext in '' $ac_executable_extensions; do
14270       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14271       as_fn_executable_p "$ac_path_SED" || continue
14272 # Check for GNU ac_path_SED and select it if it is found.
14273   # Check for GNU $ac_path_SED
14274 case `"$ac_path_SED" --version 2>&1` in
14275 *GNU*)
14276   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14277 *)
14278   ac_count=0
14279   $as_echo_n 0123456789 >"conftest.in"
14280   while :
14281   do
14282     cat "conftest.in" "conftest.in" >"conftest.tmp"
14283     mv "conftest.tmp" "conftest.in"
14284     cp "conftest.in" "conftest.nl"
14285     $as_echo '' >> "conftest.nl"
14286     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14287     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14288     as_fn_arith $ac_count + 1 && ac_count=$as_val
14289     if test $ac_count -gt ${ac_path_SED_max-0}; then
14290       # Best one so far, save it but keep looking for a better one
14291       ac_cv_path_SED="$ac_path_SED"
14292       ac_path_SED_max=$ac_count
14293     fi
14294     # 10*(2^10) chars as input seems more than enough
14295     test $ac_count -gt 10 && break
14296   done
14297   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14298 esac
14299 
14300       $ac_path_SED_found && break 3
14301     done
14302   done
14303   done
14304 IFS=$as_save_IFS
14305   if test -z "$ac_cv_path_SED"; then
14306     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14307   fi
14308 else
14309   ac_cv_path_SED=$SED
14310 fi
14311 
14312 fi
14313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14314 $as_echo "$ac_cv_path_SED" >&6; }
14315  SED="$ac_cv_path_SED"
14316   rm -f conftest.sed
14317 
14318     else
14319       # If it succeeded, then it was overridden by the user. We will use it
14320       # for the tool.
14321 
14322       # First remove it from the list of overridden variables, so we can test
14323       # for unknown variables in the end.
14324       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14325 
14326       # Check if we try to supply an empty value
14327       if test "x$SED" = x; then
14328         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14329 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14330         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14331 $as_echo_n "checking for SED... " >&6; }
14332         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14333 $as_echo "disabled" >&6; }
14334       else
14335         # Check if the provided tool contains a complete path.
14336         tool_specified="$SED"
14337         tool_basename="${tool_specified##*/}"
14338         if test "x$tool_basename" = "x$tool_specified"; then
14339           # A command without a complete path is provided, search $PATH.
14340           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14341 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14342           # Extract the first word of "$tool_basename", so it can be a program name with args.
14343 set dummy $tool_basename; ac_word=$2
14344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14345 $as_echo_n "checking for $ac_word... " >&6; }
14346 if ${ac_cv_path_SED+:} false; then :
14347   $as_echo_n "(cached) " >&6
14348 else
14349   case $SED in
14350   [\\/]* | ?:[\\/]*)
14351   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14352   ;;
14353   *)
14354   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14355 for as_dir in $PATH
14356 do
14357   IFS=$as_save_IFS
14358   test -z "$as_dir" && as_dir=.
14359     for ac_exec_ext in '' $ac_executable_extensions; do
14360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14361     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14363     break 2
14364   fi
14365 done
14366   done
14367 IFS=$as_save_IFS
14368 
14369   ;;
14370 esac
14371 fi
14372 SED=$ac_cv_path_SED
14373 if test -n "$SED"; then
14374   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14375 $as_echo "$SED" >&6; }
14376 else
14377   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14378 $as_echo "no" >&6; }
14379 fi
14380 
14381 
14382           if test "x$SED" = x; then
14383             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14384           fi
14385         else
14386           # Otherwise we believe it is a complete path. Use it as it is.
14387           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14388 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14389           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14390 $as_echo_n "checking for SED... " >&6; }
14391           if test ! -x "$tool_specified"; then
14392             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14393 $as_echo "not found" >&6; }
14394             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14395           fi
14396           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14397 $as_echo "$tool_specified" >&6; }
14398         fi
14399       fi
14400     fi
14401 
14402   fi
14403 
14404 
14405   if test "x$SED" = x; then
14406     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14407   fi
14408 
14409 
14410 
14411   # Always force rm.
14412   RM="$RM -f"
14413 
14414   # pwd behaves differently on various platforms and some don't support the -L flag.
14415   # Always use the bash builtin pwd to get uniform behavior.
14416   THEPWDCMD=pwd
14417 
14418   # These are not required on all platforms
14419 
14420 
14421   # Publish this variable in the help.
14422 
14423 
14424   if [ -z "${CYGPATH+x}" ]; then
14425     # The variable is not set by user, try to locate tool using the code snippet
14426     for ac_prog in cygpath
14427 do
14428   # Extract the first word of "$ac_prog", so it can be a program name with args.
14429 set dummy $ac_prog; ac_word=$2
14430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14431 $as_echo_n "checking for $ac_word... " >&6; }
14432 if ${ac_cv_path_CYGPATH+:} false; then :
14433   $as_echo_n "(cached) " >&6
14434 else
14435   case $CYGPATH in
14436   [\\/]* | ?:[\\/]*)
14437   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14438   ;;
14439   *)
14440   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14441 for as_dir in $PATH
14442 do
14443   IFS=$as_save_IFS
14444   test -z "$as_dir" && as_dir=.
14445     for ac_exec_ext in '' $ac_executable_extensions; do
14446   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14447     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14448     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14449     break 2
14450   fi
14451 done
14452   done
14453 IFS=$as_save_IFS
14454 
14455   ;;
14456 esac
14457 fi
14458 CYGPATH=$ac_cv_path_CYGPATH
14459 if test -n "$CYGPATH"; then
14460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14461 $as_echo "$CYGPATH" >&6; }
14462 else
14463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14464 $as_echo "no" >&6; }
14465 fi
14466 
14467 
14468   test -n "$CYGPATH" && break
14469 done
14470 
14471   else
14472     # The variable is set, but is it from the command line or the environment?
14473 
14474     # Try to remove the string !CYGPATH! from our list.
14475     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14476     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14477       # If it failed, the variable was not from the command line. Ignore it,
14478       # but warn the user (except for BASH, which is always set by the calling BASH).
14479       if test "xCYGPATH" != xBASH; then
14480         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14481 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14482       fi
14483       # Try to locate tool using the code snippet
14484       for ac_prog in cygpath
14485 do
14486   # Extract the first word of "$ac_prog", so it can be a program name with args.
14487 set dummy $ac_prog; ac_word=$2
14488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14489 $as_echo_n "checking for $ac_word... " >&6; }
14490 if ${ac_cv_path_CYGPATH+:} false; then :
14491   $as_echo_n "(cached) " >&6
14492 else
14493   case $CYGPATH in
14494   [\\/]* | ?:[\\/]*)
14495   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14496   ;;
14497   *)
14498   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14499 for as_dir in $PATH
14500 do
14501   IFS=$as_save_IFS
14502   test -z "$as_dir" && as_dir=.
14503     for ac_exec_ext in '' $ac_executable_extensions; do
14504   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14505     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14506     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14507     break 2
14508   fi
14509 done
14510   done
14511 IFS=$as_save_IFS
14512 
14513   ;;
14514 esac
14515 fi
14516 CYGPATH=$ac_cv_path_CYGPATH
14517 if test -n "$CYGPATH"; then
14518   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14519 $as_echo "$CYGPATH" >&6; }
14520 else
14521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14522 $as_echo "no" >&6; }
14523 fi
14524 
14525 
14526   test -n "$CYGPATH" && break
14527 done
14528 
14529     else
14530       # If it succeeded, then it was overridden by the user. We will use it
14531       # for the tool.
14532 
14533       # First remove it from the list of overridden variables, so we can test
14534       # for unknown variables in the end.
14535       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14536 
14537       # Check if we try to supply an empty value
14538       if test "x$CYGPATH" = x; then
14539         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14540 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14541         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14542 $as_echo_n "checking for CYGPATH... " >&6; }
14543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14544 $as_echo "disabled" >&6; }
14545       else
14546         # Check if the provided tool contains a complete path.
14547         tool_specified="$CYGPATH"
14548         tool_basename="${tool_specified##*/}"
14549         if test "x$tool_basename" = "x$tool_specified"; then
14550           # A command without a complete path is provided, search $PATH.
14551           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14552 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14553           # Extract the first word of "$tool_basename", so it can be a program name with args.
14554 set dummy $tool_basename; ac_word=$2
14555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14556 $as_echo_n "checking for $ac_word... " >&6; }
14557 if ${ac_cv_path_CYGPATH+:} false; then :
14558   $as_echo_n "(cached) " >&6
14559 else
14560   case $CYGPATH in
14561   [\\/]* | ?:[\\/]*)
14562   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14563   ;;
14564   *)
14565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14566 for as_dir in $PATH
14567 do
14568   IFS=$as_save_IFS
14569   test -z "$as_dir" && as_dir=.
14570     for ac_exec_ext in '' $ac_executable_extensions; do
14571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14572     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14574     break 2
14575   fi
14576 done
14577   done
14578 IFS=$as_save_IFS
14579 
14580   ;;
14581 esac
14582 fi
14583 CYGPATH=$ac_cv_path_CYGPATH
14584 if test -n "$CYGPATH"; then
14585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14586 $as_echo "$CYGPATH" >&6; }
14587 else
14588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14589 $as_echo "no" >&6; }
14590 fi
14591 
14592 
14593           if test "x$CYGPATH" = x; then
14594             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14595           fi
14596         else
14597           # Otherwise we believe it is a complete path. Use it as it is.
14598           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14599 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14600           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14601 $as_echo_n "checking for CYGPATH... " >&6; }
14602           if test ! -x "$tool_specified"; then
14603             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14604 $as_echo "not found" >&6; }
14605             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14606           fi
14607           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14608 $as_echo "$tool_specified" >&6; }
14609         fi
14610       fi
14611     fi
14612 
14613   fi
14614 
14615 
14616 
14617 
14618   # Publish this variable in the help.
14619 
14620 
14621   if [ -z "${READLINK+x}" ]; then
14622     # The variable is not set by user, try to locate tool using the code snippet
14623     for ac_prog in greadlink readlink
14624 do
14625   # Extract the first word of "$ac_prog", so it can be a program name with args.
14626 set dummy $ac_prog; ac_word=$2
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14628 $as_echo_n "checking for $ac_word... " >&6; }
14629 if ${ac_cv_path_READLINK+:} false; then :
14630   $as_echo_n "(cached) " >&6
14631 else
14632   case $READLINK in
14633   [\\/]* | ?:[\\/]*)
14634   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14635   ;;
14636   *)
14637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14638 for as_dir in $PATH
14639 do
14640   IFS=$as_save_IFS
14641   test -z "$as_dir" && as_dir=.
14642     for ac_exec_ext in '' $ac_executable_extensions; do
14643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14644     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14646     break 2
14647   fi
14648 done
14649   done
14650 IFS=$as_save_IFS
14651 
14652   ;;
14653 esac
14654 fi
14655 READLINK=$ac_cv_path_READLINK
14656 if test -n "$READLINK"; then
14657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14658 $as_echo "$READLINK" >&6; }
14659 else
14660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14661 $as_echo "no" >&6; }
14662 fi
14663 
14664 
14665   test -n "$READLINK" && break
14666 done
14667 
14668   else
14669     # The variable is set, but is it from the command line or the environment?
14670 
14671     # Try to remove the string !READLINK! from our list.
14672     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14673     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14674       # If it failed, the variable was not from the command line. Ignore it,
14675       # but warn the user (except for BASH, which is always set by the calling BASH).
14676       if test "xREADLINK" != xBASH; then
14677         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14678 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14679       fi
14680       # Try to locate tool using the code snippet
14681       for ac_prog in greadlink readlink
14682 do
14683   # Extract the first word of "$ac_prog", so it can be a program name with args.
14684 set dummy $ac_prog; ac_word=$2
14685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14686 $as_echo_n "checking for $ac_word... " >&6; }
14687 if ${ac_cv_path_READLINK+:} false; then :
14688   $as_echo_n "(cached) " >&6
14689 else
14690   case $READLINK in
14691   [\\/]* | ?:[\\/]*)
14692   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14693   ;;
14694   *)
14695   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14696 for as_dir in $PATH
14697 do
14698   IFS=$as_save_IFS
14699   test -z "$as_dir" && as_dir=.
14700     for ac_exec_ext in '' $ac_executable_extensions; do
14701   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14702     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14703     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14704     break 2
14705   fi
14706 done
14707   done
14708 IFS=$as_save_IFS
14709 
14710   ;;
14711 esac
14712 fi
14713 READLINK=$ac_cv_path_READLINK
14714 if test -n "$READLINK"; then
14715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14716 $as_echo "$READLINK" >&6; }
14717 else
14718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14719 $as_echo "no" >&6; }
14720 fi
14721 
14722 
14723   test -n "$READLINK" && break
14724 done
14725 
14726     else
14727       # If it succeeded, then it was overridden by the user. We will use it
14728       # for the tool.
14729 
14730       # First remove it from the list of overridden variables, so we can test
14731       # for unknown variables in the end.
14732       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14733 
14734       # Check if we try to supply an empty value
14735       if test "x$READLINK" = x; then
14736         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14737 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14738         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14739 $as_echo_n "checking for READLINK... " >&6; }
14740         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14741 $as_echo "disabled" >&6; }
14742       else
14743         # Check if the provided tool contains a complete path.
14744         tool_specified="$READLINK"
14745         tool_basename="${tool_specified##*/}"
14746         if test "x$tool_basename" = "x$tool_specified"; then
14747           # A command without a complete path is provided, search $PATH.
14748           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14749 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14750           # Extract the first word of "$tool_basename", so it can be a program name with args.
14751 set dummy $tool_basename; ac_word=$2
14752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14753 $as_echo_n "checking for $ac_word... " >&6; }
14754 if ${ac_cv_path_READLINK+:} false; then :
14755   $as_echo_n "(cached) " >&6
14756 else
14757   case $READLINK in
14758   [\\/]* | ?:[\\/]*)
14759   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14760   ;;
14761   *)
14762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14763 for as_dir in $PATH
14764 do
14765   IFS=$as_save_IFS
14766   test -z "$as_dir" && as_dir=.
14767     for ac_exec_ext in '' $ac_executable_extensions; do
14768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14769     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14771     break 2
14772   fi
14773 done
14774   done
14775 IFS=$as_save_IFS
14776 
14777   ;;
14778 esac
14779 fi
14780 READLINK=$ac_cv_path_READLINK
14781 if test -n "$READLINK"; then
14782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14783 $as_echo "$READLINK" >&6; }
14784 else
14785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14786 $as_echo "no" >&6; }
14787 fi
14788 
14789 
14790           if test "x$READLINK" = x; then
14791             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14792           fi
14793         else
14794           # Otherwise we believe it is a complete path. Use it as it is.
14795           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14796 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14797           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14798 $as_echo_n "checking for READLINK... " >&6; }
14799           if test ! -x "$tool_specified"; then
14800             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14801 $as_echo "not found" >&6; }
14802             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14803           fi
14804           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14805 $as_echo "$tool_specified" >&6; }
14806         fi
14807       fi
14808     fi
14809 
14810   fi
14811 
14812 
14813 
14814 
14815   # Publish this variable in the help.
14816 
14817 
14818   if [ -z "${DF+x}" ]; then
14819     # The variable is not set by user, try to locate tool using the code snippet
14820     for ac_prog in df
14821 do
14822   # Extract the first word of "$ac_prog", so it can be a program name with args.
14823 set dummy $ac_prog; ac_word=$2
14824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14825 $as_echo_n "checking for $ac_word... " >&6; }
14826 if ${ac_cv_path_DF+:} false; then :
14827   $as_echo_n "(cached) " >&6
14828 else
14829   case $DF in
14830   [\\/]* | ?:[\\/]*)
14831   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14832   ;;
14833   *)
14834   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14835 for as_dir in $PATH
14836 do
14837   IFS=$as_save_IFS
14838   test -z "$as_dir" && as_dir=.
14839     for ac_exec_ext in '' $ac_executable_extensions; do
14840   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14841     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14842     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14843     break 2
14844   fi
14845 done
14846   done
14847 IFS=$as_save_IFS
14848 
14849   ;;
14850 esac
14851 fi
14852 DF=$ac_cv_path_DF
14853 if test -n "$DF"; then
14854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14855 $as_echo "$DF" >&6; }
14856 else
14857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14858 $as_echo "no" >&6; }
14859 fi
14860 
14861 
14862   test -n "$DF" && break
14863 done
14864 
14865   else
14866     # The variable is set, but is it from the command line or the environment?
14867 
14868     # Try to remove the string !DF! from our list.
14869     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14870     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14871       # If it failed, the variable was not from the command line. Ignore it,
14872       # but warn the user (except for BASH, which is always set by the calling BASH).
14873       if test "xDF" != xBASH; then
14874         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14875 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14876       fi
14877       # Try to locate tool using the code snippet
14878       for ac_prog in df
14879 do
14880   # Extract the first word of "$ac_prog", so it can be a program name with args.
14881 set dummy $ac_prog; ac_word=$2
14882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14883 $as_echo_n "checking for $ac_word... " >&6; }
14884 if ${ac_cv_path_DF+:} false; then :
14885   $as_echo_n "(cached) " >&6
14886 else
14887   case $DF in
14888   [\\/]* | ?:[\\/]*)
14889   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14890   ;;
14891   *)
14892   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14893 for as_dir in $PATH
14894 do
14895   IFS=$as_save_IFS
14896   test -z "$as_dir" && as_dir=.
14897     for ac_exec_ext in '' $ac_executable_extensions; do
14898   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14899     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14900     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14901     break 2
14902   fi
14903 done
14904   done
14905 IFS=$as_save_IFS
14906 
14907   ;;
14908 esac
14909 fi
14910 DF=$ac_cv_path_DF
14911 if test -n "$DF"; then
14912   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14913 $as_echo "$DF" >&6; }
14914 else
14915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14916 $as_echo "no" >&6; }
14917 fi
14918 
14919 
14920   test -n "$DF" && break
14921 done
14922 
14923     else
14924       # If it succeeded, then it was overridden by the user. We will use it
14925       # for the tool.
14926 
14927       # First remove it from the list of overridden variables, so we can test
14928       # for unknown variables in the end.
14929       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14930 
14931       # Check if we try to supply an empty value
14932       if test "x$DF" = x; then
14933         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14934 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14935         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14936 $as_echo_n "checking for DF... " >&6; }
14937         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14938 $as_echo "disabled" >&6; }
14939       else
14940         # Check if the provided tool contains a complete path.
14941         tool_specified="$DF"
14942         tool_basename="${tool_specified##*/}"
14943         if test "x$tool_basename" = "x$tool_specified"; then
14944           # A command without a complete path is provided, search $PATH.
14945           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14946 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14947           # Extract the first word of "$tool_basename", so it can be a program name with args.
14948 set dummy $tool_basename; ac_word=$2
14949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14950 $as_echo_n "checking for $ac_word... " >&6; }
14951 if ${ac_cv_path_DF+:} false; then :
14952   $as_echo_n "(cached) " >&6
14953 else
14954   case $DF in
14955   [\\/]* | ?:[\\/]*)
14956   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14957   ;;
14958   *)
14959   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14960 for as_dir in $PATH
14961 do
14962   IFS=$as_save_IFS
14963   test -z "$as_dir" && as_dir=.
14964     for ac_exec_ext in '' $ac_executable_extensions; do
14965   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14966     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14967     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14968     break 2
14969   fi
14970 done
14971   done
14972 IFS=$as_save_IFS
14973 
14974   ;;
14975 esac
14976 fi
14977 DF=$ac_cv_path_DF
14978 if test -n "$DF"; then
14979   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14980 $as_echo "$DF" >&6; }
14981 else
14982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14983 $as_echo "no" >&6; }
14984 fi
14985 
14986 
14987           if test "x$DF" = x; then
14988             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14989           fi
14990         else
14991           # Otherwise we believe it is a complete path. Use it as it is.
14992           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14993 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14994           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14995 $as_echo_n "checking for DF... " >&6; }
14996           if test ! -x "$tool_specified"; then
14997             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14998 $as_echo "not found" >&6; }
14999             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
15000           fi
15001           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15002 $as_echo "$tool_specified" >&6; }
15003         fi
15004       fi
15005     fi
15006 
15007   fi
15008 
15009 
15010 
15011 
15012   # Publish this variable in the help.
15013 
15014 
15015   if [ -z "${CPIO+x}" ]; then
15016     # The variable is not set by user, try to locate tool using the code snippet
15017     for ac_prog in cpio bsdcpio
15018 do
15019   # Extract the first word of "$ac_prog", so it can be a program name with args.
15020 set dummy $ac_prog; ac_word=$2
15021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15022 $as_echo_n "checking for $ac_word... " >&6; }
15023 if ${ac_cv_path_CPIO+:} false; then :
15024   $as_echo_n "(cached) " >&6
15025 else
15026   case $CPIO in
15027   [\\/]* | ?:[\\/]*)
15028   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15029   ;;
15030   *)
15031   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15032 for as_dir in $PATH
15033 do
15034   IFS=$as_save_IFS
15035   test -z "$as_dir" && as_dir=.
15036     for ac_exec_ext in '' $ac_executable_extensions; do
15037   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15038     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15039     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15040     break 2
15041   fi
15042 done
15043   done
15044 IFS=$as_save_IFS
15045 
15046   ;;
15047 esac
15048 fi
15049 CPIO=$ac_cv_path_CPIO
15050 if test -n "$CPIO"; then
15051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15052 $as_echo "$CPIO" >&6; }
15053 else
15054   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15055 $as_echo "no" >&6; }
15056 fi
15057 
15058 
15059   test -n "$CPIO" && break
15060 done
15061 
15062   else
15063     # The variable is set, but is it from the command line or the environment?
15064 
15065     # Try to remove the string !CPIO! from our list.
15066     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15067     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15068       # If it failed, the variable was not from the command line. Ignore it,
15069       # but warn the user (except for BASH, which is always set by the calling BASH).
15070       if test "xCPIO" != xBASH; then
15071         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15072 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15073       fi
15074       # Try to locate tool using the code snippet
15075       for ac_prog in cpio bsdcpio
15076 do
15077   # Extract the first word of "$ac_prog", so it can be a program name with args.
15078 set dummy $ac_prog; ac_word=$2
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15080 $as_echo_n "checking for $ac_word... " >&6; }
15081 if ${ac_cv_path_CPIO+:} false; then :
15082   $as_echo_n "(cached) " >&6
15083 else
15084   case $CPIO in
15085   [\\/]* | ?:[\\/]*)
15086   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15087   ;;
15088   *)
15089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15090 for as_dir in $PATH
15091 do
15092   IFS=$as_save_IFS
15093   test -z "$as_dir" && as_dir=.
15094     for ac_exec_ext in '' $ac_executable_extensions; do
15095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15096     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15098     break 2
15099   fi
15100 done
15101   done
15102 IFS=$as_save_IFS
15103 
15104   ;;
15105 esac
15106 fi
15107 CPIO=$ac_cv_path_CPIO
15108 if test -n "$CPIO"; then
15109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15110 $as_echo "$CPIO" >&6; }
15111 else
15112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15113 $as_echo "no" >&6; }
15114 fi
15115 
15116 
15117   test -n "$CPIO" && break
15118 done
15119 
15120     else
15121       # If it succeeded, then it was overridden by the user. We will use it
15122       # for the tool.
15123 
15124       # First remove it from the list of overridden variables, so we can test
15125       # for unknown variables in the end.
15126       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15127 
15128       # Check if we try to supply an empty value
15129       if test "x$CPIO" = x; then
15130         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15131 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15132         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15133 $as_echo_n "checking for CPIO... " >&6; }
15134         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15135 $as_echo "disabled" >&6; }
15136       else
15137         # Check if the provided tool contains a complete path.
15138         tool_specified="$CPIO"
15139         tool_basename="${tool_specified##*/}"
15140         if test "x$tool_basename" = "x$tool_specified"; then
15141           # A command without a complete path is provided, search $PATH.
15142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15143 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15144           # Extract the first word of "$tool_basename", so it can be a program name with args.
15145 set dummy $tool_basename; ac_word=$2
15146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15147 $as_echo_n "checking for $ac_word... " >&6; }
15148 if ${ac_cv_path_CPIO+:} false; then :
15149   $as_echo_n "(cached) " >&6
15150 else
15151   case $CPIO in
15152   [\\/]* | ?:[\\/]*)
15153   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15154   ;;
15155   *)
15156   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15157 for as_dir in $PATH
15158 do
15159   IFS=$as_save_IFS
15160   test -z "$as_dir" && as_dir=.
15161     for ac_exec_ext in '' $ac_executable_extensions; do
15162   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15163     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15164     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15165     break 2
15166   fi
15167 done
15168   done
15169 IFS=$as_save_IFS
15170 
15171   ;;
15172 esac
15173 fi
15174 CPIO=$ac_cv_path_CPIO
15175 if test -n "$CPIO"; then
15176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15177 $as_echo "$CPIO" >&6; }
15178 else
15179   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15180 $as_echo "no" >&6; }
15181 fi
15182 
15183 
15184           if test "x$CPIO" = x; then
15185             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15186           fi
15187         else
15188           # Otherwise we believe it is a complete path. Use it as it is.
15189           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15190 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15191           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15192 $as_echo_n "checking for CPIO... " >&6; }
15193           if test ! -x "$tool_specified"; then
15194             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15195 $as_echo "not found" >&6; }
15196             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15197           fi
15198           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15199 $as_echo "$tool_specified" >&6; }
15200         fi
15201       fi
15202     fi
15203 
15204   fi
15205 
15206 
15207 
15208 
15209   # Publish this variable in the help.
15210 
15211 
15212   if [ -z "${NICE+x}" ]; then
15213     # The variable is not set by user, try to locate tool using the code snippet
15214     for ac_prog in nice
15215 do
15216   # Extract the first word of "$ac_prog", so it can be a program name with args.
15217 set dummy $ac_prog; ac_word=$2
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15219 $as_echo_n "checking for $ac_word... " >&6; }
15220 if ${ac_cv_path_NICE+:} false; then :
15221   $as_echo_n "(cached) " >&6
15222 else
15223   case $NICE in
15224   [\\/]* | ?:[\\/]*)
15225   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15226   ;;
15227   *)
15228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15229 for as_dir in $PATH
15230 do
15231   IFS=$as_save_IFS
15232   test -z "$as_dir" && as_dir=.
15233     for ac_exec_ext in '' $ac_executable_extensions; do
15234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15235     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15237     break 2
15238   fi
15239 done
15240   done
15241 IFS=$as_save_IFS
15242 
15243   ;;
15244 esac
15245 fi
15246 NICE=$ac_cv_path_NICE
15247 if test -n "$NICE"; then
15248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15249 $as_echo "$NICE" >&6; }
15250 else
15251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15252 $as_echo "no" >&6; }
15253 fi
15254 
15255 
15256   test -n "$NICE" && break
15257 done
15258 
15259   else
15260     # The variable is set, but is it from the command line or the environment?
15261 
15262     # Try to remove the string !NICE! from our list.
15263     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15264     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15265       # If it failed, the variable was not from the command line. Ignore it,
15266       # but warn the user (except for BASH, which is always set by the calling BASH).
15267       if test "xNICE" != xBASH; then
15268         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15269 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15270       fi
15271       # Try to locate tool using the code snippet
15272       for ac_prog in nice
15273 do
15274   # Extract the first word of "$ac_prog", so it can be a program name with args.
15275 set dummy $ac_prog; ac_word=$2
15276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15277 $as_echo_n "checking for $ac_word... " >&6; }
15278 if ${ac_cv_path_NICE+:} false; then :
15279   $as_echo_n "(cached) " >&6
15280 else
15281   case $NICE in
15282   [\\/]* | ?:[\\/]*)
15283   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15284   ;;
15285   *)
15286   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15287 for as_dir in $PATH
15288 do
15289   IFS=$as_save_IFS
15290   test -z "$as_dir" && as_dir=.
15291     for ac_exec_ext in '' $ac_executable_extensions; do
15292   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15293     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15294     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15295     break 2
15296   fi
15297 done
15298   done
15299 IFS=$as_save_IFS
15300 
15301   ;;
15302 esac
15303 fi
15304 NICE=$ac_cv_path_NICE
15305 if test -n "$NICE"; then
15306   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15307 $as_echo "$NICE" >&6; }
15308 else
15309   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15310 $as_echo "no" >&6; }
15311 fi
15312 
15313 
15314   test -n "$NICE" && break
15315 done
15316 
15317     else
15318       # If it succeeded, then it was overridden by the user. We will use it
15319       # for the tool.
15320 
15321       # First remove it from the list of overridden variables, so we can test
15322       # for unknown variables in the end.
15323       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15324 
15325       # Check if we try to supply an empty value
15326       if test "x$NICE" = x; then
15327         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15328 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15329         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15330 $as_echo_n "checking for NICE... " >&6; }
15331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15332 $as_echo "disabled" >&6; }
15333       else
15334         # Check if the provided tool contains a complete path.
15335         tool_specified="$NICE"
15336         tool_basename="${tool_specified##*/}"
15337         if test "x$tool_basename" = "x$tool_specified"; then
15338           # A command without a complete path is provided, search $PATH.
15339           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15340 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15341           # Extract the first word of "$tool_basename", so it can be a program name with args.
15342 set dummy $tool_basename; ac_word=$2
15343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15344 $as_echo_n "checking for $ac_word... " >&6; }
15345 if ${ac_cv_path_NICE+:} false; then :
15346   $as_echo_n "(cached) " >&6
15347 else
15348   case $NICE in
15349   [\\/]* | ?:[\\/]*)
15350   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15351   ;;
15352   *)
15353   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15354 for as_dir in $PATH
15355 do
15356   IFS=$as_save_IFS
15357   test -z "$as_dir" && as_dir=.
15358     for ac_exec_ext in '' $ac_executable_extensions; do
15359   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15360     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15361     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15362     break 2
15363   fi
15364 done
15365   done
15366 IFS=$as_save_IFS
15367 
15368   ;;
15369 esac
15370 fi
15371 NICE=$ac_cv_path_NICE
15372 if test -n "$NICE"; then
15373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15374 $as_echo "$NICE" >&6; }
15375 else
15376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15377 $as_echo "no" >&6; }
15378 fi
15379 
15380 
15381           if test "x$NICE" = x; then
15382             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15383           fi
15384         else
15385           # Otherwise we believe it is a complete path. Use it as it is.
15386           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15387 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15388           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15389 $as_echo_n "checking for NICE... " >&6; }
15390           if test ! -x "$tool_specified"; then
15391             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15392 $as_echo "not found" >&6; }
15393             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15394           fi
15395           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15396 $as_echo "$tool_specified" >&6; }
15397         fi
15398       fi
15399     fi
15400 
15401   fi
15402 
15403 
15404 
15405 
15406   # Publish this variable in the help.
15407 
15408 
15409   if [ -z "${PANDOC+x}" ]; then
15410     # The variable is not set by user, try to locate tool using the code snippet
15411     for ac_prog in pandoc
15412 do
15413   # Extract the first word of "$ac_prog", so it can be a program name with args.
15414 set dummy $ac_prog; ac_word=$2
15415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15416 $as_echo_n "checking for $ac_word... " >&6; }
15417 if ${ac_cv_path_PANDOC+:} false; then :
15418   $as_echo_n "(cached) " >&6
15419 else
15420   case $PANDOC in
15421   [\\/]* | ?:[\\/]*)
15422   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15423   ;;
15424   *)
15425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15426 for as_dir in $PATH
15427 do
15428   IFS=$as_save_IFS
15429   test -z "$as_dir" && as_dir=.
15430     for ac_exec_ext in '' $ac_executable_extensions; do
15431   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15432     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15434     break 2
15435   fi
15436 done
15437   done
15438 IFS=$as_save_IFS
15439 
15440   ;;
15441 esac
15442 fi
15443 PANDOC=$ac_cv_path_PANDOC
15444 if test -n "$PANDOC"; then
15445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15446 $as_echo "$PANDOC" >&6; }
15447 else
15448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15449 $as_echo "no" >&6; }
15450 fi
15451 
15452 
15453   test -n "$PANDOC" && break
15454 done
15455 
15456   else
15457     # The variable is set, but is it from the command line or the environment?
15458 
15459     # Try to remove the string !PANDOC! from our list.
15460     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15461     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15462       # If it failed, the variable was not from the command line. Ignore it,
15463       # but warn the user (except for BASH, which is always set by the calling BASH).
15464       if test "xPANDOC" != xBASH; then
15465         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15466 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15467       fi
15468       # Try to locate tool using the code snippet
15469       for ac_prog in pandoc
15470 do
15471   # Extract the first word of "$ac_prog", so it can be a program name with args.
15472 set dummy $ac_prog; ac_word=$2
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15474 $as_echo_n "checking for $ac_word... " >&6; }
15475 if ${ac_cv_path_PANDOC+:} false; then :
15476   $as_echo_n "(cached) " >&6
15477 else
15478   case $PANDOC in
15479   [\\/]* | ?:[\\/]*)
15480   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15481   ;;
15482   *)
15483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15484 for as_dir in $PATH
15485 do
15486   IFS=$as_save_IFS
15487   test -z "$as_dir" && as_dir=.
15488     for ac_exec_ext in '' $ac_executable_extensions; do
15489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15490     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15492     break 2
15493   fi
15494 done
15495   done
15496 IFS=$as_save_IFS
15497 
15498   ;;
15499 esac
15500 fi
15501 PANDOC=$ac_cv_path_PANDOC
15502 if test -n "$PANDOC"; then
15503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15504 $as_echo "$PANDOC" >&6; }
15505 else
15506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15507 $as_echo "no" >&6; }
15508 fi
15509 
15510 
15511   test -n "$PANDOC" && break
15512 done
15513 
15514     else
15515       # If it succeeded, then it was overridden by the user. We will use it
15516       # for the tool.
15517 
15518       # First remove it from the list of overridden variables, so we can test
15519       # for unknown variables in the end.
15520       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15521 
15522       # Check if we try to supply an empty value
15523       if test "x$PANDOC" = x; then
15524         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15525 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15526         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15527 $as_echo_n "checking for PANDOC... " >&6; }
15528         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15529 $as_echo "disabled" >&6; }
15530       else
15531         # Check if the provided tool contains a complete path.
15532         tool_specified="$PANDOC"
15533         tool_basename="${tool_specified##*/}"
15534         if test "x$tool_basename" = "x$tool_specified"; then
15535           # A command without a complete path is provided, search $PATH.
15536           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15537 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15538           # Extract the first word of "$tool_basename", so it can be a program name with args.
15539 set dummy $tool_basename; ac_word=$2
15540 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15541 $as_echo_n "checking for $ac_word... " >&6; }
15542 if ${ac_cv_path_PANDOC+:} false; then :
15543   $as_echo_n "(cached) " >&6
15544 else
15545   case $PANDOC in
15546   [\\/]* | ?:[\\/]*)
15547   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15548   ;;
15549   *)
15550   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15551 for as_dir in $PATH
15552 do
15553   IFS=$as_save_IFS
15554   test -z "$as_dir" && as_dir=.
15555     for ac_exec_ext in '' $ac_executable_extensions; do
15556   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15557     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15558     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15559     break 2
15560   fi
15561 done
15562   done
15563 IFS=$as_save_IFS
15564 
15565   ;;
15566 esac
15567 fi
15568 PANDOC=$ac_cv_path_PANDOC
15569 if test -n "$PANDOC"; then
15570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15571 $as_echo "$PANDOC" >&6; }
15572 else
15573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15574 $as_echo "no" >&6; }
15575 fi
15576 
15577 
15578           if test "x$PANDOC" = x; then
15579             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15580           fi
15581         else
15582           # Otherwise we believe it is a complete path. Use it as it is.
15583           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15584 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15585           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15586 $as_echo_n "checking for PANDOC... " >&6; }
15587           if test ! -x "$tool_specified"; then
15588             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15589 $as_echo "not found" >&6; }
15590             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15591           fi
15592           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15593 $as_echo "$tool_specified" >&6; }
15594         fi
15595       fi
15596     fi
15597 
15598   fi
15599 
15600 
15601 
15602 
15603 # Now we can determine OpenJDK build and target platforms. This is required to
15604 # have early on.
15605 # Make sure we can run config.sub.
15606 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15607   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15608 
15609 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15610 $as_echo_n "checking build system type... " >&6; }
15611 if ${ac_cv_build+:} false; then :
15612   $as_echo_n "(cached) " >&6
15613 else
15614   ac_build_alias=$build_alias
15615 test "x$ac_build_alias" = x &&
15616   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15617 test "x$ac_build_alias" = x &&
15618   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15619 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15620   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15621 
15622 fi
15623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15624 $as_echo "$ac_cv_build" >&6; }
15625 case $ac_cv_build in
15626 *-*-*) ;;
15627 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15628 esac
15629 build=$ac_cv_build
15630 ac_save_IFS=$IFS; IFS='-'
15631 set x $ac_cv_build
15632 shift
15633 build_cpu=$1
15634 build_vendor=$2
15635 shift; shift
15636 # Remember, the first character of IFS is used to create $*,
15637 # except with old shells:
15638 build_os=$*
15639 IFS=$ac_save_IFS
15640 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15641 
15642 
15643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15644 $as_echo_n "checking host system type... " >&6; }
15645 if ${ac_cv_host+:} false; then :
15646   $as_echo_n "(cached) " >&6
15647 else
15648   if test "x$host_alias" = x; then
15649   ac_cv_host=$ac_cv_build
15650 else
15651   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15652     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15653 fi
15654 
15655 fi
15656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15657 $as_echo "$ac_cv_host" >&6; }
15658 case $ac_cv_host in
15659 *-*-*) ;;
15660 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15661 esac
15662 host=$ac_cv_host
15663 ac_save_IFS=$IFS; IFS='-'
15664 set x $ac_cv_host
15665 shift
15666 host_cpu=$1
15667 host_vendor=$2
15668 shift; shift
15669 # Remember, the first character of IFS is used to create $*,
15670 # except with old shells:
15671 host_os=$*
15672 IFS=$ac_save_IFS
15673 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15674 
15675 
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15677 $as_echo_n "checking target system type... " >&6; }
15678 if ${ac_cv_target+:} false; then :
15679   $as_echo_n "(cached) " >&6
15680 else
15681   if test "x$target_alias" = x; then
15682   ac_cv_target=$ac_cv_host
15683 else
15684   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15685     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15686 fi
15687 
15688 fi
15689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15690 $as_echo "$ac_cv_target" >&6; }
15691 case $ac_cv_target in
15692 *-*-*) ;;
15693 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15694 esac
15695 target=$ac_cv_target
15696 ac_save_IFS=$IFS; IFS='-'
15697 set x $ac_cv_target
15698 shift
15699 target_cpu=$1
15700 target_vendor=$2
15701 shift; shift
15702 # Remember, the first character of IFS is used to create $*,
15703 # except with old shells:
15704 target_os=$*
15705 IFS=$ac_save_IFS
15706 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15707 
15708 
15709 # The aliases save the names the user supplied, while $host etc.
15710 # will get canonicalized.
15711 test -n "$target_alias" &&
15712   test "$program_prefix$program_suffix$program_transform_name" = \
15713     NONENONEs,x,x, &&
15714   program_prefix=${target_alias}-
15715 
15716   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15717   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15718   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15719   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15720   # to use the configure naming style.
15721 
15722 
15723 
15724 
15725 
15726   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15727   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15728   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15729   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15730   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15731   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15732 
15733 
15734 
15735   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15736 
15737   case "$build_os" in
15738     *linux*)
15739       VAR_OS=linux
15740       VAR_OS_TYPE=unix
15741       ;;
15742     *solaris*)
15743       VAR_OS=solaris
15744       VAR_OS_TYPE=unix
15745       ;;
15746     *darwin*)
15747       VAR_OS=macosx
15748       VAR_OS_TYPE=unix
15749       ;;
15750     *bsd*)
15751       VAR_OS=bsd
15752       VAR_OS_TYPE=unix
15753       ;;
15754     *cygwin*)
15755       VAR_OS=windows
15756       VAR_OS_ENV=windows.cygwin
15757       ;;
15758     *mingw*)
15759       VAR_OS=windows
15760       VAR_OS_ENV=windows.msys
15761       ;;
15762     *aix*)
15763       VAR_OS=aix
15764       VAR_OS_TYPE=unix
15765       ;;
15766     *)
15767       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15768       ;;
15769   esac
15770 
15771 
15772   # First argument is the cpu name from the trip/quad
15773   case "$build_cpu" in
15774     x86_64)
15775       VAR_CPU=x86_64
15776       VAR_CPU_ARCH=x86
15777       VAR_CPU_BITS=64
15778       VAR_CPU_ENDIAN=little
15779       ;;
15780     i?86)
15781       VAR_CPU=x86
15782       VAR_CPU_ARCH=x86
15783       VAR_CPU_BITS=32
15784       VAR_CPU_ENDIAN=little
15785       ;;
15786     alpha*)
15787       VAR_CPU=alpha
15788       VAR_CPU_ARCH=alpha
15789       VAR_CPU_BITS=64
15790       VAR_CPU_ENDIAN=little
15791       ;;
15792     arm*)
15793       VAR_CPU=arm
15794       VAR_CPU_ARCH=arm
15795       VAR_CPU_BITS=32
15796       VAR_CPU_ENDIAN=little
15797       ;;
15798     aarch64)
15799       VAR_CPU=aarch64
15800       VAR_CPU_ARCH=aarch64
15801       VAR_CPU_BITS=64
15802       VAR_CPU_ENDIAN=little
15803       ;;
15804     m68k)
15805       VAR_CPU=m68k
15806       VAR_CPU_ARCH=m68k
15807       VAR_CPU_BITS=32
15808       VAR_CPU_ENDIAN=big
15809       ;;
15810     mips)
15811       VAR_CPU=mips
15812       VAR_CPU_ARCH=mips
15813       VAR_CPU_BITS=32
15814       VAR_CPU_ENDIAN=big
15815       ;;
15816     mipsel)
15817       VAR_CPU=mipsel
15818       VAR_CPU_ARCH=mipsel
15819       VAR_CPU_BITS=32
15820       VAR_CPU_ENDIAN=little
15821       ;;
15822     mips64)
15823       VAR_CPU=mips64
15824       VAR_CPU_ARCH=mips64
15825       VAR_CPU_BITS=64
15826       VAR_CPU_ENDIAN=big
15827       ;;
15828     mips64el)
15829       VAR_CPU=mips64el
15830       VAR_CPU_ARCH=mips64el
15831       VAR_CPU_BITS=64
15832       VAR_CPU_ENDIAN=little
15833       ;;
15834     powerpc)
15835       VAR_CPU=ppc
15836       VAR_CPU_ARCH=ppc
15837       VAR_CPU_BITS=32
15838       VAR_CPU_ENDIAN=big
15839       ;;
15840     powerpc64)
15841       VAR_CPU=ppc64
15842       VAR_CPU_ARCH=ppc
15843       VAR_CPU_BITS=64
15844       VAR_CPU_ENDIAN=big
15845       ;;
15846     powerpc64le)
15847       VAR_CPU=ppc64le
15848       VAR_CPU_ARCH=ppc
15849       VAR_CPU_BITS=64
15850       VAR_CPU_ENDIAN=little
15851       ;;
15852     s390)
15853       VAR_CPU=s390
15854       VAR_CPU_ARCH=s390
15855       VAR_CPU_BITS=32
15856       VAR_CPU_ENDIAN=big
15857       ;;
15858     s390x)
15859       VAR_CPU=s390x
15860       VAR_CPU_ARCH=s390
15861       VAR_CPU_BITS=64
15862       VAR_CPU_ENDIAN=big
15863       ;;
15864     sh*eb)
15865       VAR_CPU=sh
15866       VAR_CPU_ARCH=sh
15867       VAR_CPU_BITS=32
15868       VAR_CPU_ENDIAN=big
15869       ;;
15870     sh*)
15871       VAR_CPU=sh
15872       VAR_CPU_ARCH=sh
15873       VAR_CPU_BITS=32
15874       VAR_CPU_ENDIAN=little
15875       ;;
15876     sparc)
15877       VAR_CPU=sparc
15878       VAR_CPU_ARCH=sparc
15879       VAR_CPU_BITS=32
15880       VAR_CPU_ENDIAN=big
15881       ;;
15882     sparcv9|sparc64)
15883       VAR_CPU=sparcv9
15884       VAR_CPU_ARCH=sparc
15885       VAR_CPU_BITS=64
15886       VAR_CPU_ENDIAN=big
15887       ;;
15888     *)
15889       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15890       ;;
15891   esac
15892 
15893   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15894   OPENJDK_BUILD_OS="$VAR_OS"
15895   if test "x$VAR_OS_TYPE" != x; then
15896     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15897   else
15898     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15899   fi
15900   if test "x$VAR_OS_ENV" != x; then
15901     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15902   else
15903     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15904   fi
15905   OPENJDK_BUILD_CPU="$VAR_CPU"
15906   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15907   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15908   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15909 
15910 
15911 
15912 
15913 
15914 
15915 
15916 
15917   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15918 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15920 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15921 
15922   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15923 
15924   case "$host_os" in
15925     *linux*)
15926       VAR_OS=linux
15927       VAR_OS_TYPE=unix
15928       ;;
15929     *solaris*)
15930       VAR_OS=solaris
15931       VAR_OS_TYPE=unix
15932       ;;
15933     *darwin*)
15934       VAR_OS=macosx
15935       VAR_OS_TYPE=unix
15936       ;;
15937     *bsd*)
15938       VAR_OS=bsd
15939       VAR_OS_TYPE=unix
15940       ;;
15941     *cygwin*)
15942       VAR_OS=windows
15943       VAR_OS_ENV=windows.cygwin
15944       ;;
15945     *mingw*)
15946       VAR_OS=windows
15947       VAR_OS_ENV=windows.msys
15948       ;;
15949     *aix*)
15950       VAR_OS=aix
15951       VAR_OS_TYPE=unix
15952       ;;
15953     *)
15954       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15955       ;;
15956   esac
15957 
15958 
15959   # First argument is the cpu name from the trip/quad
15960   case "$host_cpu" in
15961     x86_64)
15962       VAR_CPU=x86_64
15963       VAR_CPU_ARCH=x86
15964       VAR_CPU_BITS=64
15965       VAR_CPU_ENDIAN=little
15966       ;;
15967     i?86)
15968       VAR_CPU=x86
15969       VAR_CPU_ARCH=x86
15970       VAR_CPU_BITS=32
15971       VAR_CPU_ENDIAN=little
15972       ;;
15973     alpha*)
15974       VAR_CPU=alpha
15975       VAR_CPU_ARCH=alpha
15976       VAR_CPU_BITS=64
15977       VAR_CPU_ENDIAN=little
15978       ;;
15979     arm*)
15980       VAR_CPU=arm
15981       VAR_CPU_ARCH=arm
15982       VAR_CPU_BITS=32
15983       VAR_CPU_ENDIAN=little
15984       ;;
15985     aarch64)
15986       VAR_CPU=aarch64
15987       VAR_CPU_ARCH=aarch64
15988       VAR_CPU_BITS=64
15989       VAR_CPU_ENDIAN=little
15990       ;;
15991     m68k)
15992       VAR_CPU=m68k
15993       VAR_CPU_ARCH=m68k
15994       VAR_CPU_BITS=32
15995       VAR_CPU_ENDIAN=big
15996       ;;
15997     mips)
15998       VAR_CPU=mips
15999       VAR_CPU_ARCH=mips
16000       VAR_CPU_BITS=32
16001       VAR_CPU_ENDIAN=big
16002       ;;
16003     mipsel)
16004       VAR_CPU=mipsel
16005       VAR_CPU_ARCH=mipsel
16006       VAR_CPU_BITS=32
16007       VAR_CPU_ENDIAN=little
16008       ;;
16009     mips64)
16010       VAR_CPU=mips64
16011       VAR_CPU_ARCH=mips64
16012       VAR_CPU_BITS=64
16013       VAR_CPU_ENDIAN=big
16014       ;;
16015     mips64el)
16016       VAR_CPU=mips64el
16017       VAR_CPU_ARCH=mips64el
16018       VAR_CPU_BITS=64
16019       VAR_CPU_ENDIAN=little
16020       ;;
16021     powerpc)
16022       VAR_CPU=ppc
16023       VAR_CPU_ARCH=ppc
16024       VAR_CPU_BITS=32
16025       VAR_CPU_ENDIAN=big
16026       ;;
16027     powerpc64)
16028       VAR_CPU=ppc64
16029       VAR_CPU_ARCH=ppc
16030       VAR_CPU_BITS=64
16031       VAR_CPU_ENDIAN=big
16032       ;;
16033     powerpc64le)
16034       VAR_CPU=ppc64le
16035       VAR_CPU_ARCH=ppc
16036       VAR_CPU_BITS=64
16037       VAR_CPU_ENDIAN=little
16038       ;;
16039     s390)
16040       VAR_CPU=s390
16041       VAR_CPU_ARCH=s390
16042       VAR_CPU_BITS=32
16043       VAR_CPU_ENDIAN=big
16044       ;;
16045     s390x)
16046       VAR_CPU=s390x
16047       VAR_CPU_ARCH=s390
16048       VAR_CPU_BITS=64
16049       VAR_CPU_ENDIAN=big
16050       ;;
16051     sh*eb)
16052       VAR_CPU=sh
16053       VAR_CPU_ARCH=sh
16054       VAR_CPU_BITS=32
16055       VAR_CPU_ENDIAN=big
16056       ;;
16057     sh*)
16058       VAR_CPU=sh
16059       VAR_CPU_ARCH=sh
16060       VAR_CPU_BITS=32
16061       VAR_CPU_ENDIAN=little
16062       ;;
16063     sparc)
16064       VAR_CPU=sparc
16065       VAR_CPU_ARCH=sparc
16066       VAR_CPU_BITS=32
16067       VAR_CPU_ENDIAN=big
16068       ;;
16069     sparcv9|sparc64)
16070       VAR_CPU=sparcv9
16071       VAR_CPU_ARCH=sparc
16072       VAR_CPU_BITS=64
16073       VAR_CPU_ENDIAN=big
16074       ;;
16075     *)
16076       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
16077       ;;
16078   esac
16079 
16080   # ... and setup our own variables. (Do this explicitly to facilitate searching)
16081   OPENJDK_TARGET_OS="$VAR_OS"
16082   if test "x$VAR_OS_TYPE" != x; then
16083     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
16084   else
16085     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
16086   fi
16087   if test "x$VAR_OS_ENV" != x; then
16088     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
16089   else
16090     OPENJDK_TARGET_OS_ENV="$VAR_OS"
16091   fi
16092   OPENJDK_TARGET_CPU="$VAR_CPU"
16093   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
16094   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
16095   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
16096 
16097 
16098 
16099 
16100 
16101 
16102 
16103 
16104   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
16105 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
16106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
16107 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
16108 
16109 
16110 
16111 # Check whether --with-target-bits was given.
16112 if test "${with_target_bits+set}" = set; then :
16113   withval=$with_target_bits;
16114 fi
16115 
16116 
16117   # We have three types of compiles:
16118   # native  == normal compilation, target system == build system
16119   # cross   == traditional cross compilation, target system != build system; special toolchain needed
16120   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
16121   #
16122   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16123     # We're doing a proper cross-compilation
16124     COMPILE_TYPE="cross"
16125   else
16126     COMPILE_TYPE="native"
16127   fi
16128 
16129   if test "x$with_target_bits" != x; then
16130     if test "x$COMPILE_TYPE" = "xcross"; then
16131       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16132     fi
16133 
16134     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16135       # A reduced build is requested
16136       COMPILE_TYPE="reduced"
16137       OPENJDK_TARGET_CPU_BITS=32
16138       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16139         OPENJDK_TARGET_CPU=x86
16140       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16141         OPENJDK_TARGET_CPU=sparc
16142       else
16143         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16144       fi
16145     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16146       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
16147     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16148       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16149 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16150     else
16151       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16152     fi
16153   fi
16154 
16155 
16156   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16157 $as_echo_n "checking compilation type... " >&6; }
16158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16159 $as_echo "$COMPILE_TYPE" >&6; }
16160 
16161 
16162   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16163     OPENJDK_MODULE_TARGET_OS_NAME="macos"
16164   else
16165     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16166   fi
16167 
16168   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16169     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16170   else
16171     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16172   fi
16173 
16174   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16175 
16176 
16177 
16178   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16179     RELEASE_FILE_OS_NAME=SunOS
16180   fi
16181   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16182     RELEASE_FILE_OS_NAME=Linux
16183   fi
16184   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16185     RELEASE_FILE_OS_NAME=Windows
16186   fi
16187   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16188     RELEASE_FILE_OS_NAME="Darwin"
16189   fi
16190   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16191     RELEASE_FILE_OS_NAME="AIX"
16192   fi
16193   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16194 
16195 
16196 
16197 
16198 
16199 
16200   # Also store the legacy naming of the cpu.
16201   # Ie i586 and amd64 instead of x86 and x86_64
16202   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16203   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16204     OPENJDK_TARGET_CPU_LEGACY="i586"
16205   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16206     # On all platforms except MacOSX replace x86_64 with amd64.
16207     OPENJDK_TARGET_CPU_LEGACY="amd64"
16208   elif test "x$OPENJDK_TARGET_CPU" = xalpha; then
16209     # Avoid name collisions with variables named alpha
16210     OPENJDK_TARGET_CPU_LEGACY="_alpha_"
16211   elif test "x$OPENJDK_TARGET_CPU" = xsh; then
16212     # Avoid name collisions with variables named sh
16213     OPENJDK_TARGET_CPU_LEGACY="_sh_"
16214   fi
16215 
16216 
16217   # And the second legacy naming of the cpu.
16218   # Ie i386 and amd64 instead of x86 and x86_64.
16219   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16220   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16221     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16222   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16223     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16224   fi
16225 
16226 
16227   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16228   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16229   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16230   OPENJDK_TARGET_CPU_ISADIR=""
16231   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16232     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16233       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16234     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16235       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16236     fi
16237   fi
16238 
16239 
16240   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16241   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16242   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16243     # On linux only, we replace x86 with i386.
16244     OPENJDK_TARGET_CPU_OSARCH="i386"
16245   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16246     # On all platforms except macosx, we replace x86_64 with amd64.
16247     OPENJDK_TARGET_CPU_OSARCH="amd64"
16248   fi
16249 
16250 
16251   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16252   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16253     OPENJDK_TARGET_CPU_JLI="i386"
16254   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16255     # On all platforms except macosx, we replace x86_64 with amd64.
16256     OPENJDK_TARGET_CPU_JLI="amd64"
16257   fi
16258 
16259   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16260   # Macosx is osx and x86_64 is x64
16261   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16262     OPENJDK_TARGET_OS_BUNDLE="osx"
16263   else
16264     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16265   fi
16266   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16267     OPENJDK_TARGET_CPU_BUNDLE="x64"
16268   else
16269     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16270   fi
16271   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16272 
16273 
16274   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16275     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16276     # unpack200.exe. This variable is used in
16277     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16278     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16279       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16280     fi
16281   fi
16282 
16283   if test "x$COMPILE_TYPE" = "xcross"; then
16284     # FIXME: ... or should this include reduced builds..?
16285     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16286   else
16287     DEFINE_CROSS_COMPILE_ARCH=""
16288   fi
16289 
16290 
16291   # Convert openjdk platform names to hotspot names
16292 
16293   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16294   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16295     HOTSPOT_TARGET_OS=bsd
16296   fi
16297 
16298 
16299   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16300   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16301     HOTSPOT_TARGET_OS_TYPE=posix
16302   fi
16303 
16304 
16305   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16306   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16307     HOTSPOT_TARGET_CPU=x86_32
16308   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16309     HOTSPOT_TARGET_CPU=sparc
16310   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16311     HOTSPOT_TARGET_CPU=ppc_64
16312   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16313     HOTSPOT_TARGET_CPU=ppc_64
16314   fi
16315 
16316 
16317   # This is identical with OPENJDK_*, but define anyway for consistency.
16318   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16319 
16320 
16321   # Setup HOTSPOT_TARGET_CPU_DEFINE
16322   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16323     HOTSPOT_TARGET_CPU_DEFINE=IA32
16324   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16325     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16326   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16327     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16328   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16329     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16330   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16331     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16332   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16333     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16334 
16335   # The cpu defines below are for zero, we don't support them directly.
16336   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16337     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16338   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16339     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16340   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16341     HOTSPOT_TARGET_CPU_DEFINE=S390
16342   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16343     HOTSPOT_TARGET_CPU_DEFINE=S390
16344   elif test "x$OPENJDK_TARGET_CPU" != x; then
16345     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16346   fi
16347 
16348 
16349   # For historical reasons, the OS include directories have odd names.
16350   OPENJDK_TARGET_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
16351   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16352     OPENJDK_TARGET_OS_INCLUDE_SUBDIR="win32"
16353   elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16354     OPENJDK_TARGET_OS_INCLUDE_SUBDIR="darwin"
16355   fi
16356 
16357 
16358 
16359   # Also store the legacy naming of the cpu.
16360   # Ie i586 and amd64 instead of x86 and x86_64
16361   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16362   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16363     OPENJDK_BUILD_CPU_LEGACY="i586"
16364   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16365     # On all platforms except MacOSX replace x86_64 with amd64.
16366     OPENJDK_BUILD_CPU_LEGACY="amd64"
16367   elif test "x$OPENJDK_BUILD_CPU" = xalpha; then
16368     # Avoid name collisions with variables named alpha
16369     OPENJDK_BUILD_CPU_LEGACY="_alpha_"
16370   elif test "x$OPENJDK_BUILD_CPU" = xsh; then
16371     # Avoid name collisions with variables named sh
16372     OPENJDK_BUILD_CPU_LEGACY="_sh_"
16373   fi
16374 
16375 
16376   # And the second legacy naming of the cpu.
16377   # Ie i386 and amd64 instead of x86 and x86_64.
16378   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16379   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16380     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16381   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16382     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16383   fi
16384 
16385 
16386   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16387   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16388   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16389   OPENJDK_BUILD_CPU_ISADIR=""
16390   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16391     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16392       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16393     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16394       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16395     fi
16396   fi
16397 
16398 
16399   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16400   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16401   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16402     # On linux only, we replace x86 with i386.
16403     OPENJDK_BUILD_CPU_OSARCH="i386"
16404   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16405     # On all platforms except macosx, we replace x86_64 with amd64.
16406     OPENJDK_BUILD_CPU_OSARCH="amd64"
16407   fi
16408 
16409 
16410   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16411   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16412     OPENJDK_BUILD_CPU_JLI="i386"
16413   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16414     # On all platforms except macosx, we replace x86_64 with amd64.
16415     OPENJDK_BUILD_CPU_JLI="amd64"
16416   fi
16417 
16418   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16419   # Macosx is osx and x86_64 is x64
16420   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16421     OPENJDK_BUILD_OS_BUNDLE="osx"
16422   else
16423     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16424   fi
16425   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16426     OPENJDK_BUILD_CPU_BUNDLE="x64"
16427   else
16428     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16429   fi
16430   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16431 
16432 
16433   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16434     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16435     # unpack200.exe. This variable is used in
16436     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16437     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16438       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16439     fi
16440   fi
16441 
16442   if test "x$COMPILE_TYPE" = "xcross"; then
16443     # FIXME: ... or should this include reduced builds..?
16444     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16445   else
16446     DEFINE_CROSS_COMPILE_ARCH=""
16447   fi
16448 
16449 
16450   # Convert openjdk platform names to hotspot names
16451 
16452   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16453   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16454     HOTSPOT_BUILD_OS=bsd
16455   fi
16456 
16457 
16458   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16459   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16460     HOTSPOT_BUILD_OS_TYPE=posix
16461   fi
16462 
16463 
16464   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16465   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16466     HOTSPOT_BUILD_CPU=x86_32
16467   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16468     HOTSPOT_BUILD_CPU=sparc
16469   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16470     HOTSPOT_BUILD_CPU=ppc_64
16471   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16472     HOTSPOT_BUILD_CPU=ppc_64
16473   fi
16474 
16475 
16476   # This is identical with OPENJDK_*, but define anyway for consistency.
16477   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16478 
16479 
16480   # Setup HOTSPOT_BUILD_CPU_DEFINE
16481   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16482     HOTSPOT_BUILD_CPU_DEFINE=IA32
16483   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16484     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16485   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16486     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16487   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16488     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16489   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16490     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16491   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16492     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16493 
16494   # The cpu defines below are for zero, we don't support them directly.
16495   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16496     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16497   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16498     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16499   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16500     HOTSPOT_BUILD_CPU_DEFINE=S390
16501   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16502     HOTSPOT_BUILD_CPU_DEFINE=S390
16503   elif test "x$OPENJDK_BUILD_CPU" != x; then
16504     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16505   fi
16506 
16507 
16508   # For historical reasons, the OS include directories have odd names.
16509   OPENJDK_BUILD_OS_INCLUDE_SUBDIR="$OPENJDK_TARGET_OS"
16510   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16511     OPENJDK_BUILD_OS_INCLUDE_SUBDIR="win32"
16512   elif test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16513     OPENJDK_BUILD_OS_INCLUDE_SUBDIR="darwin"
16514   fi
16515 
16516 
16517 
16518 
16519 
16520 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16521 
16522   # Save the current directory this script was started from
16523   CURDIR="$PWD"
16524 
16525   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16526   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16527   # was not available at that time.
16528   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16529   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16530     ORIGINAL_PATH="$REWRITTEN_PATH"
16531     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16532 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16533   fi
16534 
16535   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16536     PATH_SEP=";"
16537 
16538   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16539   if test $SRC_ROOT_LENGTH -gt 100; then
16540     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16541   fi
16542 
16543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16544     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16545 $as_echo_n "checking cygwin release... " >&6; }
16546     CYGWIN_VERSION=`$UNAME -r`
16547     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16548 $as_echo "$CYGWIN_VERSION" >&6; }
16549     WINDOWS_ENV_VENDOR='cygwin'
16550     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16551 
16552     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16553     if test "x$CYGWIN_VERSION_OLD" != x; then
16554       { $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
16555 $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;}
16556       as_fn_error $? "Cannot continue" "$LINENO" 5
16557     fi
16558     if test "x$CYGPATH" = x; then
16559       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16560     fi
16561     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16562 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16563     # The cmd output ends with Windows line endings (CR/LF)
16564     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16565     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16566     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16567     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16568 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16569     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16570     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16571     if test "x$test_cygdrive_prefix" = x; then
16572       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16573     fi
16574   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16575     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16576 $as_echo_n "checking msys release... " >&6; }
16577     MSYS_VERSION=`$UNAME -r`
16578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16579 $as_echo "$MSYS_VERSION" >&6; }
16580 
16581     WINDOWS_ENV_VENDOR='msys'
16582     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16583 
16584     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16585 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16586     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16587     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16588 
16589   windows_path="$MSYS_ROOT_PATH"
16590   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16591     unix_path=`$CYGPATH -u "$windows_path"`
16592     MSYS_ROOT_PATH="$unix_path"
16593   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16594     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16595     MSYS_ROOT_PATH="$unix_path"
16596   fi
16597 
16598     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16599 $as_echo "$MSYS_ROOT_PATH" >&6; }
16600     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16601   else
16602     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16603   fi
16604 
16605   # Test if windows or unix (cygwin/msys) find is first in path.
16606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16607 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16608   FIND_BINARY_OUTPUT=`find --version 2>&1`
16609   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16610     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16611 $as_echo "unix style" >&6; }
16612   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16613     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16614 $as_echo "Windows" >&6; }
16615     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16616 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16617     { $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
16618 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16619     as_fn_error $? "Cannot continue" "$LINENO" 5
16620   else
16621     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16622 $as_echo "unknown" >&6; }
16623     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16624 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16625   fi
16626 
16627   else
16628     PATH_SEP=":"
16629   fi
16630 
16631 
16632   # We get the top-level directory from the supporting wrappers.
16633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16634 $as_echo_n "checking for top-level directory... " >&6; }
16635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16636 $as_echo "$TOPDIR" >&6; }
16637 
16638 
16639   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16640 
16641   # Only process if variable expands to non-empty
16642 
16643   if test "x$CURDIR" != x; then
16644     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16645 
16646   # Input might be given as Windows format, start by converting to
16647   # unix format.
16648   path="$CURDIR"
16649   new_path=`$CYGPATH -u "$path"`
16650 
16651   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16652   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16653   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16654   # "foo.exe" is OK but "foo" is an error.
16655   #
16656   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16657   # It is also a way to make sure we got the proper file name for the real test later on.
16658   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16659   if test "x$test_shortpath" = x; then
16660     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16661 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16662     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16663   fi
16664 
16665   # Call helper function which possibly converts this using DOS-style short mode.
16666   # If so, the updated path is stored in $new_path.
16667 
16668   input_path="$new_path"
16669   # Check if we need to convert this using DOS-style short mode. If the path
16670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16671   # take no chances and rewrite it.
16672   # Note: m4 eats our [], so we need to use [ and ] instead.
16673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16674   if test "x$has_forbidden_chars" != x; then
16675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16676     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16677     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16678     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16679       # Going to short mode and back again did indeed matter. Since short mode is
16680       # case insensitive, let's make it lowercase to improve readability.
16681       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16682       # Now convert it back to Unix-style (cygpath)
16683       input_path=`$CYGPATH -u "$shortmode_path"`
16684       new_path="$input_path"
16685     fi
16686   fi
16687 
16688   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16689   if test "x$test_cygdrive_prefix" = x; then
16690     # As a simple fix, exclude /usr/bin since it's not a real path.
16691     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16692       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16693       # a path prefixed by /cygdrive for fixpath to work.
16694       new_path="$CYGWIN_ROOT_PATH$input_path"
16695     fi
16696   fi
16697 
16698 
16699   if test "x$path" != "x$new_path"; then
16700     CURDIR="$new_path"
16701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16702 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16703   fi
16704 
16705     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16706 
16707   path="$CURDIR"
16708   has_colon=`$ECHO $path | $GREP ^.:`
16709   new_path="$path"
16710   if test "x$has_colon" = x; then
16711     # Not in mixed or Windows style, start by that.
16712     new_path=`cmd //c echo $path`
16713   fi
16714 
16715 
16716   input_path="$new_path"
16717   # Check if we need to convert this using DOS-style short mode. If the path
16718   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16719   # take no chances and rewrite it.
16720   # Note: m4 eats our [], so we need to use [ and ] instead.
16721   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16722   if test "x$has_forbidden_chars" != x; then
16723     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16724     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16725   fi
16726 
16727 
16728   windows_path="$new_path"
16729   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16730     unix_path=`$CYGPATH -u "$windows_path"`
16731     new_path="$unix_path"
16732   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16733     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16734     new_path="$unix_path"
16735   fi
16736 
16737   if test "x$path" != "x$new_path"; then
16738     CURDIR="$new_path"
16739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16740 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16741   fi
16742 
16743   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16744   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16745 
16746     else
16747       # We're on a unix platform. Hooray! :)
16748       path="$CURDIR"
16749       has_space=`$ECHO "$path" | $GREP " "`
16750       if test "x$has_space" != x; then
16751         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16752 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16753         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16754       fi
16755 
16756       # Use eval to expand a potential ~
16757       eval path="$path"
16758       if test ! -f "$path" && test ! -d "$path"; then
16759         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16760       fi
16761 
16762       if test -d "$path"; then
16763         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16764       else
16765         dir="`$DIRNAME "$path"`"
16766         base="`$BASENAME "$path"`"
16767         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16768       fi
16769     fi
16770   fi
16771 
16772 
16773   # Only process if variable expands to non-empty
16774 
16775   if test "x$TOPDIR" != x; then
16776     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16777 
16778   # Input might be given as Windows format, start by converting to
16779   # unix format.
16780   path="$TOPDIR"
16781   new_path=`$CYGPATH -u "$path"`
16782 
16783   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16784   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16785   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16786   # "foo.exe" is OK but "foo" is an error.
16787   #
16788   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16789   # It is also a way to make sure we got the proper file name for the real test later on.
16790   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16791   if test "x$test_shortpath" = x; then
16792     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16793 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16794     as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16795   fi
16796 
16797   # Call helper function which possibly converts this using DOS-style short mode.
16798   # If so, the updated path is stored in $new_path.
16799 
16800   input_path="$new_path"
16801   # Check if we need to convert this using DOS-style short mode. If the path
16802   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16803   # take no chances and rewrite it.
16804   # Note: m4 eats our [], so we need to use [ and ] instead.
16805   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16806   if test "x$has_forbidden_chars" != x; then
16807     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16808     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16809     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16810     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16811       # Going to short mode and back again did indeed matter. Since short mode is
16812       # case insensitive, let's make it lowercase to improve readability.
16813       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16814       # Now convert it back to Unix-style (cygpath)
16815       input_path=`$CYGPATH -u "$shortmode_path"`
16816       new_path="$input_path"
16817     fi
16818   fi
16819 
16820   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16821   if test "x$test_cygdrive_prefix" = x; then
16822     # As a simple fix, exclude /usr/bin since it's not a real path.
16823     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16824       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16825       # a path prefixed by /cygdrive for fixpath to work.
16826       new_path="$CYGWIN_ROOT_PATH$input_path"
16827     fi
16828   fi
16829 
16830 
16831   if test "x$path" != "x$new_path"; then
16832     TOPDIR="$new_path"
16833     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16834 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16835   fi
16836 
16837     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16838 
16839   path="$TOPDIR"
16840   has_colon=`$ECHO $path | $GREP ^.:`
16841   new_path="$path"
16842   if test "x$has_colon" = x; then
16843     # Not in mixed or Windows style, start by that.
16844     new_path=`cmd //c echo $path`
16845   fi
16846 
16847 
16848   input_path="$new_path"
16849   # Check if we need to convert this using DOS-style short mode. If the path
16850   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16851   # take no chances and rewrite it.
16852   # Note: m4 eats our [], so we need to use [ and ] instead.
16853   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16854   if test "x$has_forbidden_chars" != x; then
16855     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16856     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16857   fi
16858 
16859 
16860   windows_path="$new_path"
16861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16862     unix_path=`$CYGPATH -u "$windows_path"`
16863     new_path="$unix_path"
16864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16866     new_path="$unix_path"
16867   fi
16868 
16869   if test "x$path" != "x$new_path"; then
16870     TOPDIR="$new_path"
16871     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16872 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16873   fi
16874 
16875   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16876   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16877 
16878     else
16879       # We're on a unix platform. Hooray! :)
16880       path="$TOPDIR"
16881       has_space=`$ECHO "$path" | $GREP " "`
16882       if test "x$has_space" != x; then
16883         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16884 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16885         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16886       fi
16887 
16888       # Use eval to expand a potential ~
16889       eval path="$path"
16890       if test ! -f "$path" && test ! -d "$path"; then
16891         as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16892       fi
16893 
16894       if test -d "$path"; then
16895         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16896       else
16897         dir="`$DIRNAME "$path"`"
16898         base="`$BASENAME "$path"`"
16899         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16900       fi
16901     fi
16902   fi
16903 
16904 
16905   # Locate the directory of this script.
16906   AUTOCONF_DIR=$TOPDIR/make/autoconf
16907 
16908   # Setup username (for use in adhoc version strings etc)
16909   # Outer [ ] to quote m4.
16910    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16911 
16912 
16913 
16914 # Check if it's a pure open build or if custom sources are to be used.
16915 
16916   # Check whether --enable-openjdk-only was given.
16917 if test "${enable_openjdk_only+set}" = set; then :
16918   enableval=$enable_openjdk_only;
16919 else
16920   enable_openjdk_only="no"
16921 fi
16922 
16923 
16924   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16925 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16927 $as_echo "$enable_openjdk_only" >&6; }
16928   if test "x$enable_openjdk_only" = "xyes"; then
16929     SUPPRESS_CUSTOM_EXTENSIONS="true"
16930   elif test "x$enable_openjdk_only" = "xno"; then
16931     SUPPRESS_CUSTOM_EXTENSIONS="false"
16932   else
16933     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16934   fi
16935 
16936   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16937   # the IncludeCustomExtension macro.
16938 
16939 
16940 # Check whether --with-custom-make-dir was given.
16941 if test "${with_custom_make_dir+set}" = set; then :
16942   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
16943 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16944 fi
16945 
16946 
16947 
16948 
16949 # These are needed to be able to create a configuration name (and thus the output directory)
16950 
16951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16952 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16953 
16954 # Check whether --with-jdk-variant was given.
16955 if test "${with_jdk_variant+set}" = set; then :
16956   withval=$with_jdk_variant;
16957 fi
16958 
16959 
16960   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16961     JDK_VARIANT="normal"
16962   else
16963     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16964   fi
16965 
16966 
16967 
16968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16969 $as_echo "$JDK_VARIANT" >&6; }
16970 
16971 
16972   DEBUG_LEVEL="release"
16973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16974 $as_echo_n "checking which debug level to use... " >&6; }
16975   # Check whether --enable-debug was given.
16976 if test "${enable_debug+set}" = set; then :
16977   enableval=$enable_debug;
16978         ENABLE_DEBUG="${enableval}"
16979         DEBUG_LEVEL="fastdebug"
16980 
16981 else
16982   ENABLE_DEBUG="no"
16983 fi
16984 
16985 
16986 
16987 # Check whether --with-debug-level was given.
16988 if test "${with_debug_level+set}" = set; then :
16989   withval=$with_debug_level;
16990         DEBUG_LEVEL="${withval}"
16991         if test "x$ENABLE_DEBUG" = xyes; then
16992           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16993         fi
16994 
16995 fi
16996 
16997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16998 $as_echo "$DEBUG_LEVEL" >&6; }
16999 
17000   if test "x$DEBUG_LEVEL" != xrelease && \
17001       test "x$DEBUG_LEVEL" != xoptimized && \
17002       test "x$DEBUG_LEVEL" != xfastdebug && \
17003       test "x$DEBUG_LEVEL" != xslowdebug; then
17004     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
17005   fi
17006 
17007   # Translate DEBUG_LEVEL to debug level used by Hotspot
17008   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
17009   if test "x$DEBUG_LEVEL" = xrelease; then
17010     HOTSPOT_DEBUG_LEVEL="product"
17011   elif test "x$DEBUG_LEVEL" = xslowdebug; then
17012     HOTSPOT_DEBUG_LEVEL="debug"
17013   fi
17014 
17015   if test "x$DEBUG_LEVEL" = xoptimized; then
17016     # The debug level 'optimized' is a little special because it is currently only
17017     # applicable to the HotSpot build where it means to build a completely
17018     # optimized version of the VM without any debugging code (like for the
17019     # 'release' debug level which is called 'product' in the HotSpot build) but
17020     # with the exception that it can contain additional code which is otherwise
17021     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
17022     # test new and/or experimental features which are not intended for customer
17023     # shipment. Because these new features need to be tested and benchmarked in
17024     # real world scenarios, we want to build the containing JDK at the 'release'
17025     # debug level.
17026     DEBUG_LEVEL="release"
17027   fi
17028 
17029 
17030 
17031 
17032 
17033 
17034 # Check whether --with-jvm-variants was given.
17035 if test "${with_jvm_variants+set}" = set; then :
17036   withval=$with_jvm_variants;
17037 fi
17038 
17039 
17040 
17041 
17042 # Check whether --with-cpu-port was given.
17043 if test "${with_cpu_port+set}" = set; then :
17044   withval=$with_cpu_port;
17045 fi
17046 
17047 
17048   if test "x$with_cpu_port" != x; then
17049     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
17050       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
17051     fi
17052     if test "x$with_cpu_port" != xarm64 && \
17053         test "x$with_cpu_port" != xaarch64; then
17054       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
17055     fi
17056     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
17057   fi
17058 
17059 
17060   if test "x$with_jvm_variants" = x; then
17061     with_jvm_variants="server"
17062   fi
17063   JVM_VARIANTS_OPT="$with_jvm_variants"
17064 
17065   # Has the user listed more than one variant?
17066   # Additional [] needed to keep m4 from mangling shell constructs.
17067   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
17068     BUILDING_MULTIPLE_JVM_VARIANTS=true
17069   else
17070     BUILDING_MULTIPLE_JVM_VARIANTS=false
17071   fi
17072   # Replace the commas with AND for use in the build directory name.
17073   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
17074 
17075   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
17076 $as_echo_n "checking which variants of the JVM to build... " >&6; }
17077   # JVM_VARIANTS is a space-separated list.
17078   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17079   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17080   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17081 $as_echo "$JVM_VARIANTS" >&6; }
17082 
17083   # Check that the selected variants are valid
17084 
17085   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17086   # Notice that the original variant failes on SLES 10 and 11
17087   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17088   STACK=${JVM_VARIANTS// /$'\n'}
17089   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17090   if test "x$INVALID_VARIANTS" != x; then
17091     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17092 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17093     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17094   fi
17095 
17096   # All "special" variants share the same output directory ("server")
17097   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17098   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17099   STACK=${JVM_VARIANTS// /$'\n'}
17100   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17101   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17102     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17103   fi
17104 
17105   # The "main" variant is the one used by other libs to link against during the
17106   # build.
17107   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17108     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17109     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17110       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17111         JVM_VARIANT_MAIN="$variant"
17112         break
17113       fi
17114     done
17115   else
17116     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17117   fi
17118 
17119 
17120 
17121 
17122 
17123   if   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
17124     # zero behaves as a platform and rewrites these values. This is really weird. :(
17125     # We are guaranteed that we do not build any other variants when building zero.
17126     HOTSPOT_TARGET_CPU=zero
17127     HOTSPOT_TARGET_CPU_ARCH=zero
17128   fi
17129 
17130 
17131 # With basic setup done, call the custom early hook.
17132 
17133 
17134 # Check if we have devkits, extra paths or sysroot set.
17135 
17136 
17137 # Check whether --with-devkit was given.
17138 if test "${with_devkit+set}" = set; then :
17139   withval=$with_devkit;
17140 fi
17141 
17142 
17143   if test "x$with_devkit" = xyes; then
17144     as_fn_error $? "--with-devkit must have a value" "$LINENO" 5
17145   elif test "x$with_devkit" != x && test "x$with_devkit" != xno; then
17146 
17147   # Only process if variable expands to non-empty
17148 
17149   if test "x$with_devkit" != x; then
17150     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17151 
17152   # Input might be given as Windows format, start by converting to
17153   # unix format.
17154   path="$with_devkit"
17155   new_path=`$CYGPATH -u "$path"`
17156 
17157   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17158   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17159   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17160   # "foo.exe" is OK but "foo" is an error.
17161   #
17162   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17163   # It is also a way to make sure we got the proper file name for the real test later on.
17164   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17165   if test "x$test_shortpath" = x; then
17166     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17167 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17168     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17169   fi
17170 
17171   # Call helper function which possibly converts this using DOS-style short mode.
17172   # If so, the updated path is stored in $new_path.
17173 
17174   input_path="$new_path"
17175   # Check if we need to convert this using DOS-style short mode. If the path
17176   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17177   # take no chances and rewrite it.
17178   # Note: m4 eats our [], so we need to use [ and ] instead.
17179   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17180   if test "x$has_forbidden_chars" != x; then
17181     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17182     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17183     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17184     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17185       # Going to short mode and back again did indeed matter. Since short mode is
17186       # case insensitive, let's make it lowercase to improve readability.
17187       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17188       # Now convert it back to Unix-style (cygpath)
17189       input_path=`$CYGPATH -u "$shortmode_path"`
17190       new_path="$input_path"
17191     fi
17192   fi
17193 
17194   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17195   if test "x$test_cygdrive_prefix" = x; then
17196     # As a simple fix, exclude /usr/bin since it's not a real path.
17197     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17198       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17199       # a path prefixed by /cygdrive for fixpath to work.
17200       new_path="$CYGWIN_ROOT_PATH$input_path"
17201     fi
17202   fi
17203 
17204 
17205   if test "x$path" != "x$new_path"; then
17206     with_devkit="$new_path"
17207     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17208 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17209   fi
17210 
17211     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17212 
17213   path="$with_devkit"
17214   has_colon=`$ECHO $path | $GREP ^.:`
17215   new_path="$path"
17216   if test "x$has_colon" = x; then
17217     # Not in mixed or Windows style, start by that.
17218     new_path=`cmd //c echo $path`
17219   fi
17220 
17221 
17222   input_path="$new_path"
17223   # Check if we need to convert this using DOS-style short mode. If the path
17224   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17225   # take no chances and rewrite it.
17226   # Note: m4 eats our [], so we need to use [ and ] instead.
17227   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17228   if test "x$has_forbidden_chars" != x; then
17229     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17230     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17231   fi
17232 
17233 
17234   windows_path="$new_path"
17235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17236     unix_path=`$CYGPATH -u "$windows_path"`
17237     new_path="$unix_path"
17238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17240     new_path="$unix_path"
17241   fi
17242 
17243   if test "x$path" != "x$new_path"; then
17244     with_devkit="$new_path"
17245     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17246 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17247   fi
17248 
17249   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17250   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17251 
17252     else
17253       # We're on a unix platform. Hooray! :)
17254       path="$with_devkit"
17255       has_space=`$ECHO "$path" | $GREP " "`
17256       if test "x$has_space" != x; then
17257         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17258 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17259         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17260       fi
17261 
17262       # Use eval to expand a potential ~
17263       eval path="$path"
17264       if test ! -f "$path" && test ! -d "$path"; then
17265         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17266       fi
17267 
17268       if test -d "$path"; then
17269         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17270       else
17271         dir="`$DIRNAME "$path"`"
17272         base="`$BASENAME "$path"`"
17273         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17274       fi
17275     fi
17276   fi
17277 
17278     DEVKIT_ROOT="$with_devkit"
17279     # Check for a meta data info file in the root of the devkit
17280     if test -f "$DEVKIT_ROOT/devkit.info"; then
17281       . $DEVKIT_ROOT/devkit.info
17282       # This potentially sets the following:
17283       # A descriptive name of the devkit
17284 
17285   if test "x$DEVKIT_NAME" = x; then
17286     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17287   fi
17288 
17289       # Corresponds to --with-extra-path
17290 
17291   if test "x$DEVKIT_EXTRA_PATH" = x; then
17292     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17293   fi
17294 
17295       # Corresponds to --with-toolchain-path
17296 
17297   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17298     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17299   fi
17300 
17301       # Corresponds to --with-sysroot
17302 
17303   if test "x$DEVKIT_SYSROOT" = x; then
17304     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17305   fi
17306 
17307 
17308       # Identifies the Visual Studio version in the devkit
17309 
17310   if test "x$DEVKIT_VS_VERSION" = x; then
17311     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17312   fi
17313 
17314       # The Visual Studio include environment variable
17315 
17316   if test "x$DEVKIT_VS_INCLUDE" = x; then
17317     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17318   fi
17319 
17320       # The Visual Studio lib environment variable
17321 
17322   if test "x$DEVKIT_VS_LIB" = x; then
17323     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17324   fi
17325 
17326       # Corresponds to --with-msvcr-dll
17327 
17328   if test "x$DEVKIT_MSVCR_DLL" = x; then
17329     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17330   fi
17331 
17332       # Corresponds to --with-msvcp-dll
17333 
17334   if test "x$DEVKIT_MSVCP_DLL" = x; then
17335     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17336   fi
17337 
17338     fi
17339 
17340     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17341 $as_echo_n "checking for devkit... " >&6; }
17342     if test "x$DEVKIT_NAME" != x; then
17343       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17344 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17345     else
17346       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17347 $as_echo "$DEVKIT_ROOT" >&6; }
17348     fi
17349 
17350 
17351   if test "x$DEVKIT_EXTRA_PATH" != x; then
17352     if test "x$EXTRA_PATH" = x; then
17353       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17354     else
17355       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17356     fi
17357   fi
17358 
17359 
17360     # Fallback default of just /bin if DEVKIT_PATH is not defined
17361     if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17362       DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17363     fi
17364 
17365   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17366     if test "x$TOOLCHAIN_PATH" = x; then
17367       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17368     else
17369       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17370     fi
17371   fi
17372 
17373 
17374     # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17375     # places for backwards compatiblity.
17376     if test "x$DEVKIT_SYSROOT" != x; then
17377       SYSROOT="$DEVKIT_SYSROOT"
17378     elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17379       SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17380     elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17381       SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17382     fi
17383 
17384     if test "x$DEVKIT_ROOT" != x; then
17385       DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib"
17386       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
17387         DEVKIT_LIB_DIR="$DEVKIT_ROOT/lib64"
17388       fi
17389 
17390     fi
17391   fi
17392 
17393   # You can force the sysroot if the sysroot encoded into the compiler tools
17394   # is not correct.
17395 
17396 # Check whether --with-sys-root was given.
17397 if test "${with_sys_root+set}" = set; then :
17398   withval=$with_sys_root; SYSROOT=$with_sys_root
17399 
17400 fi
17401 
17402 
17403 
17404 # Check whether --with-sysroot was given.
17405 if test "${with_sysroot+set}" = set; then :
17406   withval=$with_sysroot; SYSROOT=$with_sysroot
17407 
17408 fi
17409 
17410 
17411 
17412 # Check whether --with-tools-dir was given.
17413 if test "${with_tools_dir+set}" = set; then :
17414   withval=$with_tools_dir;
17415   if test "x$with_tools_dir" != x; then
17416     if test "x$TOOLCHAIN_PATH" = x; then
17417       TOOLCHAIN_PATH="$with_tools_dir"
17418     else
17419       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17420     fi
17421   fi
17422 
17423 
17424 fi
17425 
17426 
17427 
17428 # Check whether --with-toolchain-path was given.
17429 if test "${with_toolchain_path+set}" = set; then :
17430   withval=$with_toolchain_path;
17431   if test "x$with_toolchain_path" != x; then
17432     if test "x$TOOLCHAIN_PATH" = x; then
17433       TOOLCHAIN_PATH="$with_toolchain_path"
17434     else
17435       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17436     fi
17437   fi
17438 
17439 
17440 fi
17441 
17442 
17443 
17444 # Check whether --with-extra-path was given.
17445 if test "${with_extra_path+set}" = set; then :
17446   withval=$with_extra_path;
17447   if test "x$with_extra_path" != x; then
17448     if test "x$EXTRA_PATH" = x; then
17449       EXTRA_PATH="$with_extra_path"
17450     else
17451       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17452     fi
17453   fi
17454 
17455 
17456 fi
17457 
17458 
17459   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17460     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17461     # If not, detect if Xcode is installed by running xcodebuild -version
17462     # if no Xcode installed, xcodebuild exits with 1
17463     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17464     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17465       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17466       # fall back on the stub binary in /usr/bin/xcodebuild
17467       # Extract the first word of "xcodebuild", so it can be a program name with args.
17468 set dummy xcodebuild; ac_word=$2
17469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17470 $as_echo_n "checking for $ac_word... " >&6; }
17471 if ${ac_cv_path_XCODEBUILD+:} false; then :
17472   $as_echo_n "(cached) " >&6
17473 else
17474   case $XCODEBUILD in
17475   [\\/]* | ?:[\\/]*)
17476   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17477   ;;
17478   *)
17479   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17480 for as_dir in $TOOLCHAIN_PATH
17481 do
17482   IFS=$as_save_IFS
17483   test -z "$as_dir" && as_dir=.
17484     for ac_exec_ext in '' $ac_executable_extensions; do
17485   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17486     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17487     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17488     break 2
17489   fi
17490 done
17491   done
17492 IFS=$as_save_IFS
17493 
17494   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17495   ;;
17496 esac
17497 fi
17498 XCODEBUILD=$ac_cv_path_XCODEBUILD
17499 if test -n "$XCODEBUILD"; then
17500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17501 $as_echo "$XCODEBUILD" >&6; }
17502 else
17503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17504 $as_echo "no" >&6; }
17505 fi
17506 
17507 
17508     else
17509       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17510       # when only the command line tools are installed there are no SDKs, so headers
17511       # are copied into the system frameworks
17512       XCODEBUILD=
17513 
17514     fi
17515 
17516     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17517 $as_echo_n "checking for sdk name... " >&6; }
17518 
17519 # Check whether --with-sdk-name was given.
17520 if test "${with_sdk_name+set}" = set; then :
17521   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17522 
17523 fi
17524 
17525     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17526 $as_echo "$SDKNAME" >&6; }
17527 
17528     # if toolchain path is specified then don't rely on system headers, they may not compile
17529     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17530     test -z "$TOOLCHAIN_PATH" && \
17531       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17532 
17533     if test -z "$SYSROOT"; then
17534       if test -n "$XCODEBUILD"; then
17535         # if we don't have system headers, use default SDK name (last resort)
17536         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17537           SDKNAME=${SDKNAME:-macosx}
17538         fi
17539 
17540         if test -n "$SDKNAME"; then
17541           # Call xcodebuild to determine SYSROOT
17542           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17543         fi
17544       else
17545         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17546           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
17547         fi
17548       fi
17549     else
17550       # warn user if --with-sdk-name was also set
17551       if test -n "$with_sdk_name"; then
17552         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17553 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17554       fi
17555     fi
17556 
17557     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17558       # If no system framework headers, then SYSROOT must be set, or we won't build
17559       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
17560     fi
17561 
17562     # Perform a basic sanity test
17563     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17564       if test -z "$SYSROOT"; then
17565         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
17566       else
17567         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17568       fi
17569     fi
17570 
17571     # set SDKROOT too, Xcode tools will pick it up
17572     SDKROOT="$SYSROOT"
17573 
17574   fi
17575 
17576   # Prepend the extra path to the global path
17577 
17578   if test "x$EXTRA_PATH" != x; then
17579     if test "x$PATH" = x; then
17580       PATH="$EXTRA_PATH"
17581     else
17582       PATH="$EXTRA_PATH:$PATH"
17583     fi
17584   fi
17585 
17586 
17587   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17588 $as_echo_n "checking for sysroot... " >&6; }
17589   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17590 $as_echo "$SYSROOT" >&6; }
17591   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17592 $as_echo_n "checking for toolchain path... " >&6; }
17593   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17594 $as_echo "$TOOLCHAIN_PATH" >&6; }
17595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17596 $as_echo_n "checking for extra path... " >&6; }
17597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17598 $as_echo "$EXTRA_PATH" >&6; }
17599 
17600 
17601 # To properly create a configuration name, we need to have the OpenJDK target
17602 # and options (variants and debug level) parsed.
17603 
17604 
17605 
17606 # Check whether --with-conf-name was given.
17607 if test "${with_conf_name+set}" = set; then :
17608   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17609 fi
17610 
17611 
17612   # Test from where we are running configure, in or outside of src root.
17613   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17614 $as_echo_n "checking where to store configuration... " >&6; }
17615   if test "x$CURDIR" = "x$TOPDIR" || test "x$CURDIR" = "x$CUSTOM_ROOT" \
17616       || test "x$CURDIR" = "x$TOPDIR/make/autoconf" \
17617       || test "x$CURDIR" = "x$TOPDIR/make" ; then
17618     # We are running configure from the src root.
17619     # Create a default ./build/target-variant-debuglevel output root.
17620     if test "x${CONF_NAME}" = x; then
17621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17622 $as_echo "in default location" >&6; }
17623       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17624     else
17625       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17626 $as_echo "in build directory with custom name" >&6; }
17627     fi
17628 
17629     if test "x$CUSTOM_ROOT" != x; then
17630       OUTPUTDIR="${CUSTOM_ROOT}/build/${CONF_NAME}"
17631     else
17632       OUTPUTDIR="${TOPDIR}/build/${CONF_NAME}"
17633     fi
17634     $MKDIR -p "$OUTPUTDIR"
17635     if test ! -d "$OUTPUTDIR"; then
17636       as_fn_error $? "Could not create build directory $OUTPUTDIR" "$LINENO" 5
17637     fi
17638   else
17639     # We are running configure from outside of the src dir.
17640     # Then use the current directory as output dir!
17641     # If configuration is situated in normal build directory, just use the build
17642     # directory name as configuration name, otherwise use the complete path.
17643     if test "x${CONF_NAME}" = x; then
17644       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${TOPDIR}/build/!!"`
17645     fi
17646     OUTPUTDIR="$CURDIR"
17647     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17648 $as_echo "in current directory" >&6; }
17649 
17650     # WARNING: This might be a bad thing to do. You need to be sure you want to
17651     # have a configuration in this directory. Do some sanity checks!
17652 
17653     if test ! -e "$OUTPUTDIR/spec.gmk"; then
17654       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17655       # other files
17656       files_present=`$LS $OUTPUTDIR`
17657       # Configure has already touched config.log and confdefs.h in the current dir when this check
17658       # is performed.
17659       filtered_files=`$ECHO "$files_present" \
17660           | $SED -e 's/config.log//g' \
17661               -e 's/configure.log//g' \
17662               -e 's/confdefs.h//g' \
17663               -e 's/ //g' \
17664           | $TR -d '\n'`
17665       if test "x$filtered_files" != x; then
17666         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17667 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17668         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17669 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17670         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17671 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17672         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17673 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17674         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17675 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17676         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $TOPDIR' and restart configure" >&5
17677 $as_echo "$as_me: Try 'cd $TOPDIR' and restart configure" >&6;}
17678         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17679 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17680         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17681       fi
17682     fi
17683   fi
17684   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17685 $as_echo_n "checking what configuration name to use... " >&6; }
17686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17687 $as_echo "$CONF_NAME" >&6; }
17688 
17689 
17690   # Only process if variable expands to non-empty
17691 
17692   if test "x$OUTPUTDIR" != x; then
17693     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17694 
17695   # Input might be given as Windows format, start by converting to
17696   # unix format.
17697   path="$OUTPUTDIR"
17698   new_path=`$CYGPATH -u "$path"`
17699 
17700   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17701   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17702   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17703   # "foo.exe" is OK but "foo" is an error.
17704   #
17705   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17706   # It is also a way to make sure we got the proper file name for the real test later on.
17707   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17708   if test "x$test_shortpath" = x; then
17709     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17710 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17711     as_fn_error $? "Cannot locate the the path of OUTPUTDIR" "$LINENO" 5
17712   fi
17713 
17714   # Call helper function which possibly converts this using DOS-style short mode.
17715   # If so, the updated path is stored in $new_path.
17716 
17717   input_path="$new_path"
17718   # Check if we need to convert this using DOS-style short mode. If the path
17719   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17720   # take no chances and rewrite it.
17721   # Note: m4 eats our [], so we need to use [ and ] instead.
17722   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17723   if test "x$has_forbidden_chars" != x; then
17724     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17725     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17726     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17727     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17728       # Going to short mode and back again did indeed matter. Since short mode is
17729       # case insensitive, let's make it lowercase to improve readability.
17730       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17731       # Now convert it back to Unix-style (cygpath)
17732       input_path=`$CYGPATH -u "$shortmode_path"`
17733       new_path="$input_path"
17734     fi
17735   fi
17736 
17737   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17738   if test "x$test_cygdrive_prefix" = x; then
17739     # As a simple fix, exclude /usr/bin since it's not a real path.
17740     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17741       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17742       # a path prefixed by /cygdrive for fixpath to work.
17743       new_path="$CYGWIN_ROOT_PATH$input_path"
17744     fi
17745   fi
17746 
17747 
17748   if test "x$path" != "x$new_path"; then
17749     OUTPUTDIR="$new_path"
17750     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17751 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17752   fi
17753 
17754     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17755 
17756   path="$OUTPUTDIR"
17757   has_colon=`$ECHO $path | $GREP ^.:`
17758   new_path="$path"
17759   if test "x$has_colon" = x; then
17760     # Not in mixed or Windows style, start by that.
17761     new_path=`cmd //c echo $path`
17762   fi
17763 
17764 
17765   input_path="$new_path"
17766   # Check if we need to convert this using DOS-style short mode. If the path
17767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17768   # take no chances and rewrite it.
17769   # Note: m4 eats our [], so we need to use [ and ] instead.
17770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17771   if test "x$has_forbidden_chars" != x; then
17772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17774   fi
17775 
17776 
17777   windows_path="$new_path"
17778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17779     unix_path=`$CYGPATH -u "$windows_path"`
17780     new_path="$unix_path"
17781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17783     new_path="$unix_path"
17784   fi
17785 
17786   if test "x$path" != "x$new_path"; then
17787     OUTPUTDIR="$new_path"
17788     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUTDIR to \"$new_path\"" >&5
17789 $as_echo "$as_me: Rewriting OUTPUTDIR to \"$new_path\"" >&6;}
17790   fi
17791 
17792   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17793   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17794 
17795     else
17796       # We're on a unix platform. Hooray! :)
17797       path="$OUTPUTDIR"
17798       has_space=`$ECHO "$path" | $GREP " "`
17799       if test "x$has_space" != x; then
17800         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&5
17801 $as_echo "$as_me: The path of OUTPUTDIR, which resolves as \"$path\", is invalid." >&6;}
17802         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17803       fi
17804 
17805       # Use eval to expand a potential ~
17806       eval path="$path"
17807       if test ! -f "$path" && test ! -d "$path"; then
17808         as_fn_error $? "The path of OUTPUTDIR, which resolves as \"$path\", is not found." "$LINENO" 5
17809       fi
17810 
17811       if test -d "$path"; then
17812         OUTPUTDIR="`cd "$path"; $THEPWDCMD -L`"
17813       else
17814         dir="`$DIRNAME "$path"`"
17815         base="`$BASENAME "$path"`"
17816         OUTPUTDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
17817       fi
17818     fi
17819   fi
17820 
17821 
17822   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUTDIR/configure-support"
17823   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17824 
17825   SPEC="$OUTPUTDIR/spec.gmk"
17826 
17827 
17828 
17829 
17830 
17831   # The spec.gmk file contains all variables for the make system.
17832   ac_config_files="$ac_config_files $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17833 
17834   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17835   ac_config_files="$ac_config_files $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17836 
17837   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17838   ac_config_files="$ac_config_files $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17839 
17840   # The compare.sh is used to compare the build output to other builds.
17841   ac_config_files="$ac_config_files $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17842 
17843   # The generated Makefile knows where the spec.gmk is and where the source is.
17844   # You can run make from the OUTPUTDIR, or from the top-level Makefile
17845   # which will look for generated configurations
17846   ac_config_files="$ac_config_files $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in"
17847 
17848 
17849 
17850 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17851 
17852   for ac_prog in apt-get yum brew port pkgutil pkgadd
17853 do
17854   # Extract the first word of "$ac_prog", so it can be a program name with args.
17855 set dummy $ac_prog; ac_word=$2
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17857 $as_echo_n "checking for $ac_word... " >&6; }
17858 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17859   $as_echo_n "(cached) " >&6
17860 else
17861   if test -n "$PKGHANDLER"; then
17862   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17863 else
17864 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17865 for as_dir in $PATH
17866 do
17867   IFS=$as_save_IFS
17868   test -z "$as_dir" && as_dir=.
17869     for ac_exec_ext in '' $ac_executable_extensions; do
17870   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17871     ac_cv_prog_PKGHANDLER="$ac_prog"
17872     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17873     break 2
17874   fi
17875 done
17876   done
17877 IFS=$as_save_IFS
17878 
17879 fi
17880 fi
17881 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17882 if test -n "$PKGHANDLER"; then
17883   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17884 $as_echo "$PKGHANDLER" >&6; }
17885 else
17886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17887 $as_echo "no" >&6; }
17888 fi
17889 
17890 
17891   test -n "$PKGHANDLER" && break
17892 done
17893 
17894 
17895 
17896 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17897 
17898 
17899 
17900   # Publish this variable in the help.
17901 
17902 
17903   if [ -z "${MAKE+x}" ]; then
17904     # The variable is not set by user, try to locate tool using the code snippet
17905 
17906     # Try our hardest to locate a correct version of GNU make
17907     for ac_prog in gmake
17908 do
17909   # Extract the first word of "$ac_prog", so it can be a program name with args.
17910 set dummy $ac_prog; ac_word=$2
17911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17912 $as_echo_n "checking for $ac_word... " >&6; }
17913 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17914   $as_echo_n "(cached) " >&6
17915 else
17916   case $CHECK_GMAKE in
17917   [\\/]* | ?:[\\/]*)
17918   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17919   ;;
17920   *)
17921   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17922 for as_dir in $PATH
17923 do
17924   IFS=$as_save_IFS
17925   test -z "$as_dir" && as_dir=.
17926     for ac_exec_ext in '' $ac_executable_extensions; do
17927   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17928     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17929     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17930     break 2
17931   fi
17932 done
17933   done
17934 IFS=$as_save_IFS
17935 
17936   ;;
17937 esac
17938 fi
17939 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17940 if test -n "$CHECK_GMAKE"; then
17941   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17942 $as_echo "$CHECK_GMAKE" >&6; }
17943 else
17944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17945 $as_echo "no" >&6; }
17946 fi
17947 
17948 
17949   test -n "$CHECK_GMAKE" && break
17950 done
17951 
17952 
17953   MAKE_CANDIDATE=""$CHECK_GMAKE""
17954   DESCRIPTION="gmake in PATH"
17955 
17956   # On Cygwin, we require a newer version of make than on other platforms
17957   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17958     MAKE_VERSION_EXPR="-e 4\."
17959     MAKE_REQUIRED_VERSION="4.0"
17960    else
17961     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17962     MAKE_REQUIRED_VERSION="3.81"
17963   fi
17964 
17965   if test "x$MAKE_CANDIDATE" != x; then
17966     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17967 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17968     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17969     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17970     if test "x$IS_GNU_MAKE" = x; then
17971       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17972 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17973     else
17974       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17975       if test "x$IS_MODERN_MAKE" = x; then
17976         { $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
17977 $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;}
17978       else
17979         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17980           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17981             MAKE_EXPECTED_ENV='cygwin'
17982           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17983             MAKE_EXPECTED_ENV='msys'
17984           else
17985             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17986           fi
17987           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17988           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17989         else
17990           # Not relevant for non-Windows
17991           IS_MAKE_CORRECT_ENV=true
17992         fi
17993         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17994           { $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
17995 $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;}
17996         else
17997           FOUND_MAKE=$MAKE_CANDIDATE
17998 
17999   # Only process if variable expands to non-empty
18000 
18001   if test "x$FOUND_MAKE" != x; then
18002     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18003 
18004   # First separate the path from the arguments. This will split at the first
18005   # space.
18006   complete="$FOUND_MAKE"
18007   path="${complete%% *}"
18008   tmp="$complete EOL"
18009   arguments="${tmp#* }"
18010 
18011   # Input might be given as Windows format, start by converting to
18012   # unix format.
18013   new_path=`$CYGPATH -u "$path"`
18014 
18015   # Now try to locate executable using which
18016   new_path=`$WHICH "$new_path" 2> /dev/null`
18017   # bat and cmd files are not always considered executable in cygwin causing which
18018   # to not find them
18019   if test "x$new_path" = x \
18020       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18021       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18022     new_path=`$CYGPATH -u "$path"`
18023   fi
18024   if test "x$new_path" = x; then
18025     # Oops. Which didn't find the executable.
18026     # The splitting of arguments from the executable at a space might have been incorrect,
18027     # since paths with space are more likely in Windows. Give it another try with the whole
18028     # argument.
18029     path="$complete"
18030     arguments="EOL"
18031     new_path=`$CYGPATH -u "$path"`
18032     new_path=`$WHICH "$new_path" 2> /dev/null`
18033     # bat and cmd files are not always considered executable in cygwin causing which
18034     # to not find them
18035     if test "x$new_path" = x \
18036         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18037         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18038       new_path=`$CYGPATH -u "$path"`
18039     fi
18040     if test "x$new_path" = x; then
18041       # It's still not found. Now this is an unrecoverable error.
18042       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18043 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18044       has_space=`$ECHO "$complete" | $GREP " "`
18045       if test "x$has_space" != x; then
18046         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18047 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18048       fi
18049       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18050     fi
18051   fi
18052 
18053   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18054   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18055   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18056   # "foo.exe" is OK but "foo" is an error.
18057   #
18058   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18059   # It is also a way to make sure we got the proper file name for the real test later on.
18060   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18061   if test "x$test_shortpath" = x; then
18062     # Short path failed, file does not exist as specified.
18063     # Try adding .exe or .cmd
18064     if test -f "${new_path}.exe"; then
18065       input_to_shortpath="${new_path}.exe"
18066     elif test -f "${new_path}.cmd"; then
18067       input_to_shortpath="${new_path}.cmd"
18068     else
18069       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18070 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18071       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18072 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18073       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18074     fi
18075   else
18076     input_to_shortpath="$new_path"
18077   fi
18078 
18079   # Call helper function which possibly converts this using DOS-style short mode.
18080   # If so, the updated path is stored in $new_path.
18081   new_path="$input_to_shortpath"
18082 
18083   input_path="$input_to_shortpath"
18084   # Check if we need to convert this using DOS-style short mode. If the path
18085   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18086   # take no chances and rewrite it.
18087   # Note: m4 eats our [], so we need to use [ and ] instead.
18088   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18089   if test "x$has_forbidden_chars" != x; then
18090     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18091     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18092     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18093     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18094       # Going to short mode and back again did indeed matter. Since short mode is
18095       # case insensitive, let's make it lowercase to improve readability.
18096       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18097       # Now convert it back to Unix-style (cygpath)
18098       input_path=`$CYGPATH -u "$shortmode_path"`
18099       new_path="$input_path"
18100     fi
18101   fi
18102 
18103   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18104   if test "x$test_cygdrive_prefix" = x; then
18105     # As a simple fix, exclude /usr/bin since it's not a real path.
18106     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18107       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18108       # a path prefixed by /cygdrive for fixpath to work.
18109       new_path="$CYGWIN_ROOT_PATH$input_path"
18110     fi
18111   fi
18112 
18113   # remove trailing .exe if any
18114   new_path="${new_path/%.exe/}"
18115 
18116     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18117 
18118   # First separate the path from the arguments. This will split at the first
18119   # space.
18120   complete="$FOUND_MAKE"
18121   path="${complete%% *}"
18122   tmp="$complete EOL"
18123   arguments="${tmp#* }"
18124 
18125   # Input might be given as Windows format, start by converting to
18126   # unix format.
18127   new_path="$path"
18128 
18129   windows_path="$new_path"
18130   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18131     unix_path=`$CYGPATH -u "$windows_path"`
18132     new_path="$unix_path"
18133   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18134     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18135     new_path="$unix_path"
18136   fi
18137 
18138 
18139   # Now try to locate executable using which
18140   new_path=`$WHICH "$new_path" 2> /dev/null`
18141 
18142   if test "x$new_path" = x; then
18143     # Oops. Which didn't find the executable.
18144     # The splitting of arguments from the executable at a space might have been incorrect,
18145     # since paths with space are more likely in Windows. Give it another try with the whole
18146     # argument.
18147     path="$complete"
18148     arguments="EOL"
18149     new_path="$path"
18150 
18151   windows_path="$new_path"
18152   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18153     unix_path=`$CYGPATH -u "$windows_path"`
18154     new_path="$unix_path"
18155   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18156     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18157     new_path="$unix_path"
18158   fi
18159 
18160 
18161     new_path=`$WHICH "$new_path" 2> /dev/null`
18162     # bat and cmd files are not always considered executable in MSYS causing which
18163     # to not find them
18164     if test "x$new_path" = x \
18165         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18166         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18167       new_path="$path"
18168 
18169   windows_path="$new_path"
18170   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18171     unix_path=`$CYGPATH -u "$windows_path"`
18172     new_path="$unix_path"
18173   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18174     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18175     new_path="$unix_path"
18176   fi
18177 
18178     fi
18179 
18180     if test "x$new_path" = x; then
18181       # It's still not found. Now this is an unrecoverable error.
18182       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18183 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18184       has_space=`$ECHO "$complete" | $GREP " "`
18185       if test "x$has_space" != x; then
18186         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18187 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18188       fi
18189       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18190     fi
18191   fi
18192 
18193   # Now new_path has a complete unix path to the binary
18194   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18195     # Keep paths in /bin as-is, but remove trailing .exe if any
18196     new_path="${new_path/%.exe/}"
18197     # Do not save /bin paths to all_fixpath_prefixes!
18198   else
18199     # Not in mixed or Windows style, start by that.
18200     new_path=`cmd //c echo $new_path`
18201 
18202   input_path="$new_path"
18203   # Check if we need to convert this using DOS-style short mode. If the path
18204   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18205   # take no chances and rewrite it.
18206   # Note: m4 eats our [], so we need to use [ and ] instead.
18207   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18208   if test "x$has_forbidden_chars" != x; then
18209     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18210     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18211   fi
18212 
18213     # Output is in $new_path
18214 
18215   windows_path="$new_path"
18216   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18217     unix_path=`$CYGPATH -u "$windows_path"`
18218     new_path="$unix_path"
18219   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18220     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18221     new_path="$unix_path"
18222   fi
18223 
18224     # remove trailing .exe if any
18225     new_path="${new_path/%.exe/}"
18226 
18227     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18228     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18229   fi
18230 
18231     else
18232       # We're on a unix platform. Hooray! :)
18233       # First separate the path from the arguments. This will split at the first
18234       # space.
18235       complete="$FOUND_MAKE"
18236       path="${complete%% *}"
18237       tmp="$complete EOL"
18238       arguments="${tmp#* }"
18239 
18240       # Cannot rely on the command "which" here since it doesn't always work.
18241       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18242       if test -z "$is_absolute_path"; then
18243         # Path to executable is not absolute. Find it.
18244         IFS_save="$IFS"
18245         IFS=:
18246         for p in $PATH; do
18247           if test -f "$p/$path" && test -x "$p/$path"; then
18248             new_path="$p/$path"
18249             break
18250           fi
18251         done
18252         IFS="$IFS_save"
18253       else
18254         # This is an absolute path, we can use it without further modifications.
18255         new_path="$path"
18256       fi
18257 
18258       if test "x$new_path" = x; then
18259         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18260 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18261         has_space=`$ECHO "$complete" | $GREP " "`
18262         if test "x$has_space" != x; then
18263           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18264 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18265         fi
18266         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18267       fi
18268     fi
18269 
18270     # Now join together the path and the arguments once again
18271     if test "x$arguments" != xEOL; then
18272       new_complete="$new_path ${arguments% *}"
18273     else
18274       new_complete="$new_path"
18275     fi
18276 
18277     if test "x$complete" != "x$new_complete"; then
18278       FOUND_MAKE="$new_complete"
18279       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18280 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18281     fi
18282   fi
18283 
18284         fi
18285       fi
18286     fi
18287   fi
18288 
18289 
18290     if test "x$FOUND_MAKE" = x; then
18291       for ac_prog in make
18292 do
18293   # Extract the first word of "$ac_prog", so it can be a program name with args.
18294 set dummy $ac_prog; ac_word=$2
18295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18296 $as_echo_n "checking for $ac_word... " >&6; }
18297 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18298   $as_echo_n "(cached) " >&6
18299 else
18300   case $CHECK_MAKE in
18301   [\\/]* | ?:[\\/]*)
18302   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18303   ;;
18304   *)
18305   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18306 for as_dir in $PATH
18307 do
18308   IFS=$as_save_IFS
18309   test -z "$as_dir" && as_dir=.
18310     for ac_exec_ext in '' $ac_executable_extensions; do
18311   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18312     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18313     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18314     break 2
18315   fi
18316 done
18317   done
18318 IFS=$as_save_IFS
18319 
18320   ;;
18321 esac
18322 fi
18323 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18324 if test -n "$CHECK_MAKE"; then
18325   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18326 $as_echo "$CHECK_MAKE" >&6; }
18327 else
18328   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18329 $as_echo "no" >&6; }
18330 fi
18331 
18332 
18333   test -n "$CHECK_MAKE" && break
18334 done
18335 
18336 
18337   MAKE_CANDIDATE=""$CHECK_MAKE""
18338   DESCRIPTION="make in PATH"
18339 
18340   # On Cygwin, we require a newer version of make than on other platforms
18341   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18342     MAKE_VERSION_EXPR="-e 4\."
18343     MAKE_REQUIRED_VERSION="4.0"
18344    else
18345     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18346     MAKE_REQUIRED_VERSION="3.81"
18347   fi
18348 
18349   if test "x$MAKE_CANDIDATE" != x; then
18350     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18351 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18352     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18353     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18354     if test "x$IS_GNU_MAKE" = x; then
18355       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18356 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18357     else
18358       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18359       if test "x$IS_MODERN_MAKE" = x; then
18360         { $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
18361 $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;}
18362       else
18363         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18364           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18365             MAKE_EXPECTED_ENV='cygwin'
18366           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18367             MAKE_EXPECTED_ENV='msys'
18368           else
18369             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18370           fi
18371           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18372           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18373         else
18374           # Not relevant for non-Windows
18375           IS_MAKE_CORRECT_ENV=true
18376         fi
18377         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18378           { $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
18379 $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;}
18380         else
18381           FOUND_MAKE=$MAKE_CANDIDATE
18382 
18383   # Only process if variable expands to non-empty
18384 
18385   if test "x$FOUND_MAKE" != x; then
18386     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18387 
18388   # First separate the path from the arguments. This will split at the first
18389   # space.
18390   complete="$FOUND_MAKE"
18391   path="${complete%% *}"
18392   tmp="$complete EOL"
18393   arguments="${tmp#* }"
18394 
18395   # Input might be given as Windows format, start by converting to
18396   # unix format.
18397   new_path=`$CYGPATH -u "$path"`
18398 
18399   # Now try to locate executable using which
18400   new_path=`$WHICH "$new_path" 2> /dev/null`
18401   # bat and cmd files are not always considered executable in cygwin causing which
18402   # to not find them
18403   if test "x$new_path" = x \
18404       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18405       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18406     new_path=`$CYGPATH -u "$path"`
18407   fi
18408   if test "x$new_path" = x; then
18409     # Oops. Which didn't find the executable.
18410     # The splitting of arguments from the executable at a space might have been incorrect,
18411     # since paths with space are more likely in Windows. Give it another try with the whole
18412     # argument.
18413     path="$complete"
18414     arguments="EOL"
18415     new_path=`$CYGPATH -u "$path"`
18416     new_path=`$WHICH "$new_path" 2> /dev/null`
18417     # bat and cmd files are not always considered executable in cygwin causing which
18418     # to not find them
18419     if test "x$new_path" = x \
18420         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18421         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18422       new_path=`$CYGPATH -u "$path"`
18423     fi
18424     if test "x$new_path" = x; then
18425       # It's still not found. Now this is an unrecoverable error.
18426       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18427 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18428       has_space=`$ECHO "$complete" | $GREP " "`
18429       if test "x$has_space" != x; then
18430         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18431 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18432       fi
18433       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18434     fi
18435   fi
18436 
18437   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18438   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18439   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18440   # "foo.exe" is OK but "foo" is an error.
18441   #
18442   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18443   # It is also a way to make sure we got the proper file name for the real test later on.
18444   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18445   if test "x$test_shortpath" = x; then
18446     # Short path failed, file does not exist as specified.
18447     # Try adding .exe or .cmd
18448     if test -f "${new_path}.exe"; then
18449       input_to_shortpath="${new_path}.exe"
18450     elif test -f "${new_path}.cmd"; then
18451       input_to_shortpath="${new_path}.cmd"
18452     else
18453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18454 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18455       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18456 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18457       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18458     fi
18459   else
18460     input_to_shortpath="$new_path"
18461   fi
18462 
18463   # Call helper function which possibly converts this using DOS-style short mode.
18464   # If so, the updated path is stored in $new_path.
18465   new_path="$input_to_shortpath"
18466 
18467   input_path="$input_to_shortpath"
18468   # Check if we need to convert this using DOS-style short mode. If the path
18469   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18470   # take no chances and rewrite it.
18471   # Note: m4 eats our [], so we need to use [ and ] instead.
18472   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18473   if test "x$has_forbidden_chars" != x; then
18474     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18475     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18476     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18477     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18478       # Going to short mode and back again did indeed matter. Since short mode is
18479       # case insensitive, let's make it lowercase to improve readability.
18480       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18481       # Now convert it back to Unix-style (cygpath)
18482       input_path=`$CYGPATH -u "$shortmode_path"`
18483       new_path="$input_path"
18484     fi
18485   fi
18486 
18487   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18488   if test "x$test_cygdrive_prefix" = x; then
18489     # As a simple fix, exclude /usr/bin since it's not a real path.
18490     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18491       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18492       # a path prefixed by /cygdrive for fixpath to work.
18493       new_path="$CYGWIN_ROOT_PATH$input_path"
18494     fi
18495   fi
18496 
18497   # remove trailing .exe if any
18498   new_path="${new_path/%.exe/}"
18499 
18500     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18501 
18502   # First separate the path from the arguments. This will split at the first
18503   # space.
18504   complete="$FOUND_MAKE"
18505   path="${complete%% *}"
18506   tmp="$complete EOL"
18507   arguments="${tmp#* }"
18508 
18509   # Input might be given as Windows format, start by converting to
18510   # unix format.
18511   new_path="$path"
18512 
18513   windows_path="$new_path"
18514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18515     unix_path=`$CYGPATH -u "$windows_path"`
18516     new_path="$unix_path"
18517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18519     new_path="$unix_path"
18520   fi
18521 
18522 
18523   # Now try to locate executable using which
18524   new_path=`$WHICH "$new_path" 2> /dev/null`
18525 
18526   if test "x$new_path" = x; then
18527     # Oops. Which didn't find the executable.
18528     # The splitting of arguments from the executable at a space might have been incorrect,
18529     # since paths with space are more likely in Windows. Give it another try with the whole
18530     # argument.
18531     path="$complete"
18532     arguments="EOL"
18533     new_path="$path"
18534 
18535   windows_path="$new_path"
18536   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18537     unix_path=`$CYGPATH -u "$windows_path"`
18538     new_path="$unix_path"
18539   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18540     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18541     new_path="$unix_path"
18542   fi
18543 
18544 
18545     new_path=`$WHICH "$new_path" 2> /dev/null`
18546     # bat and cmd files are not always considered executable in MSYS causing which
18547     # to not find them
18548     if test "x$new_path" = x \
18549         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18550         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18551       new_path="$path"
18552 
18553   windows_path="$new_path"
18554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18555     unix_path=`$CYGPATH -u "$windows_path"`
18556     new_path="$unix_path"
18557   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18558     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18559     new_path="$unix_path"
18560   fi
18561 
18562     fi
18563 
18564     if test "x$new_path" = x; then
18565       # It's still not found. Now this is an unrecoverable error.
18566       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18567 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18568       has_space=`$ECHO "$complete" | $GREP " "`
18569       if test "x$has_space" != x; then
18570         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18571 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18572       fi
18573       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18574     fi
18575   fi
18576 
18577   # Now new_path has a complete unix path to the binary
18578   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18579     # Keep paths in /bin as-is, but remove trailing .exe if any
18580     new_path="${new_path/%.exe/}"
18581     # Do not save /bin paths to all_fixpath_prefixes!
18582   else
18583     # Not in mixed or Windows style, start by that.
18584     new_path=`cmd //c echo $new_path`
18585 
18586   input_path="$new_path"
18587   # Check if we need to convert this using DOS-style short mode. If the path
18588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18589   # take no chances and rewrite it.
18590   # Note: m4 eats our [], so we need to use [ and ] instead.
18591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18592   if test "x$has_forbidden_chars" != x; then
18593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18594     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18595   fi
18596 
18597     # Output is in $new_path
18598 
18599   windows_path="$new_path"
18600   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18601     unix_path=`$CYGPATH -u "$windows_path"`
18602     new_path="$unix_path"
18603   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18604     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18605     new_path="$unix_path"
18606   fi
18607 
18608     # remove trailing .exe if any
18609     new_path="${new_path/%.exe/}"
18610 
18611     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18612     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18613   fi
18614 
18615     else
18616       # We're on a unix platform. Hooray! :)
18617       # First separate the path from the arguments. This will split at the first
18618       # space.
18619       complete="$FOUND_MAKE"
18620       path="${complete%% *}"
18621       tmp="$complete EOL"
18622       arguments="${tmp#* }"
18623 
18624       # Cannot rely on the command "which" here since it doesn't always work.
18625       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18626       if test -z "$is_absolute_path"; then
18627         # Path to executable is not absolute. Find it.
18628         IFS_save="$IFS"
18629         IFS=:
18630         for p in $PATH; do
18631           if test -f "$p/$path" && test -x "$p/$path"; then
18632             new_path="$p/$path"
18633             break
18634           fi
18635         done
18636         IFS="$IFS_save"
18637       else
18638         # This is an absolute path, we can use it without further modifications.
18639         new_path="$path"
18640       fi
18641 
18642       if test "x$new_path" = x; then
18643         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18644 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18645         has_space=`$ECHO "$complete" | $GREP " "`
18646         if test "x$has_space" != x; then
18647           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18648 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18649         fi
18650         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18651       fi
18652     fi
18653 
18654     # Now join together the path and the arguments once again
18655     if test "x$arguments" != xEOL; then
18656       new_complete="$new_path ${arguments% *}"
18657     else
18658       new_complete="$new_path"
18659     fi
18660 
18661     if test "x$complete" != "x$new_complete"; then
18662       FOUND_MAKE="$new_complete"
18663       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18664 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18665     fi
18666   fi
18667 
18668         fi
18669       fi
18670     fi
18671   fi
18672 
18673     fi
18674 
18675     if test "x$FOUND_MAKE" = x; then
18676       if test "x$TOOLCHAIN_PATH" != x; then
18677         # We have a toolchain path, check that as well before giving up.
18678         OLD_PATH=$PATH
18679         PATH=$TOOLCHAIN_PATH:$PATH
18680         for ac_prog in gmake
18681 do
18682   # Extract the first word of "$ac_prog", so it can be a program name with args.
18683 set dummy $ac_prog; ac_word=$2
18684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18685 $as_echo_n "checking for $ac_word... " >&6; }
18686 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18687   $as_echo_n "(cached) " >&6
18688 else
18689   case $CHECK_TOOLSDIR_GMAKE in
18690   [\\/]* | ?:[\\/]*)
18691   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18692   ;;
18693   *)
18694   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18695 for as_dir in $PATH
18696 do
18697   IFS=$as_save_IFS
18698   test -z "$as_dir" && as_dir=.
18699     for ac_exec_ext in '' $ac_executable_extensions; do
18700   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18701     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18702     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18703     break 2
18704   fi
18705 done
18706   done
18707 IFS=$as_save_IFS
18708 
18709   ;;
18710 esac
18711 fi
18712 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18713 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18714   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18715 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18716 else
18717   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18718 $as_echo "no" >&6; }
18719 fi
18720 
18721 
18722   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18723 done
18724 
18725 
18726   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18727   DESCRIPTION="gmake in tools-dir"
18728 
18729   # On Cygwin, we require a newer version of make than on other platforms
18730   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18731     MAKE_VERSION_EXPR="-e 4\."
18732     MAKE_REQUIRED_VERSION="4.0"
18733    else
18734     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18735     MAKE_REQUIRED_VERSION="3.81"
18736   fi
18737 
18738   if test "x$MAKE_CANDIDATE" != x; then
18739     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18740 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18741     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18742     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18743     if test "x$IS_GNU_MAKE" = x; then
18744       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18745 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18746     else
18747       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18748       if test "x$IS_MODERN_MAKE" = x; then
18749         { $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
18750 $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;}
18751       else
18752         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18753           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18754             MAKE_EXPECTED_ENV='cygwin'
18755           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18756             MAKE_EXPECTED_ENV='msys'
18757           else
18758             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18759           fi
18760           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18761           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18762         else
18763           # Not relevant for non-Windows
18764           IS_MAKE_CORRECT_ENV=true
18765         fi
18766         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18767           { $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
18768 $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;}
18769         else
18770           FOUND_MAKE=$MAKE_CANDIDATE
18771 
18772   # Only process if variable expands to non-empty
18773 
18774   if test "x$FOUND_MAKE" != x; then
18775     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18776 
18777   # First separate the path from the arguments. This will split at the first
18778   # space.
18779   complete="$FOUND_MAKE"
18780   path="${complete%% *}"
18781   tmp="$complete EOL"
18782   arguments="${tmp#* }"
18783 
18784   # Input might be given as Windows format, start by converting to
18785   # unix format.
18786   new_path=`$CYGPATH -u "$path"`
18787 
18788   # Now try to locate executable using which
18789   new_path=`$WHICH "$new_path" 2> /dev/null`
18790   # bat and cmd files are not always considered executable in cygwin causing which
18791   # to not find them
18792   if test "x$new_path" = x \
18793       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18794       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18795     new_path=`$CYGPATH -u "$path"`
18796   fi
18797   if test "x$new_path" = x; then
18798     # Oops. Which didn't find the executable.
18799     # The splitting of arguments from the executable at a space might have been incorrect,
18800     # since paths with space are more likely in Windows. Give it another try with the whole
18801     # argument.
18802     path="$complete"
18803     arguments="EOL"
18804     new_path=`$CYGPATH -u "$path"`
18805     new_path=`$WHICH "$new_path" 2> /dev/null`
18806     # bat and cmd files are not always considered executable in cygwin causing which
18807     # to not find them
18808     if test "x$new_path" = x \
18809         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18810         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18811       new_path=`$CYGPATH -u "$path"`
18812     fi
18813     if test "x$new_path" = x; then
18814       # It's still not found. Now this is an unrecoverable error.
18815       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18816 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18817       has_space=`$ECHO "$complete" | $GREP " "`
18818       if test "x$has_space" != x; then
18819         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18820 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18821       fi
18822       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18823     fi
18824   fi
18825 
18826   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18827   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18828   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18829   # "foo.exe" is OK but "foo" is an error.
18830   #
18831   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18832   # It is also a way to make sure we got the proper file name for the real test later on.
18833   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18834   if test "x$test_shortpath" = x; then
18835     # Short path failed, file does not exist as specified.
18836     # Try adding .exe or .cmd
18837     if test -f "${new_path}.exe"; then
18838       input_to_shortpath="${new_path}.exe"
18839     elif test -f "${new_path}.cmd"; then
18840       input_to_shortpath="${new_path}.cmd"
18841     else
18842       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18843 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18844       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18845 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18846       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18847     fi
18848   else
18849     input_to_shortpath="$new_path"
18850   fi
18851 
18852   # Call helper function which possibly converts this using DOS-style short mode.
18853   # If so, the updated path is stored in $new_path.
18854   new_path="$input_to_shortpath"
18855 
18856   input_path="$input_to_shortpath"
18857   # Check if we need to convert this using DOS-style short mode. If the path
18858   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18859   # take no chances and rewrite it.
18860   # Note: m4 eats our [], so we need to use [ and ] instead.
18861   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18862   if test "x$has_forbidden_chars" != x; then
18863     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18864     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18865     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18866     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18867       # Going to short mode and back again did indeed matter. Since short mode is
18868       # case insensitive, let's make it lowercase to improve readability.
18869       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18870       # Now convert it back to Unix-style (cygpath)
18871       input_path=`$CYGPATH -u "$shortmode_path"`
18872       new_path="$input_path"
18873     fi
18874   fi
18875 
18876   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18877   if test "x$test_cygdrive_prefix" = x; then
18878     # As a simple fix, exclude /usr/bin since it's not a real path.
18879     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18880       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18881       # a path prefixed by /cygdrive for fixpath to work.
18882       new_path="$CYGWIN_ROOT_PATH$input_path"
18883     fi
18884   fi
18885 
18886   # remove trailing .exe if any
18887   new_path="${new_path/%.exe/}"
18888 
18889     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18890 
18891   # First separate the path from the arguments. This will split at the first
18892   # space.
18893   complete="$FOUND_MAKE"
18894   path="${complete%% *}"
18895   tmp="$complete EOL"
18896   arguments="${tmp#* }"
18897 
18898   # Input might be given as Windows format, start by converting to
18899   # unix format.
18900   new_path="$path"
18901 
18902   windows_path="$new_path"
18903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18904     unix_path=`$CYGPATH -u "$windows_path"`
18905     new_path="$unix_path"
18906   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18907     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18908     new_path="$unix_path"
18909   fi
18910 
18911 
18912   # Now try to locate executable using which
18913   new_path=`$WHICH "$new_path" 2> /dev/null`
18914 
18915   if test "x$new_path" = x; then
18916     # Oops. Which didn't find the executable.
18917     # The splitting of arguments from the executable at a space might have been incorrect,
18918     # since paths with space are more likely in Windows. Give it another try with the whole
18919     # argument.
18920     path="$complete"
18921     arguments="EOL"
18922     new_path="$path"
18923 
18924   windows_path="$new_path"
18925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18926     unix_path=`$CYGPATH -u "$windows_path"`
18927     new_path="$unix_path"
18928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18930     new_path="$unix_path"
18931   fi
18932 
18933 
18934     new_path=`$WHICH "$new_path" 2> /dev/null`
18935     # bat and cmd files are not always considered executable in MSYS causing which
18936     # to not find them
18937     if test "x$new_path" = x \
18938         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18939         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18940       new_path="$path"
18941 
18942   windows_path="$new_path"
18943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18944     unix_path=`$CYGPATH -u "$windows_path"`
18945     new_path="$unix_path"
18946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18948     new_path="$unix_path"
18949   fi
18950 
18951     fi
18952 
18953     if test "x$new_path" = x; then
18954       # It's still not found. Now this is an unrecoverable error.
18955       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18956 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18957       has_space=`$ECHO "$complete" | $GREP " "`
18958       if test "x$has_space" != x; then
18959         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18960 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18961       fi
18962       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18963     fi
18964   fi
18965 
18966   # Now new_path has a complete unix path to the binary
18967   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18968     # Keep paths in /bin as-is, but remove trailing .exe if any
18969     new_path="${new_path/%.exe/}"
18970     # Do not save /bin paths to all_fixpath_prefixes!
18971   else
18972     # Not in mixed or Windows style, start by that.
18973     new_path=`cmd //c echo $new_path`
18974 
18975   input_path="$new_path"
18976   # Check if we need to convert this using DOS-style short mode. If the path
18977   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18978   # take no chances and rewrite it.
18979   # Note: m4 eats our [], so we need to use [ and ] instead.
18980   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18981   if test "x$has_forbidden_chars" != x; then
18982     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18983     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18984   fi
18985 
18986     # Output is in $new_path
18987 
18988   windows_path="$new_path"
18989   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18990     unix_path=`$CYGPATH -u "$windows_path"`
18991     new_path="$unix_path"
18992   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18993     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18994     new_path="$unix_path"
18995   fi
18996 
18997     # remove trailing .exe if any
18998     new_path="${new_path/%.exe/}"
18999 
19000     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19001     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19002   fi
19003 
19004     else
19005       # We're on a unix platform. Hooray! :)
19006       # First separate the path from the arguments. This will split at the first
19007       # space.
19008       complete="$FOUND_MAKE"
19009       path="${complete%% *}"
19010       tmp="$complete EOL"
19011       arguments="${tmp#* }"
19012 
19013       # Cannot rely on the command "which" here since it doesn't always work.
19014       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19015       if test -z "$is_absolute_path"; then
19016         # Path to executable is not absolute. Find it.
19017         IFS_save="$IFS"
19018         IFS=:
19019         for p in $PATH; do
19020           if test -f "$p/$path" && test -x "$p/$path"; then
19021             new_path="$p/$path"
19022             break
19023           fi
19024         done
19025         IFS="$IFS_save"
19026       else
19027         # This is an absolute path, we can use it without further modifications.
19028         new_path="$path"
19029       fi
19030 
19031       if test "x$new_path" = x; then
19032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19033 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19034         has_space=`$ECHO "$complete" | $GREP " "`
19035         if test "x$has_space" != x; then
19036           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19037 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19038         fi
19039         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19040       fi
19041     fi
19042 
19043     # Now join together the path and the arguments once again
19044     if test "x$arguments" != xEOL; then
19045       new_complete="$new_path ${arguments% *}"
19046     else
19047       new_complete="$new_path"
19048     fi
19049 
19050     if test "x$complete" != "x$new_complete"; then
19051       FOUND_MAKE="$new_complete"
19052       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19053 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19054     fi
19055   fi
19056 
19057         fi
19058       fi
19059     fi
19060   fi
19061 
19062         if test "x$FOUND_MAKE" = x; then
19063           for ac_prog in make
19064 do
19065   # Extract the first word of "$ac_prog", so it can be a program name with args.
19066 set dummy $ac_prog; ac_word=$2
19067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19068 $as_echo_n "checking for $ac_word... " >&6; }
19069 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19070   $as_echo_n "(cached) " >&6
19071 else
19072   case $CHECK_TOOLSDIR_MAKE in
19073   [\\/]* | ?:[\\/]*)
19074   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19075   ;;
19076   *)
19077   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19078 for as_dir in $PATH
19079 do
19080   IFS=$as_save_IFS
19081   test -z "$as_dir" && as_dir=.
19082     for ac_exec_ext in '' $ac_executable_extensions; do
19083   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19084     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19085     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19086     break 2
19087   fi
19088 done
19089   done
19090 IFS=$as_save_IFS
19091 
19092   ;;
19093 esac
19094 fi
19095 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19096 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19097   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19098 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19099 else
19100   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19101 $as_echo "no" >&6; }
19102 fi
19103 
19104 
19105   test -n "$CHECK_TOOLSDIR_MAKE" && break
19106 done
19107 
19108 
19109   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19110   DESCRIPTION="make in tools-dir"
19111 
19112   # On Cygwin, we require a newer version of make than on other platforms
19113   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19114     MAKE_VERSION_EXPR="-e 4\."
19115     MAKE_REQUIRED_VERSION="4.0"
19116    else
19117     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19118     MAKE_REQUIRED_VERSION="3.81"
19119   fi
19120 
19121   if test "x$MAKE_CANDIDATE" != x; then
19122     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19123 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19124     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19125     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19126     if test "x$IS_GNU_MAKE" = x; then
19127       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19128 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19129     else
19130       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19131       if test "x$IS_MODERN_MAKE" = x; then
19132         { $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
19133 $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;}
19134       else
19135         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19136           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19137             MAKE_EXPECTED_ENV='cygwin'
19138           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19139             MAKE_EXPECTED_ENV='msys'
19140           else
19141             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19142           fi
19143           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19144           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19145         else
19146           # Not relevant for non-Windows
19147           IS_MAKE_CORRECT_ENV=true
19148         fi
19149         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19150           { $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
19151 $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;}
19152         else
19153           FOUND_MAKE=$MAKE_CANDIDATE
19154 
19155   # Only process if variable expands to non-empty
19156 
19157   if test "x$FOUND_MAKE" != x; then
19158     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19159 
19160   # First separate the path from the arguments. This will split at the first
19161   # space.
19162   complete="$FOUND_MAKE"
19163   path="${complete%% *}"
19164   tmp="$complete EOL"
19165   arguments="${tmp#* }"
19166 
19167   # Input might be given as Windows format, start by converting to
19168   # unix format.
19169   new_path=`$CYGPATH -u "$path"`
19170 
19171   # Now try to locate executable using which
19172   new_path=`$WHICH "$new_path" 2> /dev/null`
19173   # bat and cmd files are not always considered executable in cygwin causing which
19174   # to not find them
19175   if test "x$new_path" = x \
19176       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19177       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19178     new_path=`$CYGPATH -u "$path"`
19179   fi
19180   if test "x$new_path" = x; then
19181     # Oops. Which didn't find the executable.
19182     # The splitting of arguments from the executable at a space might have been incorrect,
19183     # since paths with space are more likely in Windows. Give it another try with the whole
19184     # argument.
19185     path="$complete"
19186     arguments="EOL"
19187     new_path=`$CYGPATH -u "$path"`
19188     new_path=`$WHICH "$new_path" 2> /dev/null`
19189     # bat and cmd files are not always considered executable in cygwin causing which
19190     # to not find them
19191     if test "x$new_path" = x \
19192         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19193         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19194       new_path=`$CYGPATH -u "$path"`
19195     fi
19196     if test "x$new_path" = x; then
19197       # It's still not found. Now this is an unrecoverable error.
19198       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19199 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19200       has_space=`$ECHO "$complete" | $GREP " "`
19201       if test "x$has_space" != x; then
19202         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19203 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19204       fi
19205       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19206     fi
19207   fi
19208 
19209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19212   # "foo.exe" is OK but "foo" is an error.
19213   #
19214   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19215   # It is also a way to make sure we got the proper file name for the real test later on.
19216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19217   if test "x$test_shortpath" = x; then
19218     # Short path failed, file does not exist as specified.
19219     # Try adding .exe or .cmd
19220     if test -f "${new_path}.exe"; then
19221       input_to_shortpath="${new_path}.exe"
19222     elif test -f "${new_path}.cmd"; then
19223       input_to_shortpath="${new_path}.cmd"
19224     else
19225       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19226 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19227       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19228 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19229       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19230     fi
19231   else
19232     input_to_shortpath="$new_path"
19233   fi
19234 
19235   # Call helper function which possibly converts this using DOS-style short mode.
19236   # If so, the updated path is stored in $new_path.
19237   new_path="$input_to_shortpath"
19238 
19239   input_path="$input_to_shortpath"
19240   # Check if we need to convert this using DOS-style short mode. If the path
19241   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19242   # take no chances and rewrite it.
19243   # Note: m4 eats our [], so we need to use [ and ] instead.
19244   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19245   if test "x$has_forbidden_chars" != x; then
19246     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19247     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19248     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19249     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19250       # Going to short mode and back again did indeed matter. Since short mode is
19251       # case insensitive, let's make it lowercase to improve readability.
19252       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19253       # Now convert it back to Unix-style (cygpath)
19254       input_path=`$CYGPATH -u "$shortmode_path"`
19255       new_path="$input_path"
19256     fi
19257   fi
19258 
19259   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19260   if test "x$test_cygdrive_prefix" = x; then
19261     # As a simple fix, exclude /usr/bin since it's not a real path.
19262     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19263       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19264       # a path prefixed by /cygdrive for fixpath to work.
19265       new_path="$CYGWIN_ROOT_PATH$input_path"
19266     fi
19267   fi
19268 
19269   # remove trailing .exe if any
19270   new_path="${new_path/%.exe/}"
19271 
19272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19273 
19274   # First separate the path from the arguments. This will split at the first
19275   # space.
19276   complete="$FOUND_MAKE"
19277   path="${complete%% *}"
19278   tmp="$complete EOL"
19279   arguments="${tmp#* }"
19280 
19281   # Input might be given as Windows format, start by converting to
19282   # unix format.
19283   new_path="$path"
19284 
19285   windows_path="$new_path"
19286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19287     unix_path=`$CYGPATH -u "$windows_path"`
19288     new_path="$unix_path"
19289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19291     new_path="$unix_path"
19292   fi
19293 
19294 
19295   # Now try to locate executable using which
19296   new_path=`$WHICH "$new_path" 2> /dev/null`
19297 
19298   if test "x$new_path" = x; then
19299     # Oops. Which didn't find the executable.
19300     # The splitting of arguments from the executable at a space might have been incorrect,
19301     # since paths with space are more likely in Windows. Give it another try with the whole
19302     # argument.
19303     path="$complete"
19304     arguments="EOL"
19305     new_path="$path"
19306 
19307   windows_path="$new_path"
19308   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19309     unix_path=`$CYGPATH -u "$windows_path"`
19310     new_path="$unix_path"
19311   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19312     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19313     new_path="$unix_path"
19314   fi
19315 
19316 
19317     new_path=`$WHICH "$new_path" 2> /dev/null`
19318     # bat and cmd files are not always considered executable in MSYS causing which
19319     # to not find them
19320     if test "x$new_path" = x \
19321         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19322         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19323       new_path="$path"
19324 
19325   windows_path="$new_path"
19326   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19327     unix_path=`$CYGPATH -u "$windows_path"`
19328     new_path="$unix_path"
19329   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19330     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19331     new_path="$unix_path"
19332   fi
19333 
19334     fi
19335 
19336     if test "x$new_path" = x; then
19337       # It's still not found. Now this is an unrecoverable error.
19338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19339 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19340       has_space=`$ECHO "$complete" | $GREP " "`
19341       if test "x$has_space" != x; then
19342         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19343 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19344       fi
19345       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19346     fi
19347   fi
19348 
19349   # Now new_path has a complete unix path to the binary
19350   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19351     # Keep paths in /bin as-is, but remove trailing .exe if any
19352     new_path="${new_path/%.exe/}"
19353     # Do not save /bin paths to all_fixpath_prefixes!
19354   else
19355     # Not in mixed or Windows style, start by that.
19356     new_path=`cmd //c echo $new_path`
19357 
19358   input_path="$new_path"
19359   # Check if we need to convert this using DOS-style short mode. If the path
19360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19361   # take no chances and rewrite it.
19362   # Note: m4 eats our [], so we need to use [ and ] instead.
19363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19364   if test "x$has_forbidden_chars" != x; then
19365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19366     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19367   fi
19368 
19369     # Output is in $new_path
19370 
19371   windows_path="$new_path"
19372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19373     unix_path=`$CYGPATH -u "$windows_path"`
19374     new_path="$unix_path"
19375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19377     new_path="$unix_path"
19378   fi
19379 
19380     # remove trailing .exe if any
19381     new_path="${new_path/%.exe/}"
19382 
19383     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19384     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19385   fi
19386 
19387     else
19388       # We're on a unix platform. Hooray! :)
19389       # First separate the path from the arguments. This will split at the first
19390       # space.
19391       complete="$FOUND_MAKE"
19392       path="${complete%% *}"
19393       tmp="$complete EOL"
19394       arguments="${tmp#* }"
19395 
19396       # Cannot rely on the command "which" here since it doesn't always work.
19397       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19398       if test -z "$is_absolute_path"; then
19399         # Path to executable is not absolute. Find it.
19400         IFS_save="$IFS"
19401         IFS=:
19402         for p in $PATH; do
19403           if test -f "$p/$path" && test -x "$p/$path"; then
19404             new_path="$p/$path"
19405             break
19406           fi
19407         done
19408         IFS="$IFS_save"
19409       else
19410         # This is an absolute path, we can use it without further modifications.
19411         new_path="$path"
19412       fi
19413 
19414       if test "x$new_path" = x; then
19415         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19416 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19417         has_space=`$ECHO "$complete" | $GREP " "`
19418         if test "x$has_space" != x; then
19419           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19420 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19421         fi
19422         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19423       fi
19424     fi
19425 
19426     # Now join together the path and the arguments once again
19427     if test "x$arguments" != xEOL; then
19428       new_complete="$new_path ${arguments% *}"
19429     else
19430       new_complete="$new_path"
19431     fi
19432 
19433     if test "x$complete" != "x$new_complete"; then
19434       FOUND_MAKE="$new_complete"
19435       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19436 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19437     fi
19438   fi
19439 
19440         fi
19441       fi
19442     fi
19443   fi
19444 
19445         fi
19446         PATH=$OLD_PATH
19447       fi
19448     fi
19449 
19450     if test "x$FOUND_MAKE" = x; then
19451       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
19452     fi
19453 
19454   else
19455     # The variable is set, but is it from the command line or the environment?
19456 
19457     # Try to remove the string !MAKE! from our list.
19458     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19459     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19460       # If it failed, the variable was not from the command line. Ignore it,
19461       # but warn the user (except for BASH, which is always set by the calling BASH).
19462       if test "xMAKE" != xBASH; then
19463         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19464 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19465       fi
19466       # Try to locate tool using the code snippet
19467 
19468     # Try our hardest to locate a correct version of GNU make
19469     for ac_prog in gmake
19470 do
19471   # Extract the first word of "$ac_prog", so it can be a program name with args.
19472 set dummy $ac_prog; ac_word=$2
19473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19474 $as_echo_n "checking for $ac_word... " >&6; }
19475 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19476   $as_echo_n "(cached) " >&6
19477 else
19478   case $CHECK_GMAKE in
19479   [\\/]* | ?:[\\/]*)
19480   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19481   ;;
19482   *)
19483   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19484 for as_dir in $PATH
19485 do
19486   IFS=$as_save_IFS
19487   test -z "$as_dir" && as_dir=.
19488     for ac_exec_ext in '' $ac_executable_extensions; do
19489   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19490     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19491     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19492     break 2
19493   fi
19494 done
19495   done
19496 IFS=$as_save_IFS
19497 
19498   ;;
19499 esac
19500 fi
19501 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19502 if test -n "$CHECK_GMAKE"; then
19503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19504 $as_echo "$CHECK_GMAKE" >&6; }
19505 else
19506   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19507 $as_echo "no" >&6; }
19508 fi
19509 
19510 
19511   test -n "$CHECK_GMAKE" && break
19512 done
19513 
19514 
19515   MAKE_CANDIDATE=""$CHECK_GMAKE""
19516   DESCRIPTION="gmake in PATH"
19517 
19518   # On Cygwin, we require a newer version of make than on other platforms
19519   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19520     MAKE_VERSION_EXPR="-e 4\."
19521     MAKE_REQUIRED_VERSION="4.0"
19522    else
19523     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19524     MAKE_REQUIRED_VERSION="3.81"
19525   fi
19526 
19527   if test "x$MAKE_CANDIDATE" != x; then
19528     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19529 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19530     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19531     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19532     if test "x$IS_GNU_MAKE" = x; then
19533       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19534 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19535     else
19536       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19537       if test "x$IS_MODERN_MAKE" = x; then
19538         { $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
19539 $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;}
19540       else
19541         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19542           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19543             MAKE_EXPECTED_ENV='cygwin'
19544           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19545             MAKE_EXPECTED_ENV='msys'
19546           else
19547             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19548           fi
19549           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19550           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19551         else
19552           # Not relevant for non-Windows
19553           IS_MAKE_CORRECT_ENV=true
19554         fi
19555         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19556           { $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
19557 $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;}
19558         else
19559           FOUND_MAKE=$MAKE_CANDIDATE
19560 
19561   # Only process if variable expands to non-empty
19562 
19563   if test "x$FOUND_MAKE" != x; then
19564     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19565 
19566   # First separate the path from the arguments. This will split at the first
19567   # space.
19568   complete="$FOUND_MAKE"
19569   path="${complete%% *}"
19570   tmp="$complete EOL"
19571   arguments="${tmp#* }"
19572 
19573   # Input might be given as Windows format, start by converting to
19574   # unix format.
19575   new_path=`$CYGPATH -u "$path"`
19576 
19577   # Now try to locate executable using which
19578   new_path=`$WHICH "$new_path" 2> /dev/null`
19579   # bat and cmd files are not always considered executable in cygwin causing which
19580   # to not find them
19581   if test "x$new_path" = x \
19582       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19583       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19584     new_path=`$CYGPATH -u "$path"`
19585   fi
19586   if test "x$new_path" = x; then
19587     # Oops. Which didn't find the executable.
19588     # The splitting of arguments from the executable at a space might have been incorrect,
19589     # since paths with space are more likely in Windows. Give it another try with the whole
19590     # argument.
19591     path="$complete"
19592     arguments="EOL"
19593     new_path=`$CYGPATH -u "$path"`
19594     new_path=`$WHICH "$new_path" 2> /dev/null`
19595     # bat and cmd files are not always considered executable in cygwin causing which
19596     # to not find them
19597     if test "x$new_path" = x \
19598         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19599         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19600       new_path=`$CYGPATH -u "$path"`
19601     fi
19602     if test "x$new_path" = x; then
19603       # It's still not found. Now this is an unrecoverable error.
19604       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19605 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19606       has_space=`$ECHO "$complete" | $GREP " "`
19607       if test "x$has_space" != x; then
19608         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19609 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19610       fi
19611       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19612     fi
19613   fi
19614 
19615   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19616   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19617   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19618   # "foo.exe" is OK but "foo" is an error.
19619   #
19620   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19621   # It is also a way to make sure we got the proper file name for the real test later on.
19622   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19623   if test "x$test_shortpath" = x; then
19624     # Short path failed, file does not exist as specified.
19625     # Try adding .exe or .cmd
19626     if test -f "${new_path}.exe"; then
19627       input_to_shortpath="${new_path}.exe"
19628     elif test -f "${new_path}.cmd"; then
19629       input_to_shortpath="${new_path}.cmd"
19630     else
19631       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19632 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19633       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19634 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19635       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19636     fi
19637   else
19638     input_to_shortpath="$new_path"
19639   fi
19640 
19641   # Call helper function which possibly converts this using DOS-style short mode.
19642   # If so, the updated path is stored in $new_path.
19643   new_path="$input_to_shortpath"
19644 
19645   input_path="$input_to_shortpath"
19646   # Check if we need to convert this using DOS-style short mode. If the path
19647   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19648   # take no chances and rewrite it.
19649   # Note: m4 eats our [], so we need to use [ and ] instead.
19650   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19651   if test "x$has_forbidden_chars" != x; then
19652     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19653     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19654     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19655     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19656       # Going to short mode and back again did indeed matter. Since short mode is
19657       # case insensitive, let's make it lowercase to improve readability.
19658       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19659       # Now convert it back to Unix-style (cygpath)
19660       input_path=`$CYGPATH -u "$shortmode_path"`
19661       new_path="$input_path"
19662     fi
19663   fi
19664 
19665   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19666   if test "x$test_cygdrive_prefix" = x; then
19667     # As a simple fix, exclude /usr/bin since it's not a real path.
19668     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19669       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19670       # a path prefixed by /cygdrive for fixpath to work.
19671       new_path="$CYGWIN_ROOT_PATH$input_path"
19672     fi
19673   fi
19674 
19675   # remove trailing .exe if any
19676   new_path="${new_path/%.exe/}"
19677 
19678     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19679 
19680   # First separate the path from the arguments. This will split at the first
19681   # space.
19682   complete="$FOUND_MAKE"
19683   path="${complete%% *}"
19684   tmp="$complete EOL"
19685   arguments="${tmp#* }"
19686 
19687   # Input might be given as Windows format, start by converting to
19688   # unix format.
19689   new_path="$path"
19690 
19691   windows_path="$new_path"
19692   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19693     unix_path=`$CYGPATH -u "$windows_path"`
19694     new_path="$unix_path"
19695   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19696     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19697     new_path="$unix_path"
19698   fi
19699 
19700 
19701   # Now try to locate executable using which
19702   new_path=`$WHICH "$new_path" 2> /dev/null`
19703 
19704   if test "x$new_path" = x; then
19705     # Oops. Which didn't find the executable.
19706     # The splitting of arguments from the executable at a space might have been incorrect,
19707     # since paths with space are more likely in Windows. Give it another try with the whole
19708     # argument.
19709     path="$complete"
19710     arguments="EOL"
19711     new_path="$path"
19712 
19713   windows_path="$new_path"
19714   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19715     unix_path=`$CYGPATH -u "$windows_path"`
19716     new_path="$unix_path"
19717   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19718     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19719     new_path="$unix_path"
19720   fi
19721 
19722 
19723     new_path=`$WHICH "$new_path" 2> /dev/null`
19724     # bat and cmd files are not always considered executable in MSYS causing which
19725     # to not find them
19726     if test "x$new_path" = x \
19727         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19728         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19729       new_path="$path"
19730 
19731   windows_path="$new_path"
19732   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19733     unix_path=`$CYGPATH -u "$windows_path"`
19734     new_path="$unix_path"
19735   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19736     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19737     new_path="$unix_path"
19738   fi
19739 
19740     fi
19741 
19742     if test "x$new_path" = x; then
19743       # It's still not found. Now this is an unrecoverable error.
19744       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19745 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19746       has_space=`$ECHO "$complete" | $GREP " "`
19747       if test "x$has_space" != x; then
19748         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19749 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19750       fi
19751       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19752     fi
19753   fi
19754 
19755   # Now new_path has a complete unix path to the binary
19756   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19757     # Keep paths in /bin as-is, but remove trailing .exe if any
19758     new_path="${new_path/%.exe/}"
19759     # Do not save /bin paths to all_fixpath_prefixes!
19760   else
19761     # Not in mixed or Windows style, start by that.
19762     new_path=`cmd //c echo $new_path`
19763 
19764   input_path="$new_path"
19765   # Check if we need to convert this using DOS-style short mode. If the path
19766   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19767   # take no chances and rewrite it.
19768   # Note: m4 eats our [], so we need to use [ and ] instead.
19769   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19770   if test "x$has_forbidden_chars" != x; then
19771     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19772     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19773   fi
19774 
19775     # Output is in $new_path
19776 
19777   windows_path="$new_path"
19778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19779     unix_path=`$CYGPATH -u "$windows_path"`
19780     new_path="$unix_path"
19781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19783     new_path="$unix_path"
19784   fi
19785 
19786     # remove trailing .exe if any
19787     new_path="${new_path/%.exe/}"
19788 
19789     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19790     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19791   fi
19792 
19793     else
19794       # We're on a unix platform. Hooray! :)
19795       # First separate the path from the arguments. This will split at the first
19796       # space.
19797       complete="$FOUND_MAKE"
19798       path="${complete%% *}"
19799       tmp="$complete EOL"
19800       arguments="${tmp#* }"
19801 
19802       # Cannot rely on the command "which" here since it doesn't always work.
19803       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19804       if test -z "$is_absolute_path"; then
19805         # Path to executable is not absolute. Find it.
19806         IFS_save="$IFS"
19807         IFS=:
19808         for p in $PATH; do
19809           if test -f "$p/$path" && test -x "$p/$path"; then
19810             new_path="$p/$path"
19811             break
19812           fi
19813         done
19814         IFS="$IFS_save"
19815       else
19816         # This is an absolute path, we can use it without further modifications.
19817         new_path="$path"
19818       fi
19819 
19820       if test "x$new_path" = x; then
19821         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19822 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19823         has_space=`$ECHO "$complete" | $GREP " "`
19824         if test "x$has_space" != x; then
19825           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19826 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19827         fi
19828         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19829       fi
19830     fi
19831 
19832     # Now join together the path and the arguments once again
19833     if test "x$arguments" != xEOL; then
19834       new_complete="$new_path ${arguments% *}"
19835     else
19836       new_complete="$new_path"
19837     fi
19838 
19839     if test "x$complete" != "x$new_complete"; then
19840       FOUND_MAKE="$new_complete"
19841       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19842 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19843     fi
19844   fi
19845 
19846         fi
19847       fi
19848     fi
19849   fi
19850 
19851 
19852     if test "x$FOUND_MAKE" = x; then
19853       for ac_prog in make
19854 do
19855   # Extract the first word of "$ac_prog", so it can be a program name with args.
19856 set dummy $ac_prog; ac_word=$2
19857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19858 $as_echo_n "checking for $ac_word... " >&6; }
19859 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19860   $as_echo_n "(cached) " >&6
19861 else
19862   case $CHECK_MAKE in
19863   [\\/]* | ?:[\\/]*)
19864   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19865   ;;
19866   *)
19867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19868 for as_dir in $PATH
19869 do
19870   IFS=$as_save_IFS
19871   test -z "$as_dir" && as_dir=.
19872     for ac_exec_ext in '' $ac_executable_extensions; do
19873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19874     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19876     break 2
19877   fi
19878 done
19879   done
19880 IFS=$as_save_IFS
19881 
19882   ;;
19883 esac
19884 fi
19885 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19886 if test -n "$CHECK_MAKE"; then
19887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19888 $as_echo "$CHECK_MAKE" >&6; }
19889 else
19890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19891 $as_echo "no" >&6; }
19892 fi
19893 
19894 
19895   test -n "$CHECK_MAKE" && break
19896 done
19897 
19898 
19899   MAKE_CANDIDATE=""$CHECK_MAKE""
19900   DESCRIPTION="make in PATH"
19901 
19902   # On Cygwin, we require a newer version of make than on other platforms
19903   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19904     MAKE_VERSION_EXPR="-e 4\."
19905     MAKE_REQUIRED_VERSION="4.0"
19906    else
19907     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19908     MAKE_REQUIRED_VERSION="3.81"
19909   fi
19910 
19911   if test "x$MAKE_CANDIDATE" != x; then
19912     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19913 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19914     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19915     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19916     if test "x$IS_GNU_MAKE" = x; then
19917       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19918 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19919     else
19920       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19921       if test "x$IS_MODERN_MAKE" = x; then
19922         { $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
19923 $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;}
19924       else
19925         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19926           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19927             MAKE_EXPECTED_ENV='cygwin'
19928           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19929             MAKE_EXPECTED_ENV='msys'
19930           else
19931             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19932           fi
19933           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19934           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19935         else
19936           # Not relevant for non-Windows
19937           IS_MAKE_CORRECT_ENV=true
19938         fi
19939         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19940           { $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
19941 $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;}
19942         else
19943           FOUND_MAKE=$MAKE_CANDIDATE
19944 
19945   # Only process if variable expands to non-empty
19946 
19947   if test "x$FOUND_MAKE" != x; then
19948     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19949 
19950   # First separate the path from the arguments. This will split at the first
19951   # space.
19952   complete="$FOUND_MAKE"
19953   path="${complete%% *}"
19954   tmp="$complete EOL"
19955   arguments="${tmp#* }"
19956 
19957   # Input might be given as Windows format, start by converting to
19958   # unix format.
19959   new_path=`$CYGPATH -u "$path"`
19960 
19961   # Now try to locate executable using which
19962   new_path=`$WHICH "$new_path" 2> /dev/null`
19963   # bat and cmd files are not always considered executable in cygwin causing which
19964   # to not find them
19965   if test "x$new_path" = x \
19966       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19967       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19968     new_path=`$CYGPATH -u "$path"`
19969   fi
19970   if test "x$new_path" = x; then
19971     # Oops. Which didn't find the executable.
19972     # The splitting of arguments from the executable at a space might have been incorrect,
19973     # since paths with space are more likely in Windows. Give it another try with the whole
19974     # argument.
19975     path="$complete"
19976     arguments="EOL"
19977     new_path=`$CYGPATH -u "$path"`
19978     new_path=`$WHICH "$new_path" 2> /dev/null`
19979     # bat and cmd files are not always considered executable in cygwin causing which
19980     # to not find them
19981     if test "x$new_path" = x \
19982         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19983         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19984       new_path=`$CYGPATH -u "$path"`
19985     fi
19986     if test "x$new_path" = x; then
19987       # It's still not found. Now this is an unrecoverable error.
19988       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19989 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19990       has_space=`$ECHO "$complete" | $GREP " "`
19991       if test "x$has_space" != x; then
19992         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19993 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19994       fi
19995       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19996     fi
19997   fi
19998 
19999   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20000   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20001   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20002   # "foo.exe" is OK but "foo" is an error.
20003   #
20004   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20005   # It is also a way to make sure we got the proper file name for the real test later on.
20006   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20007   if test "x$test_shortpath" = x; then
20008     # Short path failed, file does not exist as specified.
20009     # Try adding .exe or .cmd
20010     if test -f "${new_path}.exe"; then
20011       input_to_shortpath="${new_path}.exe"
20012     elif test -f "${new_path}.cmd"; then
20013       input_to_shortpath="${new_path}.cmd"
20014     else
20015       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20016 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20017       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20018 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20019       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20020     fi
20021   else
20022     input_to_shortpath="$new_path"
20023   fi
20024 
20025   # Call helper function which possibly converts this using DOS-style short mode.
20026   # If so, the updated path is stored in $new_path.
20027   new_path="$input_to_shortpath"
20028 
20029   input_path="$input_to_shortpath"
20030   # Check if we need to convert this using DOS-style short mode. If the path
20031   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20032   # take no chances and rewrite it.
20033   # Note: m4 eats our [], so we need to use [ and ] instead.
20034   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20035   if test "x$has_forbidden_chars" != x; then
20036     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20037     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20038     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20039     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20040       # Going to short mode and back again did indeed matter. Since short mode is
20041       # case insensitive, let's make it lowercase to improve readability.
20042       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20043       # Now convert it back to Unix-style (cygpath)
20044       input_path=`$CYGPATH -u "$shortmode_path"`
20045       new_path="$input_path"
20046     fi
20047   fi
20048 
20049   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20050   if test "x$test_cygdrive_prefix" = x; then
20051     # As a simple fix, exclude /usr/bin since it's not a real path.
20052     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20053       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20054       # a path prefixed by /cygdrive for fixpath to work.
20055       new_path="$CYGWIN_ROOT_PATH$input_path"
20056     fi
20057   fi
20058 
20059   # remove trailing .exe if any
20060   new_path="${new_path/%.exe/}"
20061 
20062     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20063 
20064   # First separate the path from the arguments. This will split at the first
20065   # space.
20066   complete="$FOUND_MAKE"
20067   path="${complete%% *}"
20068   tmp="$complete EOL"
20069   arguments="${tmp#* }"
20070 
20071   # Input might be given as Windows format, start by converting to
20072   # unix format.
20073   new_path="$path"
20074 
20075   windows_path="$new_path"
20076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20077     unix_path=`$CYGPATH -u "$windows_path"`
20078     new_path="$unix_path"
20079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20081     new_path="$unix_path"
20082   fi
20083 
20084 
20085   # Now try to locate executable using which
20086   new_path=`$WHICH "$new_path" 2> /dev/null`
20087 
20088   if test "x$new_path" = x; then
20089     # Oops. Which didn't find the executable.
20090     # The splitting of arguments from the executable at a space might have been incorrect,
20091     # since paths with space are more likely in Windows. Give it another try with the whole
20092     # argument.
20093     path="$complete"
20094     arguments="EOL"
20095     new_path="$path"
20096 
20097   windows_path="$new_path"
20098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20099     unix_path=`$CYGPATH -u "$windows_path"`
20100     new_path="$unix_path"
20101   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20102     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20103     new_path="$unix_path"
20104   fi
20105 
20106 
20107     new_path=`$WHICH "$new_path" 2> /dev/null`
20108     # bat and cmd files are not always considered executable in MSYS causing which
20109     # to not find them
20110     if test "x$new_path" = x \
20111         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20112         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20113       new_path="$path"
20114 
20115   windows_path="$new_path"
20116   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20117     unix_path=`$CYGPATH -u "$windows_path"`
20118     new_path="$unix_path"
20119   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20120     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20121     new_path="$unix_path"
20122   fi
20123 
20124     fi
20125 
20126     if test "x$new_path" = x; then
20127       # It's still not found. Now this is an unrecoverable error.
20128       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20129 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20130       has_space=`$ECHO "$complete" | $GREP " "`
20131       if test "x$has_space" != x; then
20132         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20133 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20134       fi
20135       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20136     fi
20137   fi
20138 
20139   # Now new_path has a complete unix path to the binary
20140   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20141     # Keep paths in /bin as-is, but remove trailing .exe if any
20142     new_path="${new_path/%.exe/}"
20143     # Do not save /bin paths to all_fixpath_prefixes!
20144   else
20145     # Not in mixed or Windows style, start by that.
20146     new_path=`cmd //c echo $new_path`
20147 
20148   input_path="$new_path"
20149   # Check if we need to convert this using DOS-style short mode. If the path
20150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20151   # take no chances and rewrite it.
20152   # Note: m4 eats our [], so we need to use [ and ] instead.
20153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20154   if test "x$has_forbidden_chars" != x; then
20155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20156     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20157   fi
20158 
20159     # Output is in $new_path
20160 
20161   windows_path="$new_path"
20162   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20163     unix_path=`$CYGPATH -u "$windows_path"`
20164     new_path="$unix_path"
20165   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20166     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20167     new_path="$unix_path"
20168   fi
20169 
20170     # remove trailing .exe if any
20171     new_path="${new_path/%.exe/}"
20172 
20173     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20174     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20175   fi
20176 
20177     else
20178       # We're on a unix platform. Hooray! :)
20179       # First separate the path from the arguments. This will split at the first
20180       # space.
20181       complete="$FOUND_MAKE"
20182       path="${complete%% *}"
20183       tmp="$complete EOL"
20184       arguments="${tmp#* }"
20185 
20186       # Cannot rely on the command "which" here since it doesn't always work.
20187       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20188       if test -z "$is_absolute_path"; then
20189         # Path to executable is not absolute. Find it.
20190         IFS_save="$IFS"
20191         IFS=:
20192         for p in $PATH; do
20193           if test -f "$p/$path" && test -x "$p/$path"; then
20194             new_path="$p/$path"
20195             break
20196           fi
20197         done
20198         IFS="$IFS_save"
20199       else
20200         # This is an absolute path, we can use it without further modifications.
20201         new_path="$path"
20202       fi
20203 
20204       if test "x$new_path" = x; then
20205         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20206 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20207         has_space=`$ECHO "$complete" | $GREP " "`
20208         if test "x$has_space" != x; then
20209           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20210 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20211         fi
20212         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20213       fi
20214     fi
20215 
20216     # Now join together the path and the arguments once again
20217     if test "x$arguments" != xEOL; then
20218       new_complete="$new_path ${arguments% *}"
20219     else
20220       new_complete="$new_path"
20221     fi
20222 
20223     if test "x$complete" != "x$new_complete"; then
20224       FOUND_MAKE="$new_complete"
20225       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20226 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20227     fi
20228   fi
20229 
20230         fi
20231       fi
20232     fi
20233   fi
20234 
20235     fi
20236 
20237     if test "x$FOUND_MAKE" = x; then
20238       if test "x$TOOLCHAIN_PATH" != x; then
20239         # We have a toolchain path, check that as well before giving up.
20240         OLD_PATH=$PATH
20241         PATH=$TOOLCHAIN_PATH:$PATH
20242         for ac_prog in gmake
20243 do
20244   # Extract the first word of "$ac_prog", so it can be a program name with args.
20245 set dummy $ac_prog; ac_word=$2
20246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20247 $as_echo_n "checking for $ac_word... " >&6; }
20248 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20249   $as_echo_n "(cached) " >&6
20250 else
20251   case $CHECK_TOOLSDIR_GMAKE in
20252   [\\/]* | ?:[\\/]*)
20253   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20254   ;;
20255   *)
20256   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20257 for as_dir in $PATH
20258 do
20259   IFS=$as_save_IFS
20260   test -z "$as_dir" && as_dir=.
20261     for ac_exec_ext in '' $ac_executable_extensions; do
20262   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20263     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20264     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20265     break 2
20266   fi
20267 done
20268   done
20269 IFS=$as_save_IFS
20270 
20271   ;;
20272 esac
20273 fi
20274 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20275 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20277 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20278 else
20279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20280 $as_echo "no" >&6; }
20281 fi
20282 
20283 
20284   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20285 done
20286 
20287 
20288   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20289   DESCRIPTION="gmake in tools-dir"
20290 
20291   # On Cygwin, we require a newer version of make than on other platforms
20292   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20293     MAKE_VERSION_EXPR="-e 4\."
20294     MAKE_REQUIRED_VERSION="4.0"
20295    else
20296     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20297     MAKE_REQUIRED_VERSION="3.81"
20298   fi
20299 
20300   if test "x$MAKE_CANDIDATE" != x; then
20301     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20302 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20303     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20304     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20305     if test "x$IS_GNU_MAKE" = x; then
20306       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20307 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20308     else
20309       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20310       if test "x$IS_MODERN_MAKE" = x; then
20311         { $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
20312 $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;}
20313       else
20314         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20315           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20316             MAKE_EXPECTED_ENV='cygwin'
20317           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20318             MAKE_EXPECTED_ENV='msys'
20319           else
20320             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20321           fi
20322           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20323           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20324         else
20325           # Not relevant for non-Windows
20326           IS_MAKE_CORRECT_ENV=true
20327         fi
20328         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20329           { $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
20330 $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;}
20331         else
20332           FOUND_MAKE=$MAKE_CANDIDATE
20333 
20334   # Only process if variable expands to non-empty
20335 
20336   if test "x$FOUND_MAKE" != x; then
20337     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20338 
20339   # First separate the path from the arguments. This will split at the first
20340   # space.
20341   complete="$FOUND_MAKE"
20342   path="${complete%% *}"
20343   tmp="$complete EOL"
20344   arguments="${tmp#* }"
20345 
20346   # Input might be given as Windows format, start by converting to
20347   # unix format.
20348   new_path=`$CYGPATH -u "$path"`
20349 
20350   # Now try to locate executable using which
20351   new_path=`$WHICH "$new_path" 2> /dev/null`
20352   # bat and cmd files are not always considered executable in cygwin causing which
20353   # to not find them
20354   if test "x$new_path" = x \
20355       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20356       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20357     new_path=`$CYGPATH -u "$path"`
20358   fi
20359   if test "x$new_path" = x; then
20360     # Oops. Which didn't find the executable.
20361     # The splitting of arguments from the executable at a space might have been incorrect,
20362     # since paths with space are more likely in Windows. Give it another try with the whole
20363     # argument.
20364     path="$complete"
20365     arguments="EOL"
20366     new_path=`$CYGPATH -u "$path"`
20367     new_path=`$WHICH "$new_path" 2> /dev/null`
20368     # bat and cmd files are not always considered executable in cygwin causing which
20369     # to not find them
20370     if test "x$new_path" = x \
20371         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20372         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20373       new_path=`$CYGPATH -u "$path"`
20374     fi
20375     if test "x$new_path" = x; then
20376       # It's still not found. Now this is an unrecoverable error.
20377       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20378 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20379       has_space=`$ECHO "$complete" | $GREP " "`
20380       if test "x$has_space" != x; then
20381         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20382 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20383       fi
20384       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20385     fi
20386   fi
20387 
20388   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20389   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20390   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20391   # "foo.exe" is OK but "foo" is an error.
20392   #
20393   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20394   # It is also a way to make sure we got the proper file name for the real test later on.
20395   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20396   if test "x$test_shortpath" = x; then
20397     # Short path failed, file does not exist as specified.
20398     # Try adding .exe or .cmd
20399     if test -f "${new_path}.exe"; then
20400       input_to_shortpath="${new_path}.exe"
20401     elif test -f "${new_path}.cmd"; then
20402       input_to_shortpath="${new_path}.cmd"
20403     else
20404       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20405 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20406       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20407 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20408       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20409     fi
20410   else
20411     input_to_shortpath="$new_path"
20412   fi
20413 
20414   # Call helper function which possibly converts this using DOS-style short mode.
20415   # If so, the updated path is stored in $new_path.
20416   new_path="$input_to_shortpath"
20417 
20418   input_path="$input_to_shortpath"
20419   # Check if we need to convert this using DOS-style short mode. If the path
20420   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20421   # take no chances and rewrite it.
20422   # Note: m4 eats our [], so we need to use [ and ] instead.
20423   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20424   if test "x$has_forbidden_chars" != x; then
20425     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20426     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20427     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20428     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20429       # Going to short mode and back again did indeed matter. Since short mode is
20430       # case insensitive, let's make it lowercase to improve readability.
20431       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20432       # Now convert it back to Unix-style (cygpath)
20433       input_path=`$CYGPATH -u "$shortmode_path"`
20434       new_path="$input_path"
20435     fi
20436   fi
20437 
20438   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20439   if test "x$test_cygdrive_prefix" = x; then
20440     # As a simple fix, exclude /usr/bin since it's not a real path.
20441     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20442       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20443       # a path prefixed by /cygdrive for fixpath to work.
20444       new_path="$CYGWIN_ROOT_PATH$input_path"
20445     fi
20446   fi
20447 
20448   # remove trailing .exe if any
20449   new_path="${new_path/%.exe/}"
20450 
20451     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20452 
20453   # First separate the path from the arguments. This will split at the first
20454   # space.
20455   complete="$FOUND_MAKE"
20456   path="${complete%% *}"
20457   tmp="$complete EOL"
20458   arguments="${tmp#* }"
20459 
20460   # Input might be given as Windows format, start by converting to
20461   # unix format.
20462   new_path="$path"
20463 
20464   windows_path="$new_path"
20465   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20466     unix_path=`$CYGPATH -u "$windows_path"`
20467     new_path="$unix_path"
20468   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20469     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20470     new_path="$unix_path"
20471   fi
20472 
20473 
20474   # Now try to locate executable using which
20475   new_path=`$WHICH "$new_path" 2> /dev/null`
20476 
20477   if test "x$new_path" = x; then
20478     # Oops. Which didn't find the executable.
20479     # The splitting of arguments from the executable at a space might have been incorrect,
20480     # since paths with space are more likely in Windows. Give it another try with the whole
20481     # argument.
20482     path="$complete"
20483     arguments="EOL"
20484     new_path="$path"
20485 
20486   windows_path="$new_path"
20487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20488     unix_path=`$CYGPATH -u "$windows_path"`
20489     new_path="$unix_path"
20490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20492     new_path="$unix_path"
20493   fi
20494 
20495 
20496     new_path=`$WHICH "$new_path" 2> /dev/null`
20497     # bat and cmd files are not always considered executable in MSYS causing which
20498     # to not find them
20499     if test "x$new_path" = x \
20500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20502       new_path="$path"
20503 
20504   windows_path="$new_path"
20505   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20506     unix_path=`$CYGPATH -u "$windows_path"`
20507     new_path="$unix_path"
20508   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20509     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20510     new_path="$unix_path"
20511   fi
20512 
20513     fi
20514 
20515     if test "x$new_path" = x; then
20516       # It's still not found. Now this is an unrecoverable error.
20517       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20518 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20519       has_space=`$ECHO "$complete" | $GREP " "`
20520       if test "x$has_space" != x; then
20521         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20522 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20523       fi
20524       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20525     fi
20526   fi
20527 
20528   # Now new_path has a complete unix path to the binary
20529   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20530     # Keep paths in /bin as-is, but remove trailing .exe if any
20531     new_path="${new_path/%.exe/}"
20532     # Do not save /bin paths to all_fixpath_prefixes!
20533   else
20534     # Not in mixed or Windows style, start by that.
20535     new_path=`cmd //c echo $new_path`
20536 
20537   input_path="$new_path"
20538   # Check if we need to convert this using DOS-style short mode. If the path
20539   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20540   # take no chances and rewrite it.
20541   # Note: m4 eats our [], so we need to use [ and ] instead.
20542   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20543   if test "x$has_forbidden_chars" != x; then
20544     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20545     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20546   fi
20547 
20548     # Output is in $new_path
20549 
20550   windows_path="$new_path"
20551   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20552     unix_path=`$CYGPATH -u "$windows_path"`
20553     new_path="$unix_path"
20554   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20555     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20556     new_path="$unix_path"
20557   fi
20558 
20559     # remove trailing .exe if any
20560     new_path="${new_path/%.exe/}"
20561 
20562     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20563     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20564   fi
20565 
20566     else
20567       # We're on a unix platform. Hooray! :)
20568       # First separate the path from the arguments. This will split at the first
20569       # space.
20570       complete="$FOUND_MAKE"
20571       path="${complete%% *}"
20572       tmp="$complete EOL"
20573       arguments="${tmp#* }"
20574 
20575       # Cannot rely on the command "which" here since it doesn't always work.
20576       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20577       if test -z "$is_absolute_path"; then
20578         # Path to executable is not absolute. Find it.
20579         IFS_save="$IFS"
20580         IFS=:
20581         for p in $PATH; do
20582           if test -f "$p/$path" && test -x "$p/$path"; then
20583             new_path="$p/$path"
20584             break
20585           fi
20586         done
20587         IFS="$IFS_save"
20588       else
20589         # This is an absolute path, we can use it without further modifications.
20590         new_path="$path"
20591       fi
20592 
20593       if test "x$new_path" = x; then
20594         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20595 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20596         has_space=`$ECHO "$complete" | $GREP " "`
20597         if test "x$has_space" != x; then
20598           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20599 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20600         fi
20601         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20602       fi
20603     fi
20604 
20605     # Now join together the path and the arguments once again
20606     if test "x$arguments" != xEOL; then
20607       new_complete="$new_path ${arguments% *}"
20608     else
20609       new_complete="$new_path"
20610     fi
20611 
20612     if test "x$complete" != "x$new_complete"; then
20613       FOUND_MAKE="$new_complete"
20614       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20615 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20616     fi
20617   fi
20618 
20619         fi
20620       fi
20621     fi
20622   fi
20623 
20624         if test "x$FOUND_MAKE" = x; then
20625           for ac_prog in make
20626 do
20627   # Extract the first word of "$ac_prog", so it can be a program name with args.
20628 set dummy $ac_prog; ac_word=$2
20629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20630 $as_echo_n "checking for $ac_word... " >&6; }
20631 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20632   $as_echo_n "(cached) " >&6
20633 else
20634   case $CHECK_TOOLSDIR_MAKE in
20635   [\\/]* | ?:[\\/]*)
20636   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20637   ;;
20638   *)
20639   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20640 for as_dir in $PATH
20641 do
20642   IFS=$as_save_IFS
20643   test -z "$as_dir" && as_dir=.
20644     for ac_exec_ext in '' $ac_executable_extensions; do
20645   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20646     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20647     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20648     break 2
20649   fi
20650 done
20651   done
20652 IFS=$as_save_IFS
20653 
20654   ;;
20655 esac
20656 fi
20657 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20658 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20660 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20661 else
20662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20663 $as_echo "no" >&6; }
20664 fi
20665 
20666 
20667   test -n "$CHECK_TOOLSDIR_MAKE" && break
20668 done
20669 
20670 
20671   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20672   DESCRIPTION="make in tools-dir"
20673 
20674   # On Cygwin, we require a newer version of make than on other platforms
20675   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20676     MAKE_VERSION_EXPR="-e 4\."
20677     MAKE_REQUIRED_VERSION="4.0"
20678    else
20679     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20680     MAKE_REQUIRED_VERSION="3.81"
20681   fi
20682 
20683   if test "x$MAKE_CANDIDATE" != x; then
20684     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20685 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20686     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20687     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20688     if test "x$IS_GNU_MAKE" = x; then
20689       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20690 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20691     else
20692       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20693       if test "x$IS_MODERN_MAKE" = x; then
20694         { $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
20695 $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;}
20696       else
20697         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20698           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20699             MAKE_EXPECTED_ENV='cygwin'
20700           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20701             MAKE_EXPECTED_ENV='msys'
20702           else
20703             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20704           fi
20705           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20706           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20707         else
20708           # Not relevant for non-Windows
20709           IS_MAKE_CORRECT_ENV=true
20710         fi
20711         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20712           { $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
20713 $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;}
20714         else
20715           FOUND_MAKE=$MAKE_CANDIDATE
20716 
20717   # Only process if variable expands to non-empty
20718 
20719   if test "x$FOUND_MAKE" != x; then
20720     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20721 
20722   # First separate the path from the arguments. This will split at the first
20723   # space.
20724   complete="$FOUND_MAKE"
20725   path="${complete%% *}"
20726   tmp="$complete EOL"
20727   arguments="${tmp#* }"
20728 
20729   # Input might be given as Windows format, start by converting to
20730   # unix format.
20731   new_path=`$CYGPATH -u "$path"`
20732 
20733   # Now try to locate executable using which
20734   new_path=`$WHICH "$new_path" 2> /dev/null`
20735   # bat and cmd files are not always considered executable in cygwin causing which
20736   # to not find them
20737   if test "x$new_path" = x \
20738       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20739       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20740     new_path=`$CYGPATH -u "$path"`
20741   fi
20742   if test "x$new_path" = x; then
20743     # Oops. Which didn't find the executable.
20744     # The splitting of arguments from the executable at a space might have been incorrect,
20745     # since paths with space are more likely in Windows. Give it another try with the whole
20746     # argument.
20747     path="$complete"
20748     arguments="EOL"
20749     new_path=`$CYGPATH -u "$path"`
20750     new_path=`$WHICH "$new_path" 2> /dev/null`
20751     # bat and cmd files are not always considered executable in cygwin causing which
20752     # to not find them
20753     if test "x$new_path" = x \
20754         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20755         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20756       new_path=`$CYGPATH -u "$path"`
20757     fi
20758     if test "x$new_path" = x; then
20759       # It's still not found. Now this is an unrecoverable error.
20760       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20761 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20762       has_space=`$ECHO "$complete" | $GREP " "`
20763       if test "x$has_space" != x; then
20764         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20765 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20766       fi
20767       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20768     fi
20769   fi
20770 
20771   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20772   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20773   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20774   # "foo.exe" is OK but "foo" is an error.
20775   #
20776   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20777   # It is also a way to make sure we got the proper file name for the real test later on.
20778   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20779   if test "x$test_shortpath" = x; then
20780     # Short path failed, file does not exist as specified.
20781     # Try adding .exe or .cmd
20782     if test -f "${new_path}.exe"; then
20783       input_to_shortpath="${new_path}.exe"
20784     elif test -f "${new_path}.cmd"; then
20785       input_to_shortpath="${new_path}.cmd"
20786     else
20787       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20788 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20789       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20790 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20791       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20792     fi
20793   else
20794     input_to_shortpath="$new_path"
20795   fi
20796 
20797   # Call helper function which possibly converts this using DOS-style short mode.
20798   # If so, the updated path is stored in $new_path.
20799   new_path="$input_to_shortpath"
20800 
20801   input_path="$input_to_shortpath"
20802   # Check if we need to convert this using DOS-style short mode. If the path
20803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20804   # take no chances and rewrite it.
20805   # Note: m4 eats our [], so we need to use [ and ] instead.
20806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20807   if test "x$has_forbidden_chars" != x; then
20808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20809     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20810     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20811     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20812       # Going to short mode and back again did indeed matter. Since short mode is
20813       # case insensitive, let's make it lowercase to improve readability.
20814       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20815       # Now convert it back to Unix-style (cygpath)
20816       input_path=`$CYGPATH -u "$shortmode_path"`
20817       new_path="$input_path"
20818     fi
20819   fi
20820 
20821   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20822   if test "x$test_cygdrive_prefix" = x; then
20823     # As a simple fix, exclude /usr/bin since it's not a real path.
20824     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20825       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20826       # a path prefixed by /cygdrive for fixpath to work.
20827       new_path="$CYGWIN_ROOT_PATH$input_path"
20828     fi
20829   fi
20830 
20831   # remove trailing .exe if any
20832   new_path="${new_path/%.exe/}"
20833 
20834     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20835 
20836   # First separate the path from the arguments. This will split at the first
20837   # space.
20838   complete="$FOUND_MAKE"
20839   path="${complete%% *}"
20840   tmp="$complete EOL"
20841   arguments="${tmp#* }"
20842 
20843   # Input might be given as Windows format, start by converting to
20844   # unix format.
20845   new_path="$path"
20846 
20847   windows_path="$new_path"
20848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20849     unix_path=`$CYGPATH -u "$windows_path"`
20850     new_path="$unix_path"
20851   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20852     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20853     new_path="$unix_path"
20854   fi
20855 
20856 
20857   # Now try to locate executable using which
20858   new_path=`$WHICH "$new_path" 2> /dev/null`
20859 
20860   if test "x$new_path" = x; then
20861     # Oops. Which didn't find the executable.
20862     # The splitting of arguments from the executable at a space might have been incorrect,
20863     # since paths with space are more likely in Windows. Give it another try with the whole
20864     # argument.
20865     path="$complete"
20866     arguments="EOL"
20867     new_path="$path"
20868 
20869   windows_path="$new_path"
20870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20871     unix_path=`$CYGPATH -u "$windows_path"`
20872     new_path="$unix_path"
20873   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20874     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20875     new_path="$unix_path"
20876   fi
20877 
20878 
20879     new_path=`$WHICH "$new_path" 2> /dev/null`
20880     # bat and cmd files are not always considered executable in MSYS causing which
20881     # to not find them
20882     if test "x$new_path" = x \
20883         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20884         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20885       new_path="$path"
20886 
20887   windows_path="$new_path"
20888   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20889     unix_path=`$CYGPATH -u "$windows_path"`
20890     new_path="$unix_path"
20891   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20892     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20893     new_path="$unix_path"
20894   fi
20895 
20896     fi
20897 
20898     if test "x$new_path" = x; then
20899       # It's still not found. Now this is an unrecoverable error.
20900       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20901 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20902       has_space=`$ECHO "$complete" | $GREP " "`
20903       if test "x$has_space" != x; then
20904         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20905 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20906       fi
20907       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20908     fi
20909   fi
20910 
20911   # Now new_path has a complete unix path to the binary
20912   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20913     # Keep paths in /bin as-is, but remove trailing .exe if any
20914     new_path="${new_path/%.exe/}"
20915     # Do not save /bin paths to all_fixpath_prefixes!
20916   else
20917     # Not in mixed or Windows style, start by that.
20918     new_path=`cmd //c echo $new_path`
20919 
20920   input_path="$new_path"
20921   # Check if we need to convert this using DOS-style short mode. If the path
20922   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20923   # take no chances and rewrite it.
20924   # Note: m4 eats our [], so we need to use [ and ] instead.
20925   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20926   if test "x$has_forbidden_chars" != x; then
20927     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20928     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20929   fi
20930 
20931     # Output is in $new_path
20932 
20933   windows_path="$new_path"
20934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20935     unix_path=`$CYGPATH -u "$windows_path"`
20936     new_path="$unix_path"
20937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20939     new_path="$unix_path"
20940   fi
20941 
20942     # remove trailing .exe if any
20943     new_path="${new_path/%.exe/}"
20944 
20945     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20946     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20947   fi
20948 
20949     else
20950       # We're on a unix platform. Hooray! :)
20951       # First separate the path from the arguments. This will split at the first
20952       # space.
20953       complete="$FOUND_MAKE"
20954       path="${complete%% *}"
20955       tmp="$complete EOL"
20956       arguments="${tmp#* }"
20957 
20958       # Cannot rely on the command "which" here since it doesn't always work.
20959       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20960       if test -z "$is_absolute_path"; then
20961         # Path to executable is not absolute. Find it.
20962         IFS_save="$IFS"
20963         IFS=:
20964         for p in $PATH; do
20965           if test -f "$p/$path" && test -x "$p/$path"; then
20966             new_path="$p/$path"
20967             break
20968           fi
20969         done
20970         IFS="$IFS_save"
20971       else
20972         # This is an absolute path, we can use it without further modifications.
20973         new_path="$path"
20974       fi
20975 
20976       if test "x$new_path" = x; then
20977         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20978 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20979         has_space=`$ECHO "$complete" | $GREP " "`
20980         if test "x$has_space" != x; then
20981           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20982 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20983         fi
20984         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20985       fi
20986     fi
20987 
20988     # Now join together the path and the arguments once again
20989     if test "x$arguments" != xEOL; then
20990       new_complete="$new_path ${arguments% *}"
20991     else
20992       new_complete="$new_path"
20993     fi
20994 
20995     if test "x$complete" != "x$new_complete"; then
20996       FOUND_MAKE="$new_complete"
20997       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20998 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20999     fi
21000   fi
21001 
21002         fi
21003       fi
21004     fi
21005   fi
21006 
21007         fi
21008         PATH=$OLD_PATH
21009       fi
21010     fi
21011 
21012     if test "x$FOUND_MAKE" = x; then
21013       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
21014     fi
21015 
21016     else
21017       # If it succeeded, then it was overridden by the user. We will use it
21018       # for the tool.
21019 
21020       # First remove it from the list of overridden variables, so we can test
21021       # for unknown variables in the end.
21022       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21023 
21024       # Check if we try to supply an empty value
21025       if test "x$MAKE" = x; then
21026         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
21027 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
21028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21029 $as_echo_n "checking for MAKE... " >&6; }
21030         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21031 $as_echo "disabled" >&6; }
21032       else
21033         # Check if the provided tool contains a complete path.
21034         tool_specified="$MAKE"
21035         tool_basename="${tool_specified##*/}"
21036         if test "x$tool_basename" = "x$tool_specified"; then
21037           # A command without a complete path is provided, search $PATH.
21038           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
21039 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
21040           # Extract the first word of "$tool_basename", so it can be a program name with args.
21041 set dummy $tool_basename; ac_word=$2
21042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21043 $as_echo_n "checking for $ac_word... " >&6; }
21044 if ${ac_cv_path_MAKE+:} false; then :
21045   $as_echo_n "(cached) " >&6
21046 else
21047   case $MAKE in
21048   [\\/]* | ?:[\\/]*)
21049   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
21050   ;;
21051   *)
21052   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21053 for as_dir in $PATH
21054 do
21055   IFS=$as_save_IFS
21056   test -z "$as_dir" && as_dir=.
21057     for ac_exec_ext in '' $ac_executable_extensions; do
21058   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21059     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
21060     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21061     break 2
21062   fi
21063 done
21064   done
21065 IFS=$as_save_IFS
21066 
21067   ;;
21068 esac
21069 fi
21070 MAKE=$ac_cv_path_MAKE
21071 if test -n "$MAKE"; then
21072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
21073 $as_echo "$MAKE" >&6; }
21074 else
21075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21076 $as_echo "no" >&6; }
21077 fi
21078 
21079 
21080           if test "x$MAKE" = x; then
21081             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21082           fi
21083         else
21084           # Otherwise we believe it is a complete path. Use it as it is.
21085           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
21086 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
21087           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
21088 $as_echo_n "checking for MAKE... " >&6; }
21089           if test ! -x "$tool_specified"; then
21090             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21091 $as_echo "not found" >&6; }
21092             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
21093           fi
21094           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21095 $as_echo "$tool_specified" >&6; }
21096         fi
21097       fi
21098     fi
21099 
21100     # If MAKE was set by user, verify the version
21101 
21102   MAKE_CANDIDATE=""$MAKE""
21103   DESCRIPTION="user supplied MAKE=$MAKE"
21104 
21105   # On Cygwin, we require a newer version of make than on other platforms
21106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21107     MAKE_VERSION_EXPR="-e 4\."
21108     MAKE_REQUIRED_VERSION="4.0"
21109    else
21110     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21111     MAKE_REQUIRED_VERSION="3.81"
21112   fi
21113 
21114   if test "x$MAKE_CANDIDATE" != x; then
21115     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21116 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21117     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21118     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21119     if test "x$IS_GNU_MAKE" = x; then
21120       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21121 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21122     else
21123       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21124       if test "x$IS_MODERN_MAKE" = x; then
21125         { $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
21126 $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;}
21127       else
21128         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21129           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21130             MAKE_EXPECTED_ENV='cygwin'
21131           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21132             MAKE_EXPECTED_ENV='msys'
21133           else
21134             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21135           fi
21136           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21137           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21138         else
21139           # Not relevant for non-Windows
21140           IS_MAKE_CORRECT_ENV=true
21141         fi
21142         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21143           { $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
21144 $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;}
21145         else
21146           FOUND_MAKE=$MAKE_CANDIDATE
21147 
21148   # Only process if variable expands to non-empty
21149 
21150   if test "x$FOUND_MAKE" != x; then
21151     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21152 
21153   # First separate the path from the arguments. This will split at the first
21154   # space.
21155   complete="$FOUND_MAKE"
21156   path="${complete%% *}"
21157   tmp="$complete EOL"
21158   arguments="${tmp#* }"
21159 
21160   # Input might be given as Windows format, start by converting to
21161   # unix format.
21162   new_path=`$CYGPATH -u "$path"`
21163 
21164   # Now try to locate executable using which
21165   new_path=`$WHICH "$new_path" 2> /dev/null`
21166   # bat and cmd files are not always considered executable in cygwin causing which
21167   # to not find them
21168   if test "x$new_path" = x \
21169       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21170       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21171     new_path=`$CYGPATH -u "$path"`
21172   fi
21173   if test "x$new_path" = x; then
21174     # Oops. Which didn't find the executable.
21175     # The splitting of arguments from the executable at a space might have been incorrect,
21176     # since paths with space are more likely in Windows. Give it another try with the whole
21177     # argument.
21178     path="$complete"
21179     arguments="EOL"
21180     new_path=`$CYGPATH -u "$path"`
21181     new_path=`$WHICH "$new_path" 2> /dev/null`
21182     # bat and cmd files are not always considered executable in cygwin causing which
21183     # to not find them
21184     if test "x$new_path" = x \
21185         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21186         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21187       new_path=`$CYGPATH -u "$path"`
21188     fi
21189     if test "x$new_path" = x; then
21190       # It's still not found. Now this is an unrecoverable error.
21191       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21192 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21193       has_space=`$ECHO "$complete" | $GREP " "`
21194       if test "x$has_space" != x; then
21195         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21196 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21197       fi
21198       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21199     fi
21200   fi
21201 
21202   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21203   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21204   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21205   # "foo.exe" is OK but "foo" is an error.
21206   #
21207   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21208   # It is also a way to make sure we got the proper file name for the real test later on.
21209   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21210   if test "x$test_shortpath" = x; then
21211     # Short path failed, file does not exist as specified.
21212     # Try adding .exe or .cmd
21213     if test -f "${new_path}.exe"; then
21214       input_to_shortpath="${new_path}.exe"
21215     elif test -f "${new_path}.cmd"; then
21216       input_to_shortpath="${new_path}.cmd"
21217     else
21218       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21219 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21220       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21221 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21222       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21223     fi
21224   else
21225     input_to_shortpath="$new_path"
21226   fi
21227 
21228   # Call helper function which possibly converts this using DOS-style short mode.
21229   # If so, the updated path is stored in $new_path.
21230   new_path="$input_to_shortpath"
21231 
21232   input_path="$input_to_shortpath"
21233   # Check if we need to convert this using DOS-style short mode. If the path
21234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21235   # take no chances and rewrite it.
21236   # Note: m4 eats our [], so we need to use [ and ] instead.
21237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21238   if test "x$has_forbidden_chars" != x; then
21239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21240     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21241     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21242     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21243       # Going to short mode and back again did indeed matter. Since short mode is
21244       # case insensitive, let's make it lowercase to improve readability.
21245       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21246       # Now convert it back to Unix-style (cygpath)
21247       input_path=`$CYGPATH -u "$shortmode_path"`
21248       new_path="$input_path"
21249     fi
21250   fi
21251 
21252   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21253   if test "x$test_cygdrive_prefix" = x; then
21254     # As a simple fix, exclude /usr/bin since it's not a real path.
21255     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21256       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21257       # a path prefixed by /cygdrive for fixpath to work.
21258       new_path="$CYGWIN_ROOT_PATH$input_path"
21259     fi
21260   fi
21261 
21262   # remove trailing .exe if any
21263   new_path="${new_path/%.exe/}"
21264 
21265     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21266 
21267   # First separate the path from the arguments. This will split at the first
21268   # space.
21269   complete="$FOUND_MAKE"
21270   path="${complete%% *}"
21271   tmp="$complete EOL"
21272   arguments="${tmp#* }"
21273 
21274   # Input might be given as Windows format, start by converting to
21275   # unix format.
21276   new_path="$path"
21277 
21278   windows_path="$new_path"
21279   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21280     unix_path=`$CYGPATH -u "$windows_path"`
21281     new_path="$unix_path"
21282   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21283     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21284     new_path="$unix_path"
21285   fi
21286 
21287 
21288   # Now try to locate executable using which
21289   new_path=`$WHICH "$new_path" 2> /dev/null`
21290 
21291   if test "x$new_path" = x; then
21292     # Oops. Which didn't find the executable.
21293     # The splitting of arguments from the executable at a space might have been incorrect,
21294     # since paths with space are more likely in Windows. Give it another try with the whole
21295     # argument.
21296     path="$complete"
21297     arguments="EOL"
21298     new_path="$path"
21299 
21300   windows_path="$new_path"
21301   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21302     unix_path=`$CYGPATH -u "$windows_path"`
21303     new_path="$unix_path"
21304   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21305     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21306     new_path="$unix_path"
21307   fi
21308 
21309 
21310     new_path=`$WHICH "$new_path" 2> /dev/null`
21311     # bat and cmd files are not always considered executable in MSYS causing which
21312     # to not find them
21313     if test "x$new_path" = x \
21314         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21315         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21316       new_path="$path"
21317 
21318   windows_path="$new_path"
21319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21320     unix_path=`$CYGPATH -u "$windows_path"`
21321     new_path="$unix_path"
21322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21324     new_path="$unix_path"
21325   fi
21326 
21327     fi
21328 
21329     if test "x$new_path" = x; then
21330       # It's still not found. Now this is an unrecoverable error.
21331       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21332 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21333       has_space=`$ECHO "$complete" | $GREP " "`
21334       if test "x$has_space" != x; then
21335         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21336 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21337       fi
21338       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21339     fi
21340   fi
21341 
21342   # Now new_path has a complete unix path to the binary
21343   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21344     # Keep paths in /bin as-is, but remove trailing .exe if any
21345     new_path="${new_path/%.exe/}"
21346     # Do not save /bin paths to all_fixpath_prefixes!
21347   else
21348     # Not in mixed or Windows style, start by that.
21349     new_path=`cmd //c echo $new_path`
21350 
21351   input_path="$new_path"
21352   # Check if we need to convert this using DOS-style short mode. If the path
21353   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21354   # take no chances and rewrite it.
21355   # Note: m4 eats our [], so we need to use [ and ] instead.
21356   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21357   if test "x$has_forbidden_chars" != x; then
21358     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21359     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21360   fi
21361 
21362     # Output is in $new_path
21363 
21364   windows_path="$new_path"
21365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21366     unix_path=`$CYGPATH -u "$windows_path"`
21367     new_path="$unix_path"
21368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21369     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21370     new_path="$unix_path"
21371   fi
21372 
21373     # remove trailing .exe if any
21374     new_path="${new_path/%.exe/}"
21375 
21376     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21377     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21378   fi
21379 
21380     else
21381       # We're on a unix platform. Hooray! :)
21382       # First separate the path from the arguments. This will split at the first
21383       # space.
21384       complete="$FOUND_MAKE"
21385       path="${complete%% *}"
21386       tmp="$complete EOL"
21387       arguments="${tmp#* }"
21388 
21389       # Cannot rely on the command "which" here since it doesn't always work.
21390       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21391       if test -z "$is_absolute_path"; then
21392         # Path to executable is not absolute. Find it.
21393         IFS_save="$IFS"
21394         IFS=:
21395         for p in $PATH; do
21396           if test -f "$p/$path" && test -x "$p/$path"; then
21397             new_path="$p/$path"
21398             break
21399           fi
21400         done
21401         IFS="$IFS_save"
21402       else
21403         # This is an absolute path, we can use it without further modifications.
21404         new_path="$path"
21405       fi
21406 
21407       if test "x$new_path" = x; then
21408         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21409 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21410         has_space=`$ECHO "$complete" | $GREP " "`
21411         if test "x$has_space" != x; then
21412           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21413 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21414         fi
21415         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21416       fi
21417     fi
21418 
21419     # Now join together the path and the arguments once again
21420     if test "x$arguments" != xEOL; then
21421       new_complete="$new_path ${arguments% *}"
21422     else
21423       new_complete="$new_path"
21424     fi
21425 
21426     if test "x$complete" != "x$new_complete"; then
21427       FOUND_MAKE="$new_complete"
21428       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21429 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21430     fi
21431   fi
21432 
21433         fi
21434       fi
21435     fi
21436   fi
21437 
21438     if test "x$FOUND_MAKE" = x; then
21439       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21440     fi
21441 
21442   fi
21443 
21444 
21445   MAKE=$FOUND_MAKE
21446 
21447   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21448 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21449 
21450 
21451   # Check if make supports the output sync option and if so, setup using it.
21452   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21453 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21454   if $MAKE --version -O > /dev/null 2>&1; then
21455     OUTPUT_SYNC_SUPPORTED=true
21456     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21457 $as_echo "yes" >&6; }
21458     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21459 $as_echo_n "checking for output-sync value... " >&6; }
21460 
21461 # Check whether --with-output-sync was given.
21462 if test "${with_output_sync+set}" = set; then :
21463   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21464 fi
21465 
21466     if test "x$OUTPUT_SYNC" = "x"; then
21467       OUTPUT_SYNC=none
21468     fi
21469     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21470 $as_echo "$OUTPUT_SYNC" >&6; }
21471     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21472       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21473     fi
21474   else
21475     OUTPUT_SYNC_SUPPORTED=false
21476     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21477 $as_echo "no" >&6; }
21478   fi
21479 
21480 
21481 
21482 
21483 
21484 
21485   # Test if find supports -delete
21486   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21487 $as_echo_n "checking if find supports -delete... " >&6; }
21488   FIND_DELETE="-delete"
21489 
21490   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21491 
21492   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21493 
21494   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21495   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21496     # No, it does not.
21497     $RM $DELETEDIR/TestIfFindSupportsDelete
21498     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21499       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21500       FIND_DELETE="-print | $XARGS $RM"
21501     else
21502       FIND_DELETE="-exec $RM \{\} \+"
21503     fi
21504     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21505 $as_echo "no" >&6; }
21506   else
21507     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21508 $as_echo "yes" >&6; }
21509   fi
21510   $RMDIR $DELETEDIR
21511 
21512 
21513 
21514   # Test which kind of tar was found
21515   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21516     TAR_TYPE="gnu"
21517   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21518     TAR_TYPE="bsd"
21519   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21520     TAR_TYPE="bsd"
21521   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21522     TAR_TYPE="solaris"
21523   fi
21524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21525 $as_echo_n "checking what type of tar was found... " >&6; }
21526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21527 $as_echo "$TAR_TYPE" >&6; }
21528 
21529   TAR_CREATE_FILE_PARAM=""
21530 
21531   if test "x$TAR_TYPE" = "xgnu"; then
21532     TAR_INCLUDE_PARAM="T"
21533     TAR_SUPPORTS_TRANSFORM="true"
21534     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21535       # When using gnu tar for Solaris targets, need to use compatibility mode
21536       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21537     fi
21538   else
21539     TAR_INCLUDE_PARAM="I"
21540     TAR_SUPPORTS_TRANSFORM="false"
21541   fi
21542 
21543 
21544 
21545 
21546 
21547 
21548   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21549   # This is a problem for the grep resident on AIX.
21550   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21551 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21552   # Multiple subsequent spaces..
21553   STACK_SPACES='aaa   bbb   ccc'
21554   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21555   # patterns in it.
21556   STACK_LIST=${STACK_SPACES// /$'\n'}
21557   NEEDLE_SPACES='ccc bbb aaa'
21558   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21559   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21560   if test "x$RESULT" == "x"; then
21561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21562 $as_echo "yes" >&6; }
21563   else
21564     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21565       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21566     fi
21567     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21568   fi
21569 
21570 
21571   # These tools might not be installed by default,
21572   # need hint on how to install them.
21573 
21574 
21575 
21576   # Publish this variable in the help.
21577 
21578 
21579   if [ -z "${UNZIP+x}" ]; then
21580     # The variable is not set by user, try to locate tool using the code snippet
21581     for ac_prog in unzip
21582 do
21583   # Extract the first word of "$ac_prog", so it can be a program name with args.
21584 set dummy $ac_prog; ac_word=$2
21585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21586 $as_echo_n "checking for $ac_word... " >&6; }
21587 if ${ac_cv_path_UNZIP+:} false; then :
21588   $as_echo_n "(cached) " >&6
21589 else
21590   case $UNZIP in
21591   [\\/]* | ?:[\\/]*)
21592   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21593   ;;
21594   *)
21595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21596 for as_dir in $PATH
21597 do
21598   IFS=$as_save_IFS
21599   test -z "$as_dir" && as_dir=.
21600     for ac_exec_ext in '' $ac_executable_extensions; do
21601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21602     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21604     break 2
21605   fi
21606 done
21607   done
21608 IFS=$as_save_IFS
21609 
21610   ;;
21611 esac
21612 fi
21613 UNZIP=$ac_cv_path_UNZIP
21614 if test -n "$UNZIP"; then
21615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21616 $as_echo "$UNZIP" >&6; }
21617 else
21618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21619 $as_echo "no" >&6; }
21620 fi
21621 
21622 
21623   test -n "$UNZIP" && break
21624 done
21625 
21626   else
21627     # The variable is set, but is it from the command line or the environment?
21628 
21629     # Try to remove the string !UNZIP! from our list.
21630     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21631     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21632       # If it failed, the variable was not from the command line. Ignore it,
21633       # but warn the user (except for BASH, which is always set by the calling BASH).
21634       if test "xUNZIP" != xBASH; then
21635         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21636 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21637       fi
21638       # Try to locate tool using the code snippet
21639       for ac_prog in unzip
21640 do
21641   # Extract the first word of "$ac_prog", so it can be a program name with args.
21642 set dummy $ac_prog; ac_word=$2
21643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21644 $as_echo_n "checking for $ac_word... " >&6; }
21645 if ${ac_cv_path_UNZIP+:} false; then :
21646   $as_echo_n "(cached) " >&6
21647 else
21648   case $UNZIP in
21649   [\\/]* | ?:[\\/]*)
21650   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21651   ;;
21652   *)
21653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21654 for as_dir in $PATH
21655 do
21656   IFS=$as_save_IFS
21657   test -z "$as_dir" && as_dir=.
21658     for ac_exec_ext in '' $ac_executable_extensions; do
21659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21660     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21662     break 2
21663   fi
21664 done
21665   done
21666 IFS=$as_save_IFS
21667 
21668   ;;
21669 esac
21670 fi
21671 UNZIP=$ac_cv_path_UNZIP
21672 if test -n "$UNZIP"; then
21673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21674 $as_echo "$UNZIP" >&6; }
21675 else
21676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21677 $as_echo "no" >&6; }
21678 fi
21679 
21680 
21681   test -n "$UNZIP" && break
21682 done
21683 
21684     else
21685       # If it succeeded, then it was overridden by the user. We will use it
21686       # for the tool.
21687 
21688       # First remove it from the list of overridden variables, so we can test
21689       # for unknown variables in the end.
21690       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21691 
21692       # Check if we try to supply an empty value
21693       if test "x$UNZIP" = x; then
21694         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21695 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21696         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21697 $as_echo_n "checking for UNZIP... " >&6; }
21698         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21699 $as_echo "disabled" >&6; }
21700       else
21701         # Check if the provided tool contains a complete path.
21702         tool_specified="$UNZIP"
21703         tool_basename="${tool_specified##*/}"
21704         if test "x$tool_basename" = "x$tool_specified"; then
21705           # A command without a complete path is provided, search $PATH.
21706           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21707 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21708           # Extract the first word of "$tool_basename", so it can be a program name with args.
21709 set dummy $tool_basename; ac_word=$2
21710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21711 $as_echo_n "checking for $ac_word... " >&6; }
21712 if ${ac_cv_path_UNZIP+:} false; then :
21713   $as_echo_n "(cached) " >&6
21714 else
21715   case $UNZIP in
21716   [\\/]* | ?:[\\/]*)
21717   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21718   ;;
21719   *)
21720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21721 for as_dir in $PATH
21722 do
21723   IFS=$as_save_IFS
21724   test -z "$as_dir" && as_dir=.
21725     for ac_exec_ext in '' $ac_executable_extensions; do
21726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21727     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21729     break 2
21730   fi
21731 done
21732   done
21733 IFS=$as_save_IFS
21734 
21735   ;;
21736 esac
21737 fi
21738 UNZIP=$ac_cv_path_UNZIP
21739 if test -n "$UNZIP"; then
21740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21741 $as_echo "$UNZIP" >&6; }
21742 else
21743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21744 $as_echo "no" >&6; }
21745 fi
21746 
21747 
21748           if test "x$UNZIP" = x; then
21749             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21750           fi
21751         else
21752           # Otherwise we believe it is a complete path. Use it as it is.
21753           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21754 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21755           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21756 $as_echo_n "checking for UNZIP... " >&6; }
21757           if test ! -x "$tool_specified"; then
21758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21759 $as_echo "not found" >&6; }
21760             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21761           fi
21762           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21763 $as_echo "$tool_specified" >&6; }
21764         fi
21765       fi
21766     fi
21767 
21768   fi
21769 
21770 
21771 
21772   if test "x$UNZIP" = x; then
21773     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21774   fi
21775 
21776 
21777   # Since zip uses "ZIP" as a environment variable for passing options, we need
21778   # to name our variable differently, hence ZIPEXE.
21779 
21780 
21781 
21782   # Publish this variable in the help.
21783 
21784 
21785   if [ -z "${ZIPEXE+x}" ]; then
21786     # The variable is not set by user, try to locate tool using the code snippet
21787     for ac_prog in zip
21788 do
21789   # Extract the first word of "$ac_prog", so it can be a program name with args.
21790 set dummy $ac_prog; ac_word=$2
21791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21792 $as_echo_n "checking for $ac_word... " >&6; }
21793 if ${ac_cv_path_ZIPEXE+:} false; then :
21794   $as_echo_n "(cached) " >&6
21795 else
21796   case $ZIPEXE in
21797   [\\/]* | ?:[\\/]*)
21798   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21799   ;;
21800   *)
21801   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21802 for as_dir in $PATH
21803 do
21804   IFS=$as_save_IFS
21805   test -z "$as_dir" && as_dir=.
21806     for ac_exec_ext in '' $ac_executable_extensions; do
21807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21808     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21810     break 2
21811   fi
21812 done
21813   done
21814 IFS=$as_save_IFS
21815 
21816   ;;
21817 esac
21818 fi
21819 ZIPEXE=$ac_cv_path_ZIPEXE
21820 if test -n "$ZIPEXE"; then
21821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21822 $as_echo "$ZIPEXE" >&6; }
21823 else
21824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21825 $as_echo "no" >&6; }
21826 fi
21827 
21828 
21829   test -n "$ZIPEXE" && break
21830 done
21831 
21832   else
21833     # The variable is set, but is it from the command line or the environment?
21834 
21835     # Try to remove the string !ZIPEXE! from our list.
21836     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21837     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21838       # If it failed, the variable was not from the command line. Ignore it,
21839       # but warn the user (except for BASH, which is always set by the calling BASH).
21840       if test "xZIPEXE" != xBASH; then
21841         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21842 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21843       fi
21844       # Try to locate tool using the code snippet
21845       for ac_prog in zip
21846 do
21847   # Extract the first word of "$ac_prog", so it can be a program name with args.
21848 set dummy $ac_prog; ac_word=$2
21849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21850 $as_echo_n "checking for $ac_word... " >&6; }
21851 if ${ac_cv_path_ZIPEXE+:} false; then :
21852   $as_echo_n "(cached) " >&6
21853 else
21854   case $ZIPEXE in
21855   [\\/]* | ?:[\\/]*)
21856   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21857   ;;
21858   *)
21859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21860 for as_dir in $PATH
21861 do
21862   IFS=$as_save_IFS
21863   test -z "$as_dir" && as_dir=.
21864     for ac_exec_ext in '' $ac_executable_extensions; do
21865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21866     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21868     break 2
21869   fi
21870 done
21871   done
21872 IFS=$as_save_IFS
21873 
21874   ;;
21875 esac
21876 fi
21877 ZIPEXE=$ac_cv_path_ZIPEXE
21878 if test -n "$ZIPEXE"; then
21879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21880 $as_echo "$ZIPEXE" >&6; }
21881 else
21882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21883 $as_echo "no" >&6; }
21884 fi
21885 
21886 
21887   test -n "$ZIPEXE" && break
21888 done
21889 
21890     else
21891       # If it succeeded, then it was overridden by the user. We will use it
21892       # for the tool.
21893 
21894       # First remove it from the list of overridden variables, so we can test
21895       # for unknown variables in the end.
21896       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21897 
21898       # Check if we try to supply an empty value
21899       if test "x$ZIPEXE" = x; then
21900         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21901 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21902         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21903 $as_echo_n "checking for ZIPEXE... " >&6; }
21904         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21905 $as_echo "disabled" >&6; }
21906       else
21907         # Check if the provided tool contains a complete path.
21908         tool_specified="$ZIPEXE"
21909         tool_basename="${tool_specified##*/}"
21910         if test "x$tool_basename" = "x$tool_specified"; then
21911           # A command without a complete path is provided, search $PATH.
21912           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21913 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21914           # Extract the first word of "$tool_basename", so it can be a program name with args.
21915 set dummy $tool_basename; ac_word=$2
21916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21917 $as_echo_n "checking for $ac_word... " >&6; }
21918 if ${ac_cv_path_ZIPEXE+:} false; then :
21919   $as_echo_n "(cached) " >&6
21920 else
21921   case $ZIPEXE in
21922   [\\/]* | ?:[\\/]*)
21923   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21924   ;;
21925   *)
21926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21927 for as_dir in $PATH
21928 do
21929   IFS=$as_save_IFS
21930   test -z "$as_dir" && as_dir=.
21931     for ac_exec_ext in '' $ac_executable_extensions; do
21932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21933     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21935     break 2
21936   fi
21937 done
21938   done
21939 IFS=$as_save_IFS
21940 
21941   ;;
21942 esac
21943 fi
21944 ZIPEXE=$ac_cv_path_ZIPEXE
21945 if test -n "$ZIPEXE"; then
21946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21947 $as_echo "$ZIPEXE" >&6; }
21948 else
21949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21950 $as_echo "no" >&6; }
21951 fi
21952 
21953 
21954           if test "x$ZIPEXE" = x; then
21955             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21956           fi
21957         else
21958           # Otherwise we believe it is a complete path. Use it as it is.
21959           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21960 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21961           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21962 $as_echo_n "checking for ZIPEXE... " >&6; }
21963           if test ! -x "$tool_specified"; then
21964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21965 $as_echo "not found" >&6; }
21966             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21967           fi
21968           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21969 $as_echo "$tool_specified" >&6; }
21970         fi
21971       fi
21972     fi
21973 
21974   fi
21975 
21976 
21977 
21978   if test "x$ZIPEXE" = x; then
21979     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21980   fi
21981 
21982 
21983 
21984   # Non-required basic tools
21985 
21986 
21987 
21988   # Publish this variable in the help.
21989 
21990 
21991   if [ -z "${LDD+x}" ]; then
21992     # The variable is not set by user, try to locate tool using the code snippet
21993     for ac_prog in ldd
21994 do
21995   # Extract the first word of "$ac_prog", so it can be a program name with args.
21996 set dummy $ac_prog; ac_word=$2
21997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21998 $as_echo_n "checking for $ac_word... " >&6; }
21999 if ${ac_cv_path_LDD+:} false; then :
22000   $as_echo_n "(cached) " >&6
22001 else
22002   case $LDD in
22003   [\\/]* | ?:[\\/]*)
22004   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22005   ;;
22006   *)
22007   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22008 for as_dir in $PATH
22009 do
22010   IFS=$as_save_IFS
22011   test -z "$as_dir" && as_dir=.
22012     for ac_exec_ext in '' $ac_executable_extensions; do
22013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22014     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22016     break 2
22017   fi
22018 done
22019   done
22020 IFS=$as_save_IFS
22021 
22022   ;;
22023 esac
22024 fi
22025 LDD=$ac_cv_path_LDD
22026 if test -n "$LDD"; then
22027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22028 $as_echo "$LDD" >&6; }
22029 else
22030   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22031 $as_echo "no" >&6; }
22032 fi
22033 
22034 
22035   test -n "$LDD" && break
22036 done
22037 
22038   else
22039     # The variable is set, but is it from the command line or the environment?
22040 
22041     # Try to remove the string !LDD! from our list.
22042     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
22043     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22044       # If it failed, the variable was not from the command line. Ignore it,
22045       # but warn the user (except for BASH, which is always set by the calling BASH).
22046       if test "xLDD" != xBASH; then
22047         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
22048 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
22049       fi
22050       # Try to locate tool using the code snippet
22051       for ac_prog in ldd
22052 do
22053   # Extract the first word of "$ac_prog", so it can be a program name with args.
22054 set dummy $ac_prog; ac_word=$2
22055 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22056 $as_echo_n "checking for $ac_word... " >&6; }
22057 if ${ac_cv_path_LDD+:} false; then :
22058   $as_echo_n "(cached) " >&6
22059 else
22060   case $LDD in
22061   [\\/]* | ?:[\\/]*)
22062   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22063   ;;
22064   *)
22065   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22066 for as_dir in $PATH
22067 do
22068   IFS=$as_save_IFS
22069   test -z "$as_dir" && as_dir=.
22070     for ac_exec_ext in '' $ac_executable_extensions; do
22071   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22072     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22073     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22074     break 2
22075   fi
22076 done
22077   done
22078 IFS=$as_save_IFS
22079 
22080   ;;
22081 esac
22082 fi
22083 LDD=$ac_cv_path_LDD
22084 if test -n "$LDD"; then
22085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22086 $as_echo "$LDD" >&6; }
22087 else
22088   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22089 $as_echo "no" >&6; }
22090 fi
22091 
22092 
22093   test -n "$LDD" && break
22094 done
22095 
22096     else
22097       # If it succeeded, then it was overridden by the user. We will use it
22098       # for the tool.
22099 
22100       # First remove it from the list of overridden variables, so we can test
22101       # for unknown variables in the end.
22102       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22103 
22104       # Check if we try to supply an empty value
22105       if test "x$LDD" = x; then
22106         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22107 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22108         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22109 $as_echo_n "checking for LDD... " >&6; }
22110         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22111 $as_echo "disabled" >&6; }
22112       else
22113         # Check if the provided tool contains a complete path.
22114         tool_specified="$LDD"
22115         tool_basename="${tool_specified##*/}"
22116         if test "x$tool_basename" = "x$tool_specified"; then
22117           # A command without a complete path is provided, search $PATH.
22118           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22119 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22120           # Extract the first word of "$tool_basename", so it can be a program name with args.
22121 set dummy $tool_basename; ac_word=$2
22122 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22123 $as_echo_n "checking for $ac_word... " >&6; }
22124 if ${ac_cv_path_LDD+:} false; then :
22125   $as_echo_n "(cached) " >&6
22126 else
22127   case $LDD in
22128   [\\/]* | ?:[\\/]*)
22129   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22130   ;;
22131   *)
22132   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22133 for as_dir in $PATH
22134 do
22135   IFS=$as_save_IFS
22136   test -z "$as_dir" && as_dir=.
22137     for ac_exec_ext in '' $ac_executable_extensions; do
22138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22139     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22141     break 2
22142   fi
22143 done
22144   done
22145 IFS=$as_save_IFS
22146 
22147   ;;
22148 esac
22149 fi
22150 LDD=$ac_cv_path_LDD
22151 if test -n "$LDD"; then
22152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22153 $as_echo "$LDD" >&6; }
22154 else
22155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22156 $as_echo "no" >&6; }
22157 fi
22158 
22159 
22160           if test "x$LDD" = x; then
22161             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22162           fi
22163         else
22164           # Otherwise we believe it is a complete path. Use it as it is.
22165           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22166 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22167           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22168 $as_echo_n "checking for LDD... " >&6; }
22169           if test ! -x "$tool_specified"; then
22170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22171 $as_echo "not found" >&6; }
22172             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22173           fi
22174           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22175 $as_echo "$tool_specified" >&6; }
22176         fi
22177       fi
22178     fi
22179 
22180   fi
22181 
22182 
22183   if test "x$LDD" = "x"; then
22184     # List shared lib dependencies is used for
22185     # debug output and checking for forbidden dependencies.
22186     # We can build without it.
22187     LDD="true"
22188   fi
22189 
22190 
22191   # Publish this variable in the help.
22192 
22193 
22194   if [ -z "${READELF+x}" ]; then
22195     # The variable is not set by user, try to locate tool using the code snippet
22196     for ac_prog in greadelf readelf
22197 do
22198   # Extract the first word of "$ac_prog", so it can be a program name with args.
22199 set dummy $ac_prog; ac_word=$2
22200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22201 $as_echo_n "checking for $ac_word... " >&6; }
22202 if ${ac_cv_path_READELF+:} false; then :
22203   $as_echo_n "(cached) " >&6
22204 else
22205   case $READELF in
22206   [\\/]* | ?:[\\/]*)
22207   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22208   ;;
22209   *)
22210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22211 for as_dir in $PATH
22212 do
22213   IFS=$as_save_IFS
22214   test -z "$as_dir" && as_dir=.
22215     for ac_exec_ext in '' $ac_executable_extensions; do
22216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22217     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22219     break 2
22220   fi
22221 done
22222   done
22223 IFS=$as_save_IFS
22224 
22225   ;;
22226 esac
22227 fi
22228 READELF=$ac_cv_path_READELF
22229 if test -n "$READELF"; then
22230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22231 $as_echo "$READELF" >&6; }
22232 else
22233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22234 $as_echo "no" >&6; }
22235 fi
22236 
22237 
22238   test -n "$READELF" && break
22239 done
22240 
22241   else
22242     # The variable is set, but is it from the command line or the environment?
22243 
22244     # Try to remove the string !READELF! from our list.
22245     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22246     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22247       # If it failed, the variable was not from the command line. Ignore it,
22248       # but warn the user (except for BASH, which is always set by the calling BASH).
22249       if test "xREADELF" != xBASH; then
22250         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22251 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22252       fi
22253       # Try to locate tool using the code snippet
22254       for ac_prog in greadelf readelf
22255 do
22256   # Extract the first word of "$ac_prog", so it can be a program name with args.
22257 set dummy $ac_prog; ac_word=$2
22258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22259 $as_echo_n "checking for $ac_word... " >&6; }
22260 if ${ac_cv_path_READELF+:} false; then :
22261   $as_echo_n "(cached) " >&6
22262 else
22263   case $READELF in
22264   [\\/]* | ?:[\\/]*)
22265   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22266   ;;
22267   *)
22268   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22269 for as_dir in $PATH
22270 do
22271   IFS=$as_save_IFS
22272   test -z "$as_dir" && as_dir=.
22273     for ac_exec_ext in '' $ac_executable_extensions; do
22274   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22275     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22276     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22277     break 2
22278   fi
22279 done
22280   done
22281 IFS=$as_save_IFS
22282 
22283   ;;
22284 esac
22285 fi
22286 READELF=$ac_cv_path_READELF
22287 if test -n "$READELF"; then
22288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22289 $as_echo "$READELF" >&6; }
22290 else
22291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22292 $as_echo "no" >&6; }
22293 fi
22294 
22295 
22296   test -n "$READELF" && break
22297 done
22298 
22299     else
22300       # If it succeeded, then it was overridden by the user. We will use it
22301       # for the tool.
22302 
22303       # First remove it from the list of overridden variables, so we can test
22304       # for unknown variables in the end.
22305       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22306 
22307       # Check if we try to supply an empty value
22308       if test "x$READELF" = x; then
22309         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22310 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22312 $as_echo_n "checking for READELF... " >&6; }
22313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22314 $as_echo "disabled" >&6; }
22315       else
22316         # Check if the provided tool contains a complete path.
22317         tool_specified="$READELF"
22318         tool_basename="${tool_specified##*/}"
22319         if test "x$tool_basename" = "x$tool_specified"; then
22320           # A command without a complete path is provided, search $PATH.
22321           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22322 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22323           # Extract the first word of "$tool_basename", so it can be a program name with args.
22324 set dummy $tool_basename; ac_word=$2
22325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22326 $as_echo_n "checking for $ac_word... " >&6; }
22327 if ${ac_cv_path_READELF+:} false; then :
22328   $as_echo_n "(cached) " >&6
22329 else
22330   case $READELF in
22331   [\\/]* | ?:[\\/]*)
22332   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22333   ;;
22334   *)
22335   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22336 for as_dir in $PATH
22337 do
22338   IFS=$as_save_IFS
22339   test -z "$as_dir" && as_dir=.
22340     for ac_exec_ext in '' $ac_executable_extensions; do
22341   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22342     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22343     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22344     break 2
22345   fi
22346 done
22347   done
22348 IFS=$as_save_IFS
22349 
22350   ;;
22351 esac
22352 fi
22353 READELF=$ac_cv_path_READELF
22354 if test -n "$READELF"; then
22355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22356 $as_echo "$READELF" >&6; }
22357 else
22358   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22359 $as_echo "no" >&6; }
22360 fi
22361 
22362 
22363           if test "x$READELF" = x; then
22364             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22365           fi
22366         else
22367           # Otherwise we believe it is a complete path. Use it as it is.
22368           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22369 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22370           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22371 $as_echo_n "checking for READELF... " >&6; }
22372           if test ! -x "$tool_specified"; then
22373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22374 $as_echo "not found" >&6; }
22375             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22376           fi
22377           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22378 $as_echo "$tool_specified" >&6; }
22379         fi
22380       fi
22381     fi
22382 
22383   fi
22384 
22385 
22386 
22387 
22388   # Publish this variable in the help.
22389 
22390 
22391   if [ -z "${DOT+x}" ]; then
22392     # The variable is not set by user, try to locate tool using the code snippet
22393     for ac_prog in dot
22394 do
22395   # Extract the first word of "$ac_prog", so it can be a program name with args.
22396 set dummy $ac_prog; ac_word=$2
22397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22398 $as_echo_n "checking for $ac_word... " >&6; }
22399 if ${ac_cv_path_DOT+:} false; then :
22400   $as_echo_n "(cached) " >&6
22401 else
22402   case $DOT in
22403   [\\/]* | ?:[\\/]*)
22404   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22405   ;;
22406   *)
22407   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22408 for as_dir in $PATH
22409 do
22410   IFS=$as_save_IFS
22411   test -z "$as_dir" && as_dir=.
22412     for ac_exec_ext in '' $ac_executable_extensions; do
22413   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22414     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22415     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22416     break 2
22417   fi
22418 done
22419   done
22420 IFS=$as_save_IFS
22421 
22422   ;;
22423 esac
22424 fi
22425 DOT=$ac_cv_path_DOT
22426 if test -n "$DOT"; then
22427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22428 $as_echo "$DOT" >&6; }
22429 else
22430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22431 $as_echo "no" >&6; }
22432 fi
22433 
22434 
22435   test -n "$DOT" && break
22436 done
22437 
22438   else
22439     # The variable is set, but is it from the command line or the environment?
22440 
22441     # Try to remove the string !DOT! from our list.
22442     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22443     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22444       # If it failed, the variable was not from the command line. Ignore it,
22445       # but warn the user (except for BASH, which is always set by the calling BASH).
22446       if test "xDOT" != xBASH; then
22447         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22448 $as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22449       fi
22450       # Try to locate tool using the code snippet
22451       for ac_prog in dot
22452 do
22453   # Extract the first word of "$ac_prog", so it can be a program name with args.
22454 set dummy $ac_prog; ac_word=$2
22455 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22456 $as_echo_n "checking for $ac_word... " >&6; }
22457 if ${ac_cv_path_DOT+:} false; then :
22458   $as_echo_n "(cached) " >&6
22459 else
22460   case $DOT in
22461   [\\/]* | ?:[\\/]*)
22462   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22463   ;;
22464   *)
22465   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22466 for as_dir in $PATH
22467 do
22468   IFS=$as_save_IFS
22469   test -z "$as_dir" && as_dir=.
22470     for ac_exec_ext in '' $ac_executable_extensions; do
22471   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22472     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22473     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22474     break 2
22475   fi
22476 done
22477   done
22478 IFS=$as_save_IFS
22479 
22480   ;;
22481 esac
22482 fi
22483 DOT=$ac_cv_path_DOT
22484 if test -n "$DOT"; then
22485   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22486 $as_echo "$DOT" >&6; }
22487 else
22488   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22489 $as_echo "no" >&6; }
22490 fi
22491 
22492 
22493   test -n "$DOT" && break
22494 done
22495 
22496     else
22497       # If it succeeded, then it was overridden by the user. We will use it
22498       # for the tool.
22499 
22500       # First remove it from the list of overridden variables, so we can test
22501       # for unknown variables in the end.
22502       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22503 
22504       # Check if we try to supply an empty value
22505       if test "x$DOT" = x; then
22506         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22507 $as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22508         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22509 $as_echo_n "checking for DOT... " >&6; }
22510         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22511 $as_echo "disabled" >&6; }
22512       else
22513         # Check if the provided tool contains a complete path.
22514         tool_specified="$DOT"
22515         tool_basename="${tool_specified##*/}"
22516         if test "x$tool_basename" = "x$tool_specified"; then
22517           # A command without a complete path is provided, search $PATH.
22518           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22519 $as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22520           # Extract the first word of "$tool_basename", so it can be a program name with args.
22521 set dummy $tool_basename; ac_word=$2
22522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22523 $as_echo_n "checking for $ac_word... " >&6; }
22524 if ${ac_cv_path_DOT+:} false; then :
22525   $as_echo_n "(cached) " >&6
22526 else
22527   case $DOT in
22528   [\\/]* | ?:[\\/]*)
22529   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22530   ;;
22531   *)
22532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22533 for as_dir in $PATH
22534 do
22535   IFS=$as_save_IFS
22536   test -z "$as_dir" && as_dir=.
22537     for ac_exec_ext in '' $ac_executable_extensions; do
22538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22539     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22541     break 2
22542   fi
22543 done
22544   done
22545 IFS=$as_save_IFS
22546 
22547   ;;
22548 esac
22549 fi
22550 DOT=$ac_cv_path_DOT
22551 if test -n "$DOT"; then
22552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22553 $as_echo "$DOT" >&6; }
22554 else
22555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22556 $as_echo "no" >&6; }
22557 fi
22558 
22559 
22560           if test "x$DOT" = x; then
22561             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22562           fi
22563         else
22564           # Otherwise we believe it is a complete path. Use it as it is.
22565           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22566 $as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22567           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22568 $as_echo_n "checking for DOT... " >&6; }
22569           if test ! -x "$tool_specified"; then
22570             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22571 $as_echo "not found" >&6; }
22572             as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22573           fi
22574           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22575 $as_echo "$tool_specified" >&6; }
22576         fi
22577       fi
22578     fi
22579 
22580   fi
22581 
22582 
22583 
22584 
22585   # Publish this variable in the help.
22586 
22587 
22588   if [ -z "${HG+x}" ]; then
22589     # The variable is not set by user, try to locate tool using the code snippet
22590     for ac_prog in hg
22591 do
22592   # Extract the first word of "$ac_prog", so it can be a program name with args.
22593 set dummy $ac_prog; ac_word=$2
22594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22595 $as_echo_n "checking for $ac_word... " >&6; }
22596 if ${ac_cv_path_HG+:} false; then :
22597   $as_echo_n "(cached) " >&6
22598 else
22599   case $HG in
22600   [\\/]* | ?:[\\/]*)
22601   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22602   ;;
22603   *)
22604   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22605 for as_dir in $PATH
22606 do
22607   IFS=$as_save_IFS
22608   test -z "$as_dir" && as_dir=.
22609     for ac_exec_ext in '' $ac_executable_extensions; do
22610   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22611     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22612     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22613     break 2
22614   fi
22615 done
22616   done
22617 IFS=$as_save_IFS
22618 
22619   ;;
22620 esac
22621 fi
22622 HG=$ac_cv_path_HG
22623 if test -n "$HG"; then
22624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22625 $as_echo "$HG" >&6; }
22626 else
22627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22628 $as_echo "no" >&6; }
22629 fi
22630 
22631 
22632   test -n "$HG" && break
22633 done
22634 
22635   else
22636     # The variable is set, but is it from the command line or the environment?
22637 
22638     # Try to remove the string !HG! from our list.
22639     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22640     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22641       # If it failed, the variable was not from the command line. Ignore it,
22642       # but warn the user (except for BASH, which is always set by the calling BASH).
22643       if test "xHG" != xBASH; then
22644         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22645 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22646       fi
22647       # Try to locate tool using the code snippet
22648       for ac_prog in hg
22649 do
22650   # Extract the first word of "$ac_prog", so it can be a program name with args.
22651 set dummy $ac_prog; ac_word=$2
22652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22653 $as_echo_n "checking for $ac_word... " >&6; }
22654 if ${ac_cv_path_HG+:} false; then :
22655   $as_echo_n "(cached) " >&6
22656 else
22657   case $HG in
22658   [\\/]* | ?:[\\/]*)
22659   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22660   ;;
22661   *)
22662   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22663 for as_dir in $PATH
22664 do
22665   IFS=$as_save_IFS
22666   test -z "$as_dir" && as_dir=.
22667     for ac_exec_ext in '' $ac_executable_extensions; do
22668   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22669     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22670     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22671     break 2
22672   fi
22673 done
22674   done
22675 IFS=$as_save_IFS
22676 
22677   ;;
22678 esac
22679 fi
22680 HG=$ac_cv_path_HG
22681 if test -n "$HG"; then
22682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22683 $as_echo "$HG" >&6; }
22684 else
22685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22686 $as_echo "no" >&6; }
22687 fi
22688 
22689 
22690   test -n "$HG" && break
22691 done
22692 
22693     else
22694       # If it succeeded, then it was overridden by the user. We will use it
22695       # for the tool.
22696 
22697       # First remove it from the list of overridden variables, so we can test
22698       # for unknown variables in the end.
22699       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22700 
22701       # Check if we try to supply an empty value
22702       if test "x$HG" = x; then
22703         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22704 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22705         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22706 $as_echo_n "checking for HG... " >&6; }
22707         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22708 $as_echo "disabled" >&6; }
22709       else
22710         # Check if the provided tool contains a complete path.
22711         tool_specified="$HG"
22712         tool_basename="${tool_specified##*/}"
22713         if test "x$tool_basename" = "x$tool_specified"; then
22714           # A command without a complete path is provided, search $PATH.
22715           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22716 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22717           # Extract the first word of "$tool_basename", so it can be a program name with args.
22718 set dummy $tool_basename; ac_word=$2
22719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22720 $as_echo_n "checking for $ac_word... " >&6; }
22721 if ${ac_cv_path_HG+:} false; then :
22722   $as_echo_n "(cached) " >&6
22723 else
22724   case $HG in
22725   [\\/]* | ?:[\\/]*)
22726   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22727   ;;
22728   *)
22729   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22730 for as_dir in $PATH
22731 do
22732   IFS=$as_save_IFS
22733   test -z "$as_dir" && as_dir=.
22734     for ac_exec_ext in '' $ac_executable_extensions; do
22735   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22736     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22737     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22738     break 2
22739   fi
22740 done
22741   done
22742 IFS=$as_save_IFS
22743 
22744   ;;
22745 esac
22746 fi
22747 HG=$ac_cv_path_HG
22748 if test -n "$HG"; then
22749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22750 $as_echo "$HG" >&6; }
22751 else
22752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22753 $as_echo "no" >&6; }
22754 fi
22755 
22756 
22757           if test "x$HG" = x; then
22758             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22759           fi
22760         else
22761           # Otherwise we believe it is a complete path. Use it as it is.
22762           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22763 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22764           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22765 $as_echo_n "checking for HG... " >&6; }
22766           if test ! -x "$tool_specified"; then
22767             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22768 $as_echo "not found" >&6; }
22769             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22770           fi
22771           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22772 $as_echo "$tool_specified" >&6; }
22773         fi
22774       fi
22775     fi
22776 
22777   fi
22778 
22779 
22780 
22781 
22782   # Publish this variable in the help.
22783 
22784 
22785   if [ -z "${STAT+x}" ]; then
22786     # The variable is not set by user, try to locate tool using the code snippet
22787     for ac_prog in stat
22788 do
22789   # Extract the first word of "$ac_prog", so it can be a program name with args.
22790 set dummy $ac_prog; ac_word=$2
22791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22792 $as_echo_n "checking for $ac_word... " >&6; }
22793 if ${ac_cv_path_STAT+:} false; then :
22794   $as_echo_n "(cached) " >&6
22795 else
22796   case $STAT in
22797   [\\/]* | ?:[\\/]*)
22798   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22799   ;;
22800   *)
22801   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22802 for as_dir in $PATH
22803 do
22804   IFS=$as_save_IFS
22805   test -z "$as_dir" && as_dir=.
22806     for ac_exec_ext in '' $ac_executable_extensions; do
22807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22808     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22810     break 2
22811   fi
22812 done
22813   done
22814 IFS=$as_save_IFS
22815 
22816   ;;
22817 esac
22818 fi
22819 STAT=$ac_cv_path_STAT
22820 if test -n "$STAT"; then
22821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22822 $as_echo "$STAT" >&6; }
22823 else
22824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22825 $as_echo "no" >&6; }
22826 fi
22827 
22828 
22829   test -n "$STAT" && break
22830 done
22831 
22832   else
22833     # The variable is set, but is it from the command line or the environment?
22834 
22835     # Try to remove the string !STAT! from our list.
22836     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22837     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22838       # If it failed, the variable was not from the command line. Ignore it,
22839       # but warn the user (except for BASH, which is always set by the calling BASH).
22840       if test "xSTAT" != xBASH; then
22841         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22842 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22843       fi
22844       # Try to locate tool using the code snippet
22845       for ac_prog in stat
22846 do
22847   # Extract the first word of "$ac_prog", so it can be a program name with args.
22848 set dummy $ac_prog; ac_word=$2
22849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22850 $as_echo_n "checking for $ac_word... " >&6; }
22851 if ${ac_cv_path_STAT+:} false; then :
22852   $as_echo_n "(cached) " >&6
22853 else
22854   case $STAT in
22855   [\\/]* | ?:[\\/]*)
22856   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22857   ;;
22858   *)
22859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22860 for as_dir in $PATH
22861 do
22862   IFS=$as_save_IFS
22863   test -z "$as_dir" && as_dir=.
22864     for ac_exec_ext in '' $ac_executable_extensions; do
22865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22866     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22868     break 2
22869   fi
22870 done
22871   done
22872 IFS=$as_save_IFS
22873 
22874   ;;
22875 esac
22876 fi
22877 STAT=$ac_cv_path_STAT
22878 if test -n "$STAT"; then
22879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22880 $as_echo "$STAT" >&6; }
22881 else
22882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22883 $as_echo "no" >&6; }
22884 fi
22885 
22886 
22887   test -n "$STAT" && break
22888 done
22889 
22890     else
22891       # If it succeeded, then it was overridden by the user. We will use it
22892       # for the tool.
22893 
22894       # First remove it from the list of overridden variables, so we can test
22895       # for unknown variables in the end.
22896       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22897 
22898       # Check if we try to supply an empty value
22899       if test "x$STAT" = x; then
22900         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22901 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22902         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22903 $as_echo_n "checking for STAT... " >&6; }
22904         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22905 $as_echo "disabled" >&6; }
22906       else
22907         # Check if the provided tool contains a complete path.
22908         tool_specified="$STAT"
22909         tool_basename="${tool_specified##*/}"
22910         if test "x$tool_basename" = "x$tool_specified"; then
22911           # A command without a complete path is provided, search $PATH.
22912           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22913 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22914           # Extract the first word of "$tool_basename", so it can be a program name with args.
22915 set dummy $tool_basename; ac_word=$2
22916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22917 $as_echo_n "checking for $ac_word... " >&6; }
22918 if ${ac_cv_path_STAT+:} false; then :
22919   $as_echo_n "(cached) " >&6
22920 else
22921   case $STAT in
22922   [\\/]* | ?:[\\/]*)
22923   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22924   ;;
22925   *)
22926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22927 for as_dir in $PATH
22928 do
22929   IFS=$as_save_IFS
22930   test -z "$as_dir" && as_dir=.
22931     for ac_exec_ext in '' $ac_executable_extensions; do
22932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22933     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22935     break 2
22936   fi
22937 done
22938   done
22939 IFS=$as_save_IFS
22940 
22941   ;;
22942 esac
22943 fi
22944 STAT=$ac_cv_path_STAT
22945 if test -n "$STAT"; then
22946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22947 $as_echo "$STAT" >&6; }
22948 else
22949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22950 $as_echo "no" >&6; }
22951 fi
22952 
22953 
22954           if test "x$STAT" = x; then
22955             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22956           fi
22957         else
22958           # Otherwise we believe it is a complete path. Use it as it is.
22959           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22960 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22961           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22962 $as_echo_n "checking for STAT... " >&6; }
22963           if test ! -x "$tool_specified"; then
22964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22965 $as_echo "not found" >&6; }
22966             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22967           fi
22968           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22969 $as_echo "$tool_specified" >&6; }
22970         fi
22971       fi
22972     fi
22973 
22974   fi
22975 
22976 
22977 
22978 
22979   # Publish this variable in the help.
22980 
22981 
22982   if [ -z "${TIME+x}" ]; then
22983     # The variable is not set by user, try to locate tool using the code snippet
22984     for ac_prog in time
22985 do
22986   # Extract the first word of "$ac_prog", so it can be a program name with args.
22987 set dummy $ac_prog; ac_word=$2
22988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22989 $as_echo_n "checking for $ac_word... " >&6; }
22990 if ${ac_cv_path_TIME+:} false; then :
22991   $as_echo_n "(cached) " >&6
22992 else
22993   case $TIME in
22994   [\\/]* | ?:[\\/]*)
22995   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22996   ;;
22997   *)
22998   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22999 for as_dir in $PATH
23000 do
23001   IFS=$as_save_IFS
23002   test -z "$as_dir" && as_dir=.
23003     for ac_exec_ext in '' $ac_executable_extensions; do
23004   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23005     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23006     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23007     break 2
23008   fi
23009 done
23010   done
23011 IFS=$as_save_IFS
23012 
23013   ;;
23014 esac
23015 fi
23016 TIME=$ac_cv_path_TIME
23017 if test -n "$TIME"; then
23018   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23019 $as_echo "$TIME" >&6; }
23020 else
23021   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23022 $as_echo "no" >&6; }
23023 fi
23024 
23025 
23026   test -n "$TIME" && break
23027 done
23028 
23029   else
23030     # The variable is set, but is it from the command line or the environment?
23031 
23032     # Try to remove the string !TIME! from our list.
23033     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23034     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23035       # If it failed, the variable was not from the command line. Ignore it,
23036       # but warn the user (except for BASH, which is always set by the calling BASH).
23037       if test "xTIME" != xBASH; then
23038         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23039 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23040       fi
23041       # Try to locate tool using the code snippet
23042       for ac_prog in time
23043 do
23044   # Extract the first word of "$ac_prog", so it can be a program name with args.
23045 set dummy $ac_prog; ac_word=$2
23046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23047 $as_echo_n "checking for $ac_word... " >&6; }
23048 if ${ac_cv_path_TIME+:} false; then :
23049   $as_echo_n "(cached) " >&6
23050 else
23051   case $TIME in
23052   [\\/]* | ?:[\\/]*)
23053   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23054   ;;
23055   *)
23056   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23057 for as_dir in $PATH
23058 do
23059   IFS=$as_save_IFS
23060   test -z "$as_dir" && as_dir=.
23061     for ac_exec_ext in '' $ac_executable_extensions; do
23062   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23063     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23064     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23065     break 2
23066   fi
23067 done
23068   done
23069 IFS=$as_save_IFS
23070 
23071   ;;
23072 esac
23073 fi
23074 TIME=$ac_cv_path_TIME
23075 if test -n "$TIME"; then
23076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23077 $as_echo "$TIME" >&6; }
23078 else
23079   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23080 $as_echo "no" >&6; }
23081 fi
23082 
23083 
23084   test -n "$TIME" && break
23085 done
23086 
23087     else
23088       # If it succeeded, then it was overridden by the user. We will use it
23089       # for the tool.
23090 
23091       # First remove it from the list of overridden variables, so we can test
23092       # for unknown variables in the end.
23093       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23094 
23095       # Check if we try to supply an empty value
23096       if test "x$TIME" = x; then
23097         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23098 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23099         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23100 $as_echo_n "checking for TIME... " >&6; }
23101         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23102 $as_echo "disabled" >&6; }
23103       else
23104         # Check if the provided tool contains a complete path.
23105         tool_specified="$TIME"
23106         tool_basename="${tool_specified##*/}"
23107         if test "x$tool_basename" = "x$tool_specified"; then
23108           # A command without a complete path is provided, search $PATH.
23109           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23110 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23111           # Extract the first word of "$tool_basename", so it can be a program name with args.
23112 set dummy $tool_basename; ac_word=$2
23113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23114 $as_echo_n "checking for $ac_word... " >&6; }
23115 if ${ac_cv_path_TIME+:} false; then :
23116   $as_echo_n "(cached) " >&6
23117 else
23118   case $TIME in
23119   [\\/]* | ?:[\\/]*)
23120   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23121   ;;
23122   *)
23123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23124 for as_dir in $PATH
23125 do
23126   IFS=$as_save_IFS
23127   test -z "$as_dir" && as_dir=.
23128     for ac_exec_ext in '' $ac_executable_extensions; do
23129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23130     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23132     break 2
23133   fi
23134 done
23135   done
23136 IFS=$as_save_IFS
23137 
23138   ;;
23139 esac
23140 fi
23141 TIME=$ac_cv_path_TIME
23142 if test -n "$TIME"; then
23143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23144 $as_echo "$TIME" >&6; }
23145 else
23146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23147 $as_echo "no" >&6; }
23148 fi
23149 
23150 
23151           if test "x$TIME" = x; then
23152             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23153           fi
23154         else
23155           # Otherwise we believe it is a complete path. Use it as it is.
23156           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23157 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23158           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23159 $as_echo_n "checking for TIME... " >&6; }
23160           if test ! -x "$tool_specified"; then
23161             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23162 $as_echo "not found" >&6; }
23163             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23164           fi
23165           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23166 $as_echo "$tool_specified" >&6; }
23167         fi
23168       fi
23169     fi
23170 
23171   fi
23172 
23173 
23174 
23175 
23176   # Publish this variable in the help.
23177 
23178 
23179   if [ -z "${FLOCK+x}" ]; then
23180     # The variable is not set by user, try to locate tool using the code snippet
23181     for ac_prog in flock
23182 do
23183   # Extract the first word of "$ac_prog", so it can be a program name with args.
23184 set dummy $ac_prog; ac_word=$2
23185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23186 $as_echo_n "checking for $ac_word... " >&6; }
23187 if ${ac_cv_path_FLOCK+:} false; then :
23188   $as_echo_n "(cached) " >&6
23189 else
23190   case $FLOCK in
23191   [\\/]* | ?:[\\/]*)
23192   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23193   ;;
23194   *)
23195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23196 for as_dir in $PATH
23197 do
23198   IFS=$as_save_IFS
23199   test -z "$as_dir" && as_dir=.
23200     for ac_exec_ext in '' $ac_executable_extensions; do
23201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23202     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23204     break 2
23205   fi
23206 done
23207   done
23208 IFS=$as_save_IFS
23209 
23210   ;;
23211 esac
23212 fi
23213 FLOCK=$ac_cv_path_FLOCK
23214 if test -n "$FLOCK"; then
23215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23216 $as_echo "$FLOCK" >&6; }
23217 else
23218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23219 $as_echo "no" >&6; }
23220 fi
23221 
23222 
23223   test -n "$FLOCK" && break
23224 done
23225 
23226   else
23227     # The variable is set, but is it from the command line or the environment?
23228 
23229     # Try to remove the string !FLOCK! from our list.
23230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23232       # If it failed, the variable was not from the command line. Ignore it,
23233       # but warn the user (except for BASH, which is always set by the calling BASH).
23234       if test "xFLOCK" != xBASH; then
23235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23236 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23237       fi
23238       # Try to locate tool using the code snippet
23239       for ac_prog in flock
23240 do
23241   # Extract the first word of "$ac_prog", so it can be a program name with args.
23242 set dummy $ac_prog; ac_word=$2
23243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23244 $as_echo_n "checking for $ac_word... " >&6; }
23245 if ${ac_cv_path_FLOCK+:} false; then :
23246   $as_echo_n "(cached) " >&6
23247 else
23248   case $FLOCK in
23249   [\\/]* | ?:[\\/]*)
23250   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23251   ;;
23252   *)
23253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23254 for as_dir in $PATH
23255 do
23256   IFS=$as_save_IFS
23257   test -z "$as_dir" && as_dir=.
23258     for ac_exec_ext in '' $ac_executable_extensions; do
23259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23260     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23262     break 2
23263   fi
23264 done
23265   done
23266 IFS=$as_save_IFS
23267 
23268   ;;
23269 esac
23270 fi
23271 FLOCK=$ac_cv_path_FLOCK
23272 if test -n "$FLOCK"; then
23273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23274 $as_echo "$FLOCK" >&6; }
23275 else
23276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23277 $as_echo "no" >&6; }
23278 fi
23279 
23280 
23281   test -n "$FLOCK" && break
23282 done
23283 
23284     else
23285       # If it succeeded, then it was overridden by the user. We will use it
23286       # for the tool.
23287 
23288       # First remove it from the list of overridden variables, so we can test
23289       # for unknown variables in the end.
23290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23291 
23292       # Check if we try to supply an empty value
23293       if test "x$FLOCK" = x; then
23294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23295 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23297 $as_echo_n "checking for FLOCK... " >&6; }
23298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23299 $as_echo "disabled" >&6; }
23300       else
23301         # Check if the provided tool contains a complete path.
23302         tool_specified="$FLOCK"
23303         tool_basename="${tool_specified##*/}"
23304         if test "x$tool_basename" = "x$tool_specified"; then
23305           # A command without a complete path is provided, search $PATH.
23306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23307 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23308           # Extract the first word of "$tool_basename", so it can be a program name with args.
23309 set dummy $tool_basename; ac_word=$2
23310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23311 $as_echo_n "checking for $ac_word... " >&6; }
23312 if ${ac_cv_path_FLOCK+:} false; then :
23313   $as_echo_n "(cached) " >&6
23314 else
23315   case $FLOCK in
23316   [\\/]* | ?:[\\/]*)
23317   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23318   ;;
23319   *)
23320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23321 for as_dir in $PATH
23322 do
23323   IFS=$as_save_IFS
23324   test -z "$as_dir" && as_dir=.
23325     for ac_exec_ext in '' $ac_executable_extensions; do
23326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23327     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23329     break 2
23330   fi
23331 done
23332   done
23333 IFS=$as_save_IFS
23334 
23335   ;;
23336 esac
23337 fi
23338 FLOCK=$ac_cv_path_FLOCK
23339 if test -n "$FLOCK"; then
23340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23341 $as_echo "$FLOCK" >&6; }
23342 else
23343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23344 $as_echo "no" >&6; }
23345 fi
23346 
23347 
23348           if test "x$FLOCK" = x; then
23349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23350           fi
23351         else
23352           # Otherwise we believe it is a complete path. Use it as it is.
23353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23354 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23356 $as_echo_n "checking for FLOCK... " >&6; }
23357           if test ! -x "$tool_specified"; then
23358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23359 $as_echo "not found" >&6; }
23360             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23361           fi
23362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23363 $as_echo "$tool_specified" >&6; }
23364         fi
23365       fi
23366     fi
23367 
23368   fi
23369 
23370 
23371   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23372   # be in the user path.
23373 
23374 
23375   # Publish this variable in the help.
23376 
23377 
23378   if [ -z "${DTRACE+x}" ]; then
23379     # The variable is not set by user, try to locate tool using the code snippet
23380     for ac_prog in dtrace
23381 do
23382   # Extract the first word of "$ac_prog", so it can be a program name with args.
23383 set dummy $ac_prog; ac_word=$2
23384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23385 $as_echo_n "checking for $ac_word... " >&6; }
23386 if ${ac_cv_path_DTRACE+:} false; then :
23387   $as_echo_n "(cached) " >&6
23388 else
23389   case $DTRACE in
23390   [\\/]* | ?:[\\/]*)
23391   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23392   ;;
23393   *)
23394   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23395 as_dummy="$PATH:/usr/sbin"
23396 for as_dir in $as_dummy
23397 do
23398   IFS=$as_save_IFS
23399   test -z "$as_dir" && as_dir=.
23400     for ac_exec_ext in '' $ac_executable_extensions; do
23401   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23402     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23403     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23404     break 2
23405   fi
23406 done
23407   done
23408 IFS=$as_save_IFS
23409 
23410   ;;
23411 esac
23412 fi
23413 DTRACE=$ac_cv_path_DTRACE
23414 if test -n "$DTRACE"; then
23415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23416 $as_echo "$DTRACE" >&6; }
23417 else
23418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23419 $as_echo "no" >&6; }
23420 fi
23421 
23422 
23423   test -n "$DTRACE" && break
23424 done
23425 
23426   else
23427     # The variable is set, but is it from the command line or the environment?
23428 
23429     # Try to remove the string !DTRACE! from our list.
23430     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23431     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23432       # If it failed, the variable was not from the command line. Ignore it,
23433       # but warn the user (except for BASH, which is always set by the calling BASH).
23434       if test "xDTRACE" != xBASH; then
23435         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23436 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23437       fi
23438       # Try to locate tool using the code snippet
23439       for ac_prog in dtrace
23440 do
23441   # Extract the first word of "$ac_prog", so it can be a program name with args.
23442 set dummy $ac_prog; ac_word=$2
23443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23444 $as_echo_n "checking for $ac_word... " >&6; }
23445 if ${ac_cv_path_DTRACE+:} false; then :
23446   $as_echo_n "(cached) " >&6
23447 else
23448   case $DTRACE in
23449   [\\/]* | ?:[\\/]*)
23450   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23451   ;;
23452   *)
23453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23454 as_dummy="$PATH:/usr/sbin"
23455 for as_dir in $as_dummy
23456 do
23457   IFS=$as_save_IFS
23458   test -z "$as_dir" && as_dir=.
23459     for ac_exec_ext in '' $ac_executable_extensions; do
23460   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23461     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23462     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23463     break 2
23464   fi
23465 done
23466   done
23467 IFS=$as_save_IFS
23468 
23469   ;;
23470 esac
23471 fi
23472 DTRACE=$ac_cv_path_DTRACE
23473 if test -n "$DTRACE"; then
23474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23475 $as_echo "$DTRACE" >&6; }
23476 else
23477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23478 $as_echo "no" >&6; }
23479 fi
23480 
23481 
23482   test -n "$DTRACE" && break
23483 done
23484 
23485     else
23486       # If it succeeded, then it was overridden by the user. We will use it
23487       # for the tool.
23488 
23489       # First remove it from the list of overridden variables, so we can test
23490       # for unknown variables in the end.
23491       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23492 
23493       # Check if we try to supply an empty value
23494       if test "x$DTRACE" = x; then
23495         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23496 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23497         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23498 $as_echo_n "checking for DTRACE... " >&6; }
23499         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23500 $as_echo "disabled" >&6; }
23501       else
23502         # Check if the provided tool contains a complete path.
23503         tool_specified="$DTRACE"
23504         tool_basename="${tool_specified##*/}"
23505         if test "x$tool_basename" = "x$tool_specified"; then
23506           # A command without a complete path is provided, search $PATH.
23507           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23508 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23509           # Extract the first word of "$tool_basename", so it can be a program name with args.
23510 set dummy $tool_basename; ac_word=$2
23511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23512 $as_echo_n "checking for $ac_word... " >&6; }
23513 if ${ac_cv_path_DTRACE+:} false; then :
23514   $as_echo_n "(cached) " >&6
23515 else
23516   case $DTRACE in
23517   [\\/]* | ?:[\\/]*)
23518   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23519   ;;
23520   *)
23521   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23522 for as_dir in $PATH
23523 do
23524   IFS=$as_save_IFS
23525   test -z "$as_dir" && as_dir=.
23526     for ac_exec_ext in '' $ac_executable_extensions; do
23527   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23528     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23529     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23530     break 2
23531   fi
23532 done
23533   done
23534 IFS=$as_save_IFS
23535 
23536   ;;
23537 esac
23538 fi
23539 DTRACE=$ac_cv_path_DTRACE
23540 if test -n "$DTRACE"; then
23541   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23542 $as_echo "$DTRACE" >&6; }
23543 else
23544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23545 $as_echo "no" >&6; }
23546 fi
23547 
23548 
23549           if test "x$DTRACE" = x; then
23550             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23551           fi
23552         else
23553           # Otherwise we believe it is a complete path. Use it as it is.
23554           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23555 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23556           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23557 $as_echo_n "checking for DTRACE... " >&6; }
23558           if test ! -x "$tool_specified"; then
23559             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23560 $as_echo "not found" >&6; }
23561             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23562           fi
23563           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23564 $as_echo "$tool_specified" >&6; }
23565         fi
23566       fi
23567     fi
23568 
23569   fi
23570 
23571 
23572 
23573 
23574   # Publish this variable in the help.
23575 
23576 
23577   if [ -z "${PATCH+x}" ]; then
23578     # The variable is not set by user, try to locate tool using the code snippet
23579     for ac_prog in gpatch patch
23580 do
23581   # Extract the first word of "$ac_prog", so it can be a program name with args.
23582 set dummy $ac_prog; ac_word=$2
23583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23584 $as_echo_n "checking for $ac_word... " >&6; }
23585 if ${ac_cv_path_PATCH+:} false; then :
23586   $as_echo_n "(cached) " >&6
23587 else
23588   case $PATCH in
23589   [\\/]* | ?:[\\/]*)
23590   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23591   ;;
23592   *)
23593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23594 for as_dir in $PATH
23595 do
23596   IFS=$as_save_IFS
23597   test -z "$as_dir" && as_dir=.
23598     for ac_exec_ext in '' $ac_executable_extensions; do
23599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23600     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23602     break 2
23603   fi
23604 done
23605   done
23606 IFS=$as_save_IFS
23607 
23608   ;;
23609 esac
23610 fi
23611 PATCH=$ac_cv_path_PATCH
23612 if test -n "$PATCH"; then
23613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23614 $as_echo "$PATCH" >&6; }
23615 else
23616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23617 $as_echo "no" >&6; }
23618 fi
23619 
23620 
23621   test -n "$PATCH" && break
23622 done
23623 
23624   else
23625     # The variable is set, but is it from the command line or the environment?
23626 
23627     # Try to remove the string !PATCH! from our list.
23628     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23629     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23630       # If it failed, the variable was not from the command line. Ignore it,
23631       # but warn the user (except for BASH, which is always set by the calling BASH).
23632       if test "xPATCH" != xBASH; then
23633         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23634 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23635       fi
23636       # Try to locate tool using the code snippet
23637       for ac_prog in gpatch patch
23638 do
23639   # Extract the first word of "$ac_prog", so it can be a program name with args.
23640 set dummy $ac_prog; ac_word=$2
23641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23642 $as_echo_n "checking for $ac_word... " >&6; }
23643 if ${ac_cv_path_PATCH+:} false; then :
23644   $as_echo_n "(cached) " >&6
23645 else
23646   case $PATCH in
23647   [\\/]* | ?:[\\/]*)
23648   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23649   ;;
23650   *)
23651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23652 for as_dir in $PATH
23653 do
23654   IFS=$as_save_IFS
23655   test -z "$as_dir" && as_dir=.
23656     for ac_exec_ext in '' $ac_executable_extensions; do
23657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23658     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23660     break 2
23661   fi
23662 done
23663   done
23664 IFS=$as_save_IFS
23665 
23666   ;;
23667 esac
23668 fi
23669 PATCH=$ac_cv_path_PATCH
23670 if test -n "$PATCH"; then
23671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23672 $as_echo "$PATCH" >&6; }
23673 else
23674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23675 $as_echo "no" >&6; }
23676 fi
23677 
23678 
23679   test -n "$PATCH" && break
23680 done
23681 
23682     else
23683       # If it succeeded, then it was overridden by the user. We will use it
23684       # for the tool.
23685 
23686       # First remove it from the list of overridden variables, so we can test
23687       # for unknown variables in the end.
23688       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23689 
23690       # Check if we try to supply an empty value
23691       if test "x$PATCH" = x; then
23692         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23693 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23694         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23695 $as_echo_n "checking for PATCH... " >&6; }
23696         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23697 $as_echo "disabled" >&6; }
23698       else
23699         # Check if the provided tool contains a complete path.
23700         tool_specified="$PATCH"
23701         tool_basename="${tool_specified##*/}"
23702         if test "x$tool_basename" = "x$tool_specified"; then
23703           # A command without a complete path is provided, search $PATH.
23704           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23705 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23706           # Extract the first word of "$tool_basename", so it can be a program name with args.
23707 set dummy $tool_basename; ac_word=$2
23708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23709 $as_echo_n "checking for $ac_word... " >&6; }
23710 if ${ac_cv_path_PATCH+:} false; then :
23711   $as_echo_n "(cached) " >&6
23712 else
23713   case $PATCH in
23714   [\\/]* | ?:[\\/]*)
23715   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23716   ;;
23717   *)
23718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23719 for as_dir in $PATH
23720 do
23721   IFS=$as_save_IFS
23722   test -z "$as_dir" && as_dir=.
23723     for ac_exec_ext in '' $ac_executable_extensions; do
23724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23725     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23727     break 2
23728   fi
23729 done
23730   done
23731 IFS=$as_save_IFS
23732 
23733   ;;
23734 esac
23735 fi
23736 PATCH=$ac_cv_path_PATCH
23737 if test -n "$PATCH"; then
23738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23739 $as_echo "$PATCH" >&6; }
23740 else
23741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23742 $as_echo "no" >&6; }
23743 fi
23744 
23745 
23746           if test "x$PATCH" = x; then
23747             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23748           fi
23749         else
23750           # Otherwise we believe it is a complete path. Use it as it is.
23751           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23752 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23753           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23754 $as_echo_n "checking for PATCH... " >&6; }
23755           if test ! -x "$tool_specified"; then
23756             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23757 $as_echo "not found" >&6; }
23758             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23759           fi
23760           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23761 $as_echo "$tool_specified" >&6; }
23762         fi
23763       fi
23764     fi
23765 
23766   fi
23767 
23768 
23769   # Check if it's GNU time
23770   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23771   if test "x$IS_GNU_TIME" != x; then
23772     IS_GNU_TIME=yes
23773   else
23774     IS_GNU_TIME=no
23775   fi
23776 
23777 
23778   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23779 
23780 
23781 
23782   # Publish this variable in the help.
23783 
23784 
23785   if [ -z "${DSYMUTIL+x}" ]; then
23786     # The variable is not set by user, try to locate tool using the code snippet
23787     for ac_prog in dsymutil
23788 do
23789   # Extract the first word of "$ac_prog", so it can be a program name with args.
23790 set dummy $ac_prog; ac_word=$2
23791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23792 $as_echo_n "checking for $ac_word... " >&6; }
23793 if ${ac_cv_path_DSYMUTIL+:} false; then :
23794   $as_echo_n "(cached) " >&6
23795 else
23796   case $DSYMUTIL in
23797   [\\/]* | ?:[\\/]*)
23798   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23799   ;;
23800   *)
23801   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23802 for as_dir in $PATH
23803 do
23804   IFS=$as_save_IFS
23805   test -z "$as_dir" && as_dir=.
23806     for ac_exec_ext in '' $ac_executable_extensions; do
23807   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23808     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23809     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23810     break 2
23811   fi
23812 done
23813   done
23814 IFS=$as_save_IFS
23815 
23816   ;;
23817 esac
23818 fi
23819 DSYMUTIL=$ac_cv_path_DSYMUTIL
23820 if test -n "$DSYMUTIL"; then
23821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23822 $as_echo "$DSYMUTIL" >&6; }
23823 else
23824   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23825 $as_echo "no" >&6; }
23826 fi
23827 
23828 
23829   test -n "$DSYMUTIL" && break
23830 done
23831 
23832   else
23833     # The variable is set, but is it from the command line or the environment?
23834 
23835     # Try to remove the string !DSYMUTIL! from our list.
23836     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23837     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23838       # If it failed, the variable was not from the command line. Ignore it,
23839       # but warn the user (except for BASH, which is always set by the calling BASH).
23840       if test "xDSYMUTIL" != xBASH; then
23841         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23842 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23843       fi
23844       # Try to locate tool using the code snippet
23845       for ac_prog in dsymutil
23846 do
23847   # Extract the first word of "$ac_prog", so it can be a program name with args.
23848 set dummy $ac_prog; ac_word=$2
23849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23850 $as_echo_n "checking for $ac_word... " >&6; }
23851 if ${ac_cv_path_DSYMUTIL+:} false; then :
23852   $as_echo_n "(cached) " >&6
23853 else
23854   case $DSYMUTIL in
23855   [\\/]* | ?:[\\/]*)
23856   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23857   ;;
23858   *)
23859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23860 for as_dir in $PATH
23861 do
23862   IFS=$as_save_IFS
23863   test -z "$as_dir" && as_dir=.
23864     for ac_exec_ext in '' $ac_executable_extensions; do
23865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23866     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23868     break 2
23869   fi
23870 done
23871   done
23872 IFS=$as_save_IFS
23873 
23874   ;;
23875 esac
23876 fi
23877 DSYMUTIL=$ac_cv_path_DSYMUTIL
23878 if test -n "$DSYMUTIL"; then
23879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23880 $as_echo "$DSYMUTIL" >&6; }
23881 else
23882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23883 $as_echo "no" >&6; }
23884 fi
23885 
23886 
23887   test -n "$DSYMUTIL" && break
23888 done
23889 
23890     else
23891       # If it succeeded, then it was overridden by the user. We will use it
23892       # for the tool.
23893 
23894       # First remove it from the list of overridden variables, so we can test
23895       # for unknown variables in the end.
23896       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23897 
23898       # Check if we try to supply an empty value
23899       if test "x$DSYMUTIL" = x; then
23900         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23901 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23902         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23903 $as_echo_n "checking for DSYMUTIL... " >&6; }
23904         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23905 $as_echo "disabled" >&6; }
23906       else
23907         # Check if the provided tool contains a complete path.
23908         tool_specified="$DSYMUTIL"
23909         tool_basename="${tool_specified##*/}"
23910         if test "x$tool_basename" = "x$tool_specified"; then
23911           # A command without a complete path is provided, search $PATH.
23912           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23913 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23914           # Extract the first word of "$tool_basename", so it can be a program name with args.
23915 set dummy $tool_basename; ac_word=$2
23916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23917 $as_echo_n "checking for $ac_word... " >&6; }
23918 if ${ac_cv_path_DSYMUTIL+:} false; then :
23919   $as_echo_n "(cached) " >&6
23920 else
23921   case $DSYMUTIL in
23922   [\\/]* | ?:[\\/]*)
23923   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23924   ;;
23925   *)
23926   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23927 for as_dir in $PATH
23928 do
23929   IFS=$as_save_IFS
23930   test -z "$as_dir" && as_dir=.
23931     for ac_exec_ext in '' $ac_executable_extensions; do
23932   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23933     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23934     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23935     break 2
23936   fi
23937 done
23938   done
23939 IFS=$as_save_IFS
23940 
23941   ;;
23942 esac
23943 fi
23944 DSYMUTIL=$ac_cv_path_DSYMUTIL
23945 if test -n "$DSYMUTIL"; then
23946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23947 $as_echo "$DSYMUTIL" >&6; }
23948 else
23949   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23950 $as_echo "no" >&6; }
23951 fi
23952 
23953 
23954           if test "x$DSYMUTIL" = x; then
23955             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23956           fi
23957         else
23958           # Otherwise we believe it is a complete path. Use it as it is.
23959           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23960 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23961           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23962 $as_echo_n "checking for DSYMUTIL... " >&6; }
23963           if test ! -x "$tool_specified"; then
23964             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23965 $as_echo "not found" >&6; }
23966             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23967           fi
23968           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23969 $as_echo "$tool_specified" >&6; }
23970         fi
23971       fi
23972     fi
23973 
23974   fi
23975 
23976 
23977 
23978   if test "x$DSYMUTIL" = x; then
23979     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23980   fi
23981 
23982 
23983 
23984 
23985 
23986   # Publish this variable in the help.
23987 
23988 
23989   if [ -z "${XATTR+x}" ]; then
23990     # The variable is not set by user, try to locate tool using the code snippet
23991     for ac_prog in xattr
23992 do
23993   # Extract the first word of "$ac_prog", so it can be a program name with args.
23994 set dummy $ac_prog; ac_word=$2
23995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23996 $as_echo_n "checking for $ac_word... " >&6; }
23997 if ${ac_cv_path_XATTR+:} false; then :
23998   $as_echo_n "(cached) " >&6
23999 else
24000   case $XATTR in
24001   [\\/]* | ?:[\\/]*)
24002   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24003   ;;
24004   *)
24005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24006 for as_dir in $PATH
24007 do
24008   IFS=$as_save_IFS
24009   test -z "$as_dir" && as_dir=.
24010     for ac_exec_ext in '' $ac_executable_extensions; do
24011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24012     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24014     break 2
24015   fi
24016 done
24017   done
24018 IFS=$as_save_IFS
24019 
24020   ;;
24021 esac
24022 fi
24023 XATTR=$ac_cv_path_XATTR
24024 if test -n "$XATTR"; then
24025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24026 $as_echo "$XATTR" >&6; }
24027 else
24028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24029 $as_echo "no" >&6; }
24030 fi
24031 
24032 
24033   test -n "$XATTR" && break
24034 done
24035 
24036   else
24037     # The variable is set, but is it from the command line or the environment?
24038 
24039     # Try to remove the string !XATTR! from our list.
24040     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24041     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24042       # If it failed, the variable was not from the command line. Ignore it,
24043       # but warn the user (except for BASH, which is always set by the calling BASH).
24044       if test "xXATTR" != xBASH; then
24045         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24046 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24047       fi
24048       # Try to locate tool using the code snippet
24049       for ac_prog in xattr
24050 do
24051   # Extract the first word of "$ac_prog", so it can be a program name with args.
24052 set dummy $ac_prog; ac_word=$2
24053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24054 $as_echo_n "checking for $ac_word... " >&6; }
24055 if ${ac_cv_path_XATTR+:} false; then :
24056   $as_echo_n "(cached) " >&6
24057 else
24058   case $XATTR in
24059   [\\/]* | ?:[\\/]*)
24060   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24061   ;;
24062   *)
24063   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24064 for as_dir in $PATH
24065 do
24066   IFS=$as_save_IFS
24067   test -z "$as_dir" && as_dir=.
24068     for ac_exec_ext in '' $ac_executable_extensions; do
24069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24070     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24072     break 2
24073   fi
24074 done
24075   done
24076 IFS=$as_save_IFS
24077 
24078   ;;
24079 esac
24080 fi
24081 XATTR=$ac_cv_path_XATTR
24082 if test -n "$XATTR"; then
24083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24084 $as_echo "$XATTR" >&6; }
24085 else
24086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24087 $as_echo "no" >&6; }
24088 fi
24089 
24090 
24091   test -n "$XATTR" && break
24092 done
24093 
24094     else
24095       # If it succeeded, then it was overridden by the user. We will use it
24096       # for the tool.
24097 
24098       # First remove it from the list of overridden variables, so we can test
24099       # for unknown variables in the end.
24100       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24101 
24102       # Check if we try to supply an empty value
24103       if test "x$XATTR" = x; then
24104         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24105 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24106         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24107 $as_echo_n "checking for XATTR... " >&6; }
24108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24109 $as_echo "disabled" >&6; }
24110       else
24111         # Check if the provided tool contains a complete path.
24112         tool_specified="$XATTR"
24113         tool_basename="${tool_specified##*/}"
24114         if test "x$tool_basename" = "x$tool_specified"; then
24115           # A command without a complete path is provided, search $PATH.
24116           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24117 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24118           # Extract the first word of "$tool_basename", so it can be a program name with args.
24119 set dummy $tool_basename; ac_word=$2
24120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24121 $as_echo_n "checking for $ac_word... " >&6; }
24122 if ${ac_cv_path_XATTR+:} false; then :
24123   $as_echo_n "(cached) " >&6
24124 else
24125   case $XATTR in
24126   [\\/]* | ?:[\\/]*)
24127   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24128   ;;
24129   *)
24130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24131 for as_dir in $PATH
24132 do
24133   IFS=$as_save_IFS
24134   test -z "$as_dir" && as_dir=.
24135     for ac_exec_ext in '' $ac_executable_extensions; do
24136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24137     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24139     break 2
24140   fi
24141 done
24142   done
24143 IFS=$as_save_IFS
24144 
24145   ;;
24146 esac
24147 fi
24148 XATTR=$ac_cv_path_XATTR
24149 if test -n "$XATTR"; then
24150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24151 $as_echo "$XATTR" >&6; }
24152 else
24153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24154 $as_echo "no" >&6; }
24155 fi
24156 
24157 
24158           if test "x$XATTR" = x; then
24159             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24160           fi
24161         else
24162           # Otherwise we believe it is a complete path. Use it as it is.
24163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24164 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24165           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24166 $as_echo_n "checking for XATTR... " >&6; }
24167           if test ! -x "$tool_specified"; then
24168             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24169 $as_echo "not found" >&6; }
24170             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24171           fi
24172           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24173 $as_echo "$tool_specified" >&6; }
24174         fi
24175       fi
24176     fi
24177 
24178   fi
24179 
24180 
24181 
24182   if test "x$XATTR" = x; then
24183     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24184   fi
24185 
24186 
24187 
24188 
24189   # Publish this variable in the help.
24190 
24191 
24192   if [ -z "${CODESIGN+x}" ]; then
24193     # The variable is not set by user, try to locate tool using the code snippet
24194     for ac_prog in codesign
24195 do
24196   # Extract the first word of "$ac_prog", so it can be a program name with args.
24197 set dummy $ac_prog; ac_word=$2
24198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24199 $as_echo_n "checking for $ac_word... " >&6; }
24200 if ${ac_cv_path_CODESIGN+:} false; then :
24201   $as_echo_n "(cached) " >&6
24202 else
24203   case $CODESIGN in
24204   [\\/]* | ?:[\\/]*)
24205   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24206   ;;
24207   *)
24208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24209 for as_dir in $PATH
24210 do
24211   IFS=$as_save_IFS
24212   test -z "$as_dir" && as_dir=.
24213     for ac_exec_ext in '' $ac_executable_extensions; do
24214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24215     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24217     break 2
24218   fi
24219 done
24220   done
24221 IFS=$as_save_IFS
24222 
24223   ;;
24224 esac
24225 fi
24226 CODESIGN=$ac_cv_path_CODESIGN
24227 if test -n "$CODESIGN"; then
24228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24229 $as_echo "$CODESIGN" >&6; }
24230 else
24231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24232 $as_echo "no" >&6; }
24233 fi
24234 
24235 
24236   test -n "$CODESIGN" && break
24237 done
24238 
24239   else
24240     # The variable is set, but is it from the command line or the environment?
24241 
24242     # Try to remove the string !CODESIGN! from our list.
24243     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24244     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24245       # If it failed, the variable was not from the command line. Ignore it,
24246       # but warn the user (except for BASH, which is always set by the calling BASH).
24247       if test "xCODESIGN" != xBASH; then
24248         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24249 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24250       fi
24251       # Try to locate tool using the code snippet
24252       for ac_prog in codesign
24253 do
24254   # Extract the first word of "$ac_prog", so it can be a program name with args.
24255 set dummy $ac_prog; ac_word=$2
24256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24257 $as_echo_n "checking for $ac_word... " >&6; }
24258 if ${ac_cv_path_CODESIGN+:} false; then :
24259   $as_echo_n "(cached) " >&6
24260 else
24261   case $CODESIGN in
24262   [\\/]* | ?:[\\/]*)
24263   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24264   ;;
24265   *)
24266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24267 for as_dir in $PATH
24268 do
24269   IFS=$as_save_IFS
24270   test -z "$as_dir" && as_dir=.
24271     for ac_exec_ext in '' $ac_executable_extensions; do
24272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24273     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24275     break 2
24276   fi
24277 done
24278   done
24279 IFS=$as_save_IFS
24280 
24281   ;;
24282 esac
24283 fi
24284 CODESIGN=$ac_cv_path_CODESIGN
24285 if test -n "$CODESIGN"; then
24286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24287 $as_echo "$CODESIGN" >&6; }
24288 else
24289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24290 $as_echo "no" >&6; }
24291 fi
24292 
24293 
24294   test -n "$CODESIGN" && break
24295 done
24296 
24297     else
24298       # If it succeeded, then it was overridden by the user. We will use it
24299       # for the tool.
24300 
24301       # First remove it from the list of overridden variables, so we can test
24302       # for unknown variables in the end.
24303       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24304 
24305       # Check if we try to supply an empty value
24306       if test "x$CODESIGN" = x; then
24307         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24308 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24310 $as_echo_n "checking for CODESIGN... " >&6; }
24311         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24312 $as_echo "disabled" >&6; }
24313       else
24314         # Check if the provided tool contains a complete path.
24315         tool_specified="$CODESIGN"
24316         tool_basename="${tool_specified##*/}"
24317         if test "x$tool_basename" = "x$tool_specified"; then
24318           # A command without a complete path is provided, search $PATH.
24319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24320 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24321           # Extract the first word of "$tool_basename", so it can be a program name with args.
24322 set dummy $tool_basename; ac_word=$2
24323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24324 $as_echo_n "checking for $ac_word... " >&6; }
24325 if ${ac_cv_path_CODESIGN+:} false; then :
24326   $as_echo_n "(cached) " >&6
24327 else
24328   case $CODESIGN in
24329   [\\/]* | ?:[\\/]*)
24330   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24331   ;;
24332   *)
24333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24334 for as_dir in $PATH
24335 do
24336   IFS=$as_save_IFS
24337   test -z "$as_dir" && as_dir=.
24338     for ac_exec_ext in '' $ac_executable_extensions; do
24339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24340     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24342     break 2
24343   fi
24344 done
24345   done
24346 IFS=$as_save_IFS
24347 
24348   ;;
24349 esac
24350 fi
24351 CODESIGN=$ac_cv_path_CODESIGN
24352 if test -n "$CODESIGN"; then
24353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24354 $as_echo "$CODESIGN" >&6; }
24355 else
24356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24357 $as_echo "no" >&6; }
24358 fi
24359 
24360 
24361           if test "x$CODESIGN" = x; then
24362             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24363           fi
24364         else
24365           # Otherwise we believe it is a complete path. Use it as it is.
24366           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24367 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24368           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24369 $as_echo_n "checking for CODESIGN... " >&6; }
24370           if test ! -x "$tool_specified"; then
24371             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24372 $as_echo "not found" >&6; }
24373             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24374           fi
24375           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24376 $as_echo "$tool_specified" >&6; }
24377         fi
24378       fi
24379     fi
24380 
24381   fi
24382 
24383 
24384     if test "x$CODESIGN" != "x"; then
24385       # Verify that the openjdk_codesign certificate is present
24386       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24387 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24388       $RM codesign-testfile
24389       $TOUCH codesign-testfile
24390       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24391       $RM codesign-testfile
24392       if test "x$CODESIGN" = x; then
24393         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24394 $as_echo "no" >&6; }
24395       else
24396         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24397 $as_echo "yes" >&6; }
24398       fi
24399     fi
24400 
24401 
24402 
24403   # Publish this variable in the help.
24404 
24405 
24406   if [ -z "${SETFILE+x}" ]; then
24407     # The variable is not set by user, try to locate tool using the code snippet
24408     for ac_prog in SetFile
24409 do
24410   # Extract the first word of "$ac_prog", so it can be a program name with args.
24411 set dummy $ac_prog; ac_word=$2
24412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24413 $as_echo_n "checking for $ac_word... " >&6; }
24414 if ${ac_cv_path_SETFILE+:} false; then :
24415   $as_echo_n "(cached) " >&6
24416 else
24417   case $SETFILE in
24418   [\\/]* | ?:[\\/]*)
24419   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24420   ;;
24421   *)
24422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24423 for as_dir in $PATH
24424 do
24425   IFS=$as_save_IFS
24426   test -z "$as_dir" && as_dir=.
24427     for ac_exec_ext in '' $ac_executable_extensions; do
24428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24429     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24431     break 2
24432   fi
24433 done
24434   done
24435 IFS=$as_save_IFS
24436 
24437   ;;
24438 esac
24439 fi
24440 SETFILE=$ac_cv_path_SETFILE
24441 if test -n "$SETFILE"; then
24442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24443 $as_echo "$SETFILE" >&6; }
24444 else
24445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24446 $as_echo "no" >&6; }
24447 fi
24448 
24449 
24450   test -n "$SETFILE" && break
24451 done
24452 
24453   else
24454     # The variable is set, but is it from the command line or the environment?
24455 
24456     # Try to remove the string !SETFILE! from our list.
24457     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24458     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24459       # If it failed, the variable was not from the command line. Ignore it,
24460       # but warn the user (except for BASH, which is always set by the calling BASH).
24461       if test "xSETFILE" != xBASH; then
24462         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24463 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24464       fi
24465       # Try to locate tool using the code snippet
24466       for ac_prog in SetFile
24467 do
24468   # Extract the first word of "$ac_prog", so it can be a program name with args.
24469 set dummy $ac_prog; ac_word=$2
24470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24471 $as_echo_n "checking for $ac_word... " >&6; }
24472 if ${ac_cv_path_SETFILE+:} false; then :
24473   $as_echo_n "(cached) " >&6
24474 else
24475   case $SETFILE in
24476   [\\/]* | ?:[\\/]*)
24477   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24478   ;;
24479   *)
24480   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24481 for as_dir in $PATH
24482 do
24483   IFS=$as_save_IFS
24484   test -z "$as_dir" && as_dir=.
24485     for ac_exec_ext in '' $ac_executable_extensions; do
24486   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24487     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24488     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24489     break 2
24490   fi
24491 done
24492   done
24493 IFS=$as_save_IFS
24494 
24495   ;;
24496 esac
24497 fi
24498 SETFILE=$ac_cv_path_SETFILE
24499 if test -n "$SETFILE"; then
24500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24501 $as_echo "$SETFILE" >&6; }
24502 else
24503   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24504 $as_echo "no" >&6; }
24505 fi
24506 
24507 
24508   test -n "$SETFILE" && break
24509 done
24510 
24511     else
24512       # If it succeeded, then it was overridden by the user. We will use it
24513       # for the tool.
24514 
24515       # First remove it from the list of overridden variables, so we can test
24516       # for unknown variables in the end.
24517       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24518 
24519       # Check if we try to supply an empty value
24520       if test "x$SETFILE" = x; then
24521         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24522 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24523         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24524 $as_echo_n "checking for SETFILE... " >&6; }
24525         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24526 $as_echo "disabled" >&6; }
24527       else
24528         # Check if the provided tool contains a complete path.
24529         tool_specified="$SETFILE"
24530         tool_basename="${tool_specified##*/}"
24531         if test "x$tool_basename" = "x$tool_specified"; then
24532           # A command without a complete path is provided, search $PATH.
24533           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24534 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24535           # Extract the first word of "$tool_basename", so it can be a program name with args.
24536 set dummy $tool_basename; ac_word=$2
24537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24538 $as_echo_n "checking for $ac_word... " >&6; }
24539 if ${ac_cv_path_SETFILE+:} false; then :
24540   $as_echo_n "(cached) " >&6
24541 else
24542   case $SETFILE in
24543   [\\/]* | ?:[\\/]*)
24544   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24545   ;;
24546   *)
24547   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24548 for as_dir in $PATH
24549 do
24550   IFS=$as_save_IFS
24551   test -z "$as_dir" && as_dir=.
24552     for ac_exec_ext in '' $ac_executable_extensions; do
24553   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24554     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24555     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24556     break 2
24557   fi
24558 done
24559   done
24560 IFS=$as_save_IFS
24561 
24562   ;;
24563 esac
24564 fi
24565 SETFILE=$ac_cv_path_SETFILE
24566 if test -n "$SETFILE"; then
24567   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24568 $as_echo "$SETFILE" >&6; }
24569 else
24570   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24571 $as_echo "no" >&6; }
24572 fi
24573 
24574 
24575           if test "x$SETFILE" = x; then
24576             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24577           fi
24578         else
24579           # Otherwise we believe it is a complete path. Use it as it is.
24580           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24581 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24582           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24583 $as_echo_n "checking for SETFILE... " >&6; }
24584           if test ! -x "$tool_specified"; then
24585             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24586 $as_echo "not found" >&6; }
24587             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24588           fi
24589           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24590 $as_echo "$tool_specified" >&6; }
24591         fi
24592       fi
24593     fi
24594 
24595   fi
24596 
24597 
24598 
24599   if test "x$SETFILE" = x; then
24600     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24601   fi
24602 
24603 
24604   fi
24605 
24606 
24607   # Check bash version
24608   # Extra [ ] to stop m4 mangling
24609    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24610   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24611 $as_echo_n "checking bash version... " >&6; }
24612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24613 $as_echo "$BASH_VER" >&6; }
24614 
24615   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24616   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24617   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24618     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24619   fi
24620 
24621   # Test if bash supports pipefail.
24622   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24623 $as_echo_n "checking if bash supports pipefail... " >&6; }
24624   if ${BASH} -c 'set -o pipefail'; then
24625     BASH_ARGS="$BASH_ARGS -o pipefail"
24626     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24627 $as_echo "yes" >&6; }
24628   else
24629     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24630 $as_echo "no" >&6; }
24631   fi
24632 
24633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24634 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24635   if ${BASH} -e -c 'true'; then
24636     BASH_ARGS="$BASH_ARGS -e"
24637     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24638 $as_echo "yes" >&6; }
24639   else
24640     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24641 $as_echo "no" >&6; }
24642   fi
24643 
24644 
24645 
24646 
24647 # Check if pkg-config is available.
24648 
24649 
24650 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24651         if test -n "$ac_tool_prefix"; then
24652   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24653 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24655 $as_echo_n "checking for $ac_word... " >&6; }
24656 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24657   $as_echo_n "(cached) " >&6
24658 else
24659   case $PKG_CONFIG in
24660   [\\/]* | ?:[\\/]*)
24661   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24662   ;;
24663   *)
24664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24665 for as_dir in $PATH
24666 do
24667   IFS=$as_save_IFS
24668   test -z "$as_dir" && as_dir=.
24669     for ac_exec_ext in '' $ac_executable_extensions; do
24670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24671     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24673     break 2
24674   fi
24675 done
24676   done
24677 IFS=$as_save_IFS
24678 
24679   ;;
24680 esac
24681 fi
24682 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24683 if test -n "$PKG_CONFIG"; then
24684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24685 $as_echo "$PKG_CONFIG" >&6; }
24686 else
24687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24688 $as_echo "no" >&6; }
24689 fi
24690 
24691 
24692 fi
24693 if test -z "$ac_cv_path_PKG_CONFIG"; then
24694   ac_pt_PKG_CONFIG=$PKG_CONFIG
24695   # Extract the first word of "pkg-config", so it can be a program name with args.
24696 set dummy pkg-config; ac_word=$2
24697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24698 $as_echo_n "checking for $ac_word... " >&6; }
24699 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24700   $as_echo_n "(cached) " >&6
24701 else
24702   case $ac_pt_PKG_CONFIG in
24703   [\\/]* | ?:[\\/]*)
24704   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24705   ;;
24706   *)
24707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24708 for as_dir in $PATH
24709 do
24710   IFS=$as_save_IFS
24711   test -z "$as_dir" && as_dir=.
24712     for ac_exec_ext in '' $ac_executable_extensions; do
24713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24714     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24716     break 2
24717   fi
24718 done
24719   done
24720 IFS=$as_save_IFS
24721 
24722   ;;
24723 esac
24724 fi
24725 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24726 if test -n "$ac_pt_PKG_CONFIG"; then
24727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24728 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24729 else
24730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24731 $as_echo "no" >&6; }
24732 fi
24733 
24734   if test "x$ac_pt_PKG_CONFIG" = x; then
24735     PKG_CONFIG=""
24736   else
24737     case $cross_compiling:$ac_tool_warned in
24738 yes:)
24739 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24740 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24741 ac_tool_warned=yes ;;
24742 esac
24743     PKG_CONFIG=$ac_pt_PKG_CONFIG
24744   fi
24745 else
24746   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24747 fi
24748 
24749 fi
24750 if test -n "$PKG_CONFIG"; then
24751         _pkg_min_version=0.9.0
24752         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24753 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24754         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24755                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24756 $as_echo "yes" >&6; }
24757         else
24758                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24759 $as_echo "no" >&6; }
24760                 PKG_CONFIG=""
24761         fi
24762 
24763 fi
24764 
24765 # After basic tools have been setup, we can check build os specific details.
24766 
24767   ###############################################################################
24768 
24769   # Note that this is the build platform OS version!
24770 
24771   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24772   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24773   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24774   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24775 
24776 
24777 
24778 
24779 
24780 # Misc basic settings
24781 
24782 
24783 # Check whether --with-default-make-target was given.
24784 if test "${with_default_make_target+set}" = set; then :
24785   withval=$with_default_make_target;
24786 fi
24787 
24788   if test "x$with_default_make_target" = "x" \
24789       || test "x$with_default_make_target" = "xyes"; then
24790     DEFAULT_MAKE_TARGET="exploded-image"
24791   elif test "x$with_default_make_target" = "xno"; then
24792     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24793   else
24794     DEFAULT_MAKE_TARGET="$with_default_make_target"
24795   fi
24796 
24797 
24798 
24799 
24800 ###############################################################################
24801 #
24802 # Determine OpenJDK variants, options and version numbers.
24803 #
24804 ###############################################################################
24805 
24806 # We need build & target for this.
24807 
24808   # Should we build a JDK without a graphical UI?
24809   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24810 $as_echo_n "checking headless only... " >&6; }
24811   # Check whether --enable-headless-only was given.
24812 if test "${enable_headless_only+set}" = set; then :
24813   enableval=$enable_headless_only;
24814 fi
24815 
24816 
24817   if test "x$enable_headless_only" = "xyes"; then
24818     ENABLE_HEADLESS_ONLY="true"
24819     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24820 $as_echo "yes" >&6; }
24821   elif test "x$enable_headless_only" = "xno"; then
24822     ENABLE_HEADLESS_ONLY="false"
24823     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24824 $as_echo "no" >&6; }
24825   elif test "x$enable_headless_only" = "x"; then
24826     ENABLE_HEADLESS_ONLY="false"
24827     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24828 $as_echo "no" >&6; }
24829   else
24830     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24831   fi
24832 
24833 
24834 
24835   # Should we build the complete docs, or just a lightweight version?
24836   # Check whether --enable-full-docs was given.
24837 if test "${enable_full_docs+set}" = set; then :
24838   enableval=$enable_full_docs;
24839 fi
24840 
24841 
24842   # Verify dependencies
24843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24844 $as_echo_n "checking for graphviz dot... " >&6; }
24845   if test "x$DOT" != "x"; then
24846     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24847 $as_echo "yes" >&6; }
24848   else
24849     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24850 $as_echo "no, cannot generate full docs" >&6; }
24851     FULL_DOCS_DEP_MISSING=true
24852   fi
24853 
24854   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24855 $as_echo_n "checking for pandoc... " >&6; }
24856   if test "x$PANDOC" != "x"; then
24857     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24858 $as_echo "yes" >&6; }
24859   else
24860     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24861 $as_echo "no, cannot generate full docs" >&6; }
24862     FULL_DOCS_DEP_MISSING=true
24863   fi
24864 
24865   { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24866 $as_echo_n "checking full docs... " >&6; }
24867   if test "x$enable_full_docs" = xyes; then
24868     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24869       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24870 $as_echo "no, missing dependencies" >&6; }
24871 
24872   # Print a helpful message on how to acquire the necessary build dependency.
24873   # dot is the help tag: freetype, cups, alsa etc
24874   MISSING_DEPENDENCY=dot
24875 
24876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24877     cygwin_help $MISSING_DEPENDENCY
24878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24879     msys_help $MISSING_DEPENDENCY
24880   else
24881     PKGHANDLER_COMMAND=
24882 
24883     case $PKGHANDLER in
24884       apt-get)
24885         apt_help     $MISSING_DEPENDENCY ;;
24886       yum)
24887         yum_help     $MISSING_DEPENDENCY ;;
24888       brew)
24889         brew_help    $MISSING_DEPENDENCY ;;
24890       port)
24891         port_help    $MISSING_DEPENDENCY ;;
24892       pkgutil)
24893         pkgutil_help $MISSING_DEPENDENCY ;;
24894       pkgadd)
24895         pkgadd_help  $MISSING_DEPENDENCY ;;
24896     esac
24897 
24898     if test "x$PKGHANDLER_COMMAND" != x; then
24899       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
24900     fi
24901   fi
24902 
24903       as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
24904     else
24905       ENABLE_FULL_DOCS=true
24906       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
24907 $as_echo "yes, forced" >&6; }
24908     fi
24909   elif test "x$enable_full_docs" = xno; then
24910     ENABLE_FULL_DOCS=false
24911     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
24912 $as_echo "no, forced" >&6; }
24913   elif test "x$enable_full_docs" = x; then
24914     # Check for prerequisites
24915     if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
24916       ENABLE_FULL_DOCS=false
24917       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24918 $as_echo "no, missing dependencies" >&6; }
24919     else
24920       ENABLE_FULL_DOCS=true
24921       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
24922 $as_echo "yes, dependencies present" >&6; }
24923     fi
24924   else
24925     as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
24926   fi
24927 
24928 
24929 
24930   # Choose cacerts source file
24931 
24932 # Check whether --with-cacerts-file was given.
24933 if test "${with_cacerts_file+set}" = set; then :
24934   withval=$with_cacerts_file;
24935 fi
24936 
24937   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cacerts file" >&5
24938 $as_echo_n "checking for cacerts file... " >&6; }
24939   if test "x$with_cacerts_file" == x; then
24940     { $as_echo "$as_me:${as_lineno-$LINENO}: result: default" >&5
24941 $as_echo "default" >&6; }
24942   else
24943     CACERTS_FILE=$with_cacerts_file
24944     if test ! -f "$CACERTS_FILE"; then
24945       { $as_echo "$as_me:${as_lineno-$LINENO}: result: fail" >&5
24946 $as_echo "fail" >&6; }
24947       as_fn_error $? "Specified cacerts file \"$CACERTS_FILE\" does not exist" "$LINENO" 5
24948     fi
24949     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CACERTS_FILE" >&5
24950 $as_echo "$CACERTS_FILE" >&6; }
24951   fi
24952 
24953 
24954   # Enable or disable unlimited crypto
24955   # Check whether --enable-unlimited-crypto was given.
24956 if test "${enable_unlimited_crypto+set}" = set; then :
24957   enableval=$enable_unlimited_crypto;
24958 else
24959   enable_unlimited_crypto=yes
24960 fi
24961 
24962   if test "x$enable_unlimited_crypto" = "xyes"; then
24963     UNLIMITED_CRYPTO=true
24964   else
24965     UNLIMITED_CRYPTO=false
24966   fi
24967 
24968 
24969   # Should we build the serviceability agent (SA)?
24970   INCLUDE_SA=true
24971   if   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
24972     INCLUDE_SA=false
24973   fi
24974   if test "x$OPENJDK_TARGET_OS" = xaix ; then
24975     INCLUDE_SA=false
24976   fi
24977 
24978 
24979   # Compress jars
24980   COMPRESS_JARS=false
24981 
24982 
24983 
24984   # Setup default copyright year. Mostly overridden when building close to a new year.
24985 
24986 # Check whether --with-copyright-year was given.
24987 if test "${with_copyright_year+set}" = set; then :
24988   withval=$with_copyright_year;
24989 fi
24990 
24991   if test "x$with_copyright_year" = xyes; then
24992     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24993   elif test "x$with_copyright_year" != x; then
24994     COPYRIGHT_YEAR="$with_copyright_year"
24995   else
24996     COPYRIGHT_YEAR=`$DATE +'%Y'`
24997   fi
24998 
24999 
25000 
25001   # Check whether --enable-keep-packaged-modules was given.
25002 if test "${enable_keep_packaged_modules+set}" = set; then :
25003   enableval=$enable_keep_packaged_modules;
25004 fi
25005 
25006 
25007   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25008 $as_echo_n "checking if packaged modules are kept... " >&6; }
25009   if test "x$enable_keep_packaged_modules" = "xyes"; then
25010     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25011 $as_echo "yes" >&6; }
25012     JLINK_KEEP_PACKAGED_MODULES=true
25013   elif test "x$enable_keep_packaged_modules" = "xno"; then
25014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25015 $as_echo "no" >&6; }
25016     JLINK_KEEP_PACKAGED_MODULES=false
25017   elif test "x$enable_keep_packaged_modules" = "x"; then
25018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25019 $as_echo "yes (default)" >&6; }
25020     JLINK_KEEP_PACKAGED_MODULES=true
25021   else
25022     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25023 $as_echo "error" >&6; }
25024     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25025   fi
25026 
25027 
25028 
25029 
25030   # Warn user that old version arguments are deprecated.
25031 
25032 
25033 # Check whether --with-milestone was given.
25034 if test "${with_milestone+set}" = set; then :
25035   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25036 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25037 fi
25038 
25039 
25040 
25041 
25042 # Check whether --with-update-version was given.
25043 if test "${with_update_version+set}" = set; then :
25044   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25045 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25046 fi
25047 
25048 
25049 
25050 
25051 # Check whether --with-user-release-suffix was given.
25052 if test "${with_user_release_suffix+set}" = set; then :
25053   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
25054 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25055 fi
25056 
25057 
25058 
25059 
25060 # Check whether --with-build-number was given.
25061 if test "${with_build_number+set}" = set; then :
25062   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25063 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25064 fi
25065 
25066 
25067 
25068 
25069 # Check whether --with-version-major was given.
25070 if test "${with_version_major+set}" = set; then :
25071   withval=$with_version_major; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-major is deprecated and will be ignored." >&5
25072 $as_echo "$as_me: WARNING: Option --with-version-major is deprecated and will be ignored." >&2;}
25073 fi
25074 
25075 
25076 
25077 
25078 # Check whether --with-version-minor was given.
25079 if test "${with_version_minor+set}" = set; then :
25080   withval=$with_version_minor; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-minor is deprecated and will be ignored." >&5
25081 $as_echo "$as_me: WARNING: Option --with-version-minor is deprecated and will be ignored." >&2;}
25082 fi
25083 
25084 
25085 
25086 
25087 # Check whether --with-version-security was given.
25088 if test "${with_version_security+set}" = set; then :
25089   withval=$with_version_security; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-version-security is deprecated and will be ignored." >&5
25090 $as_echo "$as_me: WARNING: Option --with-version-security is deprecated and will be ignored." >&2;}
25091 fi
25092 
25093 
25094 
25095   # Source the version numbers file
25096   . $AUTOCONF_DIR/version-numbers
25097 
25098   # Some non-version number information is set in that file
25099 
25100 
25101 
25102 
25103 
25104 
25105 
25106 
25107   # The vendor name, if any
25108 
25109 # Check whether --with-vendor-name was given.
25110 if test "${with_vendor_name+set}" = set; then :
25111   withval=$with_vendor_name;
25112 fi
25113 
25114   if test "x$with_vendor_name" = xyes; then
25115     as_fn_error $? "--with-vendor-name must have a value" "$LINENO" 5
25116   elif  ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ; then
25117     as_fn_error $? "--with-vendor-name contains non-printing characters: $with_vendor_name" "$LINENO" 5
25118   elif test "x$with_vendor_name" != x; then
25119     # Only set COMPANY_NAME if '--with-vendor-name' was used and is not empty.
25120     # Otherwise we will use the value from "version-numbers" included above.
25121     COMPANY_NAME="$with_vendor_name"
25122   fi
25123 
25124 
25125   # The vendor URL, if any
25126 
25127 # Check whether --with-vendor-url was given.
25128 if test "${with_vendor_url+set}" = set; then :
25129   withval=$with_vendor_url;
25130 fi
25131 
25132   if test "x$with_vendor_url" = xyes; then
25133     as_fn_error $? "--with-vendor-url must have a value" "$LINENO" 5
25134   elif  ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ; then
25135     as_fn_error $? "--with-vendor-url contains non-printing characters: $with_vendor_url" "$LINENO" 5
25136   else
25137     VENDOR_URL="$with_vendor_url"
25138   fi
25139 
25140 
25141   # The vendor bug URL, if any
25142 
25143 # Check whether --with-vendor-bug-url was given.
25144 if test "${with_vendor_bug_url+set}" = set; then :
25145   withval=$with_vendor_bug_url;
25146 fi
25147 
25148   if test "x$with_vendor_bug_url" = xyes; then
25149     as_fn_error $? "--with-vendor-bug-url must have a value" "$LINENO" 5
25150   elif  ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ; then
25151     as_fn_error $? "--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url" "$LINENO" 5
25152   else
25153     VENDOR_URL_BUG="$with_vendor_bug_url"
25154   fi
25155 
25156 
25157   # The vendor VM bug URL, if any
25158 
25159 # Check whether --with-vendor-vm-bug-url was given.
25160 if test "${with_vendor_vm_bug_url+set}" = set; then :
25161   withval=$with_vendor_vm_bug_url;
25162 fi
25163 
25164   if test "x$with_vendor_vm_bug_url" = xyes; then
25165     as_fn_error $? "--with-vendor-vm-bug-url must have a value" "$LINENO" 5
25166   elif  ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ; then
25167     as_fn_error $? "--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url" "$LINENO" 5
25168   else
25169     VENDOR_URL_VM_BUG="$with_vendor_vm_bug_url"
25170   fi
25171 
25172 
25173   # Override version from arguments
25174 
25175   # If --with-version-string is set, process it first. It is possible to
25176   # override parts with more specific flags, since these are processed later.
25177 
25178 # Check whether --with-version-string was given.
25179 if test "${with_version_string+set}" = set; then :
25180   withval=$with_version_string;
25181 fi
25182 
25183   if test "x$with_version_string" = xyes; then
25184     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25185   elif test "x$with_version_string" != x; then
25186     # Additional [] needed to keep m4 from mangling shell constructs.
25187     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25188       VERSION_FEATURE=${BASH_REMATCH[1]}
25189       VERSION_INTERIM=${BASH_REMATCH[3]}
25190       VERSION_UPDATE=${BASH_REMATCH[5]}
25191       VERSION_PATCH=${BASH_REMATCH[7]}
25192       VERSION_PRE=${BASH_REMATCH[9]}
25193       version_plus_separator=${BASH_REMATCH[11]}
25194       VERSION_BUILD=${BASH_REMATCH[12]}
25195       VERSION_OPT=${BASH_REMATCH[14]}
25196       # Unspecified numerical fields are interpreted as 0.
25197       if test "x$VERSION_INTERIM" = x; then
25198         VERSION_INTERIM=0
25199       fi
25200       if test "x$VERSION_UPDATE" = x; then
25201         VERSION_UPDATE=0
25202       fi
25203       if test "x$VERSION_PATCH" = x; then
25204         VERSION_PATCH=0
25205       fi
25206       if test "x$version_plus_separator" != x \
25207           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25208         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25209       fi
25210       # Stop the version part process from setting default values.
25211       # We still allow them to explicitly override though.
25212       NO_DEFAULT_VERSION_PARTS=true
25213     else
25214       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25215     fi
25216   fi
25217 
25218 
25219 # Check whether --with-version-pre was given.
25220 if test "${with_version_pre+set}" = set; then :
25221   withval=$with_version_pre; with_version_pre_present=true
25222 else
25223   with_version_pre_present=false
25224 fi
25225 
25226 
25227   if test "x$with_version_pre_present" = xtrue; then
25228     if test "x$with_version_pre" = xyes; then
25229       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25230     elif test "x$with_version_pre" = xno; then
25231       # Interpret --without-* as empty string instead of the literal "no"
25232       VERSION_PRE=
25233     else
25234       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25235        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25236       if test "x$VERSION_PRE" != "x$with_version_pre"; then
25237         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25238 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25239       fi
25240     fi
25241   else
25242     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25243       # Default is to use "internal" as pre
25244       VERSION_PRE="internal"
25245     fi
25246   fi
25247 
25248 
25249 # Check whether --with-version-opt was given.
25250 if test "${with_version_opt+set}" = set; then :
25251   withval=$with_version_opt; with_version_opt_present=true
25252 else
25253   with_version_opt_present=false
25254 fi
25255 
25256 
25257   if test "x$with_version_opt_present" = xtrue; then
25258     if test "x$with_version_opt" = xyes; then
25259       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25260     elif test "x$with_version_opt" = xno; then
25261       # Interpret --without-* as empty string instead of the literal "no"
25262       VERSION_OPT=
25263     else
25264       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25265        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25266       if test "x$VERSION_OPT" != "x$with_version_opt"; then
25267         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25268 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25269       fi
25270     fi
25271   else
25272     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25273       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25274       # Outer [ ] to quote m4.
25275        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25276       VERSION_OPT="adhoc.$USERNAME.$basedirname"
25277     fi
25278   fi
25279 
25280 
25281 # Check whether --with-version-build was given.
25282 if test "${with_version_build+set}" = set; then :
25283   withval=$with_version_build; with_version_build_present=true
25284 else
25285   with_version_build_present=false
25286 fi
25287 
25288 
25289   if test "x$with_version_build_present" = xtrue; then
25290     if test "x$with_version_build" = xyes; then
25291       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25292     elif test "x$with_version_build" = xno; then
25293       # Interpret --without-* as empty string instead of the literal "no"
25294       VERSION_BUILD=
25295     elif test "x$with_version_build" = x; then
25296       VERSION_BUILD=
25297     else
25298 
25299   # Additional [] needed to keep m4 from mangling shell constructs.
25300   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25301     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25302   fi
25303   # Extract the version number without leading zeros.
25304   cleaned_value=${BASH_REMATCH[1]}
25305   if test "x$cleaned_value" = x; then
25306     # Special case for zero
25307     cleaned_value=${BASH_REMATCH[2]}
25308   fi
25309 
25310   if test $cleaned_value -gt 255; then
25311     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25312   fi
25313   if test "x$cleaned_value" != "x$with_version_build"; then
25314     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25315 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25316   fi
25317   VERSION_BUILD=$cleaned_value
25318 
25319     fi
25320   else
25321     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25322       # Default is to not have a build number.
25323       VERSION_BUILD=""
25324       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25325       VERSION_BUILD=0
25326     fi
25327   fi
25328 
25329 
25330 # Check whether --with-version-feature was given.
25331 if test "${with_version_feature+set}" = set; then :
25332   withval=$with_version_feature; with_version_feature_present=true
25333 else
25334   with_version_feature_present=false
25335 fi
25336 
25337 
25338   if test "x$with_version_feature_present" = xtrue; then
25339     if test "x$with_version_feature" = xyes; then
25340       as_fn_error $? "--with-version-feature must have a value" "$LINENO" 5
25341     else
25342 
25343   # Additional [] needed to keep m4 from mangling shell constructs.
25344   if  ! [[ "$with_version_feature" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25345     as_fn_error $? "\"$with_version_feature\" is not a valid numerical value for VERSION_FEATURE" "$LINENO" 5
25346   fi
25347   # Extract the version number without leading zeros.
25348   cleaned_value=${BASH_REMATCH[1]}
25349   if test "x$cleaned_value" = x; then
25350     # Special case for zero
25351     cleaned_value=${BASH_REMATCH[2]}
25352   fi
25353 
25354   if test $cleaned_value -gt 255; then
25355     as_fn_error $? "VERSION_FEATURE is given as $with_version_feature. This is greater than 255 which is not allowed." "$LINENO" 5
25356   fi
25357   if test "x$cleaned_value" != "x$with_version_feature"; then
25358     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_FEATURE has been sanitized from '$with_version_feature' to '$cleaned_value'" >&5
25359 $as_echo "$as_me: WARNING: Value for VERSION_FEATURE has been sanitized from '$with_version_feature' to '$cleaned_value'" >&2;}
25360   fi
25361   VERSION_FEATURE=$cleaned_value
25362 
25363     fi
25364   else
25365     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25366       # Default is to get value from version-numbers
25367       VERSION_FEATURE="$DEFAULT_VERSION_FEATURE"
25368     fi
25369   fi
25370 
25371 
25372 # Check whether --with-version-interim was given.
25373 if test "${with_version_interim+set}" = set; then :
25374   withval=$with_version_interim; with_version_interim_present=true
25375 else
25376   with_version_interim_present=false
25377 fi
25378 
25379 
25380   if test "x$with_version_interim_present" = xtrue; then
25381     if test "x$with_version_interim" = xyes; then
25382       as_fn_error $? "--with-version-interim must have a value" "$LINENO" 5
25383     elif test "x$with_version_interim" = xno; then
25384       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25385       VERSION_INTERIM=0
25386     elif test "x$with_version_interim" = x; then
25387       VERSION_INTERIM=0
25388     else
25389 
25390   # Additional [] needed to keep m4 from mangling shell constructs.
25391   if  ! [[ "$with_version_interim" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25392     as_fn_error $? "\"$with_version_interim\" is not a valid numerical value for VERSION_INTERIM" "$LINENO" 5
25393   fi
25394   # Extract the version number without leading zeros.
25395   cleaned_value=${BASH_REMATCH[1]}
25396   if test "x$cleaned_value" = x; then
25397     # Special case for zero
25398     cleaned_value=${BASH_REMATCH[2]}
25399   fi
25400 
25401   if test $cleaned_value -gt 255; then
25402     as_fn_error $? "VERSION_INTERIM is given as $with_version_interim. This is greater than 255 which is not allowed." "$LINENO" 5
25403   fi
25404   if test "x$cleaned_value" != "x$with_version_interim"; then
25405     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_INTERIM has been sanitized from '$with_version_interim' to '$cleaned_value'" >&5
25406 $as_echo "$as_me: WARNING: Value for VERSION_INTERIM has been sanitized from '$with_version_interim' to '$cleaned_value'" >&2;}
25407   fi
25408   VERSION_INTERIM=$cleaned_value
25409 
25410     fi
25411   else
25412     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25413       # Default is 0, if unspecified
25414       VERSION_INTERIM=$DEFAULT_VERSION_INTERIM
25415     fi
25416   fi
25417 
25418 
25419 # Check whether --with-version-update was given.
25420 if test "${with_version_update+set}" = set; then :
25421   withval=$with_version_update; with_version_update_present=true
25422 else
25423   with_version_update_present=false
25424 fi
25425 
25426 
25427   if test "x$with_version_update_present" = xtrue; then
25428     if test "x$with_version_update" = xyes; then
25429       as_fn_error $? "--with-version-update must have a value" "$LINENO" 5
25430     elif test "x$with_version_update" = xno; then
25431       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25432       VERSION_UPDATE=0
25433     elif test "x$with_version_update" = x; then
25434       VERSION_UPDATE=0
25435     else
25436 
25437   # Additional [] needed to keep m4 from mangling shell constructs.
25438   if  ! [[ "$with_version_update" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25439     as_fn_error $? "\"$with_version_update\" is not a valid numerical value for VERSION_UPDATE" "$LINENO" 5
25440   fi
25441   # Extract the version number without leading zeros.
25442   cleaned_value=${BASH_REMATCH[1]}
25443   if test "x$cleaned_value" = x; then
25444     # Special case for zero
25445     cleaned_value=${BASH_REMATCH[2]}
25446   fi
25447 
25448   if test $cleaned_value -gt 255; then
25449     as_fn_error $? "VERSION_UPDATE is given as $with_version_update. This is greater than 255 which is not allowed." "$LINENO" 5
25450   fi
25451   if test "x$cleaned_value" != "x$with_version_update"; then
25452     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_UPDATE has been sanitized from '$with_version_update' to '$cleaned_value'" >&5
25453 $as_echo "$as_me: WARNING: Value for VERSION_UPDATE has been sanitized from '$with_version_update' to '$cleaned_value'" >&2;}
25454   fi
25455   VERSION_UPDATE=$cleaned_value
25456 
25457     fi
25458   else
25459     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25460       # Default is 0, if unspecified
25461       VERSION_UPDATE=$DEFAULT_VERSION_UPDATE
25462     fi
25463   fi
25464 
25465 
25466 # Check whether --with-version-patch was given.
25467 if test "${with_version_patch+set}" = set; then :
25468   withval=$with_version_patch; with_version_patch_present=true
25469 else
25470   with_version_patch_present=false
25471 fi
25472 
25473 
25474   if test "x$with_version_patch_present" = xtrue; then
25475     if test "x$with_version_patch" = xyes; then
25476       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25477     elif test "x$with_version_patch" = xno; then
25478       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25479       VERSION_PATCH=0
25480     elif test "x$with_version_patch" = x; then
25481       VERSION_PATCH=0
25482     else
25483 
25484   # Additional [] needed to keep m4 from mangling shell constructs.
25485   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25486     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25487   fi
25488   # Extract the version number without leading zeros.
25489   cleaned_value=${BASH_REMATCH[1]}
25490   if test "x$cleaned_value" = x; then
25491     # Special case for zero
25492     cleaned_value=${BASH_REMATCH[2]}
25493   fi
25494 
25495   if test $cleaned_value -gt 255; then
25496     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25497   fi
25498   if test "x$cleaned_value" != "x$with_version_patch"; then
25499     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25500 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25501   fi
25502   VERSION_PATCH=$cleaned_value
25503 
25504     fi
25505   else
25506     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25507       # Default is 0, if unspecified
25508       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25509     fi
25510   fi
25511 
25512   # Calculate derived version properties
25513 
25514   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25515   if test "x$VERSION_PRE" = x; then
25516     VERSION_IS_GA=true
25517   else
25518     VERSION_IS_GA=false
25519   fi
25520 
25521   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25522   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_FEATURE.$VERSION_INTERIM.$VERSION_UPDATE.$VERSION_PATCH
25523 
25524   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25525   # Strip trailing zeroes from stripped_version_number
25526   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25527   VERSION_NUMBER=$stripped_version_number
25528 
25529   # The complete version string, with additional build information
25530   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25531     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25532   else
25533     # If either build or opt is set, we need a + separator
25534     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25535   fi
25536 
25537   # The short version string, just VERSION_NUMBER and PRE, if present.
25538   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25539 
25540   # The version date
25541 
25542 # Check whether --with-version-date was given.
25543 if test "${with_version_date+set}" = set; then :
25544   withval=$with_version_date;
25545 fi
25546 
25547   if test "x$with_version_date" = xyes; then
25548     as_fn_error $? "--with-version-date must have a value" "$LINENO" 5
25549   elif test "x$with_version_date" != x; then
25550     if  ! [[ $with_version_date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ; then
25551       as_fn_error $? "\"$with_version_date\" is not a valid version date" "$LINENO" 5
25552     else
25553       VERSION_DATE="$with_version_date"
25554     fi
25555   else
25556     VERSION_DATE="$DEFAULT_VERSION_DATE"
25557   fi
25558 
25559   # The vendor version string, if any
25560 
25561 # Check whether --with-vendor-version-string was given.
25562 if test "${with_vendor_version_string+set}" = set; then :
25563   withval=$with_vendor_version_string;
25564 fi
25565 
25566   if test "x$with_vendor_version_string" = xyes; then
25567     as_fn_error $? "--with-vendor-version-string must have a value" "$LINENO" 5
25568   elif  ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ; then
25569     as_fn_error $? "--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string" "$LINENO" 5
25570   else
25571     VENDOR_VERSION_STRING="$with_vendor_version_string"
25572   fi
25573 
25574   # We could define --with flags for these, if really needed
25575   VERSION_CLASSFILE_MAJOR="$DEFAULT_VERSION_CLASSFILE_MAJOR"
25576   VERSION_CLASSFILE_MINOR="$DEFAULT_VERSION_CLASSFILE_MINOR"
25577 
25578   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25579 $as_echo_n "checking for version string... " >&6; }
25580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25581 $as_echo "$VERSION_STRING" >&6; }
25582 
25583 
25584 
25585 
25586 
25587 
25588 
25589 
25590 
25591 
25592 
25593 
25594 
25595 
25596 
25597 
25598 
25599 
25600 
25601 
25602 ###############################################################################
25603 #
25604 # Setup BootJDK, used to bootstrap the build.
25605 #
25606 ###############################################################################
25607 
25608 
25609   BOOT_JDK_FOUND=no
25610 
25611 # Check whether --with-boot-jdk was given.
25612 if test "${with_boot_jdk+set}" = set; then :
25613   withval=$with_boot_jdk;
25614 fi
25615 
25616 
25617   # We look for the Boot JDK through various means, going from more certain to
25618   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25619   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25620   # must check if this is indeed valid; otherwise we'll continue looking.
25621 
25622   # Test: Is bootjdk explicitly set by command line arguments?
25623 
25624   if test "x$BOOT_JDK_FOUND" = xno; then
25625     # Now execute the test
25626 
25627   if test "x$with_boot_jdk" != x; then
25628     BOOT_JDK=$with_boot_jdk
25629     BOOT_JDK_FOUND=maybe
25630     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25631 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25632   fi
25633 
25634 
25635     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25636     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25637       # Do we have a bin/java?
25638       if test ! -x "$BOOT_JDK/bin/java"; then
25639         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25640 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25641         BOOT_JDK_FOUND=no
25642       else
25643         # Do we have a bin/javac?
25644         if test ! -x "$BOOT_JDK/bin/javac"; then
25645           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25646 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25647           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25648 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25649           BOOT_JDK_FOUND=no
25650         else
25651           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25652           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25653 
25654           # Extra M4 quote needed to protect [] in grep expression.
25655           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25656           if test "x$FOUND_CORRECT_VERSION" = x; then
25657             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25658 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25659             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25660 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25661             BOOT_JDK_FOUND=no
25662           else
25663             # We're done! :-)
25664             BOOT_JDK_FOUND=yes
25665 
25666   # Only process if variable expands to non-empty
25667 
25668   if test "x$BOOT_JDK" != x; then
25669     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25670 
25671   # Input might be given as Windows format, start by converting to
25672   # unix format.
25673   path="$BOOT_JDK"
25674   new_path=`$CYGPATH -u "$path"`
25675 
25676   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25677   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25678   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25679   # "foo.exe" is OK but "foo" is an error.
25680   #
25681   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25682   # It is also a way to make sure we got the proper file name for the real test later on.
25683   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25684   if test "x$test_shortpath" = x; then
25685     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25686 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25687     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25688   fi
25689 
25690   # Call helper function which possibly converts this using DOS-style short mode.
25691   # If so, the updated path is stored in $new_path.
25692 
25693   input_path="$new_path"
25694   # Check if we need to convert this using DOS-style short mode. If the path
25695   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25696   # take no chances and rewrite it.
25697   # Note: m4 eats our [], so we need to use [ and ] instead.
25698   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25699   if test "x$has_forbidden_chars" != x; then
25700     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25701     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25702     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25703     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25704       # Going to short mode and back again did indeed matter. Since short mode is
25705       # case insensitive, let's make it lowercase to improve readability.
25706       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25707       # Now convert it back to Unix-style (cygpath)
25708       input_path=`$CYGPATH -u "$shortmode_path"`
25709       new_path="$input_path"
25710     fi
25711   fi
25712 
25713   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25714   if test "x$test_cygdrive_prefix" = x; then
25715     # As a simple fix, exclude /usr/bin since it's not a real path.
25716     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25717       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25718       # a path prefixed by /cygdrive for fixpath to work.
25719       new_path="$CYGWIN_ROOT_PATH$input_path"
25720     fi
25721   fi
25722 
25723 
25724   if test "x$path" != "x$new_path"; then
25725     BOOT_JDK="$new_path"
25726     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25727 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25728   fi
25729 
25730     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25731 
25732   path="$BOOT_JDK"
25733   has_colon=`$ECHO $path | $GREP ^.:`
25734   new_path="$path"
25735   if test "x$has_colon" = x; then
25736     # Not in mixed or Windows style, start by that.
25737     new_path=`cmd //c echo $path`
25738   fi
25739 
25740 
25741   input_path="$new_path"
25742   # Check if we need to convert this using DOS-style short mode. If the path
25743   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25744   # take no chances and rewrite it.
25745   # Note: m4 eats our [], so we need to use [ and ] instead.
25746   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25747   if test "x$has_forbidden_chars" != x; then
25748     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25749     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25750   fi
25751 
25752 
25753   windows_path="$new_path"
25754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25755     unix_path=`$CYGPATH -u "$windows_path"`
25756     new_path="$unix_path"
25757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25759     new_path="$unix_path"
25760   fi
25761 
25762   if test "x$path" != "x$new_path"; then
25763     BOOT_JDK="$new_path"
25764     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25765 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25766   fi
25767 
25768   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25769   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25770 
25771     else
25772       # We're on a unix platform. Hooray! :)
25773       path="$BOOT_JDK"
25774       has_space=`$ECHO "$path" | $GREP " "`
25775       if test "x$has_space" != x; then
25776         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25777 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25778         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25779       fi
25780 
25781       # Use eval to expand a potential ~
25782       eval path="$path"
25783       if test ! -f "$path" && test ! -d "$path"; then
25784         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25785       fi
25786 
25787       if test -d "$path"; then
25788         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25789       else
25790         dir="`$DIRNAME "$path"`"
25791         base="`$BASENAME "$path"`"
25792         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25793       fi
25794     fi
25795   fi
25796 
25797             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25798 $as_echo_n "checking for Boot JDK... " >&6; }
25799             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25800 $as_echo "$BOOT_JDK" >&6; }
25801             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25802 $as_echo_n "checking Boot JDK version... " >&6; }
25803             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25804             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25805 $as_echo "$BOOT_JDK_VERSION" >&6; }
25806           fi # end check jdk version
25807         fi # end check javac
25808       fi # end check java
25809     fi # end check boot jdk found
25810   fi
25811 
25812   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25813     # Having specified an argument which is incorrect will produce an instant failure;
25814     # we should not go on looking
25815     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25816   fi
25817 
25818   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25819 
25820   if test "x$BOOT_JDK_FOUND" = xno; then
25821     # Now execute the test
25822 
25823   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25824     # First check at user selected default
25825 
25826   if test "x$BOOT_JDK_FOUND" = xno; then
25827     # Now execute the test
25828 
25829   if test -x /usr/libexec/java_home; then
25830     BOOT_JDK=`/usr/libexec/java_home `
25831     BOOT_JDK_FOUND=maybe
25832     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25833 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25834   fi
25835 
25836 
25837     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25838     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25839       # Do we have a bin/java?
25840       if test ! -x "$BOOT_JDK/bin/java"; then
25841         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25842 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25843         BOOT_JDK_FOUND=no
25844       else
25845         # Do we have a bin/javac?
25846         if test ! -x "$BOOT_JDK/bin/javac"; then
25847           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25848 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25849           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25850 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25851           BOOT_JDK_FOUND=no
25852         else
25853           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25854           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25855 
25856           # Extra M4 quote needed to protect [] in grep expression.
25857           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
25858           if test "x$FOUND_CORRECT_VERSION" = x; then
25859             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25860 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25861             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
25862 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
25863             BOOT_JDK_FOUND=no
25864           else
25865             # We're done! :-)
25866             BOOT_JDK_FOUND=yes
25867 
25868   # Only process if variable expands to non-empty
25869 
25870   if test "x$BOOT_JDK" != x; then
25871     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25872 
25873   # Input might be given as Windows format, start by converting to
25874   # unix format.
25875   path="$BOOT_JDK"
25876   new_path=`$CYGPATH -u "$path"`
25877 
25878   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25879   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25880   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25881   # "foo.exe" is OK but "foo" is an error.
25882   #
25883   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25884   # It is also a way to make sure we got the proper file name for the real test later on.
25885   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25886   if test "x$test_shortpath" = x; then
25887     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25888 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25889     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25890   fi
25891 
25892   # Call helper function which possibly converts this using DOS-style short mode.
25893   # If so, the updated path is stored in $new_path.
25894 
25895   input_path="$new_path"
25896   # Check if we need to convert this using DOS-style short mode. If the path
25897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25898   # take no chances and rewrite it.
25899   # Note: m4 eats our [], so we need to use [ and ] instead.
25900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25901   if test "x$has_forbidden_chars" != x; then
25902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25903     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25904     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25905     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25906       # Going to short mode and back again did indeed matter. Since short mode is
25907       # case insensitive, let's make it lowercase to improve readability.
25908       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25909       # Now convert it back to Unix-style (cygpath)
25910       input_path=`$CYGPATH -u "$shortmode_path"`
25911       new_path="$input_path"
25912     fi
25913   fi
25914 
25915   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25916   if test "x$test_cygdrive_prefix" = x; then
25917     # As a simple fix, exclude /usr/bin since it's not a real path.
25918     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25919       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25920       # a path prefixed by /cygdrive for fixpath to work.
25921       new_path="$CYGWIN_ROOT_PATH$input_path"
25922     fi
25923   fi
25924 
25925 
25926   if test "x$path" != "x$new_path"; then
25927     BOOT_JDK="$new_path"
25928     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25929 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25930   fi
25931 
25932     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25933 
25934   path="$BOOT_JDK"
25935   has_colon=`$ECHO $path | $GREP ^.:`
25936   new_path="$path"
25937   if test "x$has_colon" = x; then
25938     # Not in mixed or Windows style, start by that.
25939     new_path=`cmd //c echo $path`
25940   fi
25941 
25942 
25943   input_path="$new_path"
25944   # Check if we need to convert this using DOS-style short mode. If the path
25945   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25946   # take no chances and rewrite it.
25947   # Note: m4 eats our [], so we need to use [ and ] instead.
25948   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25949   if test "x$has_forbidden_chars" != x; then
25950     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25951     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25952   fi
25953 
25954 
25955   windows_path="$new_path"
25956   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25957     unix_path=`$CYGPATH -u "$windows_path"`
25958     new_path="$unix_path"
25959   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25960     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25961     new_path="$unix_path"
25962   fi
25963 
25964   if test "x$path" != "x$new_path"; then
25965     BOOT_JDK="$new_path"
25966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25968   fi
25969 
25970   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25971   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25972 
25973     else
25974       # We're on a unix platform. Hooray! :)
25975       path="$BOOT_JDK"
25976       has_space=`$ECHO "$path" | $GREP " "`
25977       if test "x$has_space" != x; then
25978         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25979 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25980         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25981       fi
25982 
25983       # Use eval to expand a potential ~
25984       eval path="$path"
25985       if test ! -f "$path" && test ! -d "$path"; then
25986         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25987       fi
25988 
25989       if test -d "$path"; then
25990         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25991       else
25992         dir="`$DIRNAME "$path"`"
25993         base="`$BASENAME "$path"`"
25994         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25995       fi
25996     fi
25997   fi
25998 
25999             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26000 $as_echo_n "checking for Boot JDK... " >&6; }
26001             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26002 $as_echo "$BOOT_JDK" >&6; }
26003             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26004 $as_echo_n "checking Boot JDK version... " >&6; }
26005             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26006             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26007 $as_echo "$BOOT_JDK_VERSION" >&6; }
26008           fi # end check jdk version
26009         fi # end check javac
26010       fi # end check java
26011     fi # end check boot jdk found
26012   fi
26013 
26014     # If that did not work out (e.g. too old), try explicit versions instead
26015 
26016   if test "x$BOOT_JDK_FOUND" = xno; then
26017     # Now execute the test
26018 
26019   if test -x /usr/libexec/java_home; then
26020     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
26021     BOOT_JDK_FOUND=maybe
26022     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
26023 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
26024   fi
26025 
26026 
26027     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26028     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26029       # Do we have a bin/java?
26030       if test ! -x "$BOOT_JDK/bin/java"; then
26031         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26032 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26033         BOOT_JDK_FOUND=no
26034       else
26035         # Do we have a bin/javac?
26036         if test ! -x "$BOOT_JDK/bin/javac"; then
26037           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26038 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26039           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26040 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26041           BOOT_JDK_FOUND=no
26042         else
26043           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26044           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26045 
26046           # Extra M4 quote needed to protect [] in grep expression.
26047           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26048           if test "x$FOUND_CORRECT_VERSION" = x; then
26049             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26050 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26051             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26052 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26053             BOOT_JDK_FOUND=no
26054           else
26055             # We're done! :-)
26056             BOOT_JDK_FOUND=yes
26057 
26058   # Only process if variable expands to non-empty
26059 
26060   if test "x$BOOT_JDK" != x; then
26061     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26062 
26063   # Input might be given as Windows format, start by converting to
26064   # unix format.
26065   path="$BOOT_JDK"
26066   new_path=`$CYGPATH -u "$path"`
26067 
26068   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26069   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26070   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26071   # "foo.exe" is OK but "foo" is an error.
26072   #
26073   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26074   # It is also a way to make sure we got the proper file name for the real test later on.
26075   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26076   if test "x$test_shortpath" = x; then
26077     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26078 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26079     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26080   fi
26081 
26082   # Call helper function which possibly converts this using DOS-style short mode.
26083   # If so, the updated path is stored in $new_path.
26084 
26085   input_path="$new_path"
26086   # Check if we need to convert this using DOS-style short mode. If the path
26087   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26088   # take no chances and rewrite it.
26089   # Note: m4 eats our [], so we need to use [ and ] instead.
26090   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26091   if test "x$has_forbidden_chars" != x; then
26092     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26093     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26094     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26095     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26096       # Going to short mode and back again did indeed matter. Since short mode is
26097       # case insensitive, let's make it lowercase to improve readability.
26098       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26099       # Now convert it back to Unix-style (cygpath)
26100       input_path=`$CYGPATH -u "$shortmode_path"`
26101       new_path="$input_path"
26102     fi
26103   fi
26104 
26105   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26106   if test "x$test_cygdrive_prefix" = x; then
26107     # As a simple fix, exclude /usr/bin since it's not a real path.
26108     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26109       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26110       # a path prefixed by /cygdrive for fixpath to work.
26111       new_path="$CYGWIN_ROOT_PATH$input_path"
26112     fi
26113   fi
26114 
26115 
26116   if test "x$path" != "x$new_path"; then
26117     BOOT_JDK="$new_path"
26118     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26119 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26120   fi
26121 
26122     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26123 
26124   path="$BOOT_JDK"
26125   has_colon=`$ECHO $path | $GREP ^.:`
26126   new_path="$path"
26127   if test "x$has_colon" = x; then
26128     # Not in mixed or Windows style, start by that.
26129     new_path=`cmd //c echo $path`
26130   fi
26131 
26132 
26133   input_path="$new_path"
26134   # Check if we need to convert this using DOS-style short mode. If the path
26135   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26136   # take no chances and rewrite it.
26137   # Note: m4 eats our [], so we need to use [ and ] instead.
26138   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26139   if test "x$has_forbidden_chars" != x; then
26140     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26141     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26142   fi
26143 
26144 
26145   windows_path="$new_path"
26146   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26147     unix_path=`$CYGPATH -u "$windows_path"`
26148     new_path="$unix_path"
26149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26150     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26151     new_path="$unix_path"
26152   fi
26153 
26154   if test "x$path" != "x$new_path"; then
26155     BOOT_JDK="$new_path"
26156     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26157 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26158   fi
26159 
26160   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26161   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26162 
26163     else
26164       # We're on a unix platform. Hooray! :)
26165       path="$BOOT_JDK"
26166       has_space=`$ECHO "$path" | $GREP " "`
26167       if test "x$has_space" != x; then
26168         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26169 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26170         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26171       fi
26172 
26173       # Use eval to expand a potential ~
26174       eval path="$path"
26175       if test ! -f "$path" && test ! -d "$path"; then
26176         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26177       fi
26178 
26179       if test -d "$path"; then
26180         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26181       else
26182         dir="`$DIRNAME "$path"`"
26183         base="`$BASENAME "$path"`"
26184         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26185       fi
26186     fi
26187   fi
26188 
26189             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26190 $as_echo_n "checking for Boot JDK... " >&6; }
26191             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26192 $as_echo "$BOOT_JDK" >&6; }
26193             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26194 $as_echo_n "checking Boot JDK version... " >&6; }
26195             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26196             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26197 $as_echo "$BOOT_JDK_VERSION" >&6; }
26198           fi # end check jdk version
26199         fi # end check javac
26200       fi # end check java
26201     fi # end check boot jdk found
26202   fi
26203 
26204 
26205   if test "x$BOOT_JDK_FOUND" = xno; then
26206     # Now execute the test
26207 
26208   if test -x /usr/libexec/java_home; then
26209     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26210     BOOT_JDK_FOUND=maybe
26211     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26212 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26213   fi
26214 
26215 
26216     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26217     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26218       # Do we have a bin/java?
26219       if test ! -x "$BOOT_JDK/bin/java"; then
26220         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26221 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26222         BOOT_JDK_FOUND=no
26223       else
26224         # Do we have a bin/javac?
26225         if test ! -x "$BOOT_JDK/bin/javac"; then
26226           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26227 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26228           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26229 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26230           BOOT_JDK_FOUND=no
26231         else
26232           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26233           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26234 
26235           # Extra M4 quote needed to protect [] in grep expression.
26236           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26237           if test "x$FOUND_CORRECT_VERSION" = x; then
26238             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26239 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26240             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26241 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26242             BOOT_JDK_FOUND=no
26243           else
26244             # We're done! :-)
26245             BOOT_JDK_FOUND=yes
26246 
26247   # Only process if variable expands to non-empty
26248 
26249   if test "x$BOOT_JDK" != x; then
26250     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26251 
26252   # Input might be given as Windows format, start by converting to
26253   # unix format.
26254   path="$BOOT_JDK"
26255   new_path=`$CYGPATH -u "$path"`
26256 
26257   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26258   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26259   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26260   # "foo.exe" is OK but "foo" is an error.
26261   #
26262   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26263   # It is also a way to make sure we got the proper file name for the real test later on.
26264   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26265   if test "x$test_shortpath" = x; then
26266     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26267 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26268     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26269   fi
26270 
26271   # Call helper function which possibly converts this using DOS-style short mode.
26272   # If so, the updated path is stored in $new_path.
26273 
26274   input_path="$new_path"
26275   # Check if we need to convert this using DOS-style short mode. If the path
26276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26277   # take no chances and rewrite it.
26278   # Note: m4 eats our [], so we need to use [ and ] instead.
26279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26280   if test "x$has_forbidden_chars" != x; then
26281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26282     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26283     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26284     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26285       # Going to short mode and back again did indeed matter. Since short mode is
26286       # case insensitive, let's make it lowercase to improve readability.
26287       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26288       # Now convert it back to Unix-style (cygpath)
26289       input_path=`$CYGPATH -u "$shortmode_path"`
26290       new_path="$input_path"
26291     fi
26292   fi
26293 
26294   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26295   if test "x$test_cygdrive_prefix" = x; then
26296     # As a simple fix, exclude /usr/bin since it's not a real path.
26297     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26298       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26299       # a path prefixed by /cygdrive for fixpath to work.
26300       new_path="$CYGWIN_ROOT_PATH$input_path"
26301     fi
26302   fi
26303 
26304 
26305   if test "x$path" != "x$new_path"; then
26306     BOOT_JDK="$new_path"
26307     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26308 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26309   fi
26310 
26311     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26312 
26313   path="$BOOT_JDK"
26314   has_colon=`$ECHO $path | $GREP ^.:`
26315   new_path="$path"
26316   if test "x$has_colon" = x; then
26317     # Not in mixed or Windows style, start by that.
26318     new_path=`cmd //c echo $path`
26319   fi
26320 
26321 
26322   input_path="$new_path"
26323   # Check if we need to convert this using DOS-style short mode. If the path
26324   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26325   # take no chances and rewrite it.
26326   # Note: m4 eats our [], so we need to use [ and ] instead.
26327   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26328   if test "x$has_forbidden_chars" != x; then
26329     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26330     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26331   fi
26332 
26333 
26334   windows_path="$new_path"
26335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26336     unix_path=`$CYGPATH -u "$windows_path"`
26337     new_path="$unix_path"
26338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26340     new_path="$unix_path"
26341   fi
26342 
26343   if test "x$path" != "x$new_path"; then
26344     BOOT_JDK="$new_path"
26345     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26346 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26347   fi
26348 
26349   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26350   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26351 
26352     else
26353       # We're on a unix platform. Hooray! :)
26354       path="$BOOT_JDK"
26355       has_space=`$ECHO "$path" | $GREP " "`
26356       if test "x$has_space" != x; then
26357         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26358 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26359         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26360       fi
26361 
26362       # Use eval to expand a potential ~
26363       eval path="$path"
26364       if test ! -f "$path" && test ! -d "$path"; then
26365         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26366       fi
26367 
26368       if test -d "$path"; then
26369         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26370       else
26371         dir="`$DIRNAME "$path"`"
26372         base="`$BASENAME "$path"`"
26373         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26374       fi
26375     fi
26376   fi
26377 
26378             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26379 $as_echo_n "checking for Boot JDK... " >&6; }
26380             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26381 $as_echo "$BOOT_JDK" >&6; }
26382             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26383 $as_echo_n "checking Boot JDK version... " >&6; }
26384             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26385             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26386 $as_echo "$BOOT_JDK_VERSION" >&6; }
26387           fi # end check jdk version
26388         fi # end check javac
26389       fi # end check java
26390     fi # end check boot jdk found
26391   fi
26392 
26393 
26394   if test "x$BOOT_JDK_FOUND" = xno; then
26395     # Now execute the test
26396 
26397   if test -x /usr/libexec/java_home; then
26398     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26399     BOOT_JDK_FOUND=maybe
26400     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26401 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26402   fi
26403 
26404 
26405     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26406     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26407       # Do we have a bin/java?
26408       if test ! -x "$BOOT_JDK/bin/java"; then
26409         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26410 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26411         BOOT_JDK_FOUND=no
26412       else
26413         # Do we have a bin/javac?
26414         if test ! -x "$BOOT_JDK/bin/javac"; then
26415           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26416 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26417           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26418 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26419           BOOT_JDK_FOUND=no
26420         else
26421           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26422           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26423 
26424           # Extra M4 quote needed to protect [] in grep expression.
26425           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26426           if test "x$FOUND_CORRECT_VERSION" = x; then
26427             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26428 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26429             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26430 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26431             BOOT_JDK_FOUND=no
26432           else
26433             # We're done! :-)
26434             BOOT_JDK_FOUND=yes
26435 
26436   # Only process if variable expands to non-empty
26437 
26438   if test "x$BOOT_JDK" != x; then
26439     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26440 
26441   # Input might be given as Windows format, start by converting to
26442   # unix format.
26443   path="$BOOT_JDK"
26444   new_path=`$CYGPATH -u "$path"`
26445 
26446   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26447   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26448   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26449   # "foo.exe" is OK but "foo" is an error.
26450   #
26451   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26452   # It is also a way to make sure we got the proper file name for the real test later on.
26453   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26454   if test "x$test_shortpath" = x; then
26455     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26456 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26457     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26458   fi
26459 
26460   # Call helper function which possibly converts this using DOS-style short mode.
26461   # If so, the updated path is stored in $new_path.
26462 
26463   input_path="$new_path"
26464   # Check if we need to convert this using DOS-style short mode. If the path
26465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26466   # take no chances and rewrite it.
26467   # Note: m4 eats our [], so we need to use [ and ] instead.
26468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26469   if test "x$has_forbidden_chars" != x; then
26470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26471     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26472     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26473     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26474       # Going to short mode and back again did indeed matter. Since short mode is
26475       # case insensitive, let's make it lowercase to improve readability.
26476       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26477       # Now convert it back to Unix-style (cygpath)
26478       input_path=`$CYGPATH -u "$shortmode_path"`
26479       new_path="$input_path"
26480     fi
26481   fi
26482 
26483   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26484   if test "x$test_cygdrive_prefix" = x; then
26485     # As a simple fix, exclude /usr/bin since it's not a real path.
26486     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26487       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26488       # a path prefixed by /cygdrive for fixpath to work.
26489       new_path="$CYGWIN_ROOT_PATH$input_path"
26490     fi
26491   fi
26492 
26493 
26494   if test "x$path" != "x$new_path"; then
26495     BOOT_JDK="$new_path"
26496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26497 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26498   fi
26499 
26500     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26501 
26502   path="$BOOT_JDK"
26503   has_colon=`$ECHO $path | $GREP ^.:`
26504   new_path="$path"
26505   if test "x$has_colon" = x; then
26506     # Not in mixed or Windows style, start by that.
26507     new_path=`cmd //c echo $path`
26508   fi
26509 
26510 
26511   input_path="$new_path"
26512   # Check if we need to convert this using DOS-style short mode. If the path
26513   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26514   # take no chances and rewrite it.
26515   # Note: m4 eats our [], so we need to use [ and ] instead.
26516   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26517   if test "x$has_forbidden_chars" != x; then
26518     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26519     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26520   fi
26521 
26522 
26523   windows_path="$new_path"
26524   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26525     unix_path=`$CYGPATH -u "$windows_path"`
26526     new_path="$unix_path"
26527   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26528     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26529     new_path="$unix_path"
26530   fi
26531 
26532   if test "x$path" != "x$new_path"; then
26533     BOOT_JDK="$new_path"
26534     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26535 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26536   fi
26537 
26538   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26539   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26540 
26541     else
26542       # We're on a unix platform. Hooray! :)
26543       path="$BOOT_JDK"
26544       has_space=`$ECHO "$path" | $GREP " "`
26545       if test "x$has_space" != x; then
26546         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26547 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26548         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26549       fi
26550 
26551       # Use eval to expand a potential ~
26552       eval path="$path"
26553       if test ! -f "$path" && test ! -d "$path"; then
26554         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26555       fi
26556 
26557       if test -d "$path"; then
26558         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26559       else
26560         dir="`$DIRNAME "$path"`"
26561         base="`$BASENAME "$path"`"
26562         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26563       fi
26564     fi
26565   fi
26566 
26567             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26568 $as_echo_n "checking for Boot JDK... " >&6; }
26569             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26570 $as_echo "$BOOT_JDK" >&6; }
26571             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26572 $as_echo_n "checking Boot JDK version... " >&6; }
26573             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26574             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26575 $as_echo "$BOOT_JDK_VERSION" >&6; }
26576           fi # end check jdk version
26577         fi # end check javac
26578       fi # end check java
26579     fi # end check boot jdk found
26580   fi
26581 
26582   fi
26583 
26584 
26585     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26586     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26587       # Do we have a bin/java?
26588       if test ! -x "$BOOT_JDK/bin/java"; then
26589         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26590 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26591         BOOT_JDK_FOUND=no
26592       else
26593         # Do we have a bin/javac?
26594         if test ! -x "$BOOT_JDK/bin/javac"; then
26595           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26596 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26597           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26598 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26599           BOOT_JDK_FOUND=no
26600         else
26601           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26602           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26603 
26604           # Extra M4 quote needed to protect [] in grep expression.
26605           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26606           if test "x$FOUND_CORRECT_VERSION" = x; then
26607             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26608 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26609             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26610 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26611             BOOT_JDK_FOUND=no
26612           else
26613             # We're done! :-)
26614             BOOT_JDK_FOUND=yes
26615 
26616   # Only process if variable expands to non-empty
26617 
26618   if test "x$BOOT_JDK" != x; then
26619     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26620 
26621   # Input might be given as Windows format, start by converting to
26622   # unix format.
26623   path="$BOOT_JDK"
26624   new_path=`$CYGPATH -u "$path"`
26625 
26626   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26627   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26628   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26629   # "foo.exe" is OK but "foo" is an error.
26630   #
26631   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26632   # It is also a way to make sure we got the proper file name for the real test later on.
26633   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26634   if test "x$test_shortpath" = x; then
26635     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26636 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26637     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26638   fi
26639 
26640   # Call helper function which possibly converts this using DOS-style short mode.
26641   # If so, the updated path is stored in $new_path.
26642 
26643   input_path="$new_path"
26644   # Check if we need to convert this using DOS-style short mode. If the path
26645   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26646   # take no chances and rewrite it.
26647   # Note: m4 eats our [], so we need to use [ and ] instead.
26648   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26649   if test "x$has_forbidden_chars" != x; then
26650     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26651     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26652     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26653     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26654       # Going to short mode and back again did indeed matter. Since short mode is
26655       # case insensitive, let's make it lowercase to improve readability.
26656       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26657       # Now convert it back to Unix-style (cygpath)
26658       input_path=`$CYGPATH -u "$shortmode_path"`
26659       new_path="$input_path"
26660     fi
26661   fi
26662 
26663   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26664   if test "x$test_cygdrive_prefix" = x; then
26665     # As a simple fix, exclude /usr/bin since it's not a real path.
26666     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26667       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26668       # a path prefixed by /cygdrive for fixpath to work.
26669       new_path="$CYGWIN_ROOT_PATH$input_path"
26670     fi
26671   fi
26672 
26673 
26674   if test "x$path" != "x$new_path"; then
26675     BOOT_JDK="$new_path"
26676     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26677 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26678   fi
26679 
26680     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26681 
26682   path="$BOOT_JDK"
26683   has_colon=`$ECHO $path | $GREP ^.:`
26684   new_path="$path"
26685   if test "x$has_colon" = x; then
26686     # Not in mixed or Windows style, start by that.
26687     new_path=`cmd //c echo $path`
26688   fi
26689 
26690 
26691   input_path="$new_path"
26692   # Check if we need to convert this using DOS-style short mode. If the path
26693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26694   # take no chances and rewrite it.
26695   # Note: m4 eats our [], so we need to use [ and ] instead.
26696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26697   if test "x$has_forbidden_chars" != x; then
26698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26699     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26700   fi
26701 
26702 
26703   windows_path="$new_path"
26704   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26705     unix_path=`$CYGPATH -u "$windows_path"`
26706     new_path="$unix_path"
26707   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26708     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26709     new_path="$unix_path"
26710   fi
26711 
26712   if test "x$path" != "x$new_path"; then
26713     BOOT_JDK="$new_path"
26714     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26715 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26716   fi
26717 
26718   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26719   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26720 
26721     else
26722       # We're on a unix platform. Hooray! :)
26723       path="$BOOT_JDK"
26724       has_space=`$ECHO "$path" | $GREP " "`
26725       if test "x$has_space" != x; then
26726         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26727 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26728         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26729       fi
26730 
26731       # Use eval to expand a potential ~
26732       eval path="$path"
26733       if test ! -f "$path" && test ! -d "$path"; then
26734         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26735       fi
26736 
26737       if test -d "$path"; then
26738         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26739       else
26740         dir="`$DIRNAME "$path"`"
26741         base="`$BASENAME "$path"`"
26742         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26743       fi
26744     fi
26745   fi
26746 
26747             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26748 $as_echo_n "checking for Boot JDK... " >&6; }
26749             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26750 $as_echo "$BOOT_JDK" >&6; }
26751             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26752 $as_echo_n "checking Boot JDK version... " >&6; }
26753             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26754             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26755 $as_echo "$BOOT_JDK_VERSION" >&6; }
26756           fi # end check jdk version
26757         fi # end check javac
26758       fi # end check java
26759     fi # end check boot jdk found
26760   fi
26761 
26762 
26763   # Test: Is $JAVA_HOME set?
26764 
26765   if test "x$BOOT_JDK_FOUND" = xno; then
26766     # Now execute the test
26767 
26768   if test "x$JAVA_HOME" != x; then
26769     JAVA_HOME_PROCESSED="$JAVA_HOME"
26770 
26771   # Only process if variable expands to non-empty
26772 
26773   if test "x$JAVA_HOME_PROCESSED" != x; then
26774     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26775 
26776   # Input might be given as Windows format, start by converting to
26777   # unix format.
26778   path="$JAVA_HOME_PROCESSED"
26779   new_path=`$CYGPATH -u "$path"`
26780 
26781   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26782   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26783   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26784   # "foo.exe" is OK but "foo" is an error.
26785   #
26786   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26787   # It is also a way to make sure we got the proper file name for the real test later on.
26788   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26789   if test "x$test_shortpath" = x; then
26790     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26791 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26792     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26793   fi
26794 
26795   # Call helper function which possibly converts this using DOS-style short mode.
26796   # If so, the updated path is stored in $new_path.
26797 
26798   input_path="$new_path"
26799   # Check if we need to convert this using DOS-style short mode. If the path
26800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26801   # take no chances and rewrite it.
26802   # Note: m4 eats our [], so we need to use [ and ] instead.
26803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26804   if test "x$has_forbidden_chars" != x; then
26805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26809       # Going to short mode and back again did indeed matter. Since short mode is
26810       # case insensitive, let's make it lowercase to improve readability.
26811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26812       # Now convert it back to Unix-style (cygpath)
26813       input_path=`$CYGPATH -u "$shortmode_path"`
26814       new_path="$input_path"
26815     fi
26816   fi
26817 
26818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26819   if test "x$test_cygdrive_prefix" = x; then
26820     # As a simple fix, exclude /usr/bin since it's not a real path.
26821     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26823       # a path prefixed by /cygdrive for fixpath to work.
26824       new_path="$CYGWIN_ROOT_PATH$input_path"
26825     fi
26826   fi
26827 
26828 
26829   if test "x$path" != "x$new_path"; then
26830     JAVA_HOME_PROCESSED="$new_path"
26831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26832 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26833   fi
26834 
26835     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26836 
26837   path="$JAVA_HOME_PROCESSED"
26838   has_colon=`$ECHO $path | $GREP ^.:`
26839   new_path="$path"
26840   if test "x$has_colon" = x; then
26841     # Not in mixed or Windows style, start by that.
26842     new_path=`cmd //c echo $path`
26843   fi
26844 
26845 
26846   input_path="$new_path"
26847   # Check if we need to convert this using DOS-style short mode. If the path
26848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26849   # take no chances and rewrite it.
26850   # Note: m4 eats our [], so we need to use [ and ] instead.
26851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26852   if test "x$has_forbidden_chars" != x; then
26853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26855   fi
26856 
26857 
26858   windows_path="$new_path"
26859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26860     unix_path=`$CYGPATH -u "$windows_path"`
26861     new_path="$unix_path"
26862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26864     new_path="$unix_path"
26865   fi
26866 
26867   if test "x$path" != "x$new_path"; then
26868     JAVA_HOME_PROCESSED="$new_path"
26869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26870 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26871   fi
26872 
26873   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26874   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26875 
26876     else
26877       # We're on a unix platform. Hooray! :)
26878       path="$JAVA_HOME_PROCESSED"
26879       has_space=`$ECHO "$path" | $GREP " "`
26880       if test "x$has_space" != x; then
26881         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26882 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26883         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26884       fi
26885 
26886       # Use eval to expand a potential ~
26887       eval path="$path"
26888       if test ! -f "$path" && test ! -d "$path"; then
26889         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26890       fi
26891 
26892       if test -d "$path"; then
26893         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26894       else
26895         dir="`$DIRNAME "$path"`"
26896         base="`$BASENAME "$path"`"
26897         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26898       fi
26899     fi
26900   fi
26901 
26902     if test ! -d "$JAVA_HOME_PROCESSED"; then
26903       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26904 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26905     else
26906       # Aha, the user has set a JAVA_HOME
26907       # let us use that as the Boot JDK.
26908       BOOT_JDK="$JAVA_HOME_PROCESSED"
26909       BOOT_JDK_FOUND=maybe
26910       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26911 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26912     fi
26913   fi
26914 
26915 
26916     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26917     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26918       # Do we have a bin/java?
26919       if test ! -x "$BOOT_JDK/bin/java"; then
26920         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26921 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26922         BOOT_JDK_FOUND=no
26923       else
26924         # Do we have a bin/javac?
26925         if test ! -x "$BOOT_JDK/bin/javac"; then
26926           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26927 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26928           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26929 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26930           BOOT_JDK_FOUND=no
26931         else
26932           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26933           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26934 
26935           # Extra M4 quote needed to protect [] in grep expression.
26936           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
26937           if test "x$FOUND_CORRECT_VERSION" = x; then
26938             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26939 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26940             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
26941 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
26942             BOOT_JDK_FOUND=no
26943           else
26944             # We're done! :-)
26945             BOOT_JDK_FOUND=yes
26946 
26947   # Only process if variable expands to non-empty
26948 
26949   if test "x$BOOT_JDK" != x; then
26950     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26951 
26952   # Input might be given as Windows format, start by converting to
26953   # unix format.
26954   path="$BOOT_JDK"
26955   new_path=`$CYGPATH -u "$path"`
26956 
26957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26960   # "foo.exe" is OK but "foo" is an error.
26961   #
26962   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26963   # It is also a way to make sure we got the proper file name for the real test later on.
26964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26965   if test "x$test_shortpath" = x; then
26966     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26967 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26968     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26969   fi
26970 
26971   # Call helper function which possibly converts this using DOS-style short mode.
26972   # If so, the updated path is stored in $new_path.
26973 
26974   input_path="$new_path"
26975   # Check if we need to convert this using DOS-style short mode. If the path
26976   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26977   # take no chances and rewrite it.
26978   # Note: m4 eats our [], so we need to use [ and ] instead.
26979   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26980   if test "x$has_forbidden_chars" != x; then
26981     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26982     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26983     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26984     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26985       # Going to short mode and back again did indeed matter. Since short mode is
26986       # case insensitive, let's make it lowercase to improve readability.
26987       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26988       # Now convert it back to Unix-style (cygpath)
26989       input_path=`$CYGPATH -u "$shortmode_path"`
26990       new_path="$input_path"
26991     fi
26992   fi
26993 
26994   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26995   if test "x$test_cygdrive_prefix" = x; then
26996     # As a simple fix, exclude /usr/bin since it's not a real path.
26997     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26998       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26999       # a path prefixed by /cygdrive for fixpath to work.
27000       new_path="$CYGWIN_ROOT_PATH$input_path"
27001     fi
27002   fi
27003 
27004 
27005   if test "x$path" != "x$new_path"; then
27006     BOOT_JDK="$new_path"
27007     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27008 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27009   fi
27010 
27011     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27012 
27013   path="$BOOT_JDK"
27014   has_colon=`$ECHO $path | $GREP ^.:`
27015   new_path="$path"
27016   if test "x$has_colon" = x; then
27017     # Not in mixed or Windows style, start by that.
27018     new_path=`cmd //c echo $path`
27019   fi
27020 
27021 
27022   input_path="$new_path"
27023   # Check if we need to convert this using DOS-style short mode. If the path
27024   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27025   # take no chances and rewrite it.
27026   # Note: m4 eats our [], so we need to use [ and ] instead.
27027   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27028   if test "x$has_forbidden_chars" != x; then
27029     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27030     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27031   fi
27032 
27033 
27034   windows_path="$new_path"
27035   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27036     unix_path=`$CYGPATH -u "$windows_path"`
27037     new_path="$unix_path"
27038   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27039     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27040     new_path="$unix_path"
27041   fi
27042 
27043   if test "x$path" != "x$new_path"; then
27044     BOOT_JDK="$new_path"
27045     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27046 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27047   fi
27048 
27049   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27050   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27051 
27052     else
27053       # We're on a unix platform. Hooray! :)
27054       path="$BOOT_JDK"
27055       has_space=`$ECHO "$path" | $GREP " "`
27056       if test "x$has_space" != x; then
27057         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27058 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27059         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27060       fi
27061 
27062       # Use eval to expand a potential ~
27063       eval path="$path"
27064       if test ! -f "$path" && test ! -d "$path"; then
27065         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27066       fi
27067 
27068       if test -d "$path"; then
27069         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27070       else
27071         dir="`$DIRNAME "$path"`"
27072         base="`$BASENAME "$path"`"
27073         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27074       fi
27075     fi
27076   fi
27077 
27078             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27079 $as_echo_n "checking for Boot JDK... " >&6; }
27080             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27081 $as_echo "$BOOT_JDK" >&6; }
27082             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27083 $as_echo_n "checking Boot JDK version... " >&6; }
27084             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27085             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27086 $as_echo "$BOOT_JDK_VERSION" >&6; }
27087           fi # end check jdk version
27088         fi # end check javac
27089       fi # end check java
27090     fi # end check boot jdk found
27091   fi
27092 
27093 
27094   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27095 
27096   if test "x$BOOT_JDK_FOUND" = xno; then
27097     # Now execute the test
27098 
27099   # Extract the first word of "javac", so it can be a program name with args.
27100 set dummy javac; ac_word=$2
27101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27102 $as_echo_n "checking for $ac_word... " >&6; }
27103 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27104   $as_echo_n "(cached) " >&6
27105 else
27106   case $JAVAC_CHECK in
27107   [\\/]* | ?:[\\/]*)
27108   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27109   ;;
27110   *)
27111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27112 for as_dir in $PATH
27113 do
27114   IFS=$as_save_IFS
27115   test -z "$as_dir" && as_dir=.
27116     for ac_exec_ext in '' $ac_executable_extensions; do
27117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27118     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27120     break 2
27121   fi
27122 done
27123   done
27124 IFS=$as_save_IFS
27125 
27126   ;;
27127 esac
27128 fi
27129 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27130 if test -n "$JAVAC_CHECK"; then
27131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27132 $as_echo "$JAVAC_CHECK" >&6; }
27133 else
27134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27135 $as_echo "no" >&6; }
27136 fi
27137 
27138 
27139   # Extract the first word of "java", so it can be a program name with args.
27140 set dummy java; ac_word=$2
27141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27142 $as_echo_n "checking for $ac_word... " >&6; }
27143 if ${ac_cv_path_JAVA_CHECK+:} false; then :
27144   $as_echo_n "(cached) " >&6
27145 else
27146   case $JAVA_CHECK in
27147   [\\/]* | ?:[\\/]*)
27148   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27149   ;;
27150   *)
27151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27152 for as_dir in $PATH
27153 do
27154   IFS=$as_save_IFS
27155   test -z "$as_dir" && as_dir=.
27156     for ac_exec_ext in '' $ac_executable_extensions; do
27157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27158     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27160     break 2
27161   fi
27162 done
27163   done
27164 IFS=$as_save_IFS
27165 
27166   ;;
27167 esac
27168 fi
27169 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27170 if test -n "$JAVA_CHECK"; then
27171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27172 $as_echo "$JAVA_CHECK" >&6; }
27173 else
27174   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27175 $as_echo "no" >&6; }
27176 fi
27177 
27178 
27179   BINARY="$JAVAC_CHECK"
27180   if test "x$JAVAC_CHECK" = x; then
27181     BINARY="$JAVA_CHECK"
27182   fi
27183   if test "x$BINARY" != x; then
27184     # So there is a java(c) binary, it might be part of a JDK.
27185     # Lets find the JDK/JRE directory by following symbolic links.
27186     # Linux/GNU systems often have links from /usr/bin/java to
27187     # /etc/alternatives/java to the real JDK binary.
27188 
27189   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27190     # Follow a chain of symbolic links. Use readlink
27191     # where it exists, else fall back to horribly
27192     # complicated shell code.
27193     if test "x$READLINK_TESTED" != yes; then
27194       # On MacOSX there is a readlink tool with a different
27195       # purpose than the GNU readlink tool. Check the found readlink.
27196       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27197       if test "x$ISGNU" = x; then
27198         # A readlink that we do not know how to use.
27199         # Are there other non-GNU readlinks out there?
27200         READLINK_TESTED=yes
27201         READLINK=
27202       fi
27203     fi
27204 
27205     if test "x$READLINK" != x; then
27206       BINARY=`$READLINK -f $BINARY`
27207     else
27208       # Save the current directory for restoring afterwards
27209       STARTDIR=$PWD
27210       COUNTER=0
27211       sym_link_dir=`$DIRNAME $BINARY`
27212       sym_link_file=`$BASENAME $BINARY`
27213       cd $sym_link_dir
27214       # Use -P flag to resolve symlinks in directories.
27215       cd `$THEPWDCMD -P`
27216       sym_link_dir=`$THEPWDCMD -P`
27217       # Resolve file symlinks
27218       while test $COUNTER -lt 20; do
27219         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27220         if test "x$ISLINK" == x; then
27221           # This is not a symbolic link! We are done!
27222           break
27223         fi
27224         # Again resolve directory symlinks since the target of the just found
27225         # link could be in a different directory
27226         cd `$DIRNAME $ISLINK`
27227         sym_link_dir=`$THEPWDCMD -P`
27228         sym_link_file=`$BASENAME $ISLINK`
27229         let COUNTER=COUNTER+1
27230       done
27231       cd $STARTDIR
27232       BINARY=$sym_link_dir/$sym_link_file
27233     fi
27234   fi
27235 
27236     BOOT_JDK=`dirname "$BINARY"`
27237     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27238     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27239       # Looks like we found ourselves an JDK
27240       BOOT_JDK_FOUND=maybe
27241       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27242 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27243     fi
27244   fi
27245 
27246 
27247     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27248     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27249       # Do we have a bin/java?
27250       if test ! -x "$BOOT_JDK/bin/java"; then
27251         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27252 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27253         BOOT_JDK_FOUND=no
27254       else
27255         # Do we have a bin/javac?
27256         if test ! -x "$BOOT_JDK/bin/javac"; then
27257           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27259           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27260 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27261           BOOT_JDK_FOUND=no
27262         else
27263           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27264           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27265 
27266           # Extra M4 quote needed to protect [] in grep expression.
27267           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27268           if test "x$FOUND_CORRECT_VERSION" = x; then
27269             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27270 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27271             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27272 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27273             BOOT_JDK_FOUND=no
27274           else
27275             # We're done! :-)
27276             BOOT_JDK_FOUND=yes
27277 
27278   # Only process if variable expands to non-empty
27279 
27280   if test "x$BOOT_JDK" != x; then
27281     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27282 
27283   # Input might be given as Windows format, start by converting to
27284   # unix format.
27285   path="$BOOT_JDK"
27286   new_path=`$CYGPATH -u "$path"`
27287 
27288   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27289   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27290   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27291   # "foo.exe" is OK but "foo" is an error.
27292   #
27293   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27294   # It is also a way to make sure we got the proper file name for the real test later on.
27295   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27296   if test "x$test_shortpath" = x; then
27297     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27298 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27299     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27300   fi
27301 
27302   # Call helper function which possibly converts this using DOS-style short mode.
27303   # If so, the updated path is stored in $new_path.
27304 
27305   input_path="$new_path"
27306   # Check if we need to convert this using DOS-style short mode. If the path
27307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27308   # take no chances and rewrite it.
27309   # Note: m4 eats our [], so we need to use [ and ] instead.
27310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27311   if test "x$has_forbidden_chars" != x; then
27312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27313     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27314     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27315     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27316       # Going to short mode and back again did indeed matter. Since short mode is
27317       # case insensitive, let's make it lowercase to improve readability.
27318       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27319       # Now convert it back to Unix-style (cygpath)
27320       input_path=`$CYGPATH -u "$shortmode_path"`
27321       new_path="$input_path"
27322     fi
27323   fi
27324 
27325   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27326   if test "x$test_cygdrive_prefix" = x; then
27327     # As a simple fix, exclude /usr/bin since it's not a real path.
27328     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27329       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27330       # a path prefixed by /cygdrive for fixpath to work.
27331       new_path="$CYGWIN_ROOT_PATH$input_path"
27332     fi
27333   fi
27334 
27335 
27336   if test "x$path" != "x$new_path"; then
27337     BOOT_JDK="$new_path"
27338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27339 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27340   fi
27341 
27342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27343 
27344   path="$BOOT_JDK"
27345   has_colon=`$ECHO $path | $GREP ^.:`
27346   new_path="$path"
27347   if test "x$has_colon" = x; then
27348     # Not in mixed or Windows style, start by that.
27349     new_path=`cmd //c echo $path`
27350   fi
27351 
27352 
27353   input_path="$new_path"
27354   # Check if we need to convert this using DOS-style short mode. If the path
27355   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27356   # take no chances and rewrite it.
27357   # Note: m4 eats our [], so we need to use [ and ] instead.
27358   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27359   if test "x$has_forbidden_chars" != x; then
27360     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27361     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27362   fi
27363 
27364 
27365   windows_path="$new_path"
27366   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27367     unix_path=`$CYGPATH -u "$windows_path"`
27368     new_path="$unix_path"
27369   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27370     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27371     new_path="$unix_path"
27372   fi
27373 
27374   if test "x$path" != "x$new_path"; then
27375     BOOT_JDK="$new_path"
27376     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27377 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27378   fi
27379 
27380   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27381   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27382 
27383     else
27384       # We're on a unix platform. Hooray! :)
27385       path="$BOOT_JDK"
27386       has_space=`$ECHO "$path" | $GREP " "`
27387       if test "x$has_space" != x; then
27388         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27389 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27390         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27391       fi
27392 
27393       # Use eval to expand a potential ~
27394       eval path="$path"
27395       if test ! -f "$path" && test ! -d "$path"; then
27396         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27397       fi
27398 
27399       if test -d "$path"; then
27400         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27401       else
27402         dir="`$DIRNAME "$path"`"
27403         base="`$BASENAME "$path"`"
27404         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27405       fi
27406     fi
27407   fi
27408 
27409             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27410 $as_echo_n "checking for Boot JDK... " >&6; }
27411             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27412 $as_echo "$BOOT_JDK" >&6; }
27413             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27414 $as_echo_n "checking Boot JDK version... " >&6; }
27415             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27416             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27417 $as_echo "$BOOT_JDK_VERSION" >&6; }
27418           fi # end check jdk version
27419         fi # end check javac
27420       fi # end check java
27421     fi # end check boot jdk found
27422   fi
27423 
27424 
27425   # Test: Is there a JDK installed in default, well-known locations?
27426 
27427   if test "x$BOOT_JDK_FOUND" = xno; then
27428     # Now execute the test
27429 
27430   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27431 
27432   if test "x$BOOT_JDK_FOUND" = xno; then
27433     # Now execute the test
27434 
27435   if test "x$ProgramW6432" != x; then
27436     VIRTUAL_DIR="$ProgramW6432/Java"
27437 
27438   windows_path="$VIRTUAL_DIR"
27439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27440     unix_path=`$CYGPATH -u "$windows_path"`
27441     VIRTUAL_DIR="$unix_path"
27442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27444     VIRTUAL_DIR="$unix_path"
27445   fi
27446 
27447 
27448   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27449   BOOT_JDK_SUFFIX=""
27450   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27451   if test "x$ALL_JDKS_FOUND" != x; then
27452     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27453 
27454   if test "x$BOOT_JDK_FOUND" = xno; then
27455     # Now execute the test
27456 
27457         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27458         if test -d "$BOOT_JDK"; then
27459           BOOT_JDK_FOUND=maybe
27460           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27461 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27462         fi
27463 
27464 
27465     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27466     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27467       # Do we have a bin/java?
27468       if test ! -x "$BOOT_JDK/bin/java"; then
27469         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27470 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27471         BOOT_JDK_FOUND=no
27472       else
27473         # Do we have a bin/javac?
27474         if test ! -x "$BOOT_JDK/bin/javac"; then
27475           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27476 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27477           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27478 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27479           BOOT_JDK_FOUND=no
27480         else
27481           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27482           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27483 
27484           # Extra M4 quote needed to protect [] in grep expression.
27485           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27486           if test "x$FOUND_CORRECT_VERSION" = x; then
27487             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27488 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27489             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27490 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27491             BOOT_JDK_FOUND=no
27492           else
27493             # We're done! :-)
27494             BOOT_JDK_FOUND=yes
27495 
27496   # Only process if variable expands to non-empty
27497 
27498   if test "x$BOOT_JDK" != x; then
27499     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27500 
27501   # Input might be given as Windows format, start by converting to
27502   # unix format.
27503   path="$BOOT_JDK"
27504   new_path=`$CYGPATH -u "$path"`
27505 
27506   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27507   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27508   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27509   # "foo.exe" is OK but "foo" is an error.
27510   #
27511   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27512   # It is also a way to make sure we got the proper file name for the real test later on.
27513   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27514   if test "x$test_shortpath" = x; then
27515     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27516 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27517     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27518   fi
27519 
27520   # Call helper function which possibly converts this using DOS-style short mode.
27521   # If so, the updated path is stored in $new_path.
27522 
27523   input_path="$new_path"
27524   # Check if we need to convert this using DOS-style short mode. If the path
27525   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27526   # take no chances and rewrite it.
27527   # Note: m4 eats our [], so we need to use [ and ] instead.
27528   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27529   if test "x$has_forbidden_chars" != x; then
27530     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27531     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27532     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27533     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27534       # Going to short mode and back again did indeed matter. Since short mode is
27535       # case insensitive, let's make it lowercase to improve readability.
27536       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27537       # Now convert it back to Unix-style (cygpath)
27538       input_path=`$CYGPATH -u "$shortmode_path"`
27539       new_path="$input_path"
27540     fi
27541   fi
27542 
27543   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27544   if test "x$test_cygdrive_prefix" = x; then
27545     # As a simple fix, exclude /usr/bin since it's not a real path.
27546     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27547       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27548       # a path prefixed by /cygdrive for fixpath to work.
27549       new_path="$CYGWIN_ROOT_PATH$input_path"
27550     fi
27551   fi
27552 
27553 
27554   if test "x$path" != "x$new_path"; then
27555     BOOT_JDK="$new_path"
27556     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27557 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27558   fi
27559 
27560     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27561 
27562   path="$BOOT_JDK"
27563   has_colon=`$ECHO $path | $GREP ^.:`
27564   new_path="$path"
27565   if test "x$has_colon" = x; then
27566     # Not in mixed or Windows style, start by that.
27567     new_path=`cmd //c echo $path`
27568   fi
27569 
27570 
27571   input_path="$new_path"
27572   # Check if we need to convert this using DOS-style short mode. If the path
27573   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27574   # take no chances and rewrite it.
27575   # Note: m4 eats our [], so we need to use [ and ] instead.
27576   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27577   if test "x$has_forbidden_chars" != x; then
27578     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27579     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27580   fi
27581 
27582 
27583   windows_path="$new_path"
27584   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27585     unix_path=`$CYGPATH -u "$windows_path"`
27586     new_path="$unix_path"
27587   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27588     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27589     new_path="$unix_path"
27590   fi
27591 
27592   if test "x$path" != "x$new_path"; then
27593     BOOT_JDK="$new_path"
27594     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27595 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27596   fi
27597 
27598   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27599   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27600 
27601     else
27602       # We're on a unix platform. Hooray! :)
27603       path="$BOOT_JDK"
27604       has_space=`$ECHO "$path" | $GREP " "`
27605       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
27609       fi
27610 
27611       # Use eval to expand a potential ~
27612       eval path="$path"
27613       if test ! -f "$path" && test ! -d "$path"; then
27614         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27615       fi
27616 
27617       if test -d "$path"; then
27618         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27619       else
27620         dir="`$DIRNAME "$path"`"
27621         base="`$BASENAME "$path"`"
27622         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27623       fi
27624     fi
27625   fi
27626 
27627             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27628 $as_echo_n "checking for Boot JDK... " >&6; }
27629             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27630 $as_echo "$BOOT_JDK" >&6; }
27631             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27632 $as_echo_n "checking Boot JDK version... " >&6; }
27633             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27634             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27635 $as_echo "$BOOT_JDK_VERSION" >&6; }
27636           fi # end check jdk version
27637         fi # end check javac
27638       fi # end check java
27639     fi # end check boot jdk found
27640   fi
27641 
27642     done
27643   fi
27644 
27645   fi
27646 
27647 
27648     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27649     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27650       # Do we have a bin/java?
27651       if test ! -x "$BOOT_JDK/bin/java"; then
27652         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27653 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27654         BOOT_JDK_FOUND=no
27655       else
27656         # Do we have a bin/javac?
27657         if test ! -x "$BOOT_JDK/bin/javac"; then
27658           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27659 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27660           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27661 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27662           BOOT_JDK_FOUND=no
27663         else
27664           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27665           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27666 
27667           # Extra M4 quote needed to protect [] in grep expression.
27668           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27669           if test "x$FOUND_CORRECT_VERSION" = x; then
27670             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27671 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27672             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27673 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27674             BOOT_JDK_FOUND=no
27675           else
27676             # We're done! :-)
27677             BOOT_JDK_FOUND=yes
27678 
27679   # Only process if variable expands to non-empty
27680 
27681   if test "x$BOOT_JDK" != x; then
27682     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27683 
27684   # Input might be given as Windows format, start by converting to
27685   # unix format.
27686   path="$BOOT_JDK"
27687   new_path=`$CYGPATH -u "$path"`
27688 
27689   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27690   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27691   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27692   # "foo.exe" is OK but "foo" is an error.
27693   #
27694   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27695   # It is also a way to make sure we got the proper file name for the real test later on.
27696   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27697   if test "x$test_shortpath" = x; then
27698     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27699 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27700     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27701   fi
27702 
27703   # Call helper function which possibly converts this using DOS-style short mode.
27704   # If so, the updated path is stored in $new_path.
27705 
27706   input_path="$new_path"
27707   # Check if we need to convert this using DOS-style short mode. If the path
27708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27709   # take no chances and rewrite it.
27710   # Note: m4 eats our [], so we need to use [ and ] instead.
27711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27712   if test "x$has_forbidden_chars" != x; then
27713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27714     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27715     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27716     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27717       # Going to short mode and back again did indeed matter. Since short mode is
27718       # case insensitive, let's make it lowercase to improve readability.
27719       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27720       # Now convert it back to Unix-style (cygpath)
27721       input_path=`$CYGPATH -u "$shortmode_path"`
27722       new_path="$input_path"
27723     fi
27724   fi
27725 
27726   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27727   if test "x$test_cygdrive_prefix" = x; then
27728     # As a simple fix, exclude /usr/bin since it's not a real path.
27729     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27730       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27731       # a path prefixed by /cygdrive for fixpath to work.
27732       new_path="$CYGWIN_ROOT_PATH$input_path"
27733     fi
27734   fi
27735 
27736 
27737   if test "x$path" != "x$new_path"; then
27738     BOOT_JDK="$new_path"
27739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27740 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27741   fi
27742 
27743     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27744 
27745   path="$BOOT_JDK"
27746   has_colon=`$ECHO $path | $GREP ^.:`
27747   new_path="$path"
27748   if test "x$has_colon" = x; then
27749     # Not in mixed or Windows style, start by that.
27750     new_path=`cmd //c echo $path`
27751   fi
27752 
27753 
27754   input_path="$new_path"
27755   # Check if we need to convert this using DOS-style short mode. If the path
27756   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27757   # take no chances and rewrite it.
27758   # Note: m4 eats our [], so we need to use [ and ] instead.
27759   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27760   if test "x$has_forbidden_chars" != x; then
27761     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27762     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27763   fi
27764 
27765 
27766   windows_path="$new_path"
27767   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27768     unix_path=`$CYGPATH -u "$windows_path"`
27769     new_path="$unix_path"
27770   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27771     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27772     new_path="$unix_path"
27773   fi
27774 
27775   if test "x$path" != "x$new_path"; then
27776     BOOT_JDK="$new_path"
27777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27778 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27779   fi
27780 
27781   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27782   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27783 
27784     else
27785       # We're on a unix platform. Hooray! :)
27786       path="$BOOT_JDK"
27787       has_space=`$ECHO "$path" | $GREP " "`
27788       if test "x$has_space" != x; then
27789         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27790 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27791         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27792       fi
27793 
27794       # Use eval to expand a potential ~
27795       eval path="$path"
27796       if test ! -f "$path" && test ! -d "$path"; then
27797         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27798       fi
27799 
27800       if test -d "$path"; then
27801         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27802       else
27803         dir="`$DIRNAME "$path"`"
27804         base="`$BASENAME "$path"`"
27805         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27806       fi
27807     fi
27808   fi
27809 
27810             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27811 $as_echo_n "checking for Boot JDK... " >&6; }
27812             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27813 $as_echo "$BOOT_JDK" >&6; }
27814             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27815 $as_echo_n "checking Boot JDK version... " >&6; }
27816             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27817             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27818 $as_echo "$BOOT_JDK_VERSION" >&6; }
27819           fi # end check jdk version
27820         fi # end check javac
27821       fi # end check java
27822     fi # end check boot jdk found
27823   fi
27824 
27825 
27826   if test "x$BOOT_JDK_FOUND" = xno; then
27827     # Now execute the test
27828 
27829   if test "x$PROGRAMW6432" != x; then
27830     VIRTUAL_DIR="$PROGRAMW6432/Java"
27831 
27832   windows_path="$VIRTUAL_DIR"
27833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27834     unix_path=`$CYGPATH -u "$windows_path"`
27835     VIRTUAL_DIR="$unix_path"
27836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27838     VIRTUAL_DIR="$unix_path"
27839   fi
27840 
27841 
27842   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27843   BOOT_JDK_SUFFIX=""
27844   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27845   if test "x$ALL_JDKS_FOUND" != x; then
27846     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27847 
27848   if test "x$BOOT_JDK_FOUND" = xno; then
27849     # Now execute the test
27850 
27851         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27852         if test -d "$BOOT_JDK"; then
27853           BOOT_JDK_FOUND=maybe
27854           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27855 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27856         fi
27857 
27858 
27859     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27860     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27861       # Do we have a bin/java?
27862       if test ! -x "$BOOT_JDK/bin/java"; then
27863         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27864 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27865         BOOT_JDK_FOUND=no
27866       else
27867         # Do we have a bin/javac?
27868         if test ! -x "$BOOT_JDK/bin/javac"; then
27869           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27870 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27871           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27872 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27873           BOOT_JDK_FOUND=no
27874         else
27875           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27876           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27877 
27878           # Extra M4 quote needed to protect [] in grep expression.
27879           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
27880           if test "x$FOUND_CORRECT_VERSION" = x; then
27881             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27882 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27883             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
27884 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
27885             BOOT_JDK_FOUND=no
27886           else
27887             # We're done! :-)
27888             BOOT_JDK_FOUND=yes
27889 
27890   # Only process if variable expands to non-empty
27891 
27892   if test "x$BOOT_JDK" != x; then
27893     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27894 
27895   # Input might be given as Windows format, start by converting to
27896   # unix format.
27897   path="$BOOT_JDK"
27898   new_path=`$CYGPATH -u "$path"`
27899 
27900   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27901   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27902   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27903   # "foo.exe" is OK but "foo" is an error.
27904   #
27905   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27906   # It is also a way to make sure we got the proper file name for the real test later on.
27907   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27908   if test "x$test_shortpath" = x; then
27909     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27910 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27911     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27912   fi
27913 
27914   # Call helper function which possibly converts this using DOS-style short mode.
27915   # If so, the updated path is stored in $new_path.
27916 
27917   input_path="$new_path"
27918   # Check if we need to convert this using DOS-style short mode. If the path
27919   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27920   # take no chances and rewrite it.
27921   # Note: m4 eats our [], so we need to use [ and ] instead.
27922   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27923   if test "x$has_forbidden_chars" != x; then
27924     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27925     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27926     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27927     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27928       # Going to short mode and back again did indeed matter. Since short mode is
27929       # case insensitive, let's make it lowercase to improve readability.
27930       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27931       # Now convert it back to Unix-style (cygpath)
27932       input_path=`$CYGPATH -u "$shortmode_path"`
27933       new_path="$input_path"
27934     fi
27935   fi
27936 
27937   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27938   if test "x$test_cygdrive_prefix" = x; then
27939     # As a simple fix, exclude /usr/bin since it's not a real path.
27940     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27941       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27942       # a path prefixed by /cygdrive for fixpath to work.
27943       new_path="$CYGWIN_ROOT_PATH$input_path"
27944     fi
27945   fi
27946 
27947 
27948   if test "x$path" != "x$new_path"; then
27949     BOOT_JDK="$new_path"
27950     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27951 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27952   fi
27953 
27954     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27955 
27956   path="$BOOT_JDK"
27957   has_colon=`$ECHO $path | $GREP ^.:`
27958   new_path="$path"
27959   if test "x$has_colon" = x; then
27960     # Not in mixed or Windows style, start by that.
27961     new_path=`cmd //c echo $path`
27962   fi
27963 
27964 
27965   input_path="$new_path"
27966   # Check if we need to convert this using DOS-style short mode. If the path
27967   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27968   # take no chances and rewrite it.
27969   # Note: m4 eats our [], so we need to use [ and ] instead.
27970   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27971   if test "x$has_forbidden_chars" != x; then
27972     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27973     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27974   fi
27975 
27976 
27977   windows_path="$new_path"
27978   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27979     unix_path=`$CYGPATH -u "$windows_path"`
27980     new_path="$unix_path"
27981   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27982     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27983     new_path="$unix_path"
27984   fi
27985 
27986   if test "x$path" != "x$new_path"; then
27987     BOOT_JDK="$new_path"
27988     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27989 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27990   fi
27991 
27992   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27993   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27994 
27995     else
27996       # We're on a unix platform. Hooray! :)
27997       path="$BOOT_JDK"
27998       has_space=`$ECHO "$path" | $GREP " "`
27999       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
28003       fi
28004 
28005       # Use eval to expand a potential ~
28006       eval path="$path"
28007       if test ! -f "$path" && test ! -d "$path"; then
28008         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28009       fi
28010 
28011       if test -d "$path"; then
28012         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28013       else
28014         dir="`$DIRNAME "$path"`"
28015         base="`$BASENAME "$path"`"
28016         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28017       fi
28018     fi
28019   fi
28020 
28021             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28022 $as_echo_n "checking for Boot JDK... " >&6; }
28023             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28024 $as_echo "$BOOT_JDK" >&6; }
28025             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28026 $as_echo_n "checking Boot JDK version... " >&6; }
28027             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28028             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28029 $as_echo "$BOOT_JDK_VERSION" >&6; }
28030           fi # end check jdk version
28031         fi # end check javac
28032       fi # end check java
28033     fi # end check boot jdk found
28034   fi
28035 
28036     done
28037   fi
28038 
28039   fi
28040 
28041 
28042     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28043     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28044       # Do we have a bin/java?
28045       if test ! -x "$BOOT_JDK/bin/java"; then
28046         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28047 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28048         BOOT_JDK_FOUND=no
28049       else
28050         # Do we have a bin/javac?
28051         if test ! -x "$BOOT_JDK/bin/javac"; then
28052           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28053 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28054           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28055 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28056           BOOT_JDK_FOUND=no
28057         else
28058           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28059           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28060 
28061           # Extra M4 quote needed to protect [] in grep expression.
28062           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28063           if test "x$FOUND_CORRECT_VERSION" = x; then
28064             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28065 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28066             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28067 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28068             BOOT_JDK_FOUND=no
28069           else
28070             # We're done! :-)
28071             BOOT_JDK_FOUND=yes
28072 
28073   # Only process if variable expands to non-empty
28074 
28075   if test "x$BOOT_JDK" != x; then
28076     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28077 
28078   # Input might be given as Windows format, start by converting to
28079   # unix format.
28080   path="$BOOT_JDK"
28081   new_path=`$CYGPATH -u "$path"`
28082 
28083   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28084   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28085   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28086   # "foo.exe" is OK but "foo" is an error.
28087   #
28088   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28089   # It is also a way to make sure we got the proper file name for the real test later on.
28090   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28091   if test "x$test_shortpath" = x; then
28092     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28093 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28094     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28095   fi
28096 
28097   # Call helper function which possibly converts this using DOS-style short mode.
28098   # If so, the updated path is stored in $new_path.
28099 
28100   input_path="$new_path"
28101   # Check if we need to convert this using DOS-style short mode. If the path
28102   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28103   # take no chances and rewrite it.
28104   # Note: m4 eats our [], so we need to use [ and ] instead.
28105   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28106   if test "x$has_forbidden_chars" != x; then
28107     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28108     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28109     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28110     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28111       # Going to short mode and back again did indeed matter. Since short mode is
28112       # case insensitive, let's make it lowercase to improve readability.
28113       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28114       # Now convert it back to Unix-style (cygpath)
28115       input_path=`$CYGPATH -u "$shortmode_path"`
28116       new_path="$input_path"
28117     fi
28118   fi
28119 
28120   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28121   if test "x$test_cygdrive_prefix" = x; then
28122     # As a simple fix, exclude /usr/bin since it's not a real path.
28123     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28124       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28125       # a path prefixed by /cygdrive for fixpath to work.
28126       new_path="$CYGWIN_ROOT_PATH$input_path"
28127     fi
28128   fi
28129 
28130 
28131   if test "x$path" != "x$new_path"; then
28132     BOOT_JDK="$new_path"
28133     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28134 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28135   fi
28136 
28137     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28138 
28139   path="$BOOT_JDK"
28140   has_colon=`$ECHO $path | $GREP ^.:`
28141   new_path="$path"
28142   if test "x$has_colon" = x; then
28143     # Not in mixed or Windows style, start by that.
28144     new_path=`cmd //c echo $path`
28145   fi
28146 
28147 
28148   input_path="$new_path"
28149   # Check if we need to convert this using DOS-style short mode. If the path
28150   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28151   # take no chances and rewrite it.
28152   # Note: m4 eats our [], so we need to use [ and ] instead.
28153   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28154   if test "x$has_forbidden_chars" != x; then
28155     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28156     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28157   fi
28158 
28159 
28160   windows_path="$new_path"
28161   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28162     unix_path=`$CYGPATH -u "$windows_path"`
28163     new_path="$unix_path"
28164   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28165     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28166     new_path="$unix_path"
28167   fi
28168 
28169   if test "x$path" != "x$new_path"; then
28170     BOOT_JDK="$new_path"
28171     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28172 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28173   fi
28174 
28175   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28176   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28177 
28178     else
28179       # We're on a unix platform. Hooray! :)
28180       path="$BOOT_JDK"
28181       has_space=`$ECHO "$path" | $GREP " "`
28182       if test "x$has_space" != x; then
28183         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28184 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28185         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28186       fi
28187 
28188       # Use eval to expand a potential ~
28189       eval path="$path"
28190       if test ! -f "$path" && test ! -d "$path"; then
28191         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28192       fi
28193 
28194       if test -d "$path"; then
28195         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28196       else
28197         dir="`$DIRNAME "$path"`"
28198         base="`$BASENAME "$path"`"
28199         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28200       fi
28201     fi
28202   fi
28203 
28204             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28205 $as_echo_n "checking for Boot JDK... " >&6; }
28206             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28207 $as_echo "$BOOT_JDK" >&6; }
28208             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28209 $as_echo_n "checking Boot JDK version... " >&6; }
28210             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28211             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28212 $as_echo "$BOOT_JDK_VERSION" >&6; }
28213           fi # end check jdk version
28214         fi # end check javac
28215       fi # end check java
28216     fi # end check boot jdk found
28217   fi
28218 
28219 
28220   if test "x$BOOT_JDK_FOUND" = xno; then
28221     # Now execute the test
28222 
28223   if test "x$PROGRAMFILES" != x; then
28224     VIRTUAL_DIR="$PROGRAMFILES/Java"
28225 
28226   windows_path="$VIRTUAL_DIR"
28227   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28228     unix_path=`$CYGPATH -u "$windows_path"`
28229     VIRTUAL_DIR="$unix_path"
28230   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28231     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28232     VIRTUAL_DIR="$unix_path"
28233   fi
28234 
28235 
28236   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28237   BOOT_JDK_SUFFIX=""
28238   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28239   if test "x$ALL_JDKS_FOUND" != x; then
28240     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28241 
28242   if test "x$BOOT_JDK_FOUND" = xno; then
28243     # Now execute the test
28244 
28245         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28246         if test -d "$BOOT_JDK"; then
28247           BOOT_JDK_FOUND=maybe
28248           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28249 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28250         fi
28251 
28252 
28253     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28254     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28255       # Do we have a bin/java?
28256       if test ! -x "$BOOT_JDK/bin/java"; then
28257         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28258 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28259         BOOT_JDK_FOUND=no
28260       else
28261         # Do we have a bin/javac?
28262         if test ! -x "$BOOT_JDK/bin/javac"; then
28263           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28264 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28265           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28266 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28267           BOOT_JDK_FOUND=no
28268         else
28269           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28270           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28271 
28272           # Extra M4 quote needed to protect [] in grep expression.
28273           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28274           if test "x$FOUND_CORRECT_VERSION" = x; then
28275             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28276 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28277             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28278 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28279             BOOT_JDK_FOUND=no
28280           else
28281             # We're done! :-)
28282             BOOT_JDK_FOUND=yes
28283 
28284   # Only process if variable expands to non-empty
28285 
28286   if test "x$BOOT_JDK" != x; then
28287     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28288 
28289   # Input might be given as Windows format, start by converting to
28290   # unix format.
28291   path="$BOOT_JDK"
28292   new_path=`$CYGPATH -u "$path"`
28293 
28294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28297   # "foo.exe" is OK but "foo" is an error.
28298   #
28299   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28300   # It is also a way to make sure we got the proper file name for the real test later on.
28301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28302   if test "x$test_shortpath" = x; then
28303     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28304 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28305     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28306   fi
28307 
28308   # Call helper function which possibly converts this using DOS-style short mode.
28309   # If so, the updated path is stored in $new_path.
28310 
28311   input_path="$new_path"
28312   # Check if we need to convert this using DOS-style short mode. If the path
28313   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28314   # take no chances and rewrite it.
28315   # Note: m4 eats our [], so we need to use [ and ] instead.
28316   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28317   if test "x$has_forbidden_chars" != x; then
28318     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28319     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28320     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28321     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28322       # Going to short mode and back again did indeed matter. Since short mode is
28323       # case insensitive, let's make it lowercase to improve readability.
28324       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28325       # Now convert it back to Unix-style (cygpath)
28326       input_path=`$CYGPATH -u "$shortmode_path"`
28327       new_path="$input_path"
28328     fi
28329   fi
28330 
28331   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28332   if test "x$test_cygdrive_prefix" = x; then
28333     # As a simple fix, exclude /usr/bin since it's not a real path.
28334     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28335       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28336       # a path prefixed by /cygdrive for fixpath to work.
28337       new_path="$CYGWIN_ROOT_PATH$input_path"
28338     fi
28339   fi
28340 
28341 
28342   if test "x$path" != "x$new_path"; then
28343     BOOT_JDK="$new_path"
28344     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28345 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28346   fi
28347 
28348     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28349 
28350   path="$BOOT_JDK"
28351   has_colon=`$ECHO $path | $GREP ^.:`
28352   new_path="$path"
28353   if test "x$has_colon" = x; then
28354     # Not in mixed or Windows style, start by that.
28355     new_path=`cmd //c echo $path`
28356   fi
28357 
28358 
28359   input_path="$new_path"
28360   # Check if we need to convert this using DOS-style short mode. If the path
28361   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28362   # take no chances and rewrite it.
28363   # Note: m4 eats our [], so we need to use [ and ] instead.
28364   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28365   if test "x$has_forbidden_chars" != x; then
28366     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28367     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28368   fi
28369 
28370 
28371   windows_path="$new_path"
28372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28373     unix_path=`$CYGPATH -u "$windows_path"`
28374     new_path="$unix_path"
28375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28377     new_path="$unix_path"
28378   fi
28379 
28380   if test "x$path" != "x$new_path"; then
28381     BOOT_JDK="$new_path"
28382     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28383 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28384   fi
28385 
28386   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28387   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28388 
28389     else
28390       # We're on a unix platform. Hooray! :)
28391       path="$BOOT_JDK"
28392       has_space=`$ECHO "$path" | $GREP " "`
28393       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
28397       fi
28398 
28399       # Use eval to expand a potential ~
28400       eval path="$path"
28401       if test ! -f "$path" && test ! -d "$path"; then
28402         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28403       fi
28404 
28405       if test -d "$path"; then
28406         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28407       else
28408         dir="`$DIRNAME "$path"`"
28409         base="`$BASENAME "$path"`"
28410         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28411       fi
28412     fi
28413   fi
28414 
28415             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28416 $as_echo_n "checking for Boot JDK... " >&6; }
28417             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28418 $as_echo "$BOOT_JDK" >&6; }
28419             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28420 $as_echo_n "checking Boot JDK version... " >&6; }
28421             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28422             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28423 $as_echo "$BOOT_JDK_VERSION" >&6; }
28424           fi # end check jdk version
28425         fi # end check javac
28426       fi # end check java
28427     fi # end check boot jdk found
28428   fi
28429 
28430     done
28431   fi
28432 
28433   fi
28434 
28435 
28436     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28437     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28438       # Do we have a bin/java?
28439       if test ! -x "$BOOT_JDK/bin/java"; then
28440         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28441 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28442         BOOT_JDK_FOUND=no
28443       else
28444         # Do we have a bin/javac?
28445         if test ! -x "$BOOT_JDK/bin/javac"; then
28446           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28448           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28449 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28450           BOOT_JDK_FOUND=no
28451         else
28452           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28453           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28454 
28455           # Extra M4 quote needed to protect [] in grep expression.
28456           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28457           if test "x$FOUND_CORRECT_VERSION" = x; then
28458             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28459 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28460             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28461 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28462             BOOT_JDK_FOUND=no
28463           else
28464             # We're done! :-)
28465             BOOT_JDK_FOUND=yes
28466 
28467   # Only process if variable expands to non-empty
28468 
28469   if test "x$BOOT_JDK" != x; then
28470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471 
28472   # Input might be given as Windows format, start by converting to
28473   # unix format.
28474   path="$BOOT_JDK"
28475   new_path=`$CYGPATH -u "$path"`
28476 
28477   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28478   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28479   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28480   # "foo.exe" is OK but "foo" is an error.
28481   #
28482   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28483   # It is also a way to make sure we got the proper file name for the real test later on.
28484   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28485   if test "x$test_shortpath" = x; then
28486     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28487 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28488     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28489   fi
28490 
28491   # Call helper function which possibly converts this using DOS-style short mode.
28492   # If so, the updated path is stored in $new_path.
28493 
28494   input_path="$new_path"
28495   # Check if we need to convert this using DOS-style short mode. If the path
28496   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28497   # take no chances and rewrite it.
28498   # Note: m4 eats our [], so we need to use [ and ] instead.
28499   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28500   if test "x$has_forbidden_chars" != x; then
28501     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28502     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28503     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28504     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28505       # Going to short mode and back again did indeed matter. Since short mode is
28506       # case insensitive, let's make it lowercase to improve readability.
28507       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28508       # Now convert it back to Unix-style (cygpath)
28509       input_path=`$CYGPATH -u "$shortmode_path"`
28510       new_path="$input_path"
28511     fi
28512   fi
28513 
28514   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28515   if test "x$test_cygdrive_prefix" = x; then
28516     # As a simple fix, exclude /usr/bin since it's not a real path.
28517     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28518       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28519       # a path prefixed by /cygdrive for fixpath to work.
28520       new_path="$CYGWIN_ROOT_PATH$input_path"
28521     fi
28522   fi
28523 
28524 
28525   if test "x$path" != "x$new_path"; then
28526     BOOT_JDK="$new_path"
28527     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28528 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28529   fi
28530 
28531     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28532 
28533   path="$BOOT_JDK"
28534   has_colon=`$ECHO $path | $GREP ^.:`
28535   new_path="$path"
28536   if test "x$has_colon" = x; then
28537     # Not in mixed or Windows style, start by that.
28538     new_path=`cmd //c echo $path`
28539   fi
28540 
28541 
28542   input_path="$new_path"
28543   # Check if we need to convert this using DOS-style short mode. If the path
28544   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28545   # take no chances and rewrite it.
28546   # Note: m4 eats our [], so we need to use [ and ] instead.
28547   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28548   if test "x$has_forbidden_chars" != x; then
28549     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28550     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28551   fi
28552 
28553 
28554   windows_path="$new_path"
28555   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28556     unix_path=`$CYGPATH -u "$windows_path"`
28557     new_path="$unix_path"
28558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28560     new_path="$unix_path"
28561   fi
28562 
28563   if test "x$path" != "x$new_path"; then
28564     BOOT_JDK="$new_path"
28565     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28566 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28567   fi
28568 
28569   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28570   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28571 
28572     else
28573       # We're on a unix platform. Hooray! :)
28574       path="$BOOT_JDK"
28575       has_space=`$ECHO "$path" | $GREP " "`
28576       if test "x$has_space" != x; then
28577         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28578 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28579         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28580       fi
28581 
28582       # Use eval to expand a potential ~
28583       eval path="$path"
28584       if test ! -f "$path" && test ! -d "$path"; then
28585         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28586       fi
28587 
28588       if test -d "$path"; then
28589         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28590       else
28591         dir="`$DIRNAME "$path"`"
28592         base="`$BASENAME "$path"`"
28593         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28594       fi
28595     fi
28596   fi
28597 
28598             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28599 $as_echo_n "checking for Boot JDK... " >&6; }
28600             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28601 $as_echo "$BOOT_JDK" >&6; }
28602             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28603 $as_echo_n "checking Boot JDK version... " >&6; }
28604             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28605             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28606 $as_echo "$BOOT_JDK_VERSION" >&6; }
28607           fi # end check jdk version
28608         fi # end check javac
28609       fi # end check java
28610     fi # end check boot jdk found
28611   fi
28612 
28613 
28614   if test "x$BOOT_JDK_FOUND" = xno; then
28615     # Now execute the test
28616 
28617   if test "x$ProgramFiles" != x; then
28618     VIRTUAL_DIR="$ProgramFiles/Java"
28619 
28620   windows_path="$VIRTUAL_DIR"
28621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28622     unix_path=`$CYGPATH -u "$windows_path"`
28623     VIRTUAL_DIR="$unix_path"
28624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28625     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28626     VIRTUAL_DIR="$unix_path"
28627   fi
28628 
28629 
28630   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28631   BOOT_JDK_SUFFIX=""
28632   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28633   if test "x$ALL_JDKS_FOUND" != x; then
28634     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28635 
28636   if test "x$BOOT_JDK_FOUND" = xno; then
28637     # Now execute the test
28638 
28639         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28640         if test -d "$BOOT_JDK"; then
28641           BOOT_JDK_FOUND=maybe
28642           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28643 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28644         fi
28645 
28646 
28647     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28648     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28649       # Do we have a bin/java?
28650       if test ! -x "$BOOT_JDK/bin/java"; then
28651         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28652 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28653         BOOT_JDK_FOUND=no
28654       else
28655         # Do we have a bin/javac?
28656         if test ! -x "$BOOT_JDK/bin/javac"; then
28657           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28658 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28659           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28660 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28661           BOOT_JDK_FOUND=no
28662         else
28663           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28664           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28665 
28666           # Extra M4 quote needed to protect [] in grep expression.
28667           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28668           if test "x$FOUND_CORRECT_VERSION" = x; then
28669             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28670 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28671             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28672 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28673             BOOT_JDK_FOUND=no
28674           else
28675             # We're done! :-)
28676             BOOT_JDK_FOUND=yes
28677 
28678   # Only process if variable expands to non-empty
28679 
28680   if test "x$BOOT_JDK" != x; then
28681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28682 
28683   # Input might be given as Windows format, start by converting to
28684   # unix format.
28685   path="$BOOT_JDK"
28686   new_path=`$CYGPATH -u "$path"`
28687 
28688   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28689   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28690   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28691   # "foo.exe" is OK but "foo" is an error.
28692   #
28693   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28694   # It is also a way to make sure we got the proper file name for the real test later on.
28695   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28696   if test "x$test_shortpath" = x; then
28697     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28698 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28699     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28700   fi
28701 
28702   # Call helper function which possibly converts this using DOS-style short mode.
28703   # If so, the updated path is stored in $new_path.
28704 
28705   input_path="$new_path"
28706   # Check if we need to convert this using DOS-style short mode. If the path
28707   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28708   # take no chances and rewrite it.
28709   # Note: m4 eats our [], so we need to use [ and ] instead.
28710   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28711   if test "x$has_forbidden_chars" != x; then
28712     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28713     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28714     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28715     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28716       # Going to short mode and back again did indeed matter. Since short mode is
28717       # case insensitive, let's make it lowercase to improve readability.
28718       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28719       # Now convert it back to Unix-style (cygpath)
28720       input_path=`$CYGPATH -u "$shortmode_path"`
28721       new_path="$input_path"
28722     fi
28723   fi
28724 
28725   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28726   if test "x$test_cygdrive_prefix" = x; then
28727     # As a simple fix, exclude /usr/bin since it's not a real path.
28728     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28729       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28730       # a path prefixed by /cygdrive for fixpath to work.
28731       new_path="$CYGWIN_ROOT_PATH$input_path"
28732     fi
28733   fi
28734 
28735 
28736   if test "x$path" != "x$new_path"; then
28737     BOOT_JDK="$new_path"
28738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28739 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28740   fi
28741 
28742     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28743 
28744   path="$BOOT_JDK"
28745   has_colon=`$ECHO $path | $GREP ^.:`
28746   new_path="$path"
28747   if test "x$has_colon" = x; then
28748     # Not in mixed or Windows style, start by that.
28749     new_path=`cmd //c echo $path`
28750   fi
28751 
28752 
28753   input_path="$new_path"
28754   # Check if we need to convert this using DOS-style short mode. If the path
28755   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28756   # take no chances and rewrite it.
28757   # Note: m4 eats our [], so we need to use [ and ] instead.
28758   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28759   if test "x$has_forbidden_chars" != x; then
28760     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28761     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28762   fi
28763 
28764 
28765   windows_path="$new_path"
28766   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28767     unix_path=`$CYGPATH -u "$windows_path"`
28768     new_path="$unix_path"
28769   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28770     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28771     new_path="$unix_path"
28772   fi
28773 
28774   if test "x$path" != "x$new_path"; then
28775     BOOT_JDK="$new_path"
28776     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28777 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28778   fi
28779 
28780   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28781   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28782 
28783     else
28784       # We're on a unix platform. Hooray! :)
28785       path="$BOOT_JDK"
28786       has_space=`$ECHO "$path" | $GREP " "`
28787       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
28791       fi
28792 
28793       # Use eval to expand a potential ~
28794       eval path="$path"
28795       if test ! -f "$path" && test ! -d "$path"; then
28796         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28797       fi
28798 
28799       if test -d "$path"; then
28800         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28801       else
28802         dir="`$DIRNAME "$path"`"
28803         base="`$BASENAME "$path"`"
28804         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28805       fi
28806     fi
28807   fi
28808 
28809             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28810 $as_echo_n "checking for Boot JDK... " >&6; }
28811             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28812 $as_echo "$BOOT_JDK" >&6; }
28813             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28814 $as_echo_n "checking Boot JDK version... " >&6; }
28815             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28816             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28817 $as_echo "$BOOT_JDK_VERSION" >&6; }
28818           fi # end check jdk version
28819         fi # end check javac
28820       fi # end check java
28821     fi # end check boot jdk found
28822   fi
28823 
28824     done
28825   fi
28826 
28827   fi
28828 
28829 
28830     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28831     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28832       # Do we have a bin/java?
28833       if test ! -x "$BOOT_JDK/bin/java"; then
28834         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28835 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28836         BOOT_JDK_FOUND=no
28837       else
28838         # Do we have a bin/javac?
28839         if test ! -x "$BOOT_JDK/bin/javac"; then
28840           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28841 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28842           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28843 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28844           BOOT_JDK_FOUND=no
28845         else
28846           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28847           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28848 
28849           # Extra M4 quote needed to protect [] in grep expression.
28850           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
28851           if test "x$FOUND_CORRECT_VERSION" = x; then
28852             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28853 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28854             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
28855 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
28856             BOOT_JDK_FOUND=no
28857           else
28858             # We're done! :-)
28859             BOOT_JDK_FOUND=yes
28860 
28861   # Only process if variable expands to non-empty
28862 
28863   if test "x$BOOT_JDK" != x; then
28864     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28865 
28866   # Input might be given as Windows format, start by converting to
28867   # unix format.
28868   path="$BOOT_JDK"
28869   new_path=`$CYGPATH -u "$path"`
28870 
28871   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28872   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28873   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28874   # "foo.exe" is OK but "foo" is an error.
28875   #
28876   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28877   # It is also a way to make sure we got the proper file name for the real test later on.
28878   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28879   if test "x$test_shortpath" = x; then
28880     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28881 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28882     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28883   fi
28884 
28885   # Call helper function which possibly converts this using DOS-style short mode.
28886   # If so, the updated path is stored in $new_path.
28887 
28888   input_path="$new_path"
28889   # Check if we need to convert this using DOS-style short mode. If the path
28890   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28891   # take no chances and rewrite it.
28892   # Note: m4 eats our [], so we need to use [ and ] instead.
28893   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28894   if test "x$has_forbidden_chars" != x; then
28895     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28896     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28897     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28898     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28899       # Going to short mode and back again did indeed matter. Since short mode is
28900       # case insensitive, let's make it lowercase to improve readability.
28901       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28902       # Now convert it back to Unix-style (cygpath)
28903       input_path=`$CYGPATH -u "$shortmode_path"`
28904       new_path="$input_path"
28905     fi
28906   fi
28907 
28908   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28909   if test "x$test_cygdrive_prefix" = x; then
28910     # As a simple fix, exclude /usr/bin since it's not a real path.
28911     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28912       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28913       # a path prefixed by /cygdrive for fixpath to work.
28914       new_path="$CYGWIN_ROOT_PATH$input_path"
28915     fi
28916   fi
28917 
28918 
28919   if test "x$path" != "x$new_path"; then
28920     BOOT_JDK="$new_path"
28921     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28922 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28923   fi
28924 
28925     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28926 
28927   path="$BOOT_JDK"
28928   has_colon=`$ECHO $path | $GREP ^.:`
28929   new_path="$path"
28930   if test "x$has_colon" = x; then
28931     # Not in mixed or Windows style, start by that.
28932     new_path=`cmd //c echo $path`
28933   fi
28934 
28935 
28936   input_path="$new_path"
28937   # Check if we need to convert this using DOS-style short mode. If the path
28938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28939   # take no chances and rewrite it.
28940   # Note: m4 eats our [], so we need to use [ and ] instead.
28941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28942   if test "x$has_forbidden_chars" != x; then
28943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28944     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28945   fi
28946 
28947 
28948   windows_path="$new_path"
28949   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28950     unix_path=`$CYGPATH -u "$windows_path"`
28951     new_path="$unix_path"
28952   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28953     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28954     new_path="$unix_path"
28955   fi
28956 
28957   if test "x$path" != "x$new_path"; then
28958     BOOT_JDK="$new_path"
28959     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28960 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28961   fi
28962 
28963   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28964   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28965 
28966     else
28967       # We're on a unix platform. Hooray! :)
28968       path="$BOOT_JDK"
28969       has_space=`$ECHO "$path" | $GREP " "`
28970       if test "x$has_space" != x; then
28971         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28972 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28973         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28974       fi
28975 
28976       # Use eval to expand a potential ~
28977       eval path="$path"
28978       if test ! -f "$path" && test ! -d "$path"; then
28979         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28980       fi
28981 
28982       if test -d "$path"; then
28983         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28984       else
28985         dir="`$DIRNAME "$path"`"
28986         base="`$BASENAME "$path"`"
28987         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28988       fi
28989     fi
28990   fi
28991 
28992             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28993 $as_echo_n "checking for Boot JDK... " >&6; }
28994             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28995 $as_echo "$BOOT_JDK" >&6; }
28996             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28997 $as_echo_n "checking Boot JDK version... " >&6; }
28998             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28999             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29000 $as_echo "$BOOT_JDK_VERSION" >&6; }
29001           fi # end check jdk version
29002         fi # end check javac
29003       fi # end check java
29004     fi # end check boot jdk found
29005   fi
29006 
29007 
29008   if test "x$BOOT_JDK_FOUND" = xno; then
29009     # Now execute the test
29010 
29011   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
29012   BOOT_JDK_SUFFIX=""
29013   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29014   if test "x$ALL_JDKS_FOUND" != x; then
29015     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29016 
29017   if test "x$BOOT_JDK_FOUND" = xno; then
29018     # Now execute the test
29019 
29020         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29021         if test -d "$BOOT_JDK"; then
29022           BOOT_JDK_FOUND=maybe
29023           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29024 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29025         fi
29026 
29027 
29028     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29029     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29030       # Do we have a bin/java?
29031       if test ! -x "$BOOT_JDK/bin/java"; then
29032         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29033 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29034         BOOT_JDK_FOUND=no
29035       else
29036         # Do we have a bin/javac?
29037         if test ! -x "$BOOT_JDK/bin/javac"; then
29038           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29039 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29040           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29041 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29042           BOOT_JDK_FOUND=no
29043         else
29044           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29045           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29046 
29047           # Extra M4 quote needed to protect [] in grep expression.
29048           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29049           if test "x$FOUND_CORRECT_VERSION" = x; then
29050             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29051 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29052             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29053 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29054             BOOT_JDK_FOUND=no
29055           else
29056             # We're done! :-)
29057             BOOT_JDK_FOUND=yes
29058 
29059   # Only process if variable expands to non-empty
29060 
29061   if test "x$BOOT_JDK" != x; then
29062     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29063 
29064   # Input might be given as Windows format, start by converting to
29065   # unix format.
29066   path="$BOOT_JDK"
29067   new_path=`$CYGPATH -u "$path"`
29068 
29069   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29070   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29071   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29072   # "foo.exe" is OK but "foo" is an error.
29073   #
29074   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29075   # It is also a way to make sure we got the proper file name for the real test later on.
29076   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29077   if test "x$test_shortpath" = x; then
29078     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29079 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29080     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29081   fi
29082 
29083   # Call helper function which possibly converts this using DOS-style short mode.
29084   # If so, the updated path is stored in $new_path.
29085 
29086   input_path="$new_path"
29087   # Check if we need to convert this using DOS-style short mode. If the path
29088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29089   # take no chances and rewrite it.
29090   # Note: m4 eats our [], so we need to use [ and ] instead.
29091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29092   if test "x$has_forbidden_chars" != x; then
29093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29094     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29095     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29096     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29097       # Going to short mode and back again did indeed matter. Since short mode is
29098       # case insensitive, let's make it lowercase to improve readability.
29099       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29100       # Now convert it back to Unix-style (cygpath)
29101       input_path=`$CYGPATH -u "$shortmode_path"`
29102       new_path="$input_path"
29103     fi
29104   fi
29105 
29106   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29107   if test "x$test_cygdrive_prefix" = x; then
29108     # As a simple fix, exclude /usr/bin since it's not a real path.
29109     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29110       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29111       # a path prefixed by /cygdrive for fixpath to work.
29112       new_path="$CYGWIN_ROOT_PATH$input_path"
29113     fi
29114   fi
29115 
29116 
29117   if test "x$path" != "x$new_path"; then
29118     BOOT_JDK="$new_path"
29119     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29120 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29121   fi
29122 
29123     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29124 
29125   path="$BOOT_JDK"
29126   has_colon=`$ECHO $path | $GREP ^.:`
29127   new_path="$path"
29128   if test "x$has_colon" = x; then
29129     # Not in mixed or Windows style, start by that.
29130     new_path=`cmd //c echo $path`
29131   fi
29132 
29133 
29134   input_path="$new_path"
29135   # Check if we need to convert this using DOS-style short mode. If the path
29136   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29137   # take no chances and rewrite it.
29138   # Note: m4 eats our [], so we need to use [ and ] instead.
29139   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29140   if test "x$has_forbidden_chars" != x; then
29141     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29142     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29143   fi
29144 
29145 
29146   windows_path="$new_path"
29147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29148     unix_path=`$CYGPATH -u "$windows_path"`
29149     new_path="$unix_path"
29150   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29151     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29152     new_path="$unix_path"
29153   fi
29154 
29155   if test "x$path" != "x$new_path"; then
29156     BOOT_JDK="$new_path"
29157     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29158 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29159   fi
29160 
29161   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29162   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29163 
29164     else
29165       # We're on a unix platform. Hooray! :)
29166       path="$BOOT_JDK"
29167       has_space=`$ECHO "$path" | $GREP " "`
29168       if test "x$has_space" != x; then
29169         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29170 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29171         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29172       fi
29173 
29174       # Use eval to expand a potential ~
29175       eval path="$path"
29176       if test ! -f "$path" && test ! -d "$path"; then
29177         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29178       fi
29179 
29180       if test -d "$path"; then
29181         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29182       else
29183         dir="`$DIRNAME "$path"`"
29184         base="`$BASENAME "$path"`"
29185         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29186       fi
29187     fi
29188   fi
29189 
29190             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29191 $as_echo_n "checking for Boot JDK... " >&6; }
29192             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29193 $as_echo "$BOOT_JDK" >&6; }
29194             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29195 $as_echo_n "checking Boot JDK version... " >&6; }
29196             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29197             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29198 $as_echo "$BOOT_JDK_VERSION" >&6; }
29199           fi # end check jdk version
29200         fi # end check javac
29201       fi # end check java
29202     fi # end check boot jdk found
29203   fi
29204 
29205     done
29206   fi
29207 
29208 
29209     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29210     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29211       # Do we have a bin/java?
29212       if test ! -x "$BOOT_JDK/bin/java"; then
29213         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29214 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29215         BOOT_JDK_FOUND=no
29216       else
29217         # Do we have a bin/javac?
29218         if test ! -x "$BOOT_JDK/bin/javac"; then
29219           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29220 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29221           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29222 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29223           BOOT_JDK_FOUND=no
29224         else
29225           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29226           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29227 
29228           # Extra M4 quote needed to protect [] in grep expression.
29229           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29230           if test "x$FOUND_CORRECT_VERSION" = x; then
29231             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29232 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29233             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29234 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29235             BOOT_JDK_FOUND=no
29236           else
29237             # We're done! :-)
29238             BOOT_JDK_FOUND=yes
29239 
29240   # Only process if variable expands to non-empty
29241 
29242   if test "x$BOOT_JDK" != x; then
29243     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29244 
29245   # Input might be given as Windows format, start by converting to
29246   # unix format.
29247   path="$BOOT_JDK"
29248   new_path=`$CYGPATH -u "$path"`
29249 
29250   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29251   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29252   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29253   # "foo.exe" is OK but "foo" is an error.
29254   #
29255   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29256   # It is also a way to make sure we got the proper file name for the real test later on.
29257   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29258   if test "x$test_shortpath" = x; then
29259     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29260 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29261     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29262   fi
29263 
29264   # Call helper function which possibly converts this using DOS-style short mode.
29265   # If so, the updated path is stored in $new_path.
29266 
29267   input_path="$new_path"
29268   # Check if we need to convert this using DOS-style short mode. If the path
29269   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29270   # take no chances and rewrite it.
29271   # Note: m4 eats our [], so we need to use [ and ] instead.
29272   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29273   if test "x$has_forbidden_chars" != x; then
29274     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29275     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29276     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29277     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29278       # Going to short mode and back again did indeed matter. Since short mode is
29279       # case insensitive, let's make it lowercase to improve readability.
29280       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29281       # Now convert it back to Unix-style (cygpath)
29282       input_path=`$CYGPATH -u "$shortmode_path"`
29283       new_path="$input_path"
29284     fi
29285   fi
29286 
29287   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29288   if test "x$test_cygdrive_prefix" = x; then
29289     # As a simple fix, exclude /usr/bin since it's not a real path.
29290     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29291       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29292       # a path prefixed by /cygdrive for fixpath to work.
29293       new_path="$CYGWIN_ROOT_PATH$input_path"
29294     fi
29295   fi
29296 
29297 
29298   if test "x$path" != "x$new_path"; then
29299     BOOT_JDK="$new_path"
29300     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29301 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29302   fi
29303 
29304     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29305 
29306   path="$BOOT_JDK"
29307   has_colon=`$ECHO $path | $GREP ^.:`
29308   new_path="$path"
29309   if test "x$has_colon" = x; then
29310     # Not in mixed or Windows style, start by that.
29311     new_path=`cmd //c echo $path`
29312   fi
29313 
29314 
29315   input_path="$new_path"
29316   # Check if we need to convert this using DOS-style short mode. If the path
29317   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29318   # take no chances and rewrite it.
29319   # Note: m4 eats our [], so we need to use [ and ] instead.
29320   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29321   if test "x$has_forbidden_chars" != x; then
29322     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29323     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29324   fi
29325 
29326 
29327   windows_path="$new_path"
29328   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29329     unix_path=`$CYGPATH -u "$windows_path"`
29330     new_path="$unix_path"
29331   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29332     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29333     new_path="$unix_path"
29334   fi
29335 
29336   if test "x$path" != "x$new_path"; then
29337     BOOT_JDK="$new_path"
29338     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29339 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29340   fi
29341 
29342   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29343   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29344 
29345     else
29346       # We're on a unix platform. Hooray! :)
29347       path="$BOOT_JDK"
29348       has_space=`$ECHO "$path" | $GREP " "`
29349       if test "x$has_space" != x; then
29350         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29351 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29352         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29353       fi
29354 
29355       # Use eval to expand a potential ~
29356       eval path="$path"
29357       if test ! -f "$path" && test ! -d "$path"; then
29358         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29359       fi
29360 
29361       if test -d "$path"; then
29362         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29363       else
29364         dir="`$DIRNAME "$path"`"
29365         base="`$BASENAME "$path"`"
29366         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29367       fi
29368     fi
29369   fi
29370 
29371             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29372 $as_echo_n "checking for Boot JDK... " >&6; }
29373             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29374 $as_echo "$BOOT_JDK" >&6; }
29375             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29376 $as_echo_n "checking Boot JDK version... " >&6; }
29377             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29378             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29379 $as_echo "$BOOT_JDK_VERSION" >&6; }
29380           fi # end check jdk version
29381         fi # end check javac
29382       fi # end check java
29383     fi # end check boot jdk found
29384   fi
29385 
29386   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29387 
29388   if test "x$BOOT_JDK_FOUND" = xno; then
29389     # Now execute the test
29390 
29391   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29392   BOOT_JDK_SUFFIX="/Contents/Home"
29393   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29394   if test "x$ALL_JDKS_FOUND" != x; then
29395     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29396 
29397   if test "x$BOOT_JDK_FOUND" = xno; then
29398     # Now execute the test
29399 
29400         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29401         if test -d "$BOOT_JDK"; then
29402           BOOT_JDK_FOUND=maybe
29403           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29404 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29405         fi
29406 
29407 
29408     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29409     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29410       # Do we have a bin/java?
29411       if test ! -x "$BOOT_JDK/bin/java"; then
29412         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29413 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29414         BOOT_JDK_FOUND=no
29415       else
29416         # Do we have a bin/javac?
29417         if test ! -x "$BOOT_JDK/bin/javac"; then
29418           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29419 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29420           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29421 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29422           BOOT_JDK_FOUND=no
29423         else
29424           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29425           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29426 
29427           # Extra M4 quote needed to protect [] in grep expression.
29428           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29429           if test "x$FOUND_CORRECT_VERSION" = x; then
29430             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29431 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29432             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29433 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29434             BOOT_JDK_FOUND=no
29435           else
29436             # We're done! :-)
29437             BOOT_JDK_FOUND=yes
29438 
29439   # Only process if variable expands to non-empty
29440 
29441   if test "x$BOOT_JDK" != x; then
29442     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29443 
29444   # Input might be given as Windows format, start by converting to
29445   # unix format.
29446   path="$BOOT_JDK"
29447   new_path=`$CYGPATH -u "$path"`
29448 
29449   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29450   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29451   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29452   # "foo.exe" is OK but "foo" is an error.
29453   #
29454   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29455   # It is also a way to make sure we got the proper file name for the real test later on.
29456   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29457   if test "x$test_shortpath" = x; then
29458     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29459 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29460     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29461   fi
29462 
29463   # Call helper function which possibly converts this using DOS-style short mode.
29464   # If so, the updated path is stored in $new_path.
29465 
29466   input_path="$new_path"
29467   # Check if we need to convert this using DOS-style short mode. If the path
29468   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29469   # take no chances and rewrite it.
29470   # Note: m4 eats our [], so we need to use [ and ] instead.
29471   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29472   if test "x$has_forbidden_chars" != x; then
29473     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29474     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29475     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29476     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29477       # Going to short mode and back again did indeed matter. Since short mode is
29478       # case insensitive, let's make it lowercase to improve readability.
29479       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29480       # Now convert it back to Unix-style (cygpath)
29481       input_path=`$CYGPATH -u "$shortmode_path"`
29482       new_path="$input_path"
29483     fi
29484   fi
29485 
29486   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29487   if test "x$test_cygdrive_prefix" = x; then
29488     # As a simple fix, exclude /usr/bin since it's not a real path.
29489     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29490       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29491       # a path prefixed by /cygdrive for fixpath to work.
29492       new_path="$CYGWIN_ROOT_PATH$input_path"
29493     fi
29494   fi
29495 
29496 
29497   if test "x$path" != "x$new_path"; then
29498     BOOT_JDK="$new_path"
29499     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29500 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29501   fi
29502 
29503     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29504 
29505   path="$BOOT_JDK"
29506   has_colon=`$ECHO $path | $GREP ^.:`
29507   new_path="$path"
29508   if test "x$has_colon" = x; then
29509     # Not in mixed or Windows style, start by that.
29510     new_path=`cmd //c echo $path`
29511   fi
29512 
29513 
29514   input_path="$new_path"
29515   # Check if we need to convert this using DOS-style short mode. If the path
29516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29517   # take no chances and rewrite it.
29518   # Note: m4 eats our [], so we need to use [ and ] instead.
29519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29520   if test "x$has_forbidden_chars" != x; then
29521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29522     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29523   fi
29524 
29525 
29526   windows_path="$new_path"
29527   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29528     unix_path=`$CYGPATH -u "$windows_path"`
29529     new_path="$unix_path"
29530   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29531     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29532     new_path="$unix_path"
29533   fi
29534 
29535   if test "x$path" != "x$new_path"; then
29536     BOOT_JDK="$new_path"
29537     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29538 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29539   fi
29540 
29541   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29542   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29543 
29544     else
29545       # We're on a unix platform. Hooray! :)
29546       path="$BOOT_JDK"
29547       has_space=`$ECHO "$path" | $GREP " "`
29548       if test "x$has_space" != x; then
29549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29550 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29551         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29552       fi
29553 
29554       # Use eval to expand a potential ~
29555       eval path="$path"
29556       if test ! -f "$path" && test ! -d "$path"; then
29557         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29558       fi
29559 
29560       if test -d "$path"; then
29561         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29562       else
29563         dir="`$DIRNAME "$path"`"
29564         base="`$BASENAME "$path"`"
29565         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29566       fi
29567     fi
29568   fi
29569 
29570             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29571 $as_echo_n "checking for Boot JDK... " >&6; }
29572             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29573 $as_echo "$BOOT_JDK" >&6; }
29574             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29575 $as_echo_n "checking Boot JDK version... " >&6; }
29576             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29578 $as_echo "$BOOT_JDK_VERSION" >&6; }
29579           fi # end check jdk version
29580         fi # end check javac
29581       fi # end check java
29582     fi # end check boot jdk found
29583   fi
29584 
29585     done
29586   fi
29587 
29588 
29589     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29590     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29591       # Do we have a bin/java?
29592       if test ! -x "$BOOT_JDK/bin/java"; then
29593         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29594 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29595         BOOT_JDK_FOUND=no
29596       else
29597         # Do we have a bin/javac?
29598         if test ! -x "$BOOT_JDK/bin/javac"; then
29599           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29600 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29601           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29602 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29603           BOOT_JDK_FOUND=no
29604         else
29605           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29606           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29607 
29608           # Extra M4 quote needed to protect [] in grep expression.
29609           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29610           if test "x$FOUND_CORRECT_VERSION" = x; then
29611             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29613             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29614 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29615             BOOT_JDK_FOUND=no
29616           else
29617             # We're done! :-)
29618             BOOT_JDK_FOUND=yes
29619 
29620   # Only process if variable expands to non-empty
29621 
29622   if test "x$BOOT_JDK" != x; then
29623     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29624 
29625   # Input might be given as Windows format, start by converting to
29626   # unix format.
29627   path="$BOOT_JDK"
29628   new_path=`$CYGPATH -u "$path"`
29629 
29630   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29631   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29632   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29633   # "foo.exe" is OK but "foo" is an error.
29634   #
29635   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29636   # It is also a way to make sure we got the proper file name for the real test later on.
29637   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29638   if test "x$test_shortpath" = x; then
29639     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29640 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29641     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29642   fi
29643 
29644   # Call helper function which possibly converts this using DOS-style short mode.
29645   # If so, the updated path is stored in $new_path.
29646 
29647   input_path="$new_path"
29648   # Check if we need to convert this using DOS-style short mode. If the path
29649   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29650   # take no chances and rewrite it.
29651   # Note: m4 eats our [], so we need to use [ and ] instead.
29652   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29653   if test "x$has_forbidden_chars" != x; then
29654     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29655     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29656     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29657     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29658       # Going to short mode and back again did indeed matter. Since short mode is
29659       # case insensitive, let's make it lowercase to improve readability.
29660       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29661       # Now convert it back to Unix-style (cygpath)
29662       input_path=`$CYGPATH -u "$shortmode_path"`
29663       new_path="$input_path"
29664     fi
29665   fi
29666 
29667   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29668   if test "x$test_cygdrive_prefix" = x; then
29669     # As a simple fix, exclude /usr/bin since it's not a real path.
29670     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29671       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29672       # a path prefixed by /cygdrive for fixpath to work.
29673       new_path="$CYGWIN_ROOT_PATH$input_path"
29674     fi
29675   fi
29676 
29677 
29678   if test "x$path" != "x$new_path"; then
29679     BOOT_JDK="$new_path"
29680     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29681 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29682   fi
29683 
29684     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29685 
29686   path="$BOOT_JDK"
29687   has_colon=`$ECHO $path | $GREP ^.:`
29688   new_path="$path"
29689   if test "x$has_colon" = x; then
29690     # Not in mixed or Windows style, start by that.
29691     new_path=`cmd //c echo $path`
29692   fi
29693 
29694 
29695   input_path="$new_path"
29696   # Check if we need to convert this using DOS-style short mode. If the path
29697   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29698   # take no chances and rewrite it.
29699   # Note: m4 eats our [], so we need to use [ and ] instead.
29700   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29701   if test "x$has_forbidden_chars" != x; then
29702     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29703     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29704   fi
29705 
29706 
29707   windows_path="$new_path"
29708   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29709     unix_path=`$CYGPATH -u "$windows_path"`
29710     new_path="$unix_path"
29711   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29712     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29713     new_path="$unix_path"
29714   fi
29715 
29716   if test "x$path" != "x$new_path"; then
29717     BOOT_JDK="$new_path"
29718     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29719 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29720   fi
29721 
29722   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29723   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29724 
29725     else
29726       # We're on a unix platform. Hooray! :)
29727       path="$BOOT_JDK"
29728       has_space=`$ECHO "$path" | $GREP " "`
29729       if test "x$has_space" != x; then
29730         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29731 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29732         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29733       fi
29734 
29735       # Use eval to expand a potential ~
29736       eval path="$path"
29737       if test ! -f "$path" && test ! -d "$path"; then
29738         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29739       fi
29740 
29741       if test -d "$path"; then
29742         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29743       else
29744         dir="`$DIRNAME "$path"`"
29745         base="`$BASENAME "$path"`"
29746         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29747       fi
29748     fi
29749   fi
29750 
29751             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29752 $as_echo_n "checking for Boot JDK... " >&6; }
29753             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29754 $as_echo "$BOOT_JDK" >&6; }
29755             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29756 $as_echo_n "checking Boot JDK version... " >&6; }
29757             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29759 $as_echo "$BOOT_JDK_VERSION" >&6; }
29760           fi # end check jdk version
29761         fi # end check javac
29762       fi # end check java
29763     fi # end check boot jdk found
29764   fi
29765 
29766 
29767   if test "x$BOOT_JDK_FOUND" = xno; then
29768     # Now execute the test
29769 
29770   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29771   BOOT_JDK_SUFFIX="/Contents/Home"
29772   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29773   if test "x$ALL_JDKS_FOUND" != x; then
29774     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29775 
29776   if test "x$BOOT_JDK_FOUND" = xno; then
29777     # Now execute the test
29778 
29779         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29780         if test -d "$BOOT_JDK"; then
29781           BOOT_JDK_FOUND=maybe
29782           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29783 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29784         fi
29785 
29786 
29787     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29788     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29789       # Do we have a bin/java?
29790       if test ! -x "$BOOT_JDK/bin/java"; then
29791         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29792 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29793         BOOT_JDK_FOUND=no
29794       else
29795         # Do we have a bin/javac?
29796         if test ! -x "$BOOT_JDK/bin/javac"; then
29797           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29798 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29799           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29800 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29801           BOOT_JDK_FOUND=no
29802         else
29803           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29804           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29805 
29806           # Extra M4 quote needed to protect [] in grep expression.
29807           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29808           if test "x$FOUND_CORRECT_VERSION" = x; then
29809             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29810 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29811             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29812 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29813             BOOT_JDK_FOUND=no
29814           else
29815             # We're done! :-)
29816             BOOT_JDK_FOUND=yes
29817 
29818   # Only process if variable expands to non-empty
29819 
29820   if test "x$BOOT_JDK" != x; then
29821     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29822 
29823   # Input might be given as Windows format, start by converting to
29824   # unix format.
29825   path="$BOOT_JDK"
29826   new_path=`$CYGPATH -u "$path"`
29827 
29828   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29829   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29830   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29831   # "foo.exe" is OK but "foo" is an error.
29832   #
29833   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29834   # It is also a way to make sure we got the proper file name for the real test later on.
29835   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29836   if test "x$test_shortpath" = x; then
29837     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29838 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29839     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29840   fi
29841 
29842   # Call helper function which possibly converts this using DOS-style short mode.
29843   # If so, the updated path is stored in $new_path.
29844 
29845   input_path="$new_path"
29846   # Check if we need to convert this using DOS-style short mode. If the path
29847   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29848   # take no chances and rewrite it.
29849   # Note: m4 eats our [], so we need to use [ and ] instead.
29850   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29851   if test "x$has_forbidden_chars" != x; then
29852     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29853     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29854     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29855     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29856       # Going to short mode and back again did indeed matter. Since short mode is
29857       # case insensitive, let's make it lowercase to improve readability.
29858       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29859       # Now convert it back to Unix-style (cygpath)
29860       input_path=`$CYGPATH -u "$shortmode_path"`
29861       new_path="$input_path"
29862     fi
29863   fi
29864 
29865   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29866   if test "x$test_cygdrive_prefix" = x; then
29867     # As a simple fix, exclude /usr/bin since it's not a real path.
29868     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29869       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29870       # a path prefixed by /cygdrive for fixpath to work.
29871       new_path="$CYGWIN_ROOT_PATH$input_path"
29872     fi
29873   fi
29874 
29875 
29876   if test "x$path" != "x$new_path"; then
29877     BOOT_JDK="$new_path"
29878     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29879 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29880   fi
29881 
29882     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29883 
29884   path="$BOOT_JDK"
29885   has_colon=`$ECHO $path | $GREP ^.:`
29886   new_path="$path"
29887   if test "x$has_colon" = x; then
29888     # Not in mixed or Windows style, start by that.
29889     new_path=`cmd //c echo $path`
29890   fi
29891 
29892 
29893   input_path="$new_path"
29894   # Check if we need to convert this using DOS-style short mode. If the path
29895   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29896   # take no chances and rewrite it.
29897   # Note: m4 eats our [], so we need to use [ and ] instead.
29898   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29899   if test "x$has_forbidden_chars" != x; then
29900     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29901     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29902   fi
29903 
29904 
29905   windows_path="$new_path"
29906   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29907     unix_path=`$CYGPATH -u "$windows_path"`
29908     new_path="$unix_path"
29909   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29910     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29911     new_path="$unix_path"
29912   fi
29913 
29914   if test "x$path" != "x$new_path"; then
29915     BOOT_JDK="$new_path"
29916     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29917 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29918   fi
29919 
29920   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29921   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29922 
29923     else
29924       # We're on a unix platform. Hooray! :)
29925       path="$BOOT_JDK"
29926       has_space=`$ECHO "$path" | $GREP " "`
29927       if test "x$has_space" != x; then
29928         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29929 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29930         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29931       fi
29932 
29933       # Use eval to expand a potential ~
29934       eval path="$path"
29935       if test ! -f "$path" && test ! -d "$path"; then
29936         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29937       fi
29938 
29939       if test -d "$path"; then
29940         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29941       else
29942         dir="`$DIRNAME "$path"`"
29943         base="`$BASENAME "$path"`"
29944         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29945       fi
29946     fi
29947   fi
29948 
29949             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29950 $as_echo_n "checking for Boot JDK... " >&6; }
29951             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29952 $as_echo "$BOOT_JDK" >&6; }
29953             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29954 $as_echo_n "checking Boot JDK version... " >&6; }
29955             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29956             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29957 $as_echo "$BOOT_JDK_VERSION" >&6; }
29958           fi # end check jdk version
29959         fi # end check javac
29960       fi # end check java
29961     fi # end check boot jdk found
29962   fi
29963 
29964     done
29965   fi
29966 
29967 
29968     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29969     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29970       # Do we have a bin/java?
29971       if test ! -x "$BOOT_JDK/bin/java"; then
29972         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29973 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29974         BOOT_JDK_FOUND=no
29975       else
29976         # Do we have a bin/javac?
29977         if test ! -x "$BOOT_JDK/bin/javac"; then
29978           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29979 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29980           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29981 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29982           BOOT_JDK_FOUND=no
29983         else
29984           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29985           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29986 
29987           # Extra M4 quote needed to protect [] in grep expression.
29988           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
29989           if test "x$FOUND_CORRECT_VERSION" = x; then
29990             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29991 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29992             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
29993 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
29994             BOOT_JDK_FOUND=no
29995           else
29996             # We're done! :-)
29997             BOOT_JDK_FOUND=yes
29998 
29999   # Only process if variable expands to non-empty
30000 
30001   if test "x$BOOT_JDK" != x; then
30002     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30003 
30004   # Input might be given as Windows format, start by converting to
30005   # unix format.
30006   path="$BOOT_JDK"
30007   new_path=`$CYGPATH -u "$path"`
30008 
30009   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30010   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30011   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30012   # "foo.exe" is OK but "foo" is an error.
30013   #
30014   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30015   # It is also a way to make sure we got the proper file name for the real test later on.
30016   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30017   if test "x$test_shortpath" = x; then
30018     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30019 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30020     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30021   fi
30022 
30023   # Call helper function which possibly converts this using DOS-style short mode.
30024   # If so, the updated path is stored in $new_path.
30025 
30026   input_path="$new_path"
30027   # Check if we need to convert this using DOS-style short mode. If the path
30028   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30029   # take no chances and rewrite it.
30030   # Note: m4 eats our [], so we need to use [ and ] instead.
30031   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30032   if test "x$has_forbidden_chars" != x; then
30033     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30034     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30035     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30036     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30037       # Going to short mode and back again did indeed matter. Since short mode is
30038       # case insensitive, let's make it lowercase to improve readability.
30039       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30040       # Now convert it back to Unix-style (cygpath)
30041       input_path=`$CYGPATH -u "$shortmode_path"`
30042       new_path="$input_path"
30043     fi
30044   fi
30045 
30046   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30047   if test "x$test_cygdrive_prefix" = x; then
30048     # As a simple fix, exclude /usr/bin since it's not a real path.
30049     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30050       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30051       # a path prefixed by /cygdrive for fixpath to work.
30052       new_path="$CYGWIN_ROOT_PATH$input_path"
30053     fi
30054   fi
30055 
30056 
30057   if test "x$path" != "x$new_path"; then
30058     BOOT_JDK="$new_path"
30059     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30060 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30061   fi
30062 
30063     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30064 
30065   path="$BOOT_JDK"
30066   has_colon=`$ECHO $path | $GREP ^.:`
30067   new_path="$path"
30068   if test "x$has_colon" = x; then
30069     # Not in mixed or Windows style, start by that.
30070     new_path=`cmd //c echo $path`
30071   fi
30072 
30073 
30074   input_path="$new_path"
30075   # Check if we need to convert this using DOS-style short mode. If the path
30076   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30077   # take no chances and rewrite it.
30078   # Note: m4 eats our [], so we need to use [ and ] instead.
30079   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30080   if test "x$has_forbidden_chars" != x; then
30081     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30082     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30083   fi
30084 
30085 
30086   windows_path="$new_path"
30087   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30088     unix_path=`$CYGPATH -u "$windows_path"`
30089     new_path="$unix_path"
30090   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30091     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30092     new_path="$unix_path"
30093   fi
30094 
30095   if test "x$path" != "x$new_path"; then
30096     BOOT_JDK="$new_path"
30097     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30098 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30099   fi
30100 
30101   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30102   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30103 
30104     else
30105       # We're on a unix platform. Hooray! :)
30106       path="$BOOT_JDK"
30107       has_space=`$ECHO "$path" | $GREP " "`
30108       if test "x$has_space" != x; then
30109         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30110 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30111         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30112       fi
30113 
30114       # Use eval to expand a potential ~
30115       eval path="$path"
30116       if test ! -f "$path" && test ! -d "$path"; then
30117         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30118       fi
30119 
30120       if test -d "$path"; then
30121         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30122       else
30123         dir="`$DIRNAME "$path"`"
30124         base="`$BASENAME "$path"`"
30125         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30126       fi
30127     fi
30128   fi
30129 
30130             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30131 $as_echo_n "checking for Boot JDK... " >&6; }
30132             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30133 $as_echo "$BOOT_JDK" >&6; }
30134             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30135 $as_echo_n "checking Boot JDK version... " >&6; }
30136             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30137             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30138 $as_echo "$BOOT_JDK_VERSION" >&6; }
30139           fi # end check jdk version
30140         fi # end check javac
30141       fi # end check java
30142     fi # end check boot jdk found
30143   fi
30144 
30145   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30146 
30147   if test "x$BOOT_JDK_FOUND" = xno; then
30148     # Now execute the test
30149 
30150   BOOT_JDK_PREFIX="/usr/lib/jvm"
30151   BOOT_JDK_SUFFIX=""
30152   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30153   if test "x$ALL_JDKS_FOUND" != x; then
30154     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30155 
30156   if test "x$BOOT_JDK_FOUND" = xno; then
30157     # Now execute the test
30158 
30159         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30160         if test -d "$BOOT_JDK"; then
30161           BOOT_JDK_FOUND=maybe
30162           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30163 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30164         fi
30165 
30166 
30167     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30168     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30169       # Do we have a bin/java?
30170       if test ! -x "$BOOT_JDK/bin/java"; then
30171         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30172 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30173         BOOT_JDK_FOUND=no
30174       else
30175         # Do we have a bin/javac?
30176         if test ! -x "$BOOT_JDK/bin/javac"; then
30177           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30178 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30179           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30180 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30181           BOOT_JDK_FOUND=no
30182         else
30183           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30184           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30185 
30186           # Extra M4 quote needed to protect [] in grep expression.
30187           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30188           if test "x$FOUND_CORRECT_VERSION" = x; then
30189             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30190 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30191             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30192 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30193             BOOT_JDK_FOUND=no
30194           else
30195             # We're done! :-)
30196             BOOT_JDK_FOUND=yes
30197 
30198   # Only process if variable expands to non-empty
30199 
30200   if test "x$BOOT_JDK" != x; then
30201     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30202 
30203   # Input might be given as Windows format, start by converting to
30204   # unix format.
30205   path="$BOOT_JDK"
30206   new_path=`$CYGPATH -u "$path"`
30207 
30208   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30209   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30210   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30211   # "foo.exe" is OK but "foo" is an error.
30212   #
30213   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30214   # It is also a way to make sure we got the proper file name for the real test later on.
30215   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30216   if test "x$test_shortpath" = x; then
30217     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30218 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30219     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30220   fi
30221 
30222   # Call helper function which possibly converts this using DOS-style short mode.
30223   # If so, the updated path is stored in $new_path.
30224 
30225   input_path="$new_path"
30226   # Check if we need to convert this using DOS-style short mode. If the path
30227   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30228   # take no chances and rewrite it.
30229   # Note: m4 eats our [], so we need to use [ and ] instead.
30230   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30231   if test "x$has_forbidden_chars" != x; then
30232     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30233     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30234     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30235     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30236       # Going to short mode and back again did indeed matter. Since short mode is
30237       # case insensitive, let's make it lowercase to improve readability.
30238       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30239       # Now convert it back to Unix-style (cygpath)
30240       input_path=`$CYGPATH -u "$shortmode_path"`
30241       new_path="$input_path"
30242     fi
30243   fi
30244 
30245   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30246   if test "x$test_cygdrive_prefix" = x; then
30247     # As a simple fix, exclude /usr/bin since it's not a real path.
30248     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30249       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30250       # a path prefixed by /cygdrive for fixpath to work.
30251       new_path="$CYGWIN_ROOT_PATH$input_path"
30252     fi
30253   fi
30254 
30255 
30256   if test "x$path" != "x$new_path"; then
30257     BOOT_JDK="$new_path"
30258     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30259 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30260   fi
30261 
30262     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30263 
30264   path="$BOOT_JDK"
30265   has_colon=`$ECHO $path | $GREP ^.:`
30266   new_path="$path"
30267   if test "x$has_colon" = x; then
30268     # Not in mixed or Windows style, start by that.
30269     new_path=`cmd //c echo $path`
30270   fi
30271 
30272 
30273   input_path="$new_path"
30274   # Check if we need to convert this using DOS-style short mode. If the path
30275   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30276   # take no chances and rewrite it.
30277   # Note: m4 eats our [], so we need to use [ and ] instead.
30278   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30279   if test "x$has_forbidden_chars" != x; then
30280     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30281     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30282   fi
30283 
30284 
30285   windows_path="$new_path"
30286   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30287     unix_path=`$CYGPATH -u "$windows_path"`
30288     new_path="$unix_path"
30289   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30290     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30291     new_path="$unix_path"
30292   fi
30293 
30294   if test "x$path" != "x$new_path"; then
30295     BOOT_JDK="$new_path"
30296     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30297 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30298   fi
30299 
30300   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30301   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30302 
30303     else
30304       # We're on a unix platform. Hooray! :)
30305       path="$BOOT_JDK"
30306       has_space=`$ECHO "$path" | $GREP " "`
30307       if test "x$has_space" != x; then
30308         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30309 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30310         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30311       fi
30312 
30313       # Use eval to expand a potential ~
30314       eval path="$path"
30315       if test ! -f "$path" && test ! -d "$path"; then
30316         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30317       fi
30318 
30319       if test -d "$path"; then
30320         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30321       else
30322         dir="`$DIRNAME "$path"`"
30323         base="`$BASENAME "$path"`"
30324         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30325       fi
30326     fi
30327   fi
30328 
30329             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30330 $as_echo_n "checking for Boot JDK... " >&6; }
30331             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30332 $as_echo "$BOOT_JDK" >&6; }
30333             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30334 $as_echo_n "checking Boot JDK version... " >&6; }
30335             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30336             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30337 $as_echo "$BOOT_JDK_VERSION" >&6; }
30338           fi # end check jdk version
30339         fi # end check javac
30340       fi # end check java
30341     fi # end check boot jdk found
30342   fi
30343 
30344     done
30345   fi
30346 
30347 
30348     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30349     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30350       # Do we have a bin/java?
30351       if test ! -x "$BOOT_JDK/bin/java"; then
30352         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30353 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30354         BOOT_JDK_FOUND=no
30355       else
30356         # Do we have a bin/javac?
30357         if test ! -x "$BOOT_JDK/bin/javac"; then
30358           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30359 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30360           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30361 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30362           BOOT_JDK_FOUND=no
30363         else
30364           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30365           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30366 
30367           # Extra M4 quote needed to protect [] in grep expression.
30368           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30369           if test "x$FOUND_CORRECT_VERSION" = x; then
30370             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30371 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30372             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30373 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30374             BOOT_JDK_FOUND=no
30375           else
30376             # We're done! :-)
30377             BOOT_JDK_FOUND=yes
30378 
30379   # Only process if variable expands to non-empty
30380 
30381   if test "x$BOOT_JDK" != x; then
30382     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30383 
30384   # Input might be given as Windows format, start by converting to
30385   # unix format.
30386   path="$BOOT_JDK"
30387   new_path=`$CYGPATH -u "$path"`
30388 
30389   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30390   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30391   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30392   # "foo.exe" is OK but "foo" is an error.
30393   #
30394   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30395   # It is also a way to make sure we got the proper file name for the real test later on.
30396   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30397   if test "x$test_shortpath" = x; then
30398     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30399 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30400     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30401   fi
30402 
30403   # Call helper function which possibly converts this using DOS-style short mode.
30404   # If so, the updated path is stored in $new_path.
30405 
30406   input_path="$new_path"
30407   # Check if we need to convert this using DOS-style short mode. If the path
30408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30409   # take no chances and rewrite it.
30410   # Note: m4 eats our [], so we need to use [ and ] instead.
30411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30412   if test "x$has_forbidden_chars" != x; then
30413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30414     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30415     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30416     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30417       # Going to short mode and back again did indeed matter. Since short mode is
30418       # case insensitive, let's make it lowercase to improve readability.
30419       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30420       # Now convert it back to Unix-style (cygpath)
30421       input_path=`$CYGPATH -u "$shortmode_path"`
30422       new_path="$input_path"
30423     fi
30424   fi
30425 
30426   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30427   if test "x$test_cygdrive_prefix" = x; then
30428     # As a simple fix, exclude /usr/bin since it's not a real path.
30429     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30430       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30431       # a path prefixed by /cygdrive for fixpath to work.
30432       new_path="$CYGWIN_ROOT_PATH$input_path"
30433     fi
30434   fi
30435 
30436 
30437   if test "x$path" != "x$new_path"; then
30438     BOOT_JDK="$new_path"
30439     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30440 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30441   fi
30442 
30443     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30444 
30445   path="$BOOT_JDK"
30446   has_colon=`$ECHO $path | $GREP ^.:`
30447   new_path="$path"
30448   if test "x$has_colon" = x; then
30449     # Not in mixed or Windows style, start by that.
30450     new_path=`cmd //c echo $path`
30451   fi
30452 
30453 
30454   input_path="$new_path"
30455   # Check if we need to convert this using DOS-style short mode. If the path
30456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30457   # take no chances and rewrite it.
30458   # Note: m4 eats our [], so we need to use [ and ] instead.
30459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30460   if test "x$has_forbidden_chars" != x; then
30461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30462     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30463   fi
30464 
30465 
30466   windows_path="$new_path"
30467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30468     unix_path=`$CYGPATH -u "$windows_path"`
30469     new_path="$unix_path"
30470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30472     new_path="$unix_path"
30473   fi
30474 
30475   if test "x$path" != "x$new_path"; then
30476     BOOT_JDK="$new_path"
30477     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30478 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30479   fi
30480 
30481   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30482   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30483 
30484     else
30485       # We're on a unix platform. Hooray! :)
30486       path="$BOOT_JDK"
30487       has_space=`$ECHO "$path" | $GREP " "`
30488       if test "x$has_space" != x; then
30489         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30490 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30491         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30492       fi
30493 
30494       # Use eval to expand a potential ~
30495       eval path="$path"
30496       if test ! -f "$path" && test ! -d "$path"; then
30497         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30498       fi
30499 
30500       if test -d "$path"; then
30501         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30502       else
30503         dir="`$DIRNAME "$path"`"
30504         base="`$BASENAME "$path"`"
30505         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30506       fi
30507     fi
30508   fi
30509 
30510             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30511 $as_echo_n "checking for Boot JDK... " >&6; }
30512             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30513 $as_echo "$BOOT_JDK" >&6; }
30514             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30515 $as_echo_n "checking Boot JDK version... " >&6; }
30516             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30517             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30518 $as_echo "$BOOT_JDK_VERSION" >&6; }
30519           fi # end check jdk version
30520         fi # end check javac
30521       fi # end check java
30522     fi # end check boot jdk found
30523   fi
30524 
30525   fi
30526 
30527 
30528     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30529     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30530       # Do we have a bin/java?
30531       if test ! -x "$BOOT_JDK/bin/java"; then
30532         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30533 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30534         BOOT_JDK_FOUND=no
30535       else
30536         # Do we have a bin/javac?
30537         if test ! -x "$BOOT_JDK/bin/javac"; then
30538           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30539 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30540           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30541 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30542           BOOT_JDK_FOUND=no
30543         else
30544           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30545           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30546 
30547           # Extra M4 quote needed to protect [] in grep expression.
30548           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"|\"9([\.+-].*)?\"'`
30549           if test "x$FOUND_CORRECT_VERSION" = x; then
30550             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30551 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30552             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 9 or 10)" >&5
30553 $as_echo "$as_me: (Your Boot JDK must be version 9 or 10)" >&6;}
30554             BOOT_JDK_FOUND=no
30555           else
30556             # We're done! :-)
30557             BOOT_JDK_FOUND=yes
30558 
30559   # Only process if variable expands to non-empty
30560 
30561   if test "x$BOOT_JDK" != x; then
30562     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30563 
30564   # Input might be given as Windows format, start by converting to
30565   # unix format.
30566   path="$BOOT_JDK"
30567   new_path=`$CYGPATH -u "$path"`
30568 
30569   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30570   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30571   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30572   # "foo.exe" is OK but "foo" is an error.
30573   #
30574   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30575   # It is also a way to make sure we got the proper file name for the real test later on.
30576   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30577   if test "x$test_shortpath" = x; then
30578     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30579 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30580     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30581   fi
30582 
30583   # Call helper function which possibly converts this using DOS-style short mode.
30584   # If so, the updated path is stored in $new_path.
30585 
30586   input_path="$new_path"
30587   # Check if we need to convert this using DOS-style short mode. If the path
30588   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30589   # take no chances and rewrite it.
30590   # Note: m4 eats our [], so we need to use [ and ] instead.
30591   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30592   if test "x$has_forbidden_chars" != x; then
30593     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30594     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30595     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30596     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30597       # Going to short mode and back again did indeed matter. Since short mode is
30598       # case insensitive, let's make it lowercase to improve readability.
30599       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30600       # Now convert it back to Unix-style (cygpath)
30601       input_path=`$CYGPATH -u "$shortmode_path"`
30602       new_path="$input_path"
30603     fi
30604   fi
30605 
30606   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30607   if test "x$test_cygdrive_prefix" = x; then
30608     # As a simple fix, exclude /usr/bin since it's not a real path.
30609     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30610       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30611       # a path prefixed by /cygdrive for fixpath to work.
30612       new_path="$CYGWIN_ROOT_PATH$input_path"
30613     fi
30614   fi
30615 
30616 
30617   if test "x$path" != "x$new_path"; then
30618     BOOT_JDK="$new_path"
30619     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30620 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30621   fi
30622 
30623     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30624 
30625   path="$BOOT_JDK"
30626   has_colon=`$ECHO $path | $GREP ^.:`
30627   new_path="$path"
30628   if test "x$has_colon" = x; then
30629     # Not in mixed or Windows style, start by that.
30630     new_path=`cmd //c echo $path`
30631   fi
30632 
30633 
30634   input_path="$new_path"
30635   # Check if we need to convert this using DOS-style short mode. If the path
30636   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30637   # take no chances and rewrite it.
30638   # Note: m4 eats our [], so we need to use [ and ] instead.
30639   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30640   if test "x$has_forbidden_chars" != x; then
30641     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30642     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30643   fi
30644 
30645 
30646   windows_path="$new_path"
30647   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30648     unix_path=`$CYGPATH -u "$windows_path"`
30649     new_path="$unix_path"
30650   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30651     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30652     new_path="$unix_path"
30653   fi
30654 
30655   if test "x$path" != "x$new_path"; then
30656     BOOT_JDK="$new_path"
30657     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30658 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30659   fi
30660 
30661   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30662   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30663 
30664     else
30665       # We're on a unix platform. Hooray! :)
30666       path="$BOOT_JDK"
30667       has_space=`$ECHO "$path" | $GREP " "`
30668       if test "x$has_space" != x; then
30669         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30670 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30671         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30672       fi
30673 
30674       # Use eval to expand a potential ~
30675       eval path="$path"
30676       if test ! -f "$path" && test ! -d "$path"; then
30677         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30678       fi
30679 
30680       if test -d "$path"; then
30681         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30682       else
30683         dir="`$DIRNAME "$path"`"
30684         base="`$BASENAME "$path"`"
30685         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30686       fi
30687     fi
30688   fi
30689 
30690             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30691 $as_echo_n "checking for Boot JDK... " >&6; }
30692             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30693 $as_echo "$BOOT_JDK" >&6; }
30694             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30695 $as_echo_n "checking Boot JDK version... " >&6; }
30696             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30697             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30698 $as_echo "$BOOT_JDK_VERSION" >&6; }
30699           fi # end check jdk version
30700         fi # end check javac
30701       fi # end check java
30702     fi # end check boot jdk found
30703   fi
30704 
30705 
30706   # If we haven't found anything yet, we've truly lost. Give up.
30707   if test "x$BOOT_JDK_FOUND" = xno; then
30708 
30709   # Print a helpful message on how to acquire the necessary build dependency.
30710   # openjdk is the help tag: freetype, cups, alsa etc
30711   MISSING_DEPENDENCY=openjdk
30712 
30713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30714     cygwin_help $MISSING_DEPENDENCY
30715   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30716     msys_help $MISSING_DEPENDENCY
30717   else
30718     PKGHANDLER_COMMAND=
30719 
30720     case $PKGHANDLER in
30721       apt-get)
30722         apt_help     $MISSING_DEPENDENCY ;;
30723       yum)
30724         yum_help     $MISSING_DEPENDENCY ;;
30725       brew)
30726         brew_help    $MISSING_DEPENDENCY ;;
30727       port)
30728         port_help    $MISSING_DEPENDENCY ;;
30729       pkgutil)
30730         pkgutil_help $MISSING_DEPENDENCY ;;
30731       pkgadd)
30732         pkgadd_help  $MISSING_DEPENDENCY ;;
30733     esac
30734 
30735     if test "x$PKGHANDLER_COMMAND" != x; then
30736       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30737     fi
30738   fi
30739 
30740     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30741 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30742     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30743 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30744     as_fn_error $? "Cannot continue" "$LINENO" 5
30745   fi
30746 
30747 
30748 
30749   # Setup tools from the Boot JDK.
30750 
30751   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30752 
30753   # Publish this variable in the help.
30754 
30755 
30756   if [ -z "${JAVA+x}" ]; then
30757     # The variable is not set by user, try to locate tool using the code snippet
30758 
30759       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30760 $as_echo_n "checking for java in Boot JDK... " >&6; }
30761       JAVA=$BOOT_JDK/bin/java
30762       if test ! -x $JAVA; then
30763         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30764 $as_echo "not found" >&6; }
30765         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30766 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30767         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30768       fi
30769       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30770 $as_echo "ok" >&6; }
30771 
30772 
30773   else
30774     # The variable is set, but is it from the command line or the environment?
30775 
30776     # Try to remove the string !JAVA! from our list.
30777     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30778     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30779       # If it failed, the variable was not from the command line. Ignore it,
30780       # but warn the user (except for BASH, which is always set by the calling BASH).
30781       if test "xJAVA" != xBASH; then
30782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30783 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30784       fi
30785       # Try to locate tool using the code snippet
30786 
30787       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30788 $as_echo_n "checking for java in Boot JDK... " >&6; }
30789       JAVA=$BOOT_JDK/bin/java
30790       if test ! -x $JAVA; then
30791         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30792 $as_echo "not found" >&6; }
30793         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30794 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30795         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30796       fi
30797       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30798 $as_echo "ok" >&6; }
30799 
30800 
30801     else
30802       # If it succeeded, then it was overridden by the user. We will use it
30803       # for the tool.
30804 
30805       # First remove it from the list of overridden variables, so we can test
30806       # for unknown variables in the end.
30807       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30808 
30809       # Check if we try to supply an empty value
30810       if test "x$JAVA" = x; then
30811         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30812 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30813         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30814 $as_echo_n "checking for JAVA... " >&6; }
30815         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30816 $as_echo "disabled" >&6; }
30817       else
30818         # Check if the provided tool contains a complete path.
30819         tool_specified="$JAVA"
30820         tool_basename="${tool_specified##*/}"
30821         if test "x$tool_basename" = "x$tool_specified"; then
30822           # A command without a complete path is provided, search $PATH.
30823           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30824 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30825           # Extract the first word of "$tool_basename", so it can be a program name with args.
30826 set dummy $tool_basename; ac_word=$2
30827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30828 $as_echo_n "checking for $ac_word... " >&6; }
30829 if ${ac_cv_path_JAVA+:} false; then :
30830   $as_echo_n "(cached) " >&6
30831 else
30832   case $JAVA in
30833   [\\/]* | ?:[\\/]*)
30834   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30835   ;;
30836   *)
30837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30838 for as_dir in $PATH
30839 do
30840   IFS=$as_save_IFS
30841   test -z "$as_dir" && as_dir=.
30842     for ac_exec_ext in '' $ac_executable_extensions; do
30843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30844     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30846     break 2
30847   fi
30848 done
30849   done
30850 IFS=$as_save_IFS
30851 
30852   ;;
30853 esac
30854 fi
30855 JAVA=$ac_cv_path_JAVA
30856 if test -n "$JAVA"; then
30857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30858 $as_echo "$JAVA" >&6; }
30859 else
30860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30861 $as_echo "no" >&6; }
30862 fi
30863 
30864 
30865           if test "x$JAVA" = x; then
30866             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30867           fi
30868         else
30869           # Otherwise we believe it is a complete path. Use it as it is.
30870           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30871 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30872           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30873 $as_echo_n "checking for JAVA... " >&6; }
30874           if test ! -x "$tool_specified"; then
30875             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30876 $as_echo "not found" >&6; }
30877             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30878           fi
30879           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30880 $as_echo "$tool_specified" >&6; }
30881         fi
30882       fi
30883     fi
30884 
30885   fi
30886 
30887 
30888 
30889   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30890 
30891   # Publish this variable in the help.
30892 
30893 
30894   if [ -z "${JAVAC+x}" ]; then
30895     # The variable is not set by user, try to locate tool using the code snippet
30896 
30897       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30898 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30899       JAVAC=$BOOT_JDK/bin/javac
30900       if test ! -x $JAVAC; then
30901         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30902 $as_echo "not found" >&6; }
30903         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30904 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30905         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30906       fi
30907       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30908 $as_echo "ok" >&6; }
30909 
30910 
30911   else
30912     # The variable is set, but is it from the command line or the environment?
30913 
30914     # Try to remove the string !JAVAC! from our list.
30915     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30916     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30917       # If it failed, the variable was not from the command line. Ignore it,
30918       # but warn the user (except for BASH, which is always set by the calling BASH).
30919       if test "xJAVAC" != xBASH; then
30920         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30921 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30922       fi
30923       # Try to locate tool using the code snippet
30924 
30925       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30926 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30927       JAVAC=$BOOT_JDK/bin/javac
30928       if test ! -x $JAVAC; then
30929         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30930 $as_echo "not found" >&6; }
30931         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30932 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30933         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30934       fi
30935       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30936 $as_echo "ok" >&6; }
30937 
30938 
30939     else
30940       # If it succeeded, then it was overridden by the user. We will use it
30941       # for the tool.
30942 
30943       # First remove it from the list of overridden variables, so we can test
30944       # for unknown variables in the end.
30945       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30946 
30947       # Check if we try to supply an empty value
30948       if test "x$JAVAC" = x; then
30949         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30950 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30951         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30952 $as_echo_n "checking for JAVAC... " >&6; }
30953         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30954 $as_echo "disabled" >&6; }
30955       else
30956         # Check if the provided tool contains a complete path.
30957         tool_specified="$JAVAC"
30958         tool_basename="${tool_specified##*/}"
30959         if test "x$tool_basename" = "x$tool_specified"; then
30960           # A command without a complete path is provided, search $PATH.
30961           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30962 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30963           # Extract the first word of "$tool_basename", so it can be a program name with args.
30964 set dummy $tool_basename; ac_word=$2
30965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30966 $as_echo_n "checking for $ac_word... " >&6; }
30967 if ${ac_cv_path_JAVAC+:} false; then :
30968   $as_echo_n "(cached) " >&6
30969 else
30970   case $JAVAC in
30971   [\\/]* | ?:[\\/]*)
30972   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30973   ;;
30974   *)
30975   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30976 for as_dir in $PATH
30977 do
30978   IFS=$as_save_IFS
30979   test -z "$as_dir" && as_dir=.
30980     for ac_exec_ext in '' $ac_executable_extensions; do
30981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30982     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30984     break 2
30985   fi
30986 done
30987   done
30988 IFS=$as_save_IFS
30989 
30990   ;;
30991 esac
30992 fi
30993 JAVAC=$ac_cv_path_JAVAC
30994 if test -n "$JAVAC"; then
30995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30996 $as_echo "$JAVAC" >&6; }
30997 else
30998   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30999 $as_echo "no" >&6; }
31000 fi
31001 
31002 
31003           if test "x$JAVAC" = x; then
31004             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31005           fi
31006         else
31007           # Otherwise we believe it is a complete path. Use it as it is.
31008           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
31009 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
31010           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
31011 $as_echo_n "checking for JAVAC... " >&6; }
31012           if test ! -x "$tool_specified"; then
31013             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31014 $as_echo "not found" >&6; }
31015             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
31016           fi
31017           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31018 $as_echo "$tool_specified" >&6; }
31019         fi
31020       fi
31021     fi
31022 
31023   fi
31024 
31025 
31026 
31027   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31028 
31029   # Publish this variable in the help.
31030 
31031 
31032   if [ -z "${JAVADOC+x}" ]; then
31033     # The variable is not set by user, try to locate tool using the code snippet
31034 
31035       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javadoc in Boot JDK" >&5
31036 $as_echo_n "checking for javadoc in Boot JDK... " >&6; }
31037       JAVADOC=$BOOT_JDK/bin/javadoc
31038       if test ! -x $JAVADOC; then
31039         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31040 $as_echo "not found" >&6; }
31041         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31042 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31043         as_fn_error $? "Could not find javadoc in the Boot JDK" "$LINENO" 5
31044       fi
31045       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31046 $as_echo "ok" >&6; }
31047 
31048 
31049   else
31050     # The variable is set, but is it from the command line or the environment?
31051 
31052     # Try to remove the string !JAVADOC! from our list.
31053     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVADOC!/}
31054     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31055       # If it failed, the variable was not from the command line. Ignore it,
31056       # but warn the user (except for BASH, which is always set by the calling BASH).
31057       if test "xJAVADOC" != xBASH; then
31058         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVADOC from the environment. Use command line variables instead." >&5
31059 $as_echo "$as_me: WARNING: Ignoring value of JAVADOC from the environment. Use command line variables instead." >&2;}
31060       fi
31061       # Try to locate tool using the code snippet
31062 
31063       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javadoc in Boot JDK" >&5
31064 $as_echo_n "checking for javadoc in Boot JDK... " >&6; }
31065       JAVADOC=$BOOT_JDK/bin/javadoc
31066       if test ! -x $JAVADOC; then
31067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31068 $as_echo "not found" >&6; }
31069         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31070 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31071         as_fn_error $? "Could not find javadoc in the Boot JDK" "$LINENO" 5
31072       fi
31073       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31074 $as_echo "ok" >&6; }
31075 
31076 
31077     else
31078       # If it succeeded, then it was overridden by the user. We will use it
31079       # for the tool.
31080 
31081       # First remove it from the list of overridden variables, so we can test
31082       # for unknown variables in the end.
31083       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31084 
31085       # Check if we try to supply an empty value
31086       if test "x$JAVADOC" = x; then
31087         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVADOC= (no value)" >&5
31088 $as_echo "$as_me: Setting user supplied tool JAVADOC= (no value)" >&6;}
31089         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVADOC" >&5
31090 $as_echo_n "checking for JAVADOC... " >&6; }
31091         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31092 $as_echo "disabled" >&6; }
31093       else
31094         # Check if the provided tool contains a complete path.
31095         tool_specified="$JAVADOC"
31096         tool_basename="${tool_specified##*/}"
31097         if test "x$tool_basename" = "x$tool_specified"; then
31098           # A command without a complete path is provided, search $PATH.
31099           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVADOC=$tool_basename" >&5
31100 $as_echo "$as_me: Will search for user supplied tool JAVADOC=$tool_basename" >&6;}
31101           # Extract the first word of "$tool_basename", so it can be a program name with args.
31102 set dummy $tool_basename; ac_word=$2
31103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31104 $as_echo_n "checking for $ac_word... " >&6; }
31105 if ${ac_cv_path_JAVADOC+:} false; then :
31106   $as_echo_n "(cached) " >&6
31107 else
31108   case $JAVADOC in
31109   [\\/]* | ?:[\\/]*)
31110   ac_cv_path_JAVADOC="$JAVADOC" # Let the user override the test with a path.
31111   ;;
31112   *)
31113   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31114 for as_dir in $PATH
31115 do
31116   IFS=$as_save_IFS
31117   test -z "$as_dir" && as_dir=.
31118     for ac_exec_ext in '' $ac_executable_extensions; do
31119   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31120     ac_cv_path_JAVADOC="$as_dir/$ac_word$ac_exec_ext"
31121     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31122     break 2
31123   fi
31124 done
31125   done
31126 IFS=$as_save_IFS
31127 
31128   ;;
31129 esac
31130 fi
31131 JAVADOC=$ac_cv_path_JAVADOC
31132 if test -n "$JAVADOC"; then
31133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVADOC" >&5
31134 $as_echo "$JAVADOC" >&6; }
31135 else
31136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31137 $as_echo "no" >&6; }
31138 fi
31139 
31140 
31141           if test "x$JAVADOC" = x; then
31142             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31143           fi
31144         else
31145           # Otherwise we believe it is a complete path. Use it as it is.
31146           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVADOC=$tool_specified" >&5
31147 $as_echo "$as_me: Will use user supplied tool JAVADOC=$tool_specified" >&6;}
31148           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVADOC" >&5
31149 $as_echo_n "checking for JAVADOC... " >&6; }
31150           if test ! -x "$tool_specified"; then
31151             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31152 $as_echo "not found" >&6; }
31153             as_fn_error $? "User supplied tool JAVADOC=$tool_specified does not exist or is not executable" "$LINENO" 5
31154           fi
31155           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31156 $as_echo "$tool_specified" >&6; }
31157         fi
31158       fi
31159     fi
31160 
31161   fi
31162 
31163 
31164 
31165   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31166 
31167   # Publish this variable in the help.
31168 
31169 
31170   if [ -z "${JAR+x}" ]; then
31171     # The variable is not set by user, try to locate tool using the code snippet
31172 
31173       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31174 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31175       JAR=$BOOT_JDK/bin/jar
31176       if test ! -x $JAR; then
31177         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31178 $as_echo "not found" >&6; }
31179         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31180 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31181         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31182       fi
31183       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31184 $as_echo "ok" >&6; }
31185 
31186 
31187   else
31188     # The variable is set, but is it from the command line or the environment?
31189 
31190     # Try to remove the string !JAR! from our list.
31191     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31192     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31193       # If it failed, the variable was not from the command line. Ignore it,
31194       # but warn the user (except for BASH, which is always set by the calling BASH).
31195       if test "xJAR" != xBASH; then
31196         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31197 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31198       fi
31199       # Try to locate tool using the code snippet
31200 
31201       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31202 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31203       JAR=$BOOT_JDK/bin/jar
31204       if test ! -x $JAR; then
31205         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31206 $as_echo "not found" >&6; }
31207         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31208 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31209         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31210       fi
31211       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31212 $as_echo "ok" >&6; }
31213 
31214 
31215     else
31216       # If it succeeded, then it was overridden by the user. We will use it
31217       # for the tool.
31218 
31219       # First remove it from the list of overridden variables, so we can test
31220       # for unknown variables in the end.
31221       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31222 
31223       # Check if we try to supply an empty value
31224       if test "x$JAR" = x; then
31225         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31226 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31227         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31228 $as_echo_n "checking for JAR... " >&6; }
31229         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31230 $as_echo "disabled" >&6; }
31231       else
31232         # Check if the provided tool contains a complete path.
31233         tool_specified="$JAR"
31234         tool_basename="${tool_specified##*/}"
31235         if test "x$tool_basename" = "x$tool_specified"; then
31236           # A command without a complete path is provided, search $PATH.
31237           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31238 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31239           # Extract the first word of "$tool_basename", so it can be a program name with args.
31240 set dummy $tool_basename; ac_word=$2
31241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31242 $as_echo_n "checking for $ac_word... " >&6; }
31243 if ${ac_cv_path_JAR+:} false; then :
31244   $as_echo_n "(cached) " >&6
31245 else
31246   case $JAR in
31247   [\\/]* | ?:[\\/]*)
31248   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31249   ;;
31250   *)
31251   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31252 for as_dir in $PATH
31253 do
31254   IFS=$as_save_IFS
31255   test -z "$as_dir" && as_dir=.
31256     for ac_exec_ext in '' $ac_executable_extensions; do
31257   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31258     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31259     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31260     break 2
31261   fi
31262 done
31263   done
31264 IFS=$as_save_IFS
31265 
31266   ;;
31267 esac
31268 fi
31269 JAR=$ac_cv_path_JAR
31270 if test -n "$JAR"; then
31271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31272 $as_echo "$JAR" >&6; }
31273 else
31274   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31275 $as_echo "no" >&6; }
31276 fi
31277 
31278 
31279           if test "x$JAR" = x; then
31280             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31281           fi
31282         else
31283           # Otherwise we believe it is a complete path. Use it as it is.
31284           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31285 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31286           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31287 $as_echo_n "checking for JAR... " >&6; }
31288           if test ! -x "$tool_specified"; then
31289             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31290 $as_echo "not found" >&6; }
31291             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31292           fi
31293           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31294 $as_echo "$tool_specified" >&6; }
31295         fi
31296       fi
31297     fi
31298 
31299   fi
31300 
31301 
31302 
31303   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31304 
31305   # Publish this variable in the help.
31306 
31307 
31308   if [ -z "${JARSIGNER+x}" ]; then
31309     # The variable is not set by user, try to locate tool using the code snippet
31310 
31311       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31312 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31313       JARSIGNER=$BOOT_JDK/bin/jarsigner
31314       if test ! -x $JARSIGNER; then
31315         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31316 $as_echo "not found" >&6; }
31317         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31318 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31319         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31320       fi
31321       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31322 $as_echo "ok" >&6; }
31323 
31324 
31325   else
31326     # The variable is set, but is it from the command line or the environment?
31327 
31328     # Try to remove the string !JARSIGNER! from our list.
31329     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31330     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31331       # If it failed, the variable was not from the command line. Ignore it,
31332       # but warn the user (except for BASH, which is always set by the calling BASH).
31333       if test "xJARSIGNER" != xBASH; then
31334         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31335 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31336       fi
31337       # Try to locate tool using the code snippet
31338 
31339       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31340 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31341       JARSIGNER=$BOOT_JDK/bin/jarsigner
31342       if test ! -x $JARSIGNER; then
31343         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31344 $as_echo "not found" >&6; }
31345         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31346 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31347         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31348       fi
31349       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31350 $as_echo "ok" >&6; }
31351 
31352 
31353     else
31354       # If it succeeded, then it was overridden by the user. We will use it
31355       # for the tool.
31356 
31357       # First remove it from the list of overridden variables, so we can test
31358       # for unknown variables in the end.
31359       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31360 
31361       # Check if we try to supply an empty value
31362       if test "x$JARSIGNER" = x; then
31363         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31364 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31365         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31366 $as_echo_n "checking for JARSIGNER... " >&6; }
31367         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31368 $as_echo "disabled" >&6; }
31369       else
31370         # Check if the provided tool contains a complete path.
31371         tool_specified="$JARSIGNER"
31372         tool_basename="${tool_specified##*/}"
31373         if test "x$tool_basename" = "x$tool_specified"; then
31374           # A command without a complete path is provided, search $PATH.
31375           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31376 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31377           # Extract the first word of "$tool_basename", so it can be a program name with args.
31378 set dummy $tool_basename; ac_word=$2
31379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31380 $as_echo_n "checking for $ac_word... " >&6; }
31381 if ${ac_cv_path_JARSIGNER+:} false; then :
31382   $as_echo_n "(cached) " >&6
31383 else
31384   case $JARSIGNER in
31385   [\\/]* | ?:[\\/]*)
31386   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31387   ;;
31388   *)
31389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31390 for as_dir in $PATH
31391 do
31392   IFS=$as_save_IFS
31393   test -z "$as_dir" && as_dir=.
31394     for ac_exec_ext in '' $ac_executable_extensions; do
31395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31396     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31398     break 2
31399   fi
31400 done
31401   done
31402 IFS=$as_save_IFS
31403 
31404   ;;
31405 esac
31406 fi
31407 JARSIGNER=$ac_cv_path_JARSIGNER
31408 if test -n "$JARSIGNER"; then
31409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31410 $as_echo "$JARSIGNER" >&6; }
31411 else
31412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31413 $as_echo "no" >&6; }
31414 fi
31415 
31416 
31417           if test "x$JARSIGNER" = x; then
31418             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31419           fi
31420         else
31421           # Otherwise we believe it is a complete path. Use it as it is.
31422           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31423 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31424           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31425 $as_echo_n "checking for JARSIGNER... " >&6; }
31426           if test ! -x "$tool_specified"; then
31427             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31428 $as_echo "not found" >&6; }
31429             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31430           fi
31431           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31432 $as_echo "$tool_specified" >&6; }
31433         fi
31434       fi
31435     fi
31436 
31437   fi
31438 
31439 
31440 
31441   # Finally, set some other options...
31442 
31443   # When compiling code to be executed by the Boot JDK, force compatibility with the
31444   # oldest supported bootjdk.
31445   BOOT_JDK_SOURCETARGET="-source 9 -target 9"
31446 
31447 
31448 
31449 
31450   # Check if the boot jdk is 32 or 64 bit
31451   if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31452     BOOT_JDK_BITS="64"
31453   else
31454     BOOT_JDK_BITS="32"
31455   fi
31456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31457 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31459 $as_echo "$BOOT_JDK_BITS" >&6; }
31460 
31461   # Try to enable CDS
31462   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for local Boot JDK Class Data Sharing (CDS)" >&5
31463 $as_echo_n "checking for local Boot JDK Class Data Sharing (CDS)... " >&6; }
31464   BOOT_JDK_CDS_ARCHIVE=$CONFIGURESUPPORT_OUTPUTDIR/classes.jsa
31465 
31466   $ECHO "Check if jvm arg is ok: -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE" >&5
31467   $ECHO "Command: $JAVA -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE -version" >&5
31468   OUTPUT=`$JAVA -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE -version 2>&1`
31469   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
31470   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
31471   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
31472     boot_jdk_cds_args="$boot_jdk_cds_args -XX:+UnlockDiagnosticVMOptions -XX:-VerifySharedSpaces -XX:SharedArchiveFile=$BOOT_JDK_CDS_ARCHIVE"
31473     JVM_ARG_OK=true
31474   else
31475     $ECHO "Arg failed:" >&5
31476     $ECHO "$OUTPUT" >&5
31477     JVM_ARG_OK=false
31478   fi
31479 
31480 
31481   if test "x$boot_jdk_cds_args" != x; then
31482     # Try creating a CDS archive
31483     "$JAVA" $boot_jdk_cds_args -Xshare:dump > /dev/null 2>&1
31484     if test $? -eq 0; then
31485       BOOTJDK_USE_LOCAL_CDS=true
31486       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, created" >&5
31487 $as_echo "yes, created" >&6; }
31488     else
31489       # Generation failed, don't use CDS.
31490       BOOTJDK_USE_LOCAL_CDS=false
31491       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, creation failed" >&5
31492 $as_echo "no, creation failed" >&6; }
31493     fi
31494   else
31495     BOOTJDK_USE_LOCAL_CDS=false
31496     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, -XX:SharedArchiveFile not supported" >&5
31497 $as_echo "no, -XX:SharedArchiveFile not supported" >&6; }
31498   fi
31499 
31500 
31501 
31502 # Check whether --with-build-jdk was given.
31503 if test "${with_build_jdk+set}" = set; then :
31504   withval=$with_build_jdk;
31505 fi
31506 
31507 
31508   CREATE_BUILDJDK=false
31509   EXTERNAL_BUILDJDK=false
31510   BUILD_JDK_FOUND="no"
31511   if test "x$with_build_jdk" != "x"; then
31512 
31513   if test "x$BUILD_JDK_FOUND" = xno; then
31514     # Execute the test
31515 
31516        if test "x$with_build_jdk" != x; then
31517          BUILD_JDK=$with_build_jdk
31518          BUILD_JDK_FOUND=maybe
31519          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31520 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31521        fi
31522 
31523     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31524     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31525       # Do we have a bin/java?
31526       if test ! -x "$BUILD_JDK/bin/java"; then
31527         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31528 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31529         BUILD_JDK_FOUND=no
31530       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31531         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31532 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31533         BUILD_JDK_FOUND=no
31534       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31535         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31536 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31537         BUILD_JDK_FOUND=no
31538       elif test ! -x "$BUILD_JDK/bin/javac"; then
31539         # Do we have a bin/javac?
31540         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31541 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31542         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31543 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31544         BUILD_JDK_FOUND=no
31545       else
31546         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31547         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31548 
31549         # Extra M4 quote needed to protect [] in grep expression.
31550         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"10([\.+-].*)?\"'`
31551         if test "x$FOUND_CORRECT_VERSION" = x; then
31552           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31553 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31554           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 10)" >&5
31555 $as_echo "$as_me: (Your Build JDK must be version 10)" >&6;}
31556           BUILD_JDK_FOUND=no
31557         else
31558           # We're done!
31559           BUILD_JDK_FOUND=yes
31560 
31561   # Only process if variable expands to non-empty
31562 
31563   if test "x$BUILD_JDK" != x; then
31564     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31565 
31566   # Input might be given as Windows format, start by converting to
31567   # unix format.
31568   path="$BUILD_JDK"
31569   new_path=`$CYGPATH -u "$path"`
31570 
31571   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31572   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31573   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31574   # "foo.exe" is OK but "foo" is an error.
31575   #
31576   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31577   # It is also a way to make sure we got the proper file name for the real test later on.
31578   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31579   if test "x$test_shortpath" = x; then
31580     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31581 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31582     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31583   fi
31584 
31585   # Call helper function which possibly converts this using DOS-style short mode.
31586   # If so, the updated path is stored in $new_path.
31587 
31588   input_path="$new_path"
31589   # Check if we need to convert this using DOS-style short mode. If the path
31590   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31591   # take no chances and rewrite it.
31592   # Note: m4 eats our [], so we need to use [ and ] instead.
31593   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31594   if test "x$has_forbidden_chars" != x; then
31595     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31596     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31597     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31598     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31599       # Going to short mode and back again did indeed matter. Since short mode is
31600       # case insensitive, let's make it lowercase to improve readability.
31601       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31602       # Now convert it back to Unix-style (cygpath)
31603       input_path=`$CYGPATH -u "$shortmode_path"`
31604       new_path="$input_path"
31605     fi
31606   fi
31607 
31608   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31609   if test "x$test_cygdrive_prefix" = x; then
31610     # As a simple fix, exclude /usr/bin since it's not a real path.
31611     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31612       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31613       # a path prefixed by /cygdrive for fixpath to work.
31614       new_path="$CYGWIN_ROOT_PATH$input_path"
31615     fi
31616   fi
31617 
31618 
31619   if test "x$path" != "x$new_path"; then
31620     BUILD_JDK="$new_path"
31621     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31622 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31623   fi
31624 
31625     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31626 
31627   path="$BUILD_JDK"
31628   has_colon=`$ECHO $path | $GREP ^.:`
31629   new_path="$path"
31630   if test "x$has_colon" = x; then
31631     # Not in mixed or Windows style, start by that.
31632     new_path=`cmd //c echo $path`
31633   fi
31634 
31635 
31636   input_path="$new_path"
31637   # Check if we need to convert this using DOS-style short mode. If the path
31638   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31639   # take no chances and rewrite it.
31640   # Note: m4 eats our [], so we need to use [ and ] instead.
31641   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31642   if test "x$has_forbidden_chars" != x; then
31643     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31644     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31645   fi
31646 
31647 
31648   windows_path="$new_path"
31649   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31650     unix_path=`$CYGPATH -u "$windows_path"`
31651     new_path="$unix_path"
31652   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31653     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31654     new_path="$unix_path"
31655   fi
31656 
31657   if test "x$path" != "x$new_path"; then
31658     BUILD_JDK="$new_path"
31659     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31660 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31661   fi
31662 
31663   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31664   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31665 
31666     else
31667       # We're on a unix platform. Hooray! :)
31668       path="$BUILD_JDK"
31669       has_space=`$ECHO "$path" | $GREP " "`
31670       if test "x$has_space" != x; then
31671         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31672 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31673         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31674       fi
31675 
31676       # Use eval to expand a potential ~
31677       eval path="$path"
31678       if test ! -f "$path" && test ! -d "$path"; then
31679         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31680       fi
31681 
31682       if test -d "$path"; then
31683         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31684       else
31685         dir="`$DIRNAME "$path"`"
31686         base="`$BASENAME "$path"`"
31687         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31688       fi
31689     fi
31690   fi
31691 
31692           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31693 $as_echo_n "checking for Build JDK... " >&6; }
31694           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31695 $as_echo "$BUILD_JDK" >&6; }
31696           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31697 $as_echo_n "checking Build JDK version... " >&6; }
31698           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31699           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31700 $as_echo "$BUILD_JDK_VERSION" >&6; }
31701         fi # end check jdk version
31702       fi # end check java
31703     fi # end check build jdk found
31704   fi
31705 
31706     EXTERNAL_BUILDJDK=true
31707   else
31708     if test "x$COMPILE_TYPE" = "xcross"; then
31709       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31710       BUILD_JDK_FOUND=yes
31711       CREATE_BUILDJDK=true
31712       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31713 $as_echo_n "checking for Build JDK... " >&6; }
31714       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31715 $as_echo "yes, will build it for the host platform" >&6; }
31716     else
31717       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31718       BUILD_JDK_FOUND=yes
31719       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31720 $as_echo_n "checking for Build JDK... " >&6; }
31721       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31722 $as_echo "yes, will use output dir" >&6; }
31723     fi
31724   fi
31725 
31726   JMOD="$BUILD_JDK/bin/jmod"
31727   JLINK="$BUILD_JDK/bin/jlink"
31728 
31729 
31730 
31731   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31733 $as_echo_n "checking for Build JDK... " >&6; }
31734     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31735 $as_echo "no" >&6; }
31736     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31737   fi
31738 
31739 
31740 
31741 
31742 
31743 
31744 ###############################################################################
31745 #
31746 # Configure the sources to use. We can add or override individual directories.
31747 #
31748 ###############################################################################
31749 
31750 
31751   OUTPUTDIR="$OUTPUTDIR"
31752 
31753   JDK_OUTPUTDIR="$OUTPUTDIR/jdk"
31754 
31755   # Where are the sources.
31756 
31757 
31758 
31759 
31760 # Check whether --with-import-modules was given.
31761 if test "${with_import_modules+set}" = set; then :
31762   withval=$with_import_modules;
31763 fi
31764 
31765 
31766   if test "x$with_import_modules" != x \
31767       && test "x$with_import_modules" != "xno"; then
31768     if test -d "$with_import_modules"; then
31769       IMPORT_MODULES_TOPDIR="$with_import_modules"
31770 
31771   # Only process if variable expands to non-empty
31772 
31773   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31774     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31775 
31776   # Input might be given as Windows format, start by converting to
31777   # unix format.
31778   path="$IMPORT_MODULES_TOPDIR"
31779   new_path=`$CYGPATH -u "$path"`
31780 
31781   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31782   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31783   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31784   # "foo.exe" is OK but "foo" is an error.
31785   #
31786   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31787   # It is also a way to make sure we got the proper file name for the real test later on.
31788   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31789   if test "x$test_shortpath" = x; then
31790     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31791 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31792     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31793   fi
31794 
31795   # Call helper function which possibly converts this using DOS-style short mode.
31796   # If so, the updated path is stored in $new_path.
31797 
31798   input_path="$new_path"
31799   # Check if we need to convert this using DOS-style short mode. If the path
31800   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31801   # take no chances and rewrite it.
31802   # Note: m4 eats our [], so we need to use [ and ] instead.
31803   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31804   if test "x$has_forbidden_chars" != x; then
31805     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31806     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31807     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31808     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31809       # Going to short mode and back again did indeed matter. Since short mode is
31810       # case insensitive, let's make it lowercase to improve readability.
31811       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31812       # Now convert it back to Unix-style (cygpath)
31813       input_path=`$CYGPATH -u "$shortmode_path"`
31814       new_path="$input_path"
31815     fi
31816   fi
31817 
31818   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31819   if test "x$test_cygdrive_prefix" = x; then
31820     # As a simple fix, exclude /usr/bin since it's not a real path.
31821     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31822       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31823       # a path prefixed by /cygdrive for fixpath to work.
31824       new_path="$CYGWIN_ROOT_PATH$input_path"
31825     fi
31826   fi
31827 
31828 
31829   if test "x$path" != "x$new_path"; then
31830     IMPORT_MODULES_TOPDIR="$new_path"
31831     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31832 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31833   fi
31834 
31835     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31836 
31837   path="$IMPORT_MODULES_TOPDIR"
31838   has_colon=`$ECHO $path | $GREP ^.:`
31839   new_path="$path"
31840   if test "x$has_colon" = x; then
31841     # Not in mixed or Windows style, start by that.
31842     new_path=`cmd //c echo $path`
31843   fi
31844 
31845 
31846   input_path="$new_path"
31847   # Check if we need to convert this using DOS-style short mode. If the path
31848   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31849   # take no chances and rewrite it.
31850   # Note: m4 eats our [], so we need to use [ and ] instead.
31851   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31852   if test "x$has_forbidden_chars" != x; then
31853     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31854     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31855   fi
31856 
31857 
31858   windows_path="$new_path"
31859   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31860     unix_path=`$CYGPATH -u "$windows_path"`
31861     new_path="$unix_path"
31862   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31863     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31864     new_path="$unix_path"
31865   fi
31866 
31867   if test "x$path" != "x$new_path"; then
31868     IMPORT_MODULES_TOPDIR="$new_path"
31869     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31870 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31871   fi
31872 
31873   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31874   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31875 
31876     else
31877       # We're on a unix platform. Hooray! :)
31878       path="$IMPORT_MODULES_TOPDIR"
31879       has_space=`$ECHO "$path" | $GREP " "`
31880       if test "x$has_space" != x; then
31881         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31882 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31883         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31884       fi
31885 
31886       # Use eval to expand a potential ~
31887       eval path="$path"
31888       if test ! -f "$path" && test ! -d "$path"; then
31889         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31890       fi
31891 
31892       if test -d "$path"; then
31893         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31894       else
31895         dir="`$DIRNAME "$path"`"
31896         base="`$BASENAME "$path"`"
31897         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31898       fi
31899     fi
31900   fi
31901 
31902     elif test -e "$with_import_modules"; then
31903       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31904       $RM -rf "$IMPORT_MODULES_TOPDIR"
31905       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31906       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31907         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31908       fi
31909     else
31910       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31911     fi
31912   fi
31913 
31914   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31915     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31916   fi
31917   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31918     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31919   fi
31920   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31921     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31922   fi
31923   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31924     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31925   fi
31926   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31927     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31928   fi
31929   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31930     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31931   fi
31932   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31933     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31934   fi
31935   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31936     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31937   fi
31938 
31939 
31940 
31941 
31942 
31943 
31944 
31945 
31946 
31947 
31948 
31949 ###############################################################################
31950 #
31951 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
31952 # native code.
31953 #
31954 ###############################################################################
31955 
31956 # See if we are doing a complete static build or not
31957 
31958   # Check whether --enable-static-build was given.
31959 if test "${enable_static_build+set}" = set; then :
31960   enableval=$enable_static_build;
31961 fi
31962 
31963   STATIC_BUILD=false
31964   if test "x$enable_static_build" = "xyes"; then
31965     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31966 $as_echo_n "checking if static build is enabled... " >&6; }
31967     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31968 $as_echo "yes" >&6; }
31969     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31970       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31971     fi
31972     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31973     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31974     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31975     STATIC_BUILD=true
31976   elif test "x$enable_static_build" = "xno"; then
31977     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31978 $as_echo_n "checking if static build is enabled... " >&6; }
31979     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31980 $as_echo "no" >&6; }
31981   elif test "x$enable_static_build" != "x"; then
31982     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31983   fi
31984 
31985 
31986 
31987 
31988 # First determine the toolchain type (compiler family)
31989 
31990 
31991 # Check whether --with-toolchain-type was given.
31992 if test "${with_toolchain_type+set}" = set; then :
31993   withval=$with_toolchain_type;
31994 fi
31995 
31996 
31997   # Use indirect variable referencing
31998   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31999   VALID_TOOLCHAINS=${!toolchain_var_name}
32000 
32001   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32002     if test -n "$XCODEBUILD"; then
32003       # On Mac OS X, default toolchain to clang after Xcode 5
32004       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32005       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32006       if test $? -ne 0; then
32007         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32008       fi
32009       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32010           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32011           $CUT -f 1 -d .`
32012       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32013 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32014       if test $XCODE_MAJOR_VERSION -ge 5; then
32015           DEFAULT_TOOLCHAIN="clang"
32016       else
32017           DEFAULT_TOOLCHAIN="gcc"
32018       fi
32019     else
32020       # If Xcode is not installed, but the command line tools are
32021       # then we can't run xcodebuild. On these systems we should
32022       # default to clang
32023       DEFAULT_TOOLCHAIN="clang"
32024     fi
32025   else
32026     # First toolchain type in the list is the default
32027     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32028   fi
32029 
32030   if test "x$with_toolchain_type" = xlist; then
32031     # List all toolchains
32032     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32033 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32034     for toolchain in $VALID_TOOLCHAINS; do
32035       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32036       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32037       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32038     done
32039 
32040     exit 0
32041   elif test "x$with_toolchain_type" != x; then
32042     # User override; check that it is valid
32043     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32044       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32045 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32046       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32047 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32048       as_fn_error $? "Cannot continue." "$LINENO" 5
32049     fi
32050     TOOLCHAIN_TYPE=$with_toolchain_type
32051   else
32052     # No flag given, use default
32053     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32054   fi
32055 
32056 
32057   TOOLCHAIN_CC_BINARY_clang="clang"
32058   TOOLCHAIN_CC_BINARY_gcc="gcc"
32059   TOOLCHAIN_CC_BINARY_microsoft="cl"
32060   TOOLCHAIN_CC_BINARY_solstudio="cc"
32061   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32062 
32063   TOOLCHAIN_CXX_BINARY_clang="clang++"
32064   TOOLCHAIN_CXX_BINARY_gcc="g++"
32065   TOOLCHAIN_CXX_BINARY_microsoft="cl"
32066   TOOLCHAIN_CXX_BINARY_solstudio="CC"
32067   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32068 
32069   # Use indirect variable referencing
32070   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32071   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32072   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32073   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32074   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32075   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32076   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32077   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32078 
32079 
32080   # Define filename patterns
32081   if test "x$OPENJDK_TARGET_OS" = xwindows; then
32082     LIBRARY_PREFIX=
32083     SHARED_LIBRARY_SUFFIX='.dll'
32084     STATIC_LIBRARY_SUFFIX='.lib'
32085     SHARED_LIBRARY='$1.dll'
32086     STATIC_LIBRARY='$1.lib'
32087     OBJ_SUFFIX='.obj'
32088     EXE_SUFFIX='.exe'
32089   else
32090     LIBRARY_PREFIX=lib
32091     SHARED_LIBRARY_SUFFIX='.so'
32092     STATIC_LIBRARY_SUFFIX='.a'
32093     SHARED_LIBRARY='lib$1.so'
32094     STATIC_LIBRARY='lib$1.a'
32095     OBJ_SUFFIX='.o'
32096     EXE_SUFFIX=''
32097     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32098       # For full static builds, we're overloading the SHARED_LIBRARY
32099       # variables in order to limit the amount of changes required.
32100       # It would be better to remove SHARED and just use LIBRARY and
32101       # LIBRARY_SUFFIX for libraries that can be built either
32102       # shared or static and use STATIC_* for libraries that are
32103       # always built statically.
32104       if test "x$STATIC_BUILD" = xtrue; then
32105         SHARED_LIBRARY='lib$1.a'
32106         SHARED_LIBRARY_SUFFIX='.a'
32107       else
32108         SHARED_LIBRARY='lib$1.dylib'
32109         SHARED_LIBRARY_SUFFIX='.dylib'
32110       fi
32111     fi
32112   fi
32113 
32114 
32115 
32116 
32117 
32118 
32119 
32120 
32121 
32122 
32123   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32124     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32125 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32126   else
32127     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32128 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32129   fi
32130 
32131 
32132 # User supplied flags should be used when configure detects compilers
32133 
32134   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32135     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32136 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32137   fi
32138 
32139   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32140     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32141 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32142   fi
32143 
32144   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32145     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32146 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32147   fi
32148 
32149 
32150 # Check whether --with-extra-cflags was given.
32151 if test "${with_extra_cflags+set}" = set; then :
32152   withval=$with_extra_cflags;
32153 fi
32154 
32155 
32156 
32157 # Check whether --with-extra-cxxflags was given.
32158 if test "${with_extra_cxxflags+set}" = set; then :
32159   withval=$with_extra_cxxflags;
32160 fi
32161 
32162 
32163 
32164 # Check whether --with-extra-ldflags was given.
32165 if test "${with_extra_ldflags+set}" = set; then :
32166   withval=$with_extra_ldflags;
32167 fi
32168 
32169 
32170   EXTRA_CFLAGS="$with_extra_cflags"
32171   EXTRA_CXXFLAGS="$with_extra_cxxflags"
32172   EXTRA_LDFLAGS="$with_extra_ldflags"
32173 
32174 
32175 
32176 
32177 
32178   # The global CFLAGS and LDLAGS variables are used by configure tests and
32179   # should include the extra parameters
32180   CFLAGS="$EXTRA_CFLAGS"
32181   CXXFLAGS="$EXTRA_CXXFLAGS"
32182   LDFLAGS="$EXTRA_LDFLAGS"
32183   CPPFLAGS=""
32184 
32185 # The sysroot cflags are needed for configure to be able to run the compilers
32186 
32187   if test "x$SYSROOT" != "x"; then
32188     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32189       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32190         # Solaris Studio does not have a concept of sysroot. Instead we must
32191         # make sure the default include and lib dirs are appended to each
32192         # compile and link command line. Must also add -I-xbuiltin to enable
32193         # inlining of system functions and intrinsics.
32194         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32195         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32196             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32197       fi
32198     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32199       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32200       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32201     elif test "x$TOOLCHAIN_TYPE" = xclang; then
32202       SYSROOT_CFLAGS="-isysroot $SYSROOT"
32203       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32204     fi
32205     # The global CFLAGS and LDFLAGS variables need these for configure to function
32206     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32207     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32208     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32209     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32210   fi
32211 
32212   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32213     # We also need -iframework<path>/System/Library/Frameworks
32214     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32215     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32216     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32217     # set this here so it doesn't have to be peppered throughout the forest
32218     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32219     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32220   fi
32221 
32222 
32223 
32224 
32225 
32226 # Then detect the actual binaries needed
32227 
32228   # FIXME: Is this needed?
32229   ac_ext=cpp
32230 ac_cpp='$CXXCPP $CPPFLAGS'
32231 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32232 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32233 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32234 
32235 
32236   # Store the CFLAGS etc passed to the configure script.
32237   ORG_CFLAGS="$CFLAGS"
32238   ORG_CXXFLAGS="$CXXFLAGS"
32239 
32240   # autoconf magic only relies on PATH, so update it if tools dir is specified
32241   OLD_PATH="$PATH"
32242 
32243   # On Windows, we need to detect the visual studio installation first.
32244   # This will change the PATH, but we need to keep that new PATH even
32245   # after toolchain detection is done, since the compiler (on x86) uses
32246   # it for DLL resolution in runtime.
32247   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32248       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32249 
32250   # Store path to cygwin link.exe to help excluding it when searching for
32251   # VS linker. This must be done before changing the PATH when looking for VS.
32252   # Extract the first word of "link", so it can be a program name with args.
32253 set dummy link; ac_word=$2
32254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32255 $as_echo_n "checking for $ac_word... " >&6; }
32256 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32257   $as_echo_n "(cached) " >&6
32258 else
32259   case $CYGWIN_LINK in
32260   [\\/]* | ?:[\\/]*)
32261   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32262   ;;
32263   *)
32264   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32265 for as_dir in $PATH
32266 do
32267   IFS=$as_save_IFS
32268   test -z "$as_dir" && as_dir=.
32269     for ac_exec_ext in '' $ac_executable_extensions; do
32270   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32271     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32272     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32273     break 2
32274   fi
32275 done
32276   done
32277 IFS=$as_save_IFS
32278 
32279   ;;
32280 esac
32281 fi
32282 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32283 if test -n "$CYGWIN_LINK"; then
32284   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32285 $as_echo "$CYGWIN_LINK" >&6; }
32286 else
32287   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32288 $as_echo "no" >&6; }
32289 fi
32290 
32291 
32292   if test "x$CYGWIN_LINK" != x; then
32293     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32294 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32295     "$CYGWIN_LINK" --version > /dev/null
32296     if test $? -eq 0 ; then
32297       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32298 $as_echo "yes" >&6; }
32299     else
32300       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32301 $as_echo "no" >&6; }
32302       # This might be the VS linker. Don't exclude it later on.
32303       CYGWIN_LINK=""
32304     fi
32305   fi
32306 
32307   # First-hand choice is to locate and run the vsvars bat file.
32308 
32309 
32310 # Check whether --with-toolchain-version was given.
32311 if test "${with_toolchain_version+set}" = set; then :
32312   withval=$with_toolchain_version;
32313 fi
32314 
32315 
32316   if test "x$with_toolchain_version" = xlist; then
32317     # List all toolchains
32318     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32319 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32320     for version in $VALID_VS_VERSIONS; do
32321       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32322       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32323     done
32324 
32325     exit 0
32326   elif test "x$DEVKIT_VS_VERSION" != x; then
32327     VS_VERSION=$DEVKIT_VS_VERSION
32328     TOOLCHAIN_VERSION=$VS_VERSION
32329     # If the devkit has a name, use that as description
32330     VS_DESCRIPTION="$DEVKIT_NAME"
32331     if test "x$VS_DESCRIPTION" = x; then
32332       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32333     fi
32334     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32335     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32336     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32337     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32338     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32339 
32340     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32341     # can still be exported as INCLUDE for compiler invocations without
32342     # SYSROOT_CFLAGS
32343     OLDIFS="$IFS"
32344     IFS=";"
32345     for i in $DEVKIT_VS_INCLUDE; do
32346       ipath=$i
32347 
32348   unix_path="$ipath"
32349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32350     windows_path=`$CYGPATH -m "$unix_path"`
32351     ipath="$windows_path"
32352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32353     windows_path=`cmd //c echo $unix_path`
32354     ipath="$windows_path"
32355   fi
32356 
32357       VS_INCLUDE="$VS_INCLUDE;$ipath"
32358     done
32359     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32360     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32361     for i in $DEVKIT_VS_LIB; do
32362       libpath=$i
32363 
32364   unix_path="$libpath"
32365   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32366     windows_path=`$CYGPATH -m "$unix_path"`
32367     libpath="$windows_path"
32368   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32369     windows_path=`cmd //c echo $unix_path`
32370     libpath="$windows_path"
32371   fi
32372 
32373       VS_LIB="$VS_LIB;$libpath"
32374     done
32375     IFS="$OLDIFS"
32376 
32377     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32378 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32379 
32380   elif test "x$with_toolchain_version" != x; then
32381     # User override; check that it is valid
32382     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32383       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32384 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32385       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32386 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32387       as_fn_error $? "Cannot continue." "$LINENO" 5
32388     fi
32389     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32390   else
32391     # No flag given, use default
32392     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32393   fi
32394 
32395   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32396 
32397   VS_VERSION="$VS_VERSION"
32398   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32399   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32400   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32401   eval VS_EDITIONS="\${VS_EDITIONS_${VS_VERSION}}"
32402   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32403   eval VS_ENV_ARGS="\${VS_ENV_ARGS_${VS_VERSION}}"
32404 
32405   # When using --with-tools-dir, assume it points to the correct and default
32406   # version of Visual Studio or that --with-toolchain-version was also set.
32407   if test "x$with_tools_dir" != x; then
32408 
32409   if test "x$VS_ENV_CMD" = x; then
32410     VS_VERSION="${VS_VERSION}"
32411     VS_BASE="$with_tools_dir/../.."
32412     METHOD="--with-tools-dir"
32413 
32414 
32415   windows_path="$VS_BASE"
32416   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32417     unix_path=`$CYGPATH -u "$windows_path"`
32418     VS_BASE="$unix_path"
32419   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32420     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32421     VS_BASE="$unix_path"
32422   fi
32423 
32424     # In VS 2017, the default installation is in a subdir named after the edition.
32425     # Find the first one present and use that.
32426     if test "x$VS_EDITIONS" != x; then
32427       for edition in $VS_EDITIONS; do
32428         if test -d "$VS_BASE/$edition"; then
32429           VS_BASE="$VS_BASE/$edition"
32430           break
32431         fi
32432       done
32433     fi
32434 
32435     if test -d "$VS_BASE"; then
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       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32439         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32440       else
32441         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32442             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32443       fi
32444 
32445       for VCVARSFILE in $VCVARSFILES; do
32446         if test -f "$VS_BASE/$VCVARSFILE"; then
32447           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32448           break
32449         fi
32450       done
32451 
32452       if test "x$VS_ENV_CMD" = x; then
32453         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32454 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32455       else
32456         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32457         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32458         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32459         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32460       fi
32461     fi
32462   fi
32463 
32464 
32465   if test "x$VS_ENV_CMD" = x; then
32466     VS_VERSION="${VS_VERSION}"
32467     VS_BASE="$with_tools_dir/../../.."
32468     METHOD="--with-tools-dir"
32469 
32470 
32471   windows_path="$VS_BASE"
32472   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32473     unix_path=`$CYGPATH -u "$windows_path"`
32474     VS_BASE="$unix_path"
32475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32476     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32477     VS_BASE="$unix_path"
32478   fi
32479 
32480     # In VS 2017, the default installation is in a subdir named after the edition.
32481     # Find the first one present and use that.
32482     if test "x$VS_EDITIONS" != x; then
32483       for edition in $VS_EDITIONS; do
32484         if test -d "$VS_BASE/$edition"; then
32485           VS_BASE="$VS_BASE/$edition"
32486           break
32487         fi
32488       done
32489     fi
32490 
32491     if test -d "$VS_BASE"; then
32492       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32493 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32494       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32495         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32496       else
32497         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32498             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32499       fi
32500 
32501       for VCVARSFILE in $VCVARSFILES; do
32502         if test -f "$VS_BASE/$VCVARSFILE"; then
32503           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32504           break
32505         fi
32506       done
32507 
32508       if test "x$VS_ENV_CMD" = x; then
32509         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32510 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32511       else
32512         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32513         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32514         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32515         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32516       fi
32517     fi
32518   fi
32519 
32520     if test "x$VS_ENV_CMD" = x; then
32521       # Having specified an argument which is incorrect will produce an instant failure;
32522       # we should not go on looking
32523       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32524 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32525       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32526 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32527       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32528 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32529       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32530     fi
32531   fi
32532 
32533   VS_ENV_CMD=""
32534 
32535   if test "x$VS_COMNTOOLS" != x; then
32536 
32537   if test "x$VS_ENV_CMD" = x; then
32538     VS_VERSION="${VS_VERSION}"
32539     VS_BASE="$VS_COMNTOOLS/../.."
32540     METHOD="$VS_COMNTOOLS_VAR variable"
32541 
32542 
32543   windows_path="$VS_BASE"
32544   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32545     unix_path=`$CYGPATH -u "$windows_path"`
32546     VS_BASE="$unix_path"
32547   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32548     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32549     VS_BASE="$unix_path"
32550   fi
32551 
32552     # In VS 2017, the default installation is in a subdir named after the edition.
32553     # Find the first one present and use that.
32554     if test "x$VS_EDITIONS" != x; then
32555       for edition in $VS_EDITIONS; do
32556         if test -d "$VS_BASE/$edition"; then
32557           VS_BASE="$VS_BASE/$edition"
32558           break
32559         fi
32560       done
32561     fi
32562 
32563     if test -d "$VS_BASE"; then
32564       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32565 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32566       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32567         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32568       else
32569         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32570             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32571       fi
32572 
32573       for VCVARSFILE in $VCVARSFILES; do
32574         if test -f "$VS_BASE/$VCVARSFILE"; then
32575           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32576           break
32577         fi
32578       done
32579 
32580       if test "x$VS_ENV_CMD" = x; then
32581         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32582 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32583       else
32584         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32585         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32586         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32587         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32588       fi
32589     fi
32590   fi
32591 
32592   fi
32593   if test "x$PROGRAMFILES" != x; then
32594 
32595   if test "x$VS_ENV_CMD" = x; then
32596     VS_VERSION="${VS_VERSION}"
32597     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32598     METHOD="well-known name"
32599 
32600 
32601   windows_path="$VS_BASE"
32602   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32603     unix_path=`$CYGPATH -u "$windows_path"`
32604     VS_BASE="$unix_path"
32605   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32606     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32607     VS_BASE="$unix_path"
32608   fi
32609 
32610     # In VS 2017, the default installation is in a subdir named after the edition.
32611     # Find the first one present and use that.
32612     if test "x$VS_EDITIONS" != x; then
32613       for edition in $VS_EDITIONS; do
32614         if test -d "$VS_BASE/$edition"; then
32615           VS_BASE="$VS_BASE/$edition"
32616           break
32617         fi
32618       done
32619     fi
32620 
32621     if test -d "$VS_BASE"; then
32622       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32623 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32624       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32625         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32626       else
32627         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32628             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32629       fi
32630 
32631       for VCVARSFILE in $VCVARSFILES; do
32632         if test -f "$VS_BASE/$VCVARSFILE"; then
32633           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32634           break
32635         fi
32636       done
32637 
32638       if test "x$VS_ENV_CMD" = x; then
32639         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32640 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32641       else
32642         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32643         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32644         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32645         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32646       fi
32647     fi
32648   fi
32649 
32650   fi
32651   # Work around the insanely named ProgramFiles(x86) env variable
32652   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32653   if test "x$PROGRAMFILES_X86" != x; then
32654 
32655   if test "x$VS_ENV_CMD" = x; then
32656     VS_VERSION="${VS_VERSION}"
32657     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32658     METHOD="well-known name"
32659 
32660 
32661   windows_path="$VS_BASE"
32662   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32663     unix_path=`$CYGPATH -u "$windows_path"`
32664     VS_BASE="$unix_path"
32665   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32666     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32667     VS_BASE="$unix_path"
32668   fi
32669 
32670     # In VS 2017, the default installation is in a subdir named after the edition.
32671     # Find the first one present and use that.
32672     if test "x$VS_EDITIONS" != x; then
32673       for edition in $VS_EDITIONS; do
32674         if test -d "$VS_BASE/$edition"; then
32675           VS_BASE="$VS_BASE/$edition"
32676           break
32677         fi
32678       done
32679     fi
32680 
32681     if test -d "$VS_BASE"; then
32682       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32683 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32684       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32685         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32686       else
32687         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32688             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32689       fi
32690 
32691       for VCVARSFILE in $VCVARSFILES; do
32692         if test -f "$VS_BASE/$VCVARSFILE"; then
32693           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32694           break
32695         fi
32696       done
32697 
32698       if test "x$VS_ENV_CMD" = x; then
32699         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32700 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32701       else
32702         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32703         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32704         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32705         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32706       fi
32707     fi
32708   fi
32709 
32710   fi
32711 
32712   if test "x$VS_ENV_CMD" = x; then
32713     VS_VERSION="${VS_VERSION}"
32714     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32715     METHOD="well-known name"
32716 
32717 
32718   windows_path="$VS_BASE"
32719   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32720     unix_path=`$CYGPATH -u "$windows_path"`
32721     VS_BASE="$unix_path"
32722   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32723     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32724     VS_BASE="$unix_path"
32725   fi
32726 
32727     # In VS 2017, the default installation is in a subdir named after the edition.
32728     # Find the first one present and use that.
32729     if test "x$VS_EDITIONS" != x; then
32730       for edition in $VS_EDITIONS; do
32731         if test -d "$VS_BASE/$edition"; then
32732           VS_BASE="$VS_BASE/$edition"
32733           break
32734         fi
32735       done
32736     fi
32737 
32738     if test -d "$VS_BASE"; then
32739       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32740 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32741       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32742         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32743       else
32744         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32745             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32746       fi
32747 
32748       for VCVARSFILE in $VCVARSFILES; do
32749         if test -f "$VS_BASE/$VCVARSFILE"; then
32750           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32751           break
32752         fi
32753       done
32754 
32755       if test "x$VS_ENV_CMD" = x; then
32756         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32757 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32758       else
32759         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32760         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32761         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32762         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32763       fi
32764     fi
32765   fi
32766 
32767 
32768   if test "x$VS_ENV_CMD" = x; then
32769     VS_VERSION="${VS_VERSION}"
32770     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32771     METHOD="well-known name"
32772 
32773 
32774   windows_path="$VS_BASE"
32775   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32776     unix_path=`$CYGPATH -u "$windows_path"`
32777     VS_BASE="$unix_path"
32778   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32779     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32780     VS_BASE="$unix_path"
32781   fi
32782 
32783     # In VS 2017, the default installation is in a subdir named after the edition.
32784     # Find the first one present and use that.
32785     if test "x$VS_EDITIONS" != x; then
32786       for edition in $VS_EDITIONS; do
32787         if test -d "$VS_BASE/$edition"; then
32788           VS_BASE="$VS_BASE/$edition"
32789           break
32790         fi
32791       done
32792     fi
32793 
32794     if test -d "$VS_BASE"; then
32795       { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32796 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32797       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32798         VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
32799       else
32800         VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
32801             vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
32802       fi
32803 
32804       for VCVARSFILE in $VCVARSFILES; do
32805         if test -f "$VS_BASE/$VCVARSFILE"; then
32806           VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32807           break
32808         fi
32809       done
32810 
32811       if test "x$VS_ENV_CMD" = x; then
32812         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&5
32813 $as_echo "$as_me: Warning: None of $VCVARSFILES were found, Visual Studio installation not recognized. Ignoring" >&6;}
32814       else
32815         # PLATFORM_TOOLSET is used during the compilation of the freetype sources
32816         # (see 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100',
32817         # 'v110' or 'v120' for VS 2010, 2012 or VS2013
32818         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32819       fi
32820     fi
32821   fi
32822 
32823 
32824   if test "x$SDK_INSTALL_DIR" != x; then
32825     if test "x$ProgramW6432" != x; then
32826 
32827   if test "x$VS_ENV_CMD" = x; then
32828     VS_VERSION="${VS_VERSION}"
32829     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32830     METHOD="well-known name"
32831 
32832   windows_path="$WIN_SDK_BASE"
32833   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32834     unix_path=`$CYGPATH -u "$windows_path"`
32835     WIN_SDK_BASE="$unix_path"
32836   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32837     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32838     WIN_SDK_BASE="$unix_path"
32839   fi
32840 
32841     if test -d "$WIN_SDK_BASE"; then
32842       # There have been cases of partial or broken SDK installations. A missing
32843       # lib dir is not going to work.
32844       if test ! -d "$WIN_SDK_BASE/lib"; then
32845         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32846 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32847         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32848 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32849       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32850         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32851 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32852         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32853         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32854           VS_ENV_ARGS="/x86"
32855         else
32856           VS_ENV_ARGS="/x64"
32857         fi
32858         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32859         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32860         # TODO: improve detection for other versions of SDK
32861         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32862       else
32863         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32864 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32865         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32866 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32867       fi
32868     fi
32869   fi
32870 
32871     fi
32872     if test "x$PROGRAMW6432" != x; then
32873 
32874   if test "x$VS_ENV_CMD" = x; then
32875     VS_VERSION="${VS_VERSION}"
32876     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32877     METHOD="well-known name"
32878 
32879   windows_path="$WIN_SDK_BASE"
32880   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32881     unix_path=`$CYGPATH -u "$windows_path"`
32882     WIN_SDK_BASE="$unix_path"
32883   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32884     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32885     WIN_SDK_BASE="$unix_path"
32886   fi
32887 
32888     if test -d "$WIN_SDK_BASE"; then
32889       # There have been cases of partial or broken SDK installations. A missing
32890       # lib dir is not going to work.
32891       if test ! -d "$WIN_SDK_BASE/lib"; then
32892         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32893 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32894         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32895 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32896       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32897         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32898 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32899         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32900         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32901           VS_ENV_ARGS="/x86"
32902         else
32903           VS_ENV_ARGS="/x64"
32904         fi
32905         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32906         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32907         # TODO: improve detection for other versions of SDK
32908         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32909       else
32910         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32911 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32912         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32913 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32914       fi
32915     fi
32916   fi
32917 
32918     fi
32919     if test "x$PROGRAMFILES" != x; then
32920 
32921   if test "x$VS_ENV_CMD" = x; then
32922     VS_VERSION="${VS_VERSION}"
32923     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32924     METHOD="well-known name"
32925 
32926   windows_path="$WIN_SDK_BASE"
32927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32928     unix_path=`$CYGPATH -u "$windows_path"`
32929     WIN_SDK_BASE="$unix_path"
32930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32932     WIN_SDK_BASE="$unix_path"
32933   fi
32934 
32935     if test -d "$WIN_SDK_BASE"; then
32936       # There have been cases of partial or broken SDK installations. A missing
32937       # lib dir is not going to work.
32938       if test ! -d "$WIN_SDK_BASE/lib"; then
32939         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32940 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32941         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32942 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32943       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32944         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32945 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32946         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32947         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32948           VS_ENV_ARGS="/x86"
32949         else
32950           VS_ENV_ARGS="/x64"
32951         fi
32952         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32953         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32954         # TODO: improve detection for other versions of SDK
32955         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32956       else
32957         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32958 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32959         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32960 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32961       fi
32962     fi
32963   fi
32964 
32965     fi
32966 
32967   if test "x$VS_ENV_CMD" = x; then
32968     VS_VERSION="${VS_VERSION}"
32969     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32970     METHOD="well-known name"
32971 
32972   windows_path="$WIN_SDK_BASE"
32973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32974     unix_path=`$CYGPATH -u "$windows_path"`
32975     WIN_SDK_BASE="$unix_path"
32976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32978     WIN_SDK_BASE="$unix_path"
32979   fi
32980 
32981     if test -d "$WIN_SDK_BASE"; then
32982       # There have been cases of partial or broken SDK installations. A missing
32983       # lib dir is not going to work.
32984       if test ! -d "$WIN_SDK_BASE/lib"; then
32985         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32986 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32987         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32988 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32989       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32990         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32991 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32992         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32993         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32994           VS_ENV_ARGS="/x86"
32995         else
32996           VS_ENV_ARGS="/x64"
32997         fi
32998         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32999         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33000         # TODO: improve detection for other versions of SDK
33001         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33002       else
33003         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33004 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33005         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33006 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33007       fi
33008     fi
33009   fi
33010 
33011 
33012   if test "x$VS_ENV_CMD" = x; then
33013     VS_VERSION="${VS_VERSION}"
33014     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
33015     METHOD="well-known name"
33016 
33017   windows_path="$WIN_SDK_BASE"
33018   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33019     unix_path=`$CYGPATH -u "$windows_path"`
33020     WIN_SDK_BASE="$unix_path"
33021   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33022     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33023     WIN_SDK_BASE="$unix_path"
33024   fi
33025 
33026     if test -d "$WIN_SDK_BASE"; then
33027       # There have been cases of partial or broken SDK installations. A missing
33028       # lib dir is not going to work.
33029       if test ! -d "$WIN_SDK_BASE/lib"; then
33030         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33031 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33032         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
33033 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
33034       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
33035         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33036 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33037         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
33038         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
33039           VS_ENV_ARGS="/x86"
33040         else
33041           VS_ENV_ARGS="/x64"
33042         fi
33043         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
33044         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
33045         # TODO: improve detection for other versions of SDK
33046         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
33047       else
33048         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
33049 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
33050         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
33051 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
33052       fi
33053     fi
33054   fi
33055 
33056   fi
33057 
33058     if test "x$VS_ENV_CMD" != x; then
33059       TOOLCHAIN_VERSION=$VS_VERSION
33060       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
33061       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
33062       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
33063       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
33064       # The rest of the variables are already evaled while probing
33065       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
33066 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
33067       break
33068     fi
33069   done
33070 
33071   TOOLCHAIN_DESCRIPTION="$VS_DESCRIPTION"
33072   if test "$TOOLCHAIN_VERSION" -gt 2013; then
33073     UNSUPPORTED_TOOLCHAIN_VERSION=yes
33074   fi
33075 
33076 
33077   # If we have a devkit, skip all of the below.
33078   if test "x$DEVKIT_VS_VERSION" = x; then
33079     if test "x$VS_ENV_CMD" != x; then
33080       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33081 
33082   # Only process if variable expands to non-empty
33083 
33084   if test "x$VS_ENV_CMD" != x; then
33085     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33086 
33087   # First separate the path from the arguments. This will split at the first
33088   # space.
33089   complete="$VS_ENV_CMD"
33090   path="${complete%% *}"
33091   tmp="$complete EOL"
33092   arguments="${tmp#* }"
33093 
33094   # Input might be given as Windows format, start by converting to
33095   # unix format.
33096   new_path=`$CYGPATH -u "$path"`
33097 
33098   # Now try to locate executable using which
33099   new_path=`$WHICH "$new_path" 2> /dev/null`
33100   # bat and cmd files are not always considered executable in cygwin causing which
33101   # to not find them
33102   if test "x$new_path" = x \
33103       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33104       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33105     new_path=`$CYGPATH -u "$path"`
33106   fi
33107   if test "x$new_path" = x; then
33108     # Oops. Which didn't find the executable.
33109     # The splitting of arguments from the executable at a space might have been incorrect,
33110     # since paths with space are more likely in Windows. Give it another try with the whole
33111     # argument.
33112     path="$complete"
33113     arguments="EOL"
33114     new_path=`$CYGPATH -u "$path"`
33115     new_path=`$WHICH "$new_path" 2> /dev/null`
33116     # bat and cmd files are not always considered executable in cygwin causing which
33117     # to not find them
33118     if test "x$new_path" = x \
33119         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33120         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33121       new_path=`$CYGPATH -u "$path"`
33122     fi
33123     if test "x$new_path" = x; then
33124       # It's still not found. Now this is an unrecoverable error.
33125       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33126 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33127       has_space=`$ECHO "$complete" | $GREP " "`
33128       if test "x$has_space" != x; then
33129         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33130 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33131       fi
33132       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33133     fi
33134   fi
33135 
33136   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33137   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33138   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33139   # "foo.exe" is OK but "foo" is an error.
33140   #
33141   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33142   # It is also a way to make sure we got the proper file name for the real test later on.
33143   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33144   if test "x$test_shortpath" = x; then
33145     # Short path failed, file does not exist as specified.
33146     # Try adding .exe or .cmd
33147     if test -f "${new_path}.exe"; then
33148       input_to_shortpath="${new_path}.exe"
33149     elif test -f "${new_path}.cmd"; then
33150       input_to_shortpath="${new_path}.cmd"
33151     else
33152       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33153 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33154       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33155 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33156       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33157     fi
33158   else
33159     input_to_shortpath="$new_path"
33160   fi
33161 
33162   # Call helper function which possibly converts this using DOS-style short mode.
33163   # If so, the updated path is stored in $new_path.
33164   new_path="$input_to_shortpath"
33165 
33166   input_path="$input_to_shortpath"
33167   # Check if we need to convert this using DOS-style short mode. If the path
33168   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33169   # take no chances and rewrite it.
33170   # Note: m4 eats our [], so we need to use [ and ] instead.
33171   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33172   if test "x$has_forbidden_chars" != x; then
33173     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33174     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33175     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33176     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33177       # Going to short mode and back again did indeed matter. Since short mode is
33178       # case insensitive, let's make it lowercase to improve readability.
33179       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33180       # Now convert it back to Unix-style (cygpath)
33181       input_path=`$CYGPATH -u "$shortmode_path"`
33182       new_path="$input_path"
33183     fi
33184   fi
33185 
33186   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33187   if test "x$test_cygdrive_prefix" = x; then
33188     # As a simple fix, exclude /usr/bin since it's not a real path.
33189     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33190       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33191       # a path prefixed by /cygdrive for fixpath to work.
33192       new_path="$CYGWIN_ROOT_PATH$input_path"
33193     fi
33194   fi
33195 
33196   # remove trailing .exe if any
33197   new_path="${new_path/%.exe/}"
33198 
33199     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33200 
33201   # First separate the path from the arguments. This will split at the first
33202   # space.
33203   complete="$VS_ENV_CMD"
33204   path="${complete%% *}"
33205   tmp="$complete EOL"
33206   arguments="${tmp#* }"
33207 
33208   # Input might be given as Windows format, start by converting to
33209   # unix format.
33210   new_path="$path"
33211 
33212   windows_path="$new_path"
33213   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33214     unix_path=`$CYGPATH -u "$windows_path"`
33215     new_path="$unix_path"
33216   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33217     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33218     new_path="$unix_path"
33219   fi
33220 
33221 
33222   # Now try to locate executable using which
33223   new_path=`$WHICH "$new_path" 2> /dev/null`
33224 
33225   if test "x$new_path" = x; then
33226     # Oops. Which didn't find the executable.
33227     # The splitting of arguments from the executable at a space might have been incorrect,
33228     # since paths with space are more likely in Windows. Give it another try with the whole
33229     # argument.
33230     path="$complete"
33231     arguments="EOL"
33232     new_path="$path"
33233 
33234   windows_path="$new_path"
33235   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33236     unix_path=`$CYGPATH -u "$windows_path"`
33237     new_path="$unix_path"
33238   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33239     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33240     new_path="$unix_path"
33241   fi
33242 
33243 
33244     new_path=`$WHICH "$new_path" 2> /dev/null`
33245     # bat and cmd files are not always considered executable in MSYS causing which
33246     # to not find them
33247     if test "x$new_path" = x \
33248         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33249         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33250       new_path="$path"
33251 
33252   windows_path="$new_path"
33253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33254     unix_path=`$CYGPATH -u "$windows_path"`
33255     new_path="$unix_path"
33256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33258     new_path="$unix_path"
33259   fi
33260 
33261     fi
33262 
33263     if test "x$new_path" = x; then
33264       # It's still not found. Now this is an unrecoverable error.
33265       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33266 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33267       has_space=`$ECHO "$complete" | $GREP " "`
33268       if test "x$has_space" != x; then
33269         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33270 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33271       fi
33272       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33273     fi
33274   fi
33275 
33276   # Now new_path has a complete unix path to the binary
33277   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33278     # Keep paths in /bin as-is, but remove trailing .exe if any
33279     new_path="${new_path/%.exe/}"
33280     # Do not save /bin paths to all_fixpath_prefixes!
33281   else
33282     # Not in mixed or Windows style, start by that.
33283     new_path=`cmd //c echo $new_path`
33284 
33285   input_path="$new_path"
33286   # Check if we need to convert this using DOS-style short mode. If the path
33287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33288   # take no chances and rewrite it.
33289   # Note: m4 eats our [], so we need to use [ and ] instead.
33290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33291   if test "x$has_forbidden_chars" != x; then
33292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33293     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33294   fi
33295 
33296     # Output is in $new_path
33297 
33298   windows_path="$new_path"
33299   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33300     unix_path=`$CYGPATH -u "$windows_path"`
33301     new_path="$unix_path"
33302   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33303     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33304     new_path="$unix_path"
33305   fi
33306 
33307     # remove trailing .exe if any
33308     new_path="${new_path/%.exe/}"
33309 
33310     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33311     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33312   fi
33313 
33314     else
33315       # We're on a unix platform. Hooray! :)
33316       # First separate the path from the arguments. This will split at the first
33317       # space.
33318       complete="$VS_ENV_CMD"
33319       path="${complete%% *}"
33320       tmp="$complete EOL"
33321       arguments="${tmp#* }"
33322 
33323       # Cannot rely on the command "which" here since it doesn't always work.
33324       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33325       if test -z "$is_absolute_path"; then
33326         # Path to executable is not absolute. Find it.
33327         IFS_save="$IFS"
33328         IFS=:
33329         for p in $PATH; do
33330           if test -f "$p/$path" && test -x "$p/$path"; then
33331             new_path="$p/$path"
33332             break
33333           fi
33334         done
33335         IFS="$IFS_save"
33336       else
33337         # This is an absolute path, we can use it without further modifications.
33338         new_path="$path"
33339       fi
33340 
33341       if test "x$new_path" = x; then
33342         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33343 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33344         has_space=`$ECHO "$complete" | $GREP " "`
33345         if test "x$has_space" != x; then
33346           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33347 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33348         fi
33349         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33350       fi
33351     fi
33352 
33353     # Now join together the path and the arguments once again
33354     if test "x$arguments" != xEOL; then
33355       new_complete="$new_path ${arguments% *}"
33356     else
33357       new_complete="$new_path"
33358     fi
33359 
33360     if test "x$complete" != "x$new_complete"; then
33361       VS_ENV_CMD="$new_complete"
33362       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33363 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33364     fi
33365   fi
33366 
33367 
33368       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33369       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33370 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33371 
33372       # We need to create a couple of temporary files.
33373       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33374       $MKDIR -p $VS_ENV_TMP_DIR
33375 
33376       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33377       # Instead create a shell script which will set the relevant variables when run.
33378       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33379 
33380   unix_path="$WINPATH_VS_ENV_CMD"
33381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33382     windows_path=`$CYGPATH -m "$unix_path"`
33383     WINPATH_VS_ENV_CMD="$windows_path"
33384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33385     windows_path=`cmd //c echo $unix_path`
33386     WINPATH_VS_ENV_CMD="$windows_path"
33387   fi
33388 
33389       WINPATH_BASH="$BASH"
33390 
33391   unix_path="$WINPATH_BASH"
33392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33393     windows_path=`$CYGPATH -m "$unix_path"`
33394     WINPATH_BASH="$windows_path"
33395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33396     windows_path=`cmd //c echo $unix_path`
33397     WINPATH_BASH="$windows_path"
33398   fi
33399 
33400 
33401       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33402       # script (executable by bash) that will setup the important variables.
33403       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33404       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33405       # This will end up something like:
33406       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33407       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33408       # In some cases, the VS_ENV_CMD will change directory, change back so
33409       # the set-vs-env.sh ends up in the right place.
33410       $ECHO 'cd %~dp0' >> $EXTRACT_VC_ENV_BAT_FILE
33411       # These will end up something like:
33412       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33413       # The trailing space for everyone except PATH is no typo, but is needed due
33414       # to trailing \ in the Windows paths. These will be stripped later.
33415       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33416           >> $EXTRACT_VC_ENV_BAT_FILE
33417       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33418           >> $EXTRACT_VC_ENV_BAT_FILE
33419       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33420           >> $EXTRACT_VC_ENV_BAT_FILE
33421       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33422           >> $EXTRACT_VC_ENV_BAT_FILE
33423       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33424           >> $EXTRACT_VC_ENV_BAT_FILE
33425       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33426           >> $EXTRACT_VC_ENV_BAT_FILE
33427 
33428       # Now execute the newly created bat file.
33429       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33430       # Change directory so we don't need to mess with Windows paths in redirects.
33431       cd $VS_ENV_TMP_DIR
33432       cmd /c extract-vs-env.bat | $CAT
33433       cd $CURDIR
33434 
33435       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33436         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33437 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33438         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33439 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33440         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33441 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33442         as_fn_error $? "Cannot continue" "$LINENO" 5
33443       fi
33444 
33445       # Now set all paths and other env variables. This will allow the rest of
33446       # the configure script to find and run the compiler in the proper way.
33447       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33448 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33449       . $VS_ENV_TMP_DIR/set-vs-env.sh
33450       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33451       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33452     else
33453       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33454       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33455 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33456     fi
33457   fi
33458 
33459   # At this point, we should have correct variables in the environment, or we can't continue.
33460   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33461 $as_echo_n "checking for Visual Studio variables... " >&6; }
33462 
33463   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33464       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33465     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33466       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33467 $as_echo "present but broken" >&6; }
33468       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33469     else
33470       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33471 $as_echo "ok" >&6; }
33472       # Remove any trailing "\" ";" and " " from the variables.
33473       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33474       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33475       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33476       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33477       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33478       # Remove any paths containing # (typically F#) as that messes up make. This
33479       # is needed if visual studio was installed with F# support.
33480       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33481 
33482 
33483 
33484 
33485 
33486       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33487       OLDIFS="$IFS"
33488       IFS=";"
33489       for i in $VS_INCLUDE; do
33490         ipath=$i
33491         # Only process non-empty elements
33492         if test "x$ipath" != x; then
33493           IFS="$OLDIFS"
33494           # Check that directory exists before calling fixup_path
33495           testpath=$ipath
33496 
33497   windows_path="$testpath"
33498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33499     unix_path=`$CYGPATH -u "$windows_path"`
33500     testpath="$unix_path"
33501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33503     testpath="$unix_path"
33504   fi
33505 
33506           if test -d "$testpath"; then
33507 
33508   # Only process if variable expands to non-empty
33509 
33510   if test "x$ipath" != x; then
33511     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33512 
33513   # Input might be given as Windows format, start by converting to
33514   # unix format.
33515   path="$ipath"
33516   new_path=`$CYGPATH -u "$path"`
33517 
33518   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33519   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33520   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33521   # "foo.exe" is OK but "foo" is an error.
33522   #
33523   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33524   # It is also a way to make sure we got the proper file name for the real test later on.
33525   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33526   if test "x$test_shortpath" = x; then
33527     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33528 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33529     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33530   fi
33531 
33532   # Call helper function which possibly converts this using DOS-style short mode.
33533   # If so, the updated path is stored in $new_path.
33534 
33535   input_path="$new_path"
33536   # Check if we need to convert this using DOS-style short mode. If the path
33537   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33538   # take no chances and rewrite it.
33539   # Note: m4 eats our [], so we need to use [ and ] instead.
33540   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33541   if test "x$has_forbidden_chars" != x; then
33542     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33543     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33544     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33545     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33546       # Going to short mode and back again did indeed matter. Since short mode is
33547       # case insensitive, let's make it lowercase to improve readability.
33548       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33549       # Now convert it back to Unix-style (cygpath)
33550       input_path=`$CYGPATH -u "$shortmode_path"`
33551       new_path="$input_path"
33552     fi
33553   fi
33554 
33555   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33556   if test "x$test_cygdrive_prefix" = x; then
33557     # As a simple fix, exclude /usr/bin since it's not a real path.
33558     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33559       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33560       # a path prefixed by /cygdrive for fixpath to work.
33561       new_path="$CYGWIN_ROOT_PATH$input_path"
33562     fi
33563   fi
33564 
33565 
33566   if test "x$path" != "x$new_path"; then
33567     ipath="$new_path"
33568     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33569 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33570   fi
33571 
33572     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33573 
33574   path="$ipath"
33575   has_colon=`$ECHO $path | $GREP ^.:`
33576   new_path="$path"
33577   if test "x$has_colon" = x; then
33578     # Not in mixed or Windows style, start by that.
33579     new_path=`cmd //c echo $path`
33580   fi
33581 
33582 
33583   input_path="$new_path"
33584   # Check if we need to convert this using DOS-style short mode. If the path
33585   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33586   # take no chances and rewrite it.
33587   # Note: m4 eats our [], so we need to use [ and ] instead.
33588   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33589   if test "x$has_forbidden_chars" != x; then
33590     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33591     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33592   fi
33593 
33594 
33595   windows_path="$new_path"
33596   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33597     unix_path=`$CYGPATH -u "$windows_path"`
33598     new_path="$unix_path"
33599   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33600     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33601     new_path="$unix_path"
33602   fi
33603 
33604   if test "x$path" != "x$new_path"; then
33605     ipath="$new_path"
33606     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33607 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33608   fi
33609 
33610   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33611   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33612 
33613     else
33614       # We're on a unix platform. Hooray! :)
33615       path="$ipath"
33616       has_space=`$ECHO "$path" | $GREP " "`
33617       if test "x$has_space" != x; then
33618         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33619 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33620         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33621       fi
33622 
33623       # Use eval to expand a potential ~
33624       eval path="$path"
33625       if test ! -f "$path" && test ! -d "$path"; then
33626         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33627       fi
33628 
33629       if test -d "$path"; then
33630         ipath="`cd "$path"; $THEPWDCMD -L`"
33631       else
33632         dir="`$DIRNAME "$path"`"
33633         base="`$BASENAME "$path"`"
33634         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33635       fi
33636     fi
33637   fi
33638 
33639             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33640           fi
33641           IFS=";"
33642         fi
33643       done
33644       # Convert VS_LIB into SYSROOT_LDFLAGS
33645       for i in $VS_LIB; do
33646         libpath=$i
33647         # Only process non-empty elements
33648         if test "x$libpath" != x; then
33649           IFS="$OLDIFS"
33650           # Check that directory exists before calling fixup_path
33651           testpath=$libpath
33652 
33653   windows_path="$testpath"
33654   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33655     unix_path=`$CYGPATH -u "$windows_path"`
33656     testpath="$unix_path"
33657   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33658     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33659     testpath="$unix_path"
33660   fi
33661 
33662           if test -d "$testpath"; then
33663 
33664   # Only process if variable expands to non-empty
33665 
33666   if test "x$libpath" != x; then
33667     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33668 
33669   # Input might be given as Windows format, start by converting to
33670   # unix format.
33671   path="$libpath"
33672   new_path=`$CYGPATH -u "$path"`
33673 
33674   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33675   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33676   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33677   # "foo.exe" is OK but "foo" is an error.
33678   #
33679   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33680   # It is also a way to make sure we got the proper file name for the real test later on.
33681   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33682   if test "x$test_shortpath" = x; then
33683     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33684 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33685     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33686   fi
33687 
33688   # Call helper function which possibly converts this using DOS-style short mode.
33689   # If so, the updated path is stored in $new_path.
33690 
33691   input_path="$new_path"
33692   # Check if we need to convert this using DOS-style short mode. If the path
33693   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33694   # take no chances and rewrite it.
33695   # Note: m4 eats our [], so we need to use [ and ] instead.
33696   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33697   if test "x$has_forbidden_chars" != x; then
33698     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33699     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33700     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33701     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33702       # Going to short mode and back again did indeed matter. Since short mode is
33703       # case insensitive, let's make it lowercase to improve readability.
33704       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33705       # Now convert it back to Unix-style (cygpath)
33706       input_path=`$CYGPATH -u "$shortmode_path"`
33707       new_path="$input_path"
33708     fi
33709   fi
33710 
33711   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33712   if test "x$test_cygdrive_prefix" = x; then
33713     # As a simple fix, exclude /usr/bin since it's not a real path.
33714     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33715       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33716       # a path prefixed by /cygdrive for fixpath to work.
33717       new_path="$CYGWIN_ROOT_PATH$input_path"
33718     fi
33719   fi
33720 
33721 
33722   if test "x$path" != "x$new_path"; then
33723     libpath="$new_path"
33724     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33725 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33726   fi
33727 
33728     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33729 
33730   path="$libpath"
33731   has_colon=`$ECHO $path | $GREP ^.:`
33732   new_path="$path"
33733   if test "x$has_colon" = x; then
33734     # Not in mixed or Windows style, start by that.
33735     new_path=`cmd //c echo $path`
33736   fi
33737 
33738 
33739   input_path="$new_path"
33740   # Check if we need to convert this using DOS-style short mode. If the path
33741   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33742   # take no chances and rewrite it.
33743   # Note: m4 eats our [], so we need to use [ and ] instead.
33744   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33745   if test "x$has_forbidden_chars" != x; then
33746     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33747     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33748   fi
33749 
33750 
33751   windows_path="$new_path"
33752   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33753     unix_path=`$CYGPATH -u "$windows_path"`
33754     new_path="$unix_path"
33755   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33756     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33757     new_path="$unix_path"
33758   fi
33759 
33760   if test "x$path" != "x$new_path"; then
33761     libpath="$new_path"
33762     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33763 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33764   fi
33765 
33766   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33767   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33768 
33769     else
33770       # We're on a unix platform. Hooray! :)
33771       path="$libpath"
33772       has_space=`$ECHO "$path" | $GREP " "`
33773       if test "x$has_space" != x; then
33774         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33775 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33776         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33777       fi
33778 
33779       # Use eval to expand a potential ~
33780       eval path="$path"
33781       if test ! -f "$path" && test ! -d "$path"; then
33782         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33783       fi
33784 
33785       if test -d "$path"; then
33786         libpath="`cd "$path"; $THEPWDCMD -L`"
33787       else
33788         dir="`$DIRNAME "$path"`"
33789         base="`$BASENAME "$path"`"
33790         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33791       fi
33792     fi
33793   fi
33794 
33795             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33796           fi
33797           IFS=";"
33798         fi
33799       done
33800       IFS="$OLDIFS"
33801     fi
33802   else
33803     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33804 $as_echo "not found" >&6; }
33805 
33806     if test "x$VS_ENV_CMD" = x; then
33807       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33808 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33809       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33810 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33811     else
33812       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33813 $as_echo "$as_me: Running the extraction script failed." >&6;}
33814     fi
33815     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33816 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33817     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33818 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33819     as_fn_error $? "Cannot continue" "$LINENO" 5
33820   fi
33821 
33822     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33823     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33824     PATH="$VS_PATH"
33825     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33826     export INCLUDE="$VS_INCLUDE"
33827     export LIB="$VS_LIB"
33828   else
33829     if test "x$XCODE_VERSION_OUTPUT" != x; then
33830       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33831       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33832       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
33833     else
33834       # Currently we do not define this for other toolchains. This might change as the need arise.
33835       TOOLCHAIN_VERSION=
33836     fi
33837   fi
33838 
33839 
33840   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33841   # override all other locations.
33842   if test "x$TOOLCHAIN_PATH" != x; then
33843     PATH=$TOOLCHAIN_PATH:$PATH
33844   fi
33845 
33846 
33847   #
33848   # Setup the compilers (CC and CXX)
33849   #
33850 
33851   COMPILER_NAME=C
33852   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33853 
33854   if test "x$CC" != x; then
33855     # User has supplied compiler name already, always let that override.
33856     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33857 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33858     if test "x`basename $CC`" = "x$CC"; then
33859       # A command without a complete path is provided, search $PATH.
33860 
33861       for ac_prog in $CC
33862 do
33863   # Extract the first word of "$ac_prog", so it can be a program name with args.
33864 set dummy $ac_prog; ac_word=$2
33865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33866 $as_echo_n "checking for $ac_word... " >&6; }
33867 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33868   $as_echo_n "(cached) " >&6
33869 else
33870   case $POTENTIAL_CC in
33871   [\\/]* | ?:[\\/]*)
33872   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33873   ;;
33874   *)
33875   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33876 for as_dir in $PATH
33877 do
33878   IFS=$as_save_IFS
33879   test -z "$as_dir" && as_dir=.
33880     for ac_exec_ext in '' $ac_executable_extensions; do
33881   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33882     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33883     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33884     break 2
33885   fi
33886 done
33887   done
33888 IFS=$as_save_IFS
33889 
33890   ;;
33891 esac
33892 fi
33893 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33894 if test -n "$POTENTIAL_CC"; then
33895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33896 $as_echo "$POTENTIAL_CC" >&6; }
33897 else
33898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33899 $as_echo "no" >&6; }
33900 fi
33901 
33902 
33903   test -n "$POTENTIAL_CC" && break
33904 done
33905 
33906       if test "x$POTENTIAL_CC" != x; then
33907         CC=$POTENTIAL_CC
33908       else
33909         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33910       fi
33911     else
33912       # Otherwise it might already be a complete path
33913       if test ! -x "$CC"; then
33914         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33915       fi
33916     fi
33917   else
33918     # No user supplied value. Locate compiler ourselves.
33919 
33920     # If we are cross compiling, assume cross compilation tools follows the
33921     # cross compilation standard where they are prefixed with the autoconf
33922     # standard name for the target. For example the binary
33923     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33924     # If we are not cross compiling, then the default compiler name will be
33925     # used.
33926 
33927     CC=
33928     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33929     # before checking the rest of the PATH.
33930     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33931     # step, this should not be necessary.
33932     if test -n "$TOOLCHAIN_PATH"; then
33933       PATH_save="$PATH"
33934       PATH="$TOOLCHAIN_PATH"
33935       if test -n "$ac_tool_prefix"; then
33936   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33937 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33939 $as_echo_n "checking for $ac_word... " >&6; }
33940 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33941   $as_echo_n "(cached) " >&6
33942 else
33943   case $TOOLCHAIN_PATH_CC in
33944   [\\/]* | ?:[\\/]*)
33945   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33946   ;;
33947   *)
33948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33949 for as_dir in $PATH
33950 do
33951   IFS=$as_save_IFS
33952   test -z "$as_dir" && as_dir=.
33953     for ac_exec_ext in '' $ac_executable_extensions; do
33954   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33955     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33957     break 2
33958   fi
33959 done
33960   done
33961 IFS=$as_save_IFS
33962 
33963   ;;
33964 esac
33965 fi
33966 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33967 if test -n "$TOOLCHAIN_PATH_CC"; then
33968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33969 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33970 else
33971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33972 $as_echo "no" >&6; }
33973 fi
33974 
33975 
33976 fi
33977 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33978   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33979   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33980 set dummy $SEARCH_LIST; ac_word=$2
33981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33982 $as_echo_n "checking for $ac_word... " >&6; }
33983 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33984   $as_echo_n "(cached) " >&6
33985 else
33986   case $ac_pt_TOOLCHAIN_PATH_CC in
33987   [\\/]* | ?:[\\/]*)
33988   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33989   ;;
33990   *)
33991   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33992 for as_dir in $PATH
33993 do
33994   IFS=$as_save_IFS
33995   test -z "$as_dir" && as_dir=.
33996     for ac_exec_ext in '' $ac_executable_extensions; do
33997   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33998     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33999     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34000     break 2
34001   fi
34002 done
34003   done
34004 IFS=$as_save_IFS
34005 
34006   ;;
34007 esac
34008 fi
34009 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
34010 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
34011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
34012 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
34013 else
34014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34015 $as_echo "no" >&6; }
34016 fi
34017 
34018   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
34019     TOOLCHAIN_PATH_CC=""
34020   else
34021     case $cross_compiling:$ac_tool_warned in
34022 yes:)
34023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34024 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34025 ac_tool_warned=yes ;;
34026 esac
34027     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
34028   fi
34029 else
34030   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
34031 fi
34032 
34033       CC=$TOOLCHAIN_PATH_CC
34034       PATH="$PATH_save"
34035     fi
34036 
34037     # AC_PATH_TOOL can't be run multiple times with the same variable,
34038     # so create a new name for this run.
34039     if test "x$CC" = x; then
34040       if test -n "$ac_tool_prefix"; then
34041   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34042 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34044 $as_echo_n "checking for $ac_word... " >&6; }
34045 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
34046   $as_echo_n "(cached) " >&6
34047 else
34048   case $POTENTIAL_CC in
34049   [\\/]* | ?:[\\/]*)
34050   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
34051   ;;
34052   *)
34053   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34054 for as_dir in $PATH
34055 do
34056   IFS=$as_save_IFS
34057   test -z "$as_dir" && as_dir=.
34058     for ac_exec_ext in '' $ac_executable_extensions; do
34059   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34060     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34061     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34062     break 2
34063   fi
34064 done
34065   done
34066 IFS=$as_save_IFS
34067 
34068   ;;
34069 esac
34070 fi
34071 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
34072 if test -n "$POTENTIAL_CC"; then
34073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
34074 $as_echo "$POTENTIAL_CC" >&6; }
34075 else
34076   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34077 $as_echo "no" >&6; }
34078 fi
34079 
34080 
34081 fi
34082 if test -z "$ac_cv_path_POTENTIAL_CC"; then
34083   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34084   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34085 set dummy $SEARCH_LIST; ac_word=$2
34086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34087 $as_echo_n "checking for $ac_word... " >&6; }
34088 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34089   $as_echo_n "(cached) " >&6
34090 else
34091   case $ac_pt_POTENTIAL_CC in
34092   [\\/]* | ?:[\\/]*)
34093   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34094   ;;
34095   *)
34096   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34097 for as_dir in $PATH
34098 do
34099   IFS=$as_save_IFS
34100   test -z "$as_dir" && as_dir=.
34101     for ac_exec_ext in '' $ac_executable_extensions; do
34102   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34103     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34104     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34105     break 2
34106   fi
34107 done
34108   done
34109 IFS=$as_save_IFS
34110 
34111   ;;
34112 esac
34113 fi
34114 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34115 if test -n "$ac_pt_POTENTIAL_CC"; then
34116   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34117 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34118 else
34119   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34120 $as_echo "no" >&6; }
34121 fi
34122 
34123   if test "x$ac_pt_POTENTIAL_CC" = x; then
34124     POTENTIAL_CC=""
34125   else
34126     case $cross_compiling:$ac_tool_warned in
34127 yes:)
34128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34129 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34130 ac_tool_warned=yes ;;
34131 esac
34132     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34133   fi
34134 else
34135   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34136 fi
34137 
34138       CC=$POTENTIAL_CC
34139     fi
34140 
34141     if test "x$CC" = x; then
34142 
34143   # Print a helpful message on how to acquire the necessary build dependency.
34144   # devkit is the help tag: freetype, cups, alsa etc
34145   MISSING_DEPENDENCY=devkit
34146 
34147   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34148     cygwin_help $MISSING_DEPENDENCY
34149   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34150     msys_help $MISSING_DEPENDENCY
34151   else
34152     PKGHANDLER_COMMAND=
34153 
34154     case $PKGHANDLER in
34155       apt-get)
34156         apt_help     $MISSING_DEPENDENCY ;;
34157       yum)
34158         yum_help     $MISSING_DEPENDENCY ;;
34159       brew)
34160         brew_help    $MISSING_DEPENDENCY ;;
34161       port)
34162         port_help    $MISSING_DEPENDENCY ;;
34163       pkgutil)
34164         pkgutil_help $MISSING_DEPENDENCY ;;
34165       pkgadd)
34166         pkgadd_help  $MISSING_DEPENDENCY ;;
34167     esac
34168 
34169     if test "x$PKGHANDLER_COMMAND" != x; then
34170       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34171     fi
34172   fi
34173 
34174       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34175     fi
34176   fi
34177 
34178   # Now we have a compiler binary in CC. Make sure it's okay.
34179 
34180   # Only process if variable expands to non-empty
34181 
34182   if test "x$CC" != x; then
34183     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34184 
34185   # First separate the path from the arguments. This will split at the first
34186   # space.
34187   complete="$CC"
34188   path="${complete%% *}"
34189   tmp="$complete EOL"
34190   arguments="${tmp#* }"
34191 
34192   # Input might be given as Windows format, start by converting to
34193   # unix format.
34194   new_path=`$CYGPATH -u "$path"`
34195 
34196   # Now try to locate executable using which
34197   new_path=`$WHICH "$new_path" 2> /dev/null`
34198   # bat and cmd files are not always considered executable in cygwin causing which
34199   # to not find them
34200   if test "x$new_path" = x \
34201       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34202       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34203     new_path=`$CYGPATH -u "$path"`
34204   fi
34205   if test "x$new_path" = x; then
34206     # Oops. Which didn't find the executable.
34207     # The splitting of arguments from the executable at a space might have been incorrect,
34208     # since paths with space are more likely in Windows. Give it another try with the whole
34209     # argument.
34210     path="$complete"
34211     arguments="EOL"
34212     new_path=`$CYGPATH -u "$path"`
34213     new_path=`$WHICH "$new_path" 2> /dev/null`
34214     # bat and cmd files are not always considered executable in cygwin causing which
34215     # to not find them
34216     if test "x$new_path" = x \
34217         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34218         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34219       new_path=`$CYGPATH -u "$path"`
34220     fi
34221     if test "x$new_path" = x; then
34222       # It's still not found. Now this is an unrecoverable error.
34223       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34224 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34225       has_space=`$ECHO "$complete" | $GREP " "`
34226       if test "x$has_space" != x; then
34227         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34228 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34229       fi
34230       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34231     fi
34232   fi
34233 
34234   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34235   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34236   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34237   # "foo.exe" is OK but "foo" is an error.
34238   #
34239   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34240   # It is also a way to make sure we got the proper file name for the real test later on.
34241   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34242   if test "x$test_shortpath" = x; then
34243     # Short path failed, file does not exist as specified.
34244     # Try adding .exe or .cmd
34245     if test -f "${new_path}.exe"; then
34246       input_to_shortpath="${new_path}.exe"
34247     elif test -f "${new_path}.cmd"; then
34248       input_to_shortpath="${new_path}.cmd"
34249     else
34250       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34251 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34252       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34253 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34254       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34255     fi
34256   else
34257     input_to_shortpath="$new_path"
34258   fi
34259 
34260   # Call helper function which possibly converts this using DOS-style short mode.
34261   # If so, the updated path is stored in $new_path.
34262   new_path="$input_to_shortpath"
34263 
34264   input_path="$input_to_shortpath"
34265   # Check if we need to convert this using DOS-style short mode. If the path
34266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34267   # take no chances and rewrite it.
34268   # Note: m4 eats our [], so we need to use [ and ] instead.
34269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34270   if test "x$has_forbidden_chars" != x; then
34271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34275       # Going to short mode and back again did indeed matter. Since short mode is
34276       # case insensitive, let's make it lowercase to improve readability.
34277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34278       # Now convert it back to Unix-style (cygpath)
34279       input_path=`$CYGPATH -u "$shortmode_path"`
34280       new_path="$input_path"
34281     fi
34282   fi
34283 
34284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34285   if test "x$test_cygdrive_prefix" = x; then
34286     # As a simple fix, exclude /usr/bin since it's not a real path.
34287     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34289       # a path prefixed by /cygdrive for fixpath to work.
34290       new_path="$CYGWIN_ROOT_PATH$input_path"
34291     fi
34292   fi
34293 
34294   # remove trailing .exe if any
34295   new_path="${new_path/%.exe/}"
34296 
34297     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34298 
34299   # First separate the path from the arguments. This will split at the first
34300   # space.
34301   complete="$CC"
34302   path="${complete%% *}"
34303   tmp="$complete EOL"
34304   arguments="${tmp#* }"
34305 
34306   # Input might be given as Windows format, start by converting to
34307   # unix format.
34308   new_path="$path"
34309 
34310   windows_path="$new_path"
34311   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34312     unix_path=`$CYGPATH -u "$windows_path"`
34313     new_path="$unix_path"
34314   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34315     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34316     new_path="$unix_path"
34317   fi
34318 
34319 
34320   # Now try to locate executable using which
34321   new_path=`$WHICH "$new_path" 2> /dev/null`
34322 
34323   if test "x$new_path" = x; then
34324     # Oops. Which didn't find the executable.
34325     # The splitting of arguments from the executable at a space might have been incorrect,
34326     # since paths with space are more likely in Windows. Give it another try with the whole
34327     # argument.
34328     path="$complete"
34329     arguments="EOL"
34330     new_path="$path"
34331 
34332   windows_path="$new_path"
34333   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34334     unix_path=`$CYGPATH -u "$windows_path"`
34335     new_path="$unix_path"
34336   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34337     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34338     new_path="$unix_path"
34339   fi
34340 
34341 
34342     new_path=`$WHICH "$new_path" 2> /dev/null`
34343     # bat and cmd files are not always considered executable in MSYS causing which
34344     # to not find them
34345     if test "x$new_path" = x \
34346         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34347         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34348       new_path="$path"
34349 
34350   windows_path="$new_path"
34351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34352     unix_path=`$CYGPATH -u "$windows_path"`
34353     new_path="$unix_path"
34354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34356     new_path="$unix_path"
34357   fi
34358 
34359     fi
34360 
34361     if test "x$new_path" = x; then
34362       # It's still not found. Now this is an unrecoverable error.
34363       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34364 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34365       has_space=`$ECHO "$complete" | $GREP " "`
34366       if test "x$has_space" != x; then
34367         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34368 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34369       fi
34370       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34371     fi
34372   fi
34373 
34374   # Now new_path has a complete unix path to the binary
34375   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34376     # Keep paths in /bin as-is, but remove trailing .exe if any
34377     new_path="${new_path/%.exe/}"
34378     # Do not save /bin paths to all_fixpath_prefixes!
34379   else
34380     # Not in mixed or Windows style, start by that.
34381     new_path=`cmd //c echo $new_path`
34382 
34383   input_path="$new_path"
34384   # Check if we need to convert this using DOS-style short mode. If the path
34385   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34386   # take no chances and rewrite it.
34387   # Note: m4 eats our [], so we need to use [ and ] instead.
34388   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34389   if test "x$has_forbidden_chars" != x; then
34390     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34391     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34392   fi
34393 
34394     # Output is in $new_path
34395 
34396   windows_path="$new_path"
34397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34398     unix_path=`$CYGPATH -u "$windows_path"`
34399     new_path="$unix_path"
34400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34402     new_path="$unix_path"
34403   fi
34404 
34405     # remove trailing .exe if any
34406     new_path="${new_path/%.exe/}"
34407 
34408     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34409     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34410   fi
34411 
34412     else
34413       # We're on a unix platform. Hooray! :)
34414       # First separate the path from the arguments. This will split at the first
34415       # space.
34416       complete="$CC"
34417       path="${complete%% *}"
34418       tmp="$complete EOL"
34419       arguments="${tmp#* }"
34420 
34421       # Cannot rely on the command "which" here since it doesn't always work.
34422       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34423       if test -z "$is_absolute_path"; then
34424         # Path to executable is not absolute. Find it.
34425         IFS_save="$IFS"
34426         IFS=:
34427         for p in $PATH; do
34428           if test -f "$p/$path" && test -x "$p/$path"; then
34429             new_path="$p/$path"
34430             break
34431           fi
34432         done
34433         IFS="$IFS_save"
34434       else
34435         # This is an absolute path, we can use it without further modifications.
34436         new_path="$path"
34437       fi
34438 
34439       if test "x$new_path" = x; then
34440         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34441 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34442         has_space=`$ECHO "$complete" | $GREP " "`
34443         if test "x$has_space" != x; then
34444           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34445 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34446         fi
34447         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34448       fi
34449     fi
34450 
34451     # Now join together the path and the arguments once again
34452     if test "x$arguments" != xEOL; then
34453       new_complete="$new_path ${arguments% *}"
34454     else
34455       new_complete="$new_path"
34456     fi
34457 
34458     if test "x$complete" != "x$new_complete"; then
34459       CC="$new_complete"
34460       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34461 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34462     fi
34463   fi
34464 
34465   TEST_COMPILER="$CC"
34466 
34467   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34468 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34469   SYMLINK_ORIGINAL="$TEST_COMPILER"
34470 
34471   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34472     # Follow a chain of symbolic links. Use readlink
34473     # where it exists, else fall back to horribly
34474     # complicated shell code.
34475     if test "x$READLINK_TESTED" != yes; then
34476       # On MacOSX there is a readlink tool with a different
34477       # purpose than the GNU readlink tool. Check the found readlink.
34478       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34479       if test "x$ISGNU" = x; then
34480         # A readlink that we do not know how to use.
34481         # Are there other non-GNU readlinks out there?
34482         READLINK_TESTED=yes
34483         READLINK=
34484       fi
34485     fi
34486 
34487     if test "x$READLINK" != x; then
34488       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34489     else
34490       # Save the current directory for restoring afterwards
34491       STARTDIR=$PWD
34492       COUNTER=0
34493       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34494       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34495       cd $sym_link_dir
34496       # Use -P flag to resolve symlinks in directories.
34497       cd `$THEPWDCMD -P`
34498       sym_link_dir=`$THEPWDCMD -P`
34499       # Resolve file symlinks
34500       while test $COUNTER -lt 20; do
34501         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34502         if test "x$ISLINK" == x; then
34503           # This is not a symbolic link! We are done!
34504           break
34505         fi
34506         # Again resolve directory symlinks since the target of the just found
34507         # link could be in a different directory
34508         cd `$DIRNAME $ISLINK`
34509         sym_link_dir=`$THEPWDCMD -P`
34510         sym_link_file=`$BASENAME $ISLINK`
34511         let COUNTER=COUNTER+1
34512       done
34513       cd $STARTDIR
34514       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34515     fi
34516   fi
34517 
34518   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34519     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34520 $as_echo "no symlink" >&6; }
34521   else
34522     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34523 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34524 
34525     # We can't handle ccache by gcc wrappers, since we need to know if we're
34526     # using ccache. Instead ccache usage must be controlled by a configure option.
34527     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34528     if test "x$COMPILER_BASENAME" = "xccache"; then
34529       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34530 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34531       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34532     fi
34533   fi
34534 
34535 
34536   COMPILER=$CC
34537   COMPILER_NAME=$COMPILER_NAME
34538 
34539   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34540     # cc -V output typically looks like
34541     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34542     # or
34543     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34544     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34545     # Check that this is likely to be the Solaris Studio cc.
34546     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34547     if test $? -ne 0; then
34548       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34549       { $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
34550 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34551       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34552 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34553       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34554 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34555       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34556     fi
34557     # Remove usage instructions (if present), and
34558     # collapse compiler output into a single line
34559     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34560         $SED -e 's/ *[Uu]sage:.*//'`
34561     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34562         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34563   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34564     # xlc -qversion output typically looks like
34565     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34566     #     Version: 11.01.0000.0015
34567     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34568     # Check that this is likely to be the IBM XL C compiler.
34569     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34570     if test $? -ne 0; then
34571       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34572       { $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
34573 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34574       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34575 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34576       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34577 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34578       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34579     fi
34580     # Collapse compiler output into a single line
34581     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34582     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34583         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34584   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34585     # There is no specific version flag, but all output starts with a version string.
34586     # First line typically looks something like:
34587     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34588     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34589     # Check that this is likely to be Microsoft CL.EXE.
34590     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34591     if test $? -ne 0; then
34592       { $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
34593 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34594       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34595 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34596       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34597     fi
34598     # Collapse compiler output into a single line
34599     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34600     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34601         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34602   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34603     # gcc --version output typically looks like
34604     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34605     #     Copyright (C) 2013 Free Software Foundation, Inc.
34606     #     This is free software; see the source for copying conditions.  There is NO
34607     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34608     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34609     # Check that this is likely to be GCC.
34610     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34611     if test $? -ne 0; then
34612       { $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
34613 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34614       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34615 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34616       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34617     fi
34618     # Remove Copyright and legalese from version string, and
34619     # collapse into a single line
34620     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34621         $SED -e 's/ *Copyright .*//'`
34622     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34623         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34624   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34625     # clang --version output typically looks like
34626     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34627     #    clang version 3.3 (tags/RELEASE_33/final)
34628     # or
34629     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34630     #    Target: x86_64-pc-linux-gnu
34631     #    Thread model: posix
34632     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34633     # Check that this is likely to be clang
34634     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34635     if test $? -ne 0; then
34636       { $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
34637 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34638       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34639 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34640       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34641     fi
34642     # Collapse compiler output into a single line
34643     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34644     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34645         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34646   else
34647       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34648   fi
34649   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34650   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34651   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34652   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34653 
34654   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34655 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34656 
34657 
34658   # Now that we have resolved CC ourself, let autoconf have its go at it
34659   ac_ext=c
34660 ac_cpp='$CPP $CPPFLAGS'
34661 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34662 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34663 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34664 if test -n "$ac_tool_prefix"; then
34665   for ac_prog in $CC
34666   do
34667     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34668 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34670 $as_echo_n "checking for $ac_word... " >&6; }
34671 if ${ac_cv_prog_CC+:} false; then :
34672   $as_echo_n "(cached) " >&6
34673 else
34674   if test -n "$CC"; then
34675   ac_cv_prog_CC="$CC" # Let the user override the test.
34676 else
34677 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34678 for as_dir in $PATH
34679 do
34680   IFS=$as_save_IFS
34681   test -z "$as_dir" && as_dir=.
34682     for ac_exec_ext in '' $ac_executable_extensions; do
34683   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34684     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34685     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34686     break 2
34687   fi
34688 done
34689   done
34690 IFS=$as_save_IFS
34691 
34692 fi
34693 fi
34694 CC=$ac_cv_prog_CC
34695 if test -n "$CC"; then
34696   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34697 $as_echo "$CC" >&6; }
34698 else
34699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34700 $as_echo "no" >&6; }
34701 fi
34702 
34703 
34704     test -n "$CC" && break
34705   done
34706 fi
34707 if test -z "$CC"; then
34708   ac_ct_CC=$CC
34709   for ac_prog in $CC
34710 do
34711   # Extract the first word of "$ac_prog", so it can be a program name with args.
34712 set dummy $ac_prog; ac_word=$2
34713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34714 $as_echo_n "checking for $ac_word... " >&6; }
34715 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34716   $as_echo_n "(cached) " >&6
34717 else
34718   if test -n "$ac_ct_CC"; then
34719   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34720 else
34721 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34722 for as_dir in $PATH
34723 do
34724   IFS=$as_save_IFS
34725   test -z "$as_dir" && as_dir=.
34726     for ac_exec_ext in '' $ac_executable_extensions; do
34727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34728     ac_cv_prog_ac_ct_CC="$ac_prog"
34729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34730     break 2
34731   fi
34732 done
34733   done
34734 IFS=$as_save_IFS
34735 
34736 fi
34737 fi
34738 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34739 if test -n "$ac_ct_CC"; then
34740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34741 $as_echo "$ac_ct_CC" >&6; }
34742 else
34743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34744 $as_echo "no" >&6; }
34745 fi
34746 
34747 
34748   test -n "$ac_ct_CC" && break
34749 done
34750 
34751   if test "x$ac_ct_CC" = x; then
34752     CC=""
34753   else
34754     case $cross_compiling:$ac_tool_warned in
34755 yes:)
34756 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34757 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34758 ac_tool_warned=yes ;;
34759 esac
34760     CC=$ac_ct_CC
34761   fi
34762 fi
34763 
34764 
34765 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34766 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34767 as_fn_error $? "no acceptable C compiler found in \$PATH
34768 See \`config.log' for more details" "$LINENO" 5; }
34769 
34770 # Provide some information about the compiler.
34771 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34772 set X $ac_compile
34773 ac_compiler=$2
34774 for ac_option in --version -v -V -qversion; do
34775   { { ac_try="$ac_compiler $ac_option >&5"
34776 case "(($ac_try" in
34777   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34778   *) ac_try_echo=$ac_try;;
34779 esac
34780 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34781 $as_echo "$ac_try_echo"; } >&5
34782   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34783   ac_status=$?
34784   if test -s conftest.err; then
34785     sed '10a\
34786 ... rest of stderr output deleted ...
34787          10q' conftest.err >conftest.er1
34788     cat conftest.er1 >&5
34789   fi
34790   rm -f conftest.er1 conftest.err
34791   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34792   test $ac_status = 0; }
34793 done
34794 
34795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34796 /* end confdefs.h.  */
34797 
34798 int
34799 main ()
34800 {
34801 
34802   ;
34803   return 0;
34804 }
34805 _ACEOF
34806 ac_clean_files_save=$ac_clean_files
34807 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34808 # Try to create an executable without -o first, disregard a.out.
34809 # It will help us diagnose broken compilers, and finding out an intuition
34810 # of exeext.
34811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34812 $as_echo_n "checking whether the C compiler works... " >&6; }
34813 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34814 
34815 # The possible output files:
34816 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34817 
34818 ac_rmfiles=
34819 for ac_file in $ac_files
34820 do
34821   case $ac_file in
34822     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34823     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34824   esac
34825 done
34826 rm -f $ac_rmfiles
34827 
34828 if { { ac_try="$ac_link_default"
34829 case "(($ac_try" in
34830   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34831   *) ac_try_echo=$ac_try;;
34832 esac
34833 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34834 $as_echo "$ac_try_echo"; } >&5
34835   (eval "$ac_link_default") 2>&5
34836   ac_status=$?
34837   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34838   test $ac_status = 0; }; then :
34839   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34840 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34841 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34842 # so that the user can short-circuit this test for compilers unknown to
34843 # Autoconf.
34844 for ac_file in $ac_files ''
34845 do
34846   test -f "$ac_file" || continue
34847   case $ac_file in
34848     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34849         ;;
34850     [ab].out )
34851         # We found the default executable, but exeext='' is most
34852         # certainly right.
34853         break;;
34854     *.* )
34855         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34856         then :; else
34857            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34858         fi
34859         # We set ac_cv_exeext here because the later test for it is not
34860         # safe: cross compilers may not add the suffix if given an `-o'
34861         # argument, so we may need to know it at that point already.
34862         # Even if this section looks crufty: it has the advantage of
34863         # actually working.
34864         break;;
34865     * )
34866         break;;
34867   esac
34868 done
34869 test "$ac_cv_exeext" = no && ac_cv_exeext=
34870 
34871 else
34872   ac_file=''
34873 fi
34874 if test -z "$ac_file"; then :
34875   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34876 $as_echo "no" >&6; }
34877 $as_echo "$as_me: failed program was:" >&5
34878 sed 's/^/| /' conftest.$ac_ext >&5
34879 
34880 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34881 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34882 as_fn_error 77 "C compiler cannot create executables
34883 See \`config.log' for more details" "$LINENO" 5; }
34884 else
34885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34886 $as_echo "yes" >&6; }
34887 fi
34888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34889 $as_echo_n "checking for C compiler default output file name... " >&6; }
34890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34891 $as_echo "$ac_file" >&6; }
34892 ac_exeext=$ac_cv_exeext
34893 
34894 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34895 ac_clean_files=$ac_clean_files_save
34896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34897 $as_echo_n "checking for suffix of executables... " >&6; }
34898 if { { ac_try="$ac_link"
34899 case "(($ac_try" in
34900   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34901   *) ac_try_echo=$ac_try;;
34902 esac
34903 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34904 $as_echo "$ac_try_echo"; } >&5
34905   (eval "$ac_link") 2>&5
34906   ac_status=$?
34907   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34908   test $ac_status = 0; }; then :
34909   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34910 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34911 # work properly (i.e., refer to `conftest.exe'), while it won't with
34912 # `rm'.
34913 for ac_file in conftest.exe conftest conftest.*; do
34914   test -f "$ac_file" || continue
34915   case $ac_file in
34916     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34917     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34918           break;;
34919     * ) break;;
34920   esac
34921 done
34922 else
34923   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34924 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34925 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34926 See \`config.log' for more details" "$LINENO" 5; }
34927 fi
34928 rm -f conftest conftest$ac_cv_exeext
34929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34930 $as_echo "$ac_cv_exeext" >&6; }
34931 
34932 rm -f conftest.$ac_ext
34933 EXEEXT=$ac_cv_exeext
34934 ac_exeext=$EXEEXT
34935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34936 /* end confdefs.h.  */
34937 #include <stdio.h>
34938 int
34939 main ()
34940 {
34941 FILE *f = fopen ("conftest.out", "w");
34942  return ferror (f) || fclose (f) != 0;
34943 
34944   ;
34945   return 0;
34946 }
34947 _ACEOF
34948 ac_clean_files="$ac_clean_files conftest.out"
34949 # Check that the compiler produces executables we can run.  If not, either
34950 # the compiler is broken, or we cross compile.
34951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34952 $as_echo_n "checking whether we are cross compiling... " >&6; }
34953 if test "$cross_compiling" != yes; then
34954   { { ac_try="$ac_link"
34955 case "(($ac_try" in
34956   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34957   *) ac_try_echo=$ac_try;;
34958 esac
34959 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34960 $as_echo "$ac_try_echo"; } >&5
34961   (eval "$ac_link") 2>&5
34962   ac_status=$?
34963   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34964   test $ac_status = 0; }
34965   if { ac_try='./conftest$ac_cv_exeext'
34966   { { case "(($ac_try" in
34967   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34968   *) ac_try_echo=$ac_try;;
34969 esac
34970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34971 $as_echo "$ac_try_echo"; } >&5
34972   (eval "$ac_try") 2>&5
34973   ac_status=$?
34974   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34975   test $ac_status = 0; }; }; then
34976     cross_compiling=no
34977   else
34978     if test "$cross_compiling" = maybe; then
34979         cross_compiling=yes
34980     else
34981         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34982 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34983 as_fn_error $? "cannot run C compiled programs.
34984 If you meant to cross compile, use \`--host'.
34985 See \`config.log' for more details" "$LINENO" 5; }
34986     fi
34987   fi
34988 fi
34989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34990 $as_echo "$cross_compiling" >&6; }
34991 
34992 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34993 ac_clean_files=$ac_clean_files_save
34994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34995 $as_echo_n "checking for suffix of object files... " >&6; }
34996 if ${ac_cv_objext+:} false; then :
34997   $as_echo_n "(cached) " >&6
34998 else
34999   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35000 /* end confdefs.h.  */
35001 
35002 int
35003 main ()
35004 {
35005 
35006   ;
35007   return 0;
35008 }
35009 _ACEOF
35010 rm -f conftest.o conftest.obj
35011 if { { ac_try="$ac_compile"
35012 case "(($ac_try" in
35013   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35014   *) ac_try_echo=$ac_try;;
35015 esac
35016 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35017 $as_echo "$ac_try_echo"; } >&5
35018   (eval "$ac_compile") 2>&5
35019   ac_status=$?
35020   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35021   test $ac_status = 0; }; then :
35022   for ac_file in conftest.o conftest.obj conftest.*; do
35023   test -f "$ac_file" || continue;
35024   case $ac_file in
35025     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
35026     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
35027        break;;
35028   esac
35029 done
35030 else
35031   $as_echo "$as_me: failed program was:" >&5
35032 sed 's/^/| /' conftest.$ac_ext >&5
35033 
35034 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35035 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35036 as_fn_error $? "cannot compute suffix of object files: cannot compile
35037 See \`config.log' for more details" "$LINENO" 5; }
35038 fi
35039 rm -f conftest.$ac_cv_objext conftest.$ac_ext
35040 fi
35041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
35042 $as_echo "$ac_cv_objext" >&6; }
35043 OBJEXT=$ac_cv_objext
35044 ac_objext=$OBJEXT
35045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
35046 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
35047 if ${ac_cv_c_compiler_gnu+:} false; then :
35048   $as_echo_n "(cached) " >&6
35049 else
35050   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35051 /* end confdefs.h.  */
35052 
35053 int
35054 main ()
35055 {
35056 #ifndef __GNUC__
35057        choke me
35058 #endif
35059 
35060   ;
35061   return 0;
35062 }
35063 _ACEOF
35064 if ac_fn_c_try_compile "$LINENO"; then :
35065   ac_compiler_gnu=yes
35066 else
35067   ac_compiler_gnu=no
35068 fi
35069 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35070 ac_cv_c_compiler_gnu=$ac_compiler_gnu
35071 
35072 fi
35073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
35074 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
35075 if test $ac_compiler_gnu = yes; then
35076   GCC=yes
35077 else
35078   GCC=
35079 fi
35080 ac_test_CFLAGS=${CFLAGS+set}
35081 ac_save_CFLAGS=$CFLAGS
35082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
35083 $as_echo_n "checking whether $CC accepts -g... " >&6; }
35084 if ${ac_cv_prog_cc_g+:} false; then :
35085   $as_echo_n "(cached) " >&6
35086 else
35087   ac_save_c_werror_flag=$ac_c_werror_flag
35088    ac_c_werror_flag=yes
35089    ac_cv_prog_cc_g=no
35090    CFLAGS="-g"
35091    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35092 /* end confdefs.h.  */
35093 
35094 int
35095 main ()
35096 {
35097 
35098   ;
35099   return 0;
35100 }
35101 _ACEOF
35102 if ac_fn_c_try_compile "$LINENO"; then :
35103   ac_cv_prog_cc_g=yes
35104 else
35105   CFLAGS=""
35106       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35107 /* end confdefs.h.  */
35108 
35109 int
35110 main ()
35111 {
35112 
35113   ;
35114   return 0;
35115 }
35116 _ACEOF
35117 if ac_fn_c_try_compile "$LINENO"; then :
35118 
35119 else
35120   ac_c_werror_flag=$ac_save_c_werror_flag
35121          CFLAGS="-g"
35122          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35123 /* end confdefs.h.  */
35124 
35125 int
35126 main ()
35127 {
35128 
35129   ;
35130   return 0;
35131 }
35132 _ACEOF
35133 if ac_fn_c_try_compile "$LINENO"; then :
35134   ac_cv_prog_cc_g=yes
35135 fi
35136 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35137 fi
35138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35139 fi
35140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35141    ac_c_werror_flag=$ac_save_c_werror_flag
35142 fi
35143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35144 $as_echo "$ac_cv_prog_cc_g" >&6; }
35145 if test "$ac_test_CFLAGS" = set; then
35146   CFLAGS=$ac_save_CFLAGS
35147 elif test $ac_cv_prog_cc_g = yes; then
35148   if test "$GCC" = yes; then
35149     CFLAGS="-g -O2"
35150   else
35151     CFLAGS="-g"
35152   fi
35153 else
35154   if test "$GCC" = yes; then
35155     CFLAGS="-O2"
35156   else
35157     CFLAGS=
35158   fi
35159 fi
35160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35161 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35162 if ${ac_cv_prog_cc_c89+:} false; then :
35163   $as_echo_n "(cached) " >&6
35164 else
35165   ac_cv_prog_cc_c89=no
35166 ac_save_CC=$CC
35167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35168 /* end confdefs.h.  */
35169 #include <stdarg.h>
35170 #include <stdio.h>
35171 struct stat;
35172 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35173 struct buf { int x; };
35174 FILE * (*rcsopen) (struct buf *, struct stat *, int);
35175 static char *e (p, i)
35176      char **p;
35177      int i;
35178 {
35179   return p[i];
35180 }
35181 static char *f (char * (*g) (char **, int), char **p, ...)
35182 {
35183   char *s;
35184   va_list v;
35185   va_start (v,p);
35186   s = g (p, va_arg (v,int));
35187   va_end (v);
35188   return s;
35189 }
35190 
35191 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35192    function prototypes and stuff, but not '\xHH' hex character constants.
35193    These don't provoke an error unfortunately, instead are silently treated
35194    as 'x'.  The following induces an error, until -std is added to get
35195    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35196    array size at least.  It's necessary to write '\x00'==0 to get something
35197    that's true only with -std.  */
35198 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35199 
35200 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35201    inside strings and character constants.  */
35202 #define FOO(x) 'x'
35203 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35204 
35205 int test (int i, double x);
35206 struct s1 {int (*f) (int a);};
35207 struct s2 {int (*f) (double a);};
35208 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35209 int argc;
35210 char **argv;
35211 int
35212 main ()
35213 {
35214 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35215   ;
35216   return 0;
35217 }
35218 _ACEOF
35219 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35220         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35221 do
35222   CC="$ac_save_CC $ac_arg"
35223   if ac_fn_c_try_compile "$LINENO"; then :
35224   ac_cv_prog_cc_c89=$ac_arg
35225 fi
35226 rm -f core conftest.err conftest.$ac_objext
35227   test "x$ac_cv_prog_cc_c89" != "xno" && break
35228 done
35229 rm -f conftest.$ac_ext
35230 CC=$ac_save_CC
35231 
35232 fi
35233 # AC_CACHE_VAL
35234 case "x$ac_cv_prog_cc_c89" in
35235   x)
35236     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35237 $as_echo "none needed" >&6; } ;;
35238   xno)
35239     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35240 $as_echo "unsupported" >&6; } ;;
35241   *)
35242     CC="$CC $ac_cv_prog_cc_c89"
35243     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35244 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35245 esac
35246 if test "x$ac_cv_prog_cc_c89" != xno; then :
35247 
35248 fi
35249 
35250 ac_ext=cpp
35251 ac_cpp='$CXXCPP $CPPFLAGS'
35252 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35253 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35254 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35255 
35256 
35257 
35258   COMPILER_NAME=C++
35259   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35260 
35261   if test "x$CXX" != x; then
35262     # User has supplied compiler name already, always let that override.
35263     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35264 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35265     if test "x`basename $CXX`" = "x$CXX"; then
35266       # A command without a complete path is provided, search $PATH.
35267 
35268       for ac_prog in $CXX
35269 do
35270   # Extract the first word of "$ac_prog", so it can be a program name with args.
35271 set dummy $ac_prog; ac_word=$2
35272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35273 $as_echo_n "checking for $ac_word... " >&6; }
35274 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35275   $as_echo_n "(cached) " >&6
35276 else
35277   case $POTENTIAL_CXX in
35278   [\\/]* | ?:[\\/]*)
35279   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35280   ;;
35281   *)
35282   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35283 for as_dir in $PATH
35284 do
35285   IFS=$as_save_IFS
35286   test -z "$as_dir" && as_dir=.
35287     for ac_exec_ext in '' $ac_executable_extensions; do
35288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35289     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35291     break 2
35292   fi
35293 done
35294   done
35295 IFS=$as_save_IFS
35296 
35297   ;;
35298 esac
35299 fi
35300 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35301 if test -n "$POTENTIAL_CXX"; then
35302   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35303 $as_echo "$POTENTIAL_CXX" >&6; }
35304 else
35305   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35306 $as_echo "no" >&6; }
35307 fi
35308 
35309 
35310   test -n "$POTENTIAL_CXX" && break
35311 done
35312 
35313       if test "x$POTENTIAL_CXX" != x; then
35314         CXX=$POTENTIAL_CXX
35315       else
35316         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35317       fi
35318     else
35319       # Otherwise it might already be a complete path
35320       if test ! -x "$CXX"; then
35321         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35322       fi
35323     fi
35324   else
35325     # No user supplied value. Locate compiler ourselves.
35326 
35327     # If we are cross compiling, assume cross compilation tools follows the
35328     # cross compilation standard where they are prefixed with the autoconf
35329     # standard name for the target. For example the binary
35330     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35331     # If we are not cross compiling, then the default compiler name will be
35332     # used.
35333 
35334     CXX=
35335     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35336     # before checking the rest of the PATH.
35337     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35338     # step, this should not be necessary.
35339     if test -n "$TOOLCHAIN_PATH"; then
35340       PATH_save="$PATH"
35341       PATH="$TOOLCHAIN_PATH"
35342       if test -n "$ac_tool_prefix"; then
35343   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35344 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35346 $as_echo_n "checking for $ac_word... " >&6; }
35347 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35348   $as_echo_n "(cached) " >&6
35349 else
35350   case $TOOLCHAIN_PATH_CXX in
35351   [\\/]* | ?:[\\/]*)
35352   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35353   ;;
35354   *)
35355   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35356 for as_dir in $PATH
35357 do
35358   IFS=$as_save_IFS
35359   test -z "$as_dir" && as_dir=.
35360     for ac_exec_ext in '' $ac_executable_extensions; do
35361   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35362     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35363     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35364     break 2
35365   fi
35366 done
35367   done
35368 IFS=$as_save_IFS
35369 
35370   ;;
35371 esac
35372 fi
35373 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35374 if test -n "$TOOLCHAIN_PATH_CXX"; then
35375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35376 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35377 else
35378   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35379 $as_echo "no" >&6; }
35380 fi
35381 
35382 
35383 fi
35384 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35385   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35386   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35387 set dummy $SEARCH_LIST; ac_word=$2
35388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35389 $as_echo_n "checking for $ac_word... " >&6; }
35390 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35391   $as_echo_n "(cached) " >&6
35392 else
35393   case $ac_pt_TOOLCHAIN_PATH_CXX in
35394   [\\/]* | ?:[\\/]*)
35395   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35396   ;;
35397   *)
35398   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35399 for as_dir in $PATH
35400 do
35401   IFS=$as_save_IFS
35402   test -z "$as_dir" && as_dir=.
35403     for ac_exec_ext in '' $ac_executable_extensions; do
35404   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35405     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35406     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35407     break 2
35408   fi
35409 done
35410   done
35411 IFS=$as_save_IFS
35412 
35413   ;;
35414 esac
35415 fi
35416 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35417 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35418   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35419 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35420 else
35421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35422 $as_echo "no" >&6; }
35423 fi
35424 
35425   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35426     TOOLCHAIN_PATH_CXX=""
35427   else
35428     case $cross_compiling:$ac_tool_warned in
35429 yes:)
35430 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35431 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35432 ac_tool_warned=yes ;;
35433 esac
35434     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35435   fi
35436 else
35437   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35438 fi
35439 
35440       CXX=$TOOLCHAIN_PATH_CXX
35441       PATH="$PATH_save"
35442     fi
35443 
35444     # AC_PATH_TOOL can't be run multiple times with the same variable,
35445     # so create a new name for this run.
35446     if test "x$CXX" = x; then
35447       if test -n "$ac_tool_prefix"; then
35448   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35449 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35450 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35451 $as_echo_n "checking for $ac_word... " >&6; }
35452 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35453   $as_echo_n "(cached) " >&6
35454 else
35455   case $POTENTIAL_CXX in
35456   [\\/]* | ?:[\\/]*)
35457   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35458   ;;
35459   *)
35460   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35461 for as_dir in $PATH
35462 do
35463   IFS=$as_save_IFS
35464   test -z "$as_dir" && as_dir=.
35465     for ac_exec_ext in '' $ac_executable_extensions; do
35466   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35467     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35468     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35469     break 2
35470   fi
35471 done
35472   done
35473 IFS=$as_save_IFS
35474 
35475   ;;
35476 esac
35477 fi
35478 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35479 if test -n "$POTENTIAL_CXX"; then
35480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35481 $as_echo "$POTENTIAL_CXX" >&6; }
35482 else
35483   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35484 $as_echo "no" >&6; }
35485 fi
35486 
35487 
35488 fi
35489 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35490   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35491   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35492 set dummy $SEARCH_LIST; ac_word=$2
35493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35494 $as_echo_n "checking for $ac_word... " >&6; }
35495 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35496   $as_echo_n "(cached) " >&6
35497 else
35498   case $ac_pt_POTENTIAL_CXX in
35499   [\\/]* | ?:[\\/]*)
35500   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35501   ;;
35502   *)
35503   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35504 for as_dir in $PATH
35505 do
35506   IFS=$as_save_IFS
35507   test -z "$as_dir" && as_dir=.
35508     for ac_exec_ext in '' $ac_executable_extensions; do
35509   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35510     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35511     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35512     break 2
35513   fi
35514 done
35515   done
35516 IFS=$as_save_IFS
35517 
35518   ;;
35519 esac
35520 fi
35521 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35522 if test -n "$ac_pt_POTENTIAL_CXX"; then
35523   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35524 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35525 else
35526   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35527 $as_echo "no" >&6; }
35528 fi
35529 
35530   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35531     POTENTIAL_CXX=""
35532   else
35533     case $cross_compiling:$ac_tool_warned in
35534 yes:)
35535 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35536 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35537 ac_tool_warned=yes ;;
35538 esac
35539     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35540   fi
35541 else
35542   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35543 fi
35544 
35545       CXX=$POTENTIAL_CXX
35546     fi
35547 
35548     if test "x$CXX" = x; then
35549 
35550   # Print a helpful message on how to acquire the necessary build dependency.
35551   # devkit is the help tag: freetype, cups, alsa etc
35552   MISSING_DEPENDENCY=devkit
35553 
35554   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35555     cygwin_help $MISSING_DEPENDENCY
35556   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35557     msys_help $MISSING_DEPENDENCY
35558   else
35559     PKGHANDLER_COMMAND=
35560 
35561     case $PKGHANDLER in
35562       apt-get)
35563         apt_help     $MISSING_DEPENDENCY ;;
35564       yum)
35565         yum_help     $MISSING_DEPENDENCY ;;
35566       brew)
35567         brew_help    $MISSING_DEPENDENCY ;;
35568       port)
35569         port_help    $MISSING_DEPENDENCY ;;
35570       pkgutil)
35571         pkgutil_help $MISSING_DEPENDENCY ;;
35572       pkgadd)
35573         pkgadd_help  $MISSING_DEPENDENCY ;;
35574     esac
35575 
35576     if test "x$PKGHANDLER_COMMAND" != x; then
35577       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35578     fi
35579   fi
35580 
35581       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35582     fi
35583   fi
35584 
35585   # Now we have a compiler binary in CXX. Make sure it's okay.
35586 
35587   # Only process if variable expands to non-empty
35588 
35589   if test "x$CXX" != x; then
35590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35591 
35592   # First separate the path from the arguments. This will split at the first
35593   # space.
35594   complete="$CXX"
35595   path="${complete%% *}"
35596   tmp="$complete EOL"
35597   arguments="${tmp#* }"
35598 
35599   # Input might be given as Windows format, start by converting to
35600   # unix format.
35601   new_path=`$CYGPATH -u "$path"`
35602 
35603   # Now try to locate executable using which
35604   new_path=`$WHICH "$new_path" 2> /dev/null`
35605   # bat and cmd files are not always considered executable in cygwin causing which
35606   # to not find them
35607   if test "x$new_path" = x \
35608       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35609       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35610     new_path=`$CYGPATH -u "$path"`
35611   fi
35612   if test "x$new_path" = x; then
35613     # Oops. Which didn't find the executable.
35614     # The splitting of arguments from the executable at a space might have been incorrect,
35615     # since paths with space are more likely in Windows. Give it another try with the whole
35616     # argument.
35617     path="$complete"
35618     arguments="EOL"
35619     new_path=`$CYGPATH -u "$path"`
35620     new_path=`$WHICH "$new_path" 2> /dev/null`
35621     # bat and cmd files are not always considered executable in cygwin causing which
35622     # to not find them
35623     if test "x$new_path" = x \
35624         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35625         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35626       new_path=`$CYGPATH -u "$path"`
35627     fi
35628     if test "x$new_path" = x; then
35629       # It's still not found. Now this is an unrecoverable error.
35630       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35631 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35632       has_space=`$ECHO "$complete" | $GREP " "`
35633       if test "x$has_space" != x; then
35634         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35635 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35636       fi
35637       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35638     fi
35639   fi
35640 
35641   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35642   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35643   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35644   # "foo.exe" is OK but "foo" is an error.
35645   #
35646   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35647   # It is also a way to make sure we got the proper file name for the real test later on.
35648   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35649   if test "x$test_shortpath" = x; then
35650     # Short path failed, file does not exist as specified.
35651     # Try adding .exe or .cmd
35652     if test -f "${new_path}.exe"; then
35653       input_to_shortpath="${new_path}.exe"
35654     elif test -f "${new_path}.cmd"; then
35655       input_to_shortpath="${new_path}.cmd"
35656     else
35657       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35658 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35659       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35660 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35661       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35662     fi
35663   else
35664     input_to_shortpath="$new_path"
35665   fi
35666 
35667   # Call helper function which possibly converts this using DOS-style short mode.
35668   # If so, the updated path is stored in $new_path.
35669   new_path="$input_to_shortpath"
35670 
35671   input_path="$input_to_shortpath"
35672   # Check if we need to convert this using DOS-style short mode. If the path
35673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35674   # take no chances and rewrite it.
35675   # Note: m4 eats our [], so we need to use [ and ] instead.
35676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35677   if test "x$has_forbidden_chars" != x; then
35678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35679     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35680     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35681     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35682       # Going to short mode and back again did indeed matter. Since short mode is
35683       # case insensitive, let's make it lowercase to improve readability.
35684       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35685       # Now convert it back to Unix-style (cygpath)
35686       input_path=`$CYGPATH -u "$shortmode_path"`
35687       new_path="$input_path"
35688     fi
35689   fi
35690 
35691   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35692   if test "x$test_cygdrive_prefix" = x; then
35693     # As a simple fix, exclude /usr/bin since it's not a real path.
35694     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35695       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35696       # a path prefixed by /cygdrive for fixpath to work.
35697       new_path="$CYGWIN_ROOT_PATH$input_path"
35698     fi
35699   fi
35700 
35701   # remove trailing .exe if any
35702   new_path="${new_path/%.exe/}"
35703 
35704     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35705 
35706   # First separate the path from the arguments. This will split at the first
35707   # space.
35708   complete="$CXX"
35709   path="${complete%% *}"
35710   tmp="$complete EOL"
35711   arguments="${tmp#* }"
35712 
35713   # Input might be given as Windows format, start by converting to
35714   # unix format.
35715   new_path="$path"
35716 
35717   windows_path="$new_path"
35718   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35719     unix_path=`$CYGPATH -u "$windows_path"`
35720     new_path="$unix_path"
35721   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35722     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35723     new_path="$unix_path"
35724   fi
35725 
35726 
35727   # Now try to locate executable using which
35728   new_path=`$WHICH "$new_path" 2> /dev/null`
35729 
35730   if test "x$new_path" = x; then
35731     # Oops. Which didn't find the executable.
35732     # The splitting of arguments from the executable at a space might have been incorrect,
35733     # since paths with space are more likely in Windows. Give it another try with the whole
35734     # argument.
35735     path="$complete"
35736     arguments="EOL"
35737     new_path="$path"
35738 
35739   windows_path="$new_path"
35740   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35741     unix_path=`$CYGPATH -u "$windows_path"`
35742     new_path="$unix_path"
35743   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35744     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35745     new_path="$unix_path"
35746   fi
35747 
35748 
35749     new_path=`$WHICH "$new_path" 2> /dev/null`
35750     # bat and cmd files are not always considered executable in MSYS causing which
35751     # to not find them
35752     if test "x$new_path" = x \
35753         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35754         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35755       new_path="$path"
35756 
35757   windows_path="$new_path"
35758   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35759     unix_path=`$CYGPATH -u "$windows_path"`
35760     new_path="$unix_path"
35761   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35762     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35763     new_path="$unix_path"
35764   fi
35765 
35766     fi
35767 
35768     if test "x$new_path" = x; then
35769       # It's still not found. Now this is an unrecoverable error.
35770       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35771 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35772       has_space=`$ECHO "$complete" | $GREP " "`
35773       if test "x$has_space" != x; then
35774         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35775 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35776       fi
35777       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35778     fi
35779   fi
35780 
35781   # Now new_path has a complete unix path to the binary
35782   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35783     # Keep paths in /bin as-is, but remove trailing .exe if any
35784     new_path="${new_path/%.exe/}"
35785     # Do not save /bin paths to all_fixpath_prefixes!
35786   else
35787     # Not in mixed or Windows style, start by that.
35788     new_path=`cmd //c echo $new_path`
35789 
35790   input_path="$new_path"
35791   # Check if we need to convert this using DOS-style short mode. If the path
35792   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35793   # take no chances and rewrite it.
35794   # Note: m4 eats our [], so we need to use [ and ] instead.
35795   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35796   if test "x$has_forbidden_chars" != x; then
35797     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35798     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35799   fi
35800 
35801     # Output is in $new_path
35802 
35803   windows_path="$new_path"
35804   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35805     unix_path=`$CYGPATH -u "$windows_path"`
35806     new_path="$unix_path"
35807   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35808     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35809     new_path="$unix_path"
35810   fi
35811 
35812     # remove trailing .exe if any
35813     new_path="${new_path/%.exe/}"
35814 
35815     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35816     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35817   fi
35818 
35819     else
35820       # We're on a unix platform. Hooray! :)
35821       # First separate the path from the arguments. This will split at the first
35822       # space.
35823       complete="$CXX"
35824       path="${complete%% *}"
35825       tmp="$complete EOL"
35826       arguments="${tmp#* }"
35827 
35828       # Cannot rely on the command "which" here since it doesn't always work.
35829       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35830       if test -z "$is_absolute_path"; then
35831         # Path to executable is not absolute. Find it.
35832         IFS_save="$IFS"
35833         IFS=:
35834         for p in $PATH; do
35835           if test -f "$p/$path" && test -x "$p/$path"; then
35836             new_path="$p/$path"
35837             break
35838           fi
35839         done
35840         IFS="$IFS_save"
35841       else
35842         # This is an absolute path, we can use it without further modifications.
35843         new_path="$path"
35844       fi
35845 
35846       if test "x$new_path" = x; then
35847         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35848 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35849         has_space=`$ECHO "$complete" | $GREP " "`
35850         if test "x$has_space" != x; then
35851           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35852 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35853         fi
35854         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35855       fi
35856     fi
35857 
35858     # Now join together the path and the arguments once again
35859     if test "x$arguments" != xEOL; then
35860       new_complete="$new_path ${arguments% *}"
35861     else
35862       new_complete="$new_path"
35863     fi
35864 
35865     if test "x$complete" != "x$new_complete"; then
35866       CXX="$new_complete"
35867       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35868 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35869     fi
35870   fi
35871 
35872   TEST_COMPILER="$CXX"
35873 
35874   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35875 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35876   SYMLINK_ORIGINAL="$TEST_COMPILER"
35877 
35878   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35879     # Follow a chain of symbolic links. Use readlink
35880     # where it exists, else fall back to horribly
35881     # complicated shell code.
35882     if test "x$READLINK_TESTED" != yes; then
35883       # On MacOSX there is a readlink tool with a different
35884       # purpose than the GNU readlink tool. Check the found readlink.
35885       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35886       if test "x$ISGNU" = x; then
35887         # A readlink that we do not know how to use.
35888         # Are there other non-GNU readlinks out there?
35889         READLINK_TESTED=yes
35890         READLINK=
35891       fi
35892     fi
35893 
35894     if test "x$READLINK" != x; then
35895       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35896     else
35897       # Save the current directory for restoring afterwards
35898       STARTDIR=$PWD
35899       COUNTER=0
35900       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35901       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35902       cd $sym_link_dir
35903       # Use -P flag to resolve symlinks in directories.
35904       cd `$THEPWDCMD -P`
35905       sym_link_dir=`$THEPWDCMD -P`
35906       # Resolve file symlinks
35907       while test $COUNTER -lt 20; do
35908         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35909         if test "x$ISLINK" == x; then
35910           # This is not a symbolic link! We are done!
35911           break
35912         fi
35913         # Again resolve directory symlinks since the target of the just found
35914         # link could be in a different directory
35915         cd `$DIRNAME $ISLINK`
35916         sym_link_dir=`$THEPWDCMD -P`
35917         sym_link_file=`$BASENAME $ISLINK`
35918         let COUNTER=COUNTER+1
35919       done
35920       cd $STARTDIR
35921       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35922     fi
35923   fi
35924 
35925   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35926     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35927 $as_echo "no symlink" >&6; }
35928   else
35929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35930 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35931 
35932     # We can't handle ccache by gcc wrappers, since we need to know if we're
35933     # using ccache. Instead ccache usage must be controlled by a configure option.
35934     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35935     if test "x$COMPILER_BASENAME" = "xccache"; then
35936       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35937 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35938       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35939     fi
35940   fi
35941 
35942 
35943   COMPILER=$CXX
35944   COMPILER_NAME=$COMPILER_NAME
35945 
35946   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35947     # cc -V output typically looks like
35948     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35949     # or
35950     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35951     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35952     # Check that this is likely to be the Solaris Studio cc.
35953     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35954     if test $? -ne 0; then
35955       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35956       { $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
35957 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35958       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35959 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35960       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35961 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35962       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35963     fi
35964     # Remove usage instructions (if present), and
35965     # collapse compiler output into a single line
35966     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35967         $SED -e 's/ *[Uu]sage:.*//'`
35968     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35969         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35970   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35971     # xlc -qversion output typically looks like
35972     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35973     #     Version: 11.01.0000.0015
35974     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35975     # Check that this is likely to be the IBM XL C compiler.
35976     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35977     if test $? -ne 0; then
35978       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35979       { $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
35980 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35981       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35982 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35983       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35984 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35985       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35986     fi
35987     # Collapse compiler output into a single line
35988     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35989     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35990         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35991   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35992     # There is no specific version flag, but all output starts with a version string.
35993     # First line typically looks something like:
35994     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35995     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35996     # Check that this is likely to be Microsoft CL.EXE.
35997     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35998     if test $? -ne 0; then
35999       { $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
36000 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36001       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36002 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36003       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36004     fi
36005     # Collapse compiler output into a single line
36006     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36007     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36008         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
36009   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
36010     # gcc --version output typically looks like
36011     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
36012     #     Copyright (C) 2013 Free Software Foundation, Inc.
36013     #     This is free software; see the source for copying conditions.  There is NO
36014     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
36015     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36016     # Check that this is likely to be GCC.
36017     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
36018     if test $? -ne 0; then
36019       { $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
36020 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36021       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
36022 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
36023       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36024     fi
36025     # Remove Copyright and legalese from version string, and
36026     # collapse into a single line
36027     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
36028         $SED -e 's/ *Copyright .*//'`
36029     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36030         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
36031   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
36032     # clang --version output typically looks like
36033     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
36034     #    clang version 3.3 (tags/RELEASE_33/final)
36035     # or
36036     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
36037     #    Target: x86_64-pc-linux-gnu
36038     #    Thread model: posix
36039     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
36040     # Check that this is likely to be clang
36041     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
36042     if test $? -ne 0; then
36043       { $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
36044 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
36045       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
36046 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
36047       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
36048     fi
36049     # Collapse compiler output into a single line
36050     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
36051     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
36052         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
36053   else
36054       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
36055   fi
36056   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
36057   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
36058   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
36059   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
36060 
36061   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
36062 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
36063 
36064 
36065   # Now that we have resolved CXX ourself, let autoconf have its go at it
36066   ac_ext=cpp
36067 ac_cpp='$CXXCPP $CPPFLAGS'
36068 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36069 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36070 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36071 if test -z "$CXX"; then
36072   if test -n "$CCC"; then
36073     CXX=$CCC
36074   else
36075     if test -n "$ac_tool_prefix"; then
36076   for ac_prog in $CXX
36077   do
36078     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36079 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36081 $as_echo_n "checking for $ac_word... " >&6; }
36082 if ${ac_cv_prog_CXX+:} false; then :
36083   $as_echo_n "(cached) " >&6
36084 else
36085   if test -n "$CXX"; then
36086   ac_cv_prog_CXX="$CXX" # Let the user override the test.
36087 else
36088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36089 for as_dir in $PATH
36090 do
36091   IFS=$as_save_IFS
36092   test -z "$as_dir" && as_dir=.
36093     for ac_exec_ext in '' $ac_executable_extensions; do
36094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36095     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36097     break 2
36098   fi
36099 done
36100   done
36101 IFS=$as_save_IFS
36102 
36103 fi
36104 fi
36105 CXX=$ac_cv_prog_CXX
36106 if test -n "$CXX"; then
36107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36108 $as_echo "$CXX" >&6; }
36109 else
36110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36111 $as_echo "no" >&6; }
36112 fi
36113 
36114 
36115     test -n "$CXX" && break
36116   done
36117 fi
36118 if test -z "$CXX"; then
36119   ac_ct_CXX=$CXX
36120   for ac_prog in $CXX
36121 do
36122   # Extract the first word of "$ac_prog", so it can be a program name with args.
36123 set dummy $ac_prog; ac_word=$2
36124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36125 $as_echo_n "checking for $ac_word... " >&6; }
36126 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36127   $as_echo_n "(cached) " >&6
36128 else
36129   if test -n "$ac_ct_CXX"; then
36130   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36131 else
36132 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36133 for as_dir in $PATH
36134 do
36135   IFS=$as_save_IFS
36136   test -z "$as_dir" && as_dir=.
36137     for ac_exec_ext in '' $ac_executable_extensions; do
36138   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36139     ac_cv_prog_ac_ct_CXX="$ac_prog"
36140     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36141     break 2
36142   fi
36143 done
36144   done
36145 IFS=$as_save_IFS
36146 
36147 fi
36148 fi
36149 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36150 if test -n "$ac_ct_CXX"; then
36151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36152 $as_echo "$ac_ct_CXX" >&6; }
36153 else
36154   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36155 $as_echo "no" >&6; }
36156 fi
36157 
36158 
36159   test -n "$ac_ct_CXX" && break
36160 done
36161 
36162   if test "x$ac_ct_CXX" = x; then
36163     CXX="g++"
36164   else
36165     case $cross_compiling:$ac_tool_warned in
36166 yes:)
36167 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36168 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36169 ac_tool_warned=yes ;;
36170 esac
36171     CXX=$ac_ct_CXX
36172   fi
36173 fi
36174 
36175   fi
36176 fi
36177 # Provide some information about the compiler.
36178 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36179 set X $ac_compile
36180 ac_compiler=$2
36181 for ac_option in --version -v -V -qversion; do
36182   { { ac_try="$ac_compiler $ac_option >&5"
36183 case "(($ac_try" in
36184   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36185   *) ac_try_echo=$ac_try;;
36186 esac
36187 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36188 $as_echo "$ac_try_echo"; } >&5
36189   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36190   ac_status=$?
36191   if test -s conftest.err; then
36192     sed '10a\
36193 ... rest of stderr output deleted ...
36194          10q' conftest.err >conftest.er1
36195     cat conftest.er1 >&5
36196   fi
36197   rm -f conftest.er1 conftest.err
36198   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36199   test $ac_status = 0; }
36200 done
36201 
36202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36203 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36204 if ${ac_cv_cxx_compiler_gnu+:} false; then :
36205   $as_echo_n "(cached) " >&6
36206 else
36207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36208 /* end confdefs.h.  */
36209 
36210 int
36211 main ()
36212 {
36213 #ifndef __GNUC__
36214        choke me
36215 #endif
36216 
36217   ;
36218   return 0;
36219 }
36220 _ACEOF
36221 if ac_fn_cxx_try_compile "$LINENO"; then :
36222   ac_compiler_gnu=yes
36223 else
36224   ac_compiler_gnu=no
36225 fi
36226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36227 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36228 
36229 fi
36230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36231 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36232 if test $ac_compiler_gnu = yes; then
36233   GXX=yes
36234 else
36235   GXX=
36236 fi
36237 ac_test_CXXFLAGS=${CXXFLAGS+set}
36238 ac_save_CXXFLAGS=$CXXFLAGS
36239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36240 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
36241 if ${ac_cv_prog_cxx_g+:} false; then :
36242   $as_echo_n "(cached) " >&6
36243 else
36244   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36245    ac_cxx_werror_flag=yes
36246    ac_cv_prog_cxx_g=no
36247    CXXFLAGS="-g"
36248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36249 /* end confdefs.h.  */
36250 
36251 int
36252 main ()
36253 {
36254 
36255   ;
36256   return 0;
36257 }
36258 _ACEOF
36259 if ac_fn_cxx_try_compile "$LINENO"; then :
36260   ac_cv_prog_cxx_g=yes
36261 else
36262   CXXFLAGS=""
36263       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36264 /* end confdefs.h.  */
36265 
36266 int
36267 main ()
36268 {
36269 
36270   ;
36271   return 0;
36272 }
36273 _ACEOF
36274 if ac_fn_cxx_try_compile "$LINENO"; then :
36275 
36276 else
36277   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36278          CXXFLAGS="-g"
36279          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36280 /* end confdefs.h.  */
36281 
36282 int
36283 main ()
36284 {
36285 
36286   ;
36287   return 0;
36288 }
36289 _ACEOF
36290 if ac_fn_cxx_try_compile "$LINENO"; then :
36291   ac_cv_prog_cxx_g=yes
36292 fi
36293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36294 fi
36295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36296 fi
36297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36298    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36299 fi
36300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36301 $as_echo "$ac_cv_prog_cxx_g" >&6; }
36302 if test "$ac_test_CXXFLAGS" = set; then
36303   CXXFLAGS=$ac_save_CXXFLAGS
36304 elif test $ac_cv_prog_cxx_g = yes; then
36305   if test "$GXX" = yes; then
36306     CXXFLAGS="-g -O2"
36307   else
36308     CXXFLAGS="-g"
36309   fi
36310 else
36311   if test "$GXX" = yes; then
36312     CXXFLAGS="-O2"
36313   else
36314     CXXFLAGS=
36315   fi
36316 fi
36317 ac_ext=cpp
36318 ac_cpp='$CXXCPP $CPPFLAGS'
36319 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36320 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36321 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36322 
36323 
36324   # This is the compiler version number on the form X.Y[.Z]
36325 
36326 
36327 
36328 
36329   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36330     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36331 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36332     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36333 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36334   fi
36335 
36336   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36337   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36338     { $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
36339 $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;}
36340   fi
36341 
36342   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36343     { $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
36344 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36345   fi
36346 
36347   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36348 
36349 
36350   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36351 
36352 
36353 
36354 
36355 
36356 
36357 
36358 
36359 
36360 
36361 
36362 
36363 
36364 
36365 
36366 
36367 
36368 
36369 
36370 
36371 
36372 
36373 
36374 
36375 
36376 
36377 
36378 
36379 
36380 
36381 
36382 
36383 
36384 
36385 
36386 
36387 
36388 
36389 
36390 
36391 
36392 
36393 
36394 
36395 
36396 
36397 
36398 
36399 
36400     # Execute function body
36401 
36402   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36403   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36404 
36405   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36406     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36407   fi
36408 
36409   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36410     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36411   fi
36412 
36413   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36414   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36415 
36416   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36417     :
36418 
36419   else
36420     :
36421 
36422           { $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
36423 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36424 
36425 
36426   fi
36427 
36428 
36429 
36430 
36431 
36432 
36433 
36434 
36435 
36436 
36437 
36438 
36439 
36440 
36441   fi
36442 
36443   #
36444   # Setup the preprocessor (CPP and CXXCPP)
36445   #
36446   ac_ext=c
36447 ac_cpp='$CPP $CPPFLAGS'
36448 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36449 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36450 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36452 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36453 # On Suns, sometimes $CPP names a directory.
36454 if test -n "$CPP" && test -d "$CPP"; then
36455   CPP=
36456 fi
36457 if test -z "$CPP"; then
36458   if ${ac_cv_prog_CPP+:} false; then :
36459   $as_echo_n "(cached) " >&6
36460 else
36461       # Double quotes because CPP needs to be expanded
36462     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36463     do
36464       ac_preproc_ok=false
36465 for ac_c_preproc_warn_flag in '' yes
36466 do
36467   # Use a header file that comes with gcc, so configuring glibc
36468   # with a fresh cross-compiler works.
36469   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36470   # <limits.h> exists even on freestanding compilers.
36471   # On the NeXT, cc -E runs the code through the compiler's parser,
36472   # not just through cpp. "Syntax error" is here to catch this case.
36473   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36474 /* end confdefs.h.  */
36475 #ifdef __STDC__
36476 # include <limits.h>
36477 #else
36478 # include <assert.h>
36479 #endif
36480                      Syntax error
36481 _ACEOF
36482 if ac_fn_c_try_cpp "$LINENO"; then :
36483 
36484 else
36485   # Broken: fails on valid input.
36486 continue
36487 fi
36488 rm -f conftest.err conftest.i conftest.$ac_ext
36489 
36490   # OK, works on sane cases.  Now check whether nonexistent headers
36491   # can be detected and how.
36492   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36493 /* end confdefs.h.  */
36494 #include <ac_nonexistent.h>
36495 _ACEOF
36496 if ac_fn_c_try_cpp "$LINENO"; then :
36497   # Broken: success on invalid input.
36498 continue
36499 else
36500   # Passes both tests.
36501 ac_preproc_ok=:
36502 break
36503 fi
36504 rm -f conftest.err conftest.i conftest.$ac_ext
36505 
36506 done
36507 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36508 rm -f conftest.i conftest.err conftest.$ac_ext
36509 if $ac_preproc_ok; then :
36510   break
36511 fi
36512 
36513     done
36514     ac_cv_prog_CPP=$CPP
36515 
36516 fi
36517   CPP=$ac_cv_prog_CPP
36518 else
36519   ac_cv_prog_CPP=$CPP
36520 fi
36521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36522 $as_echo "$CPP" >&6; }
36523 ac_preproc_ok=false
36524 for ac_c_preproc_warn_flag in '' yes
36525 do
36526   # Use a header file that comes with gcc, so configuring glibc
36527   # with a fresh cross-compiler works.
36528   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36529   # <limits.h> exists even on freestanding compilers.
36530   # On the NeXT, cc -E runs the code through the compiler's parser,
36531   # not just through cpp. "Syntax error" is here to catch this case.
36532   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36533 /* end confdefs.h.  */
36534 #ifdef __STDC__
36535 # include <limits.h>
36536 #else
36537 # include <assert.h>
36538 #endif
36539                      Syntax error
36540 _ACEOF
36541 if ac_fn_c_try_cpp "$LINENO"; then :
36542 
36543 else
36544   # Broken: fails on valid input.
36545 continue
36546 fi
36547 rm -f conftest.err conftest.i conftest.$ac_ext
36548 
36549   # OK, works on sane cases.  Now check whether nonexistent headers
36550   # can be detected and how.
36551   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36552 /* end confdefs.h.  */
36553 #include <ac_nonexistent.h>
36554 _ACEOF
36555 if ac_fn_c_try_cpp "$LINENO"; then :
36556   # Broken: success on invalid input.
36557 continue
36558 else
36559   # Passes both tests.
36560 ac_preproc_ok=:
36561 break
36562 fi
36563 rm -f conftest.err conftest.i conftest.$ac_ext
36564 
36565 done
36566 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36567 rm -f conftest.i conftest.err conftest.$ac_ext
36568 if $ac_preproc_ok; then :
36569 
36570 else
36571   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36572 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36573 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36574 See \`config.log' for more details" "$LINENO" 5; }
36575 fi
36576 
36577 ac_ext=cpp
36578 ac_cpp='$CXXCPP $CPPFLAGS'
36579 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36580 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36581 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36582 
36583 
36584   # Only process if variable expands to non-empty
36585 
36586   if test "x$CPP" != x; then
36587     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36588 
36589   # First separate the path from the arguments. This will split at the first
36590   # space.
36591   complete="$CPP"
36592   path="${complete%% *}"
36593   tmp="$complete EOL"
36594   arguments="${tmp#* }"
36595 
36596   # Input might be given as Windows format, start by converting to
36597   # unix format.
36598   new_path=`$CYGPATH -u "$path"`
36599 
36600   # Now try to locate executable using which
36601   new_path=`$WHICH "$new_path" 2> /dev/null`
36602   # bat and cmd files are not always considered executable in cygwin causing which
36603   # to not find them
36604   if test "x$new_path" = x \
36605       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36606       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36607     new_path=`$CYGPATH -u "$path"`
36608   fi
36609   if test "x$new_path" = x; then
36610     # Oops. Which didn't find the executable.
36611     # The splitting of arguments from the executable at a space might have been incorrect,
36612     # since paths with space are more likely in Windows. Give it another try with the whole
36613     # argument.
36614     path="$complete"
36615     arguments="EOL"
36616     new_path=`$CYGPATH -u "$path"`
36617     new_path=`$WHICH "$new_path" 2> /dev/null`
36618     # bat and cmd files are not always considered executable in cygwin causing which
36619     # to not find them
36620     if test "x$new_path" = x \
36621         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36622         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36623       new_path=`$CYGPATH -u "$path"`
36624     fi
36625     if test "x$new_path" = x; then
36626       # It's still not found. Now this is an unrecoverable error.
36627       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36628 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36629       has_space=`$ECHO "$complete" | $GREP " "`
36630       if test "x$has_space" != x; then
36631         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36632 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36633       fi
36634       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36635     fi
36636   fi
36637 
36638   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36639   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36640   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36641   # "foo.exe" is OK but "foo" is an error.
36642   #
36643   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36644   # It is also a way to make sure we got the proper file name for the real test later on.
36645   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36646   if test "x$test_shortpath" = x; then
36647     # Short path failed, file does not exist as specified.
36648     # Try adding .exe or .cmd
36649     if test -f "${new_path}.exe"; then
36650       input_to_shortpath="${new_path}.exe"
36651     elif test -f "${new_path}.cmd"; then
36652       input_to_shortpath="${new_path}.cmd"
36653     else
36654       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36655 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36656       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36657 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36658       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36659     fi
36660   else
36661     input_to_shortpath="$new_path"
36662   fi
36663 
36664   # Call helper function which possibly converts this using DOS-style short mode.
36665   # If so, the updated path is stored in $new_path.
36666   new_path="$input_to_shortpath"
36667 
36668   input_path="$input_to_shortpath"
36669   # Check if we need to convert this using DOS-style short mode. If the path
36670   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36671   # take no chances and rewrite it.
36672   # Note: m4 eats our [], so we need to use [ and ] instead.
36673   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36674   if test "x$has_forbidden_chars" != x; then
36675     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36676     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36677     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36678     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36679       # Going to short mode and back again did indeed matter. Since short mode is
36680       # case insensitive, let's make it lowercase to improve readability.
36681       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36682       # Now convert it back to Unix-style (cygpath)
36683       input_path=`$CYGPATH -u "$shortmode_path"`
36684       new_path="$input_path"
36685     fi
36686   fi
36687 
36688   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36689   if test "x$test_cygdrive_prefix" = x; then
36690     # As a simple fix, exclude /usr/bin since it's not a real path.
36691     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36692       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36693       # a path prefixed by /cygdrive for fixpath to work.
36694       new_path="$CYGWIN_ROOT_PATH$input_path"
36695     fi
36696   fi
36697 
36698   # remove trailing .exe if any
36699   new_path="${new_path/%.exe/}"
36700 
36701     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36702 
36703   # First separate the path from the arguments. This will split at the first
36704   # space.
36705   complete="$CPP"
36706   path="${complete%% *}"
36707   tmp="$complete EOL"
36708   arguments="${tmp#* }"
36709 
36710   # Input might be given as Windows format, start by converting to
36711   # unix format.
36712   new_path="$path"
36713 
36714   windows_path="$new_path"
36715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36716     unix_path=`$CYGPATH -u "$windows_path"`
36717     new_path="$unix_path"
36718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36720     new_path="$unix_path"
36721   fi
36722 
36723 
36724   # Now try to locate executable using which
36725   new_path=`$WHICH "$new_path" 2> /dev/null`
36726 
36727   if test "x$new_path" = x; then
36728     # Oops. Which didn't find the executable.
36729     # The splitting of arguments from the executable at a space might have been incorrect,
36730     # since paths with space are more likely in Windows. Give it another try with the whole
36731     # argument.
36732     path="$complete"
36733     arguments="EOL"
36734     new_path="$path"
36735 
36736   windows_path="$new_path"
36737   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36738     unix_path=`$CYGPATH -u "$windows_path"`
36739     new_path="$unix_path"
36740   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36741     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36742     new_path="$unix_path"
36743   fi
36744 
36745 
36746     new_path=`$WHICH "$new_path" 2> /dev/null`
36747     # bat and cmd files are not always considered executable in MSYS causing which
36748     # to not find them
36749     if test "x$new_path" = x \
36750         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36751         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36752       new_path="$path"
36753 
36754   windows_path="$new_path"
36755   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36756     unix_path=`$CYGPATH -u "$windows_path"`
36757     new_path="$unix_path"
36758   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36759     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36760     new_path="$unix_path"
36761   fi
36762 
36763     fi
36764 
36765     if test "x$new_path" = x; then
36766       # It's still not found. Now this is an unrecoverable error.
36767       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36768 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36769       has_space=`$ECHO "$complete" | $GREP " "`
36770       if test "x$has_space" != x; then
36771         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36772 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36773       fi
36774       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36775     fi
36776   fi
36777 
36778   # Now new_path has a complete unix path to the binary
36779   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36780     # Keep paths in /bin as-is, but remove trailing .exe if any
36781     new_path="${new_path/%.exe/}"
36782     # Do not save /bin paths to all_fixpath_prefixes!
36783   else
36784     # Not in mixed or Windows style, start by that.
36785     new_path=`cmd //c echo $new_path`
36786 
36787   input_path="$new_path"
36788   # Check if we need to convert this using DOS-style short mode. If the path
36789   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36790   # take no chances and rewrite it.
36791   # Note: m4 eats our [], so we need to use [ and ] instead.
36792   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36793   if test "x$has_forbidden_chars" != x; then
36794     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36795     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36796   fi
36797 
36798     # Output is in $new_path
36799 
36800   windows_path="$new_path"
36801   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36802     unix_path=`$CYGPATH -u "$windows_path"`
36803     new_path="$unix_path"
36804   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36805     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36806     new_path="$unix_path"
36807   fi
36808 
36809     # remove trailing .exe if any
36810     new_path="${new_path/%.exe/}"
36811 
36812     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36813     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36814   fi
36815 
36816     else
36817       # We're on a unix platform. Hooray! :)
36818       # First separate the path from the arguments. This will split at the first
36819       # space.
36820       complete="$CPP"
36821       path="${complete%% *}"
36822       tmp="$complete EOL"
36823       arguments="${tmp#* }"
36824 
36825       # Cannot rely on the command "which" here since it doesn't always work.
36826       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36827       if test -z "$is_absolute_path"; then
36828         # Path to executable is not absolute. Find it.
36829         IFS_save="$IFS"
36830         IFS=:
36831         for p in $PATH; do
36832           if test -f "$p/$path" && test -x "$p/$path"; then
36833             new_path="$p/$path"
36834             break
36835           fi
36836         done
36837         IFS="$IFS_save"
36838       else
36839         # This is an absolute path, we can use it without further modifications.
36840         new_path="$path"
36841       fi
36842 
36843       if test "x$new_path" = x; then
36844         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36845 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36846         has_space=`$ECHO "$complete" | $GREP " "`
36847         if test "x$has_space" != x; then
36848           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36849 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36850         fi
36851         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36852       fi
36853     fi
36854 
36855     # Now join together the path and the arguments once again
36856     if test "x$arguments" != xEOL; then
36857       new_complete="$new_path ${arguments% *}"
36858     else
36859       new_complete="$new_path"
36860     fi
36861 
36862     if test "x$complete" != "x$new_complete"; then
36863       CPP="$new_complete"
36864       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36865 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36866     fi
36867   fi
36868 
36869   ac_ext=cpp
36870 ac_cpp='$CXXCPP $CPPFLAGS'
36871 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36872 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36873 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36875 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36876 if test -z "$CXXCPP"; then
36877   if ${ac_cv_prog_CXXCPP+:} false; then :
36878   $as_echo_n "(cached) " >&6
36879 else
36880       # Double quotes because CXXCPP needs to be expanded
36881     for CXXCPP in "$CXX -E" "/lib/cpp"
36882     do
36883       ac_preproc_ok=false
36884 for ac_cxx_preproc_warn_flag in '' yes
36885 do
36886   # Use a header file that comes with gcc, so configuring glibc
36887   # with a fresh cross-compiler works.
36888   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36889   # <limits.h> exists even on freestanding compilers.
36890   # On the NeXT, cc -E runs the code through the compiler's parser,
36891   # not just through cpp. "Syntax error" is here to catch this case.
36892   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36893 /* end confdefs.h.  */
36894 #ifdef __STDC__
36895 # include <limits.h>
36896 #else
36897 # include <assert.h>
36898 #endif
36899                      Syntax error
36900 _ACEOF
36901 if ac_fn_cxx_try_cpp "$LINENO"; then :
36902 
36903 else
36904   # Broken: fails on valid input.
36905 continue
36906 fi
36907 rm -f conftest.err conftest.i conftest.$ac_ext
36908 
36909   # OK, works on sane cases.  Now check whether nonexistent headers
36910   # can be detected and how.
36911   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36912 /* end confdefs.h.  */
36913 #include <ac_nonexistent.h>
36914 _ACEOF
36915 if ac_fn_cxx_try_cpp "$LINENO"; then :
36916   # Broken: success on invalid input.
36917 continue
36918 else
36919   # Passes both tests.
36920 ac_preproc_ok=:
36921 break
36922 fi
36923 rm -f conftest.err conftest.i conftest.$ac_ext
36924 
36925 done
36926 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36927 rm -f conftest.i conftest.err conftest.$ac_ext
36928 if $ac_preproc_ok; then :
36929   break
36930 fi
36931 
36932     done
36933     ac_cv_prog_CXXCPP=$CXXCPP
36934 
36935 fi
36936   CXXCPP=$ac_cv_prog_CXXCPP
36937 else
36938   ac_cv_prog_CXXCPP=$CXXCPP
36939 fi
36940 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36941 $as_echo "$CXXCPP" >&6; }
36942 ac_preproc_ok=false
36943 for ac_cxx_preproc_warn_flag in '' yes
36944 do
36945   # Use a header file that comes with gcc, so configuring glibc
36946   # with a fresh cross-compiler works.
36947   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36948   # <limits.h> exists even on freestanding compilers.
36949   # On the NeXT, cc -E runs the code through the compiler's parser,
36950   # not just through cpp. "Syntax error" is here to catch this case.
36951   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36952 /* end confdefs.h.  */
36953 #ifdef __STDC__
36954 # include <limits.h>
36955 #else
36956 # include <assert.h>
36957 #endif
36958                      Syntax error
36959 _ACEOF
36960 if ac_fn_cxx_try_cpp "$LINENO"; then :
36961 
36962 else
36963   # Broken: fails on valid input.
36964 continue
36965 fi
36966 rm -f conftest.err conftest.i conftest.$ac_ext
36967 
36968   # OK, works on sane cases.  Now check whether nonexistent headers
36969   # can be detected and how.
36970   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36971 /* end confdefs.h.  */
36972 #include <ac_nonexistent.h>
36973 _ACEOF
36974 if ac_fn_cxx_try_cpp "$LINENO"; then :
36975   # Broken: success on invalid input.
36976 continue
36977 else
36978   # Passes both tests.
36979 ac_preproc_ok=:
36980 break
36981 fi
36982 rm -f conftest.err conftest.i conftest.$ac_ext
36983 
36984 done
36985 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36986 rm -f conftest.i conftest.err conftest.$ac_ext
36987 if $ac_preproc_ok; then :
36988 
36989 else
36990   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36991 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36992 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36993 See \`config.log' for more details" "$LINENO" 5; }
36994 fi
36995 
36996 ac_ext=cpp
36997 ac_cpp='$CXXCPP $CPPFLAGS'
36998 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36999 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
37000 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
37001 
37002 
37003   # Only process if variable expands to non-empty
37004 
37005   if test "x$CXXCPP" != x; then
37006     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37007 
37008   # First separate the path from the arguments. This will split at the first
37009   # space.
37010   complete="$CXXCPP"
37011   path="${complete%% *}"
37012   tmp="$complete EOL"
37013   arguments="${tmp#* }"
37014 
37015   # Input might be given as Windows format, start by converting to
37016   # unix format.
37017   new_path=`$CYGPATH -u "$path"`
37018 
37019   # Now try to locate executable using which
37020   new_path=`$WHICH "$new_path" 2> /dev/null`
37021   # bat and cmd files are not always considered executable in cygwin causing which
37022   # to not find them
37023   if test "x$new_path" = x \
37024       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37025       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37026     new_path=`$CYGPATH -u "$path"`
37027   fi
37028   if test "x$new_path" = x; then
37029     # Oops. Which didn't find the executable.
37030     # The splitting of arguments from the executable at a space might have been incorrect,
37031     # since paths with space are more likely in Windows. Give it another try with the whole
37032     # argument.
37033     path="$complete"
37034     arguments="EOL"
37035     new_path=`$CYGPATH -u "$path"`
37036     new_path=`$WHICH "$new_path" 2> /dev/null`
37037     # bat and cmd files are not always considered executable in cygwin causing which
37038     # to not find them
37039     if test "x$new_path" = x \
37040         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37041         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37042       new_path=`$CYGPATH -u "$path"`
37043     fi
37044     if test "x$new_path" = x; then
37045       # It's still not found. Now this is an unrecoverable error.
37046       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37047 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37048       has_space=`$ECHO "$complete" | $GREP " "`
37049       if test "x$has_space" != x; then
37050         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37051 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37052       fi
37053       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37054     fi
37055   fi
37056 
37057   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37058   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37059   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37060   # "foo.exe" is OK but "foo" is an error.
37061   #
37062   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37063   # It is also a way to make sure we got the proper file name for the real test later on.
37064   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37065   if test "x$test_shortpath" = x; then
37066     # Short path failed, file does not exist as specified.
37067     # Try adding .exe or .cmd
37068     if test -f "${new_path}.exe"; then
37069       input_to_shortpath="${new_path}.exe"
37070     elif test -f "${new_path}.cmd"; then
37071       input_to_shortpath="${new_path}.cmd"
37072     else
37073       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
37074 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
37075       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37076 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37077       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37078     fi
37079   else
37080     input_to_shortpath="$new_path"
37081   fi
37082 
37083   # Call helper function which possibly converts this using DOS-style short mode.
37084   # If so, the updated path is stored in $new_path.
37085   new_path="$input_to_shortpath"
37086 
37087   input_path="$input_to_shortpath"
37088   # Check if we need to convert this using DOS-style short mode. If the path
37089   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37090   # take no chances and rewrite it.
37091   # Note: m4 eats our [], so we need to use [ and ] instead.
37092   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37093   if test "x$has_forbidden_chars" != x; then
37094     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37095     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37096     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37097     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37098       # Going to short mode and back again did indeed matter. Since short mode is
37099       # case insensitive, let's make it lowercase to improve readability.
37100       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37101       # Now convert it back to Unix-style (cygpath)
37102       input_path=`$CYGPATH -u "$shortmode_path"`
37103       new_path="$input_path"
37104     fi
37105   fi
37106 
37107   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37108   if test "x$test_cygdrive_prefix" = x; then
37109     # As a simple fix, exclude /usr/bin since it's not a real path.
37110     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37111       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37112       # a path prefixed by /cygdrive for fixpath to work.
37113       new_path="$CYGWIN_ROOT_PATH$input_path"
37114     fi
37115   fi
37116 
37117   # remove trailing .exe if any
37118   new_path="${new_path/%.exe/}"
37119 
37120     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37121 
37122   # First separate the path from the arguments. This will split at the first
37123   # space.
37124   complete="$CXXCPP"
37125   path="${complete%% *}"
37126   tmp="$complete EOL"
37127   arguments="${tmp#* }"
37128 
37129   # Input might be given as Windows format, start by converting to
37130   # unix format.
37131   new_path="$path"
37132 
37133   windows_path="$new_path"
37134   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37135     unix_path=`$CYGPATH -u "$windows_path"`
37136     new_path="$unix_path"
37137   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37138     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37139     new_path="$unix_path"
37140   fi
37141 
37142 
37143   # Now try to locate executable using which
37144   new_path=`$WHICH "$new_path" 2> /dev/null`
37145 
37146   if test "x$new_path" = x; then
37147     # Oops. Which didn't find the executable.
37148     # The splitting of arguments from the executable at a space might have been incorrect,
37149     # since paths with space are more likely in Windows. Give it another try with the whole
37150     # argument.
37151     path="$complete"
37152     arguments="EOL"
37153     new_path="$path"
37154 
37155   windows_path="$new_path"
37156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37157     unix_path=`$CYGPATH -u "$windows_path"`
37158     new_path="$unix_path"
37159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37161     new_path="$unix_path"
37162   fi
37163 
37164 
37165     new_path=`$WHICH "$new_path" 2> /dev/null`
37166     # bat and cmd files are not always considered executable in MSYS causing which
37167     # to not find them
37168     if test "x$new_path" = x \
37169         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37170         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37171       new_path="$path"
37172 
37173   windows_path="$new_path"
37174   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37175     unix_path=`$CYGPATH -u "$windows_path"`
37176     new_path="$unix_path"
37177   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37178     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37179     new_path="$unix_path"
37180   fi
37181 
37182     fi
37183 
37184     if test "x$new_path" = x; then
37185       # It's still not found. Now this is an unrecoverable error.
37186       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37187 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37188       has_space=`$ECHO "$complete" | $GREP " "`
37189       if test "x$has_space" != x; then
37190         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37191 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37192       fi
37193       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37194     fi
37195   fi
37196 
37197   # Now new_path has a complete unix path to the binary
37198   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37199     # Keep paths in /bin as-is, but remove trailing .exe if any
37200     new_path="${new_path/%.exe/}"
37201     # Do not save /bin paths to all_fixpath_prefixes!
37202   else
37203     # Not in mixed or Windows style, start by that.
37204     new_path=`cmd //c echo $new_path`
37205 
37206   input_path="$new_path"
37207   # Check if we need to convert this using DOS-style short mode. If the path
37208   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37209   # take no chances and rewrite it.
37210   # Note: m4 eats our [], so we need to use [ and ] instead.
37211   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37212   if test "x$has_forbidden_chars" != x; then
37213     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37214     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37215   fi
37216 
37217     # Output is in $new_path
37218 
37219   windows_path="$new_path"
37220   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37221     unix_path=`$CYGPATH -u "$windows_path"`
37222     new_path="$unix_path"
37223   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37224     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37225     new_path="$unix_path"
37226   fi
37227 
37228     # remove trailing .exe if any
37229     new_path="${new_path/%.exe/}"
37230 
37231     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37232     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37233   fi
37234 
37235     else
37236       # We're on a unix platform. Hooray! :)
37237       # First separate the path from the arguments. This will split at the first
37238       # space.
37239       complete="$CXXCPP"
37240       path="${complete%% *}"
37241       tmp="$complete EOL"
37242       arguments="${tmp#* }"
37243 
37244       # Cannot rely on the command "which" here since it doesn't always work.
37245       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37246       if test -z "$is_absolute_path"; then
37247         # Path to executable is not absolute. Find it.
37248         IFS_save="$IFS"
37249         IFS=:
37250         for p in $PATH; do
37251           if test -f "$p/$path" && test -x "$p/$path"; then
37252             new_path="$p/$path"
37253             break
37254           fi
37255         done
37256         IFS="$IFS_save"
37257       else
37258         # This is an absolute path, we can use it without further modifications.
37259         new_path="$path"
37260       fi
37261 
37262       if test "x$new_path" = x; then
37263         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37264 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37265         has_space=`$ECHO "$complete" | $GREP " "`
37266         if test "x$has_space" != x; then
37267           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37268 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37269         fi
37270         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37271       fi
37272     fi
37273 
37274     # Now join together the path and the arguments once again
37275     if test "x$arguments" != xEOL; then
37276       new_complete="$new_path ${arguments% *}"
37277     else
37278       new_complete="$new_path"
37279     fi
37280 
37281     if test "x$complete" != "x$new_complete"; then
37282       CXXCPP="$new_complete"
37283       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37284 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37285     fi
37286   fi
37287 
37288 
37289   #
37290   # Setup the linker (LD)
37291   #
37292   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37293     # In the Microsoft toolchain we have a separate LD command "link".
37294     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37295     # a cygwin program for something completely different.
37296     # Extract the first word of "link", so it can be a program name with args.
37297 set dummy link; ac_word=$2
37298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37299 $as_echo_n "checking for $ac_word... " >&6; }
37300 if ${ac_cv_prog_LD+:} false; then :
37301   $as_echo_n "(cached) " >&6
37302 else
37303   if test -n "$LD"; then
37304   ac_cv_prog_LD="$LD" # Let the user override the test.
37305 else
37306   ac_prog_rejected=no
37307 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37308 for as_dir in $PATH
37309 do
37310   IFS=$as_save_IFS
37311   test -z "$as_dir" && as_dir=.
37312     for ac_exec_ext in '' $ac_executable_extensions; do
37313   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37314     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37315        ac_prog_rejected=yes
37316        continue
37317      fi
37318     ac_cv_prog_LD="link"
37319     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37320     break 2
37321   fi
37322 done
37323   done
37324 IFS=$as_save_IFS
37325 
37326 if test $ac_prog_rejected = yes; then
37327   # We found a bogon in the path, so make sure we never use it.
37328   set dummy $ac_cv_prog_LD
37329   shift
37330   if test $# != 0; then
37331     # We chose a different compiler from the bogus one.
37332     # However, it has the same basename, so the bogon will be chosen
37333     # first if we set LD to just the basename; use the full file name.
37334     shift
37335     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37336   fi
37337 fi
37338 fi
37339 fi
37340 LD=$ac_cv_prog_LD
37341 if test -n "$LD"; then
37342   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37343 $as_echo "$LD" >&6; }
37344 else
37345   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37346 $as_echo "no" >&6; }
37347 fi
37348 
37349 
37350 
37351   # Only process if variable expands to non-empty
37352 
37353   if test "x$LD" != x; then
37354     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37355 
37356   # First separate the path from the arguments. This will split at the first
37357   # space.
37358   complete="$LD"
37359   path="${complete%% *}"
37360   tmp="$complete EOL"
37361   arguments="${tmp#* }"
37362 
37363   # Input might be given as Windows format, start by converting to
37364   # unix format.
37365   new_path=`$CYGPATH -u "$path"`
37366 
37367   # Now try to locate executable using which
37368   new_path=`$WHICH "$new_path" 2> /dev/null`
37369   # bat and cmd files are not always considered executable in cygwin causing which
37370   # to not find them
37371   if test "x$new_path" = x \
37372       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37373       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37374     new_path=`$CYGPATH -u "$path"`
37375   fi
37376   if test "x$new_path" = x; then
37377     # Oops. Which didn't find the executable.
37378     # The splitting of arguments from the executable at a space might have been incorrect,
37379     # since paths with space are more likely in Windows. Give it another try with the whole
37380     # argument.
37381     path="$complete"
37382     arguments="EOL"
37383     new_path=`$CYGPATH -u "$path"`
37384     new_path=`$WHICH "$new_path" 2> /dev/null`
37385     # bat and cmd files are not always considered executable in cygwin causing which
37386     # to not find them
37387     if test "x$new_path" = x \
37388         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37389         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37390       new_path=`$CYGPATH -u "$path"`
37391     fi
37392     if test "x$new_path" = x; then
37393       # It's still not found. Now this is an unrecoverable error.
37394       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37395 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37396       has_space=`$ECHO "$complete" | $GREP " "`
37397       if test "x$has_space" != x; then
37398         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37399 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37400       fi
37401       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37402     fi
37403   fi
37404 
37405   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37406   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37407   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37408   # "foo.exe" is OK but "foo" is an error.
37409   #
37410   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37411   # It is also a way to make sure we got the proper file name for the real test later on.
37412   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37413   if test "x$test_shortpath" = x; then
37414     # Short path failed, file does not exist as specified.
37415     # Try adding .exe or .cmd
37416     if test -f "${new_path}.exe"; then
37417       input_to_shortpath="${new_path}.exe"
37418     elif test -f "${new_path}.cmd"; then
37419       input_to_shortpath="${new_path}.cmd"
37420     else
37421       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37422 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37423       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37424 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37425       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37426     fi
37427   else
37428     input_to_shortpath="$new_path"
37429   fi
37430 
37431   # Call helper function which possibly converts this using DOS-style short mode.
37432   # If so, the updated path is stored in $new_path.
37433   new_path="$input_to_shortpath"
37434 
37435   input_path="$input_to_shortpath"
37436   # Check if we need to convert this using DOS-style short mode. If the path
37437   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37438   # take no chances and rewrite it.
37439   # Note: m4 eats our [], so we need to use [ and ] instead.
37440   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37441   if test "x$has_forbidden_chars" != x; then
37442     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37443     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37444     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37445     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37446       # Going to short mode and back again did indeed matter. Since short mode is
37447       # case insensitive, let's make it lowercase to improve readability.
37448       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37449       # Now convert it back to Unix-style (cygpath)
37450       input_path=`$CYGPATH -u "$shortmode_path"`
37451       new_path="$input_path"
37452     fi
37453   fi
37454 
37455   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37456   if test "x$test_cygdrive_prefix" = x; then
37457     # As a simple fix, exclude /usr/bin since it's not a real path.
37458     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37459       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37460       # a path prefixed by /cygdrive for fixpath to work.
37461       new_path="$CYGWIN_ROOT_PATH$input_path"
37462     fi
37463   fi
37464 
37465   # remove trailing .exe if any
37466   new_path="${new_path/%.exe/}"
37467 
37468     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37469 
37470   # First separate the path from the arguments. This will split at the first
37471   # space.
37472   complete="$LD"
37473   path="${complete%% *}"
37474   tmp="$complete EOL"
37475   arguments="${tmp#* }"
37476 
37477   # Input might be given as Windows format, start by converting to
37478   # unix format.
37479   new_path="$path"
37480 
37481   windows_path="$new_path"
37482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37483     unix_path=`$CYGPATH -u "$windows_path"`
37484     new_path="$unix_path"
37485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37487     new_path="$unix_path"
37488   fi
37489 
37490 
37491   # Now try to locate executable using which
37492   new_path=`$WHICH "$new_path" 2> /dev/null`
37493 
37494   if test "x$new_path" = x; then
37495     # Oops. Which didn't find the executable.
37496     # The splitting of arguments from the executable at a space might have been incorrect,
37497     # since paths with space are more likely in Windows. Give it another try with the whole
37498     # argument.
37499     path="$complete"
37500     arguments="EOL"
37501     new_path="$path"
37502 
37503   windows_path="$new_path"
37504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37505     unix_path=`$CYGPATH -u "$windows_path"`
37506     new_path="$unix_path"
37507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37509     new_path="$unix_path"
37510   fi
37511 
37512 
37513     new_path=`$WHICH "$new_path" 2> /dev/null`
37514     # bat and cmd files are not always considered executable in MSYS causing which
37515     # to not find them
37516     if test "x$new_path" = x \
37517         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37518         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37519       new_path="$path"
37520 
37521   windows_path="$new_path"
37522   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37523     unix_path=`$CYGPATH -u "$windows_path"`
37524     new_path="$unix_path"
37525   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37526     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37527     new_path="$unix_path"
37528   fi
37529 
37530     fi
37531 
37532     if test "x$new_path" = x; then
37533       # It's still not found. Now this is an unrecoverable error.
37534       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37535 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37536       has_space=`$ECHO "$complete" | $GREP " "`
37537       if test "x$has_space" != x; then
37538         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37539 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37540       fi
37541       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37542     fi
37543   fi
37544 
37545   # Now new_path has a complete unix path to the binary
37546   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37547     # Keep paths in /bin as-is, but remove trailing .exe if any
37548     new_path="${new_path/%.exe/}"
37549     # Do not save /bin paths to all_fixpath_prefixes!
37550   else
37551     # Not in mixed or Windows style, start by that.
37552     new_path=`cmd //c echo $new_path`
37553 
37554   input_path="$new_path"
37555   # Check if we need to convert this using DOS-style short mode. If the path
37556   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37557   # take no chances and rewrite it.
37558   # Note: m4 eats our [], so we need to use [ and ] instead.
37559   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37560   if test "x$has_forbidden_chars" != x; then
37561     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37562     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37563   fi
37564 
37565     # Output is in $new_path
37566 
37567   windows_path="$new_path"
37568   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37569     unix_path=`$CYGPATH -u "$windows_path"`
37570     new_path="$unix_path"
37571   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37572     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37573     new_path="$unix_path"
37574   fi
37575 
37576     # remove trailing .exe if any
37577     new_path="${new_path/%.exe/}"
37578 
37579     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37580     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37581   fi
37582 
37583     else
37584       # We're on a unix platform. Hooray! :)
37585       # First separate the path from the arguments. This will split at the first
37586       # space.
37587       complete="$LD"
37588       path="${complete%% *}"
37589       tmp="$complete EOL"
37590       arguments="${tmp#* }"
37591 
37592       # Cannot rely on the command "which" here since it doesn't always work.
37593       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37594       if test -z "$is_absolute_path"; then
37595         # Path to executable is not absolute. Find it.
37596         IFS_save="$IFS"
37597         IFS=:
37598         for p in $PATH; do
37599           if test -f "$p/$path" && test -x "$p/$path"; then
37600             new_path="$p/$path"
37601             break
37602           fi
37603         done
37604         IFS="$IFS_save"
37605       else
37606         # This is an absolute path, we can use it without further modifications.
37607         new_path="$path"
37608       fi
37609 
37610       if test "x$new_path" = x; then
37611         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37612 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37613         has_space=`$ECHO "$complete" | $GREP " "`
37614         if test "x$has_space" != x; then
37615           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37616 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37617         fi
37618         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37619       fi
37620     fi
37621 
37622     # Now join together the path and the arguments once again
37623     if test "x$arguments" != xEOL; then
37624       new_complete="$new_path ${arguments% *}"
37625     else
37626       new_complete="$new_path"
37627     fi
37628 
37629     if test "x$complete" != "x$new_complete"; then
37630       LD="$new_complete"
37631       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37632 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37633     fi
37634   fi
37635 
37636     # Verify that we indeed succeeded with this trick.
37637     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37638 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37639     "$LD" --version > /dev/null
37640     if test $? -eq 0 ; then
37641       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37642 $as_echo "no" >&6; }
37643       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37644     else
37645       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37646 $as_echo "yes" >&6; }
37647     fi
37648     LDCXX="$LD"
37649   else
37650     # All other toolchains use the compiler to link.
37651     LD="$CC"
37652     LDCXX="$CXX"
37653   fi
37654 
37655   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37656 
37657 
37658   #
37659   # Setup the assembler (AS)
37660   #
37661   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37662 
37663 
37664   # Publish this variable in the help.
37665 
37666 
37667   if [ -z "${AS+x}" ]; then
37668     # The variable is not set by user, try to locate tool using the code snippet
37669     for ac_prog in as
37670 do
37671   # Extract the first word of "$ac_prog", so it can be a program name with args.
37672 set dummy $ac_prog; ac_word=$2
37673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37674 $as_echo_n "checking for $ac_word... " >&6; }
37675 if ${ac_cv_path_AS+:} false; then :
37676   $as_echo_n "(cached) " >&6
37677 else
37678   case $AS in
37679   [\\/]* | ?:[\\/]*)
37680   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37681   ;;
37682   *)
37683   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37684 for as_dir in $PATH
37685 do
37686   IFS=$as_save_IFS
37687   test -z "$as_dir" && as_dir=.
37688     for ac_exec_ext in '' $ac_executable_extensions; do
37689   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37690     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37691     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37692     break 2
37693   fi
37694 done
37695   done
37696 IFS=$as_save_IFS
37697 
37698   ;;
37699 esac
37700 fi
37701 AS=$ac_cv_path_AS
37702 if test -n "$AS"; then
37703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37704 $as_echo "$AS" >&6; }
37705 else
37706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37707 $as_echo "no" >&6; }
37708 fi
37709 
37710 
37711   test -n "$AS" && break
37712 done
37713 
37714   else
37715     # The variable is set, but is it from the command line or the environment?
37716 
37717     # Try to remove the string !AS! from our list.
37718     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37719     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37720       # If it failed, the variable was not from the command line. Ignore it,
37721       # but warn the user (except for BASH, which is always set by the calling BASH).
37722       if test "xAS" != xBASH; then
37723         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37724 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37725       fi
37726       # Try to locate tool using the code snippet
37727       for ac_prog in as
37728 do
37729   # Extract the first word of "$ac_prog", so it can be a program name with args.
37730 set dummy $ac_prog; ac_word=$2
37731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37732 $as_echo_n "checking for $ac_word... " >&6; }
37733 if ${ac_cv_path_AS+:} false; then :
37734   $as_echo_n "(cached) " >&6
37735 else
37736   case $AS in
37737   [\\/]* | ?:[\\/]*)
37738   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37739   ;;
37740   *)
37741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37742 for as_dir in $PATH
37743 do
37744   IFS=$as_save_IFS
37745   test -z "$as_dir" && as_dir=.
37746     for ac_exec_ext in '' $ac_executable_extensions; do
37747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37748     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37750     break 2
37751   fi
37752 done
37753   done
37754 IFS=$as_save_IFS
37755 
37756   ;;
37757 esac
37758 fi
37759 AS=$ac_cv_path_AS
37760 if test -n "$AS"; then
37761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37762 $as_echo "$AS" >&6; }
37763 else
37764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37765 $as_echo "no" >&6; }
37766 fi
37767 
37768 
37769   test -n "$AS" && break
37770 done
37771 
37772     else
37773       # If it succeeded, then it was overridden by the user. We will use it
37774       # for the tool.
37775 
37776       # First remove it from the list of overridden variables, so we can test
37777       # for unknown variables in the end.
37778       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37779 
37780       # Check if we try to supply an empty value
37781       if test "x$AS" = x; then
37782         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37783 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37784         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37785 $as_echo_n "checking for AS... " >&6; }
37786         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37787 $as_echo "disabled" >&6; }
37788       else
37789         # Check if the provided tool contains a complete path.
37790         tool_specified="$AS"
37791         tool_basename="${tool_specified##*/}"
37792         if test "x$tool_basename" = "x$tool_specified"; then
37793           # A command without a complete path is provided, search $PATH.
37794           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37795 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37796           # Extract the first word of "$tool_basename", so it can be a program name with args.
37797 set dummy $tool_basename; ac_word=$2
37798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37799 $as_echo_n "checking for $ac_word... " >&6; }
37800 if ${ac_cv_path_AS+:} false; then :
37801   $as_echo_n "(cached) " >&6
37802 else
37803   case $AS in
37804   [\\/]* | ?:[\\/]*)
37805   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37806   ;;
37807   *)
37808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37809 for as_dir in $PATH
37810 do
37811   IFS=$as_save_IFS
37812   test -z "$as_dir" && as_dir=.
37813     for ac_exec_ext in '' $ac_executable_extensions; do
37814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37815     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37817     break 2
37818   fi
37819 done
37820   done
37821 IFS=$as_save_IFS
37822 
37823   ;;
37824 esac
37825 fi
37826 AS=$ac_cv_path_AS
37827 if test -n "$AS"; then
37828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37829 $as_echo "$AS" >&6; }
37830 else
37831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37832 $as_echo "no" >&6; }
37833 fi
37834 
37835 
37836           if test "x$AS" = x; then
37837             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37838           fi
37839         else
37840           # Otherwise we believe it is a complete path. Use it as it is.
37841           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37842 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37843           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37844 $as_echo_n "checking for AS... " >&6; }
37845           if test ! -x "$tool_specified"; then
37846             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37847 $as_echo "not found" >&6; }
37848             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37849           fi
37850           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37851 $as_echo "$tool_specified" >&6; }
37852         fi
37853       fi
37854     fi
37855 
37856   fi
37857 
37858 
37859 
37860   # Only process if variable expands to non-empty
37861 
37862   if test "x$AS" != x; then
37863     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37864 
37865   # First separate the path from the arguments. This will split at the first
37866   # space.
37867   complete="$AS"
37868   path="${complete%% *}"
37869   tmp="$complete EOL"
37870   arguments="${tmp#* }"
37871 
37872   # Input might be given as Windows format, start by converting to
37873   # unix format.
37874   new_path=`$CYGPATH -u "$path"`
37875 
37876   # Now try to locate executable using which
37877   new_path=`$WHICH "$new_path" 2> /dev/null`
37878   # bat and cmd files are not always considered executable in cygwin causing which
37879   # to not find them
37880   if test "x$new_path" = x \
37881       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37882       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37883     new_path=`$CYGPATH -u "$path"`
37884   fi
37885   if test "x$new_path" = x; then
37886     # Oops. Which didn't find the executable.
37887     # The splitting of arguments from the executable at a space might have been incorrect,
37888     # since paths with space are more likely in Windows. Give it another try with the whole
37889     # argument.
37890     path="$complete"
37891     arguments="EOL"
37892     new_path=`$CYGPATH -u "$path"`
37893     new_path=`$WHICH "$new_path" 2> /dev/null`
37894     # bat and cmd files are not always considered executable in cygwin causing which
37895     # to not find them
37896     if test "x$new_path" = x \
37897         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37898         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37899       new_path=`$CYGPATH -u "$path"`
37900     fi
37901     if test "x$new_path" = x; then
37902       # It's still not found. Now this is an unrecoverable error.
37903       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37904 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37905       has_space=`$ECHO "$complete" | $GREP " "`
37906       if test "x$has_space" != x; then
37907         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37908 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37909       fi
37910       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37911     fi
37912   fi
37913 
37914   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37915   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37916   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37917   # "foo.exe" is OK but "foo" is an error.
37918   #
37919   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37920   # It is also a way to make sure we got the proper file name for the real test later on.
37921   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37922   if test "x$test_shortpath" = x; then
37923     # Short path failed, file does not exist as specified.
37924     # Try adding .exe or .cmd
37925     if test -f "${new_path}.exe"; then
37926       input_to_shortpath="${new_path}.exe"
37927     elif test -f "${new_path}.cmd"; then
37928       input_to_shortpath="${new_path}.cmd"
37929     else
37930       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37931 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37932       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37933 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37934       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37935     fi
37936   else
37937     input_to_shortpath="$new_path"
37938   fi
37939 
37940   # Call helper function which possibly converts this using DOS-style short mode.
37941   # If so, the updated path is stored in $new_path.
37942   new_path="$input_to_shortpath"
37943 
37944   input_path="$input_to_shortpath"
37945   # Check if we need to convert this using DOS-style short mode. If the path
37946   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37947   # take no chances and rewrite it.
37948   # Note: m4 eats our [], so we need to use [ and ] instead.
37949   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37950   if test "x$has_forbidden_chars" != x; then
37951     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37952     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37953     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37954     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37955       # Going to short mode and back again did indeed matter. Since short mode is
37956       # case insensitive, let's make it lowercase to improve readability.
37957       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37958       # Now convert it back to Unix-style (cygpath)
37959       input_path=`$CYGPATH -u "$shortmode_path"`
37960       new_path="$input_path"
37961     fi
37962   fi
37963 
37964   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37965   if test "x$test_cygdrive_prefix" = x; then
37966     # As a simple fix, exclude /usr/bin since it's not a real path.
37967     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37968       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37969       # a path prefixed by /cygdrive for fixpath to work.
37970       new_path="$CYGWIN_ROOT_PATH$input_path"
37971     fi
37972   fi
37973 
37974   # remove trailing .exe if any
37975   new_path="${new_path/%.exe/}"
37976 
37977     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37978 
37979   # First separate the path from the arguments. This will split at the first
37980   # space.
37981   complete="$AS"
37982   path="${complete%% *}"
37983   tmp="$complete EOL"
37984   arguments="${tmp#* }"
37985 
37986   # Input might be given as Windows format, start by converting to
37987   # unix format.
37988   new_path="$path"
37989 
37990   windows_path="$new_path"
37991   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37992     unix_path=`$CYGPATH -u "$windows_path"`
37993     new_path="$unix_path"
37994   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37995     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37996     new_path="$unix_path"
37997   fi
37998 
37999 
38000   # Now try to locate executable using which
38001   new_path=`$WHICH "$new_path" 2> /dev/null`
38002 
38003   if test "x$new_path" = x; then
38004     # Oops. Which didn't find the executable.
38005     # The splitting of arguments from the executable at a space might have been incorrect,
38006     # since paths with space are more likely in Windows. Give it another try with the whole
38007     # argument.
38008     path="$complete"
38009     arguments="EOL"
38010     new_path="$path"
38011 
38012   windows_path="$new_path"
38013   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38014     unix_path=`$CYGPATH -u "$windows_path"`
38015     new_path="$unix_path"
38016   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38017     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38018     new_path="$unix_path"
38019   fi
38020 
38021 
38022     new_path=`$WHICH "$new_path" 2> /dev/null`
38023     # bat and cmd files are not always considered executable in MSYS causing which
38024     # to not find them
38025     if test "x$new_path" = x \
38026         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38027         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38028       new_path="$path"
38029 
38030   windows_path="$new_path"
38031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38032     unix_path=`$CYGPATH -u "$windows_path"`
38033     new_path="$unix_path"
38034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38036     new_path="$unix_path"
38037   fi
38038 
38039     fi
38040 
38041     if test "x$new_path" = x; then
38042       # It's still not found. Now this is an unrecoverable error.
38043       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38044 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38045       has_space=`$ECHO "$complete" | $GREP " "`
38046       if test "x$has_space" != x; then
38047         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38048 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38049       fi
38050       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38051     fi
38052   fi
38053 
38054   # Now new_path has a complete unix path to the binary
38055   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38056     # Keep paths in /bin as-is, but remove trailing .exe if any
38057     new_path="${new_path/%.exe/}"
38058     # Do not save /bin paths to all_fixpath_prefixes!
38059   else
38060     # Not in mixed or Windows style, start by that.
38061     new_path=`cmd //c echo $new_path`
38062 
38063   input_path="$new_path"
38064   # Check if we need to convert this using DOS-style short mode. If the path
38065   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38066   # take no chances and rewrite it.
38067   # Note: m4 eats our [], so we need to use [ and ] instead.
38068   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38069   if test "x$has_forbidden_chars" != x; then
38070     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38071     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38072   fi
38073 
38074     # Output is in $new_path
38075 
38076   windows_path="$new_path"
38077   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38078     unix_path=`$CYGPATH -u "$windows_path"`
38079     new_path="$unix_path"
38080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38081     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38082     new_path="$unix_path"
38083   fi
38084 
38085     # remove trailing .exe if any
38086     new_path="${new_path/%.exe/}"
38087 
38088     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38089     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38090   fi
38091 
38092     else
38093       # We're on a unix platform. Hooray! :)
38094       # First separate the path from the arguments. This will split at the first
38095       # space.
38096       complete="$AS"
38097       path="${complete%% *}"
38098       tmp="$complete EOL"
38099       arguments="${tmp#* }"
38100 
38101       # Cannot rely on the command "which" here since it doesn't always work.
38102       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38103       if test -z "$is_absolute_path"; then
38104         # Path to executable is not absolute. Find it.
38105         IFS_save="$IFS"
38106         IFS=:
38107         for p in $PATH; do
38108           if test -f "$p/$path" && test -x "$p/$path"; then
38109             new_path="$p/$path"
38110             break
38111           fi
38112         done
38113         IFS="$IFS_save"
38114       else
38115         # This is an absolute path, we can use it without further modifications.
38116         new_path="$path"
38117       fi
38118 
38119       if test "x$new_path" = x; then
38120         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38121 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38122         has_space=`$ECHO "$complete" | $GREP " "`
38123         if test "x$has_space" != x; then
38124           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38125 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38126         fi
38127         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38128       fi
38129     fi
38130 
38131     # Now join together the path and the arguments once again
38132     if test "x$arguments" != xEOL; then
38133       new_complete="$new_path ${arguments% *}"
38134     else
38135       new_complete="$new_path"
38136     fi
38137 
38138     if test "x$complete" != "x$new_complete"; then
38139       AS="$new_complete"
38140       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38141 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38142     fi
38143   fi
38144 
38145     if test "x$AS" = x; then
38146       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38147     fi
38148   else
38149     # FIXME: is this correct for microsoft?
38150     AS="$CC -c"
38151   fi
38152 
38153 
38154   #
38155   # Setup the archiver (AR)
38156   #
38157   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38158     # The corresponding ar tool is lib.exe (used to create static libraries)
38159     # Extract the first word of "lib", so it can be a program name with args.
38160 set dummy lib; ac_word=$2
38161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38162 $as_echo_n "checking for $ac_word... " >&6; }
38163 if ${ac_cv_prog_AR+:} false; then :
38164   $as_echo_n "(cached) " >&6
38165 else
38166   if test -n "$AR"; then
38167   ac_cv_prog_AR="$AR" # Let the user override the test.
38168 else
38169 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38170 for as_dir in $PATH
38171 do
38172   IFS=$as_save_IFS
38173   test -z "$as_dir" && as_dir=.
38174     for ac_exec_ext in '' $ac_executable_extensions; do
38175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38176     ac_cv_prog_AR="lib"
38177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38178     break 2
38179   fi
38180 done
38181   done
38182 IFS=$as_save_IFS
38183 
38184 fi
38185 fi
38186 AR=$ac_cv_prog_AR
38187 if test -n "$AR"; then
38188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38189 $as_echo "$AR" >&6; }
38190 else
38191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38192 $as_echo "no" >&6; }
38193 fi
38194 
38195 
38196   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38197 
38198 
38199   # Publish this variable in the help.
38200 
38201 
38202   if [ -z "${AR+x}" ]; then
38203     # The variable is not set by user, try to locate tool using the code snippet
38204     if test -n "$ac_tool_prefix"; then
38205   for ac_prog in ar gcc-ar
38206   do
38207     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38208 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38209 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38210 $as_echo_n "checking for $ac_word... " >&6; }
38211 if ${ac_cv_prog_AR+:} false; then :
38212   $as_echo_n "(cached) " >&6
38213 else
38214   if test -n "$AR"; then
38215   ac_cv_prog_AR="$AR" # Let the user override the test.
38216 else
38217 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38218 for as_dir in $PATH
38219 do
38220   IFS=$as_save_IFS
38221   test -z "$as_dir" && as_dir=.
38222     for ac_exec_ext in '' $ac_executable_extensions; do
38223   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38224     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38225     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38226     break 2
38227   fi
38228 done
38229   done
38230 IFS=$as_save_IFS
38231 
38232 fi
38233 fi
38234 AR=$ac_cv_prog_AR
38235 if test -n "$AR"; then
38236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38237 $as_echo "$AR" >&6; }
38238 else
38239   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38240 $as_echo "no" >&6; }
38241 fi
38242 
38243 
38244     test -n "$AR" && break
38245   done
38246 fi
38247 if test -z "$AR"; then
38248   ac_ct_AR=$AR
38249   for ac_prog in ar gcc-ar
38250 do
38251   # Extract the first word of "$ac_prog", so it can be a program name with args.
38252 set dummy $ac_prog; ac_word=$2
38253 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38254 $as_echo_n "checking for $ac_word... " >&6; }
38255 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38256   $as_echo_n "(cached) " >&6
38257 else
38258   if test -n "$ac_ct_AR"; then
38259   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38260 else
38261 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38262 for as_dir in $PATH
38263 do
38264   IFS=$as_save_IFS
38265   test -z "$as_dir" && as_dir=.
38266     for ac_exec_ext in '' $ac_executable_extensions; do
38267   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38268     ac_cv_prog_ac_ct_AR="$ac_prog"
38269     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38270     break 2
38271   fi
38272 done
38273   done
38274 IFS=$as_save_IFS
38275 
38276 fi
38277 fi
38278 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38279 if test -n "$ac_ct_AR"; then
38280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38281 $as_echo "$ac_ct_AR" >&6; }
38282 else
38283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38284 $as_echo "no" >&6; }
38285 fi
38286 
38287 
38288   test -n "$ac_ct_AR" && break
38289 done
38290 
38291   if test "x$ac_ct_AR" = x; then
38292     AR=""
38293   else
38294     case $cross_compiling:$ac_tool_warned in
38295 yes:)
38296 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38297 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38298 ac_tool_warned=yes ;;
38299 esac
38300     AR=$ac_ct_AR
38301   fi
38302 fi
38303 
38304   else
38305     # The variable is set, but is it from the command line or the environment?
38306 
38307     # Try to remove the string !AR! from our list.
38308     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38309     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38310       # If it failed, the variable was not from the command line. Ignore it,
38311       # but warn the user (except for BASH, which is always set by the calling BASH).
38312       if test "xAR" != xBASH; then
38313         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38314 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38315       fi
38316       # Try to locate tool using the code snippet
38317       if test -n "$ac_tool_prefix"; then
38318   for ac_prog in ar gcc-ar
38319   do
38320     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38321 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38323 $as_echo_n "checking for $ac_word... " >&6; }
38324 if ${ac_cv_prog_AR+:} false; then :
38325   $as_echo_n "(cached) " >&6
38326 else
38327   if test -n "$AR"; then
38328   ac_cv_prog_AR="$AR" # Let the user override the test.
38329 else
38330 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38331 for as_dir in $PATH
38332 do
38333   IFS=$as_save_IFS
38334   test -z "$as_dir" && as_dir=.
38335     for ac_exec_ext in '' $ac_executable_extensions; do
38336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38337     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38339     break 2
38340   fi
38341 done
38342   done
38343 IFS=$as_save_IFS
38344 
38345 fi
38346 fi
38347 AR=$ac_cv_prog_AR
38348 if test -n "$AR"; then
38349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38350 $as_echo "$AR" >&6; }
38351 else
38352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38353 $as_echo "no" >&6; }
38354 fi
38355 
38356 
38357     test -n "$AR" && break
38358   done
38359 fi
38360 if test -z "$AR"; then
38361   ac_ct_AR=$AR
38362   for ac_prog in ar gcc-ar
38363 do
38364   # Extract the first word of "$ac_prog", so it can be a program name with args.
38365 set dummy $ac_prog; ac_word=$2
38366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38367 $as_echo_n "checking for $ac_word... " >&6; }
38368 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38369   $as_echo_n "(cached) " >&6
38370 else
38371   if test -n "$ac_ct_AR"; then
38372   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38373 else
38374 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38375 for as_dir in $PATH
38376 do
38377   IFS=$as_save_IFS
38378   test -z "$as_dir" && as_dir=.
38379     for ac_exec_ext in '' $ac_executable_extensions; do
38380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38381     ac_cv_prog_ac_ct_AR="$ac_prog"
38382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38383     break 2
38384   fi
38385 done
38386   done
38387 IFS=$as_save_IFS
38388 
38389 fi
38390 fi
38391 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38392 if test -n "$ac_ct_AR"; then
38393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38394 $as_echo "$ac_ct_AR" >&6; }
38395 else
38396   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38397 $as_echo "no" >&6; }
38398 fi
38399 
38400 
38401   test -n "$ac_ct_AR" && break
38402 done
38403 
38404   if test "x$ac_ct_AR" = x; then
38405     AR=""
38406   else
38407     case $cross_compiling:$ac_tool_warned in
38408 yes:)
38409 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38410 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38411 ac_tool_warned=yes ;;
38412 esac
38413     AR=$ac_ct_AR
38414   fi
38415 fi
38416 
38417     else
38418       # If it succeeded, then it was overridden by the user. We will use it
38419       # for the tool.
38420 
38421       # First remove it from the list of overridden variables, so we can test
38422       # for unknown variables in the end.
38423       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38424 
38425       # Check if we try to supply an empty value
38426       if test "x$AR" = x; then
38427         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38428 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38429         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38430 $as_echo_n "checking for AR... " >&6; }
38431         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38432 $as_echo "disabled" >&6; }
38433       else
38434         # Check if the provided tool contains a complete path.
38435         tool_specified="$AR"
38436         tool_basename="${tool_specified##*/}"
38437         if test "x$tool_basename" = "x$tool_specified"; then
38438           # A command without a complete path is provided, search $PATH.
38439           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38440 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38441           # Extract the first word of "$tool_basename", so it can be a program name with args.
38442 set dummy $tool_basename; ac_word=$2
38443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38444 $as_echo_n "checking for $ac_word... " >&6; }
38445 if ${ac_cv_path_AR+:} false; then :
38446   $as_echo_n "(cached) " >&6
38447 else
38448   case $AR in
38449   [\\/]* | ?:[\\/]*)
38450   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38451   ;;
38452   *)
38453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38454 for as_dir in $PATH
38455 do
38456   IFS=$as_save_IFS
38457   test -z "$as_dir" && as_dir=.
38458     for ac_exec_ext in '' $ac_executable_extensions; do
38459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38460     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38462     break 2
38463   fi
38464 done
38465   done
38466 IFS=$as_save_IFS
38467 
38468   ;;
38469 esac
38470 fi
38471 AR=$ac_cv_path_AR
38472 if test -n "$AR"; then
38473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38474 $as_echo "$AR" >&6; }
38475 else
38476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38477 $as_echo "no" >&6; }
38478 fi
38479 
38480 
38481           if test "x$AR" = x; then
38482             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38483           fi
38484         else
38485           # Otherwise we believe it is a complete path. Use it as it is.
38486           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38487 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38488           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38489 $as_echo_n "checking for AR... " >&6; }
38490           if test ! -x "$tool_specified"; then
38491             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38492 $as_echo "not found" >&6; }
38493             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38494           fi
38495           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38496 $as_echo "$tool_specified" >&6; }
38497         fi
38498       fi
38499     fi
38500 
38501   fi
38502 
38503 
38504   else
38505 
38506 
38507   # Publish this variable in the help.
38508 
38509 
38510   if [ -z "${AR+x}" ]; then
38511     # The variable is not set by user, try to locate tool using the code snippet
38512     if test -n "$ac_tool_prefix"; then
38513   for ac_prog in ar
38514   do
38515     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38516 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38518 $as_echo_n "checking for $ac_word... " >&6; }
38519 if ${ac_cv_prog_AR+:} false; then :
38520   $as_echo_n "(cached) " >&6
38521 else
38522   if test -n "$AR"; then
38523   ac_cv_prog_AR="$AR" # Let the user override the test.
38524 else
38525 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38526 for as_dir in $PATH
38527 do
38528   IFS=$as_save_IFS
38529   test -z "$as_dir" && as_dir=.
38530     for ac_exec_ext in '' $ac_executable_extensions; do
38531   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38532     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38533     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38534     break 2
38535   fi
38536 done
38537   done
38538 IFS=$as_save_IFS
38539 
38540 fi
38541 fi
38542 AR=$ac_cv_prog_AR
38543 if test -n "$AR"; then
38544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38545 $as_echo "$AR" >&6; }
38546 else
38547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38548 $as_echo "no" >&6; }
38549 fi
38550 
38551 
38552     test -n "$AR" && break
38553   done
38554 fi
38555 if test -z "$AR"; then
38556   ac_ct_AR=$AR
38557   for ac_prog in ar
38558 do
38559   # Extract the first word of "$ac_prog", so it can be a program name with args.
38560 set dummy $ac_prog; ac_word=$2
38561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38562 $as_echo_n "checking for $ac_word... " >&6; }
38563 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38564   $as_echo_n "(cached) " >&6
38565 else
38566   if test -n "$ac_ct_AR"; then
38567   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38568 else
38569 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38570 for as_dir in $PATH
38571 do
38572   IFS=$as_save_IFS
38573   test -z "$as_dir" && as_dir=.
38574     for ac_exec_ext in '' $ac_executable_extensions; do
38575   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38576     ac_cv_prog_ac_ct_AR="$ac_prog"
38577     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38578     break 2
38579   fi
38580 done
38581   done
38582 IFS=$as_save_IFS
38583 
38584 fi
38585 fi
38586 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38587 if test -n "$ac_ct_AR"; then
38588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38589 $as_echo "$ac_ct_AR" >&6; }
38590 else
38591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38592 $as_echo "no" >&6; }
38593 fi
38594 
38595 
38596   test -n "$ac_ct_AR" && break
38597 done
38598 
38599   if test "x$ac_ct_AR" = x; then
38600     AR=""
38601   else
38602     case $cross_compiling:$ac_tool_warned in
38603 yes:)
38604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38605 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38606 ac_tool_warned=yes ;;
38607 esac
38608     AR=$ac_ct_AR
38609   fi
38610 fi
38611 
38612   else
38613     # The variable is set, but is it from the command line or the environment?
38614 
38615     # Try to remove the string !AR! from our list.
38616     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38617     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38618       # If it failed, the variable was not from the command line. Ignore it,
38619       # but warn the user (except for BASH, which is always set by the calling BASH).
38620       if test "xAR" != xBASH; then
38621         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38622 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38623       fi
38624       # Try to locate tool using the code snippet
38625       if test -n "$ac_tool_prefix"; then
38626   for ac_prog in ar
38627   do
38628     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38629 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38631 $as_echo_n "checking for $ac_word... " >&6; }
38632 if ${ac_cv_prog_AR+:} false; then :
38633   $as_echo_n "(cached) " >&6
38634 else
38635   if test -n "$AR"; then
38636   ac_cv_prog_AR="$AR" # Let the user override the test.
38637 else
38638 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38639 for as_dir in $PATH
38640 do
38641   IFS=$as_save_IFS
38642   test -z "$as_dir" && as_dir=.
38643     for ac_exec_ext in '' $ac_executable_extensions; do
38644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38645     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38647     break 2
38648   fi
38649 done
38650   done
38651 IFS=$as_save_IFS
38652 
38653 fi
38654 fi
38655 AR=$ac_cv_prog_AR
38656 if test -n "$AR"; then
38657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38658 $as_echo "$AR" >&6; }
38659 else
38660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38661 $as_echo "no" >&6; }
38662 fi
38663 
38664 
38665     test -n "$AR" && break
38666   done
38667 fi
38668 if test -z "$AR"; then
38669   ac_ct_AR=$AR
38670   for ac_prog in ar
38671 do
38672   # Extract the first word of "$ac_prog", so it can be a program name with args.
38673 set dummy $ac_prog; ac_word=$2
38674 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38675 $as_echo_n "checking for $ac_word... " >&6; }
38676 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38677   $as_echo_n "(cached) " >&6
38678 else
38679   if test -n "$ac_ct_AR"; then
38680   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38681 else
38682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38683 for as_dir in $PATH
38684 do
38685   IFS=$as_save_IFS
38686   test -z "$as_dir" && as_dir=.
38687     for ac_exec_ext in '' $ac_executable_extensions; do
38688   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38689     ac_cv_prog_ac_ct_AR="$ac_prog"
38690     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38691     break 2
38692   fi
38693 done
38694   done
38695 IFS=$as_save_IFS
38696 
38697 fi
38698 fi
38699 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38700 if test -n "$ac_ct_AR"; then
38701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38702 $as_echo "$ac_ct_AR" >&6; }
38703 else
38704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38705 $as_echo "no" >&6; }
38706 fi
38707 
38708 
38709   test -n "$ac_ct_AR" && break
38710 done
38711 
38712   if test "x$ac_ct_AR" = x; then
38713     AR=""
38714   else
38715     case $cross_compiling:$ac_tool_warned in
38716 yes:)
38717 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38718 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38719 ac_tool_warned=yes ;;
38720 esac
38721     AR=$ac_ct_AR
38722   fi
38723 fi
38724 
38725     else
38726       # If it succeeded, then it was overridden by the user. We will use it
38727       # for the tool.
38728 
38729       # First remove it from the list of overridden variables, so we can test
38730       # for unknown variables in the end.
38731       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38732 
38733       # Check if we try to supply an empty value
38734       if test "x$AR" = x; then
38735         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38736 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38737         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38738 $as_echo_n "checking for AR... " >&6; }
38739         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38740 $as_echo "disabled" >&6; }
38741       else
38742         # Check if the provided tool contains a complete path.
38743         tool_specified="$AR"
38744         tool_basename="${tool_specified##*/}"
38745         if test "x$tool_basename" = "x$tool_specified"; then
38746           # A command without a complete path is provided, search $PATH.
38747           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38748 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38749           # Extract the first word of "$tool_basename", so it can be a program name with args.
38750 set dummy $tool_basename; ac_word=$2
38751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38752 $as_echo_n "checking for $ac_word... " >&6; }
38753 if ${ac_cv_path_AR+:} false; then :
38754   $as_echo_n "(cached) " >&6
38755 else
38756   case $AR in
38757   [\\/]* | ?:[\\/]*)
38758   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38759   ;;
38760   *)
38761   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38762 for as_dir in $PATH
38763 do
38764   IFS=$as_save_IFS
38765   test -z "$as_dir" && as_dir=.
38766     for ac_exec_ext in '' $ac_executable_extensions; do
38767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38768     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38769     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38770     break 2
38771   fi
38772 done
38773   done
38774 IFS=$as_save_IFS
38775 
38776   ;;
38777 esac
38778 fi
38779 AR=$ac_cv_path_AR
38780 if test -n "$AR"; then
38781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38782 $as_echo "$AR" >&6; }
38783 else
38784   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38785 $as_echo "no" >&6; }
38786 fi
38787 
38788 
38789           if test "x$AR" = x; then
38790             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38791           fi
38792         else
38793           # Otherwise we believe it is a complete path. Use it as it is.
38794           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38795 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38796           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38797 $as_echo_n "checking for AR... " >&6; }
38798           if test ! -x "$tool_specified"; then
38799             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38800 $as_echo "not found" >&6; }
38801             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38802           fi
38803           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38804 $as_echo "$tool_specified" >&6; }
38805         fi
38806       fi
38807     fi
38808 
38809   fi
38810 
38811 
38812   fi
38813 
38814   # Only process if variable expands to non-empty
38815 
38816   if test "x$AR" != x; then
38817     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38818 
38819   # First separate the path from the arguments. This will split at the first
38820   # space.
38821   complete="$AR"
38822   path="${complete%% *}"
38823   tmp="$complete EOL"
38824   arguments="${tmp#* }"
38825 
38826   # Input might be given as Windows format, start by converting to
38827   # unix format.
38828   new_path=`$CYGPATH -u "$path"`
38829 
38830   # Now try to locate executable using which
38831   new_path=`$WHICH "$new_path" 2> /dev/null`
38832   # bat and cmd files are not always considered executable in cygwin causing which
38833   # to not find them
38834   if test "x$new_path" = x \
38835       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38836       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38837     new_path=`$CYGPATH -u "$path"`
38838   fi
38839   if test "x$new_path" = x; then
38840     # Oops. Which didn't find the executable.
38841     # The splitting of arguments from the executable at a space might have been incorrect,
38842     # since paths with space are more likely in Windows. Give it another try with the whole
38843     # argument.
38844     path="$complete"
38845     arguments="EOL"
38846     new_path=`$CYGPATH -u "$path"`
38847     new_path=`$WHICH "$new_path" 2> /dev/null`
38848     # bat and cmd files are not always considered executable in cygwin causing which
38849     # to not find them
38850     if test "x$new_path" = x \
38851         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38852         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38853       new_path=`$CYGPATH -u "$path"`
38854     fi
38855     if test "x$new_path" = x; then
38856       # It's still not found. Now this is an unrecoverable error.
38857       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38858 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38859       has_space=`$ECHO "$complete" | $GREP " "`
38860       if test "x$has_space" != x; then
38861         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38862 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38863       fi
38864       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38865     fi
38866   fi
38867 
38868   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38869   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38870   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38871   # "foo.exe" is OK but "foo" is an error.
38872   #
38873   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38874   # It is also a way to make sure we got the proper file name for the real test later on.
38875   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38876   if test "x$test_shortpath" = x; then
38877     # Short path failed, file does not exist as specified.
38878     # Try adding .exe or .cmd
38879     if test -f "${new_path}.exe"; then
38880       input_to_shortpath="${new_path}.exe"
38881     elif test -f "${new_path}.cmd"; then
38882       input_to_shortpath="${new_path}.cmd"
38883     else
38884       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38885 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38886       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38887 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38888       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38889     fi
38890   else
38891     input_to_shortpath="$new_path"
38892   fi
38893 
38894   # Call helper function which possibly converts this using DOS-style short mode.
38895   # If so, the updated path is stored in $new_path.
38896   new_path="$input_to_shortpath"
38897 
38898   input_path="$input_to_shortpath"
38899   # Check if we need to convert this using DOS-style short mode. If the path
38900   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38901   # take no chances and rewrite it.
38902   # Note: m4 eats our [], so we need to use [ and ] instead.
38903   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38904   if test "x$has_forbidden_chars" != x; then
38905     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38906     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38907     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38908     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38909       # Going to short mode and back again did indeed matter. Since short mode is
38910       # case insensitive, let's make it lowercase to improve readability.
38911       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38912       # Now convert it back to Unix-style (cygpath)
38913       input_path=`$CYGPATH -u "$shortmode_path"`
38914       new_path="$input_path"
38915     fi
38916   fi
38917 
38918   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38919   if test "x$test_cygdrive_prefix" = x; then
38920     # As a simple fix, exclude /usr/bin since it's not a real path.
38921     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38922       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38923       # a path prefixed by /cygdrive for fixpath to work.
38924       new_path="$CYGWIN_ROOT_PATH$input_path"
38925     fi
38926   fi
38927 
38928   # remove trailing .exe if any
38929   new_path="${new_path/%.exe/}"
38930 
38931     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38932 
38933   # First separate the path from the arguments. This will split at the first
38934   # space.
38935   complete="$AR"
38936   path="${complete%% *}"
38937   tmp="$complete EOL"
38938   arguments="${tmp#* }"
38939 
38940   # Input might be given as Windows format, start by converting to
38941   # unix format.
38942   new_path="$path"
38943 
38944   windows_path="$new_path"
38945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38946     unix_path=`$CYGPATH -u "$windows_path"`
38947     new_path="$unix_path"
38948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38950     new_path="$unix_path"
38951   fi
38952 
38953 
38954   # Now try to locate executable using which
38955   new_path=`$WHICH "$new_path" 2> /dev/null`
38956 
38957   if test "x$new_path" = x; then
38958     # Oops. Which didn't find the executable.
38959     # The splitting of arguments from the executable at a space might have been incorrect,
38960     # since paths with space are more likely in Windows. Give it another try with the whole
38961     # argument.
38962     path="$complete"
38963     arguments="EOL"
38964     new_path="$path"
38965 
38966   windows_path="$new_path"
38967   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38968     unix_path=`$CYGPATH -u "$windows_path"`
38969     new_path="$unix_path"
38970   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38971     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38972     new_path="$unix_path"
38973   fi
38974 
38975 
38976     new_path=`$WHICH "$new_path" 2> /dev/null`
38977     # bat and cmd files are not always considered executable in MSYS causing which
38978     # to not find them
38979     if test "x$new_path" = x \
38980         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38981         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38982       new_path="$path"
38983 
38984   windows_path="$new_path"
38985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38986     unix_path=`$CYGPATH -u "$windows_path"`
38987     new_path="$unix_path"
38988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38990     new_path="$unix_path"
38991   fi
38992 
38993     fi
38994 
38995     if test "x$new_path" = x; then
38996       # It's still not found. Now this is an unrecoverable error.
38997       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38998 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38999       has_space=`$ECHO "$complete" | $GREP " "`
39000       if test "x$has_space" != x; then
39001         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39002 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39003       fi
39004       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39005     fi
39006   fi
39007 
39008   # Now new_path has a complete unix path to the binary
39009   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39010     # Keep paths in /bin as-is, but remove trailing .exe if any
39011     new_path="${new_path/%.exe/}"
39012     # Do not save /bin paths to all_fixpath_prefixes!
39013   else
39014     # Not in mixed or Windows style, start by that.
39015     new_path=`cmd //c echo $new_path`
39016 
39017   input_path="$new_path"
39018   # Check if we need to convert this using DOS-style short mode. If the path
39019   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39020   # take no chances and rewrite it.
39021   # Note: m4 eats our [], so we need to use [ and ] instead.
39022   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39023   if test "x$has_forbidden_chars" != x; then
39024     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39025     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39026   fi
39027 
39028     # Output is in $new_path
39029 
39030   windows_path="$new_path"
39031   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39032     unix_path=`$CYGPATH -u "$windows_path"`
39033     new_path="$unix_path"
39034   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39035     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39036     new_path="$unix_path"
39037   fi
39038 
39039     # remove trailing .exe if any
39040     new_path="${new_path/%.exe/}"
39041 
39042     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39043     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39044   fi
39045 
39046     else
39047       # We're on a unix platform. Hooray! :)
39048       # First separate the path from the arguments. This will split at the first
39049       # space.
39050       complete="$AR"
39051       path="${complete%% *}"
39052       tmp="$complete EOL"
39053       arguments="${tmp#* }"
39054 
39055       # Cannot rely on the command "which" here since it doesn't always work.
39056       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39057       if test -z "$is_absolute_path"; then
39058         # Path to executable is not absolute. Find it.
39059         IFS_save="$IFS"
39060         IFS=:
39061         for p in $PATH; do
39062           if test -f "$p/$path" && test -x "$p/$path"; then
39063             new_path="$p/$path"
39064             break
39065           fi
39066         done
39067         IFS="$IFS_save"
39068       else
39069         # This is an absolute path, we can use it without further modifications.
39070         new_path="$path"
39071       fi
39072 
39073       if test "x$new_path" = x; then
39074         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
39075 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
39076         has_space=`$ECHO "$complete" | $GREP " "`
39077         if test "x$has_space" != x; then
39078           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39079 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39080         fi
39081         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39082       fi
39083     fi
39084 
39085     # Now join together the path and the arguments once again
39086     if test "x$arguments" != xEOL; then
39087       new_complete="$new_path ${arguments% *}"
39088     else
39089       new_complete="$new_path"
39090     fi
39091 
39092     if test "x$complete" != "x$new_complete"; then
39093       AR="$new_complete"
39094       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39095 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39096     fi
39097   fi
39098 
39099 
39100 
39101   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39102 
39103 
39104   # Publish this variable in the help.
39105 
39106 
39107   if [ -z "${LIPO+x}" ]; then
39108     # The variable is not set by user, try to locate tool using the code snippet
39109     for ac_prog in lipo
39110 do
39111   # Extract the first word of "$ac_prog", so it can be a program name with args.
39112 set dummy $ac_prog; ac_word=$2
39113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39114 $as_echo_n "checking for $ac_word... " >&6; }
39115 if ${ac_cv_path_LIPO+:} false; then :
39116   $as_echo_n "(cached) " >&6
39117 else
39118   case $LIPO in
39119   [\\/]* | ?:[\\/]*)
39120   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39121   ;;
39122   *)
39123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39124 for as_dir in $PATH
39125 do
39126   IFS=$as_save_IFS
39127   test -z "$as_dir" && as_dir=.
39128     for ac_exec_ext in '' $ac_executable_extensions; do
39129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39130     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39132     break 2
39133   fi
39134 done
39135   done
39136 IFS=$as_save_IFS
39137 
39138   ;;
39139 esac
39140 fi
39141 LIPO=$ac_cv_path_LIPO
39142 if test -n "$LIPO"; then
39143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39144 $as_echo "$LIPO" >&6; }
39145 else
39146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39147 $as_echo "no" >&6; }
39148 fi
39149 
39150 
39151   test -n "$LIPO" && break
39152 done
39153 
39154   else
39155     # The variable is set, but is it from the command line or the environment?
39156 
39157     # Try to remove the string !LIPO! from our list.
39158     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39159     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39160       # If it failed, the variable was not from the command line. Ignore it,
39161       # but warn the user (except for BASH, which is always set by the calling BASH).
39162       if test "xLIPO" != xBASH; then
39163         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39164 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39165       fi
39166       # Try to locate tool using the code snippet
39167       for ac_prog in lipo
39168 do
39169   # Extract the first word of "$ac_prog", so it can be a program name with args.
39170 set dummy $ac_prog; ac_word=$2
39171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39172 $as_echo_n "checking for $ac_word... " >&6; }
39173 if ${ac_cv_path_LIPO+:} false; then :
39174   $as_echo_n "(cached) " >&6
39175 else
39176   case $LIPO in
39177   [\\/]* | ?:[\\/]*)
39178   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39179   ;;
39180   *)
39181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39182 for as_dir in $PATH
39183 do
39184   IFS=$as_save_IFS
39185   test -z "$as_dir" && as_dir=.
39186     for ac_exec_ext in '' $ac_executable_extensions; do
39187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39188     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39190     break 2
39191   fi
39192 done
39193   done
39194 IFS=$as_save_IFS
39195 
39196   ;;
39197 esac
39198 fi
39199 LIPO=$ac_cv_path_LIPO
39200 if test -n "$LIPO"; then
39201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39202 $as_echo "$LIPO" >&6; }
39203 else
39204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39205 $as_echo "no" >&6; }
39206 fi
39207 
39208 
39209   test -n "$LIPO" && break
39210 done
39211 
39212     else
39213       # If it succeeded, then it was overridden by the user. We will use it
39214       # for the tool.
39215 
39216       # First remove it from the list of overridden variables, so we can test
39217       # for unknown variables in the end.
39218       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39219 
39220       # Check if we try to supply an empty value
39221       if test "x$LIPO" = x; then
39222         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39223 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39225 $as_echo_n "checking for LIPO... " >&6; }
39226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39227 $as_echo "disabled" >&6; }
39228       else
39229         # Check if the provided tool contains a complete path.
39230         tool_specified="$LIPO"
39231         tool_basename="${tool_specified##*/}"
39232         if test "x$tool_basename" = "x$tool_specified"; then
39233           # A command without a complete path is provided, search $PATH.
39234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39235 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39236           # Extract the first word of "$tool_basename", so it can be a program name with args.
39237 set dummy $tool_basename; ac_word=$2
39238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39239 $as_echo_n "checking for $ac_word... " >&6; }
39240 if ${ac_cv_path_LIPO+:} false; then :
39241   $as_echo_n "(cached) " >&6
39242 else
39243   case $LIPO in
39244   [\\/]* | ?:[\\/]*)
39245   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39246   ;;
39247   *)
39248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39249 for as_dir in $PATH
39250 do
39251   IFS=$as_save_IFS
39252   test -z "$as_dir" && as_dir=.
39253     for ac_exec_ext in '' $ac_executable_extensions; do
39254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39255     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39257     break 2
39258   fi
39259 done
39260   done
39261 IFS=$as_save_IFS
39262 
39263   ;;
39264 esac
39265 fi
39266 LIPO=$ac_cv_path_LIPO
39267 if test -n "$LIPO"; then
39268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39269 $as_echo "$LIPO" >&6; }
39270 else
39271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39272 $as_echo "no" >&6; }
39273 fi
39274 
39275 
39276           if test "x$LIPO" = x; then
39277             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39278           fi
39279         else
39280           # Otherwise we believe it is a complete path. Use it as it is.
39281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39282 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39283           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39284 $as_echo_n "checking for LIPO... " >&6; }
39285           if test ! -x "$tool_specified"; then
39286             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39287 $as_echo "not found" >&6; }
39288             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39289           fi
39290           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39291 $as_echo "$tool_specified" >&6; }
39292         fi
39293       fi
39294     fi
39295 
39296   fi
39297 
39298 
39299 
39300   # Only process if variable expands to non-empty
39301 
39302   if test "x$LIPO" != x; then
39303     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39304 
39305   # First separate the path from the arguments. This will split at the first
39306   # space.
39307   complete="$LIPO"
39308   path="${complete%% *}"
39309   tmp="$complete EOL"
39310   arguments="${tmp#* }"
39311 
39312   # Input might be given as Windows format, start by converting to
39313   # unix format.
39314   new_path=`$CYGPATH -u "$path"`
39315 
39316   # Now try to locate executable using which
39317   new_path=`$WHICH "$new_path" 2> /dev/null`
39318   # bat and cmd files are not always considered executable in cygwin causing which
39319   # to not find them
39320   if test "x$new_path" = x \
39321       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39322       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39323     new_path=`$CYGPATH -u "$path"`
39324   fi
39325   if test "x$new_path" = x; then
39326     # Oops. Which didn't find the executable.
39327     # The splitting of arguments from the executable at a space might have been incorrect,
39328     # since paths with space are more likely in Windows. Give it another try with the whole
39329     # argument.
39330     path="$complete"
39331     arguments="EOL"
39332     new_path=`$CYGPATH -u "$path"`
39333     new_path=`$WHICH "$new_path" 2> /dev/null`
39334     # bat and cmd files are not always considered executable in cygwin causing which
39335     # to not find them
39336     if test "x$new_path" = x \
39337         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39338         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39339       new_path=`$CYGPATH -u "$path"`
39340     fi
39341     if test "x$new_path" = x; then
39342       # It's still not found. Now this is an unrecoverable error.
39343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39344 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39345       has_space=`$ECHO "$complete" | $GREP " "`
39346       if test "x$has_space" != x; then
39347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39349       fi
39350       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39351     fi
39352   fi
39353 
39354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39357   # "foo.exe" is OK but "foo" is an error.
39358   #
39359   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39360   # It is also a way to make sure we got the proper file name for the real test later on.
39361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39362   if test "x$test_shortpath" = x; then
39363     # Short path failed, file does not exist as specified.
39364     # Try adding .exe or .cmd
39365     if test -f "${new_path}.exe"; then
39366       input_to_shortpath="${new_path}.exe"
39367     elif test -f "${new_path}.cmd"; then
39368       input_to_shortpath="${new_path}.cmd"
39369     else
39370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39371 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39372       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39373 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39374       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39375     fi
39376   else
39377     input_to_shortpath="$new_path"
39378   fi
39379 
39380   # Call helper function which possibly converts this using DOS-style short mode.
39381   # If so, the updated path is stored in $new_path.
39382   new_path="$input_to_shortpath"
39383 
39384   input_path="$input_to_shortpath"
39385   # Check if we need to convert this using DOS-style short mode. If the path
39386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39387   # take no chances and rewrite it.
39388   # Note: m4 eats our [], so we need to use [ and ] instead.
39389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39390   if test "x$has_forbidden_chars" != x; then
39391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39395       # Going to short mode and back again did indeed matter. Since short mode is
39396       # case insensitive, let's make it lowercase to improve readability.
39397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39398       # Now convert it back to Unix-style (cygpath)
39399       input_path=`$CYGPATH -u "$shortmode_path"`
39400       new_path="$input_path"
39401     fi
39402   fi
39403 
39404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39405   if test "x$test_cygdrive_prefix" = x; then
39406     # As a simple fix, exclude /usr/bin since it's not a real path.
39407     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39409       # a path prefixed by /cygdrive for fixpath to work.
39410       new_path="$CYGWIN_ROOT_PATH$input_path"
39411     fi
39412   fi
39413 
39414   # remove trailing .exe if any
39415   new_path="${new_path/%.exe/}"
39416 
39417     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39418 
39419   # First separate the path from the arguments. This will split at the first
39420   # space.
39421   complete="$LIPO"
39422   path="${complete%% *}"
39423   tmp="$complete EOL"
39424   arguments="${tmp#* }"
39425 
39426   # Input might be given as Windows format, start by converting to
39427   # unix format.
39428   new_path="$path"
39429 
39430   windows_path="$new_path"
39431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39432     unix_path=`$CYGPATH -u "$windows_path"`
39433     new_path="$unix_path"
39434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39436     new_path="$unix_path"
39437   fi
39438 
39439 
39440   # Now try to locate executable using which
39441   new_path=`$WHICH "$new_path" 2> /dev/null`
39442 
39443   if test "x$new_path" = x; then
39444     # Oops. Which didn't find the executable.
39445     # The splitting of arguments from the executable at a space might have been incorrect,
39446     # since paths with space are more likely in Windows. Give it another try with the whole
39447     # argument.
39448     path="$complete"
39449     arguments="EOL"
39450     new_path="$path"
39451 
39452   windows_path="$new_path"
39453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39454     unix_path=`$CYGPATH -u "$windows_path"`
39455     new_path="$unix_path"
39456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39458     new_path="$unix_path"
39459   fi
39460 
39461 
39462     new_path=`$WHICH "$new_path" 2> /dev/null`
39463     # bat and cmd files are not always considered executable in MSYS causing which
39464     # to not find them
39465     if test "x$new_path" = x \
39466         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39467         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39468       new_path="$path"
39469 
39470   windows_path="$new_path"
39471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39472     unix_path=`$CYGPATH -u "$windows_path"`
39473     new_path="$unix_path"
39474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39476     new_path="$unix_path"
39477   fi
39478 
39479     fi
39480 
39481     if test "x$new_path" = x; then
39482       # It's still not found. Now this is an unrecoverable error.
39483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39484 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39485       has_space=`$ECHO "$complete" | $GREP " "`
39486       if test "x$has_space" != x; then
39487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39489       fi
39490       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39491     fi
39492   fi
39493 
39494   # Now new_path has a complete unix path to the binary
39495   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39496     # Keep paths in /bin as-is, but remove trailing .exe if any
39497     new_path="${new_path/%.exe/}"
39498     # Do not save /bin paths to all_fixpath_prefixes!
39499   else
39500     # Not in mixed or Windows style, start by that.
39501     new_path=`cmd //c echo $new_path`
39502 
39503   input_path="$new_path"
39504   # Check if we need to convert this using DOS-style short mode. If the path
39505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39506   # take no chances and rewrite it.
39507   # Note: m4 eats our [], so we need to use [ and ] instead.
39508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39509   if test "x$has_forbidden_chars" != x; then
39510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39511     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39512   fi
39513 
39514     # Output is in $new_path
39515 
39516   windows_path="$new_path"
39517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39518     unix_path=`$CYGPATH -u "$windows_path"`
39519     new_path="$unix_path"
39520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39522     new_path="$unix_path"
39523   fi
39524 
39525     # remove trailing .exe if any
39526     new_path="${new_path/%.exe/}"
39527 
39528     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39529     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39530   fi
39531 
39532     else
39533       # We're on a unix platform. Hooray! :)
39534       # First separate the path from the arguments. This will split at the first
39535       # space.
39536       complete="$LIPO"
39537       path="${complete%% *}"
39538       tmp="$complete EOL"
39539       arguments="${tmp#* }"
39540 
39541       # Cannot rely on the command "which" here since it doesn't always work.
39542       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39543       if test -z "$is_absolute_path"; then
39544         # Path to executable is not absolute. Find it.
39545         IFS_save="$IFS"
39546         IFS=:
39547         for p in $PATH; do
39548           if test -f "$p/$path" && test -x "$p/$path"; then
39549             new_path="$p/$path"
39550             break
39551           fi
39552         done
39553         IFS="$IFS_save"
39554       else
39555         # This is an absolute path, we can use it without further modifications.
39556         new_path="$path"
39557       fi
39558 
39559       if test "x$new_path" = x; then
39560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39561 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39562         has_space=`$ECHO "$complete" | $GREP " "`
39563         if test "x$has_space" != x; then
39564           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39565 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39566         fi
39567         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39568       fi
39569     fi
39570 
39571     # Now join together the path and the arguments once again
39572     if test "x$arguments" != xEOL; then
39573       new_complete="$new_path ${arguments% *}"
39574     else
39575       new_complete="$new_path"
39576     fi
39577 
39578     if test "x$complete" != "x$new_complete"; then
39579       LIPO="$new_complete"
39580       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39581 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39582     fi
39583   fi
39584 
39585 
39586 
39587 
39588   # Publish this variable in the help.
39589 
39590 
39591   if [ -z "${OTOOL+x}" ]; then
39592     # The variable is not set by user, try to locate tool using the code snippet
39593     for ac_prog in otool
39594 do
39595   # Extract the first word of "$ac_prog", so it can be a program name with args.
39596 set dummy $ac_prog; ac_word=$2
39597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39598 $as_echo_n "checking for $ac_word... " >&6; }
39599 if ${ac_cv_path_OTOOL+:} false; then :
39600   $as_echo_n "(cached) " >&6
39601 else
39602   case $OTOOL in
39603   [\\/]* | ?:[\\/]*)
39604   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
39605   ;;
39606   *)
39607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39608 for as_dir in $PATH
39609 do
39610   IFS=$as_save_IFS
39611   test -z "$as_dir" && as_dir=.
39612     for ac_exec_ext in '' $ac_executable_extensions; do
39613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39614     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
39615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39616     break 2
39617   fi
39618 done
39619   done
39620 IFS=$as_save_IFS
39621 
39622   ;;
39623 esac
39624 fi
39625 OTOOL=$ac_cv_path_OTOOL
39626 if test -n "$OTOOL"; then
39627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
39628 $as_echo "$OTOOL" >&6; }
39629 else
39630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39631 $as_echo "no" >&6; }
39632 fi
39633 
39634 
39635   test -n "$OTOOL" && break
39636 done
39637 
39638   else
39639     # The variable is set, but is it from the command line or the environment?
39640 
39641     # Try to remove the string !OTOOL! from our list.
39642     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
39643     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39644       # If it failed, the variable was not from the command line. Ignore it,
39645       # but warn the user (except for BASH, which is always set by the calling BASH).
39646       if test "xOTOOL" != xBASH; then
39647         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
39648 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
39649       fi
39650       # Try to locate tool using the code snippet
39651       for ac_prog in otool
39652 do
39653   # Extract the first word of "$ac_prog", so it can be a program name with args.
39654 set dummy $ac_prog; ac_word=$2
39655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39656 $as_echo_n "checking for $ac_word... " >&6; }
39657 if ${ac_cv_path_OTOOL+:} false; then :
39658   $as_echo_n "(cached) " >&6
39659 else
39660   case $OTOOL in
39661   [\\/]* | ?:[\\/]*)
39662   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
39663   ;;
39664   *)
39665   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39666 for as_dir in $PATH
39667 do
39668   IFS=$as_save_IFS
39669   test -z "$as_dir" && as_dir=.
39670     for ac_exec_ext in '' $ac_executable_extensions; do
39671   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39672     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
39673     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39674     break 2
39675   fi
39676 done
39677   done
39678 IFS=$as_save_IFS
39679 
39680   ;;
39681 esac
39682 fi
39683 OTOOL=$ac_cv_path_OTOOL
39684 if test -n "$OTOOL"; then
39685   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
39686 $as_echo "$OTOOL" >&6; }
39687 else
39688   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39689 $as_echo "no" >&6; }
39690 fi
39691 
39692 
39693   test -n "$OTOOL" && break
39694 done
39695 
39696     else
39697       # If it succeeded, then it was overridden by the user. We will use it
39698       # for the tool.
39699 
39700       # First remove it from the list of overridden variables, so we can test
39701       # for unknown variables in the end.
39702       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39703 
39704       # Check if we try to supply an empty value
39705       if test "x$OTOOL" = x; then
39706         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
39707 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
39708         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
39709 $as_echo_n "checking for OTOOL... " >&6; }
39710         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39711 $as_echo "disabled" >&6; }
39712       else
39713         # Check if the provided tool contains a complete path.
39714         tool_specified="$OTOOL"
39715         tool_basename="${tool_specified##*/}"
39716         if test "x$tool_basename" = "x$tool_specified"; then
39717           # A command without a complete path is provided, search $PATH.
39718           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
39719 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
39720           # Extract the first word of "$tool_basename", so it can be a program name with args.
39721 set dummy $tool_basename; ac_word=$2
39722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39723 $as_echo_n "checking for $ac_word... " >&6; }
39724 if ${ac_cv_path_OTOOL+:} false; then :
39725   $as_echo_n "(cached) " >&6
39726 else
39727   case $OTOOL in
39728   [\\/]* | ?:[\\/]*)
39729   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
39730   ;;
39731   *)
39732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39733 for as_dir in $PATH
39734 do
39735   IFS=$as_save_IFS
39736   test -z "$as_dir" && as_dir=.
39737     for ac_exec_ext in '' $ac_executable_extensions; do
39738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39739     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
39740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39741     break 2
39742   fi
39743 done
39744   done
39745 IFS=$as_save_IFS
39746 
39747   ;;
39748 esac
39749 fi
39750 OTOOL=$ac_cv_path_OTOOL
39751 if test -n "$OTOOL"; then
39752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
39753 $as_echo "$OTOOL" >&6; }
39754 else
39755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39756 $as_echo "no" >&6; }
39757 fi
39758 
39759 
39760           if test "x$OTOOL" = x; then
39761             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39762           fi
39763         else
39764           # Otherwise we believe it is a complete path. Use it as it is.
39765           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
39766 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
39767           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
39768 $as_echo_n "checking for OTOOL... " >&6; }
39769           if test ! -x "$tool_specified"; then
39770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39771 $as_echo "not found" >&6; }
39772             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
39773           fi
39774           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39775 $as_echo "$tool_specified" >&6; }
39776         fi
39777       fi
39778     fi
39779 
39780   fi
39781 
39782 
39783 
39784   if test "x$OTOOL" = x; then
39785     as_fn_error $? "Could not find required tool for OTOOL" "$LINENO" 5
39786   fi
39787 
39788 
39789 
39790   # Only process if variable expands to non-empty
39791 
39792   if test "x$OTOOL" != x; then
39793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39794 
39795   # First separate the path from the arguments. This will split at the first
39796   # space.
39797   complete="$OTOOL"
39798   path="${complete%% *}"
39799   tmp="$complete EOL"
39800   arguments="${tmp#* }"
39801 
39802   # Input might be given as Windows format, start by converting to
39803   # unix format.
39804   new_path=`$CYGPATH -u "$path"`
39805 
39806   # Now try to locate executable using which
39807   new_path=`$WHICH "$new_path" 2> /dev/null`
39808   # bat and cmd files are not always considered executable in cygwin causing which
39809   # to not find them
39810   if test "x$new_path" = x \
39811       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39812       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39813     new_path=`$CYGPATH -u "$path"`
39814   fi
39815   if test "x$new_path" = x; then
39816     # Oops. Which didn't find the executable.
39817     # The splitting of arguments from the executable at a space might have been incorrect,
39818     # since paths with space are more likely in Windows. Give it another try with the whole
39819     # argument.
39820     path="$complete"
39821     arguments="EOL"
39822     new_path=`$CYGPATH -u "$path"`
39823     new_path=`$WHICH "$new_path" 2> /dev/null`
39824     # bat and cmd files are not always considered executable in cygwin causing which
39825     # to not find them
39826     if test "x$new_path" = x \
39827         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39828         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39829       new_path=`$CYGPATH -u "$path"`
39830     fi
39831     if test "x$new_path" = x; then
39832       # It's still not found. Now this is an unrecoverable error.
39833       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$complete\", is not found." >&5
39834 $as_echo "$as_me: The path of OTOOL, which resolves as \"$complete\", is not found." >&6;}
39835       has_space=`$ECHO "$complete" | $GREP " "`
39836       if test "x$has_space" != x; then
39837         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39838 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39839       fi
39840       as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39841     fi
39842   fi
39843 
39844   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39845   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39846   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39847   # "foo.exe" is OK but "foo" is an error.
39848   #
39849   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39850   # It is also a way to make sure we got the proper file name for the real test later on.
39851   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39852   if test "x$test_shortpath" = x; then
39853     # Short path failed, file does not exist as specified.
39854     # Try adding .exe or .cmd
39855     if test -f "${new_path}.exe"; then
39856       input_to_shortpath="${new_path}.exe"
39857     elif test -f "${new_path}.cmd"; then
39858       input_to_shortpath="${new_path}.cmd"
39859     else
39860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$new_path\", is invalid." >&5
39861 $as_echo "$as_me: The path of OTOOL, which resolves as \"$new_path\", is invalid." >&6;}
39862       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39863 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39864       as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39865     fi
39866   else
39867     input_to_shortpath="$new_path"
39868   fi
39869 
39870   # Call helper function which possibly converts this using DOS-style short mode.
39871   # If so, the updated path is stored in $new_path.
39872   new_path="$input_to_shortpath"
39873 
39874   input_path="$input_to_shortpath"
39875   # Check if we need to convert this using DOS-style short mode. If the path
39876   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39877   # take no chances and rewrite it.
39878   # Note: m4 eats our [], so we need to use [ and ] instead.
39879   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39880   if test "x$has_forbidden_chars" != x; then
39881     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39882     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39883     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39884     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39885       # Going to short mode and back again did indeed matter. Since short mode is
39886       # case insensitive, let's make it lowercase to improve readability.
39887       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39888       # Now convert it back to Unix-style (cygpath)
39889       input_path=`$CYGPATH -u "$shortmode_path"`
39890       new_path="$input_path"
39891     fi
39892   fi
39893 
39894   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39895   if test "x$test_cygdrive_prefix" = x; then
39896     # As a simple fix, exclude /usr/bin since it's not a real path.
39897     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39898       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39899       # a path prefixed by /cygdrive for fixpath to work.
39900       new_path="$CYGWIN_ROOT_PATH$input_path"
39901     fi
39902   fi
39903 
39904   # remove trailing .exe if any
39905   new_path="${new_path/%.exe/}"
39906 
39907     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39908 
39909   # First separate the path from the arguments. This will split at the first
39910   # space.
39911   complete="$OTOOL"
39912   path="${complete%% *}"
39913   tmp="$complete EOL"
39914   arguments="${tmp#* }"
39915 
39916   # Input might be given as Windows format, start by converting to
39917   # unix format.
39918   new_path="$path"
39919 
39920   windows_path="$new_path"
39921   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39922     unix_path=`$CYGPATH -u "$windows_path"`
39923     new_path="$unix_path"
39924   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39925     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39926     new_path="$unix_path"
39927   fi
39928 
39929 
39930   # Now try to locate executable using which
39931   new_path=`$WHICH "$new_path" 2> /dev/null`
39932 
39933   if test "x$new_path" = x; then
39934     # Oops. Which didn't find the executable.
39935     # The splitting of arguments from the executable at a space might have been incorrect,
39936     # since paths with space are more likely in Windows. Give it another try with the whole
39937     # argument.
39938     path="$complete"
39939     arguments="EOL"
39940     new_path="$path"
39941 
39942   windows_path="$new_path"
39943   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39944     unix_path=`$CYGPATH -u "$windows_path"`
39945     new_path="$unix_path"
39946   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39947     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39948     new_path="$unix_path"
39949   fi
39950 
39951 
39952     new_path=`$WHICH "$new_path" 2> /dev/null`
39953     # bat and cmd files are not always considered executable in MSYS causing which
39954     # to not find them
39955     if test "x$new_path" = x \
39956         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39957         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39958       new_path="$path"
39959 
39960   windows_path="$new_path"
39961   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39962     unix_path=`$CYGPATH -u "$windows_path"`
39963     new_path="$unix_path"
39964   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39965     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39966     new_path="$unix_path"
39967   fi
39968 
39969     fi
39970 
39971     if test "x$new_path" = x; then
39972       # It's still not found. Now this is an unrecoverable error.
39973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$complete\", is not found." >&5
39974 $as_echo "$as_me: The path of OTOOL, which resolves as \"$complete\", is not found." >&6;}
39975       has_space=`$ECHO "$complete" | $GREP " "`
39976       if test "x$has_space" != x; then
39977         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39978 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39979       fi
39980       as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
39981     fi
39982   fi
39983 
39984   # Now new_path has a complete unix path to the binary
39985   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39986     # Keep paths in /bin as-is, but remove trailing .exe if any
39987     new_path="${new_path/%.exe/}"
39988     # Do not save /bin paths to all_fixpath_prefixes!
39989   else
39990     # Not in mixed or Windows style, start by that.
39991     new_path=`cmd //c echo $new_path`
39992 
39993   input_path="$new_path"
39994   # Check if we need to convert this using DOS-style short mode. If the path
39995   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39996   # take no chances and rewrite it.
39997   # Note: m4 eats our [], so we need to use [ and ] instead.
39998   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39999   if test "x$has_forbidden_chars" != x; then
40000     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40001     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40002   fi
40003 
40004     # Output is in $new_path
40005 
40006   windows_path="$new_path"
40007   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40008     unix_path=`$CYGPATH -u "$windows_path"`
40009     new_path="$unix_path"
40010   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40011     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40012     new_path="$unix_path"
40013   fi
40014 
40015     # remove trailing .exe if any
40016     new_path="${new_path/%.exe/}"
40017 
40018     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40019     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40020   fi
40021 
40022     else
40023       # We're on a unix platform. Hooray! :)
40024       # First separate the path from the arguments. This will split at the first
40025       # space.
40026       complete="$OTOOL"
40027       path="${complete%% *}"
40028       tmp="$complete EOL"
40029       arguments="${tmp#* }"
40030 
40031       # Cannot rely on the command "which" here since it doesn't always work.
40032       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40033       if test -z "$is_absolute_path"; then
40034         # Path to executable is not absolute. Find it.
40035         IFS_save="$IFS"
40036         IFS=:
40037         for p in $PATH; do
40038           if test -f "$p/$path" && test -x "$p/$path"; then
40039             new_path="$p/$path"
40040             break
40041           fi
40042         done
40043         IFS="$IFS_save"
40044       else
40045         # This is an absolute path, we can use it without further modifications.
40046         new_path="$path"
40047       fi
40048 
40049       if test "x$new_path" = x; then
40050         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OTOOL, which resolves as \"$complete\", is not found." >&5
40051 $as_echo "$as_me: The path of OTOOL, which resolves as \"$complete\", is not found." >&6;}
40052         has_space=`$ECHO "$complete" | $GREP " "`
40053         if test "x$has_space" != x; then
40054           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40055 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40056         fi
40057         as_fn_error $? "Cannot locate the the path of OTOOL" "$LINENO" 5
40058       fi
40059     fi
40060 
40061     # Now join together the path and the arguments once again
40062     if test "x$arguments" != xEOL; then
40063       new_complete="$new_path ${arguments% *}"
40064     else
40065       new_complete="$new_path"
40066     fi
40067 
40068     if test "x$complete" != "x$new_complete"; then
40069       OTOOL="$new_complete"
40070       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OTOOL to \"$new_complete\"" >&5
40071 $as_echo "$as_me: Rewriting OTOOL to \"$new_complete\"" >&6;}
40072     fi
40073   fi
40074 
40075 
40076 
40077 
40078   # Publish this variable in the help.
40079 
40080 
40081   if [ -z "${INSTALL_NAME_TOOL+x}" ]; then
40082     # The variable is not set by user, try to locate tool using the code snippet
40083     for ac_prog in install_name_tool
40084 do
40085   # Extract the first word of "$ac_prog", so it can be a program name with args.
40086 set dummy $ac_prog; ac_word=$2
40087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40088 $as_echo_n "checking for $ac_word... " >&6; }
40089 if ${ac_cv_path_INSTALL_NAME_TOOL+:} false; then :
40090   $as_echo_n "(cached) " >&6
40091 else
40092   case $INSTALL_NAME_TOOL in
40093   [\\/]* | ?:[\\/]*)
40094   ac_cv_path_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test with a path.
40095   ;;
40096   *)
40097   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40098 for as_dir in $PATH
40099 do
40100   IFS=$as_save_IFS
40101   test -z "$as_dir" && as_dir=.
40102     for ac_exec_ext in '' $ac_executable_extensions; do
40103   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40104     ac_cv_path_INSTALL_NAME_TOOL="$as_dir/$ac_word$ac_exec_ext"
40105     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40106     break 2
40107   fi
40108 done
40109   done
40110 IFS=$as_save_IFS
40111 
40112   ;;
40113 esac
40114 fi
40115 INSTALL_NAME_TOOL=$ac_cv_path_INSTALL_NAME_TOOL
40116 if test -n "$INSTALL_NAME_TOOL"; then
40117   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_NAME_TOOL" >&5
40118 $as_echo "$INSTALL_NAME_TOOL" >&6; }
40119 else
40120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40121 $as_echo "no" >&6; }
40122 fi
40123 
40124 
40125   test -n "$INSTALL_NAME_TOOL" && break
40126 done
40127 
40128   else
40129     # The variable is set, but is it from the command line or the environment?
40130 
40131     # Try to remove the string !INSTALL_NAME_TOOL! from our list.
40132     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!INSTALL_NAME_TOOL!/}
40133     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40134       # If it failed, the variable was not from the command line. Ignore it,
40135       # but warn the user (except for BASH, which is always set by the calling BASH).
40136       if test "xINSTALL_NAME_TOOL" != xBASH; then
40137         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of INSTALL_NAME_TOOL from the environment. Use command line variables instead." >&5
40138 $as_echo "$as_me: WARNING: Ignoring value of INSTALL_NAME_TOOL from the environment. Use command line variables instead." >&2;}
40139       fi
40140       # Try to locate tool using the code snippet
40141       for ac_prog in install_name_tool
40142 do
40143   # Extract the first word of "$ac_prog", so it can be a program name with args.
40144 set dummy $ac_prog; ac_word=$2
40145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40146 $as_echo_n "checking for $ac_word... " >&6; }
40147 if ${ac_cv_path_INSTALL_NAME_TOOL+:} false; then :
40148   $as_echo_n "(cached) " >&6
40149 else
40150   case $INSTALL_NAME_TOOL in
40151   [\\/]* | ?:[\\/]*)
40152   ac_cv_path_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test with a path.
40153   ;;
40154   *)
40155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40156 for as_dir in $PATH
40157 do
40158   IFS=$as_save_IFS
40159   test -z "$as_dir" && as_dir=.
40160     for ac_exec_ext in '' $ac_executable_extensions; do
40161   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40162     ac_cv_path_INSTALL_NAME_TOOL="$as_dir/$ac_word$ac_exec_ext"
40163     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40164     break 2
40165   fi
40166 done
40167   done
40168 IFS=$as_save_IFS
40169 
40170   ;;
40171 esac
40172 fi
40173 INSTALL_NAME_TOOL=$ac_cv_path_INSTALL_NAME_TOOL
40174 if test -n "$INSTALL_NAME_TOOL"; then
40175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_NAME_TOOL" >&5
40176 $as_echo "$INSTALL_NAME_TOOL" >&6; }
40177 else
40178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40179 $as_echo "no" >&6; }
40180 fi
40181 
40182 
40183   test -n "$INSTALL_NAME_TOOL" && break
40184 done
40185 
40186     else
40187       # If it succeeded, then it was overridden by the user. We will use it
40188       # for the tool.
40189 
40190       # First remove it from the list of overridden variables, so we can test
40191       # for unknown variables in the end.
40192       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40193 
40194       # Check if we try to supply an empty value
40195       if test "x$INSTALL_NAME_TOOL" = x; then
40196         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool INSTALL_NAME_TOOL= (no value)" >&5
40197 $as_echo "$as_me: Setting user supplied tool INSTALL_NAME_TOOL= (no value)" >&6;}
40198         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INSTALL_NAME_TOOL" >&5
40199 $as_echo_n "checking for INSTALL_NAME_TOOL... " >&6; }
40200         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40201 $as_echo "disabled" >&6; }
40202       else
40203         # Check if the provided tool contains a complete path.
40204         tool_specified="$INSTALL_NAME_TOOL"
40205         tool_basename="${tool_specified##*/}"
40206         if test "x$tool_basename" = "x$tool_specified"; then
40207           # A command without a complete path is provided, search $PATH.
40208           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool INSTALL_NAME_TOOL=$tool_basename" >&5
40209 $as_echo "$as_me: Will search for user supplied tool INSTALL_NAME_TOOL=$tool_basename" >&6;}
40210           # Extract the first word of "$tool_basename", so it can be a program name with args.
40211 set dummy $tool_basename; ac_word=$2
40212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40213 $as_echo_n "checking for $ac_word... " >&6; }
40214 if ${ac_cv_path_INSTALL_NAME_TOOL+:} false; then :
40215   $as_echo_n "(cached) " >&6
40216 else
40217   case $INSTALL_NAME_TOOL in
40218   [\\/]* | ?:[\\/]*)
40219   ac_cv_path_INSTALL_NAME_TOOL="$INSTALL_NAME_TOOL" # Let the user override the test with a path.
40220   ;;
40221   *)
40222   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40223 for as_dir in $PATH
40224 do
40225   IFS=$as_save_IFS
40226   test -z "$as_dir" && as_dir=.
40227     for ac_exec_ext in '' $ac_executable_extensions; do
40228   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40229     ac_cv_path_INSTALL_NAME_TOOL="$as_dir/$ac_word$ac_exec_ext"
40230     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40231     break 2
40232   fi
40233 done
40234   done
40235 IFS=$as_save_IFS
40236 
40237   ;;
40238 esac
40239 fi
40240 INSTALL_NAME_TOOL=$ac_cv_path_INSTALL_NAME_TOOL
40241 if test -n "$INSTALL_NAME_TOOL"; then
40242   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL_NAME_TOOL" >&5
40243 $as_echo "$INSTALL_NAME_TOOL" >&6; }
40244 else
40245   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40246 $as_echo "no" >&6; }
40247 fi
40248 
40249 
40250           if test "x$INSTALL_NAME_TOOL" = x; then
40251             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40252           fi
40253         else
40254           # Otherwise we believe it is a complete path. Use it as it is.
40255           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool INSTALL_NAME_TOOL=$tool_specified" >&5
40256 $as_echo "$as_me: Will use user supplied tool INSTALL_NAME_TOOL=$tool_specified" >&6;}
40257           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for INSTALL_NAME_TOOL" >&5
40258 $as_echo_n "checking for INSTALL_NAME_TOOL... " >&6; }
40259           if test ! -x "$tool_specified"; then
40260             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40261 $as_echo "not found" >&6; }
40262             as_fn_error $? "User supplied tool INSTALL_NAME_TOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
40263           fi
40264           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40265 $as_echo "$tool_specified" >&6; }
40266         fi
40267       fi
40268     fi
40269 
40270   fi
40271 
40272 
40273 
40274   if test "x$INSTALL_NAME_TOOL" = x; then
40275     as_fn_error $? "Could not find required tool for INSTALL_NAME_TOOL" "$LINENO" 5
40276   fi
40277 
40278 
40279 
40280   # Only process if variable expands to non-empty
40281 
40282   if test "x$INSTALL_NAME_TOOL" != x; then
40283     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40284 
40285   # First separate the path from the arguments. This will split at the first
40286   # space.
40287   complete="$INSTALL_NAME_TOOL"
40288   path="${complete%% *}"
40289   tmp="$complete EOL"
40290   arguments="${tmp#* }"
40291 
40292   # Input might be given as Windows format, start by converting to
40293   # unix format.
40294   new_path=`$CYGPATH -u "$path"`
40295 
40296   # Now try to locate executable using which
40297   new_path=`$WHICH "$new_path" 2> /dev/null`
40298   # bat and cmd files are not always considered executable in cygwin causing which
40299   # to not find them
40300   if test "x$new_path" = x \
40301       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40302       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40303     new_path=`$CYGPATH -u "$path"`
40304   fi
40305   if test "x$new_path" = x; then
40306     # Oops. Which didn't find the executable.
40307     # The splitting of arguments from the executable at a space might have been incorrect,
40308     # since paths with space are more likely in Windows. Give it another try with the whole
40309     # argument.
40310     path="$complete"
40311     arguments="EOL"
40312     new_path=`$CYGPATH -u "$path"`
40313     new_path=`$WHICH "$new_path" 2> /dev/null`
40314     # bat and cmd files are not always considered executable in cygwin causing which
40315     # to not find them
40316     if test "x$new_path" = x \
40317         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40318         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40319       new_path=`$CYGPATH -u "$path"`
40320     fi
40321     if test "x$new_path" = x; then
40322       # It's still not found. Now this is an unrecoverable error.
40323       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&5
40324 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&6;}
40325       has_space=`$ECHO "$complete" | $GREP " "`
40326       if test "x$has_space" != x; then
40327         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40328 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40329       fi
40330       as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40331     fi
40332   fi
40333 
40334   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40335   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40336   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40337   # "foo.exe" is OK but "foo" is an error.
40338   #
40339   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40340   # It is also a way to make sure we got the proper file name for the real test later on.
40341   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40342   if test "x$test_shortpath" = x; then
40343     # Short path failed, file does not exist as specified.
40344     # Try adding .exe or .cmd
40345     if test -f "${new_path}.exe"; then
40346       input_to_shortpath="${new_path}.exe"
40347     elif test -f "${new_path}.cmd"; then
40348       input_to_shortpath="${new_path}.cmd"
40349     else
40350       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$new_path\", is invalid." >&5
40351 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$new_path\", is invalid." >&6;}
40352       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40353 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40354       as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40355     fi
40356   else
40357     input_to_shortpath="$new_path"
40358   fi
40359 
40360   # Call helper function which possibly converts this using DOS-style short mode.
40361   # If so, the updated path is stored in $new_path.
40362   new_path="$input_to_shortpath"
40363 
40364   input_path="$input_to_shortpath"
40365   # Check if we need to convert this using DOS-style short mode. If the path
40366   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40367   # take no chances and rewrite it.
40368   # Note: m4 eats our [], so we need to use [ and ] instead.
40369   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40370   if test "x$has_forbidden_chars" != x; then
40371     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40372     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40373     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40374     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40375       # Going to short mode and back again did indeed matter. Since short mode is
40376       # case insensitive, let's make it lowercase to improve readability.
40377       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40378       # Now convert it back to Unix-style (cygpath)
40379       input_path=`$CYGPATH -u "$shortmode_path"`
40380       new_path="$input_path"
40381     fi
40382   fi
40383 
40384   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40385   if test "x$test_cygdrive_prefix" = x; then
40386     # As a simple fix, exclude /usr/bin since it's not a real path.
40387     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40388       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40389       # a path prefixed by /cygdrive for fixpath to work.
40390       new_path="$CYGWIN_ROOT_PATH$input_path"
40391     fi
40392   fi
40393 
40394   # remove trailing .exe if any
40395   new_path="${new_path/%.exe/}"
40396 
40397     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40398 
40399   # First separate the path from the arguments. This will split at the first
40400   # space.
40401   complete="$INSTALL_NAME_TOOL"
40402   path="${complete%% *}"
40403   tmp="$complete EOL"
40404   arguments="${tmp#* }"
40405 
40406   # Input might be given as Windows format, start by converting to
40407   # unix format.
40408   new_path="$path"
40409 
40410   windows_path="$new_path"
40411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412     unix_path=`$CYGPATH -u "$windows_path"`
40413     new_path="$unix_path"
40414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40416     new_path="$unix_path"
40417   fi
40418 
40419 
40420   # Now try to locate executable using which
40421   new_path=`$WHICH "$new_path" 2> /dev/null`
40422 
40423   if test "x$new_path" = x; then
40424     # Oops. Which didn't find the executable.
40425     # The splitting of arguments from the executable at a space might have been incorrect,
40426     # since paths with space are more likely in Windows. Give it another try with the whole
40427     # argument.
40428     path="$complete"
40429     arguments="EOL"
40430     new_path="$path"
40431 
40432   windows_path="$new_path"
40433   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40434     unix_path=`$CYGPATH -u "$windows_path"`
40435     new_path="$unix_path"
40436   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40437     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40438     new_path="$unix_path"
40439   fi
40440 
40441 
40442     new_path=`$WHICH "$new_path" 2> /dev/null`
40443     # bat and cmd files are not always considered executable in MSYS causing which
40444     # to not find them
40445     if test "x$new_path" = x \
40446         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40447         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40448       new_path="$path"
40449 
40450   windows_path="$new_path"
40451   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40452     unix_path=`$CYGPATH -u "$windows_path"`
40453     new_path="$unix_path"
40454   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40455     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40456     new_path="$unix_path"
40457   fi
40458 
40459     fi
40460 
40461     if test "x$new_path" = x; then
40462       # It's still not found. Now this is an unrecoverable error.
40463       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&5
40464 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&6;}
40465       has_space=`$ECHO "$complete" | $GREP " "`
40466       if test "x$has_space" != x; then
40467         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40468 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40469       fi
40470       as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40471     fi
40472   fi
40473 
40474   # Now new_path has a complete unix path to the binary
40475   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40476     # Keep paths in /bin as-is, but remove trailing .exe if any
40477     new_path="${new_path/%.exe/}"
40478     # Do not save /bin paths to all_fixpath_prefixes!
40479   else
40480     # Not in mixed or Windows style, start by that.
40481     new_path=`cmd //c echo $new_path`
40482 
40483   input_path="$new_path"
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     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40492   fi
40493 
40494     # Output is in $new_path
40495 
40496   windows_path="$new_path"
40497   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40498     unix_path=`$CYGPATH -u "$windows_path"`
40499     new_path="$unix_path"
40500   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40501     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40502     new_path="$unix_path"
40503   fi
40504 
40505     # remove trailing .exe if any
40506     new_path="${new_path/%.exe/}"
40507 
40508     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40509     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40510   fi
40511 
40512     else
40513       # We're on a unix platform. Hooray! :)
40514       # First separate the path from the arguments. This will split at the first
40515       # space.
40516       complete="$INSTALL_NAME_TOOL"
40517       path="${complete%% *}"
40518       tmp="$complete EOL"
40519       arguments="${tmp#* }"
40520 
40521       # Cannot rely on the command "which" here since it doesn't always work.
40522       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40523       if test -z "$is_absolute_path"; then
40524         # Path to executable is not absolute. Find it.
40525         IFS_save="$IFS"
40526         IFS=:
40527         for p in $PATH; do
40528           if test -f "$p/$path" && test -x "$p/$path"; then
40529             new_path="$p/$path"
40530             break
40531           fi
40532         done
40533         IFS="$IFS_save"
40534       else
40535         # This is an absolute path, we can use it without further modifications.
40536         new_path="$path"
40537       fi
40538 
40539       if test "x$new_path" = x; then
40540         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&5
40541 $as_echo "$as_me: The path of INSTALL_NAME_TOOL, which resolves as \"$complete\", is not found." >&6;}
40542         has_space=`$ECHO "$complete" | $GREP " "`
40543         if test "x$has_space" != x; then
40544           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40545 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40546         fi
40547         as_fn_error $? "Cannot locate the the path of INSTALL_NAME_TOOL" "$LINENO" 5
40548       fi
40549     fi
40550 
40551     # Now join together the path and the arguments once again
40552     if test "x$arguments" != xEOL; then
40553       new_complete="$new_path ${arguments% *}"
40554     else
40555       new_complete="$new_path"
40556     fi
40557 
40558     if test "x$complete" != "x$new_complete"; then
40559       INSTALL_NAME_TOOL="$new_complete"
40560       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting INSTALL_NAME_TOOL to \"$new_complete\"" >&5
40561 $as_echo "$as_me: Rewriting INSTALL_NAME_TOOL to \"$new_complete\"" >&6;}
40562     fi
40563   fi
40564 
40565   fi
40566 
40567   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40568     # Extract the first word of "mt", so it can be a program name with args.
40569 set dummy mt; ac_word=$2
40570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40571 $as_echo_n "checking for $ac_word... " >&6; }
40572 if ${ac_cv_prog_MT+:} false; then :
40573   $as_echo_n "(cached) " >&6
40574 else
40575   if test -n "$MT"; then
40576   ac_cv_prog_MT="$MT" # Let the user override the test.
40577 else
40578   ac_prog_rejected=no
40579 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40580 for as_dir in $PATH
40581 do
40582   IFS=$as_save_IFS
40583   test -z "$as_dir" && as_dir=.
40584     for ac_exec_ext in '' $ac_executable_extensions; do
40585   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40586     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
40587        ac_prog_rejected=yes
40588        continue
40589      fi
40590     ac_cv_prog_MT="mt"
40591     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40592     break 2
40593   fi
40594 done
40595   done
40596 IFS=$as_save_IFS
40597 
40598 if test $ac_prog_rejected = yes; then
40599   # We found a bogon in the path, so make sure we never use it.
40600   set dummy $ac_cv_prog_MT
40601   shift
40602   if test $# != 0; then
40603     # We chose a different compiler from the bogus one.
40604     # However, it has the same basename, so the bogon will be chosen
40605     # first if we set MT to just the basename; use the full file name.
40606     shift
40607     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
40608   fi
40609 fi
40610 fi
40611 fi
40612 MT=$ac_cv_prog_MT
40613 if test -n "$MT"; then
40614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
40615 $as_echo "$MT" >&6; }
40616 else
40617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40618 $as_echo "no" >&6; }
40619 fi
40620 
40621 
40622 
40623   # Only process if variable expands to non-empty
40624 
40625   if test "x$MT" != x; then
40626     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40627 
40628   # First separate the path from the arguments. This will split at the first
40629   # space.
40630   complete="$MT"
40631   path="${complete%% *}"
40632   tmp="$complete EOL"
40633   arguments="${tmp#* }"
40634 
40635   # Input might be given as Windows format, start by converting to
40636   # unix format.
40637   new_path=`$CYGPATH -u "$path"`
40638 
40639   # Now try to locate executable using which
40640   new_path=`$WHICH "$new_path" 2> /dev/null`
40641   # bat and cmd files are not always considered executable in cygwin causing which
40642   # to not find them
40643   if test "x$new_path" = x \
40644       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40645       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40646     new_path=`$CYGPATH -u "$path"`
40647   fi
40648   if test "x$new_path" = x; then
40649     # Oops. Which didn't find the executable.
40650     # The splitting of arguments from the executable at a space might have been incorrect,
40651     # since paths with space are more likely in Windows. Give it another try with the whole
40652     # argument.
40653     path="$complete"
40654     arguments="EOL"
40655     new_path=`$CYGPATH -u "$path"`
40656     new_path=`$WHICH "$new_path" 2> /dev/null`
40657     # bat and cmd files are not always considered executable in cygwin causing which
40658     # to not find them
40659     if test "x$new_path" = x \
40660         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40661         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40662       new_path=`$CYGPATH -u "$path"`
40663     fi
40664     if test "x$new_path" = x; then
40665       # It's still not found. Now this is an unrecoverable error.
40666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
40667 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
40668       has_space=`$ECHO "$complete" | $GREP " "`
40669       if test "x$has_space" != x; then
40670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40672       fi
40673       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40674     fi
40675   fi
40676 
40677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40680   # "foo.exe" is OK but "foo" is an error.
40681   #
40682   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40683   # It is also a way to make sure we got the proper file name for the real test later on.
40684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40685   if test "x$test_shortpath" = x; then
40686     # Short path failed, file does not exist as specified.
40687     # Try adding .exe or .cmd
40688     if test -f "${new_path}.exe"; then
40689       input_to_shortpath="${new_path}.exe"
40690     elif test -f "${new_path}.cmd"; then
40691       input_to_shortpath="${new_path}.cmd"
40692     else
40693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
40694 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
40695       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40696 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40697       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40698     fi
40699   else
40700     input_to_shortpath="$new_path"
40701   fi
40702 
40703   # Call helper function which possibly converts this using DOS-style short mode.
40704   # If so, the updated path is stored in $new_path.
40705   new_path="$input_to_shortpath"
40706 
40707   input_path="$input_to_shortpath"
40708   # Check if we need to convert this using DOS-style short mode. If the path
40709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40710   # take no chances and rewrite it.
40711   # Note: m4 eats our [], so we need to use [ and ] instead.
40712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40713   if test "x$has_forbidden_chars" != x; then
40714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40715     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40716     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40717     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40718       # Going to short mode and back again did indeed matter. Since short mode is
40719       # case insensitive, let's make it lowercase to improve readability.
40720       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40721       # Now convert it back to Unix-style (cygpath)
40722       input_path=`$CYGPATH -u "$shortmode_path"`
40723       new_path="$input_path"
40724     fi
40725   fi
40726 
40727   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40728   if test "x$test_cygdrive_prefix" = x; then
40729     # As a simple fix, exclude /usr/bin since it's not a real path.
40730     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40731       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40732       # a path prefixed by /cygdrive for fixpath to work.
40733       new_path="$CYGWIN_ROOT_PATH$input_path"
40734     fi
40735   fi
40736 
40737   # remove trailing .exe if any
40738   new_path="${new_path/%.exe/}"
40739 
40740     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40741 
40742   # First separate the path from the arguments. This will split at the first
40743   # space.
40744   complete="$MT"
40745   path="${complete%% *}"
40746   tmp="$complete EOL"
40747   arguments="${tmp#* }"
40748 
40749   # Input might be given as Windows format, start by converting to
40750   # unix format.
40751   new_path="$path"
40752 
40753   windows_path="$new_path"
40754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40755     unix_path=`$CYGPATH -u "$windows_path"`
40756     new_path="$unix_path"
40757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40759     new_path="$unix_path"
40760   fi
40761 
40762 
40763   # Now try to locate executable using which
40764   new_path=`$WHICH "$new_path" 2> /dev/null`
40765 
40766   if test "x$new_path" = x; then
40767     # Oops. Which didn't find the executable.
40768     # The splitting of arguments from the executable at a space might have been incorrect,
40769     # since paths with space are more likely in Windows. Give it another try with the whole
40770     # argument.
40771     path="$complete"
40772     arguments="EOL"
40773     new_path="$path"
40774 
40775   windows_path="$new_path"
40776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40777     unix_path=`$CYGPATH -u "$windows_path"`
40778     new_path="$unix_path"
40779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40781     new_path="$unix_path"
40782   fi
40783 
40784 
40785     new_path=`$WHICH "$new_path" 2> /dev/null`
40786     # bat and cmd files are not always considered executable in MSYS causing which
40787     # to not find them
40788     if test "x$new_path" = x \
40789         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40790         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40791       new_path="$path"
40792 
40793   windows_path="$new_path"
40794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40795     unix_path=`$CYGPATH -u "$windows_path"`
40796     new_path="$unix_path"
40797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40799     new_path="$unix_path"
40800   fi
40801 
40802     fi
40803 
40804     if test "x$new_path" = x; then
40805       # It's still not found. Now this is an unrecoverable error.
40806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
40807 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
40808       has_space=`$ECHO "$complete" | $GREP " "`
40809       if test "x$has_space" != x; then
40810         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40811 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40812       fi
40813       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40814     fi
40815   fi
40816 
40817   # Now new_path has a complete unix path to the binary
40818   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40819     # Keep paths in /bin as-is, but remove trailing .exe if any
40820     new_path="${new_path/%.exe/}"
40821     # Do not save /bin paths to all_fixpath_prefixes!
40822   else
40823     # Not in mixed or Windows style, start by that.
40824     new_path=`cmd //c echo $new_path`
40825 
40826   input_path="$new_path"
40827   # Check if we need to convert this using DOS-style short mode. If the path
40828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40829   # take no chances and rewrite it.
40830   # Note: m4 eats our [], so we need to use [ and ] instead.
40831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40832   if test "x$has_forbidden_chars" != x; then
40833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40835   fi
40836 
40837     # Output is in $new_path
40838 
40839   windows_path="$new_path"
40840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40841     unix_path=`$CYGPATH -u "$windows_path"`
40842     new_path="$unix_path"
40843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40845     new_path="$unix_path"
40846   fi
40847 
40848     # remove trailing .exe if any
40849     new_path="${new_path/%.exe/}"
40850 
40851     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40852     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40853   fi
40854 
40855     else
40856       # We're on a unix platform. Hooray! :)
40857       # First separate the path from the arguments. This will split at the first
40858       # space.
40859       complete="$MT"
40860       path="${complete%% *}"
40861       tmp="$complete EOL"
40862       arguments="${tmp#* }"
40863 
40864       # Cannot rely on the command "which" here since it doesn't always work.
40865       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40866       if test -z "$is_absolute_path"; then
40867         # Path to executable is not absolute. Find it.
40868         IFS_save="$IFS"
40869         IFS=:
40870         for p in $PATH; do
40871           if test -f "$p/$path" && test -x "$p/$path"; then
40872             new_path="$p/$path"
40873             break
40874           fi
40875         done
40876         IFS="$IFS_save"
40877       else
40878         # This is an absolute path, we can use it without further modifications.
40879         new_path="$path"
40880       fi
40881 
40882       if test "x$new_path" = x; then
40883         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
40884 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
40885         has_space=`$ECHO "$complete" | $GREP " "`
40886         if test "x$has_space" != x; then
40887           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40888 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40889         fi
40890         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
40891       fi
40892     fi
40893 
40894     # Now join together the path and the arguments once again
40895     if test "x$arguments" != xEOL; then
40896       new_complete="$new_path ${arguments% *}"
40897     else
40898       new_complete="$new_path"
40899     fi
40900 
40901     if test "x$complete" != "x$new_complete"; then
40902       MT="$new_complete"
40903       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
40904 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
40905     fi
40906   fi
40907 
40908     # Setup the resource compiler (RC)
40909     # Extract the first word of "rc", so it can be a program name with args.
40910 set dummy rc; ac_word=$2
40911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40912 $as_echo_n "checking for $ac_word... " >&6; }
40913 if ${ac_cv_prog_RC+:} false; then :
40914   $as_echo_n "(cached) " >&6
40915 else
40916   if test -n "$RC"; then
40917   ac_cv_prog_RC="$RC" # Let the user override the test.
40918 else
40919   ac_prog_rejected=no
40920 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40921 for as_dir in $PATH
40922 do
40923   IFS=$as_save_IFS
40924   test -z "$as_dir" && as_dir=.
40925     for ac_exec_ext in '' $ac_executable_extensions; do
40926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40927     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
40928        ac_prog_rejected=yes
40929        continue
40930      fi
40931     ac_cv_prog_RC="rc"
40932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40933     break 2
40934   fi
40935 done
40936   done
40937 IFS=$as_save_IFS
40938 
40939 if test $ac_prog_rejected = yes; then
40940   # We found a bogon in the path, so make sure we never use it.
40941   set dummy $ac_cv_prog_RC
40942   shift
40943   if test $# != 0; then
40944     # We chose a different compiler from the bogus one.
40945     # However, it has the same basename, so the bogon will be chosen
40946     # first if we set RC to just the basename; use the full file name.
40947     shift
40948     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
40949   fi
40950 fi
40951 fi
40952 fi
40953 RC=$ac_cv_prog_RC
40954 if test -n "$RC"; then
40955   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
40956 $as_echo "$RC" >&6; }
40957 else
40958   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40959 $as_echo "no" >&6; }
40960 fi
40961 
40962 
40963 
40964   # Only process if variable expands to non-empty
40965 
40966   if test "x$RC" != x; then
40967     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40968 
40969   # First separate the path from the arguments. This will split at the first
40970   # space.
40971   complete="$RC"
40972   path="${complete%% *}"
40973   tmp="$complete EOL"
40974   arguments="${tmp#* }"
40975 
40976   # Input might be given as Windows format, start by converting to
40977   # unix format.
40978   new_path=`$CYGPATH -u "$path"`
40979 
40980   # Now try to locate executable using which
40981   new_path=`$WHICH "$new_path" 2> /dev/null`
40982   # bat and cmd files are not always considered executable in cygwin causing which
40983   # to not find them
40984   if test "x$new_path" = x \
40985       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40986       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40987     new_path=`$CYGPATH -u "$path"`
40988   fi
40989   if test "x$new_path" = x; then
40990     # Oops. Which didn't find the executable.
40991     # The splitting of arguments from the executable at a space might have been incorrect,
40992     # since paths with space are more likely in Windows. Give it another try with the whole
40993     # argument.
40994     path="$complete"
40995     arguments="EOL"
40996     new_path=`$CYGPATH -u "$path"`
40997     new_path=`$WHICH "$new_path" 2> /dev/null`
40998     # bat and cmd files are not always considered executable in cygwin causing which
40999     # to not find them
41000     if test "x$new_path" = x \
41001         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41002         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41003       new_path=`$CYGPATH -u "$path"`
41004     fi
41005     if test "x$new_path" = x; then
41006       # It's still not found. Now this is an unrecoverable error.
41007       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
41008 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
41009       has_space=`$ECHO "$complete" | $GREP " "`
41010       if test "x$has_space" != x; then
41011         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41012 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41013       fi
41014       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
41015     fi
41016   fi
41017 
41018   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41019   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41020   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41021   # "foo.exe" is OK but "foo" is an error.
41022   #
41023   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41024   # It is also a way to make sure we got the proper file name for the real test later on.
41025   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41026   if test "x$test_shortpath" = x; then
41027     # Short path failed, file does not exist as specified.
41028     # Try adding .exe or .cmd
41029     if test -f "${new_path}.exe"; then
41030       input_to_shortpath="${new_path}.exe"
41031     elif test -f "${new_path}.cmd"; then
41032       input_to_shortpath="${new_path}.cmd"
41033     else
41034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
41035 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
41036       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41037 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41038       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
41039     fi
41040   else
41041     input_to_shortpath="$new_path"
41042   fi
41043 
41044   # Call helper function which possibly converts this using DOS-style short mode.
41045   # If so, the updated path is stored in $new_path.
41046   new_path="$input_to_shortpath"
41047 
41048   input_path="$input_to_shortpath"
41049   # Check if we need to convert this using DOS-style short mode. If the path
41050   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41051   # take no chances and rewrite it.
41052   # Note: m4 eats our [], so we need to use [ and ] instead.
41053   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41054   if test "x$has_forbidden_chars" != x; then
41055     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41056     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41057     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41058     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41059       # Going to short mode and back again did indeed matter. Since short mode is
41060       # case insensitive, let's make it lowercase to improve readability.
41061       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41062       # Now convert it back to Unix-style (cygpath)
41063       input_path=`$CYGPATH -u "$shortmode_path"`
41064       new_path="$input_path"
41065     fi
41066   fi
41067 
41068   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41069   if test "x$test_cygdrive_prefix" = x; then
41070     # As a simple fix, exclude /usr/bin since it's not a real path.
41071     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41072       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41073       # a path prefixed by /cygdrive for fixpath to work.
41074       new_path="$CYGWIN_ROOT_PATH$input_path"
41075     fi
41076   fi
41077 
41078   # remove trailing .exe if any
41079   new_path="${new_path/%.exe/}"
41080 
41081     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41082 
41083   # First separate the path from the arguments. This will split at the first
41084   # space.
41085   complete="$RC"
41086   path="${complete%% *}"
41087   tmp="$complete EOL"
41088   arguments="${tmp#* }"
41089 
41090   # Input might be given as Windows format, start by converting to
41091   # unix format.
41092   new_path="$path"
41093 
41094   windows_path="$new_path"
41095   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41096     unix_path=`$CYGPATH -u "$windows_path"`
41097     new_path="$unix_path"
41098   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41099     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41100     new_path="$unix_path"
41101   fi
41102 
41103 
41104   # Now try to locate executable using which
41105   new_path=`$WHICH "$new_path" 2> /dev/null`
41106 
41107   if test "x$new_path" = x; then
41108     # Oops. Which didn't find the executable.
41109     # The splitting of arguments from the executable at a space might have been incorrect,
41110     # since paths with space are more likely in Windows. Give it another try with the whole
41111     # argument.
41112     path="$complete"
41113     arguments="EOL"
41114     new_path="$path"
41115 
41116   windows_path="$new_path"
41117   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41118     unix_path=`$CYGPATH -u "$windows_path"`
41119     new_path="$unix_path"
41120   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41121     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41122     new_path="$unix_path"
41123   fi
41124 
41125 
41126     new_path=`$WHICH "$new_path" 2> /dev/null`
41127     # bat and cmd files are not always considered executable in MSYS causing which
41128     # to not find them
41129     if test "x$new_path" = x \
41130         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41131         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41132       new_path="$path"
41133 
41134   windows_path="$new_path"
41135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41136     unix_path=`$CYGPATH -u "$windows_path"`
41137     new_path="$unix_path"
41138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41140     new_path="$unix_path"
41141   fi
41142 
41143     fi
41144 
41145     if test "x$new_path" = x; then
41146       # It's still not found. Now this is an unrecoverable error.
41147       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
41148 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
41149       has_space=`$ECHO "$complete" | $GREP " "`
41150       if test "x$has_space" != x; then
41151         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41152 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41153       fi
41154       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
41155     fi
41156   fi
41157 
41158   # Now new_path has a complete unix path to the binary
41159   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41160     # Keep paths in /bin as-is, but remove trailing .exe if any
41161     new_path="${new_path/%.exe/}"
41162     # Do not save /bin paths to all_fixpath_prefixes!
41163   else
41164     # Not in mixed or Windows style, start by that.
41165     new_path=`cmd //c echo $new_path`
41166 
41167   input_path="$new_path"
41168   # Check if we need to convert this using DOS-style short mode. If the path
41169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41170   # take no chances and rewrite it.
41171   # Note: m4 eats our [], so we need to use [ and ] instead.
41172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41173   if test "x$has_forbidden_chars" != x; then
41174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41175     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41176   fi
41177 
41178     # Output is in $new_path
41179 
41180   windows_path="$new_path"
41181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41182     unix_path=`$CYGPATH -u "$windows_path"`
41183     new_path="$unix_path"
41184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41186     new_path="$unix_path"
41187   fi
41188 
41189     # remove trailing .exe if any
41190     new_path="${new_path/%.exe/}"
41191 
41192     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41193     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41194   fi
41195 
41196     else
41197       # We're on a unix platform. Hooray! :)
41198       # First separate the path from the arguments. This will split at the first
41199       # space.
41200       complete="$RC"
41201       path="${complete%% *}"
41202       tmp="$complete EOL"
41203       arguments="${tmp#* }"
41204 
41205       # Cannot rely on the command "which" here since it doesn't always work.
41206       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41207       if test -z "$is_absolute_path"; then
41208         # Path to executable is not absolute. Find it.
41209         IFS_save="$IFS"
41210         IFS=:
41211         for p in $PATH; do
41212           if test -f "$p/$path" && test -x "$p/$path"; then
41213             new_path="$p/$path"
41214             break
41215           fi
41216         done
41217         IFS="$IFS_save"
41218       else
41219         # This is an absolute path, we can use it without further modifications.
41220         new_path="$path"
41221       fi
41222 
41223       if test "x$new_path" = x; then
41224         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
41225 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
41226         has_space=`$ECHO "$complete" | $GREP " "`
41227         if test "x$has_space" != x; then
41228           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41229 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41230         fi
41231         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
41232       fi
41233     fi
41234 
41235     # Now join together the path and the arguments once again
41236     if test "x$arguments" != xEOL; then
41237       new_complete="$new_path ${arguments% *}"
41238     else
41239       new_complete="$new_path"
41240     fi
41241 
41242     if test "x$complete" != "x$new_complete"; then
41243       RC="$new_complete"
41244       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
41245 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
41246     fi
41247   fi
41248 
41249     # Extract the first word of "dumpbin", so it can be a program name with args.
41250 set dummy dumpbin; ac_word=$2
41251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41252 $as_echo_n "checking for $ac_word... " >&6; }
41253 if ${ac_cv_prog_DUMPBIN+:} false; then :
41254   $as_echo_n "(cached) " >&6
41255 else
41256   if test -n "$DUMPBIN"; then
41257   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
41258 else
41259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41260 for as_dir in $PATH
41261 do
41262   IFS=$as_save_IFS
41263   test -z "$as_dir" && as_dir=.
41264     for ac_exec_ext in '' $ac_executable_extensions; do
41265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41266     ac_cv_prog_DUMPBIN="dumpbin"
41267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41268     break 2
41269   fi
41270 done
41271   done
41272 IFS=$as_save_IFS
41273 
41274 fi
41275 fi
41276 DUMPBIN=$ac_cv_prog_DUMPBIN
41277 if test -n "$DUMPBIN"; then
41278   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
41279 $as_echo "$DUMPBIN" >&6; }
41280 else
41281   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41282 $as_echo "no" >&6; }
41283 fi
41284 
41285 
41286 
41287   # Only process if variable expands to non-empty
41288 
41289   if test "x$DUMPBIN" != x; then
41290     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41291 
41292   # First separate the path from the arguments. This will split at the first
41293   # space.
41294   complete="$DUMPBIN"
41295   path="${complete%% *}"
41296   tmp="$complete EOL"
41297   arguments="${tmp#* }"
41298 
41299   # Input might be given as Windows format, start by converting to
41300   # unix format.
41301   new_path=`$CYGPATH -u "$path"`
41302 
41303   # Now try to locate executable using which
41304   new_path=`$WHICH "$new_path" 2> /dev/null`
41305   # bat and cmd files are not always considered executable in cygwin causing which
41306   # to not find them
41307   if test "x$new_path" = x \
41308       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41309       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41310     new_path=`$CYGPATH -u "$path"`
41311   fi
41312   if test "x$new_path" = x; then
41313     # Oops. Which didn't find the executable.
41314     # The splitting of arguments from the executable at a space might have been incorrect,
41315     # since paths with space are more likely in Windows. Give it another try with the whole
41316     # argument.
41317     path="$complete"
41318     arguments="EOL"
41319     new_path=`$CYGPATH -u "$path"`
41320     new_path=`$WHICH "$new_path" 2> /dev/null`
41321     # bat and cmd files are not always considered executable in cygwin causing which
41322     # to not find them
41323     if test "x$new_path" = x \
41324         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41325         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41326       new_path=`$CYGPATH -u "$path"`
41327     fi
41328     if test "x$new_path" = x; then
41329       # It's still not found. Now this is an unrecoverable error.
41330       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
41331 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
41332       has_space=`$ECHO "$complete" | $GREP " "`
41333       if test "x$has_space" != x; then
41334         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41335 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41336       fi
41337       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41338     fi
41339   fi
41340 
41341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41344   # "foo.exe" is OK but "foo" is an error.
41345   #
41346   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41347   # It is also a way to make sure we got the proper file name for the real test later on.
41348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41349   if test "x$test_shortpath" = x; then
41350     # Short path failed, file does not exist as specified.
41351     # Try adding .exe or .cmd
41352     if test -f "${new_path}.exe"; then
41353       input_to_shortpath="${new_path}.exe"
41354     elif test -f "${new_path}.cmd"; then
41355       input_to_shortpath="${new_path}.cmd"
41356     else
41357       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
41358 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
41359       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41360 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41361       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41362     fi
41363   else
41364     input_to_shortpath="$new_path"
41365   fi
41366 
41367   # Call helper function which possibly converts this using DOS-style short mode.
41368   # If so, the updated path is stored in $new_path.
41369   new_path="$input_to_shortpath"
41370 
41371   input_path="$input_to_shortpath"
41372   # Check if we need to convert this using DOS-style short mode. If the path
41373   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41374   # take no chances and rewrite it.
41375   # Note: m4 eats our [], so we need to use [ and ] instead.
41376   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41377   if test "x$has_forbidden_chars" != x; then
41378     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41379     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41380     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41381     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41382       # Going to short mode and back again did indeed matter. Since short mode is
41383       # case insensitive, let's make it lowercase to improve readability.
41384       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41385       # Now convert it back to Unix-style (cygpath)
41386       input_path=`$CYGPATH -u "$shortmode_path"`
41387       new_path="$input_path"
41388     fi
41389   fi
41390 
41391   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41392   if test "x$test_cygdrive_prefix" = x; then
41393     # As a simple fix, exclude /usr/bin since it's not a real path.
41394     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41395       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41396       # a path prefixed by /cygdrive for fixpath to work.
41397       new_path="$CYGWIN_ROOT_PATH$input_path"
41398     fi
41399   fi
41400 
41401   # remove trailing .exe if any
41402   new_path="${new_path/%.exe/}"
41403 
41404     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41405 
41406   # First separate the path from the arguments. This will split at the first
41407   # space.
41408   complete="$DUMPBIN"
41409   path="${complete%% *}"
41410   tmp="$complete EOL"
41411   arguments="${tmp#* }"
41412 
41413   # Input might be given as Windows format, start by converting to
41414   # unix format.
41415   new_path="$path"
41416 
41417   windows_path="$new_path"
41418   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41419     unix_path=`$CYGPATH -u "$windows_path"`
41420     new_path="$unix_path"
41421   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41422     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41423     new_path="$unix_path"
41424   fi
41425 
41426 
41427   # Now try to locate executable using which
41428   new_path=`$WHICH "$new_path" 2> /dev/null`
41429 
41430   if test "x$new_path" = x; then
41431     # Oops. Which didn't find the executable.
41432     # The splitting of arguments from the executable at a space might have been incorrect,
41433     # since paths with space are more likely in Windows. Give it another try with the whole
41434     # argument.
41435     path="$complete"
41436     arguments="EOL"
41437     new_path="$path"
41438 
41439   windows_path="$new_path"
41440   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41441     unix_path=`$CYGPATH -u "$windows_path"`
41442     new_path="$unix_path"
41443   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41444     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41445     new_path="$unix_path"
41446   fi
41447 
41448 
41449     new_path=`$WHICH "$new_path" 2> /dev/null`
41450     # bat and cmd files are not always considered executable in MSYS causing which
41451     # to not find them
41452     if test "x$new_path" = x \
41453         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41454         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41455       new_path="$path"
41456 
41457   windows_path="$new_path"
41458   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41459     unix_path=`$CYGPATH -u "$windows_path"`
41460     new_path="$unix_path"
41461   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41462     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41463     new_path="$unix_path"
41464   fi
41465 
41466     fi
41467 
41468     if test "x$new_path" = x; then
41469       # It's still not found. Now this is an unrecoverable error.
41470       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
41471 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
41472       has_space=`$ECHO "$complete" | $GREP " "`
41473       if test "x$has_space" != x; then
41474         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41475 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41476       fi
41477       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41478     fi
41479   fi
41480 
41481   # Now new_path has a complete unix path to the binary
41482   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41483     # Keep paths in /bin as-is, but remove trailing .exe if any
41484     new_path="${new_path/%.exe/}"
41485     # Do not save /bin paths to all_fixpath_prefixes!
41486   else
41487     # Not in mixed or Windows style, start by that.
41488     new_path=`cmd //c echo $new_path`
41489 
41490   input_path="$new_path"
41491   # Check if we need to convert this using DOS-style short mode. If the path
41492   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41493   # take no chances and rewrite it.
41494   # Note: m4 eats our [], so we need to use [ and ] instead.
41495   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41496   if test "x$has_forbidden_chars" != x; then
41497     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41498     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41499   fi
41500 
41501     # Output is in $new_path
41502 
41503   windows_path="$new_path"
41504   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41505     unix_path=`$CYGPATH -u "$windows_path"`
41506     new_path="$unix_path"
41507   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41508     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41509     new_path="$unix_path"
41510   fi
41511 
41512     # remove trailing .exe if any
41513     new_path="${new_path/%.exe/}"
41514 
41515     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41516     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41517   fi
41518 
41519     else
41520       # We're on a unix platform. Hooray! :)
41521       # First separate the path from the arguments. This will split at the first
41522       # space.
41523       complete="$DUMPBIN"
41524       path="${complete%% *}"
41525       tmp="$complete EOL"
41526       arguments="${tmp#* }"
41527 
41528       # Cannot rely on the command "which" here since it doesn't always work.
41529       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41530       if test -z "$is_absolute_path"; then
41531         # Path to executable is not absolute. Find it.
41532         IFS_save="$IFS"
41533         IFS=:
41534         for p in $PATH; do
41535           if test -f "$p/$path" && test -x "$p/$path"; then
41536             new_path="$p/$path"
41537             break
41538           fi
41539         done
41540         IFS="$IFS_save"
41541       else
41542         # This is an absolute path, we can use it without further modifications.
41543         new_path="$path"
41544       fi
41545 
41546       if test "x$new_path" = x; then
41547         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
41548 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
41549         has_space=`$ECHO "$complete" | $GREP " "`
41550         if test "x$has_space" != x; then
41551           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41552 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41553         fi
41554         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
41555       fi
41556     fi
41557 
41558     # Now join together the path and the arguments once again
41559     if test "x$arguments" != xEOL; then
41560       new_complete="$new_path ${arguments% *}"
41561     else
41562       new_complete="$new_path"
41563     fi
41564 
41565     if test "x$complete" != "x$new_complete"; then
41566       DUMPBIN="$new_complete"
41567       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
41568 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
41569     fi
41570   fi
41571 
41572     # We need to check for 'msbuild.exe' because at the place where we expect to
41573     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
41574     # won't find the 'msbuild.exe' executable in that case (and the
41575     # 'ac_executable_extensions' is unusable due to performance reasons).
41576     # Notice that we intentionally don't fix up the path to MSBUILD because we
41577     # will call it in a DOS shell during freetype detection on Windows (see
41578     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
41579     # Extract the first word of "msbuild.exe", so it can be a program name with args.
41580 set dummy msbuild.exe; ac_word=$2
41581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41582 $as_echo_n "checking for $ac_word... " >&6; }
41583 if ${ac_cv_prog_MSBUILD+:} false; then :
41584   $as_echo_n "(cached) " >&6
41585 else
41586   if test -n "$MSBUILD"; then
41587   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
41588 else
41589 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41590 for as_dir in $PATH
41591 do
41592   IFS=$as_save_IFS
41593   test -z "$as_dir" && as_dir=.
41594     for ac_exec_ext in '' $ac_executable_extensions; do
41595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41596     ac_cv_prog_MSBUILD="msbuild.exe"
41597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41598     break 2
41599   fi
41600 done
41601   done
41602 IFS=$as_save_IFS
41603 
41604 fi
41605 fi
41606 MSBUILD=$ac_cv_prog_MSBUILD
41607 if test -n "$MSBUILD"; then
41608   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
41609 $as_echo "$MSBUILD" >&6; }
41610 else
41611   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41612 $as_echo "no" >&6; }
41613 fi
41614 
41615 
41616   fi
41617 
41618   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41619 
41620 
41621   # Publish this variable in the help.
41622 
41623 
41624   if [ -z "${STRIP+x}" ]; then
41625     # The variable is not set by user, try to locate tool using the code snippet
41626     for ac_prog in strip
41627 do
41628   # Extract the first word of "$ac_prog", so it can be a program name with args.
41629 set dummy $ac_prog; ac_word=$2
41630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41631 $as_echo_n "checking for $ac_word... " >&6; }
41632 if ${ac_cv_path_STRIP+:} false; then :
41633   $as_echo_n "(cached) " >&6
41634 else
41635   case $STRIP in
41636   [\\/]* | ?:[\\/]*)
41637   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41638   ;;
41639   *)
41640   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41641 for as_dir in $PATH
41642 do
41643   IFS=$as_save_IFS
41644   test -z "$as_dir" && as_dir=.
41645     for ac_exec_ext in '' $ac_executable_extensions; do
41646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41647     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41649     break 2
41650   fi
41651 done
41652   done
41653 IFS=$as_save_IFS
41654 
41655   ;;
41656 esac
41657 fi
41658 STRIP=$ac_cv_path_STRIP
41659 if test -n "$STRIP"; then
41660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41661 $as_echo "$STRIP" >&6; }
41662 else
41663   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41664 $as_echo "no" >&6; }
41665 fi
41666 
41667 
41668   test -n "$STRIP" && break
41669 done
41670 
41671   else
41672     # The variable is set, but is it from the command line or the environment?
41673 
41674     # Try to remove the string !STRIP! from our list.
41675     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41676     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41677       # If it failed, the variable was not from the command line. Ignore it,
41678       # but warn the user (except for BASH, which is always set by the calling BASH).
41679       if test "xSTRIP" != xBASH; then
41680         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41681 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41682       fi
41683       # Try to locate tool using the code snippet
41684       for ac_prog in strip
41685 do
41686   # Extract the first word of "$ac_prog", so it can be a program name with args.
41687 set dummy $ac_prog; ac_word=$2
41688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41689 $as_echo_n "checking for $ac_word... " >&6; }
41690 if ${ac_cv_path_STRIP+:} false; then :
41691   $as_echo_n "(cached) " >&6
41692 else
41693   case $STRIP in
41694   [\\/]* | ?:[\\/]*)
41695   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41696   ;;
41697   *)
41698   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41699 for as_dir in $PATH
41700 do
41701   IFS=$as_save_IFS
41702   test -z "$as_dir" && as_dir=.
41703     for ac_exec_ext in '' $ac_executable_extensions; do
41704   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41705     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41706     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41707     break 2
41708   fi
41709 done
41710   done
41711 IFS=$as_save_IFS
41712 
41713   ;;
41714 esac
41715 fi
41716 STRIP=$ac_cv_path_STRIP
41717 if test -n "$STRIP"; then
41718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41719 $as_echo "$STRIP" >&6; }
41720 else
41721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41722 $as_echo "no" >&6; }
41723 fi
41724 
41725 
41726   test -n "$STRIP" && break
41727 done
41728 
41729     else
41730       # If it succeeded, then it was overridden by the user. We will use it
41731       # for the tool.
41732 
41733       # First remove it from the list of overridden variables, so we can test
41734       # for unknown variables in the end.
41735       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41736 
41737       # Check if we try to supply an empty value
41738       if test "x$STRIP" = x; then
41739         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41740 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41741         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41742 $as_echo_n "checking for STRIP... " >&6; }
41743         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41744 $as_echo "disabled" >&6; }
41745       else
41746         # Check if the provided tool contains a complete path.
41747         tool_specified="$STRIP"
41748         tool_basename="${tool_specified##*/}"
41749         if test "x$tool_basename" = "x$tool_specified"; then
41750           # A command without a complete path is provided, search $PATH.
41751           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41752 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41753           # Extract the first word of "$tool_basename", so it can be a program name with args.
41754 set dummy $tool_basename; ac_word=$2
41755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41756 $as_echo_n "checking for $ac_word... " >&6; }
41757 if ${ac_cv_path_STRIP+:} false; then :
41758   $as_echo_n "(cached) " >&6
41759 else
41760   case $STRIP in
41761   [\\/]* | ?:[\\/]*)
41762   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41763   ;;
41764   *)
41765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41766 for as_dir in $PATH
41767 do
41768   IFS=$as_save_IFS
41769   test -z "$as_dir" && as_dir=.
41770     for ac_exec_ext in '' $ac_executable_extensions; do
41771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41772     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41774     break 2
41775   fi
41776 done
41777   done
41778 IFS=$as_save_IFS
41779 
41780   ;;
41781 esac
41782 fi
41783 STRIP=$ac_cv_path_STRIP
41784 if test -n "$STRIP"; then
41785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41786 $as_echo "$STRIP" >&6; }
41787 else
41788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41789 $as_echo "no" >&6; }
41790 fi
41791 
41792 
41793           if test "x$STRIP" = x; then
41794             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41795           fi
41796         else
41797           # Otherwise we believe it is a complete path. Use it as it is.
41798           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41799 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41800           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41801 $as_echo_n "checking for STRIP... " >&6; }
41802           if test ! -x "$tool_specified"; then
41803             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41804 $as_echo "not found" >&6; }
41805             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41806           fi
41807           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41808 $as_echo "$tool_specified" >&6; }
41809         fi
41810       fi
41811     fi
41812 
41813   fi
41814 
41815 
41816 
41817   # Only process if variable expands to non-empty
41818 
41819   if test "x$STRIP" != x; then
41820     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41821 
41822   # First separate the path from the arguments. This will split at the first
41823   # space.
41824   complete="$STRIP"
41825   path="${complete%% *}"
41826   tmp="$complete EOL"
41827   arguments="${tmp#* }"
41828 
41829   # Input might be given as Windows format, start by converting to
41830   # unix format.
41831   new_path=`$CYGPATH -u "$path"`
41832 
41833   # Now try to locate executable using which
41834   new_path=`$WHICH "$new_path" 2> /dev/null`
41835   # bat and cmd files are not always considered executable in cygwin causing which
41836   # to not find them
41837   if test "x$new_path" = x \
41838       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41839       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41840     new_path=`$CYGPATH -u "$path"`
41841   fi
41842   if test "x$new_path" = x; then
41843     # Oops. Which didn't find the executable.
41844     # The splitting of arguments from the executable at a space might have been incorrect,
41845     # since paths with space are more likely in Windows. Give it another try with the whole
41846     # argument.
41847     path="$complete"
41848     arguments="EOL"
41849     new_path=`$CYGPATH -u "$path"`
41850     new_path=`$WHICH "$new_path" 2> /dev/null`
41851     # bat and cmd files are not always considered executable in cygwin causing which
41852     # to not find them
41853     if test "x$new_path" = x \
41854         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41855         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41856       new_path=`$CYGPATH -u "$path"`
41857     fi
41858     if test "x$new_path" = x; then
41859       # It's still not found. Now this is an unrecoverable error.
41860       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41861 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41862       has_space=`$ECHO "$complete" | $GREP " "`
41863       if test "x$has_space" != x; then
41864         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41865 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41866       fi
41867       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41868     fi
41869   fi
41870 
41871   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41872   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41873   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41874   # "foo.exe" is OK but "foo" is an error.
41875   #
41876   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41877   # It is also a way to make sure we got the proper file name for the real test later on.
41878   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41879   if test "x$test_shortpath" = x; then
41880     # Short path failed, file does not exist as specified.
41881     # Try adding .exe or .cmd
41882     if test -f "${new_path}.exe"; then
41883       input_to_shortpath="${new_path}.exe"
41884     elif test -f "${new_path}.cmd"; then
41885       input_to_shortpath="${new_path}.cmd"
41886     else
41887       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41888 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41889       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41890 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41891       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41892     fi
41893   else
41894     input_to_shortpath="$new_path"
41895   fi
41896 
41897   # Call helper function which possibly converts this using DOS-style short mode.
41898   # If so, the updated path is stored in $new_path.
41899   new_path="$input_to_shortpath"
41900 
41901   input_path="$input_to_shortpath"
41902   # Check if we need to convert this using DOS-style short mode. If the path
41903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41904   # take no chances and rewrite it.
41905   # Note: m4 eats our [], so we need to use [ and ] instead.
41906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41907   if test "x$has_forbidden_chars" != x; then
41908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41912       # Going to short mode and back again did indeed matter. Since short mode is
41913       # case insensitive, let's make it lowercase to improve readability.
41914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41915       # Now convert it back to Unix-style (cygpath)
41916       input_path=`$CYGPATH -u "$shortmode_path"`
41917       new_path="$input_path"
41918     fi
41919   fi
41920 
41921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41922   if test "x$test_cygdrive_prefix" = x; then
41923     # As a simple fix, exclude /usr/bin since it's not a real path.
41924     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41926       # a path prefixed by /cygdrive for fixpath to work.
41927       new_path="$CYGWIN_ROOT_PATH$input_path"
41928     fi
41929   fi
41930 
41931   # remove trailing .exe if any
41932   new_path="${new_path/%.exe/}"
41933 
41934     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41935 
41936   # First separate the path from the arguments. This will split at the first
41937   # space.
41938   complete="$STRIP"
41939   path="${complete%% *}"
41940   tmp="$complete EOL"
41941   arguments="${tmp#* }"
41942 
41943   # Input might be given as Windows format, start by converting to
41944   # unix format.
41945   new_path="$path"
41946 
41947   windows_path="$new_path"
41948   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41949     unix_path=`$CYGPATH -u "$windows_path"`
41950     new_path="$unix_path"
41951   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41952     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41953     new_path="$unix_path"
41954   fi
41955 
41956 
41957   # Now try to locate executable using which
41958   new_path=`$WHICH "$new_path" 2> /dev/null`
41959 
41960   if test "x$new_path" = x; then
41961     # Oops. Which didn't find the executable.
41962     # The splitting of arguments from the executable at a space might have been incorrect,
41963     # since paths with space are more likely in Windows. Give it another try with the whole
41964     # argument.
41965     path="$complete"
41966     arguments="EOL"
41967     new_path="$path"
41968 
41969   windows_path="$new_path"
41970   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41971     unix_path=`$CYGPATH -u "$windows_path"`
41972     new_path="$unix_path"
41973   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41974     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41975     new_path="$unix_path"
41976   fi
41977 
41978 
41979     new_path=`$WHICH "$new_path" 2> /dev/null`
41980     # bat and cmd files are not always considered executable in MSYS causing which
41981     # to not find them
41982     if test "x$new_path" = x \
41983         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41984         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41985       new_path="$path"
41986 
41987   windows_path="$new_path"
41988   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41989     unix_path=`$CYGPATH -u "$windows_path"`
41990     new_path="$unix_path"
41991   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41992     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41993     new_path="$unix_path"
41994   fi
41995 
41996     fi
41997 
41998     if test "x$new_path" = x; then
41999       # It's still not found. Now this is an unrecoverable error.
42000       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42001 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42002       has_space=`$ECHO "$complete" | $GREP " "`
42003       if test "x$has_space" != x; then
42004         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42005 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42006       fi
42007       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42008     fi
42009   fi
42010 
42011   # Now new_path has a complete unix path to the binary
42012   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42013     # Keep paths in /bin as-is, but remove trailing .exe if any
42014     new_path="${new_path/%.exe/}"
42015     # Do not save /bin paths to all_fixpath_prefixes!
42016   else
42017     # Not in mixed or Windows style, start by that.
42018     new_path=`cmd //c echo $new_path`
42019 
42020   input_path="$new_path"
42021   # Check if we need to convert this using DOS-style short mode. If the path
42022   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42023   # take no chances and rewrite it.
42024   # Note: m4 eats our [], so we need to use [ and ] instead.
42025   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42026   if test "x$has_forbidden_chars" != x; then
42027     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42028     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42029   fi
42030 
42031     # Output is in $new_path
42032 
42033   windows_path="$new_path"
42034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42035     unix_path=`$CYGPATH -u "$windows_path"`
42036     new_path="$unix_path"
42037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42039     new_path="$unix_path"
42040   fi
42041 
42042     # remove trailing .exe if any
42043     new_path="${new_path/%.exe/}"
42044 
42045     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42046     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42047   fi
42048 
42049     else
42050       # We're on a unix platform. Hooray! :)
42051       # First separate the path from the arguments. This will split at the first
42052       # space.
42053       complete="$STRIP"
42054       path="${complete%% *}"
42055       tmp="$complete EOL"
42056       arguments="${tmp#* }"
42057 
42058       # Cannot rely on the command "which" here since it doesn't always work.
42059       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42060       if test -z "$is_absolute_path"; then
42061         # Path to executable is not absolute. Find it.
42062         IFS_save="$IFS"
42063         IFS=:
42064         for p in $PATH; do
42065           if test -f "$p/$path" && test -x "$p/$path"; then
42066             new_path="$p/$path"
42067             break
42068           fi
42069         done
42070         IFS="$IFS_save"
42071       else
42072         # This is an absolute path, we can use it without further modifications.
42073         new_path="$path"
42074       fi
42075 
42076       if test "x$new_path" = x; then
42077         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42078 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42079         has_space=`$ECHO "$complete" | $GREP " "`
42080         if test "x$has_space" != x; then
42081           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42082 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42083         fi
42084         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42085       fi
42086     fi
42087 
42088     # Now join together the path and the arguments once again
42089     if test "x$arguments" != xEOL; then
42090       new_complete="$new_path ${arguments% *}"
42091     else
42092       new_complete="$new_path"
42093     fi
42094 
42095     if test "x$complete" != "x$new_complete"; then
42096       STRIP="$new_complete"
42097       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42098 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42099     fi
42100   fi
42101 
42102 
42103 
42104   # Publish this variable in the help.
42105 
42106 
42107   if [ -z "${NM+x}" ]; then
42108     # The variable is not set by user, try to locate tool using the code snippet
42109     for ac_prog in nm
42110 do
42111   # Extract the first word of "$ac_prog", so it can be a program name with args.
42112 set dummy $ac_prog; ac_word=$2
42113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42114 $as_echo_n "checking for $ac_word... " >&6; }
42115 if ${ac_cv_path_NM+:} false; then :
42116   $as_echo_n "(cached) " >&6
42117 else
42118   case $NM in
42119   [\\/]* | ?:[\\/]*)
42120   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42121   ;;
42122   *)
42123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42124 for as_dir in $PATH
42125 do
42126   IFS=$as_save_IFS
42127   test -z "$as_dir" && as_dir=.
42128     for ac_exec_ext in '' $ac_executable_extensions; do
42129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42130     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42132     break 2
42133   fi
42134 done
42135   done
42136 IFS=$as_save_IFS
42137 
42138   ;;
42139 esac
42140 fi
42141 NM=$ac_cv_path_NM
42142 if test -n "$NM"; then
42143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42144 $as_echo "$NM" >&6; }
42145 else
42146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42147 $as_echo "no" >&6; }
42148 fi
42149 
42150 
42151   test -n "$NM" && break
42152 done
42153 
42154   else
42155     # The variable is set, but is it from the command line or the environment?
42156 
42157     # Try to remove the string !NM! from our list.
42158     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42159     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42160       # If it failed, the variable was not from the command line. Ignore it,
42161       # but warn the user (except for BASH, which is always set by the calling BASH).
42162       if test "xNM" != xBASH; then
42163         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42164 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42165       fi
42166       # Try to locate tool using the code snippet
42167       for ac_prog in nm
42168 do
42169   # Extract the first word of "$ac_prog", so it can be a program name with args.
42170 set dummy $ac_prog; ac_word=$2
42171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42172 $as_echo_n "checking for $ac_word... " >&6; }
42173 if ${ac_cv_path_NM+:} false; then :
42174   $as_echo_n "(cached) " >&6
42175 else
42176   case $NM in
42177   [\\/]* | ?:[\\/]*)
42178   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42179   ;;
42180   *)
42181   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42182 for as_dir in $PATH
42183 do
42184   IFS=$as_save_IFS
42185   test -z "$as_dir" && as_dir=.
42186     for ac_exec_ext in '' $ac_executable_extensions; do
42187   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42188     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42189     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42190     break 2
42191   fi
42192 done
42193   done
42194 IFS=$as_save_IFS
42195 
42196   ;;
42197 esac
42198 fi
42199 NM=$ac_cv_path_NM
42200 if test -n "$NM"; then
42201   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42202 $as_echo "$NM" >&6; }
42203 else
42204   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42205 $as_echo "no" >&6; }
42206 fi
42207 
42208 
42209   test -n "$NM" && break
42210 done
42211 
42212     else
42213       # If it succeeded, then it was overridden by the user. We will use it
42214       # for the tool.
42215 
42216       # First remove it from the list of overridden variables, so we can test
42217       # for unknown variables in the end.
42218       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42219 
42220       # Check if we try to supply an empty value
42221       if test "x$NM" = x; then
42222         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42223 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42224         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42225 $as_echo_n "checking for NM... " >&6; }
42226         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42227 $as_echo "disabled" >&6; }
42228       else
42229         # Check if the provided tool contains a complete path.
42230         tool_specified="$NM"
42231         tool_basename="${tool_specified##*/}"
42232         if test "x$tool_basename" = "x$tool_specified"; then
42233           # A command without a complete path is provided, search $PATH.
42234           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42235 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42236           # Extract the first word of "$tool_basename", so it can be a program name with args.
42237 set dummy $tool_basename; ac_word=$2
42238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42239 $as_echo_n "checking for $ac_word... " >&6; }
42240 if ${ac_cv_path_NM+:} false; then :
42241   $as_echo_n "(cached) " >&6
42242 else
42243   case $NM in
42244   [\\/]* | ?:[\\/]*)
42245   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42246   ;;
42247   *)
42248   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42249 for as_dir in $PATH
42250 do
42251   IFS=$as_save_IFS
42252   test -z "$as_dir" && as_dir=.
42253     for ac_exec_ext in '' $ac_executable_extensions; do
42254   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42255     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42256     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42257     break 2
42258   fi
42259 done
42260   done
42261 IFS=$as_save_IFS
42262 
42263   ;;
42264 esac
42265 fi
42266 NM=$ac_cv_path_NM
42267 if test -n "$NM"; then
42268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42269 $as_echo "$NM" >&6; }
42270 else
42271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42272 $as_echo "no" >&6; }
42273 fi
42274 
42275 
42276           if test "x$NM" = x; then
42277             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42278           fi
42279         else
42280           # Otherwise we believe it is a complete path. Use it as it is.
42281           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42282 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42283           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42284 $as_echo_n "checking for NM... " >&6; }
42285           if test ! -x "$tool_specified"; then
42286             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42287 $as_echo "not found" >&6; }
42288             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42289           fi
42290           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42291 $as_echo "$tool_specified" >&6; }
42292         fi
42293       fi
42294     fi
42295 
42296   fi
42297 
42298 
42299 
42300   # Only process if variable expands to non-empty
42301 
42302   if test "x$NM" != x; then
42303     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42304 
42305   # First separate the path from the arguments. This will split at the first
42306   # space.
42307   complete="$NM"
42308   path="${complete%% *}"
42309   tmp="$complete EOL"
42310   arguments="${tmp#* }"
42311 
42312   # Input might be given as Windows format, start by converting to
42313   # unix format.
42314   new_path=`$CYGPATH -u "$path"`
42315 
42316   # Now try to locate executable using which
42317   new_path=`$WHICH "$new_path" 2> /dev/null`
42318   # bat and cmd files are not always considered executable in cygwin causing which
42319   # to not find them
42320   if test "x$new_path" = x \
42321       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42322       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42323     new_path=`$CYGPATH -u "$path"`
42324   fi
42325   if test "x$new_path" = x; then
42326     # Oops. Which didn't find the executable.
42327     # The splitting of arguments from the executable at a space might have been incorrect,
42328     # since paths with space are more likely in Windows. Give it another try with the whole
42329     # argument.
42330     path="$complete"
42331     arguments="EOL"
42332     new_path=`$CYGPATH -u "$path"`
42333     new_path=`$WHICH "$new_path" 2> /dev/null`
42334     # bat and cmd files are not always considered executable in cygwin causing which
42335     # to not find them
42336     if test "x$new_path" = x \
42337         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42338         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42339       new_path=`$CYGPATH -u "$path"`
42340     fi
42341     if test "x$new_path" = x; then
42342       # It's still not found. Now this is an unrecoverable error.
42343       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42344 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42345       has_space=`$ECHO "$complete" | $GREP " "`
42346       if test "x$has_space" != x; then
42347         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42348 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42349       fi
42350       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42351     fi
42352   fi
42353 
42354   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42355   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42356   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42357   # "foo.exe" is OK but "foo" is an error.
42358   #
42359   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42360   # It is also a way to make sure we got the proper file name for the real test later on.
42361   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42362   if test "x$test_shortpath" = x; then
42363     # Short path failed, file does not exist as specified.
42364     # Try adding .exe or .cmd
42365     if test -f "${new_path}.exe"; then
42366       input_to_shortpath="${new_path}.exe"
42367     elif test -f "${new_path}.cmd"; then
42368       input_to_shortpath="${new_path}.cmd"
42369     else
42370       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42371 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42372       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42373 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42374       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42375     fi
42376   else
42377     input_to_shortpath="$new_path"
42378   fi
42379 
42380   # Call helper function which possibly converts this using DOS-style short mode.
42381   # If so, the updated path is stored in $new_path.
42382   new_path="$input_to_shortpath"
42383 
42384   input_path="$input_to_shortpath"
42385   # Check if we need to convert this using DOS-style short mode. If the path
42386   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42387   # take no chances and rewrite it.
42388   # Note: m4 eats our [], so we need to use [ and ] instead.
42389   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42390   if test "x$has_forbidden_chars" != x; then
42391     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42392     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42393     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42394     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42395       # Going to short mode and back again did indeed matter. Since short mode is
42396       # case insensitive, let's make it lowercase to improve readability.
42397       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42398       # Now convert it back to Unix-style (cygpath)
42399       input_path=`$CYGPATH -u "$shortmode_path"`
42400       new_path="$input_path"
42401     fi
42402   fi
42403 
42404   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42405   if test "x$test_cygdrive_prefix" = x; then
42406     # As a simple fix, exclude /usr/bin since it's not a real path.
42407     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42408       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42409       # a path prefixed by /cygdrive for fixpath to work.
42410       new_path="$CYGWIN_ROOT_PATH$input_path"
42411     fi
42412   fi
42413 
42414   # remove trailing .exe if any
42415   new_path="${new_path/%.exe/}"
42416 
42417     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42418 
42419   # First separate the path from the arguments. This will split at the first
42420   # space.
42421   complete="$NM"
42422   path="${complete%% *}"
42423   tmp="$complete EOL"
42424   arguments="${tmp#* }"
42425 
42426   # Input might be given as Windows format, start by converting to
42427   # unix format.
42428   new_path="$path"
42429 
42430   windows_path="$new_path"
42431   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42432     unix_path=`$CYGPATH -u "$windows_path"`
42433     new_path="$unix_path"
42434   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42435     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42436     new_path="$unix_path"
42437   fi
42438 
42439 
42440   # Now try to locate executable using which
42441   new_path=`$WHICH "$new_path" 2> /dev/null`
42442 
42443   if test "x$new_path" = x; then
42444     # Oops. Which didn't find the executable.
42445     # The splitting of arguments from the executable at a space might have been incorrect,
42446     # since paths with space are more likely in Windows. Give it another try with the whole
42447     # argument.
42448     path="$complete"
42449     arguments="EOL"
42450     new_path="$path"
42451 
42452   windows_path="$new_path"
42453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42454     unix_path=`$CYGPATH -u "$windows_path"`
42455     new_path="$unix_path"
42456   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42457     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42458     new_path="$unix_path"
42459   fi
42460 
42461 
42462     new_path=`$WHICH "$new_path" 2> /dev/null`
42463     # bat and cmd files are not always considered executable in MSYS causing which
42464     # to not find them
42465     if test "x$new_path" = x \
42466         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42467         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42468       new_path="$path"
42469 
42470   windows_path="$new_path"
42471   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42472     unix_path=`$CYGPATH -u "$windows_path"`
42473     new_path="$unix_path"
42474   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42475     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42476     new_path="$unix_path"
42477   fi
42478 
42479     fi
42480 
42481     if test "x$new_path" = x; then
42482       # It's still not found. Now this is an unrecoverable error.
42483       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42484 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42485       has_space=`$ECHO "$complete" | $GREP " "`
42486       if test "x$has_space" != x; then
42487         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42488 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42489       fi
42490       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42491     fi
42492   fi
42493 
42494   # Now new_path has a complete unix path to the binary
42495   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42496     # Keep paths in /bin as-is, but remove trailing .exe if any
42497     new_path="${new_path/%.exe/}"
42498     # Do not save /bin paths to all_fixpath_prefixes!
42499   else
42500     # Not in mixed or Windows style, start by that.
42501     new_path=`cmd //c echo $new_path`
42502 
42503   input_path="$new_path"
42504   # Check if we need to convert this using DOS-style short mode. If the path
42505   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42506   # take no chances and rewrite it.
42507   # Note: m4 eats our [], so we need to use [ and ] instead.
42508   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42509   if test "x$has_forbidden_chars" != x; then
42510     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42511     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42512   fi
42513 
42514     # Output is in $new_path
42515 
42516   windows_path="$new_path"
42517   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42518     unix_path=`$CYGPATH -u "$windows_path"`
42519     new_path="$unix_path"
42520   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42521     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42522     new_path="$unix_path"
42523   fi
42524 
42525     # remove trailing .exe if any
42526     new_path="${new_path/%.exe/}"
42527 
42528     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42529     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42530   fi
42531 
42532     else
42533       # We're on a unix platform. Hooray! :)
42534       # First separate the path from the arguments. This will split at the first
42535       # space.
42536       complete="$NM"
42537       path="${complete%% *}"
42538       tmp="$complete EOL"
42539       arguments="${tmp#* }"
42540 
42541       # Cannot rely on the command "which" here since it doesn't always work.
42542       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42543       if test -z "$is_absolute_path"; then
42544         # Path to executable is not absolute. Find it.
42545         IFS_save="$IFS"
42546         IFS=:
42547         for p in $PATH; do
42548           if test -f "$p/$path" && test -x "$p/$path"; then
42549             new_path="$p/$path"
42550             break
42551           fi
42552         done
42553         IFS="$IFS_save"
42554       else
42555         # This is an absolute path, we can use it without further modifications.
42556         new_path="$path"
42557       fi
42558 
42559       if test "x$new_path" = x; then
42560         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42561 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42562         has_space=`$ECHO "$complete" | $GREP " "`
42563         if test "x$has_space" != x; then
42564           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42565 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42566         fi
42567         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42568       fi
42569     fi
42570 
42571     # Now join together the path and the arguments once again
42572     if test "x$arguments" != xEOL; then
42573       new_complete="$new_path ${arguments% *}"
42574     else
42575       new_complete="$new_path"
42576     fi
42577 
42578     if test "x$complete" != "x$new_complete"; then
42579       NM="$new_complete"
42580       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42581 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42582     fi
42583   fi
42584 
42585 
42586 
42587   # Publish this variable in the help.
42588 
42589 
42590   if [ -z "${GNM+x}" ]; then
42591     # The variable is not set by user, try to locate tool using the code snippet
42592     for ac_prog in gnm
42593 do
42594   # Extract the first word of "$ac_prog", so it can be a program name with args.
42595 set dummy $ac_prog; ac_word=$2
42596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42597 $as_echo_n "checking for $ac_word... " >&6; }
42598 if ${ac_cv_path_GNM+:} false; then :
42599   $as_echo_n "(cached) " >&6
42600 else
42601   case $GNM in
42602   [\\/]* | ?:[\\/]*)
42603   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
42604   ;;
42605   *)
42606   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42607 for as_dir in $PATH
42608 do
42609   IFS=$as_save_IFS
42610   test -z "$as_dir" && as_dir=.
42611     for ac_exec_ext in '' $ac_executable_extensions; do
42612   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42613     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
42614     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42615     break 2
42616   fi
42617 done
42618   done
42619 IFS=$as_save_IFS
42620 
42621   ;;
42622 esac
42623 fi
42624 GNM=$ac_cv_path_GNM
42625 if test -n "$GNM"; then
42626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
42627 $as_echo "$GNM" >&6; }
42628 else
42629   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42630 $as_echo "no" >&6; }
42631 fi
42632 
42633 
42634   test -n "$GNM" && break
42635 done
42636 
42637   else
42638     # The variable is set, but is it from the command line or the environment?
42639 
42640     # Try to remove the string !GNM! from our list.
42641     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
42642     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42643       # If it failed, the variable was not from the command line. Ignore it,
42644       # but warn the user (except for BASH, which is always set by the calling BASH).
42645       if test "xGNM" != xBASH; then
42646         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
42647 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
42648       fi
42649       # Try to locate tool using the code snippet
42650       for ac_prog in gnm
42651 do
42652   # Extract the first word of "$ac_prog", so it can be a program name with args.
42653 set dummy $ac_prog; ac_word=$2
42654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42655 $as_echo_n "checking for $ac_word... " >&6; }
42656 if ${ac_cv_path_GNM+:} false; then :
42657   $as_echo_n "(cached) " >&6
42658 else
42659   case $GNM in
42660   [\\/]* | ?:[\\/]*)
42661   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
42662   ;;
42663   *)
42664   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42665 for as_dir in $PATH
42666 do
42667   IFS=$as_save_IFS
42668   test -z "$as_dir" && as_dir=.
42669     for ac_exec_ext in '' $ac_executable_extensions; do
42670   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42671     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
42672     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42673     break 2
42674   fi
42675 done
42676   done
42677 IFS=$as_save_IFS
42678 
42679   ;;
42680 esac
42681 fi
42682 GNM=$ac_cv_path_GNM
42683 if test -n "$GNM"; then
42684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
42685 $as_echo "$GNM" >&6; }
42686 else
42687   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42688 $as_echo "no" >&6; }
42689 fi
42690 
42691 
42692   test -n "$GNM" && break
42693 done
42694 
42695     else
42696       # If it succeeded, then it was overridden by the user. We will use it
42697       # for the tool.
42698 
42699       # First remove it from the list of overridden variables, so we can test
42700       # for unknown variables in the end.
42701       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42702 
42703       # Check if we try to supply an empty value
42704       if test "x$GNM" = x; then
42705         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
42706 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
42707         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
42708 $as_echo_n "checking for GNM... " >&6; }
42709         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42710 $as_echo "disabled" >&6; }
42711       else
42712         # Check if the provided tool contains a complete path.
42713         tool_specified="$GNM"
42714         tool_basename="${tool_specified##*/}"
42715         if test "x$tool_basename" = "x$tool_specified"; then
42716           # A command without a complete path is provided, search $PATH.
42717           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
42718 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
42719           # Extract the first word of "$tool_basename", so it can be a program name with args.
42720 set dummy $tool_basename; ac_word=$2
42721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42722 $as_echo_n "checking for $ac_word... " >&6; }
42723 if ${ac_cv_path_GNM+:} false; then :
42724   $as_echo_n "(cached) " >&6
42725 else
42726   case $GNM in
42727   [\\/]* | ?:[\\/]*)
42728   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
42729   ;;
42730   *)
42731   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42732 for as_dir in $PATH
42733 do
42734   IFS=$as_save_IFS
42735   test -z "$as_dir" && as_dir=.
42736     for ac_exec_ext in '' $ac_executable_extensions; do
42737   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42738     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
42739     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42740     break 2
42741   fi
42742 done
42743   done
42744 IFS=$as_save_IFS
42745 
42746   ;;
42747 esac
42748 fi
42749 GNM=$ac_cv_path_GNM
42750 if test -n "$GNM"; then
42751   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
42752 $as_echo "$GNM" >&6; }
42753 else
42754   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42755 $as_echo "no" >&6; }
42756 fi
42757 
42758 
42759           if test "x$GNM" = x; then
42760             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42761           fi
42762         else
42763           # Otherwise we believe it is a complete path. Use it as it is.
42764           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
42765 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
42766           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
42767 $as_echo_n "checking for GNM... " >&6; }
42768           if test ! -x "$tool_specified"; then
42769             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42770 $as_echo "not found" >&6; }
42771             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
42772           fi
42773           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42774 $as_echo "$tool_specified" >&6; }
42775         fi
42776       fi
42777     fi
42778 
42779   fi
42780 
42781 
42782 
42783   # Only process if variable expands to non-empty
42784 
42785   if test "x$GNM" != x; then
42786     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42787 
42788   # First separate the path from the arguments. This will split at the first
42789   # space.
42790   complete="$GNM"
42791   path="${complete%% *}"
42792   tmp="$complete EOL"
42793   arguments="${tmp#* }"
42794 
42795   # Input might be given as Windows format, start by converting to
42796   # unix format.
42797   new_path=`$CYGPATH -u "$path"`
42798 
42799   # Now try to locate executable using which
42800   new_path=`$WHICH "$new_path" 2> /dev/null`
42801   # bat and cmd files are not always considered executable in cygwin causing which
42802   # to not find them
42803   if test "x$new_path" = x \
42804       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42805       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42806     new_path=`$CYGPATH -u "$path"`
42807   fi
42808   if test "x$new_path" = x; then
42809     # Oops. Which didn't find the executable.
42810     # The splitting of arguments from the executable at a space might have been incorrect,
42811     # since paths with space are more likely in Windows. Give it another try with the whole
42812     # argument.
42813     path="$complete"
42814     arguments="EOL"
42815     new_path=`$CYGPATH -u "$path"`
42816     new_path=`$WHICH "$new_path" 2> /dev/null`
42817     # bat and cmd files are not always considered executable in cygwin causing which
42818     # to not find them
42819     if test "x$new_path" = x \
42820         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42821         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42822       new_path=`$CYGPATH -u "$path"`
42823     fi
42824     if test "x$new_path" = x; then
42825       # It's still not found. Now this is an unrecoverable error.
42826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42827 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42828       has_space=`$ECHO "$complete" | $GREP " "`
42829       if test "x$has_space" != x; then
42830         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42831 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42832       fi
42833       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42834     fi
42835   fi
42836 
42837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42840   # "foo.exe" is OK but "foo" is an error.
42841   #
42842   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42843   # It is also a way to make sure we got the proper file name for the real test later on.
42844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42845   if test "x$test_shortpath" = x; then
42846     # Short path failed, file does not exist as specified.
42847     # Try adding .exe or .cmd
42848     if test -f "${new_path}.exe"; then
42849       input_to_shortpath="${new_path}.exe"
42850     elif test -f "${new_path}.cmd"; then
42851       input_to_shortpath="${new_path}.cmd"
42852     else
42853       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
42854 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
42855       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42856 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42857       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42858     fi
42859   else
42860     input_to_shortpath="$new_path"
42861   fi
42862 
42863   # Call helper function which possibly converts this using DOS-style short mode.
42864   # If so, the updated path is stored in $new_path.
42865   new_path="$input_to_shortpath"
42866 
42867   input_path="$input_to_shortpath"
42868   # Check if we need to convert this using DOS-style short mode. If the path
42869   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42870   # take no chances and rewrite it.
42871   # Note: m4 eats our [], so we need to use [ and ] instead.
42872   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42873   if test "x$has_forbidden_chars" != x; then
42874     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42875     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42876     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42877     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42878       # Going to short mode and back again did indeed matter. Since short mode is
42879       # case insensitive, let's make it lowercase to improve readability.
42880       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42881       # Now convert it back to Unix-style (cygpath)
42882       input_path=`$CYGPATH -u "$shortmode_path"`
42883       new_path="$input_path"
42884     fi
42885   fi
42886 
42887   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42888   if test "x$test_cygdrive_prefix" = x; then
42889     # As a simple fix, exclude /usr/bin since it's not a real path.
42890     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42891       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42892       # a path prefixed by /cygdrive for fixpath to work.
42893       new_path="$CYGWIN_ROOT_PATH$input_path"
42894     fi
42895   fi
42896 
42897   # remove trailing .exe if any
42898   new_path="${new_path/%.exe/}"
42899 
42900     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42901 
42902   # First separate the path from the arguments. This will split at the first
42903   # space.
42904   complete="$GNM"
42905   path="${complete%% *}"
42906   tmp="$complete EOL"
42907   arguments="${tmp#* }"
42908 
42909   # Input might be given as Windows format, start by converting to
42910   # unix format.
42911   new_path="$path"
42912 
42913   windows_path="$new_path"
42914   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42915     unix_path=`$CYGPATH -u "$windows_path"`
42916     new_path="$unix_path"
42917   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42918     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42919     new_path="$unix_path"
42920   fi
42921 
42922 
42923   # Now try to locate executable using which
42924   new_path=`$WHICH "$new_path" 2> /dev/null`
42925 
42926   if test "x$new_path" = x; then
42927     # Oops. Which didn't find the executable.
42928     # The splitting of arguments from the executable at a space might have been incorrect,
42929     # since paths with space are more likely in Windows. Give it another try with the whole
42930     # argument.
42931     path="$complete"
42932     arguments="EOL"
42933     new_path="$path"
42934 
42935   windows_path="$new_path"
42936   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42937     unix_path=`$CYGPATH -u "$windows_path"`
42938     new_path="$unix_path"
42939   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42940     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42941     new_path="$unix_path"
42942   fi
42943 
42944 
42945     new_path=`$WHICH "$new_path" 2> /dev/null`
42946     # bat and cmd files are not always considered executable in MSYS causing which
42947     # to not find them
42948     if test "x$new_path" = x \
42949         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42950         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42951       new_path="$path"
42952 
42953   windows_path="$new_path"
42954   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42955     unix_path=`$CYGPATH -u "$windows_path"`
42956     new_path="$unix_path"
42957   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42958     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42959     new_path="$unix_path"
42960   fi
42961 
42962     fi
42963 
42964     if test "x$new_path" = x; then
42965       # It's still not found. Now this is an unrecoverable error.
42966       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
42967 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
42968       has_space=`$ECHO "$complete" | $GREP " "`
42969       if test "x$has_space" != x; then
42970         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42971 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42972       fi
42973       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
42974     fi
42975   fi
42976 
42977   # Now new_path has a complete unix path to the binary
42978   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42979     # Keep paths in /bin as-is, but remove trailing .exe if any
42980     new_path="${new_path/%.exe/}"
42981     # Do not save /bin paths to all_fixpath_prefixes!
42982   else
42983     # Not in mixed or Windows style, start by that.
42984     new_path=`cmd //c echo $new_path`
42985 
42986   input_path="$new_path"
42987   # Check if we need to convert this using DOS-style short mode. If the path
42988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42989   # take no chances and rewrite it.
42990   # Note: m4 eats our [], so we need to use [ and ] instead.
42991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42992   if test "x$has_forbidden_chars" != x; then
42993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42994     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42995   fi
42996 
42997     # Output is in $new_path
42998 
42999   windows_path="$new_path"
43000   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43001     unix_path=`$CYGPATH -u "$windows_path"`
43002     new_path="$unix_path"
43003   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43004     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43005     new_path="$unix_path"
43006   fi
43007 
43008     # remove trailing .exe if any
43009     new_path="${new_path/%.exe/}"
43010 
43011     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43012     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43013   fi
43014 
43015     else
43016       # We're on a unix platform. Hooray! :)
43017       # First separate the path from the arguments. This will split at the first
43018       # space.
43019       complete="$GNM"
43020       path="${complete%% *}"
43021       tmp="$complete EOL"
43022       arguments="${tmp#* }"
43023 
43024       # Cannot rely on the command "which" here since it doesn't always work.
43025       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43026       if test -z "$is_absolute_path"; then
43027         # Path to executable is not absolute. Find it.
43028         IFS_save="$IFS"
43029         IFS=:
43030         for p in $PATH; do
43031           if test -f "$p/$path" && test -x "$p/$path"; then
43032             new_path="$p/$path"
43033             break
43034           fi
43035         done
43036         IFS="$IFS_save"
43037       else
43038         # This is an absolute path, we can use it without further modifications.
43039         new_path="$path"
43040       fi
43041 
43042       if test "x$new_path" = x; then
43043         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
43044 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
43045         has_space=`$ECHO "$complete" | $GREP " "`
43046         if test "x$has_space" != x; then
43047           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43048 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43049         fi
43050         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
43051       fi
43052     fi
43053 
43054     # Now join together the path and the arguments once again
43055     if test "x$arguments" != xEOL; then
43056       new_complete="$new_path ${arguments% *}"
43057     else
43058       new_complete="$new_path"
43059     fi
43060 
43061     if test "x$complete" != "x$new_complete"; then
43062       GNM="$new_complete"
43063       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
43064 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
43065     fi
43066   fi
43067 
43068   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
43069     # FIXME: we should unify this with the solaris case above.
43070 
43071 
43072   # Publish this variable in the help.
43073 
43074 
43075   if [ -z "${STRIP+x}" ]; then
43076     # The variable is not set by user, try to locate tool using the code snippet
43077     if test -n "$ac_tool_prefix"; then
43078   for ac_prog in strip
43079   do
43080     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43081 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43083 $as_echo_n "checking for $ac_word... " >&6; }
43084 if ${ac_cv_prog_STRIP+:} false; then :
43085   $as_echo_n "(cached) " >&6
43086 else
43087   if test -n "$STRIP"; then
43088   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
43089 else
43090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43091 for as_dir in $PATH
43092 do
43093   IFS=$as_save_IFS
43094   test -z "$as_dir" && as_dir=.
43095     for ac_exec_ext in '' $ac_executable_extensions; do
43096   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43097     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
43098     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43099     break 2
43100   fi
43101 done
43102   done
43103 IFS=$as_save_IFS
43104 
43105 fi
43106 fi
43107 STRIP=$ac_cv_prog_STRIP
43108 if test -n "$STRIP"; then
43109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
43110 $as_echo "$STRIP" >&6; }
43111 else
43112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43113 $as_echo "no" >&6; }
43114 fi
43115 
43116 
43117     test -n "$STRIP" && break
43118   done
43119 fi
43120 if test -z "$STRIP"; then
43121   ac_ct_STRIP=$STRIP
43122   for ac_prog in strip
43123 do
43124   # Extract the first word of "$ac_prog", so it can be a program name with args.
43125 set dummy $ac_prog; ac_word=$2
43126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43127 $as_echo_n "checking for $ac_word... " >&6; }
43128 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
43129   $as_echo_n "(cached) " >&6
43130 else
43131   if test -n "$ac_ct_STRIP"; then
43132   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
43133 else
43134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43135 for as_dir in $PATH
43136 do
43137   IFS=$as_save_IFS
43138   test -z "$as_dir" && as_dir=.
43139     for ac_exec_ext in '' $ac_executable_extensions; do
43140   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43141     ac_cv_prog_ac_ct_STRIP="$ac_prog"
43142     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43143     break 2
43144   fi
43145 done
43146   done
43147 IFS=$as_save_IFS
43148 
43149 fi
43150 fi
43151 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
43152 if test -n "$ac_ct_STRIP"; then
43153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
43154 $as_echo "$ac_ct_STRIP" >&6; }
43155 else
43156   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43157 $as_echo "no" >&6; }
43158 fi
43159 
43160 
43161   test -n "$ac_ct_STRIP" && break
43162 done
43163 
43164   if test "x$ac_ct_STRIP" = x; then
43165     STRIP=""
43166   else
43167     case $cross_compiling:$ac_tool_warned in
43168 yes:)
43169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43170 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43171 ac_tool_warned=yes ;;
43172 esac
43173     STRIP=$ac_ct_STRIP
43174   fi
43175 fi
43176 
43177   else
43178     # The variable is set, but is it from the command line or the environment?
43179 
43180     # Try to remove the string !STRIP! from our list.
43181     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
43182     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43183       # If it failed, the variable was not from the command line. Ignore it,
43184       # but warn the user (except for BASH, which is always set by the calling BASH).
43185       if test "xSTRIP" != xBASH; then
43186         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
43187 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
43188       fi
43189       # Try to locate tool using the code snippet
43190       if test -n "$ac_tool_prefix"; then
43191   for ac_prog in strip
43192   do
43193     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43194 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43196 $as_echo_n "checking for $ac_word... " >&6; }
43197 if ${ac_cv_prog_STRIP+:} false; then :
43198   $as_echo_n "(cached) " >&6
43199 else
43200   if test -n "$STRIP"; then
43201   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
43202 else
43203 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43204 for as_dir in $PATH
43205 do
43206   IFS=$as_save_IFS
43207   test -z "$as_dir" && as_dir=.
43208     for ac_exec_ext in '' $ac_executable_extensions; do
43209   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43210     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
43211     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43212     break 2
43213   fi
43214 done
43215   done
43216 IFS=$as_save_IFS
43217 
43218 fi
43219 fi
43220 STRIP=$ac_cv_prog_STRIP
43221 if test -n "$STRIP"; then
43222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
43223 $as_echo "$STRIP" >&6; }
43224 else
43225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43226 $as_echo "no" >&6; }
43227 fi
43228 
43229 
43230     test -n "$STRIP" && break
43231   done
43232 fi
43233 if test -z "$STRIP"; then
43234   ac_ct_STRIP=$STRIP
43235   for ac_prog in strip
43236 do
43237   # Extract the first word of "$ac_prog", so it can be a program name with args.
43238 set dummy $ac_prog; ac_word=$2
43239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43240 $as_echo_n "checking for $ac_word... " >&6; }
43241 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
43242   $as_echo_n "(cached) " >&6
43243 else
43244   if test -n "$ac_ct_STRIP"; then
43245   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
43246 else
43247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43248 for as_dir in $PATH
43249 do
43250   IFS=$as_save_IFS
43251   test -z "$as_dir" && as_dir=.
43252     for ac_exec_ext in '' $ac_executable_extensions; do
43253   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43254     ac_cv_prog_ac_ct_STRIP="$ac_prog"
43255     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43256     break 2
43257   fi
43258 done
43259   done
43260 IFS=$as_save_IFS
43261 
43262 fi
43263 fi
43264 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
43265 if test -n "$ac_ct_STRIP"; then
43266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
43267 $as_echo "$ac_ct_STRIP" >&6; }
43268 else
43269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43270 $as_echo "no" >&6; }
43271 fi
43272 
43273 
43274   test -n "$ac_ct_STRIP" && break
43275 done
43276 
43277   if test "x$ac_ct_STRIP" = x; then
43278     STRIP=""
43279   else
43280     case $cross_compiling:$ac_tool_warned in
43281 yes:)
43282 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43283 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43284 ac_tool_warned=yes ;;
43285 esac
43286     STRIP=$ac_ct_STRIP
43287   fi
43288 fi
43289 
43290     else
43291       # If it succeeded, then it was overridden by the user. We will use it
43292       # for the tool.
43293 
43294       # First remove it from the list of overridden variables, so we can test
43295       # for unknown variables in the end.
43296       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43297 
43298       # Check if we try to supply an empty value
43299       if test "x$STRIP" = x; then
43300         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
43301 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
43302         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
43303 $as_echo_n "checking for STRIP... " >&6; }
43304         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43305 $as_echo "disabled" >&6; }
43306       else
43307         # Check if the provided tool contains a complete path.
43308         tool_specified="$STRIP"
43309         tool_basename="${tool_specified##*/}"
43310         if test "x$tool_basename" = "x$tool_specified"; then
43311           # A command without a complete path is provided, search $PATH.
43312           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
43313 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
43314           # Extract the first word of "$tool_basename", so it can be a program name with args.
43315 set dummy $tool_basename; ac_word=$2
43316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43317 $as_echo_n "checking for $ac_word... " >&6; }
43318 if ${ac_cv_path_STRIP+:} false; then :
43319   $as_echo_n "(cached) " >&6
43320 else
43321   case $STRIP in
43322   [\\/]* | ?:[\\/]*)
43323   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
43324   ;;
43325   *)
43326   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43327 for as_dir in $PATH
43328 do
43329   IFS=$as_save_IFS
43330   test -z "$as_dir" && as_dir=.
43331     for ac_exec_ext in '' $ac_executable_extensions; do
43332   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43333     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
43334     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43335     break 2
43336   fi
43337 done
43338   done
43339 IFS=$as_save_IFS
43340 
43341   ;;
43342 esac
43343 fi
43344 STRIP=$ac_cv_path_STRIP
43345 if test -n "$STRIP"; then
43346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
43347 $as_echo "$STRIP" >&6; }
43348 else
43349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43350 $as_echo "no" >&6; }
43351 fi
43352 
43353 
43354           if test "x$STRIP" = x; then
43355             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43356           fi
43357         else
43358           # Otherwise we believe it is a complete path. Use it as it is.
43359           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
43360 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
43361           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
43362 $as_echo_n "checking for STRIP... " >&6; }
43363           if test ! -x "$tool_specified"; then
43364             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43365 $as_echo "not found" >&6; }
43366             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
43367           fi
43368           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43369 $as_echo "$tool_specified" >&6; }
43370         fi
43371       fi
43372     fi
43373 
43374   fi
43375 
43376 
43377 
43378   # Only process if variable expands to non-empty
43379 
43380   if test "x$STRIP" != x; then
43381     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43382 
43383   # First separate the path from the arguments. This will split at the first
43384   # space.
43385   complete="$STRIP"
43386   path="${complete%% *}"
43387   tmp="$complete EOL"
43388   arguments="${tmp#* }"
43389 
43390   # Input might be given as Windows format, start by converting to
43391   # unix format.
43392   new_path=`$CYGPATH -u "$path"`
43393 
43394   # Now try to locate executable using which
43395   new_path=`$WHICH "$new_path" 2> /dev/null`
43396   # bat and cmd files are not always considered executable in cygwin causing which
43397   # to not find them
43398   if test "x$new_path" = x \
43399       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43400       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43401     new_path=`$CYGPATH -u "$path"`
43402   fi
43403   if test "x$new_path" = x; then
43404     # Oops. Which didn't find the executable.
43405     # The splitting of arguments from the executable at a space might have been incorrect,
43406     # since paths with space are more likely in Windows. Give it another try with the whole
43407     # argument.
43408     path="$complete"
43409     arguments="EOL"
43410     new_path=`$CYGPATH -u "$path"`
43411     new_path=`$WHICH "$new_path" 2> /dev/null`
43412     # bat and cmd files are not always considered executable in cygwin causing which
43413     # to not find them
43414     if test "x$new_path" = x \
43415         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43416         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43417       new_path=`$CYGPATH -u "$path"`
43418     fi
43419     if test "x$new_path" = x; then
43420       # It's still not found. Now this is an unrecoverable error.
43421       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
43422 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
43423       has_space=`$ECHO "$complete" | $GREP " "`
43424       if test "x$has_space" != x; then
43425         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43426 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43427       fi
43428       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43429     fi
43430   fi
43431 
43432   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43433   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43434   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43435   # "foo.exe" is OK but "foo" is an error.
43436   #
43437   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43438   # It is also a way to make sure we got the proper file name for the real test later on.
43439   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43440   if test "x$test_shortpath" = x; then
43441     # Short path failed, file does not exist as specified.
43442     # Try adding .exe or .cmd
43443     if test -f "${new_path}.exe"; then
43444       input_to_shortpath="${new_path}.exe"
43445     elif test -f "${new_path}.cmd"; then
43446       input_to_shortpath="${new_path}.cmd"
43447     else
43448       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
43449 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
43450       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43451 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43452       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43453     fi
43454   else
43455     input_to_shortpath="$new_path"
43456   fi
43457 
43458   # Call helper function which possibly converts this using DOS-style short mode.
43459   # If so, the updated path is stored in $new_path.
43460   new_path="$input_to_shortpath"
43461 
43462   input_path="$input_to_shortpath"
43463   # Check if we need to convert this using DOS-style short mode. If the path
43464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43465   # take no chances and rewrite it.
43466   # Note: m4 eats our [], so we need to use [ and ] instead.
43467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43468   if test "x$has_forbidden_chars" != x; then
43469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43470     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43471     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43472     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43473       # Going to short mode and back again did indeed matter. Since short mode is
43474       # case insensitive, let's make it lowercase to improve readability.
43475       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43476       # Now convert it back to Unix-style (cygpath)
43477       input_path=`$CYGPATH -u "$shortmode_path"`
43478       new_path="$input_path"
43479     fi
43480   fi
43481 
43482   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43483   if test "x$test_cygdrive_prefix" = x; then
43484     # As a simple fix, exclude /usr/bin since it's not a real path.
43485     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43486       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43487       # a path prefixed by /cygdrive for fixpath to work.
43488       new_path="$CYGWIN_ROOT_PATH$input_path"
43489     fi
43490   fi
43491 
43492   # remove trailing .exe if any
43493   new_path="${new_path/%.exe/}"
43494 
43495     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43496 
43497   # First separate the path from the arguments. This will split at the first
43498   # space.
43499   complete="$STRIP"
43500   path="${complete%% *}"
43501   tmp="$complete EOL"
43502   arguments="${tmp#* }"
43503 
43504   # Input might be given as Windows format, start by converting to
43505   # unix format.
43506   new_path="$path"
43507 
43508   windows_path="$new_path"
43509   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43510     unix_path=`$CYGPATH -u "$windows_path"`
43511     new_path="$unix_path"
43512   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43513     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43514     new_path="$unix_path"
43515   fi
43516 
43517 
43518   # Now try to locate executable using which
43519   new_path=`$WHICH "$new_path" 2> /dev/null`
43520 
43521   if test "x$new_path" = x; then
43522     # Oops. Which didn't find the executable.
43523     # The splitting of arguments from the executable at a space might have been incorrect,
43524     # since paths with space are more likely in Windows. Give it another try with the whole
43525     # argument.
43526     path="$complete"
43527     arguments="EOL"
43528     new_path="$path"
43529 
43530   windows_path="$new_path"
43531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43532     unix_path=`$CYGPATH -u "$windows_path"`
43533     new_path="$unix_path"
43534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43536     new_path="$unix_path"
43537   fi
43538 
43539 
43540     new_path=`$WHICH "$new_path" 2> /dev/null`
43541     # bat and cmd files are not always considered executable in MSYS causing which
43542     # to not find them
43543     if test "x$new_path" = x \
43544         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43545         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43546       new_path="$path"
43547 
43548   windows_path="$new_path"
43549   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43550     unix_path=`$CYGPATH -u "$windows_path"`
43551     new_path="$unix_path"
43552   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43553     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43554     new_path="$unix_path"
43555   fi
43556 
43557     fi
43558 
43559     if test "x$new_path" = x; then
43560       # It's still not found. Now this is an unrecoverable error.
43561       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
43562 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
43563       has_space=`$ECHO "$complete" | $GREP " "`
43564       if test "x$has_space" != x; then
43565         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43566 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43567       fi
43568       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43569     fi
43570   fi
43571 
43572   # Now new_path has a complete unix path to the binary
43573   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43574     # Keep paths in /bin as-is, but remove trailing .exe if any
43575     new_path="${new_path/%.exe/}"
43576     # Do not save /bin paths to all_fixpath_prefixes!
43577   else
43578     # Not in mixed or Windows style, start by that.
43579     new_path=`cmd //c echo $new_path`
43580 
43581   input_path="$new_path"
43582   # Check if we need to convert this using DOS-style short mode. If the path
43583   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43584   # take no chances and rewrite it.
43585   # Note: m4 eats our [], so we need to use [ and ] instead.
43586   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43587   if test "x$has_forbidden_chars" != x; then
43588     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43589     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43590   fi
43591 
43592     # Output is in $new_path
43593 
43594   windows_path="$new_path"
43595   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43596     unix_path=`$CYGPATH -u "$windows_path"`
43597     new_path="$unix_path"
43598   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43599     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43600     new_path="$unix_path"
43601   fi
43602 
43603     # remove trailing .exe if any
43604     new_path="${new_path/%.exe/}"
43605 
43606     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43607     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43608   fi
43609 
43610     else
43611       # We're on a unix platform. Hooray! :)
43612       # First separate the path from the arguments. This will split at the first
43613       # space.
43614       complete="$STRIP"
43615       path="${complete%% *}"
43616       tmp="$complete EOL"
43617       arguments="${tmp#* }"
43618 
43619       # Cannot rely on the command "which" here since it doesn't always work.
43620       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43621       if test -z "$is_absolute_path"; then
43622         # Path to executable is not absolute. Find it.
43623         IFS_save="$IFS"
43624         IFS=:
43625         for p in $PATH; do
43626           if test -f "$p/$path" && test -x "$p/$path"; then
43627             new_path="$p/$path"
43628             break
43629           fi
43630         done
43631         IFS="$IFS_save"
43632       else
43633         # This is an absolute path, we can use it without further modifications.
43634         new_path="$path"
43635       fi
43636 
43637       if test "x$new_path" = x; then
43638         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
43639 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
43640         has_space=`$ECHO "$complete" | $GREP " "`
43641         if test "x$has_space" != x; then
43642           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43643 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43644         fi
43645         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
43646       fi
43647     fi
43648 
43649     # Now join together the path and the arguments once again
43650     if test "x$arguments" != xEOL; then
43651       new_complete="$new_path ${arguments% *}"
43652     else
43653       new_complete="$new_path"
43654     fi
43655 
43656     if test "x$complete" != "x$new_complete"; then
43657       STRIP="$new_complete"
43658       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
43659 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
43660     fi
43661   fi
43662 
43663     if test "x$TOOLCHAIN_TYPE" = xgcc; then
43664 
43665 
43666   # Publish this variable in the help.
43667 
43668 
43669   if [ -z "${NM+x}" ]; then
43670     # The variable is not set by user, try to locate tool using the code snippet
43671     if test -n "$ac_tool_prefix"; then
43672   for ac_prog in nm gcc-nm
43673   do
43674     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43675 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43677 $as_echo_n "checking for $ac_word... " >&6; }
43678 if ${ac_cv_prog_NM+:} false; then :
43679   $as_echo_n "(cached) " >&6
43680 else
43681   if test -n "$NM"; then
43682   ac_cv_prog_NM="$NM" # Let the user override the test.
43683 else
43684 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43685 for as_dir in $PATH
43686 do
43687   IFS=$as_save_IFS
43688   test -z "$as_dir" && as_dir=.
43689     for ac_exec_ext in '' $ac_executable_extensions; do
43690   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43691     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43692     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43693     break 2
43694   fi
43695 done
43696   done
43697 IFS=$as_save_IFS
43698 
43699 fi
43700 fi
43701 NM=$ac_cv_prog_NM
43702 if test -n "$NM"; then
43703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43704 $as_echo "$NM" >&6; }
43705 else
43706   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43707 $as_echo "no" >&6; }
43708 fi
43709 
43710 
43711     test -n "$NM" && break
43712   done
43713 fi
43714 if test -z "$NM"; then
43715   ac_ct_NM=$NM
43716   for ac_prog in nm gcc-nm
43717 do
43718   # Extract the first word of "$ac_prog", so it can be a program name with args.
43719 set dummy $ac_prog; ac_word=$2
43720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43721 $as_echo_n "checking for $ac_word... " >&6; }
43722 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43723   $as_echo_n "(cached) " >&6
43724 else
43725   if test -n "$ac_ct_NM"; then
43726   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43727 else
43728 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43729 for as_dir in $PATH
43730 do
43731   IFS=$as_save_IFS
43732   test -z "$as_dir" && as_dir=.
43733     for ac_exec_ext in '' $ac_executable_extensions; do
43734   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43735     ac_cv_prog_ac_ct_NM="$ac_prog"
43736     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43737     break 2
43738   fi
43739 done
43740   done
43741 IFS=$as_save_IFS
43742 
43743 fi
43744 fi
43745 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43746 if test -n "$ac_ct_NM"; then
43747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43748 $as_echo "$ac_ct_NM" >&6; }
43749 else
43750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43751 $as_echo "no" >&6; }
43752 fi
43753 
43754 
43755   test -n "$ac_ct_NM" && break
43756 done
43757 
43758   if test "x$ac_ct_NM" = x; then
43759     NM=""
43760   else
43761     case $cross_compiling:$ac_tool_warned in
43762 yes:)
43763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43764 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43765 ac_tool_warned=yes ;;
43766 esac
43767     NM=$ac_ct_NM
43768   fi
43769 fi
43770 
43771   else
43772     # The variable is set, but is it from the command line or the environment?
43773 
43774     # Try to remove the string !NM! from our list.
43775     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43776     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43777       # If it failed, the variable was not from the command line. Ignore it,
43778       # but warn the user (except for BASH, which is always set by the calling BASH).
43779       if test "xNM" != xBASH; then
43780         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43781 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43782       fi
43783       # Try to locate tool using the code snippet
43784       if test -n "$ac_tool_prefix"; then
43785   for ac_prog in nm gcc-nm
43786   do
43787     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43788 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43790 $as_echo_n "checking for $ac_word... " >&6; }
43791 if ${ac_cv_prog_NM+:} false; then :
43792   $as_echo_n "(cached) " >&6
43793 else
43794   if test -n "$NM"; then
43795   ac_cv_prog_NM="$NM" # Let the user override the test.
43796 else
43797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43798 for as_dir in $PATH
43799 do
43800   IFS=$as_save_IFS
43801   test -z "$as_dir" && as_dir=.
43802     for ac_exec_ext in '' $ac_executable_extensions; do
43803   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43804     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43805     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43806     break 2
43807   fi
43808 done
43809   done
43810 IFS=$as_save_IFS
43811 
43812 fi
43813 fi
43814 NM=$ac_cv_prog_NM
43815 if test -n "$NM"; then
43816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43817 $as_echo "$NM" >&6; }
43818 else
43819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43820 $as_echo "no" >&6; }
43821 fi
43822 
43823 
43824     test -n "$NM" && break
43825   done
43826 fi
43827 if test -z "$NM"; then
43828   ac_ct_NM=$NM
43829   for ac_prog in nm gcc-nm
43830 do
43831   # Extract the first word of "$ac_prog", so it can be a program name with args.
43832 set dummy $ac_prog; ac_word=$2
43833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43834 $as_echo_n "checking for $ac_word... " >&6; }
43835 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43836   $as_echo_n "(cached) " >&6
43837 else
43838   if test -n "$ac_ct_NM"; then
43839   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43840 else
43841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43842 for as_dir in $PATH
43843 do
43844   IFS=$as_save_IFS
43845   test -z "$as_dir" && as_dir=.
43846     for ac_exec_ext in '' $ac_executable_extensions; do
43847   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43848     ac_cv_prog_ac_ct_NM="$ac_prog"
43849     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43850     break 2
43851   fi
43852 done
43853   done
43854 IFS=$as_save_IFS
43855 
43856 fi
43857 fi
43858 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43859 if test -n "$ac_ct_NM"; then
43860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43861 $as_echo "$ac_ct_NM" >&6; }
43862 else
43863   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43864 $as_echo "no" >&6; }
43865 fi
43866 
43867 
43868   test -n "$ac_ct_NM" && break
43869 done
43870 
43871   if test "x$ac_ct_NM" = x; then
43872     NM=""
43873   else
43874     case $cross_compiling:$ac_tool_warned in
43875 yes:)
43876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43877 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43878 ac_tool_warned=yes ;;
43879 esac
43880     NM=$ac_ct_NM
43881   fi
43882 fi
43883 
43884     else
43885       # If it succeeded, then it was overridden by the user. We will use it
43886       # for the tool.
43887 
43888       # First remove it from the list of overridden variables, so we can test
43889       # for unknown variables in the end.
43890       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43891 
43892       # Check if we try to supply an empty value
43893       if test "x$NM" = x; then
43894         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43895 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43896         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43897 $as_echo_n "checking for NM... " >&6; }
43898         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43899 $as_echo "disabled" >&6; }
43900       else
43901         # Check if the provided tool contains a complete path.
43902         tool_specified="$NM"
43903         tool_basename="${tool_specified##*/}"
43904         if test "x$tool_basename" = "x$tool_specified"; then
43905           # A command without a complete path is provided, search $PATH.
43906           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43907 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43908           # Extract the first word of "$tool_basename", so it can be a program name with args.
43909 set dummy $tool_basename; ac_word=$2
43910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43911 $as_echo_n "checking for $ac_word... " >&6; }
43912 if ${ac_cv_path_NM+:} false; then :
43913   $as_echo_n "(cached) " >&6
43914 else
43915   case $NM in
43916   [\\/]* | ?:[\\/]*)
43917   ac_cv_path_NM="$NM" # Let the user override the test with a path.
43918   ;;
43919   *)
43920   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43921 for as_dir in $PATH
43922 do
43923   IFS=$as_save_IFS
43924   test -z "$as_dir" && as_dir=.
43925     for ac_exec_ext in '' $ac_executable_extensions; do
43926   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43927     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43928     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43929     break 2
43930   fi
43931 done
43932   done
43933 IFS=$as_save_IFS
43934 
43935   ;;
43936 esac
43937 fi
43938 NM=$ac_cv_path_NM
43939 if test -n "$NM"; then
43940   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43941 $as_echo "$NM" >&6; }
43942 else
43943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43944 $as_echo "no" >&6; }
43945 fi
43946 
43947 
43948           if test "x$NM" = x; then
43949             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43950           fi
43951         else
43952           # Otherwise we believe it is a complete path. Use it as it is.
43953           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43954 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43955           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43956 $as_echo_n "checking for NM... " >&6; }
43957           if test ! -x "$tool_specified"; then
43958             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43959 $as_echo "not found" >&6; }
43960             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43961           fi
43962           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43963 $as_echo "$tool_specified" >&6; }
43964         fi
43965       fi
43966     fi
43967 
43968   fi
43969 
43970 
43971     else
43972 
43973 
43974   # Publish this variable in the help.
43975 
43976 
43977   if [ -z "${NM+x}" ]; then
43978     # The variable is not set by user, try to locate tool using the code snippet
43979     if test -n "$ac_tool_prefix"; then
43980   for ac_prog in nm
43981   do
43982     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43983 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43985 $as_echo_n "checking for $ac_word... " >&6; }
43986 if ${ac_cv_prog_NM+:} false; then :
43987   $as_echo_n "(cached) " >&6
43988 else
43989   if test -n "$NM"; then
43990   ac_cv_prog_NM="$NM" # Let the user override the test.
43991 else
43992 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43993 for as_dir in $PATH
43994 do
43995   IFS=$as_save_IFS
43996   test -z "$as_dir" && as_dir=.
43997     for ac_exec_ext in '' $ac_executable_extensions; do
43998   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43999     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
44000     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44001     break 2
44002   fi
44003 done
44004   done
44005 IFS=$as_save_IFS
44006 
44007 fi
44008 fi
44009 NM=$ac_cv_prog_NM
44010 if test -n "$NM"; then
44011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
44012 $as_echo "$NM" >&6; }
44013 else
44014   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44015 $as_echo "no" >&6; }
44016 fi
44017 
44018 
44019     test -n "$NM" && break
44020   done
44021 fi
44022 if test -z "$NM"; then
44023   ac_ct_NM=$NM
44024   for ac_prog in nm
44025 do
44026   # Extract the first word of "$ac_prog", so it can be a program name with args.
44027 set dummy $ac_prog; ac_word=$2
44028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44029 $as_echo_n "checking for $ac_word... " >&6; }
44030 if ${ac_cv_prog_ac_ct_NM+:} false; then :
44031   $as_echo_n "(cached) " >&6
44032 else
44033   if test -n "$ac_ct_NM"; then
44034   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
44035 else
44036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44037 for as_dir in $PATH
44038 do
44039   IFS=$as_save_IFS
44040   test -z "$as_dir" && as_dir=.
44041     for ac_exec_ext in '' $ac_executable_extensions; do
44042   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44043     ac_cv_prog_ac_ct_NM="$ac_prog"
44044     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44045     break 2
44046   fi
44047 done
44048   done
44049 IFS=$as_save_IFS
44050 
44051 fi
44052 fi
44053 ac_ct_NM=$ac_cv_prog_ac_ct_NM
44054 if test -n "$ac_ct_NM"; then
44055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
44056 $as_echo "$ac_ct_NM" >&6; }
44057 else
44058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44059 $as_echo "no" >&6; }
44060 fi
44061 
44062 
44063   test -n "$ac_ct_NM" && break
44064 done
44065 
44066   if test "x$ac_ct_NM" = x; then
44067     NM=""
44068   else
44069     case $cross_compiling:$ac_tool_warned in
44070 yes:)
44071 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44072 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44073 ac_tool_warned=yes ;;
44074 esac
44075     NM=$ac_ct_NM
44076   fi
44077 fi
44078 
44079   else
44080     # The variable is set, but is it from the command line or the environment?
44081 
44082     # Try to remove the string !NM! from our list.
44083     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
44084     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44085       # If it failed, the variable was not from the command line. Ignore it,
44086       # but warn the user (except for BASH, which is always set by the calling BASH).
44087       if test "xNM" != xBASH; then
44088         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
44089 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
44090       fi
44091       # Try to locate tool using the code snippet
44092       if test -n "$ac_tool_prefix"; then
44093   for ac_prog in nm
44094   do
44095     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44096 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44098 $as_echo_n "checking for $ac_word... " >&6; }
44099 if ${ac_cv_prog_NM+:} false; then :
44100   $as_echo_n "(cached) " >&6
44101 else
44102   if test -n "$NM"; then
44103   ac_cv_prog_NM="$NM" # Let the user override the test.
44104 else
44105 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44106 for as_dir in $PATH
44107 do
44108   IFS=$as_save_IFS
44109   test -z "$as_dir" && as_dir=.
44110     for ac_exec_ext in '' $ac_executable_extensions; do
44111   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44112     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
44113     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44114     break 2
44115   fi
44116 done
44117   done
44118 IFS=$as_save_IFS
44119 
44120 fi
44121 fi
44122 NM=$ac_cv_prog_NM
44123 if test -n "$NM"; then
44124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
44125 $as_echo "$NM" >&6; }
44126 else
44127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44128 $as_echo "no" >&6; }
44129 fi
44130 
44131 
44132     test -n "$NM" && break
44133   done
44134 fi
44135 if test -z "$NM"; then
44136   ac_ct_NM=$NM
44137   for ac_prog in nm
44138 do
44139   # Extract the first word of "$ac_prog", so it can be a program name with args.
44140 set dummy $ac_prog; ac_word=$2
44141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44142 $as_echo_n "checking for $ac_word... " >&6; }
44143 if ${ac_cv_prog_ac_ct_NM+:} false; then :
44144   $as_echo_n "(cached) " >&6
44145 else
44146   if test -n "$ac_ct_NM"; then
44147   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
44148 else
44149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44150 for as_dir in $PATH
44151 do
44152   IFS=$as_save_IFS
44153   test -z "$as_dir" && as_dir=.
44154     for ac_exec_ext in '' $ac_executable_extensions; do
44155   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44156     ac_cv_prog_ac_ct_NM="$ac_prog"
44157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44158     break 2
44159   fi
44160 done
44161   done
44162 IFS=$as_save_IFS
44163 
44164 fi
44165 fi
44166 ac_ct_NM=$ac_cv_prog_ac_ct_NM
44167 if test -n "$ac_ct_NM"; then
44168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
44169 $as_echo "$ac_ct_NM" >&6; }
44170 else
44171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44172 $as_echo "no" >&6; }
44173 fi
44174 
44175 
44176   test -n "$ac_ct_NM" && break
44177 done
44178 
44179   if test "x$ac_ct_NM" = x; then
44180     NM=""
44181   else
44182     case $cross_compiling:$ac_tool_warned in
44183 yes:)
44184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44185 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44186 ac_tool_warned=yes ;;
44187 esac
44188     NM=$ac_ct_NM
44189   fi
44190 fi
44191 
44192     else
44193       # If it succeeded, then it was overridden by the user. We will use it
44194       # for the tool.
44195 
44196       # First remove it from the list of overridden variables, so we can test
44197       # for unknown variables in the end.
44198       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44199 
44200       # Check if we try to supply an empty value
44201       if test "x$NM" = x; then
44202         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
44203 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
44204         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
44205 $as_echo_n "checking for NM... " >&6; }
44206         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44207 $as_echo "disabled" >&6; }
44208       else
44209         # Check if the provided tool contains a complete path.
44210         tool_specified="$NM"
44211         tool_basename="${tool_specified##*/}"
44212         if test "x$tool_basename" = "x$tool_specified"; then
44213           # A command without a complete path is provided, search $PATH.
44214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
44215 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
44216           # Extract the first word of "$tool_basename", so it can be a program name with args.
44217 set dummy $tool_basename; ac_word=$2
44218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44219 $as_echo_n "checking for $ac_word... " >&6; }
44220 if ${ac_cv_path_NM+:} false; then :
44221   $as_echo_n "(cached) " >&6
44222 else
44223   case $NM in
44224   [\\/]* | ?:[\\/]*)
44225   ac_cv_path_NM="$NM" # Let the user override the test with a path.
44226   ;;
44227   *)
44228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44229 for as_dir in $PATH
44230 do
44231   IFS=$as_save_IFS
44232   test -z "$as_dir" && as_dir=.
44233     for ac_exec_ext in '' $ac_executable_extensions; do
44234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44235     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
44236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44237     break 2
44238   fi
44239 done
44240   done
44241 IFS=$as_save_IFS
44242 
44243   ;;
44244 esac
44245 fi
44246 NM=$ac_cv_path_NM
44247 if test -n "$NM"; then
44248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
44249 $as_echo "$NM" >&6; }
44250 else
44251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44252 $as_echo "no" >&6; }
44253 fi
44254 
44255 
44256           if test "x$NM" = x; then
44257             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44258           fi
44259         else
44260           # Otherwise we believe it is a complete path. Use it as it is.
44261           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
44262 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
44263           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
44264 $as_echo_n "checking for NM... " >&6; }
44265           if test ! -x "$tool_specified"; then
44266             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44267 $as_echo "not found" >&6; }
44268             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44269           fi
44270           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44271 $as_echo "$tool_specified" >&6; }
44272         fi
44273       fi
44274     fi
44275 
44276   fi
44277 
44278 
44279     fi
44280 
44281   # Only process if variable expands to non-empty
44282 
44283   if test "x$NM" != x; then
44284     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44285 
44286   # First separate the path from the arguments. This will split at the first
44287   # space.
44288   complete="$NM"
44289   path="${complete%% *}"
44290   tmp="$complete EOL"
44291   arguments="${tmp#* }"
44292 
44293   # Input might be given as Windows format, start by converting to
44294   # unix format.
44295   new_path=`$CYGPATH -u "$path"`
44296 
44297   # Now try to locate executable using which
44298   new_path=`$WHICH "$new_path" 2> /dev/null`
44299   # bat and cmd files are not always considered executable in cygwin causing which
44300   # to not find them
44301   if test "x$new_path" = x \
44302       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44303       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44304     new_path=`$CYGPATH -u "$path"`
44305   fi
44306   if test "x$new_path" = x; then
44307     # Oops. Which didn't find the executable.
44308     # The splitting of arguments from the executable at a space might have been incorrect,
44309     # since paths with space are more likely in Windows. Give it another try with the whole
44310     # argument.
44311     path="$complete"
44312     arguments="EOL"
44313     new_path=`$CYGPATH -u "$path"`
44314     new_path=`$WHICH "$new_path" 2> /dev/null`
44315     # bat and cmd files are not always considered executable in cygwin causing which
44316     # to not find them
44317     if test "x$new_path" = x \
44318         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44319         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44320       new_path=`$CYGPATH -u "$path"`
44321     fi
44322     if test "x$new_path" = x; then
44323       # It's still not found. Now this is an unrecoverable error.
44324       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
44325 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
44326       has_space=`$ECHO "$complete" | $GREP " "`
44327       if test "x$has_space" != x; then
44328         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44329 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44330       fi
44331       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44332     fi
44333   fi
44334 
44335   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44336   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44337   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44338   # "foo.exe" is OK but "foo" is an error.
44339   #
44340   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44341   # It is also a way to make sure we got the proper file name for the real test later on.
44342   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44343   if test "x$test_shortpath" = x; then
44344     # Short path failed, file does not exist as specified.
44345     # Try adding .exe or .cmd
44346     if test -f "${new_path}.exe"; then
44347       input_to_shortpath="${new_path}.exe"
44348     elif test -f "${new_path}.cmd"; then
44349       input_to_shortpath="${new_path}.cmd"
44350     else
44351       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
44352 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
44353       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44354 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44355       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44356     fi
44357   else
44358     input_to_shortpath="$new_path"
44359   fi
44360 
44361   # Call helper function which possibly converts this using DOS-style short mode.
44362   # If so, the updated path is stored in $new_path.
44363   new_path="$input_to_shortpath"
44364 
44365   input_path="$input_to_shortpath"
44366   # Check if we need to convert this using DOS-style short mode. If the path
44367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44368   # take no chances and rewrite it.
44369   # Note: m4 eats our [], so we need to use [ and ] instead.
44370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44371   if test "x$has_forbidden_chars" != x; then
44372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44376       # Going to short mode and back again did indeed matter. Since short mode is
44377       # case insensitive, let's make it lowercase to improve readability.
44378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44379       # Now convert it back to Unix-style (cygpath)
44380       input_path=`$CYGPATH -u "$shortmode_path"`
44381       new_path="$input_path"
44382     fi
44383   fi
44384 
44385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44386   if test "x$test_cygdrive_prefix" = x; then
44387     # As a simple fix, exclude /usr/bin since it's not a real path.
44388     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44390       # a path prefixed by /cygdrive for fixpath to work.
44391       new_path="$CYGWIN_ROOT_PATH$input_path"
44392     fi
44393   fi
44394 
44395   # remove trailing .exe if any
44396   new_path="${new_path/%.exe/}"
44397 
44398     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44399 
44400   # First separate the path from the arguments. This will split at the first
44401   # space.
44402   complete="$NM"
44403   path="${complete%% *}"
44404   tmp="$complete EOL"
44405   arguments="${tmp#* }"
44406 
44407   # Input might be given as Windows format, start by converting to
44408   # unix format.
44409   new_path="$path"
44410 
44411   windows_path="$new_path"
44412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44413     unix_path=`$CYGPATH -u "$windows_path"`
44414     new_path="$unix_path"
44415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44417     new_path="$unix_path"
44418   fi
44419 
44420 
44421   # Now try to locate executable using which
44422   new_path=`$WHICH "$new_path" 2> /dev/null`
44423 
44424   if test "x$new_path" = x; then
44425     # Oops. Which didn't find the executable.
44426     # The splitting of arguments from the executable at a space might have been incorrect,
44427     # since paths with space are more likely in Windows. Give it another try with the whole
44428     # argument.
44429     path="$complete"
44430     arguments="EOL"
44431     new_path="$path"
44432 
44433   windows_path="$new_path"
44434   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44435     unix_path=`$CYGPATH -u "$windows_path"`
44436     new_path="$unix_path"
44437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44438     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44439     new_path="$unix_path"
44440   fi
44441 
44442 
44443     new_path=`$WHICH "$new_path" 2> /dev/null`
44444     # bat and cmd files are not always considered executable in MSYS causing which
44445     # to not find them
44446     if test "x$new_path" = x \
44447         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44448         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44449       new_path="$path"
44450 
44451   windows_path="$new_path"
44452   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44453     unix_path=`$CYGPATH -u "$windows_path"`
44454     new_path="$unix_path"
44455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44456     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44457     new_path="$unix_path"
44458   fi
44459 
44460     fi
44461 
44462     if test "x$new_path" = x; then
44463       # It's still not found. Now this is an unrecoverable error.
44464       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
44465 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
44466       has_space=`$ECHO "$complete" | $GREP " "`
44467       if test "x$has_space" != x; then
44468         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44469 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44470       fi
44471       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44472     fi
44473   fi
44474 
44475   # Now new_path has a complete unix path to the binary
44476   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44477     # Keep paths in /bin as-is, but remove trailing .exe if any
44478     new_path="${new_path/%.exe/}"
44479     # Do not save /bin paths to all_fixpath_prefixes!
44480   else
44481     # Not in mixed or Windows style, start by that.
44482     new_path=`cmd //c echo $new_path`
44483 
44484   input_path="$new_path"
44485   # Check if we need to convert this using DOS-style short mode. If the path
44486   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44487   # take no chances and rewrite it.
44488   # Note: m4 eats our [], so we need to use [ and ] instead.
44489   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44490   if test "x$has_forbidden_chars" != x; then
44491     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44492     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44493   fi
44494 
44495     # Output is in $new_path
44496 
44497   windows_path="$new_path"
44498   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44499     unix_path=`$CYGPATH -u "$windows_path"`
44500     new_path="$unix_path"
44501   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44502     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44503     new_path="$unix_path"
44504   fi
44505 
44506     # remove trailing .exe if any
44507     new_path="${new_path/%.exe/}"
44508 
44509     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44510     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44511   fi
44512 
44513     else
44514       # We're on a unix platform. Hooray! :)
44515       # First separate the path from the arguments. This will split at the first
44516       # space.
44517       complete="$NM"
44518       path="${complete%% *}"
44519       tmp="$complete EOL"
44520       arguments="${tmp#* }"
44521 
44522       # Cannot rely on the command "which" here since it doesn't always work.
44523       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44524       if test -z "$is_absolute_path"; then
44525         # Path to executable is not absolute. Find it.
44526         IFS_save="$IFS"
44527         IFS=:
44528         for p in $PATH; do
44529           if test -f "$p/$path" && test -x "$p/$path"; then
44530             new_path="$p/$path"
44531             break
44532           fi
44533         done
44534         IFS="$IFS_save"
44535       else
44536         # This is an absolute path, we can use it without further modifications.
44537         new_path="$path"
44538       fi
44539 
44540       if test "x$new_path" = x; then
44541         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
44542 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
44543         has_space=`$ECHO "$complete" | $GREP " "`
44544         if test "x$has_space" != x; then
44545           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44546 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44547         fi
44548         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
44549       fi
44550     fi
44551 
44552     # Now join together the path and the arguments once again
44553     if test "x$arguments" != xEOL; then
44554       new_complete="$new_path ${arguments% *}"
44555     else
44556       new_complete="$new_path"
44557     fi
44558 
44559     if test "x$complete" != "x$new_complete"; then
44560       NM="$new_complete"
44561       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
44562 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
44563     fi
44564   fi
44565 
44566     GNM="$NM"
44567 
44568   fi
44569 
44570   # objcopy is used for moving debug symbols to separate files when
44571   # full debug symbols are enabled.
44572   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
44573 
44574 
44575   # Publish this variable in the help.
44576 
44577 
44578   if [ -z "${OBJCOPY+x}" ]; then
44579     # The variable is not set by user, try to locate tool using the code snippet
44580     if test -n "$ac_tool_prefix"; then
44581   for ac_prog in gobjcopy objcopy
44582   do
44583     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44584 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44586 $as_echo_n "checking for $ac_word... " >&6; }
44587 if ${ac_cv_prog_OBJCOPY+:} false; then :
44588   $as_echo_n "(cached) " >&6
44589 else
44590   if test -n "$OBJCOPY"; then
44591   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
44592 else
44593 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44594 for as_dir in $PATH
44595 do
44596   IFS=$as_save_IFS
44597   test -z "$as_dir" && as_dir=.
44598     for ac_exec_ext in '' $ac_executable_extensions; do
44599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44600     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
44601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44602     break 2
44603   fi
44604 done
44605   done
44606 IFS=$as_save_IFS
44607 
44608 fi
44609 fi
44610 OBJCOPY=$ac_cv_prog_OBJCOPY
44611 if test -n "$OBJCOPY"; then
44612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
44613 $as_echo "$OBJCOPY" >&6; }
44614 else
44615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44616 $as_echo "no" >&6; }
44617 fi
44618 
44619 
44620     test -n "$OBJCOPY" && break
44621   done
44622 fi
44623 if test -z "$OBJCOPY"; then
44624   ac_ct_OBJCOPY=$OBJCOPY
44625   for ac_prog in gobjcopy objcopy
44626 do
44627   # Extract the first word of "$ac_prog", so it can be a program name with args.
44628 set dummy $ac_prog; ac_word=$2
44629 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44630 $as_echo_n "checking for $ac_word... " >&6; }
44631 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
44632   $as_echo_n "(cached) " >&6
44633 else
44634   if test -n "$ac_ct_OBJCOPY"; then
44635   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
44636 else
44637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44638 for as_dir in $PATH
44639 do
44640   IFS=$as_save_IFS
44641   test -z "$as_dir" && as_dir=.
44642     for ac_exec_ext in '' $ac_executable_extensions; do
44643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44644     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
44645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44646     break 2
44647   fi
44648 done
44649   done
44650 IFS=$as_save_IFS
44651 
44652 fi
44653 fi
44654 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
44655 if test -n "$ac_ct_OBJCOPY"; then
44656   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
44657 $as_echo "$ac_ct_OBJCOPY" >&6; }
44658 else
44659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44660 $as_echo "no" >&6; }
44661 fi
44662 
44663 
44664   test -n "$ac_ct_OBJCOPY" && break
44665 done
44666 
44667   if test "x$ac_ct_OBJCOPY" = x; then
44668     OBJCOPY=""
44669   else
44670     case $cross_compiling:$ac_tool_warned in
44671 yes:)
44672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44673 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44674 ac_tool_warned=yes ;;
44675 esac
44676     OBJCOPY=$ac_ct_OBJCOPY
44677   fi
44678 fi
44679 
44680   else
44681     # The variable is set, but is it from the command line or the environment?
44682 
44683     # Try to remove the string !OBJCOPY! from our list.
44684     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
44685     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44686       # If it failed, the variable was not from the command line. Ignore it,
44687       # but warn the user (except for BASH, which is always set by the calling BASH).
44688       if test "xOBJCOPY" != xBASH; then
44689         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
44690 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
44691       fi
44692       # Try to locate tool using the code snippet
44693       if test -n "$ac_tool_prefix"; then
44694   for ac_prog in gobjcopy objcopy
44695   do
44696     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44697 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44699 $as_echo_n "checking for $ac_word... " >&6; }
44700 if ${ac_cv_prog_OBJCOPY+:} false; then :
44701   $as_echo_n "(cached) " >&6
44702 else
44703   if test -n "$OBJCOPY"; then
44704   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
44705 else
44706 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44707 for as_dir in $PATH
44708 do
44709   IFS=$as_save_IFS
44710   test -z "$as_dir" && as_dir=.
44711     for ac_exec_ext in '' $ac_executable_extensions; do
44712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44713     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
44714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44715     break 2
44716   fi
44717 done
44718   done
44719 IFS=$as_save_IFS
44720 
44721 fi
44722 fi
44723 OBJCOPY=$ac_cv_prog_OBJCOPY
44724 if test -n "$OBJCOPY"; then
44725   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
44726 $as_echo "$OBJCOPY" >&6; }
44727 else
44728   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44729 $as_echo "no" >&6; }
44730 fi
44731 
44732 
44733     test -n "$OBJCOPY" && break
44734   done
44735 fi
44736 if test -z "$OBJCOPY"; then
44737   ac_ct_OBJCOPY=$OBJCOPY
44738   for ac_prog in gobjcopy objcopy
44739 do
44740   # Extract the first word of "$ac_prog", so it can be a program name with args.
44741 set dummy $ac_prog; ac_word=$2
44742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44743 $as_echo_n "checking for $ac_word... " >&6; }
44744 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
44745   $as_echo_n "(cached) " >&6
44746 else
44747   if test -n "$ac_ct_OBJCOPY"; then
44748   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
44749 else
44750 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44751 for as_dir in $PATH
44752 do
44753   IFS=$as_save_IFS
44754   test -z "$as_dir" && as_dir=.
44755     for ac_exec_ext in '' $ac_executable_extensions; do
44756   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44757     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
44758     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44759     break 2
44760   fi
44761 done
44762   done
44763 IFS=$as_save_IFS
44764 
44765 fi
44766 fi
44767 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
44768 if test -n "$ac_ct_OBJCOPY"; then
44769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
44770 $as_echo "$ac_ct_OBJCOPY" >&6; }
44771 else
44772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44773 $as_echo "no" >&6; }
44774 fi
44775 
44776 
44777   test -n "$ac_ct_OBJCOPY" && break
44778 done
44779 
44780   if test "x$ac_ct_OBJCOPY" = x; then
44781     OBJCOPY=""
44782   else
44783     case $cross_compiling:$ac_tool_warned in
44784 yes:)
44785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44786 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44787 ac_tool_warned=yes ;;
44788 esac
44789     OBJCOPY=$ac_ct_OBJCOPY
44790   fi
44791 fi
44792 
44793     else
44794       # If it succeeded, then it was overridden by the user. We will use it
44795       # for the tool.
44796 
44797       # First remove it from the list of overridden variables, so we can test
44798       # for unknown variables in the end.
44799       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44800 
44801       # Check if we try to supply an empty value
44802       if test "x$OBJCOPY" = x; then
44803         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
44804 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
44805         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
44806 $as_echo_n "checking for OBJCOPY... " >&6; }
44807         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44808 $as_echo "disabled" >&6; }
44809       else
44810         # Check if the provided tool contains a complete path.
44811         tool_specified="$OBJCOPY"
44812         tool_basename="${tool_specified##*/}"
44813         if test "x$tool_basename" = "x$tool_specified"; then
44814           # A command without a complete path is provided, search $PATH.
44815           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
44816 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
44817           # Extract the first word of "$tool_basename", so it can be a program name with args.
44818 set dummy $tool_basename; ac_word=$2
44819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44820 $as_echo_n "checking for $ac_word... " >&6; }
44821 if ${ac_cv_path_OBJCOPY+:} false; then :
44822   $as_echo_n "(cached) " >&6
44823 else
44824   case $OBJCOPY in
44825   [\\/]* | ?:[\\/]*)
44826   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
44827   ;;
44828   *)
44829   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44830 for as_dir in $PATH
44831 do
44832   IFS=$as_save_IFS
44833   test -z "$as_dir" && as_dir=.
44834     for ac_exec_ext in '' $ac_executable_extensions; do
44835   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44836     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
44837     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44838     break 2
44839   fi
44840 done
44841   done
44842 IFS=$as_save_IFS
44843 
44844   ;;
44845 esac
44846 fi
44847 OBJCOPY=$ac_cv_path_OBJCOPY
44848 if test -n "$OBJCOPY"; then
44849   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
44850 $as_echo "$OBJCOPY" >&6; }
44851 else
44852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44853 $as_echo "no" >&6; }
44854 fi
44855 
44856 
44857           if test "x$OBJCOPY" = x; then
44858             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44859           fi
44860         else
44861           # Otherwise we believe it is a complete path. Use it as it is.
44862           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
44863 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
44864           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
44865 $as_echo_n "checking for OBJCOPY... " >&6; }
44866           if test ! -x "$tool_specified"; then
44867             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44868 $as_echo "not found" >&6; }
44869             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
44870           fi
44871           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44872 $as_echo "$tool_specified" >&6; }
44873         fi
44874       fi
44875     fi
44876 
44877   fi
44878 
44879 
44880     # Only call fixup if objcopy was found.
44881     if test -n "$OBJCOPY"; then
44882 
44883   # Only process if variable expands to non-empty
44884 
44885   if test "x$OBJCOPY" != x; then
44886     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44887 
44888   # First separate the path from the arguments. This will split at the first
44889   # space.
44890   complete="$OBJCOPY"
44891   path="${complete%% *}"
44892   tmp="$complete EOL"
44893   arguments="${tmp#* }"
44894 
44895   # Input might be given as Windows format, start by converting to
44896   # unix format.
44897   new_path=`$CYGPATH -u "$path"`
44898 
44899   # Now try to locate executable using which
44900   new_path=`$WHICH "$new_path" 2> /dev/null`
44901   # bat and cmd files are not always considered executable in cygwin causing which
44902   # to not find them
44903   if test "x$new_path" = x \
44904       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44905       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44906     new_path=`$CYGPATH -u "$path"`
44907   fi
44908   if test "x$new_path" = x; then
44909     # Oops. Which didn't find the executable.
44910     # The splitting of arguments from the executable at a space might have been incorrect,
44911     # since paths with space are more likely in Windows. Give it another try with the whole
44912     # argument.
44913     path="$complete"
44914     arguments="EOL"
44915     new_path=`$CYGPATH -u "$path"`
44916     new_path=`$WHICH "$new_path" 2> /dev/null`
44917     # bat and cmd files are not always considered executable in cygwin causing which
44918     # to not find them
44919     if test "x$new_path" = x \
44920         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44921         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44922       new_path=`$CYGPATH -u "$path"`
44923     fi
44924     if test "x$new_path" = x; then
44925       # It's still not found. Now this is an unrecoverable error.
44926       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44927 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44928       has_space=`$ECHO "$complete" | $GREP " "`
44929       if test "x$has_space" != x; then
44930         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44931 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44932       fi
44933       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44934     fi
44935   fi
44936 
44937   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44938   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44939   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44940   # "foo.exe" is OK but "foo" is an error.
44941   #
44942   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44943   # It is also a way to make sure we got the proper file name for the real test later on.
44944   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44945   if test "x$test_shortpath" = x; then
44946     # Short path failed, file does not exist as specified.
44947     # Try adding .exe or .cmd
44948     if test -f "${new_path}.exe"; then
44949       input_to_shortpath="${new_path}.exe"
44950     elif test -f "${new_path}.cmd"; then
44951       input_to_shortpath="${new_path}.cmd"
44952     else
44953       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
44954 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
44955       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44956 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44957       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44958     fi
44959   else
44960     input_to_shortpath="$new_path"
44961   fi
44962 
44963   # Call helper function which possibly converts this using DOS-style short mode.
44964   # If so, the updated path is stored in $new_path.
44965   new_path="$input_to_shortpath"
44966 
44967   input_path="$input_to_shortpath"
44968   # Check if we need to convert this using DOS-style short mode. If the path
44969   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44970   # take no chances and rewrite it.
44971   # Note: m4 eats our [], so we need to use [ and ] instead.
44972   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44973   if test "x$has_forbidden_chars" != x; then
44974     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44975     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44976     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44977     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44978       # Going to short mode and back again did indeed matter. Since short mode is
44979       # case insensitive, let's make it lowercase to improve readability.
44980       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44981       # Now convert it back to Unix-style (cygpath)
44982       input_path=`$CYGPATH -u "$shortmode_path"`
44983       new_path="$input_path"
44984     fi
44985   fi
44986 
44987   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44988   if test "x$test_cygdrive_prefix" = x; then
44989     # As a simple fix, exclude /usr/bin since it's not a real path.
44990     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44991       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44992       # a path prefixed by /cygdrive for fixpath to work.
44993       new_path="$CYGWIN_ROOT_PATH$input_path"
44994     fi
44995   fi
44996 
44997   # remove trailing .exe if any
44998   new_path="${new_path/%.exe/}"
44999 
45000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45001 
45002   # First separate the path from the arguments. This will split at the first
45003   # space.
45004   complete="$OBJCOPY"
45005   path="${complete%% *}"
45006   tmp="$complete EOL"
45007   arguments="${tmp#* }"
45008 
45009   # Input might be given as Windows format, start by converting to
45010   # unix format.
45011   new_path="$path"
45012 
45013   windows_path="$new_path"
45014   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45015     unix_path=`$CYGPATH -u "$windows_path"`
45016     new_path="$unix_path"
45017   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45018     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45019     new_path="$unix_path"
45020   fi
45021 
45022 
45023   # Now try to locate executable using which
45024   new_path=`$WHICH "$new_path" 2> /dev/null`
45025 
45026   if test "x$new_path" = x; then
45027     # Oops. Which didn't find the executable.
45028     # The splitting of arguments from the executable at a space might have been incorrect,
45029     # since paths with space are more likely in Windows. Give it another try with the whole
45030     # argument.
45031     path="$complete"
45032     arguments="EOL"
45033     new_path="$path"
45034 
45035   windows_path="$new_path"
45036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45037     unix_path=`$CYGPATH -u "$windows_path"`
45038     new_path="$unix_path"
45039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45041     new_path="$unix_path"
45042   fi
45043 
45044 
45045     new_path=`$WHICH "$new_path" 2> /dev/null`
45046     # bat and cmd files are not always considered executable in MSYS causing which
45047     # to not find them
45048     if test "x$new_path" = x \
45049         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45050         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45051       new_path="$path"
45052 
45053   windows_path="$new_path"
45054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45055     unix_path=`$CYGPATH -u "$windows_path"`
45056     new_path="$unix_path"
45057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45059     new_path="$unix_path"
45060   fi
45061 
45062     fi
45063 
45064     if test "x$new_path" = x; then
45065       # It's still not found. Now this is an unrecoverable error.
45066       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
45067 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45068       has_space=`$ECHO "$complete" | $GREP " "`
45069       if test "x$has_space" != x; then
45070         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45071 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45072       fi
45073       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
45074     fi
45075   fi
45076 
45077   # Now new_path has a complete unix path to the binary
45078   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45079     # Keep paths in /bin as-is, but remove trailing .exe if any
45080     new_path="${new_path/%.exe/}"
45081     # Do not save /bin paths to all_fixpath_prefixes!
45082   else
45083     # Not in mixed or Windows style, start by that.
45084     new_path=`cmd //c echo $new_path`
45085 
45086   input_path="$new_path"
45087   # Check if we need to convert this using DOS-style short mode. If the path
45088   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45089   # take no chances and rewrite it.
45090   # Note: m4 eats our [], so we need to use [ and ] instead.
45091   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45092   if test "x$has_forbidden_chars" != x; then
45093     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45094     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45095   fi
45096 
45097     # Output is in $new_path
45098 
45099   windows_path="$new_path"
45100   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45101     unix_path=`$CYGPATH -u "$windows_path"`
45102     new_path="$unix_path"
45103   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45104     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45105     new_path="$unix_path"
45106   fi
45107 
45108     # remove trailing .exe if any
45109     new_path="${new_path/%.exe/}"
45110 
45111     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45112     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45113   fi
45114 
45115     else
45116       # We're on a unix platform. Hooray! :)
45117       # First separate the path from the arguments. This will split at the first
45118       # space.
45119       complete="$OBJCOPY"
45120       path="${complete%% *}"
45121       tmp="$complete EOL"
45122       arguments="${tmp#* }"
45123 
45124       # Cannot rely on the command "which" here since it doesn't always work.
45125       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45126       if test -z "$is_absolute_path"; then
45127         # Path to executable is not absolute. Find it.
45128         IFS_save="$IFS"
45129         IFS=:
45130         for p in $PATH; do
45131           if test -f "$p/$path" && test -x "$p/$path"; then
45132             new_path="$p/$path"
45133             break
45134           fi
45135         done
45136         IFS="$IFS_save"
45137       else
45138         # This is an absolute path, we can use it without further modifications.
45139         new_path="$path"
45140       fi
45141 
45142       if test "x$new_path" = x; then
45143         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
45144 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45145         has_space=`$ECHO "$complete" | $GREP " "`
45146         if test "x$has_space" != x; then
45147           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45148 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45149         fi
45150         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
45151       fi
45152     fi
45153 
45154     # Now join together the path and the arguments once again
45155     if test "x$arguments" != xEOL; then
45156       new_complete="$new_path ${arguments% *}"
45157     else
45158       new_complete="$new_path"
45159     fi
45160 
45161     if test "x$complete" != "x$new_complete"; then
45162       OBJCOPY="$new_complete"
45163       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
45164 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
45165     fi
45166   fi
45167 
45168       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
45169         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
45170         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
45171         # - version number is last blank separate word on first line
45172         # - version number formats that have been seen:
45173         #   - <major>.<minor>
45174         #   - <major>.<minor>.<micro>
45175         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
45176         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
45177          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
45178               -e 's/.* //' \
45179               -e '/^[01]\./b bad' \
45180               -e '/^2\./{' \
45181               -e '  s/^2\.//' \
45182               -e '  /^[0-9]$/b bad' \
45183               -e '  /^[0-9]\./b bad' \
45184               -e '  /^1[0-9]$/b bad' \
45185               -e '  /^1[0-9]\./b bad' \
45186               -e '  /^20\./b bad' \
45187               -e '  /^21\.0$/b bad' \
45188               -e '  /^21\.0\./b bad' \
45189               -e '}' \
45190               -e ':good' \
45191               -e 's/.*/VALID_VERSION/p' \
45192               -e 'q' \
45193               -e ':bad' \
45194               -e 's/.*/BAD_VERSION/p' \
45195               -e 'q'`
45196         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
45197           OBJCOPY=
45198           { $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
45199 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
45200           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
45201 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
45202           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
45203 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
45204           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
45205 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
45206           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
45207 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
45208         fi
45209       fi
45210     fi
45211   fi
45212 
45213 
45214 
45215   # Publish this variable in the help.
45216 
45217 
45218   if [ -z "${OBJDUMP+x}" ]; then
45219     # The variable is not set by user, try to locate tool using the code snippet
45220     if test -n "$ac_tool_prefix"; then
45221   for ac_prog in gobjdump objdump
45222   do
45223     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
45224 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
45225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45226 $as_echo_n "checking for $ac_word... " >&6; }
45227 if ${ac_cv_prog_OBJDUMP+:} false; then :
45228   $as_echo_n "(cached) " >&6
45229 else
45230   if test -n "$OBJDUMP"; then
45231   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
45232 else
45233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45234 for as_dir in $PATH
45235 do
45236   IFS=$as_save_IFS
45237   test -z "$as_dir" && as_dir=.
45238     for ac_exec_ext in '' $ac_executable_extensions; do
45239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45240     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
45241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45242     break 2
45243   fi
45244 done
45245   done
45246 IFS=$as_save_IFS
45247 
45248 fi
45249 fi
45250 OBJDUMP=$ac_cv_prog_OBJDUMP
45251 if test -n "$OBJDUMP"; then
45252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
45253 $as_echo "$OBJDUMP" >&6; }
45254 else
45255   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45256 $as_echo "no" >&6; }
45257 fi
45258 
45259 
45260     test -n "$OBJDUMP" && break
45261   done
45262 fi
45263 if test -z "$OBJDUMP"; then
45264   ac_ct_OBJDUMP=$OBJDUMP
45265   for ac_prog in gobjdump objdump
45266 do
45267   # Extract the first word of "$ac_prog", so it can be a program name with args.
45268 set dummy $ac_prog; ac_word=$2
45269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45270 $as_echo_n "checking for $ac_word... " >&6; }
45271 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
45272   $as_echo_n "(cached) " >&6
45273 else
45274   if test -n "$ac_ct_OBJDUMP"; then
45275   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
45276 else
45277 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45278 for as_dir in $PATH
45279 do
45280   IFS=$as_save_IFS
45281   test -z "$as_dir" && as_dir=.
45282     for ac_exec_ext in '' $ac_executable_extensions; do
45283   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45284     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
45285     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45286     break 2
45287   fi
45288 done
45289   done
45290 IFS=$as_save_IFS
45291 
45292 fi
45293 fi
45294 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
45295 if test -n "$ac_ct_OBJDUMP"; then
45296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
45297 $as_echo "$ac_ct_OBJDUMP" >&6; }
45298 else
45299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45300 $as_echo "no" >&6; }
45301 fi
45302 
45303 
45304   test -n "$ac_ct_OBJDUMP" && break
45305 done
45306 
45307   if test "x$ac_ct_OBJDUMP" = x; then
45308     OBJDUMP=""
45309   else
45310     case $cross_compiling:$ac_tool_warned in
45311 yes:)
45312 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
45313 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
45314 ac_tool_warned=yes ;;
45315 esac
45316     OBJDUMP=$ac_ct_OBJDUMP
45317   fi
45318 fi
45319 
45320   else
45321     # The variable is set, but is it from the command line or the environment?
45322 
45323     # Try to remove the string !OBJDUMP! from our list.
45324     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
45325     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45326       # If it failed, the variable was not from the command line. Ignore it,
45327       # but warn the user (except for BASH, which is always set by the calling BASH).
45328       if test "xOBJDUMP" != xBASH; then
45329         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
45330 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
45331       fi
45332       # Try to locate tool using the code snippet
45333       if test -n "$ac_tool_prefix"; then
45334   for ac_prog in gobjdump objdump
45335   do
45336     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
45337 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
45338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45339 $as_echo_n "checking for $ac_word... " >&6; }
45340 if ${ac_cv_prog_OBJDUMP+:} false; then :
45341   $as_echo_n "(cached) " >&6
45342 else
45343   if test -n "$OBJDUMP"; then
45344   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
45345 else
45346 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45347 for as_dir in $PATH
45348 do
45349   IFS=$as_save_IFS
45350   test -z "$as_dir" && as_dir=.
45351     for ac_exec_ext in '' $ac_executable_extensions; do
45352   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45353     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
45354     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45355     break 2
45356   fi
45357 done
45358   done
45359 IFS=$as_save_IFS
45360 
45361 fi
45362 fi
45363 OBJDUMP=$ac_cv_prog_OBJDUMP
45364 if test -n "$OBJDUMP"; then
45365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
45366 $as_echo "$OBJDUMP" >&6; }
45367 else
45368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45369 $as_echo "no" >&6; }
45370 fi
45371 
45372 
45373     test -n "$OBJDUMP" && break
45374   done
45375 fi
45376 if test -z "$OBJDUMP"; then
45377   ac_ct_OBJDUMP=$OBJDUMP
45378   for ac_prog in gobjdump objdump
45379 do
45380   # Extract the first word of "$ac_prog", so it can be a program name with args.
45381 set dummy $ac_prog; ac_word=$2
45382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45383 $as_echo_n "checking for $ac_word... " >&6; }
45384 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
45385   $as_echo_n "(cached) " >&6
45386 else
45387   if test -n "$ac_ct_OBJDUMP"; then
45388   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
45389 else
45390 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45391 for as_dir in $PATH
45392 do
45393   IFS=$as_save_IFS
45394   test -z "$as_dir" && as_dir=.
45395     for ac_exec_ext in '' $ac_executable_extensions; do
45396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45397     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
45398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45399     break 2
45400   fi
45401 done
45402   done
45403 IFS=$as_save_IFS
45404 
45405 fi
45406 fi
45407 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
45408 if test -n "$ac_ct_OBJDUMP"; then
45409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
45410 $as_echo "$ac_ct_OBJDUMP" >&6; }
45411 else
45412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45413 $as_echo "no" >&6; }
45414 fi
45415 
45416 
45417   test -n "$ac_ct_OBJDUMP" && break
45418 done
45419 
45420   if test "x$ac_ct_OBJDUMP" = x; then
45421     OBJDUMP=""
45422   else
45423     case $cross_compiling:$ac_tool_warned in
45424 yes:)
45425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
45426 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
45427 ac_tool_warned=yes ;;
45428 esac
45429     OBJDUMP=$ac_ct_OBJDUMP
45430   fi
45431 fi
45432 
45433     else
45434       # If it succeeded, then it was overridden by the user. We will use it
45435       # for the tool.
45436 
45437       # First remove it from the list of overridden variables, so we can test
45438       # for unknown variables in the end.
45439       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45440 
45441       # Check if we try to supply an empty value
45442       if test "x$OBJDUMP" = x; then
45443         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
45444 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
45445         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
45446 $as_echo_n "checking for OBJDUMP... " >&6; }
45447         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45448 $as_echo "disabled" >&6; }
45449       else
45450         # Check if the provided tool contains a complete path.
45451         tool_specified="$OBJDUMP"
45452         tool_basename="${tool_specified##*/}"
45453         if test "x$tool_basename" = "x$tool_specified"; then
45454           # A command without a complete path is provided, search $PATH.
45455           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
45456 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
45457           # Extract the first word of "$tool_basename", so it can be a program name with args.
45458 set dummy $tool_basename; ac_word=$2
45459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45460 $as_echo_n "checking for $ac_word... " >&6; }
45461 if ${ac_cv_path_OBJDUMP+:} false; then :
45462   $as_echo_n "(cached) " >&6
45463 else
45464   case $OBJDUMP in
45465   [\\/]* | ?:[\\/]*)
45466   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
45467   ;;
45468   *)
45469   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45470 for as_dir in $PATH
45471 do
45472   IFS=$as_save_IFS
45473   test -z "$as_dir" && as_dir=.
45474     for ac_exec_ext in '' $ac_executable_extensions; do
45475   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45476     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
45477     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45478     break 2
45479   fi
45480 done
45481   done
45482 IFS=$as_save_IFS
45483 
45484   ;;
45485 esac
45486 fi
45487 OBJDUMP=$ac_cv_path_OBJDUMP
45488 if test -n "$OBJDUMP"; then
45489   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
45490 $as_echo "$OBJDUMP" >&6; }
45491 else
45492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45493 $as_echo "no" >&6; }
45494 fi
45495 
45496 
45497           if test "x$OBJDUMP" = x; then
45498             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45499           fi
45500         else
45501           # Otherwise we believe it is a complete path. Use it as it is.
45502           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
45503 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
45504           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
45505 $as_echo_n "checking for OBJDUMP... " >&6; }
45506           if test ! -x "$tool_specified"; then
45507             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45508 $as_echo "not found" >&6; }
45509             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
45510           fi
45511           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45512 $as_echo "$tool_specified" >&6; }
45513         fi
45514       fi
45515     fi
45516 
45517   fi
45518 
45519 
45520   if test "x$OBJDUMP" != x; then
45521     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
45522     # bails if argument is missing.
45523 
45524   # Only process if variable expands to non-empty
45525 
45526   if test "x$OBJDUMP" != x; then
45527     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45528 
45529   # First separate the path from the arguments. This will split at the first
45530   # space.
45531   complete="$OBJDUMP"
45532   path="${complete%% *}"
45533   tmp="$complete EOL"
45534   arguments="${tmp#* }"
45535 
45536   # Input might be given as Windows format, start by converting to
45537   # unix format.
45538   new_path=`$CYGPATH -u "$path"`
45539 
45540   # Now try to locate executable using which
45541   new_path=`$WHICH "$new_path" 2> /dev/null`
45542   # bat and cmd files are not always considered executable in cygwin causing which
45543   # to not find them
45544   if test "x$new_path" = x \
45545       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45546       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45547     new_path=`$CYGPATH -u "$path"`
45548   fi
45549   if test "x$new_path" = x; then
45550     # Oops. Which didn't find the executable.
45551     # The splitting of arguments from the executable at a space might have been incorrect,
45552     # since paths with space are more likely in Windows. Give it another try with the whole
45553     # argument.
45554     path="$complete"
45555     arguments="EOL"
45556     new_path=`$CYGPATH -u "$path"`
45557     new_path=`$WHICH "$new_path" 2> /dev/null`
45558     # bat and cmd files are not always considered executable in cygwin causing which
45559     # to not find them
45560     if test "x$new_path" = x \
45561         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45562         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45563       new_path=`$CYGPATH -u "$path"`
45564     fi
45565     if test "x$new_path" = x; then
45566       # It's still not found. Now this is an unrecoverable error.
45567       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
45568 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
45569       has_space=`$ECHO "$complete" | $GREP " "`
45570       if test "x$has_space" != x; then
45571         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45572 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45573       fi
45574       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45575     fi
45576   fi
45577 
45578   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45579   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45580   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45581   # "foo.exe" is OK but "foo" is an error.
45582   #
45583   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45584   # It is also a way to make sure we got the proper file name for the real test later on.
45585   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45586   if test "x$test_shortpath" = x; then
45587     # Short path failed, file does not exist as specified.
45588     # Try adding .exe or .cmd
45589     if test -f "${new_path}.exe"; then
45590       input_to_shortpath="${new_path}.exe"
45591     elif test -f "${new_path}.cmd"; then
45592       input_to_shortpath="${new_path}.cmd"
45593     else
45594       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
45595 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
45596       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45597 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45598       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45599     fi
45600   else
45601     input_to_shortpath="$new_path"
45602   fi
45603 
45604   # Call helper function which possibly converts this using DOS-style short mode.
45605   # If so, the updated path is stored in $new_path.
45606   new_path="$input_to_shortpath"
45607 
45608   input_path="$input_to_shortpath"
45609   # Check if we need to convert this using DOS-style short mode. If the path
45610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45611   # take no chances and rewrite it.
45612   # Note: m4 eats our [], so we need to use [ and ] instead.
45613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45614   if test "x$has_forbidden_chars" != x; then
45615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45619       # Going to short mode and back again did indeed matter. Since short mode is
45620       # case insensitive, let's make it lowercase to improve readability.
45621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45622       # Now convert it back to Unix-style (cygpath)
45623       input_path=`$CYGPATH -u "$shortmode_path"`
45624       new_path="$input_path"
45625     fi
45626   fi
45627 
45628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45629   if test "x$test_cygdrive_prefix" = x; then
45630     # As a simple fix, exclude /usr/bin since it's not a real path.
45631     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45633       # a path prefixed by /cygdrive for fixpath to work.
45634       new_path="$CYGWIN_ROOT_PATH$input_path"
45635     fi
45636   fi
45637 
45638   # remove trailing .exe if any
45639   new_path="${new_path/%.exe/}"
45640 
45641     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45642 
45643   # First separate the path from the arguments. This will split at the first
45644   # space.
45645   complete="$OBJDUMP"
45646   path="${complete%% *}"
45647   tmp="$complete EOL"
45648   arguments="${tmp#* }"
45649 
45650   # Input might be given as Windows format, start by converting to
45651   # unix format.
45652   new_path="$path"
45653 
45654   windows_path="$new_path"
45655   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45656     unix_path=`$CYGPATH -u "$windows_path"`
45657     new_path="$unix_path"
45658   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45659     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45660     new_path="$unix_path"
45661   fi
45662 
45663 
45664   # Now try to locate executable using which
45665   new_path=`$WHICH "$new_path" 2> /dev/null`
45666 
45667   if test "x$new_path" = x; then
45668     # Oops. Which didn't find the executable.
45669     # The splitting of arguments from the executable at a space might have been incorrect,
45670     # since paths with space are more likely in Windows. Give it another try with the whole
45671     # argument.
45672     path="$complete"
45673     arguments="EOL"
45674     new_path="$path"
45675 
45676   windows_path="$new_path"
45677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45678     unix_path=`$CYGPATH -u "$windows_path"`
45679     new_path="$unix_path"
45680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45682     new_path="$unix_path"
45683   fi
45684 
45685 
45686     new_path=`$WHICH "$new_path" 2> /dev/null`
45687     # bat and cmd files are not always considered executable in MSYS causing which
45688     # to not find them
45689     if test "x$new_path" = x \
45690         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45691         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45692       new_path="$path"
45693 
45694   windows_path="$new_path"
45695   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45696     unix_path=`$CYGPATH -u "$windows_path"`
45697     new_path="$unix_path"
45698   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45699     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45700     new_path="$unix_path"
45701   fi
45702 
45703     fi
45704 
45705     if test "x$new_path" = x; then
45706       # It's still not found. Now this is an unrecoverable error.
45707       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
45708 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
45709       has_space=`$ECHO "$complete" | $GREP " "`
45710       if test "x$has_space" != x; then
45711         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45712 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45713       fi
45714       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45715     fi
45716   fi
45717 
45718   # Now new_path has a complete unix path to the binary
45719   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45720     # Keep paths in /bin as-is, but remove trailing .exe if any
45721     new_path="${new_path/%.exe/}"
45722     # Do not save /bin paths to all_fixpath_prefixes!
45723   else
45724     # Not in mixed or Windows style, start by that.
45725     new_path=`cmd //c echo $new_path`
45726 
45727   input_path="$new_path"
45728   # Check if we need to convert this using DOS-style short mode. If the path
45729   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45730   # take no chances and rewrite it.
45731   # Note: m4 eats our [], so we need to use [ and ] instead.
45732   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45733   if test "x$has_forbidden_chars" != x; then
45734     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45735     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45736   fi
45737 
45738     # Output is in $new_path
45739 
45740   windows_path="$new_path"
45741   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45742     unix_path=`$CYGPATH -u "$windows_path"`
45743     new_path="$unix_path"
45744   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45745     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45746     new_path="$unix_path"
45747   fi
45748 
45749     # remove trailing .exe if any
45750     new_path="${new_path/%.exe/}"
45751 
45752     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45753     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45754   fi
45755 
45756     else
45757       # We're on a unix platform. Hooray! :)
45758       # First separate the path from the arguments. This will split at the first
45759       # space.
45760       complete="$OBJDUMP"
45761       path="${complete%% *}"
45762       tmp="$complete EOL"
45763       arguments="${tmp#* }"
45764 
45765       # Cannot rely on the command "which" here since it doesn't always work.
45766       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45767       if test -z "$is_absolute_path"; then
45768         # Path to executable is not absolute. Find it.
45769         IFS_save="$IFS"
45770         IFS=:
45771         for p in $PATH; do
45772           if test -f "$p/$path" && test -x "$p/$path"; then
45773             new_path="$p/$path"
45774             break
45775           fi
45776         done
45777         IFS="$IFS_save"
45778       else
45779         # This is an absolute path, we can use it without further modifications.
45780         new_path="$path"
45781       fi
45782 
45783       if test "x$new_path" = x; then
45784         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
45785 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
45786         has_space=`$ECHO "$complete" | $GREP " "`
45787         if test "x$has_space" != x; then
45788           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45789 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45790         fi
45791         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
45792       fi
45793     fi
45794 
45795     # Now join together the path and the arguments once again
45796     if test "x$arguments" != xEOL; then
45797       new_complete="$new_path ${arguments% *}"
45798     else
45799       new_complete="$new_path"
45800     fi
45801 
45802     if test "x$complete" != "x$new_complete"; then
45803       OBJDUMP="$new_complete"
45804       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
45805 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
45806     fi
45807   fi
45808 
45809   fi
45810 
45811 
45812   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
45813   # to remain in place. Otherwise the compiler will not work in some siutations
45814   # in later configure checks.
45815   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
45816     PATH="$OLD_PATH"
45817   fi
45818 
45819   # Restore the flags to the user specified values.
45820   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
45821   CFLAGS="$ORG_CFLAGS"
45822   CXXFLAGS="$ORG_CXXFLAGS"
45823 
45824 
45825 # Finally do some processing after the detection phase
45826 
45827   if test "x$COMPILE_TYPE" = "xcross"; then
45828     # Now we need to find a C/C++ compiler that can build executables for the
45829     # build platform. We can't use the AC_PROG_CC macro, since it can only be
45830     # used once. Also, we need to do this without adding a tools dir to the
45831     # path, otherwise we might pick up cross-compilers which don't use standard
45832     # naming.
45833 
45834     OLDPATH="$PATH"
45835 
45836 
45837 # Check whether --with-build-devkit was given.
45838 if test "${with_build_devkit+set}" = set; then :
45839   withval=$with_build_devkit;
45840 fi
45841 
45842     if test "x$with_build_devkit" = "xyes"; then
45843       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
45844     elif test -n "$with_build_devkit"; then
45845       if test ! -d "$with_build_devkit"; then
45846         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
45847       else
45848 
45849   # Only process if variable expands to non-empty
45850 
45851   if test "x$with_build_devkit" != x; then
45852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45853 
45854   # Input might be given as Windows format, start by converting to
45855   # unix format.
45856   path="$with_build_devkit"
45857   new_path=`$CYGPATH -u "$path"`
45858 
45859   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45860   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45861   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45862   # "foo.exe" is OK but "foo" is an error.
45863   #
45864   # This test is therefore slightly more accurate than "test -f" to check for file precense.
45865   # It is also a way to make sure we got the proper file name for the real test later on.
45866   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45867   if test "x$test_shortpath" = x; then
45868     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
45869 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
45870     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
45871   fi
45872 
45873   # Call helper function which possibly converts this using DOS-style short mode.
45874   # If so, the updated path is stored in $new_path.
45875 
45876   input_path="$new_path"
45877   # Check if we need to convert this using DOS-style short mode. If the path
45878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45879   # take no chances and rewrite it.
45880   # Note: m4 eats our [], so we need to use [ and ] instead.
45881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45882   if test "x$has_forbidden_chars" != x; then
45883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45884     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45885     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45886     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45887       # Going to short mode and back again did indeed matter. Since short mode is
45888       # case insensitive, let's make it lowercase to improve readability.
45889       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45890       # Now convert it back to Unix-style (cygpath)
45891       input_path=`$CYGPATH -u "$shortmode_path"`
45892       new_path="$input_path"
45893     fi
45894   fi
45895 
45896   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45897   if test "x$test_cygdrive_prefix" = x; then
45898     # As a simple fix, exclude /usr/bin since it's not a real path.
45899     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45900       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45901       # a path prefixed by /cygdrive for fixpath to work.
45902       new_path="$CYGWIN_ROOT_PATH$input_path"
45903     fi
45904   fi
45905 
45906 
45907   if test "x$path" != "x$new_path"; then
45908     with_build_devkit="$new_path"
45909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
45910 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
45911   fi
45912 
45913     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45914 
45915   path="$with_build_devkit"
45916   has_colon=`$ECHO $path | $GREP ^.:`
45917   new_path="$path"
45918   if test "x$has_colon" = x; then
45919     # Not in mixed or Windows style, start by that.
45920     new_path=`cmd //c echo $path`
45921   fi
45922 
45923 
45924   input_path="$new_path"
45925   # Check if we need to convert this using DOS-style short mode. If the path
45926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45927   # take no chances and rewrite it.
45928   # Note: m4 eats our [], so we need to use [ and ] instead.
45929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45930   if test "x$has_forbidden_chars" != x; then
45931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45932     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45933   fi
45934 
45935 
45936   windows_path="$new_path"
45937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45938     unix_path=`$CYGPATH -u "$windows_path"`
45939     new_path="$unix_path"
45940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45942     new_path="$unix_path"
45943   fi
45944 
45945   if test "x$path" != "x$new_path"; then
45946     with_build_devkit="$new_path"
45947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
45948 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
45949   fi
45950 
45951   # Save the first 10 bytes of this path to the storage, so fixpath can work.
45952   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45953 
45954     else
45955       # We're on a unix platform. Hooray! :)
45956       path="$with_build_devkit"
45957       has_space=`$ECHO "$path" | $GREP " "`
45958       if test "x$has_space" != x; then
45959         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
45960 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
45961         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45962       fi
45963 
45964       # Use eval to expand a potential ~
45965       eval path="$path"
45966       if test ! -f "$path" && test ! -d "$path"; then
45967         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
45968       fi
45969 
45970       if test -d "$path"; then
45971         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
45972       else
45973         dir="`$DIRNAME "$path"`"
45974         base="`$BASENAME "$path"`"
45975         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
45976       fi
45977     fi
45978   fi
45979 
45980         BUILD_DEVKIT_ROOT="$with_build_devkit"
45981         # Check for a meta data info file in the root of the devkit
45982         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
45983           # Process devkit.info so that existing devkit variables are not
45984           # modified by this
45985           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
45986               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
45987               -e "s/\$host/\$build/g" \
45988               $BUILD_DEVKIT_ROOT/devkit.info \
45989               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45990           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
45991           # This potentially sets the following:
45992           # A descriptive name of the devkit
45993 
45994   if test "x$BUILD_DEVKIT_NAME" = x; then
45995     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
45996   fi
45997 
45998           # Corresponds to --with-extra-path
45999 
46000   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
46001     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
46002   fi
46003 
46004           # Corresponds to --with-toolchain-path
46005 
46006   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
46007     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
46008   fi
46009 
46010           # Corresponds to --with-sysroot
46011 
46012   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
46013     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
46014   fi
46015 
46016           # Skip the Window specific parts
46017         fi
46018 
46019         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
46020 $as_echo_n "checking for build platform devkit... " >&6; }
46021         if test "x$BUILD_DEVKIT_NAME" != x; then
46022           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
46023 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
46024         else
46025           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
46026 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
46027         fi
46028 
46029         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
46030 
46031   if test "x$BUILD_SYSROOT" != "x"; then
46032     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46033       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
46034         # Solaris Studio does not have a concept of sysroot. Instead we must
46035         # make sure the default include and lib dirs are appended to each
46036         # compile and link command line. Must also add -I-xbuiltin to enable
46037         # inlining of system functions and intrinsics.
46038         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
46039         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
46040             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
46041       fi
46042     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
46043       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
46044       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
46045     elif test "x$TOOLCHAIN_TYPE" = xclang; then
46046       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
46047       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
46048     fi
46049     # The global CFLAGS and LDFLAGS variables need these for configure to function
46050     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
46051     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
46052     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
46053     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
46054   fi
46055 
46056   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46057     # We also need -iframework<path>/System/Library/Frameworks
46058     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
46059     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
46060     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
46061     # set this here so it doesn't have to be peppered throughout the forest
46062     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
46063     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
46064   fi
46065 
46066 
46067 
46068 
46069 
46070          # Fallback default of just /bin if DEVKIT_PATH is not defined
46071         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
46072           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
46073         fi
46074         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
46075       fi
46076     fi
46077 
46078     # FIXME: we should list the discovered compilers as an exclude pattern!
46079     # If we do that, we can do this detection before POST_DETECTION, and still
46080     # find the build compilers in the tools dir, if needed.
46081 
46082 
46083 
46084   # Publish this variable in the help.
46085 
46086 
46087   if [ -z "${BUILD_CC+x}" ]; then
46088     # The variable is not set by user, try to locate tool using the code snippet
46089     for ac_prog in cl cc gcc
46090 do
46091   # Extract the first word of "$ac_prog", so it can be a program name with args.
46092 set dummy $ac_prog; ac_word=$2
46093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46094 $as_echo_n "checking for $ac_word... " >&6; }
46095 if ${ac_cv_path_BUILD_CC+:} false; then :
46096   $as_echo_n "(cached) " >&6
46097 else
46098   case $BUILD_CC in
46099   [\\/]* | ?:[\\/]*)
46100   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
46101   ;;
46102   *)
46103   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46104 for as_dir in $PATH
46105 do
46106   IFS=$as_save_IFS
46107   test -z "$as_dir" && as_dir=.
46108     for ac_exec_ext in '' $ac_executable_extensions; do
46109   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46110     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
46111     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46112     break 2
46113   fi
46114 done
46115   done
46116 IFS=$as_save_IFS
46117 
46118   ;;
46119 esac
46120 fi
46121 BUILD_CC=$ac_cv_path_BUILD_CC
46122 if test -n "$BUILD_CC"; then
46123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
46124 $as_echo "$BUILD_CC" >&6; }
46125 else
46126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46127 $as_echo "no" >&6; }
46128 fi
46129 
46130 
46131   test -n "$BUILD_CC" && break
46132 done
46133 
46134   else
46135     # The variable is set, but is it from the command line or the environment?
46136 
46137     # Try to remove the string !BUILD_CC! from our list.
46138     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
46139     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46140       # If it failed, the variable was not from the command line. Ignore it,
46141       # but warn the user (except for BASH, which is always set by the calling BASH).
46142       if test "xBUILD_CC" != xBASH; then
46143         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
46144 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
46145       fi
46146       # Try to locate tool using the code snippet
46147       for ac_prog in cl cc gcc
46148 do
46149   # Extract the first word of "$ac_prog", so it can be a program name with args.
46150 set dummy $ac_prog; ac_word=$2
46151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46152 $as_echo_n "checking for $ac_word... " >&6; }
46153 if ${ac_cv_path_BUILD_CC+:} false; then :
46154   $as_echo_n "(cached) " >&6
46155 else
46156   case $BUILD_CC in
46157   [\\/]* | ?:[\\/]*)
46158   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
46159   ;;
46160   *)
46161   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46162 for as_dir in $PATH
46163 do
46164   IFS=$as_save_IFS
46165   test -z "$as_dir" && as_dir=.
46166     for ac_exec_ext in '' $ac_executable_extensions; do
46167   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46168     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
46169     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46170     break 2
46171   fi
46172 done
46173   done
46174 IFS=$as_save_IFS
46175 
46176   ;;
46177 esac
46178 fi
46179 BUILD_CC=$ac_cv_path_BUILD_CC
46180 if test -n "$BUILD_CC"; then
46181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
46182 $as_echo "$BUILD_CC" >&6; }
46183 else
46184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46185 $as_echo "no" >&6; }
46186 fi
46187 
46188 
46189   test -n "$BUILD_CC" && break
46190 done
46191 
46192     else
46193       # If it succeeded, then it was overridden by the user. We will use it
46194       # for the tool.
46195 
46196       # First remove it from the list of overridden variables, so we can test
46197       # for unknown variables in the end.
46198       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46199 
46200       # Check if we try to supply an empty value
46201       if test "x$BUILD_CC" = x; then
46202         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
46203 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
46204         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
46205 $as_echo_n "checking for BUILD_CC... " >&6; }
46206         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46207 $as_echo "disabled" >&6; }
46208       else
46209         # Check if the provided tool contains a complete path.
46210         tool_specified="$BUILD_CC"
46211         tool_basename="${tool_specified##*/}"
46212         if test "x$tool_basename" = "x$tool_specified"; then
46213           # A command without a complete path is provided, search $PATH.
46214           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
46215 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
46216           # Extract the first word of "$tool_basename", so it can be a program name with args.
46217 set dummy $tool_basename; ac_word=$2
46218 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46219 $as_echo_n "checking for $ac_word... " >&6; }
46220 if ${ac_cv_path_BUILD_CC+:} false; then :
46221   $as_echo_n "(cached) " >&6
46222 else
46223   case $BUILD_CC in
46224   [\\/]* | ?:[\\/]*)
46225   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
46226   ;;
46227   *)
46228   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46229 for as_dir in $PATH
46230 do
46231   IFS=$as_save_IFS
46232   test -z "$as_dir" && as_dir=.
46233     for ac_exec_ext in '' $ac_executable_extensions; do
46234   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46235     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
46236     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46237     break 2
46238   fi
46239 done
46240   done
46241 IFS=$as_save_IFS
46242 
46243   ;;
46244 esac
46245 fi
46246 BUILD_CC=$ac_cv_path_BUILD_CC
46247 if test -n "$BUILD_CC"; then
46248   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
46249 $as_echo "$BUILD_CC" >&6; }
46250 else
46251   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46252 $as_echo "no" >&6; }
46253 fi
46254 
46255 
46256           if test "x$BUILD_CC" = x; then
46257             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46258           fi
46259         else
46260           # Otherwise we believe it is a complete path. Use it as it is.
46261           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
46262 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
46263           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
46264 $as_echo_n "checking for BUILD_CC... " >&6; }
46265           if test ! -x "$tool_specified"; then
46266             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46267 $as_echo "not found" >&6; }
46268             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
46269           fi
46270           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46271 $as_echo "$tool_specified" >&6; }
46272         fi
46273       fi
46274     fi
46275 
46276   fi
46277 
46278 
46279 
46280   if test "x$BUILD_CC" = x; then
46281     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
46282   fi
46283 
46284 
46285 
46286   # Only process if variable expands to non-empty
46287 
46288   if test "x$BUILD_CC" != x; then
46289     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46290 
46291   # First separate the path from the arguments. This will split at the first
46292   # space.
46293   complete="$BUILD_CC"
46294   path="${complete%% *}"
46295   tmp="$complete EOL"
46296   arguments="${tmp#* }"
46297 
46298   # Input might be given as Windows format, start by converting to
46299   # unix format.
46300   new_path=`$CYGPATH -u "$path"`
46301 
46302   # Now try to locate executable using which
46303   new_path=`$WHICH "$new_path" 2> /dev/null`
46304   # bat and cmd files are not always considered executable in cygwin causing which
46305   # to not find them
46306   if test "x$new_path" = x \
46307       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46308       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46309     new_path=`$CYGPATH -u "$path"`
46310   fi
46311   if test "x$new_path" = x; then
46312     # Oops. Which didn't find the executable.
46313     # The splitting of arguments from the executable at a space might have been incorrect,
46314     # since paths with space are more likely in Windows. Give it another try with the whole
46315     # argument.
46316     path="$complete"
46317     arguments="EOL"
46318     new_path=`$CYGPATH -u "$path"`
46319     new_path=`$WHICH "$new_path" 2> /dev/null`
46320     # bat and cmd files are not always considered executable in cygwin causing which
46321     # to not find them
46322     if test "x$new_path" = x \
46323         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46324         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46325       new_path=`$CYGPATH -u "$path"`
46326     fi
46327     if test "x$new_path" = x; then
46328       # It's still not found. Now this is an unrecoverable error.
46329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
46330 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
46331       has_space=`$ECHO "$complete" | $GREP " "`
46332       if test "x$has_space" != x; then
46333         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46334 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46335       fi
46336       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46337     fi
46338   fi
46339 
46340   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46341   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46342   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46343   # "foo.exe" is OK but "foo" is an error.
46344   #
46345   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46346   # It is also a way to make sure we got the proper file name for the real test later on.
46347   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46348   if test "x$test_shortpath" = x; then
46349     # Short path failed, file does not exist as specified.
46350     # Try adding .exe or .cmd
46351     if test -f "${new_path}.exe"; then
46352       input_to_shortpath="${new_path}.exe"
46353     elif test -f "${new_path}.cmd"; then
46354       input_to_shortpath="${new_path}.cmd"
46355     else
46356       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
46357 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
46358       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46359 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46360       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46361     fi
46362   else
46363     input_to_shortpath="$new_path"
46364   fi
46365 
46366   # Call helper function which possibly converts this using DOS-style short mode.
46367   # If so, the updated path is stored in $new_path.
46368   new_path="$input_to_shortpath"
46369 
46370   input_path="$input_to_shortpath"
46371   # Check if we need to convert this using DOS-style short mode. If the path
46372   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46373   # take no chances and rewrite it.
46374   # Note: m4 eats our [], so we need to use [ and ] instead.
46375   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46376   if test "x$has_forbidden_chars" != x; then
46377     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46378     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46379     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46380     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46381       # Going to short mode and back again did indeed matter. Since short mode is
46382       # case insensitive, let's make it lowercase to improve readability.
46383       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46384       # Now convert it back to Unix-style (cygpath)
46385       input_path=`$CYGPATH -u "$shortmode_path"`
46386       new_path="$input_path"
46387     fi
46388   fi
46389 
46390   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46391   if test "x$test_cygdrive_prefix" = x; then
46392     # As a simple fix, exclude /usr/bin since it's not a real path.
46393     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46394       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46395       # a path prefixed by /cygdrive for fixpath to work.
46396       new_path="$CYGWIN_ROOT_PATH$input_path"
46397     fi
46398   fi
46399 
46400   # remove trailing .exe if any
46401   new_path="${new_path/%.exe/}"
46402 
46403     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46404 
46405   # First separate the path from the arguments. This will split at the first
46406   # space.
46407   complete="$BUILD_CC"
46408   path="${complete%% *}"
46409   tmp="$complete EOL"
46410   arguments="${tmp#* }"
46411 
46412   # Input might be given as Windows format, start by converting to
46413   # unix format.
46414   new_path="$path"
46415 
46416   windows_path="$new_path"
46417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46418     unix_path=`$CYGPATH -u "$windows_path"`
46419     new_path="$unix_path"
46420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46422     new_path="$unix_path"
46423   fi
46424 
46425 
46426   # Now try to locate executable using which
46427   new_path=`$WHICH "$new_path" 2> /dev/null`
46428 
46429   if test "x$new_path" = x; then
46430     # Oops. Which didn't find the executable.
46431     # The splitting of arguments from the executable at a space might have been incorrect,
46432     # since paths with space are more likely in Windows. Give it another try with the whole
46433     # argument.
46434     path="$complete"
46435     arguments="EOL"
46436     new_path="$path"
46437 
46438   windows_path="$new_path"
46439   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46440     unix_path=`$CYGPATH -u "$windows_path"`
46441     new_path="$unix_path"
46442   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46443     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46444     new_path="$unix_path"
46445   fi
46446 
46447 
46448     new_path=`$WHICH "$new_path" 2> /dev/null`
46449     # bat and cmd files are not always considered executable in MSYS causing which
46450     # to not find them
46451     if test "x$new_path" = x \
46452         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46453         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46454       new_path="$path"
46455 
46456   windows_path="$new_path"
46457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46458     unix_path=`$CYGPATH -u "$windows_path"`
46459     new_path="$unix_path"
46460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46462     new_path="$unix_path"
46463   fi
46464 
46465     fi
46466 
46467     if test "x$new_path" = x; then
46468       # It's still not found. Now this is an unrecoverable error.
46469       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
46470 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
46471       has_space=`$ECHO "$complete" | $GREP " "`
46472       if test "x$has_space" != x; then
46473         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46474 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46475       fi
46476       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46477     fi
46478   fi
46479 
46480   # Now new_path has a complete unix path to the binary
46481   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46482     # Keep paths in /bin as-is, but remove trailing .exe if any
46483     new_path="${new_path/%.exe/}"
46484     # Do not save /bin paths to all_fixpath_prefixes!
46485   else
46486     # Not in mixed or Windows style, start by that.
46487     new_path=`cmd //c echo $new_path`
46488 
46489   input_path="$new_path"
46490   # Check if we need to convert this using DOS-style short mode. If the path
46491   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46492   # take no chances and rewrite it.
46493   # Note: m4 eats our [], so we need to use [ and ] instead.
46494   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46495   if test "x$has_forbidden_chars" != x; then
46496     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46497     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46498   fi
46499 
46500     # Output is in $new_path
46501 
46502   windows_path="$new_path"
46503   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46504     unix_path=`$CYGPATH -u "$windows_path"`
46505     new_path="$unix_path"
46506   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46507     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46508     new_path="$unix_path"
46509   fi
46510 
46511     # remove trailing .exe if any
46512     new_path="${new_path/%.exe/}"
46513 
46514     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46515     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46516   fi
46517 
46518     else
46519       # We're on a unix platform. Hooray! :)
46520       # First separate the path from the arguments. This will split at the first
46521       # space.
46522       complete="$BUILD_CC"
46523       path="${complete%% *}"
46524       tmp="$complete EOL"
46525       arguments="${tmp#* }"
46526 
46527       # Cannot rely on the command "which" here since it doesn't always work.
46528       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46529       if test -z "$is_absolute_path"; then
46530         # Path to executable is not absolute. Find it.
46531         IFS_save="$IFS"
46532         IFS=:
46533         for p in $PATH; do
46534           if test -f "$p/$path" && test -x "$p/$path"; then
46535             new_path="$p/$path"
46536             break
46537           fi
46538         done
46539         IFS="$IFS_save"
46540       else
46541         # This is an absolute path, we can use it without further modifications.
46542         new_path="$path"
46543       fi
46544 
46545       if test "x$new_path" = x; then
46546         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
46547 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
46548         has_space=`$ECHO "$complete" | $GREP " "`
46549         if test "x$has_space" != x; then
46550           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46551 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46552         fi
46553         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
46554       fi
46555     fi
46556 
46557     # Now join together the path and the arguments once again
46558     if test "x$arguments" != xEOL; then
46559       new_complete="$new_path ${arguments% *}"
46560     else
46561       new_complete="$new_path"
46562     fi
46563 
46564     if test "x$complete" != "x$new_complete"; then
46565       BUILD_CC="$new_complete"
46566       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
46567 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
46568     fi
46569   fi
46570 
46571 
46572 
46573 
46574   # Publish this variable in the help.
46575 
46576 
46577   if [ -z "${BUILD_CXX+x}" ]; then
46578     # The variable is not set by user, try to locate tool using the code snippet
46579     for ac_prog in cl CC g++
46580 do
46581   # Extract the first word of "$ac_prog", so it can be a program name with args.
46582 set dummy $ac_prog; ac_word=$2
46583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46584 $as_echo_n "checking for $ac_word... " >&6; }
46585 if ${ac_cv_path_BUILD_CXX+:} false; then :
46586   $as_echo_n "(cached) " >&6
46587 else
46588   case $BUILD_CXX in
46589   [\\/]* | ?:[\\/]*)
46590   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
46591   ;;
46592   *)
46593   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46594 for as_dir in $PATH
46595 do
46596   IFS=$as_save_IFS
46597   test -z "$as_dir" && as_dir=.
46598     for ac_exec_ext in '' $ac_executable_extensions; do
46599   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46600     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
46601     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46602     break 2
46603   fi
46604 done
46605   done
46606 IFS=$as_save_IFS
46607 
46608   ;;
46609 esac
46610 fi
46611 BUILD_CXX=$ac_cv_path_BUILD_CXX
46612 if test -n "$BUILD_CXX"; then
46613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
46614 $as_echo "$BUILD_CXX" >&6; }
46615 else
46616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46617 $as_echo "no" >&6; }
46618 fi
46619 
46620 
46621   test -n "$BUILD_CXX" && break
46622 done
46623 
46624   else
46625     # The variable is set, but is it from the command line or the environment?
46626 
46627     # Try to remove the string !BUILD_CXX! from our list.
46628     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
46629     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46630       # If it failed, the variable was not from the command line. Ignore it,
46631       # but warn the user (except for BASH, which is always set by the calling BASH).
46632       if test "xBUILD_CXX" != xBASH; then
46633         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
46634 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
46635       fi
46636       # Try to locate tool using the code snippet
46637       for ac_prog in cl CC g++
46638 do
46639   # Extract the first word of "$ac_prog", so it can be a program name with args.
46640 set dummy $ac_prog; ac_word=$2
46641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46642 $as_echo_n "checking for $ac_word... " >&6; }
46643 if ${ac_cv_path_BUILD_CXX+:} false; then :
46644   $as_echo_n "(cached) " >&6
46645 else
46646   case $BUILD_CXX in
46647   [\\/]* | ?:[\\/]*)
46648   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
46649   ;;
46650   *)
46651   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46652 for as_dir in $PATH
46653 do
46654   IFS=$as_save_IFS
46655   test -z "$as_dir" && as_dir=.
46656     for ac_exec_ext in '' $ac_executable_extensions; do
46657   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46658     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
46659     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46660     break 2
46661   fi
46662 done
46663   done
46664 IFS=$as_save_IFS
46665 
46666   ;;
46667 esac
46668 fi
46669 BUILD_CXX=$ac_cv_path_BUILD_CXX
46670 if test -n "$BUILD_CXX"; then
46671   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
46672 $as_echo "$BUILD_CXX" >&6; }
46673 else
46674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46675 $as_echo "no" >&6; }
46676 fi
46677 
46678 
46679   test -n "$BUILD_CXX" && break
46680 done
46681 
46682     else
46683       # If it succeeded, then it was overridden by the user. We will use it
46684       # for the tool.
46685 
46686       # First remove it from the list of overridden variables, so we can test
46687       # for unknown variables in the end.
46688       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46689 
46690       # Check if we try to supply an empty value
46691       if test "x$BUILD_CXX" = x; then
46692         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
46693 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
46694         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
46695 $as_echo_n "checking for BUILD_CXX... " >&6; }
46696         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46697 $as_echo "disabled" >&6; }
46698       else
46699         # Check if the provided tool contains a complete path.
46700         tool_specified="$BUILD_CXX"
46701         tool_basename="${tool_specified##*/}"
46702         if test "x$tool_basename" = "x$tool_specified"; then
46703           # A command without a complete path is provided, search $PATH.
46704           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
46705 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
46706           # Extract the first word of "$tool_basename", so it can be a program name with args.
46707 set dummy $tool_basename; ac_word=$2
46708 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46709 $as_echo_n "checking for $ac_word... " >&6; }
46710 if ${ac_cv_path_BUILD_CXX+:} false; then :
46711   $as_echo_n "(cached) " >&6
46712 else
46713   case $BUILD_CXX in
46714   [\\/]* | ?:[\\/]*)
46715   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
46716   ;;
46717   *)
46718   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46719 for as_dir in $PATH
46720 do
46721   IFS=$as_save_IFS
46722   test -z "$as_dir" && as_dir=.
46723     for ac_exec_ext in '' $ac_executable_extensions; do
46724   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46725     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
46726     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46727     break 2
46728   fi
46729 done
46730   done
46731 IFS=$as_save_IFS
46732 
46733   ;;
46734 esac
46735 fi
46736 BUILD_CXX=$ac_cv_path_BUILD_CXX
46737 if test -n "$BUILD_CXX"; then
46738   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
46739 $as_echo "$BUILD_CXX" >&6; }
46740 else
46741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46742 $as_echo "no" >&6; }
46743 fi
46744 
46745 
46746           if test "x$BUILD_CXX" = x; then
46747             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46748           fi
46749         else
46750           # Otherwise we believe it is a complete path. Use it as it is.
46751           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
46752 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
46753           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
46754 $as_echo_n "checking for BUILD_CXX... " >&6; }
46755           if test ! -x "$tool_specified"; then
46756             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46757 $as_echo "not found" >&6; }
46758             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
46759           fi
46760           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46761 $as_echo "$tool_specified" >&6; }
46762         fi
46763       fi
46764     fi
46765 
46766   fi
46767 
46768 
46769 
46770   if test "x$BUILD_CXX" = x; then
46771     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
46772   fi
46773 
46774 
46775 
46776   # Only process if variable expands to non-empty
46777 
46778   if test "x$BUILD_CXX" != x; then
46779     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46780 
46781   # First separate the path from the arguments. This will split at the first
46782   # space.
46783   complete="$BUILD_CXX"
46784   path="${complete%% *}"
46785   tmp="$complete EOL"
46786   arguments="${tmp#* }"
46787 
46788   # Input might be given as Windows format, start by converting to
46789   # unix format.
46790   new_path=`$CYGPATH -u "$path"`
46791 
46792   # Now try to locate executable using which
46793   new_path=`$WHICH "$new_path" 2> /dev/null`
46794   # bat and cmd files are not always considered executable in cygwin causing which
46795   # to not find them
46796   if test "x$new_path" = x \
46797       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46798       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46799     new_path=`$CYGPATH -u "$path"`
46800   fi
46801   if test "x$new_path" = x; then
46802     # Oops. Which didn't find the executable.
46803     # The splitting of arguments from the executable at a space might have been incorrect,
46804     # since paths with space are more likely in Windows. Give it another try with the whole
46805     # argument.
46806     path="$complete"
46807     arguments="EOL"
46808     new_path=`$CYGPATH -u "$path"`
46809     new_path=`$WHICH "$new_path" 2> /dev/null`
46810     # bat and cmd files are not always considered executable in cygwin causing which
46811     # to not find them
46812     if test "x$new_path" = x \
46813         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46814         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46815       new_path=`$CYGPATH -u "$path"`
46816     fi
46817     if test "x$new_path" = x; then
46818       # It's still not found. Now this is an unrecoverable error.
46819       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46820 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46821       has_space=`$ECHO "$complete" | $GREP " "`
46822       if test "x$has_space" != x; then
46823         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46824 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46825       fi
46826       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46827     fi
46828   fi
46829 
46830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46833   # "foo.exe" is OK but "foo" is an error.
46834   #
46835   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46836   # It is also a way to make sure we got the proper file name for the real test later on.
46837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46838   if test "x$test_shortpath" = x; then
46839     # Short path failed, file does not exist as specified.
46840     # Try adding .exe or .cmd
46841     if test -f "${new_path}.exe"; then
46842       input_to_shortpath="${new_path}.exe"
46843     elif test -f "${new_path}.cmd"; then
46844       input_to_shortpath="${new_path}.cmd"
46845     else
46846       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
46847 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
46848       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46849 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46850       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46851     fi
46852   else
46853     input_to_shortpath="$new_path"
46854   fi
46855 
46856   # Call helper function which possibly converts this using DOS-style short mode.
46857   # If so, the updated path is stored in $new_path.
46858   new_path="$input_to_shortpath"
46859 
46860   input_path="$input_to_shortpath"
46861   # Check if we need to convert this using DOS-style short mode. If the path
46862   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46863   # take no chances and rewrite it.
46864   # Note: m4 eats our [], so we need to use [ and ] instead.
46865   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46866   if test "x$has_forbidden_chars" != x; then
46867     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46868     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46869     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46870     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46871       # Going to short mode and back again did indeed matter. Since short mode is
46872       # case insensitive, let's make it lowercase to improve readability.
46873       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46874       # Now convert it back to Unix-style (cygpath)
46875       input_path=`$CYGPATH -u "$shortmode_path"`
46876       new_path="$input_path"
46877     fi
46878   fi
46879 
46880   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46881   if test "x$test_cygdrive_prefix" = x; then
46882     # As a simple fix, exclude /usr/bin since it's not a real path.
46883     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46884       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46885       # a path prefixed by /cygdrive for fixpath to work.
46886       new_path="$CYGWIN_ROOT_PATH$input_path"
46887     fi
46888   fi
46889 
46890   # remove trailing .exe if any
46891   new_path="${new_path/%.exe/}"
46892 
46893     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46894 
46895   # First separate the path from the arguments. This will split at the first
46896   # space.
46897   complete="$BUILD_CXX"
46898   path="${complete%% *}"
46899   tmp="$complete EOL"
46900   arguments="${tmp#* }"
46901 
46902   # Input might be given as Windows format, start by converting to
46903   # unix format.
46904   new_path="$path"
46905 
46906   windows_path="$new_path"
46907   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46908     unix_path=`$CYGPATH -u "$windows_path"`
46909     new_path="$unix_path"
46910   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46911     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46912     new_path="$unix_path"
46913   fi
46914 
46915 
46916   # Now try to locate executable using which
46917   new_path=`$WHICH "$new_path" 2> /dev/null`
46918 
46919   if test "x$new_path" = x; then
46920     # Oops. Which didn't find the executable.
46921     # The splitting of arguments from the executable at a space might have been incorrect,
46922     # since paths with space are more likely in Windows. Give it another try with the whole
46923     # argument.
46924     path="$complete"
46925     arguments="EOL"
46926     new_path="$path"
46927 
46928   windows_path="$new_path"
46929   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46930     unix_path=`$CYGPATH -u "$windows_path"`
46931     new_path="$unix_path"
46932   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46933     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46934     new_path="$unix_path"
46935   fi
46936 
46937 
46938     new_path=`$WHICH "$new_path" 2> /dev/null`
46939     # bat and cmd files are not always considered executable in MSYS causing which
46940     # to not find them
46941     if test "x$new_path" = x \
46942         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46943         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46944       new_path="$path"
46945 
46946   windows_path="$new_path"
46947   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46948     unix_path=`$CYGPATH -u "$windows_path"`
46949     new_path="$unix_path"
46950   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46951     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46952     new_path="$unix_path"
46953   fi
46954 
46955     fi
46956 
46957     if test "x$new_path" = x; then
46958       # It's still not found. Now this is an unrecoverable error.
46959       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
46960 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
46961       has_space=`$ECHO "$complete" | $GREP " "`
46962       if test "x$has_space" != x; then
46963         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46964 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46965       fi
46966       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
46967     fi
46968   fi
46969 
46970   # Now new_path has a complete unix path to the binary
46971   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46972     # Keep paths in /bin as-is, but remove trailing .exe if any
46973     new_path="${new_path/%.exe/}"
46974     # Do not save /bin paths to all_fixpath_prefixes!
46975   else
46976     # Not in mixed or Windows style, start by that.
46977     new_path=`cmd //c echo $new_path`
46978 
46979   input_path="$new_path"
46980   # Check if we need to convert this using DOS-style short mode. If the path
46981   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46982   # take no chances and rewrite it.
46983   # Note: m4 eats our [], so we need to use [ and ] instead.
46984   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46985   if test "x$has_forbidden_chars" != x; then
46986     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46987     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46988   fi
46989 
46990     # Output is in $new_path
46991 
46992   windows_path="$new_path"
46993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46994     unix_path=`$CYGPATH -u "$windows_path"`
46995     new_path="$unix_path"
46996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46998     new_path="$unix_path"
46999   fi
47000 
47001     # remove trailing .exe if any
47002     new_path="${new_path/%.exe/}"
47003 
47004     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47005     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47006   fi
47007 
47008     else
47009       # We're on a unix platform. Hooray! :)
47010       # First separate the path from the arguments. This will split at the first
47011       # space.
47012       complete="$BUILD_CXX"
47013       path="${complete%% *}"
47014       tmp="$complete EOL"
47015       arguments="${tmp#* }"
47016 
47017       # Cannot rely on the command "which" here since it doesn't always work.
47018       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47019       if test -z "$is_absolute_path"; then
47020         # Path to executable is not absolute. Find it.
47021         IFS_save="$IFS"
47022         IFS=:
47023         for p in $PATH; do
47024           if test -f "$p/$path" && test -x "$p/$path"; then
47025             new_path="$p/$path"
47026             break
47027           fi
47028         done
47029         IFS="$IFS_save"
47030       else
47031         # This is an absolute path, we can use it without further modifications.
47032         new_path="$path"
47033       fi
47034 
47035       if test "x$new_path" = x; then
47036         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
47037 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
47038         has_space=`$ECHO "$complete" | $GREP " "`
47039         if test "x$has_space" != x; then
47040           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47041 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47042         fi
47043         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
47044       fi
47045     fi
47046 
47047     # Now join together the path and the arguments once again
47048     if test "x$arguments" != xEOL; then
47049       new_complete="$new_path ${arguments% *}"
47050     else
47051       new_complete="$new_path"
47052     fi
47053 
47054     if test "x$complete" != "x$new_complete"; then
47055       BUILD_CXX="$new_complete"
47056       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
47057 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
47058     fi
47059   fi
47060 
47061 
47062 
47063   # Publish this variable in the help.
47064 
47065 
47066   if [ -z "${BUILD_NM+x}" ]; then
47067     # The variable is not set by user, try to locate tool using the code snippet
47068     for ac_prog in nm gcc-nm
47069 do
47070   # Extract the first word of "$ac_prog", so it can be a program name with args.
47071 set dummy $ac_prog; ac_word=$2
47072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47073 $as_echo_n "checking for $ac_word... " >&6; }
47074 if ${ac_cv_path_BUILD_NM+:} false; then :
47075   $as_echo_n "(cached) " >&6
47076 else
47077   case $BUILD_NM in
47078   [\\/]* | ?:[\\/]*)
47079   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
47080   ;;
47081   *)
47082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47083 for as_dir in $PATH
47084 do
47085   IFS=$as_save_IFS
47086   test -z "$as_dir" && as_dir=.
47087     for ac_exec_ext in '' $ac_executable_extensions; do
47088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47089     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
47090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47091     break 2
47092   fi
47093 done
47094   done
47095 IFS=$as_save_IFS
47096 
47097   ;;
47098 esac
47099 fi
47100 BUILD_NM=$ac_cv_path_BUILD_NM
47101 if test -n "$BUILD_NM"; then
47102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
47103 $as_echo "$BUILD_NM" >&6; }
47104 else
47105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47106 $as_echo "no" >&6; }
47107 fi
47108 
47109 
47110   test -n "$BUILD_NM" && break
47111 done
47112 
47113   else
47114     # The variable is set, but is it from the command line or the environment?
47115 
47116     # Try to remove the string !BUILD_NM! from our list.
47117     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
47118     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47119       # If it failed, the variable was not from the command line. Ignore it,
47120       # but warn the user (except for BASH, which is always set by the calling BASH).
47121       if test "xBUILD_NM" != xBASH; then
47122         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
47123 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
47124       fi
47125       # Try to locate tool using the code snippet
47126       for ac_prog in nm gcc-nm
47127 do
47128   # Extract the first word of "$ac_prog", so it can be a program name with args.
47129 set dummy $ac_prog; ac_word=$2
47130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47131 $as_echo_n "checking for $ac_word... " >&6; }
47132 if ${ac_cv_path_BUILD_NM+:} false; then :
47133   $as_echo_n "(cached) " >&6
47134 else
47135   case $BUILD_NM in
47136   [\\/]* | ?:[\\/]*)
47137   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
47138   ;;
47139   *)
47140   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47141 for as_dir in $PATH
47142 do
47143   IFS=$as_save_IFS
47144   test -z "$as_dir" && as_dir=.
47145     for ac_exec_ext in '' $ac_executable_extensions; do
47146   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47147     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
47148     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47149     break 2
47150   fi
47151 done
47152   done
47153 IFS=$as_save_IFS
47154 
47155   ;;
47156 esac
47157 fi
47158 BUILD_NM=$ac_cv_path_BUILD_NM
47159 if test -n "$BUILD_NM"; then
47160   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
47161 $as_echo "$BUILD_NM" >&6; }
47162 else
47163   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47164 $as_echo "no" >&6; }
47165 fi
47166 
47167 
47168   test -n "$BUILD_NM" && break
47169 done
47170 
47171     else
47172       # If it succeeded, then it was overridden by the user. We will use it
47173       # for the tool.
47174 
47175       # First remove it from the list of overridden variables, so we can test
47176       # for unknown variables in the end.
47177       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47178 
47179       # Check if we try to supply an empty value
47180       if test "x$BUILD_NM" = x; then
47181         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
47182 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
47183         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
47184 $as_echo_n "checking for BUILD_NM... " >&6; }
47185         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47186 $as_echo "disabled" >&6; }
47187       else
47188         # Check if the provided tool contains a complete path.
47189         tool_specified="$BUILD_NM"
47190         tool_basename="${tool_specified##*/}"
47191         if test "x$tool_basename" = "x$tool_specified"; then
47192           # A command without a complete path is provided, search $PATH.
47193           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
47194 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
47195           # Extract the first word of "$tool_basename", so it can be a program name with args.
47196 set dummy $tool_basename; ac_word=$2
47197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47198 $as_echo_n "checking for $ac_word... " >&6; }
47199 if ${ac_cv_path_BUILD_NM+:} false; then :
47200   $as_echo_n "(cached) " >&6
47201 else
47202   case $BUILD_NM in
47203   [\\/]* | ?:[\\/]*)
47204   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
47205   ;;
47206   *)
47207   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47208 for as_dir in $PATH
47209 do
47210   IFS=$as_save_IFS
47211   test -z "$as_dir" && as_dir=.
47212     for ac_exec_ext in '' $ac_executable_extensions; do
47213   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47214     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
47215     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47216     break 2
47217   fi
47218 done
47219   done
47220 IFS=$as_save_IFS
47221 
47222   ;;
47223 esac
47224 fi
47225 BUILD_NM=$ac_cv_path_BUILD_NM
47226 if test -n "$BUILD_NM"; then
47227   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
47228 $as_echo "$BUILD_NM" >&6; }
47229 else
47230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47231 $as_echo "no" >&6; }
47232 fi
47233 
47234 
47235           if test "x$BUILD_NM" = x; then
47236             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47237           fi
47238         else
47239           # Otherwise we believe it is a complete path. Use it as it is.
47240           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
47241 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
47242           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
47243 $as_echo_n "checking for BUILD_NM... " >&6; }
47244           if test ! -x "$tool_specified"; then
47245             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47246 $as_echo "not found" >&6; }
47247             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
47248           fi
47249           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47250 $as_echo "$tool_specified" >&6; }
47251         fi
47252       fi
47253     fi
47254 
47255   fi
47256 
47257 
47258 
47259   # Only process if variable expands to non-empty
47260 
47261   if test "x$BUILD_NM" != x; then
47262     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47263 
47264   # First separate the path from the arguments. This will split at the first
47265   # space.
47266   complete="$BUILD_NM"
47267   path="${complete%% *}"
47268   tmp="$complete EOL"
47269   arguments="${tmp#* }"
47270 
47271   # Input might be given as Windows format, start by converting to
47272   # unix format.
47273   new_path=`$CYGPATH -u "$path"`
47274 
47275   # Now try to locate executable using which
47276   new_path=`$WHICH "$new_path" 2> /dev/null`
47277   # bat and cmd files are not always considered executable in cygwin causing which
47278   # to not find them
47279   if test "x$new_path" = x \
47280       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47281       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47282     new_path=`$CYGPATH -u "$path"`
47283   fi
47284   if test "x$new_path" = x; then
47285     # Oops. Which didn't find the executable.
47286     # The splitting of arguments from the executable at a space might have been incorrect,
47287     # since paths with space are more likely in Windows. Give it another try with the whole
47288     # argument.
47289     path="$complete"
47290     arguments="EOL"
47291     new_path=`$CYGPATH -u "$path"`
47292     new_path=`$WHICH "$new_path" 2> /dev/null`
47293     # bat and cmd files are not always considered executable in cygwin causing which
47294     # to not find them
47295     if test "x$new_path" = x \
47296         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47297         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47298       new_path=`$CYGPATH -u "$path"`
47299     fi
47300     if test "x$new_path" = x; then
47301       # It's still not found. Now this is an unrecoverable error.
47302       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
47303 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
47304       has_space=`$ECHO "$complete" | $GREP " "`
47305       if test "x$has_space" != x; then
47306         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47307 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47308       fi
47309       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47310     fi
47311   fi
47312 
47313   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47314   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47315   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47316   # "foo.exe" is OK but "foo" is an error.
47317   #
47318   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47319   # It is also a way to make sure we got the proper file name for the real test later on.
47320   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47321   if test "x$test_shortpath" = x; then
47322     # Short path failed, file does not exist as specified.
47323     # Try adding .exe or .cmd
47324     if test -f "${new_path}.exe"; then
47325       input_to_shortpath="${new_path}.exe"
47326     elif test -f "${new_path}.cmd"; then
47327       input_to_shortpath="${new_path}.cmd"
47328     else
47329       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
47330 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
47331       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47332 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47333       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47334     fi
47335   else
47336     input_to_shortpath="$new_path"
47337   fi
47338 
47339   # Call helper function which possibly converts this using DOS-style short mode.
47340   # If so, the updated path is stored in $new_path.
47341   new_path="$input_to_shortpath"
47342 
47343   input_path="$input_to_shortpath"
47344   # Check if we need to convert this using DOS-style short mode. If the path
47345   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47346   # take no chances and rewrite it.
47347   # Note: m4 eats our [], so we need to use [ and ] instead.
47348   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47349   if test "x$has_forbidden_chars" != x; then
47350     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47351     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47352     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47353     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47354       # Going to short mode and back again did indeed matter. Since short mode is
47355       # case insensitive, let's make it lowercase to improve readability.
47356       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47357       # Now convert it back to Unix-style (cygpath)
47358       input_path=`$CYGPATH -u "$shortmode_path"`
47359       new_path="$input_path"
47360     fi
47361   fi
47362 
47363   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47364   if test "x$test_cygdrive_prefix" = x; then
47365     # As a simple fix, exclude /usr/bin since it's not a real path.
47366     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47367       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47368       # a path prefixed by /cygdrive for fixpath to work.
47369       new_path="$CYGWIN_ROOT_PATH$input_path"
47370     fi
47371   fi
47372 
47373   # remove trailing .exe if any
47374   new_path="${new_path/%.exe/}"
47375 
47376     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47377 
47378   # First separate the path from the arguments. This will split at the first
47379   # space.
47380   complete="$BUILD_NM"
47381   path="${complete%% *}"
47382   tmp="$complete EOL"
47383   arguments="${tmp#* }"
47384 
47385   # Input might be given as Windows format, start by converting to
47386   # unix format.
47387   new_path="$path"
47388 
47389   windows_path="$new_path"
47390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47391     unix_path=`$CYGPATH -u "$windows_path"`
47392     new_path="$unix_path"
47393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47395     new_path="$unix_path"
47396   fi
47397 
47398 
47399   # Now try to locate executable using which
47400   new_path=`$WHICH "$new_path" 2> /dev/null`
47401 
47402   if test "x$new_path" = x; then
47403     # Oops. Which didn't find the executable.
47404     # The splitting of arguments from the executable at a space might have been incorrect,
47405     # since paths with space are more likely in Windows. Give it another try with the whole
47406     # argument.
47407     path="$complete"
47408     arguments="EOL"
47409     new_path="$path"
47410 
47411   windows_path="$new_path"
47412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47413     unix_path=`$CYGPATH -u "$windows_path"`
47414     new_path="$unix_path"
47415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47416     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47417     new_path="$unix_path"
47418   fi
47419 
47420 
47421     new_path=`$WHICH "$new_path" 2> /dev/null`
47422     # bat and cmd files are not always considered executable in MSYS causing which
47423     # to not find them
47424     if test "x$new_path" = x \
47425         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47426         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47427       new_path="$path"
47428 
47429   windows_path="$new_path"
47430   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47431     unix_path=`$CYGPATH -u "$windows_path"`
47432     new_path="$unix_path"
47433   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47434     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47435     new_path="$unix_path"
47436   fi
47437 
47438     fi
47439 
47440     if test "x$new_path" = x; then
47441       # It's still not found. Now this is an unrecoverable error.
47442       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
47443 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
47444       has_space=`$ECHO "$complete" | $GREP " "`
47445       if test "x$has_space" != x; then
47446         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47447 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47448       fi
47449       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47450     fi
47451   fi
47452 
47453   # Now new_path has a complete unix path to the binary
47454   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47455     # Keep paths in /bin as-is, but remove trailing .exe if any
47456     new_path="${new_path/%.exe/}"
47457     # Do not save /bin paths to all_fixpath_prefixes!
47458   else
47459     # Not in mixed or Windows style, start by that.
47460     new_path=`cmd //c echo $new_path`
47461 
47462   input_path="$new_path"
47463   # Check if we need to convert this using DOS-style short mode. If the path
47464   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47465   # take no chances and rewrite it.
47466   # Note: m4 eats our [], so we need to use [ and ] instead.
47467   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47468   if test "x$has_forbidden_chars" != x; then
47469     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47470     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47471   fi
47472 
47473     # Output is in $new_path
47474 
47475   windows_path="$new_path"
47476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47477     unix_path=`$CYGPATH -u "$windows_path"`
47478     new_path="$unix_path"
47479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47481     new_path="$unix_path"
47482   fi
47483 
47484     # remove trailing .exe if any
47485     new_path="${new_path/%.exe/}"
47486 
47487     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47488     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47489   fi
47490 
47491     else
47492       # We're on a unix platform. Hooray! :)
47493       # First separate the path from the arguments. This will split at the first
47494       # space.
47495       complete="$BUILD_NM"
47496       path="${complete%% *}"
47497       tmp="$complete EOL"
47498       arguments="${tmp#* }"
47499 
47500       # Cannot rely on the command "which" here since it doesn't always work.
47501       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47502       if test -z "$is_absolute_path"; then
47503         # Path to executable is not absolute. Find it.
47504         IFS_save="$IFS"
47505         IFS=:
47506         for p in $PATH; do
47507           if test -f "$p/$path" && test -x "$p/$path"; then
47508             new_path="$p/$path"
47509             break
47510           fi
47511         done
47512         IFS="$IFS_save"
47513       else
47514         # This is an absolute path, we can use it without further modifications.
47515         new_path="$path"
47516       fi
47517 
47518       if test "x$new_path" = x; then
47519         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
47520 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
47521         has_space=`$ECHO "$complete" | $GREP " "`
47522         if test "x$has_space" != x; then
47523           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47524 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47525         fi
47526         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
47527       fi
47528     fi
47529 
47530     # Now join together the path and the arguments once again
47531     if test "x$arguments" != xEOL; then
47532       new_complete="$new_path ${arguments% *}"
47533     else
47534       new_complete="$new_path"
47535     fi
47536 
47537     if test "x$complete" != "x$new_complete"; then
47538       BUILD_NM="$new_complete"
47539       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
47540 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
47541     fi
47542   fi
47543 
47544 
47545 
47546   # Publish this variable in the help.
47547 
47548 
47549   if [ -z "${BUILD_AR+x}" ]; then
47550     # The variable is not set by user, try to locate tool using the code snippet
47551     for ac_prog in ar gcc-ar
47552 do
47553   # Extract the first word of "$ac_prog", so it can be a program name with args.
47554 set dummy $ac_prog; ac_word=$2
47555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47556 $as_echo_n "checking for $ac_word... " >&6; }
47557 if ${ac_cv_path_BUILD_AR+:} false; then :
47558   $as_echo_n "(cached) " >&6
47559 else
47560   case $BUILD_AR in
47561   [\\/]* | ?:[\\/]*)
47562   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
47563   ;;
47564   *)
47565   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47566 for as_dir in $PATH
47567 do
47568   IFS=$as_save_IFS
47569   test -z "$as_dir" && as_dir=.
47570     for ac_exec_ext in '' $ac_executable_extensions; do
47571   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47572     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
47573     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47574     break 2
47575   fi
47576 done
47577   done
47578 IFS=$as_save_IFS
47579 
47580   ;;
47581 esac
47582 fi
47583 BUILD_AR=$ac_cv_path_BUILD_AR
47584 if test -n "$BUILD_AR"; then
47585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
47586 $as_echo "$BUILD_AR" >&6; }
47587 else
47588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47589 $as_echo "no" >&6; }
47590 fi
47591 
47592 
47593   test -n "$BUILD_AR" && break
47594 done
47595 
47596   else
47597     # The variable is set, but is it from the command line or the environment?
47598 
47599     # Try to remove the string !BUILD_AR! from our list.
47600     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
47601     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47602       # If it failed, the variable was not from the command line. Ignore it,
47603       # but warn the user (except for BASH, which is always set by the calling BASH).
47604       if test "xBUILD_AR" != xBASH; then
47605         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
47606 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
47607       fi
47608       # Try to locate tool using the code snippet
47609       for ac_prog in ar gcc-ar
47610 do
47611   # Extract the first word of "$ac_prog", so it can be a program name with args.
47612 set dummy $ac_prog; ac_word=$2
47613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47614 $as_echo_n "checking for $ac_word... " >&6; }
47615 if ${ac_cv_path_BUILD_AR+:} false; then :
47616   $as_echo_n "(cached) " >&6
47617 else
47618   case $BUILD_AR in
47619   [\\/]* | ?:[\\/]*)
47620   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
47621   ;;
47622   *)
47623   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47624 for as_dir in $PATH
47625 do
47626   IFS=$as_save_IFS
47627   test -z "$as_dir" && as_dir=.
47628     for ac_exec_ext in '' $ac_executable_extensions; do
47629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47630     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
47631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47632     break 2
47633   fi
47634 done
47635   done
47636 IFS=$as_save_IFS
47637 
47638   ;;
47639 esac
47640 fi
47641 BUILD_AR=$ac_cv_path_BUILD_AR
47642 if test -n "$BUILD_AR"; then
47643   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
47644 $as_echo "$BUILD_AR" >&6; }
47645 else
47646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47647 $as_echo "no" >&6; }
47648 fi
47649 
47650 
47651   test -n "$BUILD_AR" && break
47652 done
47653 
47654     else
47655       # If it succeeded, then it was overridden by the user. We will use it
47656       # for the tool.
47657 
47658       # First remove it from the list of overridden variables, so we can test
47659       # for unknown variables in the end.
47660       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47661 
47662       # Check if we try to supply an empty value
47663       if test "x$BUILD_AR" = x; then
47664         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
47665 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
47666         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
47667 $as_echo_n "checking for BUILD_AR... " >&6; }
47668         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47669 $as_echo "disabled" >&6; }
47670       else
47671         # Check if the provided tool contains a complete path.
47672         tool_specified="$BUILD_AR"
47673         tool_basename="${tool_specified##*/}"
47674         if test "x$tool_basename" = "x$tool_specified"; then
47675           # A command without a complete path is provided, search $PATH.
47676           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
47677 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
47678           # Extract the first word of "$tool_basename", so it can be a program name with args.
47679 set dummy $tool_basename; ac_word=$2
47680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47681 $as_echo_n "checking for $ac_word... " >&6; }
47682 if ${ac_cv_path_BUILD_AR+:} false; then :
47683   $as_echo_n "(cached) " >&6
47684 else
47685   case $BUILD_AR in
47686   [\\/]* | ?:[\\/]*)
47687   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
47688   ;;
47689   *)
47690   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47691 for as_dir in $PATH
47692 do
47693   IFS=$as_save_IFS
47694   test -z "$as_dir" && as_dir=.
47695     for ac_exec_ext in '' $ac_executable_extensions; do
47696   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47697     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
47698     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47699     break 2
47700   fi
47701 done
47702   done
47703 IFS=$as_save_IFS
47704 
47705   ;;
47706 esac
47707 fi
47708 BUILD_AR=$ac_cv_path_BUILD_AR
47709 if test -n "$BUILD_AR"; then
47710   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
47711 $as_echo "$BUILD_AR" >&6; }
47712 else
47713   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47714 $as_echo "no" >&6; }
47715 fi
47716 
47717 
47718           if test "x$BUILD_AR" = x; then
47719             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47720           fi
47721         else
47722           # Otherwise we believe it is a complete path. Use it as it is.
47723           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
47724 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
47725           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
47726 $as_echo_n "checking for BUILD_AR... " >&6; }
47727           if test ! -x "$tool_specified"; then
47728             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47729 $as_echo "not found" >&6; }
47730             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
47731           fi
47732           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47733 $as_echo "$tool_specified" >&6; }
47734         fi
47735       fi
47736     fi
47737 
47738   fi
47739 
47740 
47741 
47742   # Only process if variable expands to non-empty
47743 
47744   if test "x$BUILD_AR" != x; then
47745     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47746 
47747   # First separate the path from the arguments. This will split at the first
47748   # space.
47749   complete="$BUILD_AR"
47750   path="${complete%% *}"
47751   tmp="$complete EOL"
47752   arguments="${tmp#* }"
47753 
47754   # Input might be given as Windows format, start by converting to
47755   # unix format.
47756   new_path=`$CYGPATH -u "$path"`
47757 
47758   # Now try to locate executable using which
47759   new_path=`$WHICH "$new_path" 2> /dev/null`
47760   # bat and cmd files are not always considered executable in cygwin causing which
47761   # to not find them
47762   if test "x$new_path" = x \
47763       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47764       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47765     new_path=`$CYGPATH -u "$path"`
47766   fi
47767   if test "x$new_path" = x; then
47768     # Oops. Which didn't find the executable.
47769     # The splitting of arguments from the executable at a space might have been incorrect,
47770     # since paths with space are more likely in Windows. Give it another try with the whole
47771     # argument.
47772     path="$complete"
47773     arguments="EOL"
47774     new_path=`$CYGPATH -u "$path"`
47775     new_path=`$WHICH "$new_path" 2> /dev/null`
47776     # bat and cmd files are not always considered executable in cygwin causing which
47777     # to not find them
47778     if test "x$new_path" = x \
47779         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47780         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47781       new_path=`$CYGPATH -u "$path"`
47782     fi
47783     if test "x$new_path" = x; then
47784       # It's still not found. Now this is an unrecoverable error.
47785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47786 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47787       has_space=`$ECHO "$complete" | $GREP " "`
47788       if test "x$has_space" != x; then
47789         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47790 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47791       fi
47792       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47793     fi
47794   fi
47795 
47796   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47797   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47798   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47799   # "foo.exe" is OK but "foo" is an error.
47800   #
47801   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47802   # It is also a way to make sure we got the proper file name for the real test later on.
47803   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47804   if test "x$test_shortpath" = x; then
47805     # Short path failed, file does not exist as specified.
47806     # Try adding .exe or .cmd
47807     if test -f "${new_path}.exe"; then
47808       input_to_shortpath="${new_path}.exe"
47809     elif test -f "${new_path}.cmd"; then
47810       input_to_shortpath="${new_path}.cmd"
47811     else
47812       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
47813 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
47814       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47815 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47816       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47817     fi
47818   else
47819     input_to_shortpath="$new_path"
47820   fi
47821 
47822   # Call helper function which possibly converts this using DOS-style short mode.
47823   # If so, the updated path is stored in $new_path.
47824   new_path="$input_to_shortpath"
47825 
47826   input_path="$input_to_shortpath"
47827   # Check if we need to convert this using DOS-style short mode. If the path
47828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47829   # take no chances and rewrite it.
47830   # Note: m4 eats our [], so we need to use [ and ] instead.
47831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47832   if test "x$has_forbidden_chars" != x; then
47833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47834     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47835     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47836     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47837       # Going to short mode and back again did indeed matter. Since short mode is
47838       # case insensitive, let's make it lowercase to improve readability.
47839       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47840       # Now convert it back to Unix-style (cygpath)
47841       input_path=`$CYGPATH -u "$shortmode_path"`
47842       new_path="$input_path"
47843     fi
47844   fi
47845 
47846   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47847   if test "x$test_cygdrive_prefix" = x; then
47848     # As a simple fix, exclude /usr/bin since it's not a real path.
47849     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47850       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47851       # a path prefixed by /cygdrive for fixpath to work.
47852       new_path="$CYGWIN_ROOT_PATH$input_path"
47853     fi
47854   fi
47855 
47856   # remove trailing .exe if any
47857   new_path="${new_path/%.exe/}"
47858 
47859     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47860 
47861   # First separate the path from the arguments. This will split at the first
47862   # space.
47863   complete="$BUILD_AR"
47864   path="${complete%% *}"
47865   tmp="$complete EOL"
47866   arguments="${tmp#* }"
47867 
47868   # Input might be given as Windows format, start by converting to
47869   # unix format.
47870   new_path="$path"
47871 
47872   windows_path="$new_path"
47873   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47874     unix_path=`$CYGPATH -u "$windows_path"`
47875     new_path="$unix_path"
47876   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47877     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47878     new_path="$unix_path"
47879   fi
47880 
47881 
47882   # Now try to locate executable using which
47883   new_path=`$WHICH "$new_path" 2> /dev/null`
47884 
47885   if test "x$new_path" = x; then
47886     # Oops. Which didn't find the executable.
47887     # The splitting of arguments from the executable at a space might have been incorrect,
47888     # since paths with space are more likely in Windows. Give it another try with the whole
47889     # argument.
47890     path="$complete"
47891     arguments="EOL"
47892     new_path="$path"
47893 
47894   windows_path="$new_path"
47895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47896     unix_path=`$CYGPATH -u "$windows_path"`
47897     new_path="$unix_path"
47898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47900     new_path="$unix_path"
47901   fi
47902 
47903 
47904     new_path=`$WHICH "$new_path" 2> /dev/null`
47905     # bat and cmd files are not always considered executable in MSYS causing which
47906     # to not find them
47907     if test "x$new_path" = x \
47908         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47909         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47910       new_path="$path"
47911 
47912   windows_path="$new_path"
47913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47914     unix_path=`$CYGPATH -u "$windows_path"`
47915     new_path="$unix_path"
47916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47918     new_path="$unix_path"
47919   fi
47920 
47921     fi
47922 
47923     if test "x$new_path" = x; then
47924       # It's still not found. Now this is an unrecoverable error.
47925       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
47926 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
47927       has_space=`$ECHO "$complete" | $GREP " "`
47928       if test "x$has_space" != x; then
47929         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47930 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47931       fi
47932       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
47933     fi
47934   fi
47935 
47936   # Now new_path has a complete unix path to the binary
47937   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47938     # Keep paths in /bin as-is, but remove trailing .exe if any
47939     new_path="${new_path/%.exe/}"
47940     # Do not save /bin paths to all_fixpath_prefixes!
47941   else
47942     # Not in mixed or Windows style, start by that.
47943     new_path=`cmd //c echo $new_path`
47944 
47945   input_path="$new_path"
47946   # Check if we need to convert this using DOS-style short mode. If the path
47947   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47948   # take no chances and rewrite it.
47949   # Note: m4 eats our [], so we need to use [ and ] instead.
47950   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47951   if test "x$has_forbidden_chars" != x; then
47952     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47953     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47954   fi
47955 
47956     # Output is in $new_path
47957 
47958   windows_path="$new_path"
47959   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47960     unix_path=`$CYGPATH -u "$windows_path"`
47961     new_path="$unix_path"
47962   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47963     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47964     new_path="$unix_path"
47965   fi
47966 
47967     # remove trailing .exe if any
47968     new_path="${new_path/%.exe/}"
47969 
47970     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47971     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47972   fi
47973 
47974     else
47975       # We're on a unix platform. Hooray! :)
47976       # First separate the path from the arguments. This will split at the first
47977       # space.
47978       complete="$BUILD_AR"
47979       path="${complete%% *}"
47980       tmp="$complete EOL"
47981       arguments="${tmp#* }"
47982 
47983       # Cannot rely on the command "which" here since it doesn't always work.
47984       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47985       if test -z "$is_absolute_path"; then
47986         # Path to executable is not absolute. Find it.
47987         IFS_save="$IFS"
47988         IFS=:
47989         for p in $PATH; do
47990           if test -f "$p/$path" && test -x "$p/$path"; then
47991             new_path="$p/$path"
47992             break
47993           fi
47994         done
47995         IFS="$IFS_save"
47996       else
47997         # This is an absolute path, we can use it without further modifications.
47998         new_path="$path"
47999       fi
48000 
48001       if test "x$new_path" = x; then
48002         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
48003 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
48004         has_space=`$ECHO "$complete" | $GREP " "`
48005         if test "x$has_space" != x; then
48006           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
48007 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
48008         fi
48009         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
48010       fi
48011     fi
48012 
48013     # Now join together the path and the arguments once again
48014     if test "x$arguments" != xEOL; then
48015       new_complete="$new_path ${arguments% *}"
48016     else
48017       new_complete="$new_path"
48018     fi
48019 
48020     if test "x$complete" != "x$new_complete"; then
48021       BUILD_AR="$new_complete"
48022       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
48023 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
48024     fi
48025   fi
48026 
48027 
48028 
48029   # Publish this variable in the help.
48030 
48031 
48032   if [ -z "${BUILD_OBJCOPY+x}" ]; then
48033     # The variable is not set by user, try to locate tool using the code snippet
48034     for ac_prog in objcopy
48035 do
48036   # Extract the first word of "$ac_prog", so it can be a program name with args.
48037 set dummy $ac_prog; ac_word=$2
48038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48039 $as_echo_n "checking for $ac_word... " >&6; }
48040 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
48041   $as_echo_n "(cached) " >&6
48042 else
48043   case $BUILD_OBJCOPY in
48044   [\\/]* | ?:[\\/]*)
48045   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
48046   ;;
48047   *)
48048   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48049 for as_dir in $PATH
48050 do
48051   IFS=$as_save_IFS
48052   test -z "$as_dir" && as_dir=.
48053     for ac_exec_ext in '' $ac_executable_extensions; do
48054   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48055     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
48056     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48057     break 2
48058   fi
48059 done
48060   done
48061 IFS=$as_save_IFS
48062 
48063   ;;
48064 esac
48065 fi
48066 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
48067 if test -n "$BUILD_OBJCOPY"; then
48068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
48069 $as_echo "$BUILD_OBJCOPY" >&6; }
48070 else
48071   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48072 $as_echo "no" >&6; }
48073 fi
48074 
48075 
48076   test -n "$BUILD_OBJCOPY" && break
48077 done
48078 
48079   else
48080     # The variable is set, but is it from the command line or the environment?
48081 
48082     # Try to remove the string !BUILD_OBJCOPY! from our list.
48083     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
48084     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48085       # If it failed, the variable was not from the command line. Ignore it,
48086       # but warn the user (except for BASH, which is always set by the calling BASH).
48087       if test "xBUILD_OBJCOPY" != xBASH; then
48088         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
48089 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
48090       fi
48091       # Try to locate tool using the code snippet
48092       for ac_prog in objcopy
48093 do
48094   # Extract the first word of "$ac_prog", so it can be a program name with args.
48095 set dummy $ac_prog; ac_word=$2
48096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48097 $as_echo_n "checking for $ac_word... " >&6; }
48098 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
48099   $as_echo_n "(cached) " >&6
48100 else
48101   case $BUILD_OBJCOPY in
48102   [\\/]* | ?:[\\/]*)
48103   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
48104   ;;
48105   *)
48106   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48107 for as_dir in $PATH
48108 do
48109   IFS=$as_save_IFS
48110   test -z "$as_dir" && as_dir=.
48111     for ac_exec_ext in '' $ac_executable_extensions; do
48112   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48113     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
48114     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48115     break 2
48116   fi
48117 done
48118   done
48119 IFS=$as_save_IFS
48120 
48121   ;;
48122 esac
48123 fi
48124 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
48125 if test -n "$BUILD_OBJCOPY"; then
48126   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
48127 $as_echo "$BUILD_OBJCOPY" >&6; }
48128 else
48129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48130 $as_echo "no" >&6; }
48131 fi
48132 
48133 
48134   test -n "$BUILD_OBJCOPY" && break
48135 done
48136 
48137     else
48138       # If it succeeded, then it was overridden by the user. We will use it
48139       # for the tool.
48140 
48141       # First remove it from the list of overridden variables, so we can test
48142       # for unknown variables in the end.
48143       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48144 
48145       # Check if we try to supply an empty value
48146       if test "x$BUILD_OBJCOPY" = x; then
48147         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
48148 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
48149         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
48150 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
48151         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48152 $as_echo "disabled" >&6; }
48153       else
48154         # Check if the provided tool contains a complete path.
48155         tool_specified="$BUILD_OBJCOPY"
48156         tool_basename="${tool_specified##*/}"
48157         if test "x$tool_basename" = "x$tool_specified"; then
48158           # A command without a complete path is provided, search $PATH.
48159           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
48160 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
48161           # Extract the first word of "$tool_basename", so it can be a program name with args.
48162 set dummy $tool_basename; ac_word=$2
48163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48164 $as_echo_n "checking for $ac_word... " >&6; }
48165 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
48166   $as_echo_n "(cached) " >&6
48167 else
48168   case $BUILD_OBJCOPY in
48169   [\\/]* | ?:[\\/]*)
48170   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
48171   ;;
48172   *)
48173   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48174 for as_dir in $PATH
48175 do
48176   IFS=$as_save_IFS
48177   test -z "$as_dir" && as_dir=.
48178     for ac_exec_ext in '' $ac_executable_extensions; do
48179   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48180     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
48181     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48182     break 2
48183   fi
48184 done
48185   done
48186 IFS=$as_save_IFS
48187 
48188   ;;
48189 esac
48190 fi
48191 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
48192 if test -n "$BUILD_OBJCOPY"; then
48193   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
48194 $as_echo "$BUILD_OBJCOPY" >&6; }
48195 else
48196   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48197 $as_echo "no" >&6; }
48198 fi
48199 
48200 
48201           if test "x$BUILD_OBJCOPY" = x; then
48202             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48203           fi
48204         else
48205           # Otherwise we believe it is a complete path. Use it as it is.
48206           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
48207 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
48208           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
48209 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
48210           if test ! -x "$tool_specified"; then
48211             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48212 $as_echo "not found" >&6; }
48213             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
48214           fi
48215           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48216 $as_echo "$tool_specified" >&6; }
48217         fi
48218       fi
48219     fi
48220 
48221   fi
48222 
48223 
48224 
48225   # Only process if variable expands to non-empty
48226 
48227   if test "x$BUILD_OBJCOPY" != x; then
48228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48229 
48230   # First separate the path from the arguments. This will split at the first
48231   # space.
48232   complete="$BUILD_OBJCOPY"
48233   path="${complete%% *}"
48234   tmp="$complete EOL"
48235   arguments="${tmp#* }"
48236 
48237   # Input might be given as Windows format, start by converting to
48238   # unix format.
48239   new_path=`$CYGPATH -u "$path"`
48240 
48241   # Now try to locate executable using which
48242   new_path=`$WHICH "$new_path" 2> /dev/null`
48243   # bat and cmd files are not always considered executable in cygwin causing which
48244   # to not find them
48245   if test "x$new_path" = x \
48246       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48247       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48248     new_path=`$CYGPATH -u "$path"`
48249   fi
48250   if test "x$new_path" = x; then
48251     # Oops. Which didn't find the executable.
48252     # The splitting of arguments from the executable at a space might have been incorrect,
48253     # since paths with space are more likely in Windows. Give it another try with the whole
48254     # argument.
48255     path="$complete"
48256     arguments="EOL"
48257     new_path=`$CYGPATH -u "$path"`
48258     new_path=`$WHICH "$new_path" 2> /dev/null`
48259     # bat and cmd files are not always considered executable in cygwin causing which
48260     # to not find them
48261     if test "x$new_path" = x \
48262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48264       new_path=`$CYGPATH -u "$path"`
48265     fi
48266     if test "x$new_path" = x; then
48267       # It's still not found. Now this is an unrecoverable error.
48268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
48269 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
48270       has_space=`$ECHO "$complete" | $GREP " "`
48271       if test "x$has_space" != x; then
48272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48274       fi
48275       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48276     fi
48277   fi
48278 
48279   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48280   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48281   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48282   # "foo.exe" is OK but "foo" is an error.
48283   #
48284   # This test is therefore slightly more accurate than "test -f" to check for file presence.
48285   # It is also a way to make sure we got the proper file name for the real test later on.
48286   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48287   if test "x$test_shortpath" = x; then
48288     # Short path failed, file does not exist as specified.
48289     # Try adding .exe or .cmd
48290     if test -f "${new_path}.exe"; then
48291       input_to_shortpath="${new_path}.exe"
48292     elif test -f "${new_path}.cmd"; then
48293       input_to_shortpath="${new_path}.cmd"
48294     else
48295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
48296 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
48297       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
48298 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
48299       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48300     fi
48301   else
48302     input_to_shortpath="$new_path"
48303   fi
48304 
48305   # Call helper function which possibly converts this using DOS-style short mode.
48306   # If so, the updated path is stored in $new_path.
48307   new_path="$input_to_shortpath"
48308 
48309   input_path="$input_to_shortpath"
48310   # Check if we need to convert this using DOS-style short mode. If the path
48311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48312   # take no chances and rewrite it.
48313   # Note: m4 eats our [], so we need to use [ and ] instead.
48314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48315   if test "x$has_forbidden_chars" != x; then
48316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48320       # Going to short mode and back again did indeed matter. Since short mode is
48321       # case insensitive, let's make it lowercase to improve readability.
48322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48323       # Now convert it back to Unix-style (cygpath)
48324       input_path=`$CYGPATH -u "$shortmode_path"`
48325       new_path="$input_path"
48326     fi
48327   fi
48328 
48329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48330   if test "x$test_cygdrive_prefix" = x; then
48331     # As a simple fix, exclude /usr/bin since it's not a real path.
48332     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
48333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48334       # a path prefixed by /cygdrive for fixpath to work.
48335       new_path="$CYGWIN_ROOT_PATH$input_path"
48336     fi
48337   fi
48338 
48339   # remove trailing .exe if any
48340   new_path="${new_path/%.exe/}"
48341 
48342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48343 
48344   # First separate the path from the arguments. This will split at the first
48345   # space.
48346   complete="$BUILD_OBJCOPY"
48347   path="${complete%% *}"
48348   tmp="$complete EOL"
48349   arguments="${tmp#* }"
48350 
48351   # Input might be given as Windows format, start by converting to
48352   # unix format.
48353   new_path="$path"
48354 
48355   windows_path="$new_path"
48356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48357     unix_path=`$CYGPATH -u "$windows_path"`
48358     new_path="$unix_path"
48359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48361     new_path="$unix_path"
48362   fi
48363 
48364 
48365   # Now try to locate executable using which
48366   new_path=`$WHICH "$new_path" 2> /dev/null`
48367 
48368   if test "x$new_path" = x; then
48369     # Oops. Which didn't find the executable.
48370     # The splitting of arguments from the executable at a space might have been incorrect,
48371     # since paths with space are more likely in Windows. Give it another try with the whole
48372     # argument.
48373     path="$complete"
48374     arguments="EOL"
48375     new_path="$path"
48376 
48377   windows_path="$new_path"
48378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48379     unix_path=`$CYGPATH -u "$windows_path"`
48380     new_path="$unix_path"
48381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48383     new_path="$unix_path"
48384   fi
48385 
48386 
48387     new_path=`$WHICH "$new_path" 2> /dev/null`
48388     # bat and cmd files are not always considered executable in MSYS causing which
48389     # to not find them
48390     if test "x$new_path" = x \
48391         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48392         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48393       new_path="$path"
48394 
48395   windows_path="$new_path"
48396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48397     unix_path=`$CYGPATH -u "$windows_path"`
48398     new_path="$unix_path"
48399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48401     new_path="$unix_path"
48402   fi
48403 
48404     fi
48405 
48406     if test "x$new_path" = x; then
48407       # It's still not found. Now this is an unrecoverable error.
48408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
48409 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
48410       has_space=`$ECHO "$complete" | $GREP " "`
48411       if test "x$has_space" != x; then
48412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48414       fi
48415       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48416     fi
48417   fi
48418 
48419   # Now new_path has a complete unix path to the binary
48420   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
48421     # Keep paths in /bin as-is, but remove trailing .exe if any
48422     new_path="${new_path/%.exe/}"
48423     # Do not save /bin paths to all_fixpath_prefixes!
48424   else
48425     # Not in mixed or Windows style, start by that.
48426     new_path=`cmd //c echo $new_path`
48427 
48428   input_path="$new_path"
48429   # Check if we need to convert this using DOS-style short mode. If the path
48430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48431   # take no chances and rewrite it.
48432   # Note: m4 eats our [], so we need to use [ and ] instead.
48433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48434   if test "x$has_forbidden_chars" != x; then
48435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48436     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48437   fi
48438 
48439     # Output is in $new_path
48440 
48441   windows_path="$new_path"
48442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48443     unix_path=`$CYGPATH -u "$windows_path"`
48444     new_path="$unix_path"
48445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48447     new_path="$unix_path"
48448   fi
48449 
48450     # remove trailing .exe if any
48451     new_path="${new_path/%.exe/}"
48452 
48453     # Save the first 10 bytes of this path to the storage, so fixpath can work.
48454     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48455   fi
48456 
48457     else
48458       # We're on a unix platform. Hooray! :)
48459       # First separate the path from the arguments. This will split at the first
48460       # space.
48461       complete="$BUILD_OBJCOPY"
48462       path="${complete%% *}"
48463       tmp="$complete EOL"
48464       arguments="${tmp#* }"
48465 
48466       # Cannot rely on the command "which" here since it doesn't always work.
48467       is_absolute_path=`$ECHO "$path" | $GREP ^/`
48468       if test -z "$is_absolute_path"; then
48469         # Path to executable is not absolute. Find it.
48470         IFS_save="$IFS"
48471         IFS=:
48472         for p in $PATH; do
48473           if test -f "$p/$path" && test -x "$p/$path"; then
48474             new_path="$p/$path"
48475             break
48476           fi
48477         done
48478         IFS="$IFS_save"
48479       else
48480         # This is an absolute path, we can use it without further modifications.
48481         new_path="$path"
48482       fi
48483 
48484       if test "x$new_path" = x; then
48485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
48486 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
48487         has_space=`$ECHO "$complete" | $GREP " "`
48488         if test "x$has_space" != x; then
48489           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
48490 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
48491         fi
48492         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
48493       fi
48494     fi
48495 
48496     # Now join together the path and the arguments once again
48497     if test "x$arguments" != xEOL; then
48498       new_complete="$new_path ${arguments% *}"
48499     else
48500       new_complete="$new_path"
48501     fi
48502 
48503     if test "x$complete" != "x$new_complete"; then
48504       BUILD_OBJCOPY="$new_complete"
48505       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
48506 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
48507     fi
48508   fi
48509 
48510 
48511 
48512   # Publish this variable in the help.
48513 
48514 
48515   if [ -z "${BUILD_STRIP+x}" ]; then
48516     # The variable is not set by user, try to locate tool using the code snippet
48517     for ac_prog in strip
48518 do
48519   # Extract the first word of "$ac_prog", so it can be a program name with args.
48520 set dummy $ac_prog; ac_word=$2
48521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48522 $as_echo_n "checking for $ac_word... " >&6; }
48523 if ${ac_cv_path_BUILD_STRIP+:} false; then :
48524   $as_echo_n "(cached) " >&6
48525 else
48526   case $BUILD_STRIP in
48527   [\\/]* | ?:[\\/]*)
48528   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
48529   ;;
48530   *)
48531   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48532 for as_dir in $PATH
48533 do
48534   IFS=$as_save_IFS
48535   test -z "$as_dir" && as_dir=.
48536     for ac_exec_ext in '' $ac_executable_extensions; do
48537   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48538     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
48539     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48540     break 2
48541   fi
48542 done
48543   done
48544 IFS=$as_save_IFS
48545 
48546   ;;
48547 esac
48548 fi
48549 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
48550 if test -n "$BUILD_STRIP"; then
48551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
48552 $as_echo "$BUILD_STRIP" >&6; }
48553 else
48554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48555 $as_echo "no" >&6; }
48556 fi
48557 
48558 
48559   test -n "$BUILD_STRIP" && break
48560 done
48561 
48562   else
48563     # The variable is set, but is it from the command line or the environment?
48564 
48565     # Try to remove the string !BUILD_STRIP! from our list.
48566     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
48567     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48568       # If it failed, the variable was not from the command line. Ignore it,
48569       # but warn the user (except for BASH, which is always set by the calling BASH).
48570       if test "xBUILD_STRIP" != xBASH; then
48571         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
48572 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
48573       fi
48574       # Try to locate tool using the code snippet
48575       for ac_prog in strip
48576 do
48577   # Extract the first word of "$ac_prog", so it can be a program name with args.
48578 set dummy $ac_prog; ac_word=$2
48579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48580 $as_echo_n "checking for $ac_word... " >&6; }
48581 if ${ac_cv_path_BUILD_STRIP+:} false; then :
48582   $as_echo_n "(cached) " >&6
48583 else
48584   case $BUILD_STRIP in
48585   [\\/]* | ?:[\\/]*)
48586   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
48587   ;;
48588   *)
48589   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48590 for as_dir in $PATH
48591 do
48592   IFS=$as_save_IFS
48593   test -z "$as_dir" && as_dir=.
48594     for ac_exec_ext in '' $ac_executable_extensions; do
48595   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48596     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
48597     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48598     break 2
48599   fi
48600 done
48601   done
48602 IFS=$as_save_IFS
48603 
48604   ;;
48605 esac
48606 fi
48607 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
48608 if test -n "$BUILD_STRIP"; then
48609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
48610 $as_echo "$BUILD_STRIP" >&6; }
48611 else
48612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48613 $as_echo "no" >&6; }
48614 fi
48615 
48616 
48617   test -n "$BUILD_STRIP" && break
48618 done
48619 
48620     else
48621       # If it succeeded, then it was overridden by the user. We will use it
48622       # for the tool.
48623 
48624       # First remove it from the list of overridden variables, so we can test
48625       # for unknown variables in the end.
48626       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48627 
48628       # Check if we try to supply an empty value
48629       if test "x$BUILD_STRIP" = x; then
48630         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
48631 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
48632         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
48633 $as_echo_n "checking for BUILD_STRIP... " >&6; }
48634         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48635 $as_echo "disabled" >&6; }
48636       else
48637         # Check if the provided tool contains a complete path.
48638         tool_specified="$BUILD_STRIP"
48639         tool_basename="${tool_specified##*/}"
48640         if test "x$tool_basename" = "x$tool_specified"; then
48641           # A command without a complete path is provided, search $PATH.
48642           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
48643 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
48644           # Extract the first word of "$tool_basename", so it can be a program name with args.
48645 set dummy $tool_basename; ac_word=$2
48646 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48647 $as_echo_n "checking for $ac_word... " >&6; }
48648 if ${ac_cv_path_BUILD_STRIP+:} false; then :
48649   $as_echo_n "(cached) " >&6
48650 else
48651   case $BUILD_STRIP in
48652   [\\/]* | ?:[\\/]*)
48653   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
48654   ;;
48655   *)
48656   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48657 for as_dir in $PATH
48658 do
48659   IFS=$as_save_IFS
48660   test -z "$as_dir" && as_dir=.
48661     for ac_exec_ext in '' $ac_executable_extensions; do
48662   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48663     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
48664     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48665     break 2
48666   fi
48667 done
48668   done
48669 IFS=$as_save_IFS
48670 
48671   ;;
48672 esac
48673 fi
48674 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
48675 if test -n "$BUILD_STRIP"; then
48676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
48677 $as_echo "$BUILD_STRIP" >&6; }
48678 else
48679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48680 $as_echo "no" >&6; }
48681 fi
48682 
48683 
48684           if test "x$BUILD_STRIP" = x; then
48685             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48686           fi
48687         else
48688           # Otherwise we believe it is a complete path. Use it as it is.
48689           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
48690 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
48691           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
48692 $as_echo_n "checking for BUILD_STRIP... " >&6; }
48693           if test ! -x "$tool_specified"; then
48694             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48695 $as_echo "not found" >&6; }
48696             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
48697           fi
48698           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48699 $as_echo "$tool_specified" >&6; }
48700         fi
48701       fi
48702     fi
48703 
48704   fi
48705 
48706 
48707 
48708   # Only process if variable expands to non-empty
48709 
48710   if test "x$BUILD_STRIP" != x; then
48711     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48712 
48713   # First separate the path from the arguments. This will split at the first
48714   # space.
48715   complete="$BUILD_STRIP"
48716   path="${complete%% *}"
48717   tmp="$complete EOL"
48718   arguments="${tmp#* }"
48719 
48720   # Input might be given as Windows format, start by converting to
48721   # unix format.
48722   new_path=`$CYGPATH -u "$path"`
48723 
48724   # Now try to locate executable using which
48725   new_path=`$WHICH "$new_path" 2> /dev/null`
48726   # bat and cmd files are not always considered executable in cygwin causing which
48727   # to not find them
48728   if test "x$new_path" = x \
48729       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48730       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48731     new_path=`$CYGPATH -u "$path"`
48732   fi
48733   if test "x$new_path" = x; then
48734     # Oops. Which didn't find the executable.
48735     # The splitting of arguments from the executable at a space might have been incorrect,
48736     # since paths with space are more likely in Windows. Give it another try with the whole
48737     # argument.
48738     path="$complete"
48739     arguments="EOL"
48740     new_path=`$CYGPATH -u "$path"`
48741     new_path=`$WHICH "$new_path" 2> /dev/null`
48742     # bat and cmd files are not always considered executable in cygwin causing which
48743     # to not find them
48744     if test "x$new_path" = x \
48745         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48746         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48747       new_path=`$CYGPATH -u "$path"`
48748     fi
48749     if test "x$new_path" = x; then
48750       # It's still not found. Now this is an unrecoverable error.
48751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
48752 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
48753       has_space=`$ECHO "$complete" | $GREP " "`
48754       if test "x$has_space" != x; then
48755         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48756 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48757       fi
48758       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48759     fi
48760   fi
48761 
48762   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48763   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48764   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48765   # "foo.exe" is OK but "foo" is an error.
48766   #
48767   # This test is therefore slightly more accurate than "test -f" to check for file presence.
48768   # It is also a way to make sure we got the proper file name for the real test later on.
48769   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48770   if test "x$test_shortpath" = x; then
48771     # Short path failed, file does not exist as specified.
48772     # Try adding .exe or .cmd
48773     if test -f "${new_path}.exe"; then
48774       input_to_shortpath="${new_path}.exe"
48775     elif test -f "${new_path}.cmd"; then
48776       input_to_shortpath="${new_path}.cmd"
48777     else
48778       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
48779 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
48780       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
48781 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
48782       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48783     fi
48784   else
48785     input_to_shortpath="$new_path"
48786   fi
48787 
48788   # Call helper function which possibly converts this using DOS-style short mode.
48789   # If so, the updated path is stored in $new_path.
48790   new_path="$input_to_shortpath"
48791 
48792   input_path="$input_to_shortpath"
48793   # Check if we need to convert this using DOS-style short mode. If the path
48794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48795   # take no chances and rewrite it.
48796   # Note: m4 eats our [], so we need to use [ and ] instead.
48797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48798   if test "x$has_forbidden_chars" != x; then
48799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48800     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48801     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48802     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48803       # Going to short mode and back again did indeed matter. Since short mode is
48804       # case insensitive, let's make it lowercase to improve readability.
48805       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48806       # Now convert it back to Unix-style (cygpath)
48807       input_path=`$CYGPATH -u "$shortmode_path"`
48808       new_path="$input_path"
48809     fi
48810   fi
48811 
48812   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48813   if test "x$test_cygdrive_prefix" = x; then
48814     # As a simple fix, exclude /usr/bin since it's not a real path.
48815     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
48816       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48817       # a path prefixed by /cygdrive for fixpath to work.
48818       new_path="$CYGWIN_ROOT_PATH$input_path"
48819     fi
48820   fi
48821 
48822   # remove trailing .exe if any
48823   new_path="${new_path/%.exe/}"
48824 
48825     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48826 
48827   # First separate the path from the arguments. This will split at the first
48828   # space.
48829   complete="$BUILD_STRIP"
48830   path="${complete%% *}"
48831   tmp="$complete EOL"
48832   arguments="${tmp#* }"
48833 
48834   # Input might be given as Windows format, start by converting to
48835   # unix format.
48836   new_path="$path"
48837 
48838   windows_path="$new_path"
48839   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48840     unix_path=`$CYGPATH -u "$windows_path"`
48841     new_path="$unix_path"
48842   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48843     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48844     new_path="$unix_path"
48845   fi
48846 
48847 
48848   # Now try to locate executable using which
48849   new_path=`$WHICH "$new_path" 2> /dev/null`
48850 
48851   if test "x$new_path" = x; then
48852     # Oops. Which didn't find the executable.
48853     # The splitting of arguments from the executable at a space might have been incorrect,
48854     # since paths with space are more likely in Windows. Give it another try with the whole
48855     # argument.
48856     path="$complete"
48857     arguments="EOL"
48858     new_path="$path"
48859 
48860   windows_path="$new_path"
48861   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48862     unix_path=`$CYGPATH -u "$windows_path"`
48863     new_path="$unix_path"
48864   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48865     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48866     new_path="$unix_path"
48867   fi
48868 
48869 
48870     new_path=`$WHICH "$new_path" 2> /dev/null`
48871     # bat and cmd files are not always considered executable in MSYS causing which
48872     # to not find them
48873     if test "x$new_path" = x \
48874         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
48875         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
48876       new_path="$path"
48877 
48878   windows_path="$new_path"
48879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48880     unix_path=`$CYGPATH -u "$windows_path"`
48881     new_path="$unix_path"
48882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48884     new_path="$unix_path"
48885   fi
48886 
48887     fi
48888 
48889     if test "x$new_path" = x; then
48890       # It's still not found. Now this is an unrecoverable error.
48891       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
48892 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
48893       has_space=`$ECHO "$complete" | $GREP " "`
48894       if test "x$has_space" != x; then
48895         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
48896 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
48897       fi
48898       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48899     fi
48900   fi
48901 
48902   # Now new_path has a complete unix path to the binary
48903   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
48904     # Keep paths in /bin as-is, but remove trailing .exe if any
48905     new_path="${new_path/%.exe/}"
48906     # Do not save /bin paths to all_fixpath_prefixes!
48907   else
48908     # Not in mixed or Windows style, start by that.
48909     new_path=`cmd //c echo $new_path`
48910 
48911   input_path="$new_path"
48912   # Check if we need to convert this using DOS-style short mode. If the path
48913   # contains just simple characters, use it. Otherwise (spaces, weird characters),
48914   # take no chances and rewrite it.
48915   # Note: m4 eats our [], so we need to use [ and ] instead.
48916   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48917   if test "x$has_forbidden_chars" != x; then
48918     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48919     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48920   fi
48921 
48922     # Output is in $new_path
48923 
48924   windows_path="$new_path"
48925   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48926     unix_path=`$CYGPATH -u "$windows_path"`
48927     new_path="$unix_path"
48928   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48929     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48930     new_path="$unix_path"
48931   fi
48932 
48933     # remove trailing .exe if any
48934     new_path="${new_path/%.exe/}"
48935 
48936     # Save the first 10 bytes of this path to the storage, so fixpath can work.
48937     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48938   fi
48939 
48940     else
48941       # We're on a unix platform. Hooray! :)
48942       # First separate the path from the arguments. This will split at the first
48943       # space.
48944       complete="$BUILD_STRIP"
48945       path="${complete%% *}"
48946       tmp="$complete EOL"
48947       arguments="${tmp#* }"
48948 
48949       # Cannot rely on the command "which" here since it doesn't always work.
48950       is_absolute_path=`$ECHO "$path" | $GREP ^/`
48951       if test -z "$is_absolute_path"; then
48952         # Path to executable is not absolute. Find it.
48953         IFS_save="$IFS"
48954         IFS=:
48955         for p in $PATH; do
48956           if test -f "$p/$path" && test -x "$p/$path"; then
48957             new_path="$p/$path"
48958             break
48959           fi
48960         done
48961         IFS="$IFS_save"
48962       else
48963         # This is an absolute path, we can use it without further modifications.
48964         new_path="$path"
48965       fi
48966 
48967       if test "x$new_path" = x; then
48968         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
48969 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
48970         has_space=`$ECHO "$complete" | $GREP " "`
48971         if test "x$has_space" != x; then
48972           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
48973 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
48974         fi
48975         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
48976       fi
48977     fi
48978 
48979     # Now join together the path and the arguments once again
48980     if test "x$arguments" != xEOL; then
48981       new_complete="$new_path ${arguments% *}"
48982     else
48983       new_complete="$new_path"
48984     fi
48985 
48986     if test "x$complete" != "x$new_complete"; then
48987       BUILD_STRIP="$new_complete"
48988       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
48989 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
48990     fi
48991   fi
48992 
48993     # Assume the C compiler is the assembler
48994     BUILD_AS="$BUILD_CC -c"
48995     # Just like for the target compiler, use the compiler as linker
48996     BUILD_LD="$BUILD_CC"
48997     BUILD_LDCXX="$BUILD_CXX"
48998 
48999     PATH="$OLDPATH"
49000 
49001 
49002   COMPILER=$BUILD_CC
49003   COMPILER_NAME=BuildC
49004 
49005   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49006     # cc -V output typically looks like
49007     #     cc: Sun C 5.12 Linux_i386 2011/11/16
49008     # or
49009     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
49010     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
49011     # Check that this is likely to be the Solaris Studio cc.
49012     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
49013     if test $? -ne 0; then
49014       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49015       { $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
49016 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49017       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49018 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49019       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
49020 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
49021       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49022     fi
49023     # Remove usage instructions (if present), and
49024     # collapse compiler output into a single line
49025     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
49026         $SED -e 's/ *[Uu]sage:.*//'`
49027     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49028         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
49029   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
49030     # xlc -qversion output typically looks like
49031     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
49032     #     Version: 11.01.0000.0015
49033     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
49034     # Check that this is likely to be the IBM XL C compiler.
49035     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
49036     if test $? -ne 0; then
49037       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49038       { $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
49039 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49040       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49041 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49042       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
49043 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
49044       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49045     fi
49046     # Collapse compiler output into a single line
49047     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49048     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49049         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
49050   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49051     # There is no specific version flag, but all output starts with a version string.
49052     # First line typically looks something like:
49053     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
49054     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
49055     # Check that this is likely to be Microsoft CL.EXE.
49056     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
49057     if test $? -ne 0; then
49058       { $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
49059 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49060       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49061 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49062       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49063     fi
49064     # Collapse compiler output into a single line
49065     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49066     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49067         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
49068   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
49069     # gcc --version output typically looks like
49070     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
49071     #     Copyright (C) 2013 Free Software Foundation, Inc.
49072     #     This is free software; see the source for copying conditions.  There is NO
49073     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
49074     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49075     # Check that this is likely to be GCC.
49076     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
49077     if test $? -ne 0; then
49078       { $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
49079 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49080       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
49081 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
49082       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49083     fi
49084     # Remove Copyright and legalese from version string, and
49085     # collapse into a single line
49086     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
49087         $SED -e 's/ *Copyright .*//'`
49088     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49089         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
49090   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
49091     # clang --version output typically looks like
49092     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
49093     #    clang version 3.3 (tags/RELEASE_33/final)
49094     # or
49095     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
49096     #    Target: x86_64-pc-linux-gnu
49097     #    Thread model: posix
49098     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49099     # Check that this is likely to be clang
49100     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
49101     if test $? -ne 0; then
49102       { $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
49103 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49104       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49105 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49106       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49107     fi
49108     # Collapse compiler output into a single line
49109     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49110     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49111         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
49112   else
49113       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
49114   fi
49115   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
49116   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
49117   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
49118   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
49119 
49120   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
49121 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
49122 
49123 
49124   COMPILER=$BUILD_CXX
49125   COMPILER_NAME=BuildC++
49126 
49127   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49128     # cc -V output typically looks like
49129     #     cc: Sun C 5.12 Linux_i386 2011/11/16
49130     # or
49131     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
49132     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
49133     # Check that this is likely to be the Solaris Studio cc.
49134     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
49135     if test $? -ne 0; then
49136       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49137       { $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
49138 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49139       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49140 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49141       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
49142 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
49143       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49144     fi
49145     # Remove usage instructions (if present), and
49146     # collapse compiler output into a single line
49147     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
49148         $SED -e 's/ *[Uu]sage:.*//'`
49149     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49150         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
49151   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
49152     # xlc -qversion output typically looks like
49153     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
49154     #     Version: 11.01.0000.0015
49155     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
49156     # Check that this is likely to be the IBM XL C compiler.
49157     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
49158     if test $? -ne 0; then
49159       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49160       { $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
49161 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49162       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49163 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49164       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
49165 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
49166       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49167     fi
49168     # Collapse compiler output into a single line
49169     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49170     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49171         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
49172   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49173     # There is no specific version flag, but all output starts with a version string.
49174     # First line typically looks something like:
49175     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
49176     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
49177     # Check that this is likely to be Microsoft CL.EXE.
49178     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
49179     if test $? -ne 0; then
49180       { $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
49181 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49182       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49183 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49184       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49185     fi
49186     # Collapse compiler output into a single line
49187     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49188     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49189         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
49190   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
49191     # gcc --version output typically looks like
49192     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
49193     #     Copyright (C) 2013 Free Software Foundation, Inc.
49194     #     This is free software; see the source for copying conditions.  There is NO
49195     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
49196     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49197     # Check that this is likely to be GCC.
49198     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
49199     if test $? -ne 0; then
49200       { $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
49201 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49202       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
49203 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
49204       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49205     fi
49206     # Remove Copyright and legalese from version string, and
49207     # collapse into a single line
49208     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
49209         $SED -e 's/ *Copyright .*//'`
49210     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49211         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
49212   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
49213     # clang --version output typically looks like
49214     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
49215     #    clang version 3.3 (tags/RELEASE_33/final)
49216     # or
49217     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
49218     #    Target: x86_64-pc-linux-gnu
49219     #    Thread model: posix
49220     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
49221     # Check that this is likely to be clang
49222     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
49223     if test $? -ne 0; then
49224       { $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
49225 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
49226       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
49227 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
49228       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
49229     fi
49230     # Collapse compiler output into a single line
49231     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
49232     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
49233         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
49234   else
49235       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
49236   fi
49237   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
49238   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
49239   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
49240   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
49241 
49242   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
49243 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
49244 
49245 
49246   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
49247     { $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
49248 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
49249     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
49250 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
49251   fi
49252 
49253   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
49254   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
49255     { $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
49256 $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;}
49257   fi
49258 
49259   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
49260     { $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
49261 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
49262   fi
49263 
49264   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
49265 
49266   else
49267     # If we are not cross compiling, use the normal target compilers for
49268     # building the build platform executables.
49269     BUILD_CC="$CC"
49270     BUILD_CXX="$CXX"
49271     BUILD_LD="$LD"
49272     BUILD_LDCXX="$LDCXX"
49273     BUILD_NM="$NM"
49274     BUILD_AS="$AS"
49275     BUILD_OBJCOPY="$OBJCOPY"
49276     BUILD_STRIP="$STRIP"
49277     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
49278     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
49279     BUILD_AR="$AR"
49280 
49281 
49282   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
49283     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
49284 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
49285     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
49286 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
49287   fi
49288 
49289   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
49290   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
49291     { $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
49292 $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;}
49293   fi
49294 
49295   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
49296     { $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
49297 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
49298   fi
49299 
49300   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
49301 
49302   fi
49303 
49304 
49305 
49306 
49307 
49308 
49309 
49310 
49311 
49312 
49313 
49314 
49315 
49316 
49317   # The package path is used only on macosx?
49318   # FIXME: clean this up, and/or move it elsewhere.
49319   PACKAGE_PATH=/opt/local
49320 
49321 
49322   # Check for extra potential brokenness.
49323   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49324     # On Windows, double-check that we got the right compiler.
49325     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
49326     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
49327     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
49328       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
49329         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
49330       fi
49331     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
49332       if test "x$COMPILER_CPU_TEST" != "xx64"; then
49333         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
49334       fi
49335     fi
49336   fi
49337 
49338   if test "x$TOOLCHAIN_TYPE" = xgcc; then
49339     # If this is a --hash-style=gnu system, use --hash-style=both, why?
49340     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
49341     # This is later checked when setting flags.
49342 
49343     # "-Og" suppported for GCC 4.8 and later
49344     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
49345 
49346 
49347 
49348 
49349 
49350 
49351 
49352 
49353 
49354 
49355 
49356 
49357 
49358 
49359 
49360 
49361 
49362 
49363 
49364 
49365 
49366 
49367 
49368 
49369 
49370 
49371 
49372 
49373 
49374 
49375 
49376 
49377 
49378 
49379 
49380 
49381 
49382 
49383 
49384 
49385 
49386 
49387 
49388 
49389 
49390 
49391 
49392     # Execute function body
49393 
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 the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
49444 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
49445   supports=yes
49446 
49447   saved_cflags="$CFLAGS"
49448   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_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 int i;
49458 _ACEOF
49459 if ac_fn_c_try_compile "$LINENO"; then :
49460 
49461 else
49462   supports=no
49463 fi
49464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49465   ac_ext=cpp
49466 ac_cpp='$CXXCPP $CPPFLAGS'
49467 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49468 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49469 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49470 
49471   CFLAGS="$saved_cflags"
49472 
49473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49474 $as_echo "$supports" >&6; }
49475   if test "x$supports" = "xyes" ; then
49476     :
49477     C_COMP_SUPPORTS="yes"
49478   else
49479     :
49480     C_COMP_SUPPORTS="no"
49481   fi
49482 
49483 
49484 
49485 
49486 
49487 
49488 
49489 
49490 
49491 
49492 
49493 
49494 
49495 
49496 
49497 
49498 
49499 
49500 
49501 
49502 
49503 
49504 
49505 
49506 
49507 
49508 
49509 
49510 
49511 
49512 
49513 
49514 
49515 
49516 
49517 
49518 
49519 
49520 
49521 
49522 
49523 
49524 
49525 
49526 
49527 
49528 
49529 
49530 
49531 
49532 
49533 
49534 
49535 
49536 
49537 
49538 
49539 
49540 
49541     # Execute function body
49542 
49543   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
49544 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
49545   supports=yes
49546 
49547   saved_cxxflags="$CXXFLAGS"
49548   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
49549   ac_ext=cpp
49550 ac_cpp='$CXXCPP $CPPFLAGS'
49551 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49552 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49553 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49554 
49555   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49556 /* end confdefs.h.  */
49557 int i;
49558 _ACEOF
49559 if ac_fn_cxx_try_compile "$LINENO"; then :
49560 
49561 else
49562   supports=no
49563 fi
49564 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49565   ac_ext=cpp
49566 ac_cpp='$CXXCPP $CPPFLAGS'
49567 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49568 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49569 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49570 
49571   CXXFLAGS="$saved_cxxflags"
49572 
49573   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49574 $as_echo "$supports" >&6; }
49575   if test "x$supports" = "xyes" ; then
49576     :
49577     CXX_COMP_SUPPORTS="yes"
49578   else
49579     :
49580     CXX_COMP_SUPPORTS="no"
49581   fi
49582 
49583 
49584 
49585 
49586 
49587 
49588 
49589 
49590 
49591 
49592 
49593 
49594 
49595   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
49596 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
49597   supports=no
49598   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49599 
49600   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49601 $as_echo "$supports" >&6; }
49602   if test "x$supports" = "xyes" ; then
49603     :
49604     HAS_CFLAG_OPTIMIZE_DEBUG=true
49605   else
49606     :
49607     HAS_CFLAG_OPTIMIZE_DEBUG=false
49608   fi
49609 
49610 
49611 
49612 
49613 
49614 
49615 
49616     # "-z relro" supported in GNU binutils 2.17 and later
49617     LINKER_RELRO_FLAG="-Wl,-z,relro"
49618 
49619 
49620 
49621 
49622 
49623 
49624 
49625 
49626 
49627 
49628 
49629 
49630 
49631 
49632 
49633 
49634 
49635 
49636 
49637 
49638 
49639 
49640 
49641 
49642 
49643 
49644 
49645 
49646 
49647 
49648 
49649 
49650 
49651 
49652 
49653 
49654 
49655 
49656 
49657 
49658 
49659 
49660 
49661 
49662 
49663 
49664 
49665     # Execute function body
49666 
49667   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
49668 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
49669   supports=yes
49670 
49671   saved_ldflags="$LDFLAGS"
49672   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
49673   ac_ext=c
49674 ac_cpp='$CPP $CPPFLAGS'
49675 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49676 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49677 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49678 
49679   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49680 /* end confdefs.h.  */
49681 
49682 int
49683 main ()
49684 {
49685 
49686   ;
49687   return 0;
49688 }
49689 _ACEOF
49690 if ac_fn_c_try_link "$LINENO"; then :
49691 
49692 else
49693   supports=no
49694 fi
49695 rm -f core conftest.err conftest.$ac_objext \
49696     conftest$ac_exeext conftest.$ac_ext
49697   ac_ext=cpp
49698 ac_cpp='$CXXCPP $CPPFLAGS'
49699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49700 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49702 
49703   LDFLAGS="$saved_ldflags"
49704 
49705   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49706 $as_echo "$supports" >&6; }
49707   if test "x$supports" = "xyes" ; then
49708     :
49709     HAS_LINKER_RELRO=true
49710   else
49711     :
49712     HAS_LINKER_RELRO=false
49713   fi
49714 
49715 
49716 
49717 
49718 
49719 
49720 
49721 
49722 
49723 
49724 
49725 
49726 
49727     # "-z now" supported in GNU binutils 2.11 and later
49728     LINKER_NOW_FLAG="-Wl,-z,now"
49729 
49730 
49731 
49732 
49733 
49734 
49735 
49736 
49737 
49738 
49739 
49740 
49741 
49742 
49743 
49744 
49745 
49746 
49747 
49748 
49749 
49750 
49751 
49752 
49753 
49754 
49755 
49756 
49757 
49758 
49759 
49760 
49761 
49762 
49763 
49764 
49765 
49766 
49767 
49768 
49769 
49770 
49771 
49772 
49773 
49774 
49775 
49776     # Execute function body
49777 
49778   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
49779 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
49780   supports=yes
49781 
49782   saved_ldflags="$LDFLAGS"
49783   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
49784   ac_ext=c
49785 ac_cpp='$CPP $CPPFLAGS'
49786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
49789 
49790   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49791 /* end confdefs.h.  */
49792 
49793 int
49794 main ()
49795 {
49796 
49797   ;
49798   return 0;
49799 }
49800 _ACEOF
49801 if ac_fn_c_try_link "$LINENO"; then :
49802 
49803 else
49804   supports=no
49805 fi
49806 rm -f core conftest.err conftest.$ac_objext \
49807     conftest$ac_exeext conftest.$ac_ext
49808   ac_ext=cpp
49809 ac_cpp='$CXXCPP $CPPFLAGS'
49810 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49811 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49812 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49813 
49814   LDFLAGS="$saved_ldflags"
49815 
49816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49817 $as_echo "$supports" >&6; }
49818   if test "x$supports" = "xyes" ; then
49819     :
49820     HAS_LINKER_NOW=true
49821   else
49822     :
49823     HAS_LINKER_NOW=false
49824   fi
49825 
49826 
49827 
49828 
49829 
49830 
49831 
49832 
49833 
49834 
49835 
49836 
49837   fi
49838 
49839   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
49840   # in executable.'
49841   USING_BROKEN_SUSE_LD=no
49842   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
49843     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
49844 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
49845     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
49846     $ECHO "int main() { }" > main.c
49847     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
49848       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49849 $as_echo "no" >&6; }
49850       USING_BROKEN_SUSE_LD=no
49851     else
49852       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49853 $as_echo "yes" >&6; }
49854       USING_BROKEN_SUSE_LD=yes
49855     fi
49856     $RM version-script.map main.c a.out
49857   fi
49858 
49859 
49860   # Setup hotspot lecagy names for toolchains
49861   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
49862   if test "x$TOOLCHAIN_TYPE" = xclang; then
49863     HOTSPOT_TOOLCHAIN_TYPE=gcc
49864   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49865     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
49866   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49867     HOTSPOT_TOOLCHAIN_TYPE=visCPP
49868   fi
49869 
49870 
49871 
49872 # Setup the JTReg Regression Test Harness.
49873 
49874 
49875 # Check whether --with-jtreg was given.
49876 if test "${with_jtreg+set}" = set; then :
49877   withval=$with_jtreg;
49878 fi
49879 
49880 
49881   if test "x$with_jtreg" = xno; then
49882     # jtreg disabled
49883     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49884 $as_echo_n "checking for jtreg test harness... " >&6; }
49885     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
49886 $as_echo "no, disabled" >&6; }
49887   elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
49888     # An explicit path is specified, use it.
49889     JT_HOME="$with_jtreg"
49890 
49891   # Only process if variable expands to non-empty
49892 
49893   if test "x$JT_HOME" != x; then
49894     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49895 
49896   # Input might be given as Windows format, start by converting to
49897   # unix format.
49898   path="$JT_HOME"
49899   new_path=`$CYGPATH -u "$path"`
49900 
49901   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49902   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49903   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49904   # "foo.exe" is OK but "foo" is an error.
49905   #
49906   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49907   # It is also a way to make sure we got the proper file name for the real test later on.
49908   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49909   if test "x$test_shortpath" = x; then
49910     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49911 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49912     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49913   fi
49914 
49915   # Call helper function which possibly converts this using DOS-style short mode.
49916   # If so, the updated path is stored in $new_path.
49917 
49918   input_path="$new_path"
49919   # Check if we need to convert this using DOS-style short mode. If the path
49920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49921   # take no chances and rewrite it.
49922   # Note: m4 eats our [], so we need to use [ and ] instead.
49923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49924   if test "x$has_forbidden_chars" != x; then
49925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49926     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49927     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49928     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49929       # Going to short mode and back again did indeed matter. Since short mode is
49930       # case insensitive, let's make it lowercase to improve readability.
49931       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49932       # Now convert it back to Unix-style (cygpath)
49933       input_path=`$CYGPATH -u "$shortmode_path"`
49934       new_path="$input_path"
49935     fi
49936   fi
49937 
49938   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49939   if test "x$test_cygdrive_prefix" = x; then
49940     # As a simple fix, exclude /usr/bin since it's not a real path.
49941     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49942       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49943       # a path prefixed by /cygdrive for fixpath to work.
49944       new_path="$CYGWIN_ROOT_PATH$input_path"
49945     fi
49946   fi
49947 
49948 
49949   if test "x$path" != "x$new_path"; then
49950     JT_HOME="$new_path"
49951     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49952 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49953   fi
49954 
49955     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49956 
49957   path="$JT_HOME"
49958   has_colon=`$ECHO $path | $GREP ^.:`
49959   new_path="$path"
49960   if test "x$has_colon" = x; then
49961     # Not in mixed or Windows style, start by that.
49962     new_path=`cmd //c echo $path`
49963   fi
49964 
49965 
49966   input_path="$new_path"
49967   # Check if we need to convert this using DOS-style short mode. If the path
49968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49969   # take no chances and rewrite it.
49970   # Note: m4 eats our [], so we need to use [ and ] instead.
49971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49972   if test "x$has_forbidden_chars" != x; then
49973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49974     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49975   fi
49976 
49977 
49978   windows_path="$new_path"
49979   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49980     unix_path=`$CYGPATH -u "$windows_path"`
49981     new_path="$unix_path"
49982   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49983     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49984     new_path="$unix_path"
49985   fi
49986 
49987   if test "x$path" != "x$new_path"; then
49988     JT_HOME="$new_path"
49989     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49990 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49991   fi
49992 
49993   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49994   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49995 
49996     else
49997       # We're on a unix platform. Hooray! :)
49998       path="$JT_HOME"
49999       has_space=`$ECHO "$path" | $GREP " "`
50000       if test "x$has_space" != x; then
50001         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
50002 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
50003         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50004       fi
50005 
50006       # Use eval to expand a potential ~
50007       eval path="$path"
50008       if test ! -f "$path" && test ! -d "$path"; then
50009         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
50010       fi
50011 
50012       if test -d "$path"; then
50013         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
50014       else
50015         dir="`$DIRNAME "$path"`"
50016         base="`$BASENAME "$path"`"
50017         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
50018       fi
50019     fi
50020   fi
50021 
50022     if test ! -d "$JT_HOME"; then
50023       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
50024     fi
50025 
50026     if test ! -e "$JT_HOME/lib/jtreg.jar"; then
50027       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
50028     fi
50029 
50030     JTREGEXE="$JT_HOME/bin/jtreg"
50031     if test ! -x "$JTREGEXE"; then
50032       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
50033     fi
50034 
50035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
50036 $as_echo_n "checking for jtreg test harness... " >&6; }
50037     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
50038 $as_echo "$JT_HOME" >&6; }
50039   else
50040     # Try to locate jtreg
50041     if test "x$JT_HOME" != x; then
50042       # JT_HOME set in environment, use it
50043       if test ! -d "$JT_HOME"; then
50044         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
50045 $as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
50046         JT_HOME=
50047       else
50048         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
50049           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
50050 $as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
50051           JT_HOME=
50052         elif test ! -x "$JT_HOME/bin/jtreg"; then
50053           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
50054 $as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
50055           JT_HOME=
50056         else
50057           JTREGEXE="$JT_HOME/bin/jtreg"
50058           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
50059 $as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
50060         fi
50061       fi
50062     fi
50063 
50064     if test "x$JT_HOME" = x; then
50065       # JT_HOME is not set in environment, or was deemed invalid.
50066       # Try to find jtreg on path
50067 
50068 
50069   # Publish this variable in the help.
50070 
50071 
50072   if [ -z "${JTREGEXE+x}" ]; then
50073     # The variable is not set by user, try to locate tool using the code snippet
50074     for ac_prog in jtreg
50075 do
50076   # Extract the first word of "$ac_prog", so it can be a program name with args.
50077 set dummy $ac_prog; ac_word=$2
50078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50079 $as_echo_n "checking for $ac_word... " >&6; }
50080 if ${ac_cv_path_JTREGEXE+:} false; then :
50081   $as_echo_n "(cached) " >&6
50082 else
50083   case $JTREGEXE in
50084   [\\/]* | ?:[\\/]*)
50085   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
50086   ;;
50087   *)
50088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50089 for as_dir in $PATH
50090 do
50091   IFS=$as_save_IFS
50092   test -z "$as_dir" && as_dir=.
50093     for ac_exec_ext in '' $ac_executable_extensions; do
50094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50095     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
50096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50097     break 2
50098   fi
50099 done
50100   done
50101 IFS=$as_save_IFS
50102 
50103   ;;
50104 esac
50105 fi
50106 JTREGEXE=$ac_cv_path_JTREGEXE
50107 if test -n "$JTREGEXE"; then
50108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
50109 $as_echo "$JTREGEXE" >&6; }
50110 else
50111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50112 $as_echo "no" >&6; }
50113 fi
50114 
50115 
50116   test -n "$JTREGEXE" && break
50117 done
50118 
50119   else
50120     # The variable is set, but is it from the command line or the environment?
50121 
50122     # Try to remove the string !JTREGEXE! from our list.
50123     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
50124     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
50125       # If it failed, the variable was not from the command line. Ignore it,
50126       # but warn the user (except for BASH, which is always set by the calling BASH).
50127       if test "xJTREGEXE" != xBASH; then
50128         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
50129 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
50130       fi
50131       # Try to locate tool using the code snippet
50132       for ac_prog in jtreg
50133 do
50134   # Extract the first word of "$ac_prog", so it can be a program name with args.
50135 set dummy $ac_prog; ac_word=$2
50136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50137 $as_echo_n "checking for $ac_word... " >&6; }
50138 if ${ac_cv_path_JTREGEXE+:} false; then :
50139   $as_echo_n "(cached) " >&6
50140 else
50141   case $JTREGEXE in
50142   [\\/]* | ?:[\\/]*)
50143   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
50144   ;;
50145   *)
50146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50147 for as_dir in $PATH
50148 do
50149   IFS=$as_save_IFS
50150   test -z "$as_dir" && as_dir=.
50151     for ac_exec_ext in '' $ac_executable_extensions; do
50152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50153     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
50154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50155     break 2
50156   fi
50157 done
50158   done
50159 IFS=$as_save_IFS
50160 
50161   ;;
50162 esac
50163 fi
50164 JTREGEXE=$ac_cv_path_JTREGEXE
50165 if test -n "$JTREGEXE"; then
50166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
50167 $as_echo "$JTREGEXE" >&6; }
50168 else
50169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50170 $as_echo "no" >&6; }
50171 fi
50172 
50173 
50174   test -n "$JTREGEXE" && break
50175 done
50176 
50177     else
50178       # If it succeeded, then it was overridden by the user. We will use it
50179       # for the tool.
50180 
50181       # First remove it from the list of overridden variables, so we can test
50182       # for unknown variables in the end.
50183       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
50184 
50185       # Check if we try to supply an empty value
50186       if test "x$JTREGEXE" = x; then
50187         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
50188 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
50189         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
50190 $as_echo_n "checking for JTREGEXE... " >&6; }
50191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
50192 $as_echo "disabled" >&6; }
50193       else
50194         # Check if the provided tool contains a complete path.
50195         tool_specified="$JTREGEXE"
50196         tool_basename="${tool_specified##*/}"
50197         if test "x$tool_basename" = "x$tool_specified"; then
50198           # A command without a complete path is provided, search $PATH.
50199           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
50200 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
50201           # Extract the first word of "$tool_basename", so it can be a program name with args.
50202 set dummy $tool_basename; ac_word=$2
50203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
50204 $as_echo_n "checking for $ac_word... " >&6; }
50205 if ${ac_cv_path_JTREGEXE+:} false; then :
50206   $as_echo_n "(cached) " >&6
50207 else
50208   case $JTREGEXE in
50209   [\\/]* | ?:[\\/]*)
50210   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
50211   ;;
50212   *)
50213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50214 for as_dir in $PATH
50215 do
50216   IFS=$as_save_IFS
50217   test -z "$as_dir" && as_dir=.
50218     for ac_exec_ext in '' $ac_executable_extensions; do
50219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
50220     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
50221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
50222     break 2
50223   fi
50224 done
50225   done
50226 IFS=$as_save_IFS
50227 
50228   ;;
50229 esac
50230 fi
50231 JTREGEXE=$ac_cv_path_JTREGEXE
50232 if test -n "$JTREGEXE"; then
50233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
50234 $as_echo "$JTREGEXE" >&6; }
50235 else
50236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50237 $as_echo "no" >&6; }
50238 fi
50239 
50240 
50241           if test "x$JTREGEXE" = x; then
50242             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
50243           fi
50244         else
50245           # Otherwise we believe it is a complete path. Use it as it is.
50246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
50247 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
50248           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
50249 $as_echo_n "checking for JTREGEXE... " >&6; }
50250           if test ! -x "$tool_specified"; then
50251             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
50252 $as_echo "not found" >&6; }
50253             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
50254           fi
50255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
50256 $as_echo "$tool_specified" >&6; }
50257         fi
50258       fi
50259     fi
50260 
50261   fi
50262 
50263 
50264       if test "x$JTREGEXE" != x; then
50265         # That's good, now try to derive JT_HOME
50266         JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
50267         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
50268           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
50269 $as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
50270           JT_HOME=
50271           JTREGEXE=
50272         else
50273           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
50274 $as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
50275         fi
50276       fi
50277     fi
50278 
50279     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
50280 $as_echo_n "checking for jtreg test harness... " >&6; }
50281     if test "x$JT_HOME" != x; then
50282       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
50283 $as_echo "$JT_HOME" >&6; }
50284     else
50285       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
50286 $as_echo "no, not found" >&6; }
50287 
50288       if test "x$with_jtreg" = xyes; then
50289         as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
50290       fi
50291     fi
50292   fi
50293 
50294 
50295   # Only process if variable expands to non-empty
50296 
50297   if test "x$JTREGEXE" != x; then
50298     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50299 
50300   # First separate the path from the arguments. This will split at the first
50301   # space.
50302   complete="$JTREGEXE"
50303   path="${complete%% *}"
50304   tmp="$complete EOL"
50305   arguments="${tmp#* }"
50306 
50307   # Input might be given as Windows format, start by converting to
50308   # unix format.
50309   new_path=`$CYGPATH -u "$path"`
50310 
50311   # Now try to locate executable using which
50312   new_path=`$WHICH "$new_path" 2> /dev/null`
50313   # bat and cmd files are not always considered executable in cygwin causing which
50314   # to not find them
50315   if test "x$new_path" = x \
50316       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
50317       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
50318     new_path=`$CYGPATH -u "$path"`
50319   fi
50320   if test "x$new_path" = x; then
50321     # Oops. Which didn't find the executable.
50322     # The splitting of arguments from the executable at a space might have been incorrect,
50323     # since paths with space are more likely in Windows. Give it another try with the whole
50324     # argument.
50325     path="$complete"
50326     arguments="EOL"
50327     new_path=`$CYGPATH -u "$path"`
50328     new_path=`$WHICH "$new_path" 2> /dev/null`
50329     # bat and cmd files are not always considered executable in cygwin causing which
50330     # to not find them
50331     if test "x$new_path" = x \
50332         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
50333         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
50334       new_path=`$CYGPATH -u "$path"`
50335     fi
50336     if test "x$new_path" = x; then
50337       # It's still not found. Now this is an unrecoverable error.
50338       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
50339 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
50340       has_space=`$ECHO "$complete" | $GREP " "`
50341       if test "x$has_space" != x; then
50342         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
50343 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
50344       fi
50345       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50346     fi
50347   fi
50348 
50349   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50350   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50351   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50352   # "foo.exe" is OK but "foo" is an error.
50353   #
50354   # This test is therefore slightly more accurate than "test -f" to check for file presence.
50355   # It is also a way to make sure we got the proper file name for the real test later on.
50356   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50357   if test "x$test_shortpath" = x; then
50358     # Short path failed, file does not exist as specified.
50359     # Try adding .exe or .cmd
50360     if test -f "${new_path}.exe"; then
50361       input_to_shortpath="${new_path}.exe"
50362     elif test -f "${new_path}.cmd"; then
50363       input_to_shortpath="${new_path}.cmd"
50364     else
50365       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
50366 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
50367       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
50368 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
50369       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50370     fi
50371   else
50372     input_to_shortpath="$new_path"
50373   fi
50374 
50375   # Call helper function which possibly converts this using DOS-style short mode.
50376   # If so, the updated path is stored in $new_path.
50377   new_path="$input_to_shortpath"
50378 
50379   input_path="$input_to_shortpath"
50380   # Check if we need to convert this using DOS-style short mode. If the path
50381   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50382   # take no chances and rewrite it.
50383   # Note: m4 eats our [], so we need to use [ and ] instead.
50384   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50385   if test "x$has_forbidden_chars" != x; then
50386     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50387     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50388     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50389     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50390       # Going to short mode and back again did indeed matter. Since short mode is
50391       # case insensitive, let's make it lowercase to improve readability.
50392       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50393       # Now convert it back to Unix-style (cygpath)
50394       input_path=`$CYGPATH -u "$shortmode_path"`
50395       new_path="$input_path"
50396     fi
50397   fi
50398 
50399   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50400   if test "x$test_cygdrive_prefix" = x; then
50401     # As a simple fix, exclude /usr/bin since it's not a real path.
50402     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
50403       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50404       # a path prefixed by /cygdrive for fixpath to work.
50405       new_path="$CYGWIN_ROOT_PATH$input_path"
50406     fi
50407   fi
50408 
50409   # remove trailing .exe if any
50410   new_path="${new_path/%.exe/}"
50411 
50412     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50413 
50414   # First separate the path from the arguments. This will split at the first
50415   # space.
50416   complete="$JTREGEXE"
50417   path="${complete%% *}"
50418   tmp="$complete EOL"
50419   arguments="${tmp#* }"
50420 
50421   # Input might be given as Windows format, start by converting to
50422   # unix format.
50423   new_path="$path"
50424 
50425   windows_path="$new_path"
50426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50427     unix_path=`$CYGPATH -u "$windows_path"`
50428     new_path="$unix_path"
50429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50431     new_path="$unix_path"
50432   fi
50433 
50434 
50435   # Now try to locate executable using which
50436   new_path=`$WHICH "$new_path" 2> /dev/null`
50437 
50438   if test "x$new_path" = x; then
50439     # Oops. Which didn't find the executable.
50440     # The splitting of arguments from the executable at a space might have been incorrect,
50441     # since paths with space are more likely in Windows. Give it another try with the whole
50442     # argument.
50443     path="$complete"
50444     arguments="EOL"
50445     new_path="$path"
50446 
50447   windows_path="$new_path"
50448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50449     unix_path=`$CYGPATH -u "$windows_path"`
50450     new_path="$unix_path"
50451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50453     new_path="$unix_path"
50454   fi
50455 
50456 
50457     new_path=`$WHICH "$new_path" 2> /dev/null`
50458     # bat and cmd files are not always considered executable in MSYS causing which
50459     # to not find them
50460     if test "x$new_path" = x \
50461         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
50462         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
50463       new_path="$path"
50464 
50465   windows_path="$new_path"
50466   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50467     unix_path=`$CYGPATH -u "$windows_path"`
50468     new_path="$unix_path"
50469   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50470     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50471     new_path="$unix_path"
50472   fi
50473 
50474     fi
50475 
50476     if test "x$new_path" = x; then
50477       # It's still not found. Now this is an unrecoverable error.
50478       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
50479 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
50480       has_space=`$ECHO "$complete" | $GREP " "`
50481       if test "x$has_space" != x; then
50482         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
50483 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
50484       fi
50485       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50486     fi
50487   fi
50488 
50489   # Now new_path has a complete unix path to the binary
50490   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
50491     # Keep paths in /bin as-is, but remove trailing .exe if any
50492     new_path="${new_path/%.exe/}"
50493     # Do not save /bin paths to all_fixpath_prefixes!
50494   else
50495     # Not in mixed or Windows style, start by that.
50496     new_path=`cmd //c echo $new_path`
50497 
50498   input_path="$new_path"
50499   # Check if we need to convert this using DOS-style short mode. If the path
50500   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50501   # take no chances and rewrite it.
50502   # Note: m4 eats our [], so we need to use [ and ] instead.
50503   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50504   if test "x$has_forbidden_chars" != x; then
50505     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50506     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50507   fi
50508 
50509     # Output is in $new_path
50510 
50511   windows_path="$new_path"
50512   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50513     unix_path=`$CYGPATH -u "$windows_path"`
50514     new_path="$unix_path"
50515   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50516     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50517     new_path="$unix_path"
50518   fi
50519 
50520     # remove trailing .exe if any
50521     new_path="${new_path/%.exe/}"
50522 
50523     # Save the first 10 bytes of this path to the storage, so fixpath can work.
50524     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50525   fi
50526 
50527     else
50528       # We're on a unix platform. Hooray! :)
50529       # First separate the path from the arguments. This will split at the first
50530       # space.
50531       complete="$JTREGEXE"
50532       path="${complete%% *}"
50533       tmp="$complete EOL"
50534       arguments="${tmp#* }"
50535 
50536       # Cannot rely on the command "which" here since it doesn't always work.
50537       is_absolute_path=`$ECHO "$path" | $GREP ^/`
50538       if test -z "$is_absolute_path"; then
50539         # Path to executable is not absolute. Find it.
50540         IFS_save="$IFS"
50541         IFS=:
50542         for p in $PATH; do
50543           if test -f "$p/$path" && test -x "$p/$path"; then
50544             new_path="$p/$path"
50545             break
50546           fi
50547         done
50548         IFS="$IFS_save"
50549       else
50550         # This is an absolute path, we can use it without further modifications.
50551         new_path="$path"
50552       fi
50553 
50554       if test "x$new_path" = x; then
50555         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
50556 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
50557         has_space=`$ECHO "$complete" | $GREP " "`
50558         if test "x$has_space" != x; then
50559           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
50560 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
50561         fi
50562         as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
50563       fi
50564     fi
50565 
50566     # Now join together the path and the arguments once again
50567     if test "x$arguments" != xEOL; then
50568       new_complete="$new_path ${arguments% *}"
50569     else
50570       new_complete="$new_path"
50571     fi
50572 
50573     if test "x$complete" != "x$new_complete"; then
50574       JTREGEXE="$new_complete"
50575       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
50576 $as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
50577     fi
50578   fi
50579 
50580 
50581   # Only process if variable expands to non-empty
50582 
50583   if test "x$JT_HOME" != x; then
50584     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50585 
50586   # Input might be given as Windows format, start by converting to
50587   # unix format.
50588   path="$JT_HOME"
50589   new_path=`$CYGPATH -u "$path"`
50590 
50591   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50592   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50593   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50594   # "foo.exe" is OK but "foo" is an error.
50595   #
50596   # This test is therefore slightly more accurate than "test -f" to check for file precense.
50597   # It is also a way to make sure we got the proper file name for the real test later on.
50598   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50599   if test "x$test_shortpath" = x; then
50600     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
50601 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
50602     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
50603   fi
50604 
50605   # Call helper function which possibly converts this using DOS-style short mode.
50606   # If so, the updated path is stored in $new_path.
50607 
50608   input_path="$new_path"
50609   # Check if we need to convert this using DOS-style short mode. If the path
50610   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50611   # take no chances and rewrite it.
50612   # Note: m4 eats our [], so we need to use [ and ] instead.
50613   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50614   if test "x$has_forbidden_chars" != x; then
50615     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50616     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50617     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50618     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50619       # Going to short mode and back again did indeed matter. Since short mode is
50620       # case insensitive, let's make it lowercase to improve readability.
50621       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50622       # Now convert it back to Unix-style (cygpath)
50623       input_path=`$CYGPATH -u "$shortmode_path"`
50624       new_path="$input_path"
50625     fi
50626   fi
50627 
50628   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50629   if test "x$test_cygdrive_prefix" = x; then
50630     # As a simple fix, exclude /usr/bin since it's not a real path.
50631     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50632       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50633       # a path prefixed by /cygdrive for fixpath to work.
50634       new_path="$CYGWIN_ROOT_PATH$input_path"
50635     fi
50636   fi
50637 
50638 
50639   if test "x$path" != "x$new_path"; then
50640     JT_HOME="$new_path"
50641     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
50642 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
50643   fi
50644 
50645     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50646 
50647   path="$JT_HOME"
50648   has_colon=`$ECHO $path | $GREP ^.:`
50649   new_path="$path"
50650   if test "x$has_colon" = x; then
50651     # Not in mixed or Windows style, start by that.
50652     new_path=`cmd //c echo $path`
50653   fi
50654 
50655 
50656   input_path="$new_path"
50657   # Check if we need to convert this using DOS-style short mode. If the path
50658   # contains just simple characters, use it. Otherwise (spaces, weird characters),
50659   # take no chances and rewrite it.
50660   # Note: m4 eats our [], so we need to use [ and ] instead.
50661   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50662   if test "x$has_forbidden_chars" != x; then
50663     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50664     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50665   fi
50666 
50667 
50668   windows_path="$new_path"
50669   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50670     unix_path=`$CYGPATH -u "$windows_path"`
50671     new_path="$unix_path"
50672   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50673     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50674     new_path="$unix_path"
50675   fi
50676 
50677   if test "x$path" != "x$new_path"; then
50678     JT_HOME="$new_path"
50679     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
50680 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
50681   fi
50682 
50683   # Save the first 10 bytes of this path to the storage, so fixpath can work.
50684   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50685 
50686     else
50687       # We're on a unix platform. Hooray! :)
50688       path="$JT_HOME"
50689       has_space=`$ECHO "$path" | $GREP " "`
50690       if test "x$has_space" != x; then
50691         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
50692 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
50693         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50694       fi
50695 
50696       # Use eval to expand a potential ~
50697       eval path="$path"
50698       if test ! -f "$path" && test ! -d "$path"; then
50699         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
50700       fi
50701 
50702       if test -d "$path"; then
50703         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
50704       else
50705         dir="`$DIRNAME "$path"`"
50706         base="`$BASENAME "$path"`"
50707         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
50708       fi
50709     fi
50710   fi
50711 
50712 
50713 
50714 
50715 
50716 # Setup Jib dependency tool
50717 
50718 
50719 # Check whether --with-jib was given.
50720 if test "${with_jib+set}" = set; then :
50721   withval=$with_jib;
50722 fi
50723 
50724 
50725   if test "x$with_jib" = xno || test "x$with_jib" = x; then
50726     # jib disabled
50727     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
50728 $as_echo_n "checking for jib... " >&6; }
50729     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50730 $as_echo "no" >&6; }
50731   elif test "x$with_jib" = xyes; then
50732     as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
50733   else
50734     JIB_HOME="${with_jib}"
50735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
50736 $as_echo_n "checking for jib... " >&6; }
50737     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
50738 $as_echo "${JIB_HOME}" >&6; }
50739     if test ! -d "${JIB_HOME}"; then
50740       as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
50741     fi
50742     JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
50743     if test ! -f "${JIB_JAR}"; then
50744       as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
50745     fi
50746   fi
50747 
50748 
50749 
50750 
50751 
50752   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
50753   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
50754   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
50755   #                              commands produced by the link step (currently AIX only)
50756   if test "x$TOOLCHAIN_TYPE" = xxlc; then
50757     COMPILER_TARGET_BITS_FLAG="-q"
50758     COMPILER_COMMAND_FILE_FLAG="-f"
50759     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
50760   else
50761     COMPILER_TARGET_BITS_FLAG="-m"
50762     COMPILER_COMMAND_FILE_FLAG="@"
50763     COMPILER_BINDCMD_FILE_FLAG=""
50764 
50765     # The solstudio linker does not support @-files.
50766     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50767       COMPILER_COMMAND_FILE_FLAG=
50768     fi
50769 
50770     # Check if @file is supported by gcc
50771     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50772       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
50773 $as_echo_n "checking if @file is supported by gcc... " >&6; }
50774       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
50775       $ECHO "" "--version" > command.file
50776       if $CXX @command.file 2>&5 >&5; then
50777         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50778 $as_echo "yes" >&6; }
50779         COMPILER_COMMAND_FILE_FLAG="@"
50780       else
50781         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50782 $as_echo "no" >&6; }
50783         COMPILER_COMMAND_FILE_FLAG=
50784       fi
50785       $RM command.file
50786     fi
50787   fi
50788 
50789 
50790 
50791 
50792   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
50793   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50794     ARFLAGS="-r"
50795   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50796     ARFLAGS="-X64"
50797   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50798     # lib.exe is used as AR to create static libraries.
50799     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
50800   else
50801     ARFLAGS=""
50802   fi
50803 
50804 
50805   ## Setup strip.
50806   # FIXME: should this really be per platform, or should it be per toolchain type?
50807   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
50808   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
50809   if test "x$OPENJDK_TARGET_OS" = xlinux; then
50810     STRIPFLAGS="-g"
50811   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50812     STRIPFLAGS="-x"
50813   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50814     STRIPFLAGS="-S"
50815   elif test "x$OPENJDK_TARGET_OS" = xaix; then
50816     STRIPFLAGS="-X32_64"
50817   fi
50818 
50819 
50820 
50821   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50822     CC_OUT_OPTION=-Fo
50823     EXE_OUT_OPTION=-out:
50824     LD_OUT_OPTION=-out:
50825     AR_OUT_OPTION=-out:
50826   else
50827     # The option used to specify the target .o,.a or .so file.
50828     # When compiling, how to specify the to be created object file.
50829     CC_OUT_OPTION='-o$(SPACE)'
50830     # When linking, how to specify the to be created executable.
50831     EXE_OUT_OPTION='-o$(SPACE)'
50832     # When linking, how to specify the to be created dynamically linkable library.
50833     LD_OUT_OPTION='-o$(SPACE)'
50834     # When archiving, how to specify the to be create static archive for object files.
50835     AR_OUT_OPTION='rcs$(SPACE)'
50836   fi
50837 
50838 
50839 
50840 
50841 
50842   # On Windows, we need to set RC flags.
50843   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50844     RC_FLAGS="-nologo -l0x409"
50845     JVM_RCFLAGS="-nologo"
50846     if test "x$DEBUG_LEVEL" = xrelease; then
50847       RC_FLAGS="$RC_FLAGS -DNDEBUG"
50848       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
50849     fi
50850 
50851     # The version variables used to create RC_FLAGS may be overridden
50852     # in a custom configure script, or possibly the command line.
50853     # Let those variables be expanded at make time in spec.gmk.
50854     # The \$ are escaped to the shell, and the $(...) variables
50855     # are evaluated by make.
50856     RC_FLAGS="$RC_FLAGS \
50857         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
50858         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
50859         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
50860         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
50861         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
50862         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_FEATURE)\" \
50863         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
50864 
50865     JVM_RCFLAGS="$JVM_RCFLAGS \
50866         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
50867         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
50868         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
50869         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
50870         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
50871         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
50872         -D\"HS_FNAME=jvm.dll\" \
50873         -D\"HS_INTERNAL_NAME=jvm\""
50874   fi
50875 
50876 
50877 
50878   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50879     # silence copyright notice and other headers.
50880     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
50881   fi
50882 
50883 
50884 # Now we can test some aspects on the target using configure macros.
50885 
50886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
50887 $as_echo_n "checking for ANSI C header files... " >&6; }
50888 if ${ac_cv_header_stdc+:} false; then :
50889   $as_echo_n "(cached) " >&6
50890 else
50891   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50892 /* end confdefs.h.  */
50893 #include <stdlib.h>
50894 #include <stdarg.h>
50895 #include <string.h>
50896 #include <float.h>
50897 
50898 int
50899 main ()
50900 {
50901 
50902   ;
50903   return 0;
50904 }
50905 _ACEOF
50906 if ac_fn_cxx_try_compile "$LINENO"; then :
50907   ac_cv_header_stdc=yes
50908 else
50909   ac_cv_header_stdc=no
50910 fi
50911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50912 
50913 if test $ac_cv_header_stdc = yes; then
50914   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
50915   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50916 /* end confdefs.h.  */
50917 #include <string.h>
50918 
50919 _ACEOF
50920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50921   $EGREP "memchr" >/dev/null 2>&1; then :
50922 
50923 else
50924   ac_cv_header_stdc=no
50925 fi
50926 rm -f conftest*
50927 
50928 fi
50929 
50930 if test $ac_cv_header_stdc = yes; then
50931   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
50932   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50933 /* end confdefs.h.  */
50934 #include <stdlib.h>
50935 
50936 _ACEOF
50937 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
50938   $EGREP "free" >/dev/null 2>&1; then :
50939 
50940 else
50941   ac_cv_header_stdc=no
50942 fi
50943 rm -f conftest*
50944 
50945 fi
50946 
50947 if test $ac_cv_header_stdc = yes; then
50948   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
50949   if test "$cross_compiling" = yes; then :
50950   :
50951 else
50952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50953 /* end confdefs.h.  */
50954 #include <ctype.h>
50955 #include <stdlib.h>
50956 #if ((' ' & 0x0FF) == 0x020)
50957 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
50958 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
50959 #else
50960 # define ISLOWER(c) \
50961                    (('a' <= (c) && (c) <= 'i') \
50962                      || ('j' <= (c) && (c) <= 'r') \
50963                      || ('s' <= (c) && (c) <= 'z'))
50964 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
50965 #endif
50966 
50967 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
50968 int
50969 main ()
50970 {
50971   int i;
50972   for (i = 0; i < 256; i++)
50973     if (XOR (islower (i), ISLOWER (i))
50974         || toupper (i) != TOUPPER (i))
50975       return 2;
50976   return 0;
50977 }
50978 _ACEOF
50979 if ac_fn_cxx_try_run "$LINENO"; then :
50980 
50981 else
50982   ac_cv_header_stdc=no
50983 fi
50984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50985   conftest.$ac_objext conftest.beam conftest.$ac_ext
50986 fi
50987 
50988 fi
50989 fi
50990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
50991 $as_echo "$ac_cv_header_stdc" >&6; }
50992 if test $ac_cv_header_stdc = yes; then
50993 
50994 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
50995 
50996 fi
50997 
50998 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
50999 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
51000                   inttypes.h stdint.h unistd.h
51001 do :
51002   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
51003 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
51004 "
51005 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
51006   cat >>confdefs.h <<_ACEOF
51007 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
51008 _ACEOF
51009 
51010 fi
51011 
51012 done
51013 
51014 
51015 
51016   ###############################################################################
51017   #
51018   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
51019   # (The JVM can use 32 or 64 bit Java pointers but that decision
51020   # is made at runtime.)
51021   #
51022 
51023   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
51024     # Always specify -m flag on Solaris
51025     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
51026 
51027   # When we add flags to the "official" CFLAGS etc, we need to
51028   # keep track of these additions in ADDED_CFLAGS etc. These
51029   # will later be checked to make sure only controlled additions
51030   # have been made to CFLAGS etc.
51031   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51032   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51033   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51034 
51035   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
51036   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
51037   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
51038 
51039   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
51040   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
51041   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
51042 
51043   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
51044   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
51045   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
51046 
51047   elif test "x$COMPILE_TYPE" = xreduced; then
51048     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
51049       # Specify -m if running reduced on unix platforms
51050 
51051   # When we add flags to the "official" CFLAGS etc, we need to
51052   # keep track of these additions in ADDED_CFLAGS etc. These
51053   # will later be checked to make sure only controlled additions
51054   # have been made to CFLAGS etc.
51055   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51056   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51057   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51058 
51059   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
51060   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
51061   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
51062 
51063   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
51064   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
51065   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
51066 
51067   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
51068   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
51069   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
51070 
51071     fi
51072   fi
51073   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51074     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51075     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51076     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51077   fi
51078 
51079   # Make compilation sanity check
51080   for ac_header in stdio.h
51081 do :
51082   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
51083 if test "x$ac_cv_header_stdio_h" = xyes; then :
51084   cat >>confdefs.h <<_ACEOF
51085 #define HAVE_STDIO_H 1
51086 _ACEOF
51087 
51088 else
51089 
51090     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
51091 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
51092     if test "x$COMPILE_TYPE" = xreduced; then
51093 
51094   # Print a helpful message on how to acquire the necessary build dependency.
51095   # reduced is the help tag: freetype, cups, alsa etc
51096   MISSING_DEPENDENCY=reduced
51097 
51098   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51099     cygwin_help $MISSING_DEPENDENCY
51100   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51101     msys_help $MISSING_DEPENDENCY
51102   else
51103     PKGHANDLER_COMMAND=
51104 
51105     case $PKGHANDLER in
51106       apt-get)
51107         apt_help     $MISSING_DEPENDENCY ;;
51108       yum)
51109         yum_help     $MISSING_DEPENDENCY ;;
51110       brew)
51111         brew_help    $MISSING_DEPENDENCY ;;
51112       port)
51113         port_help    $MISSING_DEPENDENCY ;;
51114       pkgutil)
51115         pkgutil_help $MISSING_DEPENDENCY ;;
51116       pkgadd)
51117         pkgadd_help  $MISSING_DEPENDENCY ;;
51118     esac
51119 
51120     if test "x$PKGHANDLER_COMMAND" != x; then
51121       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51122     fi
51123   fi
51124 
51125       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
51126 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
51127     elif test "x$COMPILE_TYPE" = xcross; then
51128       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
51129 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
51130     fi
51131     as_fn_error $? "Cannot continue." "$LINENO" 5
51132 
51133 fi
51134 
51135 done
51136 
51137 
51138   # The cast to long int works around a bug in the HP C Compiler
51139 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
51140 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
51141 # This bug is HP SR number 8606223364.
51142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
51143 $as_echo_n "checking size of int *... " >&6; }
51144 if ${ac_cv_sizeof_int_p+:} false; then :
51145   $as_echo_n "(cached) " >&6
51146 else
51147   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
51148 
51149 else
51150   if test "$ac_cv_type_int_p" = yes; then
51151      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
51152 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
51153 as_fn_error 77 "cannot compute sizeof (int *)
51154 See \`config.log' for more details" "$LINENO" 5; }
51155    else
51156      ac_cv_sizeof_int_p=0
51157    fi
51158 fi
51159 
51160 fi
51161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
51162 $as_echo "$ac_cv_sizeof_int_p" >&6; }
51163 
51164 
51165 
51166 cat >>confdefs.h <<_ACEOF
51167 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
51168 _ACEOF
51169 
51170 
51171 
51172   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
51173   if test "x$ac_cv_sizeof_int_p" = x; then
51174     # The test failed, lets stick to the assumed value.
51175     { $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
51176 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
51177   else
51178     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
51179 
51180     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
51181       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
51182       # Let's try to implicitely set the compilers target architecture and retry the test
51183       { $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
51184 $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;}
51185       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
51186 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
51187 
51188   # When we add flags to the "official" CFLAGS etc, we need to
51189   # keep track of these additions in ADDED_CFLAGS etc. These
51190   # will later be checked to make sure only controlled additions
51191   # have been made to CFLAGS etc.
51192   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51193   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51194   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51195 
51196   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
51197   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
51198   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
51199 
51200   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
51201   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
51202   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
51203 
51204   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
51205   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
51206   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
51207 
51208 
51209       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
51210       unset ac_cv_sizeof_int_p
51211       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
51212       cat >>confdefs.h <<_ACEOF
51213 #undef SIZEOF_INT_P
51214 _ACEOF
51215 
51216       # The cast to long int works around a bug in the HP C Compiler
51217 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
51218 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
51219 # This bug is HP SR number 8606223364.
51220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
51221 $as_echo_n "checking size of int *... " >&6; }
51222 if ${ac_cv_sizeof_int_p+:} false; then :
51223   $as_echo_n "(cached) " >&6
51224 else
51225   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
51226 
51227 else
51228   if test "$ac_cv_type_int_p" = yes; then
51229      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
51230 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
51231 as_fn_error 77 "cannot compute sizeof (int *)
51232 See \`config.log' for more details" "$LINENO" 5; }
51233    else
51234      ac_cv_sizeof_int_p=0
51235    fi
51236 fi
51237 
51238 fi
51239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
51240 $as_echo "$ac_cv_sizeof_int_p" >&6; }
51241 
51242 
51243 
51244 cat >>confdefs.h <<_ACEOF
51245 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
51246 _ACEOF
51247 
51248 
51249 
51250       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
51251 
51252       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
51253         { $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
51254 $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;}
51255         if test "x$COMPILE_TYPE" = xreduced; then
51256 
51257   # Print a helpful message on how to acquire the necessary build dependency.
51258   # reduced is the help tag: freetype, cups, alsa etc
51259   MISSING_DEPENDENCY=reduced
51260 
51261   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51262     cygwin_help $MISSING_DEPENDENCY
51263   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51264     msys_help $MISSING_DEPENDENCY
51265   else
51266     PKGHANDLER_COMMAND=
51267 
51268     case $PKGHANDLER in
51269       apt-get)
51270         apt_help     $MISSING_DEPENDENCY ;;
51271       yum)
51272         yum_help     $MISSING_DEPENDENCY ;;
51273       brew)
51274         brew_help    $MISSING_DEPENDENCY ;;
51275       port)
51276         port_help    $MISSING_DEPENDENCY ;;
51277       pkgutil)
51278         pkgutil_help $MISSING_DEPENDENCY ;;
51279       pkgadd)
51280         pkgadd_help  $MISSING_DEPENDENCY ;;
51281     esac
51282 
51283     if test "x$PKGHANDLER_COMMAND" != x; then
51284       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
51285     fi
51286   fi
51287 
51288           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
51289 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
51290         elif test "x$COMPILE_TYPE" = xcross; then
51291           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
51292 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
51293         fi
51294         as_fn_error $? "Cannot continue." "$LINENO" 5
51295       fi
51296     fi
51297   fi
51298 
51299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
51300 $as_echo_n "checking for target address size... " >&6; }
51301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
51302 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
51303 
51304 
51305   ###############################################################################
51306   #
51307   # Is the target little of big endian?
51308   #
51309    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
51310 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
51311 if ${ac_cv_c_bigendian+:} false; then :
51312   $as_echo_n "(cached) " >&6
51313 else
51314   ac_cv_c_bigendian=unknown
51315     # See if we're dealing with a universal compiler.
51316     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51317 /* end confdefs.h.  */
51318 #ifndef __APPLE_CC__
51319                not a universal capable compiler
51320              #endif
51321              typedef int dummy;
51322 
51323 _ACEOF
51324 if ac_fn_cxx_try_compile "$LINENO"; then :
51325 
51326         # Check for potential -arch flags.  It is not universal unless
51327         # there are at least two -arch flags with different values.
51328         ac_arch=
51329         ac_prev=
51330         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
51331          if test -n "$ac_prev"; then
51332            case $ac_word in
51333              i?86 | x86_64 | ppc | ppc64)
51334                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
51335                  ac_arch=$ac_word
51336                else
51337                  ac_cv_c_bigendian=universal
51338                  break
51339                fi
51340                ;;
51341            esac
51342            ac_prev=
51343          elif test "x$ac_word" = "x-arch"; then
51344            ac_prev=arch
51345          fi
51346        done
51347 fi
51348 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51349     if test $ac_cv_c_bigendian = unknown; then
51350       # See if sys/param.h defines the BYTE_ORDER macro.
51351       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51352 /* end confdefs.h.  */
51353 #include <sys/types.h>
51354              #include <sys/param.h>
51355 
51356 int
51357 main ()
51358 {
51359 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
51360                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
51361                      && LITTLE_ENDIAN)
51362               bogus endian macros
51363              #endif
51364 
51365   ;
51366   return 0;
51367 }
51368 _ACEOF
51369 if ac_fn_cxx_try_compile "$LINENO"; then :
51370   # It does; now see whether it defined to BIG_ENDIAN or not.
51371          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51372 /* end confdefs.h.  */
51373 #include <sys/types.h>
51374                 #include <sys/param.h>
51375 
51376 int
51377 main ()
51378 {
51379 #if BYTE_ORDER != BIG_ENDIAN
51380                  not big endian
51381                 #endif
51382 
51383   ;
51384   return 0;
51385 }
51386 _ACEOF
51387 if ac_fn_cxx_try_compile "$LINENO"; then :
51388   ac_cv_c_bigendian=yes
51389 else
51390   ac_cv_c_bigendian=no
51391 fi
51392 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51393 fi
51394 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51395     fi
51396     if test $ac_cv_c_bigendian = unknown; then
51397       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
51398       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51399 /* end confdefs.h.  */
51400 #include <limits.h>
51401 
51402 int
51403 main ()
51404 {
51405 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
51406               bogus endian macros
51407              #endif
51408 
51409   ;
51410   return 0;
51411 }
51412 _ACEOF
51413 if ac_fn_cxx_try_compile "$LINENO"; then :
51414   # It does; now see whether it defined to _BIG_ENDIAN or not.
51415          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51416 /* end confdefs.h.  */
51417 #include <limits.h>
51418 
51419 int
51420 main ()
51421 {
51422 #ifndef _BIG_ENDIAN
51423                  not big endian
51424                 #endif
51425 
51426   ;
51427   return 0;
51428 }
51429 _ACEOF
51430 if ac_fn_cxx_try_compile "$LINENO"; then :
51431   ac_cv_c_bigendian=yes
51432 else
51433   ac_cv_c_bigendian=no
51434 fi
51435 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51436 fi
51437 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51438     fi
51439     if test $ac_cv_c_bigendian = unknown; then
51440       # Compile a test program.
51441       if test "$cross_compiling" = yes; then :
51442   # Try to guess by grepping values from an object file.
51443          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51444 /* end confdefs.h.  */
51445 short int ascii_mm[] =
51446                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
51447                 short int ascii_ii[] =
51448                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
51449                 int use_ascii (int i) {
51450                   return ascii_mm[i] + ascii_ii[i];
51451                 }
51452                 short int ebcdic_ii[] =
51453                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
51454                 short int ebcdic_mm[] =
51455                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
51456                 int use_ebcdic (int i) {
51457                   return ebcdic_mm[i] + ebcdic_ii[i];
51458                 }
51459                 extern int foo;
51460 
51461 int
51462 main ()
51463 {
51464 return use_ascii (foo) == use_ebcdic (foo);
51465   ;
51466   return 0;
51467 }
51468 _ACEOF
51469 if ac_fn_cxx_try_compile "$LINENO"; then :
51470   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
51471               ac_cv_c_bigendian=yes
51472             fi
51473             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
51474               if test "$ac_cv_c_bigendian" = unknown; then
51475                 ac_cv_c_bigendian=no
51476               else
51477                 # finding both strings is unlikely to happen, but who knows?
51478                 ac_cv_c_bigendian=unknown
51479               fi
51480             fi
51481 fi
51482 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51483 else
51484   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51485 /* end confdefs.h.  */
51486 $ac_includes_default
51487 int
51488 main ()
51489 {
51490 
51491              /* Are we little or big endian?  From Harbison&Steele.  */
51492              union
51493              {
51494                long int l;
51495                char c[sizeof (long int)];
51496              } u;
51497              u.l = 1;
51498              return u.c[sizeof (long int) - 1] == 1;
51499 
51500   ;
51501   return 0;
51502 }
51503 _ACEOF
51504 if ac_fn_cxx_try_run "$LINENO"; then :
51505   ac_cv_c_bigendian=no
51506 else
51507   ac_cv_c_bigendian=yes
51508 fi
51509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
51510   conftest.$ac_objext conftest.beam conftest.$ac_ext
51511 fi
51512 
51513     fi
51514 fi
51515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
51516 $as_echo "$ac_cv_c_bigendian" >&6; }
51517  case $ac_cv_c_bigendian in #(
51518    yes)
51519      ENDIAN="big";; #(
51520    no)
51521      ENDIAN="little" ;; #(
51522    universal)
51523      ENDIAN="universal_endianness"
51524      ;; #(
51525    *)
51526      ENDIAN="unknown" ;;
51527  esac
51528 
51529 
51530   if test "x$ENDIAN" = xuniversal_endianness; then
51531     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
51532   fi
51533   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
51534     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
51535   fi
51536 
51537 
51538 # Configure flags for the tools
51539 
51540   ###############################################################################
51541   #
51542   # How to compile shared libraries.
51543   #
51544 
51545   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51546     PICFLAG="-fPIC"
51547     C_FLAG_REORDER=''
51548     CXX_FLAG_REORDER=''
51549 
51550     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51551       # Linking is different on MacOSX
51552       if test "x$STATIC_BUILD" = xtrue; then
51553         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
51554       else
51555         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
51556         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
51557       fi
51558       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
51559       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
51560       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
51561       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
51562     else
51563       # Default works for linux, might work on other platforms as well.
51564       SHARED_LIBRARY_FLAGS='-shared'
51565       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
51566       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
51567       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
51568       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
51569     fi
51570   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51571     C_FLAG_REORDER=''
51572     CXX_FLAG_REORDER=''
51573 
51574     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51575       # Linking is different on MacOSX
51576       PICFLAG=''
51577       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
51578       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
51579       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
51580       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
51581       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
51582 
51583       if test "x$STATIC_BUILD" = xfalse; then
51584         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
51585       fi
51586     else
51587       # Default works for linux, might work on other platforms as well.
51588       PICFLAG='-fPIC'
51589       SHARED_LIBRARY_FLAGS='-shared'
51590       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
51591       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
51592       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
51593 
51594       # arm specific settings
51595       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
51596         # '-Wl,-z,origin' isn't used on arm.
51597         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
51598       else
51599         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
51600       fi
51601 
51602     fi
51603   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51604     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51605       PICFLAG="-xcode=pic32"
51606     else
51607       PICFLAG="-KPIC"
51608     fi
51609     C_FLAG_REORDER='-xF'
51610     CXX_FLAG_REORDER='-xF'
51611     SHARED_LIBRARY_FLAGS="-G"
51612     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
51613     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
51614     SET_SHARED_LIBRARY_NAME='-h $1'
51615     SET_SHARED_LIBRARY_MAPFILE='-M$1'
51616   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51617     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
51618     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
51619     # will have to patch this single instruction with a call to some out-of-order code which
51620     # does the load from the TOC. This is of course slow. But in that case we also would have
51621     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
51622     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
51623     # can be patched directly by the linker and does not require a jump to out-of-order code.
51624     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
51625     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
51626     # loads for accessing a global variable). But there are rumors that this may be seen as a
51627     # 'performance feature' because of improved code locality of the symbols used in a
51628     # compilation unit.
51629     PICFLAG="-qpic"
51630     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
51631     C_FLAG_REORDER=''
51632     CXX_FLAG_REORDER=''
51633     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
51634     SET_EXECUTABLE_ORIGIN=""
51635     SET_SHARED_LIBRARY_ORIGIN=''
51636     SET_SHARED_LIBRARY_NAME=''
51637     SET_SHARED_LIBRARY_MAPFILE=''
51638   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51639     PICFLAG=""
51640     C_FLAG_REORDER=''
51641     CXX_FLAG_REORDER=''
51642     SHARED_LIBRARY_FLAGS="-dll"
51643     SET_EXECUTABLE_ORIGIN=''
51644     SET_SHARED_LIBRARY_ORIGIN=''
51645     SET_SHARED_LIBRARY_NAME=''
51646     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
51647   fi
51648 
51649 
51650 
51651 
51652 
51653 
51654 
51655 
51656 
51657   # The (cross) compiler is now configured, we can now test capabilities
51658   # of the target platform.
51659 
51660 
51661 
51662   ###############################################################################
51663   #
51664   # Setup the opt flags for different compilers
51665   # and different operating systems.
51666   #
51667 
51668   # FIXME: this was indirectly the old default, but just inherited.
51669   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51670   #   C_FLAG_DEPS="-MMD -MF"
51671   # fi
51672 
51673   # Generate make dependency files
51674   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51675     C_FLAG_DEPS="-MMD -MF"
51676   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51677     C_FLAG_DEPS="-MMD -MF"
51678   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51679     C_FLAG_DEPS="-xMMD -xMF"
51680   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51681     C_FLAG_DEPS="-qmakedep=gcc -MF"
51682   fi
51683   CXX_FLAG_DEPS="$C_FLAG_DEPS"
51684 
51685 
51686 
51687   # Debug symbols
51688   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51689     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
51690       # reduce from default "-g2" option to save space
51691       CFLAGS_DEBUG_SYMBOLS="-g1"
51692       CXXFLAGS_DEBUG_SYMBOLS="-g1"
51693     else
51694       CFLAGS_DEBUG_SYMBOLS="-g"
51695       CXXFLAGS_DEBUG_SYMBOLS="-g"
51696     fi
51697   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51698     CFLAGS_DEBUG_SYMBOLS="-g"
51699     CXXFLAGS_DEBUG_SYMBOLS="-g"
51700   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51701     CFLAGS_DEBUG_SYMBOLS="-g -xs"
51702     # -g0 enables debug symbols without disabling inlining.
51703     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
51704   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51705     CFLAGS_DEBUG_SYMBOLS="-g"
51706     CXXFLAGS_DEBUG_SYMBOLS="-g"
51707   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51708     CFLAGS_DEBUG_SYMBOLS="-Zi"
51709     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
51710   fi
51711 
51712 
51713 
51714   # Debug symbols for JVM_CFLAGS
51715   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51716     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
51717     if test "x$DEBUG_LEVEL" = xslowdebug; then
51718       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
51719     else
51720       # -g0 does not disable inlining, which -g does.
51721       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
51722     fi
51723   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51724     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
51725   else
51726     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
51727   fi
51728 
51729 
51730   # bounds, memory and behavior checking options
51731   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51732     case $DEBUG_LEVEL in
51733     release )
51734       # no adjustment
51735       ;;
51736     fastdebug )
51737       # no adjustment
51738       ;;
51739     slowdebug )
51740       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
51741       # get's added conditionally on whether we produce debug symbols or not.
51742       # This is most likely not really correct.
51743 
51744       # Add runtime stack smashing and undefined behavior checks.
51745       # Not all versions of gcc support -fstack-protector
51746       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
51747 
51748 
51749 
51750 
51751 
51752 
51753 
51754 
51755 
51756 
51757 
51758 
51759 
51760 
51761 
51762 
51763 
51764 
51765 
51766 
51767 
51768 
51769 
51770 
51771 
51772 
51773 
51774 
51775 
51776 
51777 
51778 
51779 
51780 
51781 
51782 
51783 
51784 
51785 
51786 
51787 
51788 
51789     # Execute function body
51790 
51791 
51792 
51793 
51794 
51795 
51796 
51797 
51798 
51799 
51800 
51801 
51802 
51803 
51804 
51805 
51806 
51807 
51808 
51809 
51810 
51811 
51812 
51813 
51814 
51815 
51816 
51817 
51818 
51819 
51820 
51821 
51822 
51823 
51824 
51825 
51826 
51827 
51828 
51829 
51830 
51831 
51832 
51833 
51834 
51835 
51836 
51837 
51838     # Execute function body
51839 
51840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
51841 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
51842   supports=yes
51843 
51844   saved_cflags="$CFLAGS"
51845   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
51846   ac_ext=c
51847 ac_cpp='$CPP $CPPFLAGS'
51848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
51851 
51852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51853 /* end confdefs.h.  */
51854 int i;
51855 _ACEOF
51856 if ac_fn_c_try_compile "$LINENO"; then :
51857 
51858 else
51859   supports=no
51860 fi
51861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51862   ac_ext=cpp
51863 ac_cpp='$CXXCPP $CPPFLAGS'
51864 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51865 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51866 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51867 
51868   CFLAGS="$saved_cflags"
51869 
51870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51871 $as_echo "$supports" >&6; }
51872   if test "x$supports" = "xyes" ; then
51873     :
51874     C_COMP_SUPPORTS="yes"
51875   else
51876     :
51877     C_COMP_SUPPORTS="no"
51878   fi
51879 
51880 
51881 
51882 
51883 
51884 
51885 
51886 
51887 
51888 
51889 
51890 
51891 
51892 
51893 
51894 
51895 
51896 
51897 
51898 
51899 
51900 
51901 
51902 
51903 
51904 
51905 
51906 
51907 
51908 
51909 
51910 
51911 
51912 
51913 
51914 
51915 
51916 
51917 
51918 
51919 
51920 
51921 
51922 
51923 
51924 
51925 
51926 
51927 
51928 
51929 
51930 
51931 
51932 
51933 
51934 
51935 
51936 
51937 
51938     # Execute function body
51939 
51940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
51941 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
51942   supports=yes
51943 
51944   saved_cxxflags="$CXXFLAGS"
51945   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
51946   ac_ext=cpp
51947 ac_cpp='$CXXCPP $CPPFLAGS'
51948 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51949 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51950 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51951 
51952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51953 /* end confdefs.h.  */
51954 int i;
51955 _ACEOF
51956 if ac_fn_cxx_try_compile "$LINENO"; then :
51957 
51958 else
51959   supports=no
51960 fi
51961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51962   ac_ext=cpp
51963 ac_cpp='$CXXCPP $CPPFLAGS'
51964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51965 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51967 
51968   CXXFLAGS="$saved_cxxflags"
51969 
51970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51971 $as_echo "$supports" >&6; }
51972   if test "x$supports" = "xyes" ; then
51973     :
51974     CXX_COMP_SUPPORTS="yes"
51975   else
51976     :
51977     CXX_COMP_SUPPORTS="no"
51978   fi
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991 
51992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
51993 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
51994   supports=no
51995   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51996 
51997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51998 $as_echo "$supports" >&6; }
51999   if test "x$supports" = "xyes" ; then
52000     :
52001 
52002   else
52003     :
52004     STACK_PROTECTOR_CFLAG=""
52005   fi
52006 
52007 
52008 
52009 
52010 
52011 
52012 
52013       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
52014       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
52015       if test "x$STACK_PROTECTOR_CFLAG" != x; then
52016         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
52017       fi
52018       ;;
52019     esac
52020   fi
52021 
52022   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52023     if test "x$DEBUG_LEVEL" != xrelease; then
52024       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52025         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
52026       fi
52027     fi
52028   fi
52029 
52030   # Optimization levels
52031   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52032     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
52033 
52034     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
52035       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
52036       C_O_FLAG_HIGHEST_JVM="-xO4"
52037       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
52038       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
52039       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
52040       C_O_FLAG_DEBUG="-xregs=no%frameptr"
52041       C_O_FLAG_DEBUG_JVM=""
52042       C_O_FLAG_NONE="-xregs=no%frameptr"
52043       CXX_O_FLAG_HIGHEST_JVM="-xO4"
52044       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
52045       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
52046       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
52047       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
52048       CXX_O_FLAG_DEBUG_JVM=""
52049       CXX_O_FLAG_NONE="-xregs=no%frameptr"
52050       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
52051         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
52052         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
52053       fi
52054     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
52055       C_O_FLAG_HIGHEST_JVM="-xO4"
52056       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
52057       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
52058       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
52059       C_O_FLAG_DEBUG=""
52060       C_O_FLAG_DEBUG_JVM=""
52061       C_O_FLAG_NONE=""
52062       CXX_O_FLAG_HIGHEST_JVM="-xO4"
52063       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
52064       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
52065       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
52066       CXX_O_FLAG_DEBUG=""
52067       CXX_O_FLAG_DEBUG_JVM=""
52068       CXX_O_FLAG_NONE=""
52069     fi
52070   else
52071     # The remaining toolchains share opt flags between CC and CXX;
52072     # setup for C and duplicate afterwards.
52073     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52074       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52075         # On MacOSX we optimize for size, something
52076         # we should do for all platforms?
52077         C_O_FLAG_HIGHEST_JVM="-Os"
52078         C_O_FLAG_HIGHEST="-Os"
52079         C_O_FLAG_HI="-Os"
52080         C_O_FLAG_NORM="-Os"
52081         C_O_FLAG_SIZE="-Os"
52082       else
52083         C_O_FLAG_HIGHEST_JVM="-O3"
52084         C_O_FLAG_HIGHEST="-O3"
52085         C_O_FLAG_HI="-O3"
52086         C_O_FLAG_NORM="-O2"
52087         C_O_FLAG_SIZE="-Os"
52088       fi
52089       C_O_FLAG_DEBUG="-O0"
52090       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52091         C_O_FLAG_DEBUG_JVM=""
52092       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52093         C_O_FLAG_DEBUG_JVM="-O0"
52094       fi
52095       C_O_FLAG_NONE="-O0"
52096     elif test "x$TOOLCHAIN_TYPE" = xclang; then
52097       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52098         # On MacOSX we optimize for size, something
52099         # we should do for all platforms?
52100         C_O_FLAG_HIGHEST_JVM="-Os"
52101         C_O_FLAG_HIGHEST="-Os"
52102         C_O_FLAG_HI="-Os"
52103         C_O_FLAG_NORM="-Os"
52104         C_O_FLAG_SIZE="-Os"
52105       else
52106         C_O_FLAG_HIGHEST_JVM="-O3"
52107         C_O_FLAG_HIGHEST="-O3"
52108         C_O_FLAG_HI="-O3"
52109         C_O_FLAG_NORM="-O2"
52110         C_O_FLAG_SIZE="-Os"
52111       fi
52112       C_O_FLAG_DEBUG="-O0"
52113       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52114         C_O_FLAG_DEBUG_JVM=""
52115       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
52116         C_O_FLAG_DEBUG_JVM="-O0"
52117       fi
52118       C_O_FLAG_NONE="-O0"
52119     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52120       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
52121       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
52122       C_O_FLAG_HI="-O3 -qinline -qinlglue"
52123       C_O_FLAG_NORM="-O2"
52124       C_O_FLAG_DEBUG="-qnoopt"
52125       # FIXME: Value below not verified.
52126       C_O_FLAG_DEBUG_JVM=""
52127       C_O_FLAG_NONE="-qnoopt"
52128     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52129       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
52130       C_O_FLAG_HIGHEST="-O2"
52131       C_O_FLAG_HI="-O1"
52132       C_O_FLAG_NORM="-O1"
52133       C_O_FLAG_DEBUG="-Od"
52134       C_O_FLAG_DEBUG_JVM=""
52135       C_O_FLAG_NONE="-Od"
52136       C_O_FLAG_SIZE="-Os"
52137     fi
52138     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
52139     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
52140     CXX_O_FLAG_HI="$C_O_FLAG_HI"
52141     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
52142     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
52143     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
52144     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
52145     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
52146   fi
52147 
52148   # Adjust optimization flags according to debug level.
52149   case $DEBUG_LEVEL in
52150     release )
52151       # no adjustment
52152       ;;
52153     fastdebug )
52154       # Not quite so much optimization
52155       C_O_FLAG_HI="$C_O_FLAG_NORM"
52156       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
52157       ;;
52158     slowdebug )
52159       # Disable optimization
52160       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
52161       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
52162       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
52163       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
52164       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
52165       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
52166       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
52167       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
52168       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
52169       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
52170       ;;
52171   esac
52172 
52173 
52174 
52175 
52176 
52177 
52178 
52179 
52180 
52181 
52182 
52183 
52184 
52185 
52186 
52187 
52188 
52189 
52190 
52191 
52192 # Check whether --with-abi-profile was given.
52193 if test "${with_abi_profile+set}" = set; then :
52194   withval=$with_abi_profile;
52195 fi
52196 
52197 
52198   if test "x$with_abi_profile" != x; then
52199     if test "x$OPENJDK_TARGET_CPU" != xarm && \
52200         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
52201       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
52202     fi
52203 
52204     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
52205     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
52206 $as_echo_n "checking for ABI profle... " >&6; }
52207     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
52208 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
52209 
52210     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
52211       ARM_FLOAT_TYPE=vfp-sflt
52212       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
52213     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
52214       ARM_FLOAT_TYPE=vfp-hflt
52215       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
52216     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
52217       ARM_FLOAT_TYPE=sflt
52218       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
52219     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
52220       ARM_FLOAT_TYPE=vfp-sflt
52221       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
52222     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
52223       ARM_FLOAT_TYPE=vfp-hflt
52224       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
52225     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
52226       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
52227       ARM_FLOAT_TYPE=
52228       ARM_ARCH_TYPE_FLAGS=
52229     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
52230       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
52231       ARM_FLOAT_TYPE=
52232       ARM_ARCH_TYPE_FLAGS=
52233     else
52234       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
52235     fi
52236 
52237     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
52238       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
52239     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
52240       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
52241     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
52242       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
52243     fi
52244     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
52245 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
52246     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
52247 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
52248 
52249     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
52250 $as_echo_n "checking for arch type flags... " >&6; }
52251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
52252 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
52253 
52254     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
52255     # autoconf target triplet.
52256      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
52257     # Sanity check that it is a known ABI.
52258     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
52259         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
52260         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
52261           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
52262 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
52263     fi
52264     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
52265 $as_echo_n "checking for ABI property name... " >&6; }
52266     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
52267 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
52268 
52269 
52270     # Pass these on to the open part of configure as if they were set using
52271     # --with-extra-c[xx]flags.
52272     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
52273     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
52274     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
52275     # FIXME: This should not really be set using extra_cflags.
52276     if test "x$OPENJDK_TARGET_CPU" = xarm; then
52277         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
52278         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
52279     fi
52280     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
52281     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
52282     # And pass the architecture flags to the linker as well
52283     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
52284   fi
52285 
52286   # When building with an abi profile, the name of that profile is appended on the
52287   # bundle platform, which is used in bundle names.
52288   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
52289     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
52290   fi
52291 
52292 
52293   # Optional POSIX functionality needed by the JVM
52294   #
52295   # Check if clock_gettime is available and in which library. This indicates
52296   # availability of CLOCK_MONOTONIC for hotspot. But we don't need to link, so
52297   # don't let it update LIBS.
52298   save_LIBS="$LIBS"
52299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
52300 $as_echo_n "checking for library containing clock_gettime... " >&6; }
52301 if ${ac_cv_search_clock_gettime+:} false; then :
52302   $as_echo_n "(cached) " >&6
52303 else
52304   ac_func_search_save_LIBS=$LIBS
52305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52306 /* end confdefs.h.  */
52307 
52308 /* Override any GCC internal prototype to avoid an error.
52309    Use char because int might match the return type of a GCC
52310    builtin and then its argument prototype would still apply.  */
52311 #ifdef __cplusplus
52312 extern "C"
52313 #endif
52314 char clock_gettime ();
52315 int
52316 main ()
52317 {
52318 return clock_gettime ();
52319   ;
52320   return 0;
52321 }
52322 _ACEOF
52323 for ac_lib in '' rt; do
52324   if test -z "$ac_lib"; then
52325     ac_res="none required"
52326   else
52327     ac_res=-l$ac_lib
52328     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
52329   fi
52330   if ac_fn_cxx_try_link "$LINENO"; then :
52331   ac_cv_search_clock_gettime=$ac_res
52332 fi
52333 rm -f core conftest.err conftest.$ac_objext \
52334     conftest$ac_exeext
52335   if ${ac_cv_search_clock_gettime+:} false; then :
52336   break
52337 fi
52338 done
52339 if ${ac_cv_search_clock_gettime+:} false; then :
52340 
52341 else
52342   ac_cv_search_clock_gettime=no
52343 fi
52344 rm conftest.$ac_ext
52345 LIBS=$ac_func_search_save_LIBS
52346 fi
52347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
52348 $as_echo "$ac_cv_search_clock_gettime" >&6; }
52349 ac_res=$ac_cv_search_clock_gettime
52350 if test "$ac_res" != no; then :
52351   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
52352   HAS_CLOCK_GETTIME=true
52353 fi
52354 
52355   if test "x$LIBS" = "x-lrt "; then
52356     CLOCK_GETTIME_IN_LIBRT=true
52357   fi
52358   LIBS="$save_LIBS"
52359 
52360 
52361   # Special extras...
52362   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52363     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
52364       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52365       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
52366     fi
52367     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52368     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
52369   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52370     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52371     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
52372   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52373     CXXSTD_CXXFLAG="-std=gnu++98"
52374 
52375 
52376 
52377 
52378 
52379 
52380 
52381 
52382 
52383 
52384 
52385 
52386 
52387 
52388 
52389 
52390 
52391 
52392 
52393 
52394 
52395 
52396 
52397 
52398 
52399 
52400 
52401 
52402 
52403 
52404 
52405 
52406 
52407 
52408 
52409 
52410 
52411 
52412 
52413 
52414 
52415 
52416     # Execute function body
52417 
52418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
52419 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
52420   supports=yes
52421 
52422   saved_cxxflags="$CXXFLAGS"
52423   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
52424   ac_ext=cpp
52425 ac_cpp='$CXXCPP $CPPFLAGS'
52426 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52427 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52428 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52429 
52430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52431 /* end confdefs.h.  */
52432 int i;
52433 _ACEOF
52434 if ac_fn_cxx_try_compile "$LINENO"; then :
52435 
52436 else
52437   supports=no
52438 fi
52439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52440   ac_ext=cpp
52441 ac_cpp='$CXXCPP $CPPFLAGS'
52442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52445 
52446   CXXFLAGS="$saved_cxxflags"
52447 
52448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52449 $as_echo "$supports" >&6; }
52450   if test "x$supports" = "xyes" ; then
52451     :
52452 
52453   else
52454     :
52455     CXXSTD_CXXFLAG=""
52456   fi
52457 
52458 
52459 
52460 
52461 
52462 
52463 
52464 
52465 
52466 
52467 
52468 
52469     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
52470     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
52471 
52472   fi
52473   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52474     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
52475     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
52476   fi
52477 
52478   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
52479   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
52480   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
52481 
52482   ###############################################################################
52483   #
52484   # Now setup the CFLAGS and LDFLAGS for the JDK build.
52485   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52486   #
52487 
52488   # Setup compiler/platform specific flags into
52489   #    CFLAGS_JDK    - C Compiler flags
52490   #    CXXFLAGS_JDK  - C++ Compiler flags
52491   #    COMMON_CCXXFLAGS_JDK - common to C and C++
52492   if test "x$TOOLCHAIN_TYPE" = xgcc; then
52493     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
52494     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
52495     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
52496     if test "x$OPENJDK_TARGET_CPU" = xx86; then
52497       # Force compatibility with i586 on 32 bit intel platforms.
52498       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
52499       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
52500     fi
52501     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52502         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52503     case $OPENJDK_TARGET_CPU_ARCH in
52504       arm )
52505         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52506         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52507         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
52508         ;;
52509       ppc )
52510         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52511         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52512         ;;
52513       s390 )
52514         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52515         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52516         ;;
52517       * )
52518         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52519         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52520         ;;
52521     esac
52522 
52523 
52524 
52525 
52526 
52527 
52528 
52529 
52530 
52531 
52532 
52533 
52534 
52535 
52536 
52537 
52538 
52539 
52540 
52541 
52542 
52543 
52544 
52545 
52546 
52547 
52548 
52549 
52550 
52551 
52552 
52553 
52554 
52555 
52556 
52557 
52558 
52559 
52560 
52561 
52562 
52563 
52564 
52565 
52566 
52567 
52568 
52569 
52570 
52571 
52572 
52573 
52574 
52575 
52576     # Execute function body
52577 
52578   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52579   REFERENCE_VERSION=6
52580 
52581   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52582     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52583   fi
52584 
52585   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52586     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52587   fi
52588 
52589   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52590   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52591 
52592   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52593     :
52594 
52595   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52596   # runs afoul of the more aggressive versions of these optimisations.
52597   # Notably, value range propagation now assumes that the this pointer of C++
52598   # member functions is non-null.
52599   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52600         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52601         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52602 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52603   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52604   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52605 
52606   else
52607     :
52608 
52609   fi
52610 
52611 
52612 
52613 
52614 
52615 
52616 
52617 
52618 
52619 
52620 
52621 
52622 
52623 
52624   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52625     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
52626 
52627     # Restrict the debug information created by Clang to avoid
52628     # too big object files and speed the build up a little bit
52629     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52630     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
52631     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52632       if test "x$OPENJDK_TARGET_CPU" = xx86; then
52633         # Force compatibility with i586 on 32 bit intel platforms.
52634         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
52635         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
52636       fi
52637       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
52638       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52639           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52640       case $OPENJDK_TARGET_CPU_ARCH in
52641         ppc )
52642           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52643           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52644           ;;
52645         * )
52646           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52647           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
52648           ;;
52649       esac
52650     fi
52651   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52652     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
52653     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52654     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
52655       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
52656     fi
52657 
52658     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52659     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52660   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52661     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
52662     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52663     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52664   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52665     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
52666         -MD -Zc:wchar_t- -W3 -wd4800 \
52667         -DWIN32_LEAN_AND_MEAN \
52668         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52669         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52670         -DWIN32 -DIAL"
52671     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
52672       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52673     else
52674       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52675     fi
52676     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52677     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52678     # studio.
52679     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52680       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52681       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52682       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52683     fi
52684   fi
52685 
52686   ###############################################################################
52687 
52688   # Adjust flags according to debug level.
52689   case $DEBUG_LEVEL in
52690     fastdebug | slowdebug )
52691       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52692       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52693       ;;
52694     release )
52695       ;;
52696     * )
52697       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52698       ;;
52699   esac
52700 
52701   # Set some common defines. These works for all compilers, but assume
52702   # -D is universally accepted.
52703 
52704   # Setup endianness
52705   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
52706     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52707     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52708     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52709     #   Note: -Dmacro         is the same as    #define macro 1
52710     #         -Dmacro=        is the same as    #define macro
52711     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52712       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52713     else
52714       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52715     fi
52716   else
52717     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52718     # are defined in the system?
52719     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52720       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52721     else
52722       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52723     fi
52724   fi
52725 
52726   # Always enable optional macros for VM.
52727   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_FORMAT_MACROS"
52728   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_LIMIT_MACROS"
52729   JVM_CFLAGS="$JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
52730 
52731   # Setup target OS define. Use OS target name but in upper case.
52732   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52733   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
52734 
52735   # Setup target CPU
52736   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52737       $OPENJDK_TARGET_ADD_LP64 \
52738       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
52739 
52740   # Setup debug/release defines
52741   if test "x$DEBUG_LEVEL" = xrelease; then
52742     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
52743     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
52744       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
52745     fi
52746   else
52747     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
52748   fi
52749 
52750   # Optional POSIX functionality needed by the VM
52751 
52752   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
52753     JVM_CFLAGS="$JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
52754     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
52755       JVM_CFLAGS="$JVM_CFLAGS -DNEEDS_LIBRT"
52756     fi
52757   fi
52758 
52759 
52760   # Set some additional per-OS defines.
52761   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52762     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
52763     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52764         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52765   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
52766     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
52767     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
52768         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
52769   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52770     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52771     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
52772     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52773     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52774         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52775         -fno-omit-frame-pointer"
52776   elif test "x$OPENJDK_TARGET_OS" = xaix; then
52777     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
52778     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
52779         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52780         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52781     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52782     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
52783     # so for slowdebug we build with '-qpic=large -bbigtoc'.
52784     if test "x$DEBUG_LEVEL" = xslowdebug; then
52785       JVM_CFLAGS="$JVM_CFLAGS -qpic=large"
52786     fi
52787   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
52788     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52789   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
52790     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52791     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
52792   fi
52793 
52794   # Set some additional per-CPU defines.
52795   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
52796     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
52797   elif test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xsolaris-sparcv9; then
52798     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
52799   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
52800     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52801       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52802       # fixes `relocation truncated to fit' error for gcc 4.1.
52803       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
52804       # Use ppc64 instructions, but schedule for power5
52805       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52806     elif test "x$OPENJDK_TARGET_OS" = xaix; then
52807       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
52808     fi
52809   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
52810     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52811       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52812       # Little endian machine uses ELFv2 ABI.
52813       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
52814       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52815       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
52816     fi
52817   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
52818     if test "x$OPENJDK_TARGET_OS" = xlinux; then
52819       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
52820     fi
52821   fi
52822 
52823   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
52824     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52825   fi
52826 
52827   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
52828     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
52829       # Solaris does not have _LP64=1 in the old build.
52830       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52831       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
52832     fi
52833   fi
52834 
52835   # Set JVM_CFLAGS warning handling
52836   if test "x$OPENJDK_TARGET_OS" = xlinux; then
52837     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52838         -Wunused-value -Woverloaded-virtual"
52839 
52840     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52841 
52842 
52843 
52844 
52845 
52846 
52847 
52848 
52849 
52850 
52851 
52852 
52853 
52854 
52855 
52856 
52857 
52858 
52859 
52860 
52861 
52862 
52863 
52864 
52865 
52866 
52867 
52868 
52869 
52870 
52871 
52872 
52873 
52874 
52875 
52876 
52877 
52878 
52879 
52880 
52881 
52882 
52883 
52884 
52885 
52886 
52887 
52888 
52889 
52890 
52891 
52892 
52893 
52894 
52895     # Execute function body
52896 
52897   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52898   REFERENCE_VERSION=4.8
52899 
52900   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52901     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52902   fi
52903 
52904   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52905     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52906   fi
52907 
52908   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52909   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52910 
52911   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52912     :
52913 
52914             # These flags either do not work or give spurious warnings prior to gcc 4.8.
52915             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52916 
52917 
52918   else
52919     :
52920 
52921   fi
52922 
52923 
52924 
52925 
52926 
52927 
52928 
52929 
52930 
52931 
52932 
52933 
52934 
52935 
52936     fi
52937     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
52938       # Non-zero builds have stricter warnings
52939       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52940     else
52941       if test "x$TOOLCHAIN_TYPE" = xclang; then
52942         # Some versions of llvm do not like -Wundef
52943         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
52944       fi
52945     fi
52946   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
52947     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52948         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52949   fi
52950 
52951   # Additional macosx handling
52952   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
52953     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
52954     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
52955     # JDK can be built and makes the linked binaries compatible even if built on
52956     # a newer version of the OS.
52957     MACOSX_VERSION_MIN=10.7.0
52958 
52959 
52960     # Setting --with-macosx-version-max=<version> makes it an error to build or
52961     # link to macosx APIs that are newer than the given OS version. The expected
52962     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
52963 
52964 # Check whether --with-macosx-version-max was given.
52965 if test "${with_macosx_version_max+set}" = set; then :
52966   withval=$with_macosx_version_max;
52967           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
52968               MACOSX_VERSION_MAX=$with_macosx_version_max
52969           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
52970               MACOSX_VERSION_MAX=$with_macosx_version_max
52971           elif test "x$with_macosx_version_max" = "xno"; then
52972               # Use build system default
52973               MACOSX_VERSION_MAX=
52974           else
52975               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
52976           fi
52977 
52978 else
52979   MACOSX_VERSION_MAX=
52980 
52981 fi
52982 
52983 
52984 
52985     # Let the flags variables get resolved in make for easier override on make
52986     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
52987     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52988         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52989         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52990     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52991     JVM_CFLAGS="$JVM_CFLAGS \
52992         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
52993         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52994 
52995     if test -n "$MACOSX_VERSION_MAX"; then
52996         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
52997             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
52998         JVM_CFLAGS="$JVM_CFLAGS \
52999             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
53000     fi
53001   fi
53002 
53003   # Setup some hard coded includes
53004   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
53005       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
53006       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
53007       -I${TOPDIR}/src/java.base/share/native/libjava \
53008       -I${TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava \
53009       -I${TOPDIR}/src/hotspot/share/include \
53010       -I${TOPDIR}/src/hotspot/os/${HOTSPOT_TARGET_OS_TYPE}/include"
53011 
53012   # The shared libraries are compiled using the picflag.
53013   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
53014       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
53015   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
53016       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
53017 
53018   # Executable flags
53019   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
53020   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
53021 
53022 
53023 
53024 
53025 
53026 
53027   # Setup LDFLAGS et al.
53028   #
53029 
53030   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53031     LDFLAGS_MICROSOFT="-nologo -opt:ref"
53032     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
53033     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
53034     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
53035       LDFLAGS_SAFESH="-safeseh"
53036       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
53037       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
53038       # NOTE: Old build added -machine. Probably not needed.
53039       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
53040     else
53041       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
53042     fi
53043   elif test "x$TOOLCHAIN_TYPE" = xclang; then
53044       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
53045       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
53046         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
53047         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
53048     fi
53049   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
53050     # If this is a --hash-style=gnu system, use --hash-style=both, why?
53051     # We have previously set HAS_GNU_HASH if this is the case
53052     if test -n "$HAS_GNU_HASH"; then
53053       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
53054       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
53055       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
53056     fi
53057       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
53058         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
53059     fi
53060     if test "x$OPENJDK_TARGET_OS" = xlinux; then
53061       # And since we now know that the linker is gnu, then add -z defs, to forbid
53062       # undefined symbols in object files.
53063       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
53064       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
53065       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
53066       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
53067       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
53068       if test "x$OPENJDK_TARGET_CPU" = xx86; then
53069         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
53070       fi
53071       case $DEBUG_LEVEL in
53072         release )
53073           # tell linker to optimize libraries.
53074           # Should this be supplied to the OSS linker as well?
53075           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
53076           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
53077           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
53078           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53079             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
53080           fi
53081           ;;
53082         slowdebug )
53083           # Hotspot always let the linker optimize
53084           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
53085           if test "x$HAS_LINKER_NOW" = "xtrue"; then
53086             # do relocations at load
53087             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
53088             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
53089             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
53090           fi
53091           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53092             # mark relocations read only
53093             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
53094             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
53095             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
53096           fi
53097           ;;
53098         fastdebug )
53099           # Hotspot always let the linker optimize
53100           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
53101           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53102             # mark relocations read only
53103             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
53104             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
53105             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
53106           fi
53107           ;;
53108         * )
53109           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
53110           ;;
53111         esac
53112     fi
53113   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53114     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
53115     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
53116     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
53117     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
53118     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
53119     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
53120       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
53121     fi
53122   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
53123     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
53124     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
53125     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
53126     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
53127     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
53128     # so for slowdebug we build with '-qpic=large -bbigtoc'.
53129     if test "x$DEBUG_LEVEL" = xslowdebug; then
53130       JVM_LDFLAGS="$JVM_LDFLAGS -bbigtoc"
53131     fi
53132   fi
53133 
53134   # Customize LDFLAGS for executables
53135 
53136   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
53137 
53138   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53139     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
53140       LDFLAGS_STACK_SIZE=1048576
53141     else
53142       LDFLAGS_STACK_SIZE=327680
53143     fi
53144     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
53145   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
53146     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
53147   fi
53148 
53149   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
53150 
53151   # Customize LDFLAGS for libs
53152   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
53153 
53154   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
53155   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
53156   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53157     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
53158         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
53159     JDKLIB_LIBS=""
53160   else
53161     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
53162         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
53163 
53164     if test "xTARGET" = "xTARGET"; then
53165       # On some platforms (mac) the linker warns about non existing -L dirs.
53166       # For any of the variants server, client or minimal, the dir matches the
53167       # variant name. The "main" variant should be used for linking. For the
53168       # rest, the dir is just server.
53169       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
53170           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
53171         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
53172             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
53173       else
53174         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
53175             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
53176       fi
53177     elif test "xTARGET" = "xBUILD"; then
53178       # When building a buildjdk, it's always only the server variant
53179       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
53180           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
53181     fi
53182 
53183     JDKLIB_LIBS="-ljava -ljvm"
53184     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53185       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
53186     fi
53187 
53188   fi
53189 
53190 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
53191 
53192   # Set JVM_LIBS (per os)
53193   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53194     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
53195   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
53196     # FIXME: This hard-coded path is not really proper.
53197     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
53198       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
53199     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
53200       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
53201     fi
53202     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
53203         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
53204   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
53205     JVM_LIBS="$JVM_LIBS -lm"
53206   elif test "x$OPENJDK_TARGET_OS" = xaix; then
53207     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
53208   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
53209     JVM_LIBS="$JVM_LIBS -lm"
53210   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
53211     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
53212         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
53213         wsock32.lib winmm.lib version.lib psapi.lib"
53214     fi
53215 
53216   # Set JVM_ASFLAGS
53217   if test "x$OPENJDK_TARGET_OS" = xlinux; then
53218     if test "x$OPENJDK_TARGET_CPU" = xx86; then
53219       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
53220     fi
53221   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
53222     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
53223   fi
53224 
53225   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
53226 
53227 
53228 
53229 
53230 
53231 
53232 
53233 
53234 
53235 
53236 
53237 
53238 
53239 
53240 
53241 
53242   # Special extras...
53243   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53244     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
53245       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
53246       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
53247     fi
53248     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
53249     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
53250   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
53251     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
53252     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
53253   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
53254     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
53255 
53256 
53257 
53258 
53259 
53260 
53261 
53262 
53263 
53264 
53265 
53266 
53267 
53268 
53269 
53270 
53271 
53272 
53273 
53274 
53275 
53276 
53277 
53278 
53279 
53280 
53281 
53282 
53283 
53284 
53285 
53286 
53287 
53288 
53289 
53290 
53291 
53292 
53293 
53294 
53295 
53296 
53297     # Execute function body
53298 
53299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
53300 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
53301   supports=yes
53302 
53303   saved_cxxflags="$CXXFLAGS"
53304   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
53305   ac_ext=cpp
53306 ac_cpp='$CXXCPP $CPPFLAGS'
53307 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53308 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53309 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53310 
53311   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53312 /* end confdefs.h.  */
53313 int i;
53314 _ACEOF
53315 if ac_fn_cxx_try_compile "$LINENO"; then :
53316 
53317 else
53318   supports=no
53319 fi
53320 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53321   ac_ext=cpp
53322 ac_cpp='$CXXCPP $CPPFLAGS'
53323 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53324 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53325 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53326 
53327   CXXFLAGS="$saved_cxxflags"
53328 
53329   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53330 $as_echo "$supports" >&6; }
53331   if test "x$supports" = "xyes" ; then
53332     :
53333 
53334   else
53335     :
53336     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
53337   fi
53338 
53339 
53340 
53341 
53342 
53343 
53344 
53345 
53346 
53347 
53348 
53349 
53350     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
53351     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
53352 
53353   fi
53354   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
53355     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
53356     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
53357   fi
53358 
53359   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
53360   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
53361   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
53362 
53363   ###############################################################################
53364   #
53365   # Now setup the CFLAGS and LDFLAGS for the JDK build.
53366   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
53367   #
53368 
53369   # Setup compiler/platform specific flags into
53370   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
53371   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
53372   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
53373   if test "x$TOOLCHAIN_TYPE" = xgcc; then
53374     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
53375     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
53376     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
53377     if test "x$OPENJDK_BUILD_CPU" = xx86; then
53378       # Force compatibility with i586 on 32 bit intel platforms.
53379       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
53380       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
53381     fi
53382     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
53383         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
53384     case $OPENJDK_BUILD_CPU_ARCH in
53385       arm )
53386         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
53387         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53388         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
53389         ;;
53390       ppc )
53391         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
53392         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53393         ;;
53394       s390 )
53395         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
53396         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53397         ;;
53398       * )
53399         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
53400         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53401         ;;
53402     esac
53403 
53404 
53405 
53406 
53407 
53408 
53409 
53410 
53411 
53412 
53413 
53414 
53415 
53416 
53417 
53418 
53419 
53420 
53421 
53422 
53423 
53424 
53425 
53426 
53427 
53428 
53429 
53430 
53431 
53432 
53433 
53434 
53435 
53436 
53437 
53438 
53439 
53440 
53441 
53442 
53443 
53444 
53445 
53446 
53447 
53448 
53449 
53450 
53451 
53452 
53453 
53454 
53455 
53456 
53457     # Execute function body
53458 
53459   # Need to assign to a variable since m4 is blocked from modifying parts in [].
53460   REFERENCE_VERSION=6
53461 
53462   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
53463     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
53464   fi
53465 
53466   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
53467     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
53468   fi
53469 
53470   # Version comparison method inspired by http://stackoverflow.com/a/24067243
53471   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
53472 
53473   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
53474     :
53475 
53476   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
53477   # runs afoul of the more aggressive versions of these optimisations.
53478   # Notably, value range propagation now assumes that the this pointer of C++
53479   # member functions is non-null.
53480   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
53481         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
53482         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
53483 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
53484   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
53485   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
53486 
53487   else
53488     :
53489 
53490   fi
53491 
53492 
53493 
53494 
53495 
53496 
53497 
53498 
53499 
53500 
53501 
53502 
53503 
53504 
53505   elif test "x$TOOLCHAIN_TYPE" = xclang; then
53506     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
53507 
53508     # Restrict the debug information created by Clang to avoid
53509     # too big object files and speed the build up a little bit
53510     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
53511     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
53512     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53513       if test "x$OPENJDK_BUILD_CPU" = xx86; then
53514         # Force compatibility with i586 on 32 bit intel platforms.
53515         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
53516         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
53517       fi
53518       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
53519       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
53520           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
53521       case $OPENJDK_BUILD_CPU_ARCH in
53522         ppc )
53523           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
53524           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53525           ;;
53526         * )
53527           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
53528           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
53529           ;;
53530       esac
53531     fi
53532   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53533     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
53534     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
53535     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
53536       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
53537     fi
53538 
53539     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
53540     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
53541   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
53542     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
53543     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
53544     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
53545   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53546     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53547         -MD -Zc:wchar_t- -W3 -wd4800 \
53548         -DWIN32_LEAN_AND_MEAN \
53549         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
53550         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
53551         -DWIN32 -DIAL"
53552     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
53553       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
53554     else
53555       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
53556     fi
53557     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
53558     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
53559     # studio.
53560     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
53561       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
53562       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
53563       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
53564     fi
53565   fi
53566 
53567   ###############################################################################
53568 
53569   # Adjust flags according to debug level.
53570   case $DEBUG_LEVEL in
53571     fastdebug | slowdebug )
53572       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
53573       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
53574       ;;
53575     release )
53576       ;;
53577     * )
53578       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
53579       ;;
53580   esac
53581 
53582   # Set some common defines. These works for all compilers, but assume
53583   # -D is universally accepted.
53584 
53585   # Setup endianness
53586   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
53587     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
53588     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
53589     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
53590     #   Note: -Dmacro         is the same as    #define macro 1
53591     #         -Dmacro=        is the same as    #define macro
53592     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
53593       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
53594     else
53595       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
53596     fi
53597   else
53598     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
53599     # are defined in the system?
53600     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
53601       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
53602     else
53603       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
53604     fi
53605   fi
53606 
53607   # Always enable optional macros for VM.
53608   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_FORMAT_MACROS"
53609   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_LIMIT_MACROS"
53610   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D__STDC_CONSTANT_MACROS"
53611 
53612   # Setup target OS define. Use OS target name but in upper case.
53613   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
53614   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
53615 
53616   # Setup target CPU
53617   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53618       $OPENJDK_BUILD_ADD_LP64 \
53619       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
53620 
53621   # Setup debug/release defines
53622   if test "x$DEBUG_LEVEL" = xrelease; then
53623     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
53624     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
53625       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
53626     fi
53627   else
53628     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
53629   fi
53630 
53631   # Optional POSIX functionality needed by the VM
53632 
53633   if test "x$HAS_CLOCK_GETTIME" = "xtrue"; then
53634     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSUPPORTS_CLOCK_MONOTONIC"
53635     if test "x$CLOCK_GETTIME_IN_LIBRT" = "xtrue"; then
53636       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DNEEDS_LIBRT"
53637     fi
53638   fi
53639 
53640 
53641   # Set some additional per-OS defines.
53642   if test "x$OPENJDK_BUILD_OS" = xlinux; then
53643     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
53644     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
53645         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
53646   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
53647     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
53648     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
53649         -D_Crun_inline_placement -library=stlport4 $PICFLAG -mt -features=no%except"
53650   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
53651     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
53652     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
53653     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
53654     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
53655         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
53656         -fno-omit-frame-pointer"
53657   elif test "x$OPENJDK_BUILD_OS" = xaix; then
53658     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
53659     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
53660         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
53661         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
53662     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
53663     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
53664     # so for slowdebug we build with '-qpic=large -bbigtoc'.
53665     if test "x$DEBUG_LEVEL" = xslowdebug; then
53666       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qpic=large"
53667     fi
53668   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
53669     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
53670   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
53671     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
53672     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
53673   fi
53674 
53675   # Set some additional per-CPU defines.
53676   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
53677     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
53678   elif test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xsolaris-sparcv9; then
53679     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
53680   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
53681     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53682       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
53683       # fixes `relocation truncated to fit' error for gcc 4.1.
53684       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
53685       # Use ppc64 instructions, but schedule for power5
53686       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
53687     elif test "x$OPENJDK_BUILD_OS" = xaix; then
53688       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
53689     fi
53690   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
53691     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53692       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
53693       # Little endian machine uses ELFv2 ABI.
53694       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
53695       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
53696       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
53697     fi
53698   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
53699     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53700       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
53701     fi
53702   fi
53703 
53704   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
53705     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
53706   fi
53707 
53708   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
53709     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
53710       # Solaris does not have _LP64=1 in the old build.
53711       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
53712       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
53713     fi
53714   fi
53715 
53716   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
53717   if test "x$OPENJDK_BUILD_OS" = xlinux; then
53718     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
53719         -Wunused-value -Woverloaded-virtual"
53720 
53721     if test "x$TOOLCHAIN_TYPE" = xgcc; then
53722 
53723 
53724 
53725 
53726 
53727 
53728 
53729 
53730 
53731 
53732 
53733 
53734 
53735 
53736 
53737 
53738 
53739 
53740 
53741 
53742 
53743 
53744 
53745 
53746 
53747 
53748 
53749 
53750 
53751 
53752 
53753 
53754 
53755 
53756 
53757 
53758 
53759 
53760 
53761 
53762 
53763 
53764 
53765 
53766 
53767 
53768 
53769 
53770 
53771 
53772 
53773 
53774 
53775 
53776     # Execute function body
53777 
53778   # Need to assign to a variable since m4 is blocked from modifying parts in [].
53779   REFERENCE_VERSION=4.8
53780 
53781   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
53782     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
53783   fi
53784 
53785   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
53786     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
53787   fi
53788 
53789   # Version comparison method inspired by http://stackoverflow.com/a/24067243
53790   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
53791 
53792   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
53793     :
53794 
53795             # These flags either do not work or give spurious warnings prior to gcc 4.8.
53796             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
53797 
53798 
53799   else
53800     :
53801 
53802   fi
53803 
53804 
53805 
53806 
53807 
53808 
53809 
53810 
53811 
53812 
53813 
53814 
53815 
53816 
53817     fi
53818     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
53819       # Non-zero builds have stricter warnings
53820       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
53821     else
53822       if test "x$TOOLCHAIN_TYPE" = xclang; then
53823         # Some versions of llvm do not like -Wundef
53824         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
53825       fi
53826     fi
53827   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
53828     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
53829         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
53830   fi
53831 
53832   # Additional macosx handling
53833   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
53834     # MACOSX_VERSION_MIN is the c++ and ld is -mmacosx-version-min argument. The expected
53835     # format is X.Y.Z. It's hard-coded to the minimum OSX version on which the
53836     # JDK can be built and makes the linked binaries compatible even if built on
53837     # a newer version of the OS.
53838     MACOSX_VERSION_MIN=10.7.0
53839 
53840 
53841     # Setting --with-macosx-version-max=<version> makes it an error to build or
53842     # link to macosx APIs that are newer than the given OS version. The expected
53843     # format for <version> is either nn.n.n or nn.nn.nn. See /usr/include/AvailabilityMacros.h.
53844 
53845 # Check whether --with-macosx-version-max was given.
53846 if test "${with_macosx_version_max+set}" = set; then :
53847   withval=$with_macosx_version_max;
53848           if echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9]\.[0-9]\$"; then
53849               MACOSX_VERSION_MAX=$with_macosx_version_max
53850           elif echo "$with_macosx_version_max" | $GREP -q "^[0-9][0-9]\.[0-9][0-9]\.[0-9][0-9]\$"; then
53851               MACOSX_VERSION_MAX=$with_macosx_version_max
53852           elif test "x$with_macosx_version_max" = "xno"; then
53853               # Use build system default
53854               MACOSX_VERSION_MAX=
53855           else
53856               as_fn_error $? "osx version format must be nn.n.n or nn.nn.nn" "$LINENO" 5
53857           fi
53858 
53859 else
53860   MACOSX_VERSION_MAX=
53861 
53862 fi
53863 
53864 
53865 
53866     # Let the flags variables get resolved in make for easier override on make
53867     # command line. AvailabilityMacros.h versions have no dots, ex: 1070.
53868     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53869         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
53870         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
53871     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
53872     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
53873         -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(subst .,,\$(MACOSX_VERSION_MIN)) \
53874         -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
53875 
53876     if test -n "$MACOSX_VERSION_MAX"; then
53877         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53878             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
53879         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS \
53880             -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MAX))"
53881     fi
53882   fi
53883 
53884   # Setup some hard coded includes
53885   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53886       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
53887       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base/\$(OPENJDK_TARGET_OS_INCLUDE_SUBDIR) \
53888       -I${TOPDIR}/src/java.base/share/native/libjava \
53889       -I${TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava \
53890       -I${TOPDIR}/src/hotspot/share/include \
53891       -I${TOPDIR}/src/hotspot/os/${HOTSPOT_BUILD_OS_TYPE}/include"
53892 
53893   # The shared libraries are compiled using the picflag.
53894   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53895       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
53896   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
53897       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
53898 
53899   # Executable flags
53900   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
53901   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
53902 
53903 
53904 
53905 
53906 
53907 
53908   # Setup LDFLAGS et al.
53909   #
53910 
53911   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
53912     LDFLAGS_MICROSOFT="-nologo -opt:ref"
53913     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
53914     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
53915     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
53916       LDFLAGS_SAFESH="-safeseh"
53917       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
53918       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
53919       # NOTE: Old build added -machine. Probably not needed.
53920       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
53921     else
53922       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
53923     fi
53924   elif test "x$TOOLCHAIN_TYPE" = xclang; then
53925       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
53926       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
53927         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
53928         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
53929     fi
53930   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
53931     # If this is a --hash-style=gnu system, use --hash-style=both, why?
53932     # We have previously set HAS_GNU_HASH if this is the case
53933     if test -n "$HAS_GNU_HASH"; then
53934       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
53935       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
53936       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
53937     fi
53938       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
53939         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
53940     fi
53941     if test "x$OPENJDK_BUILD_OS" = xlinux; then
53942       # And since we now know that the linker is gnu, then add -z defs, to forbid
53943       # undefined symbols in object files.
53944       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
53945       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
53946       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
53947       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
53948       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
53949       if test "x$OPENJDK_BUILD_CPU" = xx86; then
53950         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
53951       fi
53952       case $DEBUG_LEVEL in
53953         release )
53954           # tell linker to optimize libraries.
53955           # Should this be supplied to the OSS linker as well?
53956           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
53957           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
53958           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
53959           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53960             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
53961           fi
53962           ;;
53963         slowdebug )
53964           # Hotspot always let the linker optimize
53965           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
53966           if test "x$HAS_LINKER_NOW" = "xtrue"; then
53967             # do relocations at load
53968             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
53969             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
53970             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
53971           fi
53972           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53973             # mark relocations read only
53974             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
53975             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
53976             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
53977           fi
53978           ;;
53979         fastdebug )
53980           # Hotspot always let the linker optimize
53981           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
53982           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
53983             # mark relocations read only
53984             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
53985             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
53986             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
53987           fi
53988           ;;
53989         * )
53990           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
53991           ;;
53992         esac
53993     fi
53994   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
53995     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
53996     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
53997     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
53998     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
53999     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
54000     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
54001       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
54002     fi
54003   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
54004     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok -btextpsize:64K -bdatapsize:64K -bstackpsize:64K"
54005     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
54006     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
54007     # We need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
54008     # Hotspot now overflows its 64K TOC (currently only for slowdebug),
54009     # so for slowdebug we build with '-qpic=large -bbigtoc'.
54010     if test "x$DEBUG_LEVEL" = xslowdebug; then
54011       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -bbigtoc"
54012     fi
54013   fi
54014 
54015   # Customize LDFLAGS for executables
54016 
54017   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
54018 
54019   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
54020     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
54021       LDFLAGS_STACK_SIZE=1048576
54022     else
54023       LDFLAGS_STACK_SIZE=327680
54024     fi
54025     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
54026   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
54027     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
54028   fi
54029 
54030   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
54031 
54032   # Customize LDFLAGS for libs
54033   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
54034 
54035   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
54036   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${LDFLAGS_NO_EXEC_STACK}"
54037   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
54038     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
54039         -libpath:${OUTPUTDIR}/support/modules_libs/java.base"
54040     OPENJDK_BUILD_JDKLIB_LIBS=""
54041   else
54042     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
54043         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
54044 
54045     if test "xBUILD" = "xTARGET"; then
54046       # On some platforms (mac) the linker warns about non existing -L dirs.
54047       # For any of the variants server, client or minimal, the dir matches the
54048       # variant name. The "main" variant should be used for linking. For the
54049       # rest, the dir is just server.
54050       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
54051           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
54052         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
54053             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
54054       else
54055         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
54056             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
54057       fi
54058     elif test "xBUILD" = "xBUILD"; then
54059       # When building a buildjdk, it's always only the server variant
54060       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
54061           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
54062     fi
54063 
54064     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
54065     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
54066       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
54067     fi
54068 
54069   fi
54070 
54071 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
54072 
54073   # Set OPENJDK_BUILD_JVM_LIBS (per os)
54074   if test "x$OPENJDK_BUILD_OS" = xlinux; then
54075     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
54076   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
54077     # FIXME: This hard-coded path is not really proper.
54078     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
54079       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
54080     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
54081       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
54082     fi
54083     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
54084         -lthread -ldoor -lc -ldemangle -lnsl -lrt"
54085   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
54086     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
54087   elif test "x$OPENJDK_BUILD_OS" = xaix; then
54088     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
54089   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
54090     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
54091   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
54092     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
54093         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
54094         wsock32.lib winmm.lib version.lib psapi.lib"
54095     fi
54096 
54097   # Set OPENJDK_BUILD_JVM_ASFLAGS
54098   if test "x$OPENJDK_BUILD_OS" = xlinux; then
54099     if test "x$OPENJDK_BUILD_CPU" = xx86; then
54100       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
54101     fi
54102   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
54103     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
54104   fi
54105 
54106   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
54107 
54108 
54109 
54110 
54111 
54112 
54113 
54114 
54115 
54116 
54117 
54118 
54119 
54120 
54121 
54122 
54123   # Tests are only ever compiled for TARGET
54124   # Flags for compiling test libraries
54125   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
54126   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
54127 
54128   # Flags for compiling test executables
54129   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
54130   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
54131 
54132 
54133 
54134 
54135 
54136 
54137   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
54138   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
54139 
54140 
54141 
54142 
54143 
54144 
54145   # Check that the compiler supports -mX (or -qX on AIX) flags
54146   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
54147 
54148 
54149 
54150 
54151 
54152 
54153 
54154 
54155 
54156 
54157 
54158 
54159 
54160 
54161 
54162 
54163 
54164 
54165 
54166 
54167 
54168 
54169 
54170 
54171 
54172 
54173 
54174 
54175 
54176 
54177 
54178 
54179 
54180 
54181 
54182 
54183 
54184 
54185 
54186 
54187 
54188 
54189 
54190 
54191 
54192 
54193 
54194     # Execute function body
54195 
54196 
54197 
54198 
54199 
54200 
54201 
54202 
54203 
54204 
54205 
54206 
54207 
54208 
54209 
54210 
54211 
54212 
54213 
54214 
54215 
54216 
54217 
54218 
54219 
54220 
54221 
54222 
54223 
54224 
54225 
54226 
54227 
54228 
54229 
54230 
54231 
54232 
54233 
54234 
54235 
54236 
54237 
54238 
54239 
54240 
54241 
54242 
54243     # Execute function body
54244 
54245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
54246 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
54247   supports=yes
54248 
54249   saved_cflags="$CFLAGS"
54250   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
54251   ac_ext=c
54252 ac_cpp='$CPP $CPPFLAGS'
54253 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54254 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54255 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54256 
54257   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54258 /* end confdefs.h.  */
54259 int i;
54260 _ACEOF
54261 if ac_fn_c_try_compile "$LINENO"; then :
54262 
54263 else
54264   supports=no
54265 fi
54266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54267   ac_ext=cpp
54268 ac_cpp='$CXXCPP $CPPFLAGS'
54269 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54270 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54271 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54272 
54273   CFLAGS="$saved_cflags"
54274 
54275   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54276 $as_echo "$supports" >&6; }
54277   if test "x$supports" = "xyes" ; then
54278     :
54279     C_COMP_SUPPORTS="yes"
54280   else
54281     :
54282     C_COMP_SUPPORTS="no"
54283   fi
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 
54329 
54330 
54331 
54332 
54333 
54334 
54335 
54336 
54337 
54338 
54339 
54340 
54341 
54342 
54343     # Execute function body
54344 
54345   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
54346 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
54347   supports=yes
54348 
54349   saved_cxxflags="$CXXFLAGS"
54350   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
54351   ac_ext=cpp
54352 ac_cpp='$CXXCPP $CPPFLAGS'
54353 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54354 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54355 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54356 
54357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54358 /* end confdefs.h.  */
54359 int i;
54360 _ACEOF
54361 if ac_fn_cxx_try_compile "$LINENO"; then :
54362 
54363 else
54364   supports=no
54365 fi
54366 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54367   ac_ext=cpp
54368 ac_cpp='$CXXCPP $CPPFLAGS'
54369 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54370 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54371 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54372 
54373   CXXFLAGS="$saved_cxxflags"
54374 
54375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54376 $as_echo "$supports" >&6; }
54377   if test "x$supports" = "xyes" ; then
54378     :
54379     CXX_COMP_SUPPORTS="yes"
54380   else
54381     :
54382     CXX_COMP_SUPPORTS="no"
54383   fi
54384 
54385 
54386 
54387 
54388 
54389 
54390 
54391 
54392 
54393 
54394 
54395 
54396 
54397   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
54398 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
54399   supports=no
54400   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
54401 
54402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54403 $as_echo "$supports" >&6; }
54404   if test "x$supports" = "xyes" ; then
54405     :
54406     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
54407   else
54408     :
54409     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
54410   fi
54411 
54412 
54413 
54414 
54415 
54416 
54417 
54418 
54419   # Check whether --enable-warnings-as-errors was given.
54420 if test "${enable_warnings_as_errors+set}" = set; then :
54421   enableval=$enable_warnings_as_errors;
54422 fi
54423 
54424 
54425   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
54426 $as_echo_n "checking if native warnings are errors... " >&6; }
54427   if test "x$enable_warnings_as_errors" = "xyes"; then
54428     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
54429 $as_echo "yes (explicitly set)" >&6; }
54430     WARNINGS_AS_ERRORS=true
54431   elif test "x$enable_warnings_as_errors" = "xno"; then
54432     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54433 $as_echo "no" >&6; }
54434     WARNINGS_AS_ERRORS=false
54435   elif test "x$enable_warnings_as_errors" = "x"; then
54436     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
54437 $as_echo "yes (default)" >&6; }
54438     WARNINGS_AS_ERRORS=true
54439   else
54440     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
54441   fi
54442 
54443 
54444 
54445   case "${TOOLCHAIN_TYPE}" in
54446     microsoft)
54447       DISABLE_WARNING_PREFIX="-wd"
54448       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
54449       ;;
54450     solstudio)
54451       DISABLE_WARNING_PREFIX="-erroff="
54452       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
54453       ;;
54454     gcc)
54455       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
54456 
54457 
54458 
54459 
54460 
54461 
54462 
54463 
54464 
54465 
54466 
54467 
54468 
54469 
54470 
54471 
54472 
54473 
54474 
54475 
54476 
54477 
54478 
54479 
54480 
54481 
54482 
54483 
54484 
54485 
54486 
54487 
54488 
54489 
54490 
54491 
54492 
54493 
54494 
54495 
54496 
54497 
54498 
54499 
54500 
54501 
54502 
54503     # Execute function body
54504 
54505 
54506 
54507 
54508 
54509 
54510 
54511 
54512 
54513 
54514 
54515 
54516 
54517 
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     # Execute function body
54553 
54554   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54555 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54556   supports=yes
54557 
54558   saved_cflags="$CFLAGS"
54559   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
54560   ac_ext=c
54561 ac_cpp='$CPP $CPPFLAGS'
54562 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54563 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54564 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54565 
54566   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54567 /* end confdefs.h.  */
54568 int i;
54569 _ACEOF
54570 if ac_fn_c_try_compile "$LINENO"; then :
54571 
54572 else
54573   supports=no
54574 fi
54575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54576   ac_ext=cpp
54577 ac_cpp='$CXXCPP $CPPFLAGS'
54578 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54579 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54580 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54581 
54582   CFLAGS="$saved_cflags"
54583 
54584   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54585 $as_echo "$supports" >&6; }
54586   if test "x$supports" = "xyes" ; then
54587     :
54588     C_COMP_SUPPORTS="yes"
54589   else
54590     :
54591     C_COMP_SUPPORTS="no"
54592   fi
54593 
54594 
54595 
54596 
54597 
54598 
54599 
54600 
54601 
54602 
54603 
54604 
54605 
54606 
54607 
54608 
54609 
54610 
54611 
54612 
54613 
54614 
54615 
54616 
54617 
54618 
54619 
54620 
54621 
54622 
54623 
54624 
54625 
54626 
54627 
54628 
54629 
54630 
54631 
54632 
54633 
54634 
54635 
54636 
54637 
54638 
54639 
54640 
54641 
54642 
54643 
54644 
54645 
54646 
54647 
54648 
54649 
54650 
54651 
54652     # Execute function body
54653 
54654   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54655 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54656   supports=yes
54657 
54658   saved_cxxflags="$CXXFLAGS"
54659   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
54660   ac_ext=cpp
54661 ac_cpp='$CXXCPP $CPPFLAGS'
54662 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54663 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54664 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54665 
54666   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54667 /* end confdefs.h.  */
54668 int i;
54669 _ACEOF
54670 if ac_fn_cxx_try_compile "$LINENO"; then :
54671 
54672 else
54673   supports=no
54674 fi
54675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54676   ac_ext=cpp
54677 ac_cpp='$CXXCPP $CPPFLAGS'
54678 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54679 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54680 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54681 
54682   CXXFLAGS="$saved_cxxflags"
54683 
54684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54685 $as_echo "$supports" >&6; }
54686   if test "x$supports" = "xyes" ; then
54687     :
54688     CXX_COMP_SUPPORTS="yes"
54689   else
54690     :
54691     CXX_COMP_SUPPORTS="no"
54692   fi
54693 
54694 
54695 
54696 
54697 
54698 
54699 
54700 
54701 
54702 
54703 
54704 
54705 
54706   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54707 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54708   supports=no
54709   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
54710 
54711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54712 $as_echo "$supports" >&6; }
54713   if test "x$supports" = "xyes" ; then
54714     :
54715     GCC_CAN_DISABLE_WARNINGS=true
54716   else
54717     :
54718     GCC_CAN_DISABLE_WARNINGS=false
54719 
54720   fi
54721 
54722 
54723 
54724 
54725 
54726 
54727       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
54728         DISABLE_WARNING_PREFIX="-Wno-"
54729       else
54730         DISABLE_WARNING_PREFIX=
54731       fi
54732       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
54733       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
54734       # CFLAGS since any target specific flags will likely not work with the
54735       # build compiler
54736       CC_OLD="$CC"
54737       CXX_OLD="$CXX"
54738       CC="$BUILD_CC"
54739       CXX="$BUILD_CXX"
54740       CFLAGS_OLD="$CFLAGS"
54741       CFLAGS=""
54742 
54743 
54744 
54745 
54746 
54747 
54748 
54749 
54750 
54751 
54752 
54753 
54754 
54755 
54756 
54757 
54758 
54759 
54760 
54761 
54762 
54763 
54764 
54765 
54766 
54767 
54768 
54769 
54770 
54771 
54772 
54773 
54774 
54775 
54776 
54777 
54778 
54779 
54780 
54781 
54782 
54783 
54784 
54785 
54786 
54787 
54788 
54789     # Execute function body
54790 
54791 
54792 
54793 
54794 
54795 
54796 
54797 
54798 
54799 
54800 
54801 
54802 
54803 
54804 
54805 
54806 
54807 
54808 
54809 
54810 
54811 
54812 
54813 
54814 
54815 
54816 
54817 
54818 
54819 
54820 
54821 
54822 
54823 
54824 
54825 
54826 
54827 
54828 
54829 
54830 
54831 
54832 
54833 
54834 
54835 
54836 
54837 
54838     # Execute function body
54839 
54840   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54841 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54842   supports=yes
54843 
54844   saved_cflags="$CFLAGS"
54845   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
54846   ac_ext=c
54847 ac_cpp='$CPP $CPPFLAGS'
54848 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54849 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54850 ac_compiler_gnu=$ac_cv_c_compiler_gnu
54851 
54852   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54853 /* end confdefs.h.  */
54854 int i;
54855 _ACEOF
54856 if ac_fn_c_try_compile "$LINENO"; then :
54857 
54858 else
54859   supports=no
54860 fi
54861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54862   ac_ext=cpp
54863 ac_cpp='$CXXCPP $CPPFLAGS'
54864 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54865 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54866 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54867 
54868   CFLAGS="$saved_cflags"
54869 
54870   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54871 $as_echo "$supports" >&6; }
54872   if test "x$supports" = "xyes" ; then
54873     :
54874     C_COMP_SUPPORTS="yes"
54875   else
54876     :
54877     C_COMP_SUPPORTS="no"
54878   fi
54879 
54880 
54881 
54882 
54883 
54884 
54885 
54886 
54887 
54888 
54889 
54890 
54891 
54892 
54893 
54894 
54895 
54896 
54897 
54898 
54899 
54900 
54901 
54902 
54903 
54904 
54905 
54906 
54907 
54908 
54909 
54910 
54911 
54912 
54913 
54914 
54915 
54916 
54917 
54918 
54919 
54920 
54921 
54922 
54923 
54924 
54925 
54926 
54927 
54928 
54929 
54930 
54931 
54932 
54933 
54934 
54935 
54936 
54937 
54938     # Execute function body
54939 
54940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54941 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54942   supports=yes
54943 
54944   saved_cxxflags="$CXXFLAGS"
54945   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
54946   ac_ext=cpp
54947 ac_cpp='$CXXCPP $CPPFLAGS'
54948 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54949 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54950 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54951 
54952   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54953 /* end confdefs.h.  */
54954 int i;
54955 _ACEOF
54956 if ac_fn_cxx_try_compile "$LINENO"; then :
54957 
54958 else
54959   supports=no
54960 fi
54961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
54962   ac_ext=cpp
54963 ac_cpp='$CXXCPP $CPPFLAGS'
54964 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54965 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54966 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54967 
54968   CXXFLAGS="$saved_cxxflags"
54969 
54970   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54971 $as_echo "$supports" >&6; }
54972   if test "x$supports" = "xyes" ; then
54973     :
54974     CXX_COMP_SUPPORTS="yes"
54975   else
54976     :
54977     CXX_COMP_SUPPORTS="no"
54978   fi
54979 
54980 
54981 
54982 
54983 
54984 
54985 
54986 
54987 
54988 
54989 
54990 
54991 
54992   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
54993 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
54994   supports=no
54995   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
54996 
54997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
54998 $as_echo "$supports" >&6; }
54999   if test "x$supports" = "xyes" ; then
55000     :
55001     BUILD_CC_CAN_DISABLE_WARNINGS=true
55002   else
55003     :
55004     BUILD_CC_CAN_DISABLE_WARNINGS=false
55005 
55006   fi
55007 
55008 
55009 
55010 
55011 
55012 
55013       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
55014         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
55015       else
55016         BUILD_CC_DISABLE_WARNING_PREFIX=
55017       fi
55018       CC="$CC_OLD"
55019       CXX="$CXX_OLD"
55020       CFLAGS="$CFLAGS_OLD"
55021       ;;
55022     clang)
55023       DISABLE_WARNING_PREFIX="-Wno-"
55024       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
55025       ;;
55026     xlc)
55027       DISABLE_WARNING_PREFIX="-qsuppress="
55028       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
55029       ;;
55030   esac
55031 
55032 
55033 
55034 
55035 
55036 # Setup debug symbols (need objcopy from the toolchain for that)
55037 
55038   #
55039   # NATIVE_DEBUG_SYMBOLS
55040   # This must be done after the toolchain is setup, since we're looking at objcopy.
55041   #
55042   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
55043 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
55044 
55045 # Check whether --with-native-debug-symbols was given.
55046 if test "${with_native_debug_symbols+set}" = set; then :
55047   withval=$with_native_debug_symbols;
55048         if test "x$OPENJDK_TARGET_OS" = xaix; then
55049           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
55050             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
55051           fi
55052         fi
55053 
55054 else
55055 
55056         if test "x$OPENJDK_TARGET_OS" = xaix; then
55057           # AIX doesn't support 'external' so use 'internal' as default
55058           with_native_debug_symbols="internal"
55059         else
55060           if test "x$STATIC_BUILD" = xtrue; then
55061             with_native_debug_symbols="none"
55062           else
55063             with_native_debug_symbols="external"
55064           fi
55065         fi
55066 
55067 fi
55068 
55069   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
55070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
55071 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
55072 
55073   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
55074 
55075     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
55076       if test "x$OBJCOPY" = x; then
55077         # enabling of enable-debug-symbols and can't find objcopy
55078         # this is an error
55079         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
55080       fi
55081     fi
55082 
55083     COMPILE_WITH_DEBUG_SYMBOLS=true
55084     COPY_DEBUG_SYMBOLS=true
55085     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
55086   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
55087     COMPILE_WITH_DEBUG_SYMBOLS=false
55088     COPY_DEBUG_SYMBOLS=false
55089     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
55090   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
55091     COMPILE_WITH_DEBUG_SYMBOLS=true
55092     COPY_DEBUG_SYMBOLS=false
55093     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
55094   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
55095 
55096     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
55097       if test "x$OBJCOPY" = x; then
55098         # enabling of enable-debug-symbols and can't find objcopy
55099         # this is an error
55100         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
55101       fi
55102     fi
55103 
55104     COMPILE_WITH_DEBUG_SYMBOLS=true
55105     COPY_DEBUG_SYMBOLS=true
55106     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
55107   else
55108     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
55109   fi
55110 
55111   # --enable-debug-symbols is deprecated.
55112   # Please use --with-native-debug-symbols=[internal,external,zipped] .
55113 
55114   # Check whether --enable-debug-symbols was given.
55115 if test "${enable_debug_symbols+set}" = set; then :
55116   enableval=$enable_debug_symbols;
55117 fi
55118 
55119   if test "x$enable_debug_symbols" != x; then
55120     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
55121 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
55122 
55123     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
55124       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
55125 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
55126     fi
55127 
55128   fi
55129 
55130 
55131   # --enable-zip-debug-info is deprecated.
55132   # Please use --with-native-debug-symbols=zipped .
55133 
55134   # Check whether --enable-zip-debug-info was given.
55135 if test "${enable_zip_debug_info+set}" = set; then :
55136   enableval=$enable_zip_debug_info;
55137 fi
55138 
55139   if test "x$enable_zip_debug_info" != x; then
55140     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
55141 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
55142 
55143     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
55144       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
55145 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
55146     fi
55147 
55148   fi
55149 
55150 
55151 
55152 
55153 
55154 
55155 
55156   # Check whether --enable-native-coverage was given.
55157 if test "${enable_native_coverage+set}" = set; then :
55158   enableval=$enable_native_coverage;
55159 fi
55160 
55161   GCOV_ENABLED="false"
55162   if test "x$enable_native_coverage" = "xyes"; then
55163     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
55164       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
55165 $as_echo_n "checking if native coverage is enabled... " >&6; }
55166       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55167 $as_echo "yes" >&6; }
55168       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
55169       GCOV_LDFLAGS="-fprofile-arcs"
55170       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
55171       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
55172       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
55173       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
55174       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
55175       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
55176       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
55177       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
55178       GCOV_ENABLED="true"
55179     else
55180       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
55181     fi
55182   elif test "x$enable_native_coverage" = "xno"; then
55183     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
55184 $as_echo_n "checking if native coverage is enabled... " >&6; }
55185     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55186 $as_echo "no" >&6; }
55187   elif test "x$enable_native_coverage" != "x"; then
55188     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
55189   fi
55190 
55191 
55192 
55193 
55194 # AddressSanitizer
55195 
55196   # Check whether --enable-asan was given.
55197 if test "${enable_asan+set}" = set; then :
55198   enableval=$enable_asan;
55199 fi
55200 
55201   ASAN_ENABLED="no"
55202   if test "x$enable_asan" = "xyes"; then
55203     case $TOOLCHAIN_TYPE in
55204       gcc | clang)
55205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asan is enabled" >&5
55206 $as_echo_n "checking if asan is enabled... " >&6; }
55207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55208 $as_echo "yes" >&6; }
55209         ASAN_CFLAGS="-fsanitize=address -fno-omit-frame-pointer"
55210         ASAN_LDFLAGS="-fsanitize=address"
55211         JVM_CFLAGS="$JVM_CFLAGS $ASAN_CFLAGS"
55212         JVM_LDFLAGS="$JVM_LDFLAGS $ASAN_LDFLAGS"
55213         CFLAGS_JDKLIB="$CFLAGS_JDKLIB $ASAN_CFLAGS"
55214         CFLAGS_JDKEXE="$CFLAGS_JDKEXE $ASAN_CFLAGS"
55215         CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $ASAN_CFLAGS"
55216         CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $ASAN_CFLAGS"
55217         LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $ASAN_LDFLAGS"
55218         LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $ASAN_LDFLAGS"
55219         ASAN_ENABLED="yes"
55220         ;;
55221       *)
55222         as_fn_error $? "--enable-asan only works with toolchain type gcc or clang" "$LINENO" 5
55223         ;;
55224     esac
55225   elif test "x$enable_asan" = "xno"; then
55226     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if asan is enabled" >&5
55227 $as_echo_n "checking if asan is enabled... " >&6; }
55228     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55229 $as_echo "no" >&6; }
55230   elif test "x$enable_asan" != "x"; then
55231     as_fn_error $? "--enable-asan can only be assigned \"yes\" or \"no\"" "$LINENO" 5
55232   fi
55233 
55234 
55235 
55236 
55237 # Need toolchain to setup dtrace
55238 
55239   # Test for dtrace dependencies
55240   # Check whether --enable-dtrace was given.
55241 if test "${enable_dtrace+set}" = set; then :
55242   enableval=$enable_dtrace;
55243 fi
55244 
55245 
55246   DTRACE_DEP_MISSING=false
55247 
55248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
55249 $as_echo_n "checking for dtrace tool... " >&6; }
55250   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
55251     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
55252 $as_echo "$DTRACE" >&6; }
55253   else
55254     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
55255 $as_echo "not found, cannot build dtrace" >&6; }
55256     DTRACE_DEP_MISSING=true
55257   fi
55258 
55259   for ac_header in sys/sdt.h
55260 do :
55261   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
55262 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
55263   cat >>confdefs.h <<_ACEOF
55264 #define HAVE_SYS_SDT_H 1
55265 _ACEOF
55266  DTRACE_HEADERS_OK=yes
55267 else
55268   DTRACE_HEADERS_OK=no
55269 fi
55270 
55271 done
55272 
55273   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
55274     DTRACE_DEP_MISSING=true
55275   fi
55276 
55277   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
55278 $as_echo_n "checking if dtrace should be built... " >&6; }
55279   if test "x$enable_dtrace" = "xyes"; then
55280     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
55281       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
55282 $as_echo "no, missing dependencies" >&6; }
55283 
55284   # Print a helpful message on how to acquire the necessary build dependency.
55285   # dtrace is the help tag: freetype, cups, alsa etc
55286   MISSING_DEPENDENCY=dtrace
55287 
55288   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55289     cygwin_help $MISSING_DEPENDENCY
55290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55291     msys_help $MISSING_DEPENDENCY
55292   else
55293     PKGHANDLER_COMMAND=
55294 
55295     case $PKGHANDLER in
55296       apt-get)
55297         apt_help     $MISSING_DEPENDENCY ;;
55298       yum)
55299         yum_help     $MISSING_DEPENDENCY ;;
55300       brew)
55301         brew_help    $MISSING_DEPENDENCY ;;
55302       port)
55303         port_help    $MISSING_DEPENDENCY ;;
55304       pkgutil)
55305         pkgutil_help $MISSING_DEPENDENCY ;;
55306       pkgadd)
55307         pkgadd_help  $MISSING_DEPENDENCY ;;
55308     esac
55309 
55310     if test "x$PKGHANDLER_COMMAND" != x; then
55311       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
55312     fi
55313   fi
55314 
55315       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
55316     else
55317       INCLUDE_DTRACE=true
55318       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
55319 $as_echo "yes, forced" >&6; }
55320     fi
55321   elif test "x$enable_dtrace" = "xno"; then
55322     INCLUDE_DTRACE=false
55323     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
55324 $as_echo "no, forced" >&6; }
55325   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
55326     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
55327       INCLUDE_DTRACE=false
55328       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
55329 $as_echo "no, missing dependencies" >&6; }
55330     else
55331       INCLUDE_DTRACE=true
55332       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
55333 $as_echo "yes, dependencies present" >&6; }
55334     fi
55335   else
55336     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
55337   fi
55338 
55339 
55340   # Check whether --enable-aot was given.
55341 if test "${enable_aot+set}" = set; then :
55342   enableval=$enable_aot;
55343 fi
55344 
55345 
55346   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
55347     ENABLE_AOT="true"
55348   elif test "x$enable_aot" = "xyes"; then
55349     ENABLE_AOT="true"
55350   elif test "x$enable_aot" = "xno"; then
55351     ENABLE_AOT="false"
55352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
55353 $as_echo_n "checking if aot should be enabled... " >&6; }
55354     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
55355 $as_echo "no, forced" >&6; }
55356   else
55357     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
55358   fi
55359 
55360   if test "x$ENABLE_AOT" = "xtrue"; then
55361     # Only enable AOT on X64 platforms.
55362     if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
55363       if test -e "${TOPDIR}/src/jdk.aot"; then
55364         if test -e "${TOPDIR}/src/jdk.internal.vm.compiler"; then
55365           ENABLE_AOT="true"
55366         else
55367           ENABLE_AOT="false"
55368           if test "x$enable_aot" = "xyes"; then
55369             as_fn_error $? "Cannot build AOT without src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
55370           fi
55371         fi
55372       else
55373         ENABLE_AOT="false"
55374         if test "x$enable_aot" = "xyes"; then
55375           as_fn_error $? "Cannot build AOT without src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
55376         fi
55377       fi
55378     else
55379       ENABLE_AOT="false"
55380       if test "x$enable_aot" = "xyes"; then
55381         as_fn_error $? "AOT is currently only supported on x86_64. Remove --enable-aot." "$LINENO" 5
55382       fi
55383     fi
55384   fi
55385 
55386 
55387 
55388 
55389   # Check whether --enable-cds was given.
55390 if test "${enable_cds+set}" = set; then :
55391   enableval=$enable_cds;
55392 fi
55393 
55394 
55395   if test "x$enable_cds" = "x" || test "x$enable_cds" = "xyes"; then
55396     ENABLE_CDS="true"
55397   elif test "x$enable_cds" = "xno"; then
55398     ENABLE_CDS="false"
55399   else
55400     as_fn_error $? "Invalid value for --enable-cds: $enable_cds" "$LINENO" 5
55401   fi
55402 
55403 
55404 
55405 
55406   # Check whether --enable-hotspot-gtest was given.
55407 if test "${enable_hotspot_gtest+set}" = set; then :
55408   enableval=$enable_hotspot_gtest;
55409 fi
55410 
55411 
55412   if test -e "${TOPDIR}/test/hotspot/gtest"; then
55413     GTEST_DIR_EXISTS="true"
55414   else
55415     GTEST_DIR_EXISTS="false"
55416   fi
55417 
55418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
55419 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
55420   if test "x$enable_hotspot_gtest" = "xyes"; then
55421     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
55422       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
55423 $as_echo "yes, forced" >&6; }
55424       BUILD_GTEST="true"
55425     else
55426       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
55427     fi
55428   elif test "x$enable_hotspot_gtest" = "xno"; then
55429     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
55430 $as_echo "no, forced" >&6; }
55431     BUILD_GTEST="false"
55432   elif test "x$enable_hotspot_gtest" = "x"; then
55433     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
55434       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55435 $as_echo "yes" >&6; }
55436       BUILD_GTEST="true"
55437     else
55438       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55439 $as_echo "no" >&6; }
55440       BUILD_GTEST="false"
55441     fi
55442   else
55443     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
55444   fi
55445 
55446 
55447 
55448 
55449 ###############################################################################
55450 #
55451 # Check dependencies for external and internal libraries.
55452 #
55453 ###############################################################################
55454 
55455 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
55456 
55457   # When using cygwin or msys, we need a wrapper binary that renames
55458   # /cygdrive/c/ arguments into c:/ arguments and peeks into
55459   # @files and rewrites these too! This wrapper binary is
55460   # called fixpath.
55461   FIXPATH=
55462   if test "x$OPENJDK_BUILD_OS" = xwindows; then
55463     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
55464 $as_echo_n "checking if fixpath can be created... " >&6; }
55465     FIXPATH_SRC="$TOPDIR/make/src/native/fixpath.c"
55466     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
55467     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
55468     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
55469       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
55470       FIXPATH="$FIXPATH_BIN -c"
55471     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
55472       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
55473       # @ was chosen as separator to minimize risk of other tools messing around with it
55474       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
55475           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
55476       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
55477       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
55478     fi
55479     FIXPATH_SRC_W="$FIXPATH_SRC"
55480     FIXPATH_BIN_W="$FIXPATH_BIN"
55481 
55482   unix_path="$FIXPATH_SRC_W"
55483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55484     windows_path=`$CYGPATH -m "$unix_path"`
55485     FIXPATH_SRC_W="$windows_path"
55486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55487     windows_path=`cmd //c echo $unix_path`
55488     FIXPATH_SRC_W="$windows_path"
55489   fi
55490 
55491 
55492   unix_path="$FIXPATH_BIN_W"
55493   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55494     windows_path=`$CYGPATH -m "$unix_path"`
55495     FIXPATH_BIN_W="$windows_path"
55496   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55497     windows_path=`cmd //c echo $unix_path`
55498     FIXPATH_BIN_W="$windows_path"
55499   fi
55500 
55501     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
55502     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
55503     cd $FIXPATH_DIR
55504     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
55505     cd $CURDIR
55506 
55507     if test ! -x $FIXPATH_BIN; then
55508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55509 $as_echo "no" >&6; }
55510       cat $FIXPATH_DIR/fixpath1.log
55511       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
55512     fi
55513     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55514 $as_echo "yes" >&6; }
55515     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
55516 $as_echo_n "checking if fixpath.exe works... " >&6; }
55517     cd $FIXPATH_DIR
55518     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
55519         > $FIXPATH_DIR/fixpath2.log 2>&1
55520     cd $CURDIR
55521     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
55522       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55523 $as_echo "no" >&6; }
55524       cat $FIXPATH_DIR/fixpath2.log
55525       as_fn_error $? "fixpath did not work!" "$LINENO" 5
55526     fi
55527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
55528 $as_echo "yes" >&6; }
55529 
55530     FIXPATH_DETACH_FLAG="--detach"
55531   fi
55532 
55533 
55534 
55535 
55536 
55537 
55538   # Check if X11 is needed
55539   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
55540     # No X11 support on windows or macosx
55541     NEEDS_LIB_X11=false
55542   else
55543     # All other instances need X11, even if building headless only, libawt still
55544     # needs X11 headers.
55545     NEEDS_LIB_X11=true
55546   fi
55547 
55548   # Check if fontconfig is needed
55549   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
55550     # No fontconfig support on windows or macosx
55551     NEEDS_LIB_FONTCONFIG=false
55552   else
55553     # All other instances need fontconfig, even if building headless only,
55554     # libawt still needs fontconfig headers.
55555     NEEDS_LIB_FONTCONFIG=true
55556   fi
55557 
55558   # Check if cups is needed
55559   if test "x$OPENJDK_TARGET_OS" = xwindows; then
55560     # Windows have a separate print system
55561     NEEDS_LIB_CUPS=false
55562   else
55563     NEEDS_LIB_CUPS=true
55564   fi
55565 
55566   # A custom hook may have set this already
55567   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
55568     NEEDS_LIB_FREETYPE=true
55569   fi
55570 
55571   # Check if alsa is needed
55572   if test "x$OPENJDK_TARGET_OS" = xlinux; then
55573     NEEDS_LIB_ALSA=true
55574   else
55575     NEEDS_LIB_ALSA=false
55576   fi
55577 
55578   # Check if ffi is needed
55579   if   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
55580     NEEDS_LIB_FFI=true
55581   else
55582     NEEDS_LIB_FFI=false
55583   fi
55584 
55585 
55586   # statically link libstdc++ before C++ ABI is stablized on Linux unless
55587   # dynamic build is configured on command line.
55588 
55589 # Check whether --with-stdc++lib was given.
55590 if test "${with_stdc__lib+set}" = set; then :
55591   withval=$with_stdc__lib;
55592         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
55593                 && test "x$with_stdc__lib" != xdefault; then
55594           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
55595         fi
55596 
55597 else
55598   with_stdc__lib=default
55599 
55600 fi
55601 
55602 
55603   if test "x$OPENJDK_TARGET_OS" = xlinux; then
55604     # Test if stdc++ can be linked statically.
55605     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
55606 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
55607     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
55608     ac_ext=cpp
55609 ac_cpp='$CXXCPP $CPPFLAGS'
55610 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55611 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55612 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55613 
55614     OLD_LIBS="$LIBS"
55615     LIBS="$STATIC_STDCXX_FLAGS"
55616     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
55617 /* end confdefs.h.  */
55618 
55619 int
55620 main ()
55621 {
55622 return 0;
55623   ;
55624   return 0;
55625 }
55626 _ACEOF
55627 if ac_fn_cxx_try_link "$LINENO"; then :
55628   has_static_libstdcxx=yes
55629 else
55630   has_static_libstdcxx=no
55631 fi
55632 rm -f core conftest.err conftest.$ac_objext \
55633     conftest$ac_exeext conftest.$ac_ext
55634     LIBS="$OLD_LIBS"
55635     ac_ext=cpp
55636 ac_cpp='$CXXCPP $CPPFLAGS'
55637 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
55638 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
55639 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
55640 
55641     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
55642 $as_echo "$has_static_libstdcxx" >&6; }
55643 
55644     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
55645       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
55646     fi
55647 
55648     # If dynamic was requested, it's available since it would fail above otherwise.
55649     # If dynamic wasn't requested, go with static unless it isn't available.
55650     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
55651 $as_echo_n "checking how to link with libstdc++... " >&6; }
55652     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ; then
55653       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
55654 $as_echo "dynamic" >&6; }
55655     else
55656       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
55657       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
55658       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
55659       # just use the same setting as for the TARGET toolchain.
55660       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
55661       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
55662 $as_echo "static" >&6; }
55663     fi
55664   fi
55665 
55666   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
55667   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
55668     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
55669   fi
55670 
55671 
55672 
55673   # Setup Windows runtime dlls
55674   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
55675 
55676 
55677 # Check whether --with-msvcr-dll was given.
55678 if test "${with_msvcr_dll+set}" = set; then :
55679   withval=$with_msvcr_dll;
55680 fi
55681 
55682 
55683   if test "x$with_msvcr_dll" != x; then
55684     # If given explicitly by user, do not probe. If not present, fail directly.
55685 
55686   DLL_NAME="$MSVCR_NAME"
55687   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
55688   METHOD="--with-msvcr-dll"
55689   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55690     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55691 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55692 
55693     # Need to check if the found msvcr is correct architecture
55694     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55695 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55696     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55697     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55698       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55699       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55700       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55701         CORRECT_MSVCR_ARCH="PE32 executable"
55702       else
55703         CORRECT_MSVCR_ARCH="PE32+ executable"
55704       fi
55705     else
55706       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55707         CORRECT_MSVCR_ARCH=386
55708       else
55709         CORRECT_MSVCR_ARCH=x86-64
55710       fi
55711     fi
55712     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55713       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55714 $as_echo "ok" >&6; }
55715       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55716 
55717   # Only process if variable expands to non-empty
55718 
55719   if test "x$MSVC_DLL" != x; then
55720     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55721 
55722   # Input might be given as Windows format, start by converting to
55723   # unix format.
55724   path="$MSVC_DLL"
55725   new_path=`$CYGPATH -u "$path"`
55726 
55727   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55728   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55729   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55730   # "foo.exe" is OK but "foo" is an error.
55731   #
55732   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55733   # It is also a way to make sure we got the proper file name for the real test later on.
55734   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55735   if test "x$test_shortpath" = x; then
55736     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55737 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55738     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55739   fi
55740 
55741   # Call helper function which possibly converts this using DOS-style short mode.
55742   # If so, the updated path is stored in $new_path.
55743 
55744   input_path="$new_path"
55745   # Check if we need to convert this using DOS-style short mode. If the path
55746   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55747   # take no chances and rewrite it.
55748   # Note: m4 eats our [], so we need to use [ and ] instead.
55749   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55750   if test "x$has_forbidden_chars" != x; then
55751     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55752     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55753     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55754     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55755       # Going to short mode and back again did indeed matter. Since short mode is
55756       # case insensitive, let's make it lowercase to improve readability.
55757       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55758       # Now convert it back to Unix-style (cygpath)
55759       input_path=`$CYGPATH -u "$shortmode_path"`
55760       new_path="$input_path"
55761     fi
55762   fi
55763 
55764   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55765   if test "x$test_cygdrive_prefix" = x; then
55766     # As a simple fix, exclude /usr/bin since it's not a real path.
55767     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55768       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55769       # a path prefixed by /cygdrive for fixpath to work.
55770       new_path="$CYGWIN_ROOT_PATH$input_path"
55771     fi
55772   fi
55773 
55774 
55775   if test "x$path" != "x$new_path"; then
55776     MSVC_DLL="$new_path"
55777     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55778 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55779   fi
55780 
55781     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55782 
55783   path="$MSVC_DLL"
55784   has_colon=`$ECHO $path | $GREP ^.:`
55785   new_path="$path"
55786   if test "x$has_colon" = x; then
55787     # Not in mixed or Windows style, start by that.
55788     new_path=`cmd //c echo $path`
55789   fi
55790 
55791 
55792   input_path="$new_path"
55793   # Check if we need to convert this using DOS-style short mode. If the path
55794   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55795   # take no chances and rewrite it.
55796   # Note: m4 eats our [], so we need to use [ and ] instead.
55797   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55798   if test "x$has_forbidden_chars" != x; then
55799     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55800     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55801   fi
55802 
55803 
55804   windows_path="$new_path"
55805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55806     unix_path=`$CYGPATH -u "$windows_path"`
55807     new_path="$unix_path"
55808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55810     new_path="$unix_path"
55811   fi
55812 
55813   if test "x$path" != "x$new_path"; then
55814     MSVC_DLL="$new_path"
55815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55816 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55817   fi
55818 
55819   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55820   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55821 
55822     else
55823       # We're on a unix platform. Hooray! :)
55824       path="$MSVC_DLL"
55825       has_space=`$ECHO "$path" | $GREP " "`
55826       if test "x$has_space" != x; then
55827         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55828 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55829         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55830       fi
55831 
55832       # Use eval to expand a potential ~
55833       eval path="$path"
55834       if test ! -f "$path" && test ! -d "$path"; then
55835         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55836       fi
55837 
55838       if test -d "$path"; then
55839         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55840       else
55841         dir="`$DIRNAME "$path"`"
55842         base="`$BASENAME "$path"`"
55843         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55844       fi
55845     fi
55846   fi
55847 
55848       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55849 $as_echo_n "checking for $DLL_NAME... " >&6; }
55850       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55851 $as_echo "$MSVC_DLL" >&6; }
55852     else
55853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55854 $as_echo "incorrect, ignoring" >&6; }
55855       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55856 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55857     fi
55858   fi
55859 
55860     if test "x$MSVC_DLL" = x; then
55861       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
55862     fi
55863     MSVCR_DLL="$MSVC_DLL"
55864   elif test "x$DEVKIT_MSVCR_DLL" != x; then
55865 
55866   DLL_NAME="$MSVCR_NAME"
55867   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
55868   METHOD="devkit"
55869   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55870     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55871 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55872 
55873     # Need to check if the found msvcr is correct architecture
55874     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55875 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55876     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55878       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55879       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55880       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55881         CORRECT_MSVCR_ARCH="PE32 executable"
55882       else
55883         CORRECT_MSVCR_ARCH="PE32+ executable"
55884       fi
55885     else
55886       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55887         CORRECT_MSVCR_ARCH=386
55888       else
55889         CORRECT_MSVCR_ARCH=x86-64
55890       fi
55891     fi
55892     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55893       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55894 $as_echo "ok" >&6; }
55895       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55896 
55897   # Only process if variable expands to non-empty
55898 
55899   if test "x$MSVC_DLL" != x; then
55900     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55901 
55902   # Input might be given as Windows format, start by converting to
55903   # unix format.
55904   path="$MSVC_DLL"
55905   new_path=`$CYGPATH -u "$path"`
55906 
55907   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55908   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55909   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55910   # "foo.exe" is OK but "foo" is an error.
55911   #
55912   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55913   # It is also a way to make sure we got the proper file name for the real test later on.
55914   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55915   if test "x$test_shortpath" = x; then
55916     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55917 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55918     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55919   fi
55920 
55921   # Call helper function which possibly converts this using DOS-style short mode.
55922   # If so, the updated path is stored in $new_path.
55923 
55924   input_path="$new_path"
55925   # Check if we need to convert this using DOS-style short mode. If the path
55926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55927   # take no chances and rewrite it.
55928   # Note: m4 eats our [], so we need to use [ and ] instead.
55929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55930   if test "x$has_forbidden_chars" != x; then
55931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55932     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55933     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55934     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55935       # Going to short mode and back again did indeed matter. Since short mode is
55936       # case insensitive, let's make it lowercase to improve readability.
55937       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55938       # Now convert it back to Unix-style (cygpath)
55939       input_path=`$CYGPATH -u "$shortmode_path"`
55940       new_path="$input_path"
55941     fi
55942   fi
55943 
55944   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55945   if test "x$test_cygdrive_prefix" = x; then
55946     # As a simple fix, exclude /usr/bin since it's not a real path.
55947     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55948       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55949       # a path prefixed by /cygdrive for fixpath to work.
55950       new_path="$CYGWIN_ROOT_PATH$input_path"
55951     fi
55952   fi
55953 
55954 
55955   if test "x$path" != "x$new_path"; then
55956     MSVC_DLL="$new_path"
55957     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55958 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55959   fi
55960 
55961     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55962 
55963   path="$MSVC_DLL"
55964   has_colon=`$ECHO $path | $GREP ^.:`
55965   new_path="$path"
55966   if test "x$has_colon" = x; then
55967     # Not in mixed or Windows style, start by that.
55968     new_path=`cmd //c echo $path`
55969   fi
55970 
55971 
55972   input_path="$new_path"
55973   # Check if we need to convert this using DOS-style short mode. If the path
55974   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55975   # take no chances and rewrite it.
55976   # Note: m4 eats our [], so we need to use [ and ] instead.
55977   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55978   if test "x$has_forbidden_chars" != x; then
55979     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55980     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55981   fi
55982 
55983 
55984   windows_path="$new_path"
55985   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55986     unix_path=`$CYGPATH -u "$windows_path"`
55987     new_path="$unix_path"
55988   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55989     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55990     new_path="$unix_path"
55991   fi
55992 
55993   if test "x$path" != "x$new_path"; then
55994     MSVC_DLL="$new_path"
55995     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55996 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55997   fi
55998 
55999   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56000   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56001 
56002     else
56003       # We're on a unix platform. Hooray! :)
56004       path="$MSVC_DLL"
56005       has_space=`$ECHO "$path" | $GREP " "`
56006       if test "x$has_space" != x; then
56007         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56008 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56009         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56010       fi
56011 
56012       # Use eval to expand a potential ~
56013       eval path="$path"
56014       if test ! -f "$path" && test ! -d "$path"; then
56015         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56016       fi
56017 
56018       if test -d "$path"; then
56019         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56020       else
56021         dir="`$DIRNAME "$path"`"
56022         base="`$BASENAME "$path"`"
56023         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56024       fi
56025     fi
56026   fi
56027 
56028       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56029 $as_echo_n "checking for $DLL_NAME... " >&6; }
56030       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56031 $as_echo "$MSVC_DLL" >&6; }
56032     else
56033       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56034 $as_echo "incorrect, ignoring" >&6; }
56035       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56036 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56037     fi
56038   fi
56039 
56040     if test "x$MSVC_DLL" = x; then
56041       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
56042     fi
56043     MSVCR_DLL="$MSVC_DLL"
56044   else
56045 
56046   DLL_NAME="${MSVCR_NAME}"
56047   MSVC_DLL=
56048 
56049   if test "x$MSVC_DLL" = x; then
56050     if test "x$VCINSTALLDIR" != x; then
56051       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
56052 
56053   windows_path="$CYGWIN_VC_INSTALL_DIR"
56054   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56055     unix_path=`$CYGPATH -u "$windows_path"`
56056     CYGWIN_VC_INSTALL_DIR="$unix_path"
56057   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56058     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56059     CYGWIN_VC_INSTALL_DIR="$unix_path"
56060   fi
56061 
56062       if test "$VS_VERSION" -lt 2017; then
56063         # Probe: Using well-known location from Visual Studio 12.0 and older
56064         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56065           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56066         else
56067           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
56068         fi
56069       else
56070         # Probe: Using well-known location from VS 2017
56071         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56072           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
56073         else
56074           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
56075         fi
56076       fi
56077       # In case any of the above finds more than one file, loop over them.
56078       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
56079         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
56080 
56081   DLL_NAME="$DLL_NAME"
56082   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
56083   METHOD="well-known location in VCINSTALLDIR"
56084   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56085     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56086 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56087 
56088     # Need to check if the found msvcr is correct architecture
56089     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56090 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56091     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56092     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56093       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56094       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56095       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56096         CORRECT_MSVCR_ARCH="PE32 executable"
56097       else
56098         CORRECT_MSVCR_ARCH="PE32+ executable"
56099       fi
56100     else
56101       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56102         CORRECT_MSVCR_ARCH=386
56103       else
56104         CORRECT_MSVCR_ARCH=x86-64
56105       fi
56106     fi
56107     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56108       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56109 $as_echo "ok" >&6; }
56110       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56111 
56112   # Only process if variable expands to non-empty
56113 
56114   if test "x$MSVC_DLL" != x; then
56115     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56116 
56117   # Input might be given as Windows format, start by converting to
56118   # unix format.
56119   path="$MSVC_DLL"
56120   new_path=`$CYGPATH -u "$path"`
56121 
56122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56125   # "foo.exe" is OK but "foo" is an error.
56126   #
56127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56128   # It is also a way to make sure we got the proper file name for the real test later on.
56129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56130   if test "x$test_shortpath" = x; then
56131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56132 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56133     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56134   fi
56135 
56136   # Call helper function which possibly converts this using DOS-style short mode.
56137   # If so, the updated path is stored in $new_path.
56138 
56139   input_path="$new_path"
56140   # Check if we need to convert this using DOS-style short mode. If the path
56141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56142   # take no chances and rewrite it.
56143   # Note: m4 eats our [], so we need to use [ and ] instead.
56144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56145   if test "x$has_forbidden_chars" != x; then
56146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56150       # Going to short mode and back again did indeed matter. Since short mode is
56151       # case insensitive, let's make it lowercase to improve readability.
56152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56153       # Now convert it back to Unix-style (cygpath)
56154       input_path=`$CYGPATH -u "$shortmode_path"`
56155       new_path="$input_path"
56156     fi
56157   fi
56158 
56159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56160   if test "x$test_cygdrive_prefix" = x; then
56161     # As a simple fix, exclude /usr/bin since it's not a real path.
56162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56164       # a path prefixed by /cygdrive for fixpath to work.
56165       new_path="$CYGWIN_ROOT_PATH$input_path"
56166     fi
56167   fi
56168 
56169 
56170   if test "x$path" != "x$new_path"; then
56171     MSVC_DLL="$new_path"
56172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56173 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56174   fi
56175 
56176     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56177 
56178   path="$MSVC_DLL"
56179   has_colon=`$ECHO $path | $GREP ^.:`
56180   new_path="$path"
56181   if test "x$has_colon" = x; then
56182     # Not in mixed or Windows style, start by that.
56183     new_path=`cmd //c echo $path`
56184   fi
56185 
56186 
56187   input_path="$new_path"
56188   # Check if we need to convert this using DOS-style short mode. If the path
56189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56190   # take no chances and rewrite it.
56191   # Note: m4 eats our [], so we need to use [ and ] instead.
56192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56193   if test "x$has_forbidden_chars" != x; then
56194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56196   fi
56197 
56198 
56199   windows_path="$new_path"
56200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56201     unix_path=`$CYGPATH -u "$windows_path"`
56202     new_path="$unix_path"
56203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56205     new_path="$unix_path"
56206   fi
56207 
56208   if test "x$path" != "x$new_path"; then
56209     MSVC_DLL="$new_path"
56210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56211 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56212   fi
56213 
56214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56216 
56217     else
56218       # We're on a unix platform. Hooray! :)
56219       path="$MSVC_DLL"
56220       has_space=`$ECHO "$path" | $GREP " "`
56221       if test "x$has_space" != x; then
56222         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56223 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56224         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56225       fi
56226 
56227       # Use eval to expand a potential ~
56228       eval path="$path"
56229       if test ! -f "$path" && test ! -d "$path"; then
56230         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56231       fi
56232 
56233       if test -d "$path"; then
56234         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56235       else
56236         dir="`$DIRNAME "$path"`"
56237         base="`$BASENAME "$path"`"
56238         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56239       fi
56240     fi
56241   fi
56242 
56243       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56244 $as_echo_n "checking for $DLL_NAME... " >&6; }
56245       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56246 $as_echo "$MSVC_DLL" >&6; }
56247     else
56248       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56249 $as_echo "incorrect, ignoring" >&6; }
56250       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56251 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56252     fi
56253   fi
56254 
56255       done
56256     fi
56257   fi
56258 
56259   if test "x$MSVC_DLL" = x; then
56260     # Probe: Check in the Boot JDK directory.
56261     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56262 
56263   DLL_NAME="$DLL_NAME"
56264   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56265   METHOD="well-known location in Boot JDK"
56266   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56267     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56268 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56269 
56270     # Need to check if the found msvcr is correct architecture
56271     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56272 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56273     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56274     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56275       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56276       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56277       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56278         CORRECT_MSVCR_ARCH="PE32 executable"
56279       else
56280         CORRECT_MSVCR_ARCH="PE32+ executable"
56281       fi
56282     else
56283       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56284         CORRECT_MSVCR_ARCH=386
56285       else
56286         CORRECT_MSVCR_ARCH=x86-64
56287       fi
56288     fi
56289     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56290       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56291 $as_echo "ok" >&6; }
56292       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56293 
56294   # Only process if variable expands to non-empty
56295 
56296   if test "x$MSVC_DLL" != x; then
56297     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56298 
56299   # Input might be given as Windows format, start by converting to
56300   # unix format.
56301   path="$MSVC_DLL"
56302   new_path=`$CYGPATH -u "$path"`
56303 
56304   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56305   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56306   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56307   # "foo.exe" is OK but "foo" is an error.
56308   #
56309   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56310   # It is also a way to make sure we got the proper file name for the real test later on.
56311   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56312   if test "x$test_shortpath" = x; then
56313     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56314 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56315     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56316   fi
56317 
56318   # Call helper function which possibly converts this using DOS-style short mode.
56319   # If so, the updated path is stored in $new_path.
56320 
56321   input_path="$new_path"
56322   # Check if we need to convert this using DOS-style short mode. If the path
56323   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56324   # take no chances and rewrite it.
56325   # Note: m4 eats our [], so we need to use [ and ] instead.
56326   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56327   if test "x$has_forbidden_chars" != x; then
56328     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56329     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56330     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56331     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56332       # Going to short mode and back again did indeed matter. Since short mode is
56333       # case insensitive, let's make it lowercase to improve readability.
56334       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56335       # Now convert it back to Unix-style (cygpath)
56336       input_path=`$CYGPATH -u "$shortmode_path"`
56337       new_path="$input_path"
56338     fi
56339   fi
56340 
56341   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56342   if test "x$test_cygdrive_prefix" = x; then
56343     # As a simple fix, exclude /usr/bin since it's not a real path.
56344     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56345       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56346       # a path prefixed by /cygdrive for fixpath to work.
56347       new_path="$CYGWIN_ROOT_PATH$input_path"
56348     fi
56349   fi
56350 
56351 
56352   if test "x$path" != "x$new_path"; then
56353     MSVC_DLL="$new_path"
56354     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56355 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56356   fi
56357 
56358     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56359 
56360   path="$MSVC_DLL"
56361   has_colon=`$ECHO $path | $GREP ^.:`
56362   new_path="$path"
56363   if test "x$has_colon" = x; then
56364     # Not in mixed or Windows style, start by that.
56365     new_path=`cmd //c echo $path`
56366   fi
56367 
56368 
56369   input_path="$new_path"
56370   # Check if we need to convert this using DOS-style short mode. If the path
56371   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56372   # take no chances and rewrite it.
56373   # Note: m4 eats our [], so we need to use [ and ] instead.
56374   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56375   if test "x$has_forbidden_chars" != x; then
56376     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56377     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56378   fi
56379 
56380 
56381   windows_path="$new_path"
56382   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56383     unix_path=`$CYGPATH -u "$windows_path"`
56384     new_path="$unix_path"
56385   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56386     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56387     new_path="$unix_path"
56388   fi
56389 
56390   if test "x$path" != "x$new_path"; then
56391     MSVC_DLL="$new_path"
56392     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56393 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56394   fi
56395 
56396   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56397   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56398 
56399     else
56400       # We're on a unix platform. Hooray! :)
56401       path="$MSVC_DLL"
56402       has_space=`$ECHO "$path" | $GREP " "`
56403       if test "x$has_space" != x; then
56404         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56405 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56406         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56407       fi
56408 
56409       # Use eval to expand a potential ~
56410       eval path="$path"
56411       if test ! -f "$path" && test ! -d "$path"; then
56412         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56413       fi
56414 
56415       if test -d "$path"; then
56416         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56417       else
56418         dir="`$DIRNAME "$path"`"
56419         base="`$BASENAME "$path"`"
56420         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56421       fi
56422     fi
56423   fi
56424 
56425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56426 $as_echo_n "checking for $DLL_NAME... " >&6; }
56427       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56428 $as_echo "$MSVC_DLL" >&6; }
56429     else
56430       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56431 $as_echo "incorrect, ignoring" >&6; }
56432       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56433 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56434     fi
56435   fi
56436 
56437   fi
56438 
56439   if test "x$MSVC_DLL" = x; then
56440     # Probe: Look in the Windows system32 directory
56441     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56442 
56443   windows_path="$CYGWIN_SYSTEMROOT"
56444   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56445     unix_path=`$CYGPATH -u "$windows_path"`
56446     CYGWIN_SYSTEMROOT="$unix_path"
56447   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56448     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56449     CYGWIN_SYSTEMROOT="$unix_path"
56450   fi
56451 
56452     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56453 
56454   DLL_NAME="$DLL_NAME"
56455   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56456   METHOD="well-known location in SYSTEMROOT"
56457   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56458     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56459 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56460 
56461     # Need to check if the found msvcr is correct architecture
56462     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56463 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56464     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56465     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56466       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56467       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56468       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56469         CORRECT_MSVCR_ARCH="PE32 executable"
56470       else
56471         CORRECT_MSVCR_ARCH="PE32+ executable"
56472       fi
56473     else
56474       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56475         CORRECT_MSVCR_ARCH=386
56476       else
56477         CORRECT_MSVCR_ARCH=x86-64
56478       fi
56479     fi
56480     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56481       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56482 $as_echo "ok" >&6; }
56483       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56484 
56485   # Only process if variable expands to non-empty
56486 
56487   if test "x$MSVC_DLL" != x; then
56488     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56489 
56490   # Input might be given as Windows format, start by converting to
56491   # unix format.
56492   path="$MSVC_DLL"
56493   new_path=`$CYGPATH -u "$path"`
56494 
56495   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56496   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56497   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56498   # "foo.exe" is OK but "foo" is an error.
56499   #
56500   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56501   # It is also a way to make sure we got the proper file name for the real test later on.
56502   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56503   if test "x$test_shortpath" = x; then
56504     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56505 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56506     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56507   fi
56508 
56509   # Call helper function which possibly converts this using DOS-style short mode.
56510   # If so, the updated path is stored in $new_path.
56511 
56512   input_path="$new_path"
56513   # Check if we need to convert this using DOS-style short mode. If the path
56514   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56515   # take no chances and rewrite it.
56516   # Note: m4 eats our [], so we need to use [ and ] instead.
56517   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56518   if test "x$has_forbidden_chars" != x; then
56519     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56520     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56521     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56522     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56523       # Going to short mode and back again did indeed matter. Since short mode is
56524       # case insensitive, let's make it lowercase to improve readability.
56525       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56526       # Now convert it back to Unix-style (cygpath)
56527       input_path=`$CYGPATH -u "$shortmode_path"`
56528       new_path="$input_path"
56529     fi
56530   fi
56531 
56532   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56533   if test "x$test_cygdrive_prefix" = x; then
56534     # As a simple fix, exclude /usr/bin since it's not a real path.
56535     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56536       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56537       # a path prefixed by /cygdrive for fixpath to work.
56538       new_path="$CYGWIN_ROOT_PATH$input_path"
56539     fi
56540   fi
56541 
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     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56550 
56551   path="$MSVC_DLL"
56552   has_colon=`$ECHO $path | $GREP ^.:`
56553   new_path="$path"
56554   if test "x$has_colon" = x; then
56555     # Not in mixed or Windows style, start by that.
56556     new_path=`cmd //c echo $path`
56557   fi
56558 
56559 
56560   input_path="$new_path"
56561   # Check if we need to convert this using DOS-style short mode. If the path
56562   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56563   # take no chances and rewrite it.
56564   # Note: m4 eats our [], so we need to use [ and ] instead.
56565   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56566   if test "x$has_forbidden_chars" != x; then
56567     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56568     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56569   fi
56570 
56571 
56572   windows_path="$new_path"
56573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56574     unix_path=`$CYGPATH -u "$windows_path"`
56575     new_path="$unix_path"
56576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56578     new_path="$unix_path"
56579   fi
56580 
56581   if test "x$path" != "x$new_path"; then
56582     MSVC_DLL="$new_path"
56583     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56584 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56585   fi
56586 
56587   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56588   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56589 
56590     else
56591       # We're on a unix platform. Hooray! :)
56592       path="$MSVC_DLL"
56593       has_space=`$ECHO "$path" | $GREP " "`
56594       if test "x$has_space" != x; then
56595         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56596 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56597         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56598       fi
56599 
56600       # Use eval to expand a potential ~
56601       eval path="$path"
56602       if test ! -f "$path" && test ! -d "$path"; then
56603         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56604       fi
56605 
56606       if test -d "$path"; then
56607         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56608       else
56609         dir="`$DIRNAME "$path"`"
56610         base="`$BASENAME "$path"`"
56611         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56612       fi
56613     fi
56614   fi
56615 
56616       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56617 $as_echo_n "checking for $DLL_NAME... " >&6; }
56618       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56619 $as_echo "$MSVC_DLL" >&6; }
56620     else
56621       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56622 $as_echo "incorrect, ignoring" >&6; }
56623       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56624 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56625     fi
56626   fi
56627 
56628   fi
56629 
56630   if test "x$MSVC_DLL" = x; then
56631     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56632     if test "x$VS100COMNTOOLS" != x; then
56633       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56634 
56635   windows_path="$CYGWIN_VS_TOOLS_DIR"
56636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56637     unix_path=`$CYGPATH -u "$windows_path"`
56638     CYGWIN_VS_TOOLS_DIR="$unix_path"
56639   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56640     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56641     CYGWIN_VS_TOOLS_DIR="$unix_path"
56642   fi
56643 
56644       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56645         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56646             | $GREP -i /x64/ | $HEAD --lines 1`
56647       else
56648         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56649             | $GREP -i /x86/ | $HEAD --lines 1`
56650       fi
56651 
56652   DLL_NAME="$DLL_NAME"
56653   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56654   METHOD="search of VS100COMNTOOLS"
56655   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56656     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56657 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56658 
56659     # Need to check if the found msvcr is correct architecture
56660     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56661 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56662     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56663     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56664       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56665       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56666       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56667         CORRECT_MSVCR_ARCH="PE32 executable"
56668       else
56669         CORRECT_MSVCR_ARCH="PE32+ executable"
56670       fi
56671     else
56672       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56673         CORRECT_MSVCR_ARCH=386
56674       else
56675         CORRECT_MSVCR_ARCH=x86-64
56676       fi
56677     fi
56678     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56679       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56680 $as_echo "ok" >&6; }
56681       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56682 
56683   # Only process if variable expands to non-empty
56684 
56685   if test "x$MSVC_DLL" != x; then
56686     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56687 
56688   # Input might be given as Windows format, start by converting to
56689   # unix format.
56690   path="$MSVC_DLL"
56691   new_path=`$CYGPATH -u "$path"`
56692 
56693   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56694   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56695   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56696   # "foo.exe" is OK but "foo" is an error.
56697   #
56698   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56699   # It is also a way to make sure we got the proper file name for the real test later on.
56700   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56701   if test "x$test_shortpath" = x; then
56702     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56703 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56704     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56705   fi
56706 
56707   # Call helper function which possibly converts this using DOS-style short mode.
56708   # If so, the updated path is stored in $new_path.
56709 
56710   input_path="$new_path"
56711   # Check if we need to convert this using DOS-style short mode. If the path
56712   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56713   # take no chances and rewrite it.
56714   # Note: m4 eats our [], so we need to use [ and ] instead.
56715   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56716   if test "x$has_forbidden_chars" != x; then
56717     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56718     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56719     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56720     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56721       # Going to short mode and back again did indeed matter. Since short mode is
56722       # case insensitive, let's make it lowercase to improve readability.
56723       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56724       # Now convert it back to Unix-style (cygpath)
56725       input_path=`$CYGPATH -u "$shortmode_path"`
56726       new_path="$input_path"
56727     fi
56728   fi
56729 
56730   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56731   if test "x$test_cygdrive_prefix" = x; then
56732     # As a simple fix, exclude /usr/bin since it's not a real path.
56733     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56734       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56735       # a path prefixed by /cygdrive for fixpath to work.
56736       new_path="$CYGWIN_ROOT_PATH$input_path"
56737     fi
56738   fi
56739 
56740 
56741   if test "x$path" != "x$new_path"; then
56742     MSVC_DLL="$new_path"
56743     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56744 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56745   fi
56746 
56747     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56748 
56749   path="$MSVC_DLL"
56750   has_colon=`$ECHO $path | $GREP ^.:`
56751   new_path="$path"
56752   if test "x$has_colon" = x; then
56753     # Not in mixed or Windows style, start by that.
56754     new_path=`cmd //c echo $path`
56755   fi
56756 
56757 
56758   input_path="$new_path"
56759   # Check if we need to convert this using DOS-style short mode. If the path
56760   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56761   # take no chances and rewrite it.
56762   # Note: m4 eats our [], so we need to use [ and ] instead.
56763   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56764   if test "x$has_forbidden_chars" != x; then
56765     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56766     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56767   fi
56768 
56769 
56770   windows_path="$new_path"
56771   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56772     unix_path=`$CYGPATH -u "$windows_path"`
56773     new_path="$unix_path"
56774   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56775     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56776     new_path="$unix_path"
56777   fi
56778 
56779   if test "x$path" != "x$new_path"; then
56780     MSVC_DLL="$new_path"
56781     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56782 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56783   fi
56784 
56785   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56786   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56787 
56788     else
56789       # We're on a unix platform. Hooray! :)
56790       path="$MSVC_DLL"
56791       has_space=`$ECHO "$path" | $GREP " "`
56792       if test "x$has_space" != x; then
56793         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56794 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56795         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56796       fi
56797 
56798       # Use eval to expand a potential ~
56799       eval path="$path"
56800       if test ! -f "$path" && test ! -d "$path"; then
56801         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56802       fi
56803 
56804       if test -d "$path"; then
56805         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56806       else
56807         dir="`$DIRNAME "$path"`"
56808         base="`$BASENAME "$path"`"
56809         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56810       fi
56811     fi
56812   fi
56813 
56814       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56815 $as_echo_n "checking for $DLL_NAME... " >&6; }
56816       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56817 $as_echo "$MSVC_DLL" >&6; }
56818     else
56819       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56820 $as_echo "incorrect, ignoring" >&6; }
56821       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56822 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56823     fi
56824   fi
56825 
56826     fi
56827   fi
56828 
56829   if test "x$MSVC_DLL" = x; then
56830     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56831     # (This was the original behaviour; kept since it might turn something up)
56832     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56833       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56834         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56835             | $GREP x64 | $HEAD --lines 1`
56836       else
56837         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56838             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56839         if test "x$POSSIBLE_MSVC_DLL" = x; then
56840           # We're grasping at straws now...
56841           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56842               | $HEAD --lines 1`
56843         fi
56844       fi
56845 
56846 
56847   DLL_NAME="$DLL_NAME"
56848   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56849   METHOD="search of VCINSTALLDIR"
56850   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56851     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56852 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56853 
56854     # Need to check if the found msvcr is correct architecture
56855     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56856 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56857     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56858     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56859       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56860       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56861       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56862         CORRECT_MSVCR_ARCH="PE32 executable"
56863       else
56864         CORRECT_MSVCR_ARCH="PE32+ executable"
56865       fi
56866     else
56867       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56868         CORRECT_MSVCR_ARCH=386
56869       else
56870         CORRECT_MSVCR_ARCH=x86-64
56871       fi
56872     fi
56873     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56874       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56875 $as_echo "ok" >&6; }
56876       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56877 
56878   # Only process if variable expands to non-empty
56879 
56880   if test "x$MSVC_DLL" != x; then
56881     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56882 
56883   # Input might be given as Windows format, start by converting to
56884   # unix format.
56885   path="$MSVC_DLL"
56886   new_path=`$CYGPATH -u "$path"`
56887 
56888   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56889   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56890   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56891   # "foo.exe" is OK but "foo" is an error.
56892   #
56893   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56894   # It is also a way to make sure we got the proper file name for the real test later on.
56895   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56896   if test "x$test_shortpath" = x; then
56897     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56898 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56899     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56900   fi
56901 
56902   # Call helper function which possibly converts this using DOS-style short mode.
56903   # If so, the updated path is stored in $new_path.
56904 
56905   input_path="$new_path"
56906   # Check if we need to convert this using DOS-style short mode. If the path
56907   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56908   # take no chances and rewrite it.
56909   # Note: m4 eats our [], so we need to use [ and ] instead.
56910   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56911   if test "x$has_forbidden_chars" != x; then
56912     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56913     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56914     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56915     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56916       # Going to short mode and back again did indeed matter. Since short mode is
56917       # case insensitive, let's make it lowercase to improve readability.
56918       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56919       # Now convert it back to Unix-style (cygpath)
56920       input_path=`$CYGPATH -u "$shortmode_path"`
56921       new_path="$input_path"
56922     fi
56923   fi
56924 
56925   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56926   if test "x$test_cygdrive_prefix" = x; then
56927     # As a simple fix, exclude /usr/bin since it's not a real path.
56928     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56929       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56930       # a path prefixed by /cygdrive for fixpath to work.
56931       new_path="$CYGWIN_ROOT_PATH$input_path"
56932     fi
56933   fi
56934 
56935 
56936   if test "x$path" != "x$new_path"; then
56937     MSVC_DLL="$new_path"
56938     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56939 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56940   fi
56941 
56942     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56943 
56944   path="$MSVC_DLL"
56945   has_colon=`$ECHO $path | $GREP ^.:`
56946   new_path="$path"
56947   if test "x$has_colon" = x; then
56948     # Not in mixed or Windows style, start by that.
56949     new_path=`cmd //c echo $path`
56950   fi
56951 
56952 
56953   input_path="$new_path"
56954   # Check if we need to convert this using DOS-style short mode. If the path
56955   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56956   # take no chances and rewrite it.
56957   # Note: m4 eats our [], so we need to use [ and ] instead.
56958   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56959   if test "x$has_forbidden_chars" != x; then
56960     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56961     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56962   fi
56963 
56964 
56965   windows_path="$new_path"
56966   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56967     unix_path=`$CYGPATH -u "$windows_path"`
56968     new_path="$unix_path"
56969   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56970     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56971     new_path="$unix_path"
56972   fi
56973 
56974   if test "x$path" != "x$new_path"; then
56975     MSVC_DLL="$new_path"
56976     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56977 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56978   fi
56979 
56980   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56981   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56982 
56983     else
56984       # We're on a unix platform. Hooray! :)
56985       path="$MSVC_DLL"
56986       has_space=`$ECHO "$path" | $GREP " "`
56987       if test "x$has_space" != x; then
56988         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56989 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56990         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56991       fi
56992 
56993       # Use eval to expand a potential ~
56994       eval path="$path"
56995       if test ! -f "$path" && test ! -d "$path"; then
56996         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56997       fi
56998 
56999       if test -d "$path"; then
57000         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57001       else
57002         dir="`$DIRNAME "$path"`"
57003         base="`$BASENAME "$path"`"
57004         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57005       fi
57006     fi
57007   fi
57008 
57009       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57010 $as_echo_n "checking for $DLL_NAME... " >&6; }
57011       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57012 $as_echo "$MSVC_DLL" >&6; }
57013     else
57014       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57015 $as_echo "incorrect, ignoring" >&6; }
57016       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57017 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57018     fi
57019   fi
57020 
57021     fi
57022   fi
57023 
57024   if test "x$MSVC_DLL" = x; then
57025     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57026 $as_echo_n "checking for $DLL_NAME... " >&6; }
57027     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57028 $as_echo "no" >&6; }
57029     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
57030   fi
57031 
57032     MSVCR_DLL="$MSVC_DLL"
57033   fi
57034 
57035 
57036 
57037 # Check whether --with-msvcp-dll was given.
57038 if test "${with_msvcp_dll+set}" = set; then :
57039   withval=$with_msvcp_dll;
57040 fi
57041 
57042 
57043   if test "x$MSVCP_NAME" != "x"; then
57044     if test "x$with_msvcp_dll" != x; then
57045       # If given explicitly by user, do not probe. If not present, fail directly.
57046 
57047   DLL_NAME="$MSVCP_NAME"
57048   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
57049   METHOD="--with-msvcp-dll"
57050   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57051     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57052 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57053 
57054     # Need to check if the found msvcr is correct architecture
57055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57056 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57057     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57058     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57059       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57060       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57061       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57062         CORRECT_MSVCR_ARCH="PE32 executable"
57063       else
57064         CORRECT_MSVCR_ARCH="PE32+ executable"
57065       fi
57066     else
57067       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57068         CORRECT_MSVCR_ARCH=386
57069       else
57070         CORRECT_MSVCR_ARCH=x86-64
57071       fi
57072     fi
57073     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57074       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57075 $as_echo "ok" >&6; }
57076       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57077 
57078   # Only process if variable expands to non-empty
57079 
57080   if test "x$MSVC_DLL" != x; then
57081     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57082 
57083   # Input might be given as Windows format, start by converting to
57084   # unix format.
57085   path="$MSVC_DLL"
57086   new_path=`$CYGPATH -u "$path"`
57087 
57088   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57089   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57090   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57091   # "foo.exe" is OK but "foo" is an error.
57092   #
57093   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57094   # It is also a way to make sure we got the proper file name for the real test later on.
57095   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57096   if test "x$test_shortpath" = x; then
57097     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57098 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57099     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57100   fi
57101 
57102   # Call helper function which possibly converts this using DOS-style short mode.
57103   # If so, the updated path is stored in $new_path.
57104 
57105   input_path="$new_path"
57106   # Check if we need to convert this using DOS-style short mode. If the path
57107   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57108   # take no chances and rewrite it.
57109   # Note: m4 eats our [], so we need to use [ and ] instead.
57110   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57111   if test "x$has_forbidden_chars" != x; then
57112     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57113     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57114     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57115     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57116       # Going to short mode and back again did indeed matter. Since short mode is
57117       # case insensitive, let's make it lowercase to improve readability.
57118       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57119       # Now convert it back to Unix-style (cygpath)
57120       input_path=`$CYGPATH -u "$shortmode_path"`
57121       new_path="$input_path"
57122     fi
57123   fi
57124 
57125   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57126   if test "x$test_cygdrive_prefix" = x; then
57127     # As a simple fix, exclude /usr/bin since it's not a real path.
57128     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57129       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57130       # a path prefixed by /cygdrive for fixpath to work.
57131       new_path="$CYGWIN_ROOT_PATH$input_path"
57132     fi
57133   fi
57134 
57135 
57136   if test "x$path" != "x$new_path"; then
57137     MSVC_DLL="$new_path"
57138     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57139 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57140   fi
57141 
57142     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57143 
57144   path="$MSVC_DLL"
57145   has_colon=`$ECHO $path | $GREP ^.:`
57146   new_path="$path"
57147   if test "x$has_colon" = x; then
57148     # Not in mixed or Windows style, start by that.
57149     new_path=`cmd //c echo $path`
57150   fi
57151 
57152 
57153   input_path="$new_path"
57154   # Check if we need to convert this using DOS-style short mode. If the path
57155   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57156   # take no chances and rewrite it.
57157   # Note: m4 eats our [], so we need to use [ and ] instead.
57158   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57159   if test "x$has_forbidden_chars" != x; then
57160     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57161     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57162   fi
57163 
57164 
57165   windows_path="$new_path"
57166   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57167     unix_path=`$CYGPATH -u "$windows_path"`
57168     new_path="$unix_path"
57169   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57170     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57171     new_path="$unix_path"
57172   fi
57173 
57174   if test "x$path" != "x$new_path"; then
57175     MSVC_DLL="$new_path"
57176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57177 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57178   fi
57179 
57180   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57181   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57182 
57183     else
57184       # We're on a unix platform. Hooray! :)
57185       path="$MSVC_DLL"
57186       has_space=`$ECHO "$path" | $GREP " "`
57187       if test "x$has_space" != x; then
57188         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57189 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57190         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57191       fi
57192 
57193       # Use eval to expand a potential ~
57194       eval path="$path"
57195       if test ! -f "$path" && test ! -d "$path"; then
57196         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57197       fi
57198 
57199       if test -d "$path"; then
57200         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57201       else
57202         dir="`$DIRNAME "$path"`"
57203         base="`$BASENAME "$path"`"
57204         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57205       fi
57206     fi
57207   fi
57208 
57209       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57210 $as_echo_n "checking for $DLL_NAME... " >&6; }
57211       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57212 $as_echo "$MSVC_DLL" >&6; }
57213     else
57214       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57215 $as_echo "incorrect, ignoring" >&6; }
57216       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57217 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57218     fi
57219   fi
57220 
57221       if test "x$MSVC_DLL" = x; then
57222         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
57223       fi
57224       MSVCP_DLL="$MSVC_DLL"
57225     elif test "x$DEVKIT_MSVCP_DLL" != x; then
57226 
57227   DLL_NAME="$MSVCP_NAME"
57228   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
57229   METHOD="devkit"
57230   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57231     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57232 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57233 
57234     # Need to check if the found msvcr is correct architecture
57235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57236 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57237     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57238     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57239       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57240       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57241       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57242         CORRECT_MSVCR_ARCH="PE32 executable"
57243       else
57244         CORRECT_MSVCR_ARCH="PE32+ executable"
57245       fi
57246     else
57247       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57248         CORRECT_MSVCR_ARCH=386
57249       else
57250         CORRECT_MSVCR_ARCH=x86-64
57251       fi
57252     fi
57253     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57254       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57255 $as_echo "ok" >&6; }
57256       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57257 
57258   # Only process if variable expands to non-empty
57259 
57260   if test "x$MSVC_DLL" != x; then
57261     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57262 
57263   # Input might be given as Windows format, start by converting to
57264   # unix format.
57265   path="$MSVC_DLL"
57266   new_path=`$CYGPATH -u "$path"`
57267 
57268   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57269   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57270   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57271   # "foo.exe" is OK but "foo" is an error.
57272   #
57273   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57274   # It is also a way to make sure we got the proper file name for the real test later on.
57275   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57276   if test "x$test_shortpath" = x; then
57277     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57278 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57279     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57280   fi
57281 
57282   # Call helper function which possibly converts this using DOS-style short mode.
57283   # If so, the updated path is stored in $new_path.
57284 
57285   input_path="$new_path"
57286   # Check if we need to convert this using DOS-style short mode. If the path
57287   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57288   # take no chances and rewrite it.
57289   # Note: m4 eats our [], so we need to use [ and ] instead.
57290   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57291   if test "x$has_forbidden_chars" != x; then
57292     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57293     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57294     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57295     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57296       # Going to short mode and back again did indeed matter. Since short mode is
57297       # case insensitive, let's make it lowercase to improve readability.
57298       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57299       # Now convert it back to Unix-style (cygpath)
57300       input_path=`$CYGPATH -u "$shortmode_path"`
57301       new_path="$input_path"
57302     fi
57303   fi
57304 
57305   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57306   if test "x$test_cygdrive_prefix" = x; then
57307     # As a simple fix, exclude /usr/bin since it's not a real path.
57308     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57309       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57310       # a path prefixed by /cygdrive for fixpath to work.
57311       new_path="$CYGWIN_ROOT_PATH$input_path"
57312     fi
57313   fi
57314 
57315 
57316   if test "x$path" != "x$new_path"; then
57317     MSVC_DLL="$new_path"
57318     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57319 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57320   fi
57321 
57322     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57323 
57324   path="$MSVC_DLL"
57325   has_colon=`$ECHO $path | $GREP ^.:`
57326   new_path="$path"
57327   if test "x$has_colon" = x; then
57328     # Not in mixed or Windows style, start by that.
57329     new_path=`cmd //c echo $path`
57330   fi
57331 
57332 
57333   input_path="$new_path"
57334   # Check if we need to convert this using DOS-style short mode. If the path
57335   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57336   # take no chances and rewrite it.
57337   # Note: m4 eats our [], so we need to use [ and ] instead.
57338   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57339   if test "x$has_forbidden_chars" != x; then
57340     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57341     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57342   fi
57343 
57344 
57345   windows_path="$new_path"
57346   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57347     unix_path=`$CYGPATH -u "$windows_path"`
57348     new_path="$unix_path"
57349   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57350     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57351     new_path="$unix_path"
57352   fi
57353 
57354   if test "x$path" != "x$new_path"; then
57355     MSVC_DLL="$new_path"
57356     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57357 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57358   fi
57359 
57360   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57361   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57362 
57363     else
57364       # We're on a unix platform. Hooray! :)
57365       path="$MSVC_DLL"
57366       has_space=`$ECHO "$path" | $GREP " "`
57367       if test "x$has_space" != x; then
57368         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57369 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57370         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57371       fi
57372 
57373       # Use eval to expand a potential ~
57374       eval path="$path"
57375       if test ! -f "$path" && test ! -d "$path"; then
57376         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57377       fi
57378 
57379       if test -d "$path"; then
57380         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57381       else
57382         dir="`$DIRNAME "$path"`"
57383         base="`$BASENAME "$path"`"
57384         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57385       fi
57386     fi
57387   fi
57388 
57389       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57390 $as_echo_n "checking for $DLL_NAME... " >&6; }
57391       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57392 $as_echo "$MSVC_DLL" >&6; }
57393     else
57394       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57395 $as_echo "incorrect, ignoring" >&6; }
57396       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57397 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57398     fi
57399   fi
57400 
57401       if test "x$MSVC_DLL" = x; then
57402         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
57403       fi
57404       MSVCP_DLL="$MSVC_DLL"
57405     else
57406 
57407   DLL_NAME="${MSVCP_NAME}"
57408   MSVC_DLL=
57409 
57410   if test "x$MSVC_DLL" = x; then
57411     if test "x$VCINSTALLDIR" != x; then
57412       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
57413 
57414   windows_path="$CYGWIN_VC_INSTALL_DIR"
57415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57416     unix_path=`$CYGPATH -u "$windows_path"`
57417     CYGWIN_VC_INSTALL_DIR="$unix_path"
57418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57420     CYGWIN_VC_INSTALL_DIR="$unix_path"
57421   fi
57422 
57423       if test "$VS_VERSION" -lt 2017; then
57424         # Probe: Using well-known location from Visual Studio 12.0 and older
57425         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57426           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
57427         else
57428           POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
57429         fi
57430       else
57431         # Probe: Using well-known location from VS 2017
57432         if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57433           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
57434         else
57435           POSSIBLE_MSVC_DLL="`ls $CYGWIN_VC_INSTALL_DIR/Redist/MSVC/*/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME`"
57436         fi
57437       fi
57438       # In case any of the above finds more than one file, loop over them.
57439       for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
57440         $ECHO "POSSIBLE_MSVC_DLL $possible_msvc_dll"
57441 
57442   DLL_NAME="$DLL_NAME"
57443   POSSIBLE_MSVC_DLL="$possible_msvc_dll"
57444   METHOD="well-known location in VCINSTALLDIR"
57445   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57446     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57447 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57448 
57449     # Need to check if the found msvcr is correct architecture
57450     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57451 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57452     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57453     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57454       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57455       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57456       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57457         CORRECT_MSVCR_ARCH="PE32 executable"
57458       else
57459         CORRECT_MSVCR_ARCH="PE32+ executable"
57460       fi
57461     else
57462       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57463         CORRECT_MSVCR_ARCH=386
57464       else
57465         CORRECT_MSVCR_ARCH=x86-64
57466       fi
57467     fi
57468     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57469       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57470 $as_echo "ok" >&6; }
57471       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57472 
57473   # Only process if variable expands to non-empty
57474 
57475   if test "x$MSVC_DLL" != x; then
57476     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57477 
57478   # Input might be given as Windows format, start by converting to
57479   # unix format.
57480   path="$MSVC_DLL"
57481   new_path=`$CYGPATH -u "$path"`
57482 
57483   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57484   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57485   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57486   # "foo.exe" is OK but "foo" is an error.
57487   #
57488   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57489   # It is also a way to make sure we got the proper file name for the real test later on.
57490   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57491   if test "x$test_shortpath" = x; then
57492     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57493 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57494     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57495   fi
57496 
57497   # Call helper function which possibly converts this using DOS-style short mode.
57498   # If so, the updated path is stored in $new_path.
57499 
57500   input_path="$new_path"
57501   # Check if we need to convert this using DOS-style short mode. If the path
57502   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57503   # take no chances and rewrite it.
57504   # Note: m4 eats our [], so we need to use [ and ] instead.
57505   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57506   if test "x$has_forbidden_chars" != x; then
57507     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57508     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57509     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57510     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57511       # Going to short mode and back again did indeed matter. Since short mode is
57512       # case insensitive, let's make it lowercase to improve readability.
57513       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57514       # Now convert it back to Unix-style (cygpath)
57515       input_path=`$CYGPATH -u "$shortmode_path"`
57516       new_path="$input_path"
57517     fi
57518   fi
57519 
57520   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57521   if test "x$test_cygdrive_prefix" = x; then
57522     # As a simple fix, exclude /usr/bin since it's not a real path.
57523     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57524       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57525       # a path prefixed by /cygdrive for fixpath to work.
57526       new_path="$CYGWIN_ROOT_PATH$input_path"
57527     fi
57528   fi
57529 
57530 
57531   if test "x$path" != "x$new_path"; then
57532     MSVC_DLL="$new_path"
57533     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57534 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57535   fi
57536 
57537     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57538 
57539   path="$MSVC_DLL"
57540   has_colon=`$ECHO $path | $GREP ^.:`
57541   new_path="$path"
57542   if test "x$has_colon" = x; then
57543     # Not in mixed or Windows style, start by that.
57544     new_path=`cmd //c echo $path`
57545   fi
57546 
57547 
57548   input_path="$new_path"
57549   # Check if we need to convert this using DOS-style short mode. If the path
57550   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57551   # take no chances and rewrite it.
57552   # Note: m4 eats our [], so we need to use [ and ] instead.
57553   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57554   if test "x$has_forbidden_chars" != x; then
57555     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57556     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57557   fi
57558 
57559 
57560   windows_path="$new_path"
57561   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57562     unix_path=`$CYGPATH -u "$windows_path"`
57563     new_path="$unix_path"
57564   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57565     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57566     new_path="$unix_path"
57567   fi
57568 
57569   if test "x$path" != "x$new_path"; then
57570     MSVC_DLL="$new_path"
57571     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57572 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57573   fi
57574 
57575   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57576   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57577 
57578     else
57579       # We're on a unix platform. Hooray! :)
57580       path="$MSVC_DLL"
57581       has_space=`$ECHO "$path" | $GREP " "`
57582       if test "x$has_space" != x; then
57583         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57584 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57585         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57586       fi
57587 
57588       # Use eval to expand a potential ~
57589       eval path="$path"
57590       if test ! -f "$path" && test ! -d "$path"; then
57591         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57592       fi
57593 
57594       if test -d "$path"; then
57595         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57596       else
57597         dir="`$DIRNAME "$path"`"
57598         base="`$BASENAME "$path"`"
57599         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57600       fi
57601     fi
57602   fi
57603 
57604       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57605 $as_echo_n "checking for $DLL_NAME... " >&6; }
57606       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57607 $as_echo "$MSVC_DLL" >&6; }
57608     else
57609       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57610 $as_echo "incorrect, ignoring" >&6; }
57611       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57612 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57613     fi
57614   fi
57615 
57616       done
57617     fi
57618   fi
57619 
57620   if test "x$MSVC_DLL" = x; then
57621     # Probe: Check in the Boot JDK directory.
57622     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
57623 
57624   DLL_NAME="$DLL_NAME"
57625   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57626   METHOD="well-known location in Boot JDK"
57627   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57628     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57629 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57630 
57631     # Need to check if the found msvcr is correct architecture
57632     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57633 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57634     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57635     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57636       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57637       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57638       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57639         CORRECT_MSVCR_ARCH="PE32 executable"
57640       else
57641         CORRECT_MSVCR_ARCH="PE32+ executable"
57642       fi
57643     else
57644       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57645         CORRECT_MSVCR_ARCH=386
57646       else
57647         CORRECT_MSVCR_ARCH=x86-64
57648       fi
57649     fi
57650     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57651       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57652 $as_echo "ok" >&6; }
57653       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57654 
57655   # Only process if variable expands to non-empty
57656 
57657   if test "x$MSVC_DLL" != x; then
57658     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57659 
57660   # Input might be given as Windows format, start by converting to
57661   # unix format.
57662   path="$MSVC_DLL"
57663   new_path=`$CYGPATH -u "$path"`
57664 
57665   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57666   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57667   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57668   # "foo.exe" is OK but "foo" is an error.
57669   #
57670   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57671   # It is also a way to make sure we got the proper file name for the real test later on.
57672   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57673   if test "x$test_shortpath" = x; then
57674     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57675 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57676     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57677   fi
57678 
57679   # Call helper function which possibly converts this using DOS-style short mode.
57680   # If so, the updated path is stored in $new_path.
57681 
57682   input_path="$new_path"
57683   # Check if we need to convert this using DOS-style short mode. If the path
57684   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57685   # take no chances and rewrite it.
57686   # Note: m4 eats our [], so we need to use [ and ] instead.
57687   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57688   if test "x$has_forbidden_chars" != x; then
57689     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57690     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57691     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57692     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57693       # Going to short mode and back again did indeed matter. Since short mode is
57694       # case insensitive, let's make it lowercase to improve readability.
57695       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57696       # Now convert it back to Unix-style (cygpath)
57697       input_path=`$CYGPATH -u "$shortmode_path"`
57698       new_path="$input_path"
57699     fi
57700   fi
57701 
57702   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57703   if test "x$test_cygdrive_prefix" = x; then
57704     # As a simple fix, exclude /usr/bin since it's not a real path.
57705     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57706       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57707       # a path prefixed by /cygdrive for fixpath to work.
57708       new_path="$CYGWIN_ROOT_PATH$input_path"
57709     fi
57710   fi
57711 
57712 
57713   if test "x$path" != "x$new_path"; then
57714     MSVC_DLL="$new_path"
57715     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57716 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57717   fi
57718 
57719     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57720 
57721   path="$MSVC_DLL"
57722   has_colon=`$ECHO $path | $GREP ^.:`
57723   new_path="$path"
57724   if test "x$has_colon" = x; then
57725     # Not in mixed or Windows style, start by that.
57726     new_path=`cmd //c echo $path`
57727   fi
57728 
57729 
57730   input_path="$new_path"
57731   # Check if we need to convert this using DOS-style short mode. If the path
57732   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57733   # take no chances and rewrite it.
57734   # Note: m4 eats our [], so we need to use [ and ] instead.
57735   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57736   if test "x$has_forbidden_chars" != x; then
57737     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57738     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57739   fi
57740 
57741 
57742   windows_path="$new_path"
57743   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57744     unix_path=`$CYGPATH -u "$windows_path"`
57745     new_path="$unix_path"
57746   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57747     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57748     new_path="$unix_path"
57749   fi
57750 
57751   if test "x$path" != "x$new_path"; then
57752     MSVC_DLL="$new_path"
57753     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57754 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57755   fi
57756 
57757   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57758   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57759 
57760     else
57761       # We're on a unix platform. Hooray! :)
57762       path="$MSVC_DLL"
57763       has_space=`$ECHO "$path" | $GREP " "`
57764       if test "x$has_space" != x; then
57765         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57766 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57767         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57768       fi
57769 
57770       # Use eval to expand a potential ~
57771       eval path="$path"
57772       if test ! -f "$path" && test ! -d "$path"; then
57773         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57774       fi
57775 
57776       if test -d "$path"; then
57777         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57778       else
57779         dir="`$DIRNAME "$path"`"
57780         base="`$BASENAME "$path"`"
57781         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57782       fi
57783     fi
57784   fi
57785 
57786       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57787 $as_echo_n "checking for $DLL_NAME... " >&6; }
57788       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57789 $as_echo "$MSVC_DLL" >&6; }
57790     else
57791       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57792 $as_echo "incorrect, ignoring" >&6; }
57793       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57794 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57795     fi
57796   fi
57797 
57798   fi
57799 
57800   if test "x$MSVC_DLL" = x; then
57801     # Probe: Look in the Windows system32 directory
57802     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
57803 
57804   windows_path="$CYGWIN_SYSTEMROOT"
57805   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57806     unix_path=`$CYGPATH -u "$windows_path"`
57807     CYGWIN_SYSTEMROOT="$unix_path"
57808   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57809     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57810     CYGWIN_SYSTEMROOT="$unix_path"
57811   fi
57812 
57813     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
57814 
57815   DLL_NAME="$DLL_NAME"
57816   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
57817   METHOD="well-known location in SYSTEMROOT"
57818   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
57819     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
57820 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
57821 
57822     # Need to check if the found msvcr is correct architecture
57823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
57824 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
57825     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
57826     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57827       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
57828       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
57829       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57830         CORRECT_MSVCR_ARCH="PE32 executable"
57831       else
57832         CORRECT_MSVCR_ARCH="PE32+ executable"
57833       fi
57834     else
57835       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
57836         CORRECT_MSVCR_ARCH=386
57837       else
57838         CORRECT_MSVCR_ARCH=x86-64
57839       fi
57840     fi
57841     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
57842       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
57843 $as_echo "ok" >&6; }
57844       MSVC_DLL="$POSSIBLE_MSVC_DLL"
57845 
57846   # Only process if variable expands to non-empty
57847 
57848   if test "x$MSVC_DLL" != x; then
57849     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57850 
57851   # Input might be given as Windows format, start by converting to
57852   # unix format.
57853   path="$MSVC_DLL"
57854   new_path=`$CYGPATH -u "$path"`
57855 
57856   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57857   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57858   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57859   # "foo.exe" is OK but "foo" is an error.
57860   #
57861   # This test is therefore slightly more accurate than "test -f" to check for file precense.
57862   # It is also a way to make sure we got the proper file name for the real test later on.
57863   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57864   if test "x$test_shortpath" = x; then
57865     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57866 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57867     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
57868   fi
57869 
57870   # Call helper function which possibly converts this using DOS-style short mode.
57871   # If so, the updated path is stored in $new_path.
57872 
57873   input_path="$new_path"
57874   # Check if we need to convert this using DOS-style short mode. If the path
57875   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57876   # take no chances and rewrite it.
57877   # Note: m4 eats our [], so we need to use [ and ] instead.
57878   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57879   if test "x$has_forbidden_chars" != x; then
57880     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57881     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57882     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57883     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57884       # Going to short mode and back again did indeed matter. Since short mode is
57885       # case insensitive, let's make it lowercase to improve readability.
57886       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57887       # Now convert it back to Unix-style (cygpath)
57888       input_path=`$CYGPATH -u "$shortmode_path"`
57889       new_path="$input_path"
57890     fi
57891   fi
57892 
57893   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57894   if test "x$test_cygdrive_prefix" = x; then
57895     # As a simple fix, exclude /usr/bin since it's not a real path.
57896     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57897       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57898       # a path prefixed by /cygdrive for fixpath to work.
57899       new_path="$CYGWIN_ROOT_PATH$input_path"
57900     fi
57901   fi
57902 
57903 
57904   if test "x$path" != "x$new_path"; then
57905     MSVC_DLL="$new_path"
57906     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57907 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57908   fi
57909 
57910     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57911 
57912   path="$MSVC_DLL"
57913   has_colon=`$ECHO $path | $GREP ^.:`
57914   new_path="$path"
57915   if test "x$has_colon" = x; then
57916     # Not in mixed or Windows style, start by that.
57917     new_path=`cmd //c echo $path`
57918   fi
57919 
57920 
57921   input_path="$new_path"
57922   # Check if we need to convert this using DOS-style short mode. If the path
57923   # contains just simple characters, use it. Otherwise (spaces, weird characters),
57924   # take no chances and rewrite it.
57925   # Note: m4 eats our [], so we need to use [ and ] instead.
57926   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57927   if test "x$has_forbidden_chars" != x; then
57928     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57929     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57930   fi
57931 
57932 
57933   windows_path="$new_path"
57934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57935     unix_path=`$CYGPATH -u "$windows_path"`
57936     new_path="$unix_path"
57937   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57938     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57939     new_path="$unix_path"
57940   fi
57941 
57942   if test "x$path" != "x$new_path"; then
57943     MSVC_DLL="$new_path"
57944     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
57945 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
57946   fi
57947 
57948   # Save the first 10 bytes of this path to the storage, so fixpath can work.
57949   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57950 
57951     else
57952       # We're on a unix platform. Hooray! :)
57953       path="$MSVC_DLL"
57954       has_space=`$ECHO "$path" | $GREP " "`
57955       if test "x$has_space" != x; then
57956         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
57957 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
57958         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57959       fi
57960 
57961       # Use eval to expand a potential ~
57962       eval path="$path"
57963       if test ! -f "$path" && test ! -d "$path"; then
57964         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
57965       fi
57966 
57967       if test -d "$path"; then
57968         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
57969       else
57970         dir="`$DIRNAME "$path"`"
57971         base="`$BASENAME "$path"`"
57972         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
57973       fi
57974     fi
57975   fi
57976 
57977       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
57978 $as_echo_n "checking for $DLL_NAME... " >&6; }
57979       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
57980 $as_echo "$MSVC_DLL" >&6; }
57981     else
57982       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
57983 $as_echo "incorrect, ignoring" >&6; }
57984       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
57985 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
57986     fi
57987   fi
57988 
57989   fi
57990 
57991   if test "x$MSVC_DLL" = x; then
57992     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
57993     if test "x$VS100COMNTOOLS" != x; then
57994       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
57995 
57996   windows_path="$CYGWIN_VS_TOOLS_DIR"
57997   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57998     unix_path=`$CYGPATH -u "$windows_path"`
57999     CYGWIN_VS_TOOLS_DIR="$unix_path"
58000   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58001     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58002     CYGWIN_VS_TOOLS_DIR="$unix_path"
58003   fi
58004 
58005       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58006         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
58007             | $GREP -i /x64/ | $HEAD --lines 1`
58008       else
58009         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
58010             | $GREP -i /x86/ | $HEAD --lines 1`
58011       fi
58012 
58013   DLL_NAME="$DLL_NAME"
58014   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
58015   METHOD="search of VS100COMNTOOLS"
58016   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
58017     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
58018 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
58019 
58020     # Need to check if the found msvcr is correct architecture
58021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
58022 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
58023     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
58024     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58025       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
58026       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
58027       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
58028         CORRECT_MSVCR_ARCH="PE32 executable"
58029       else
58030         CORRECT_MSVCR_ARCH="PE32+ executable"
58031       fi
58032     else
58033       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
58034         CORRECT_MSVCR_ARCH=386
58035       else
58036         CORRECT_MSVCR_ARCH=x86-64
58037       fi
58038     fi
58039     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
58040       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
58041 $as_echo "ok" >&6; }
58042       MSVC_DLL="$POSSIBLE_MSVC_DLL"
58043 
58044   # Only process if variable expands to non-empty
58045 
58046   if test "x$MSVC_DLL" != x; then
58047     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58048 
58049   # Input might be given as Windows format, start by converting to
58050   # unix format.
58051   path="$MSVC_DLL"
58052   new_path=`$CYGPATH -u "$path"`
58053 
58054   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58055   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58056   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58057   # "foo.exe" is OK but "foo" is an error.
58058   #
58059   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58060   # It is also a way to make sure we got the proper file name for the real test later on.
58061   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58062   if test "x$test_shortpath" = x; then
58063     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
58064 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
58065     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
58066   fi
58067 
58068   # Call helper function which possibly converts this using DOS-style short mode.
58069   # If so, the updated path is stored in $new_path.
58070 
58071   input_path="$new_path"
58072   # Check if we need to convert this using DOS-style short mode. If the path
58073   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58074   # take no chances and rewrite it.
58075   # Note: m4 eats our [], so we need to use [ and ] instead.
58076   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58077   if test "x$has_forbidden_chars" != x; then
58078     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58079     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58080     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58081     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58082       # Going to short mode and back again did indeed matter. Since short mode is
58083       # case insensitive, let's make it lowercase to improve readability.
58084       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58085       # Now convert it back to Unix-style (cygpath)
58086       input_path=`$CYGPATH -u "$shortmode_path"`
58087       new_path="$input_path"
58088     fi
58089   fi
58090 
58091   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58092   if test "x$test_cygdrive_prefix" = x; then
58093     # As a simple fix, exclude /usr/bin since it's not a real path.
58094     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58095       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58096       # a path prefixed by /cygdrive for fixpath to work.
58097       new_path="$CYGWIN_ROOT_PATH$input_path"
58098     fi
58099   fi
58100 
58101 
58102   if test "x$path" != "x$new_path"; then
58103     MSVC_DLL="$new_path"
58104     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
58105 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
58106   fi
58107 
58108     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58109 
58110   path="$MSVC_DLL"
58111   has_colon=`$ECHO $path | $GREP ^.:`
58112   new_path="$path"
58113   if test "x$has_colon" = x; then
58114     # Not in mixed or Windows style, start by that.
58115     new_path=`cmd //c echo $path`
58116   fi
58117 
58118 
58119   input_path="$new_path"
58120   # Check if we need to convert this using DOS-style short mode. If the path
58121   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58122   # take no chances and rewrite it.
58123   # Note: m4 eats our [], so we need to use [ and ] instead.
58124   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58125   if test "x$has_forbidden_chars" != x; then
58126     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58127     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58128   fi
58129 
58130 
58131   windows_path="$new_path"
58132   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58133     unix_path=`$CYGPATH -u "$windows_path"`
58134     new_path="$unix_path"
58135   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58136     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58137     new_path="$unix_path"
58138   fi
58139 
58140   if test "x$path" != "x$new_path"; then
58141     MSVC_DLL="$new_path"
58142     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
58143 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
58144   fi
58145 
58146   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58147   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58148 
58149     else
58150       # We're on a unix platform. Hooray! :)
58151       path="$MSVC_DLL"
58152       has_space=`$ECHO "$path" | $GREP " "`
58153       if test "x$has_space" != x; then
58154         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
58155 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
58156         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58157       fi
58158 
58159       # Use eval to expand a potential ~
58160       eval path="$path"
58161       if test ! -f "$path" && test ! -d "$path"; then
58162         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
58163       fi
58164 
58165       if test -d "$path"; then
58166         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
58167       else
58168         dir="`$DIRNAME "$path"`"
58169         base="`$BASENAME "$path"`"
58170         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
58171       fi
58172     fi
58173   fi
58174 
58175       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
58176 $as_echo_n "checking for $DLL_NAME... " >&6; }
58177       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
58178 $as_echo "$MSVC_DLL" >&6; }
58179     else
58180       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
58181 $as_echo "incorrect, ignoring" >&6; }
58182       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
58183 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
58184     fi
58185   fi
58186 
58187     fi
58188   fi
58189 
58190   if test "x$MSVC_DLL" = x; then
58191     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
58192     # (This was the original behaviour; kept since it might turn something up)
58193     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
58194       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58195         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
58196             | $GREP x64 | $HEAD --lines 1`
58197       else
58198         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
58199             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
58200         if test "x$POSSIBLE_MSVC_DLL" = x; then
58201           # We're grasping at straws now...
58202           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
58203               | $HEAD --lines 1`
58204         fi
58205       fi
58206 
58207 
58208   DLL_NAME="$DLL_NAME"
58209   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
58210   METHOD="search of VCINSTALLDIR"
58211   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
58212     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
58213 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
58214 
58215     # Need to check if the found msvcr is correct architecture
58216     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
58217 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
58218     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
58219     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58220       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
58221       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
58222       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
58223         CORRECT_MSVCR_ARCH="PE32 executable"
58224       else
58225         CORRECT_MSVCR_ARCH="PE32+ executable"
58226       fi
58227     else
58228       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
58229         CORRECT_MSVCR_ARCH=386
58230       else
58231         CORRECT_MSVCR_ARCH=x86-64
58232       fi
58233     fi
58234     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
58235       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
58236 $as_echo "ok" >&6; }
58237       MSVC_DLL="$POSSIBLE_MSVC_DLL"
58238 
58239   # Only process if variable expands to non-empty
58240 
58241   if test "x$MSVC_DLL" != x; then
58242     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58243 
58244   # Input might be given as Windows format, start by converting to
58245   # unix format.
58246   path="$MSVC_DLL"
58247   new_path=`$CYGPATH -u "$path"`
58248 
58249   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58250   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58251   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58252   # "foo.exe" is OK but "foo" is an error.
58253   #
58254   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58255   # It is also a way to make sure we got the proper file name for the real test later on.
58256   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58257   if test "x$test_shortpath" = x; then
58258     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
58259 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
58260     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
58261   fi
58262 
58263   # Call helper function which possibly converts this using DOS-style short mode.
58264   # If so, the updated path is stored in $new_path.
58265 
58266   input_path="$new_path"
58267   # Check if we need to convert this using DOS-style short mode. If the path
58268   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58269   # take no chances and rewrite it.
58270   # Note: m4 eats our [], so we need to use [ and ] instead.
58271   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58272   if test "x$has_forbidden_chars" != x; then
58273     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58274     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58275     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58276     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58277       # Going to short mode and back again did indeed matter. Since short mode is
58278       # case insensitive, let's make it lowercase to improve readability.
58279       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58280       # Now convert it back to Unix-style (cygpath)
58281       input_path=`$CYGPATH -u "$shortmode_path"`
58282       new_path="$input_path"
58283     fi
58284   fi
58285 
58286   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58287   if test "x$test_cygdrive_prefix" = x; then
58288     # As a simple fix, exclude /usr/bin since it's not a real path.
58289     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58290       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58291       # a path prefixed by /cygdrive for fixpath to work.
58292       new_path="$CYGWIN_ROOT_PATH$input_path"
58293     fi
58294   fi
58295 
58296 
58297   if test "x$path" != "x$new_path"; then
58298     MSVC_DLL="$new_path"
58299     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
58300 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
58301   fi
58302 
58303     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58304 
58305   path="$MSVC_DLL"
58306   has_colon=`$ECHO $path | $GREP ^.:`
58307   new_path="$path"
58308   if test "x$has_colon" = x; then
58309     # Not in mixed or Windows style, start by that.
58310     new_path=`cmd //c echo $path`
58311   fi
58312 
58313 
58314   input_path="$new_path"
58315   # Check if we need to convert this using DOS-style short mode. If the path
58316   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58317   # take no chances and rewrite it.
58318   # Note: m4 eats our [], so we need to use [ and ] instead.
58319   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58320   if test "x$has_forbidden_chars" != x; then
58321     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58322     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58323   fi
58324 
58325 
58326   windows_path="$new_path"
58327   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58328     unix_path=`$CYGPATH -u "$windows_path"`
58329     new_path="$unix_path"
58330   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58331     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58332     new_path="$unix_path"
58333   fi
58334 
58335   if test "x$path" != "x$new_path"; then
58336     MSVC_DLL="$new_path"
58337     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
58338 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
58339   fi
58340 
58341   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58342   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58343 
58344     else
58345       # We're on a unix platform. Hooray! :)
58346       path="$MSVC_DLL"
58347       has_space=`$ECHO "$path" | $GREP " "`
58348       if test "x$has_space" != x; then
58349         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
58350 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
58351         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58352       fi
58353 
58354       # Use eval to expand a potential ~
58355       eval path="$path"
58356       if test ! -f "$path" && test ! -d "$path"; then
58357         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
58358       fi
58359 
58360       if test -d "$path"; then
58361         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
58362       else
58363         dir="`$DIRNAME "$path"`"
58364         base="`$BASENAME "$path"`"
58365         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
58366       fi
58367     fi
58368   fi
58369 
58370       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
58371 $as_echo_n "checking for $DLL_NAME... " >&6; }
58372       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
58373 $as_echo "$MSVC_DLL" >&6; }
58374     else
58375       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
58376 $as_echo "incorrect, ignoring" >&6; }
58377       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
58378 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
58379     fi
58380   fi
58381 
58382     fi
58383   fi
58384 
58385   if test "x$MSVC_DLL" = x; then
58386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
58387 $as_echo_n "checking for $DLL_NAME... " >&6; }
58388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58389 $as_echo "no" >&6; }
58390     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
58391   fi
58392 
58393       MSVCP_DLL="$MSVC_DLL"
58394     fi
58395 
58396   fi
58397 
58398   fi
58399 
58400 
58401   if test "x$NEEDS_LIB_X11" = xfalse; then
58402     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
58403       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
58404 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
58405     fi
58406     X_CFLAGS=
58407     X_LIBS=
58408   else
58409 
58410     if test "x${with_x}" = xno; then
58411       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
58412     fi
58413 
58414     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
58415       # The user has specified a X11 base directory. Use it for includes and
58416       # libraries, unless explicitly overridden.
58417       if test "x$x_includes" = xNONE; then
58418         x_includes="${with_x}/include"
58419       fi
58420       if test "x$x_libraries" = xNONE; then
58421         x_libraries="${with_x}/lib"
58422       fi
58423     else
58424       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
58425       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
58426       # --x-libraries for the sysroot, if that seems to be correct.
58427       if test "x$SYSROOT" != "x"; then
58428         if test "x$x_includes" = xNONE; then
58429           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
58430             x_includes="$SYSROOT/usr/X11R6/include"
58431           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
58432             x_includes="$SYSROOT/usr/include"
58433           fi
58434         fi
58435         if test "x$x_libraries" = xNONE; then
58436           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
58437             x_libraries="$SYSROOT/usr/X11R6/lib"
58438           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58439             x_libraries="$SYSROOT/usr/lib64"
58440           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
58441             x_libraries="$SYSROOT/usr/lib"
58442           fi
58443         fi
58444       fi
58445     fi
58446 
58447     # Now let autoconf do it's magic
58448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
58449 $as_echo_n "checking for X... " >&6; }
58450 
58451 
58452 # Check whether --with-x was given.
58453 if test "${with_x+set}" = set; then :
58454   withval=$with_x;
58455 fi
58456 
58457 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
58458 if test "x$with_x" = xno; then
58459   # The user explicitly disabled X.
58460   have_x=disabled
58461 else
58462   case $x_includes,$x_libraries in #(
58463     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
58464     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
58465   $as_echo_n "(cached) " >&6
58466 else
58467   # One or both of the vars are not set, and there is no cached value.
58468 ac_x_includes=no ac_x_libraries=no
58469 rm -f -r conftest.dir
58470 if mkdir conftest.dir; then
58471   cd conftest.dir
58472   cat >Imakefile <<'_ACEOF'
58473 incroot:
58474         @echo incroot='${INCROOT}'
58475 usrlibdir:
58476         @echo usrlibdir='${USRLIBDIR}'
58477 libdir:
58478         @echo libdir='${LIBDIR}'
58479 _ACEOF
58480   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
58481     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
58482     for ac_var in incroot usrlibdir libdir; do
58483       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
58484     done
58485     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
58486     for ac_extension in a so sl dylib la dll; do
58487       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
58488          test -f "$ac_im_libdir/libX11.$ac_extension"; then
58489         ac_im_usrlibdir=$ac_im_libdir; break
58490       fi
58491     done
58492     # Screen out bogus values from the imake configuration.  They are
58493     # bogus both because they are the default anyway, and because
58494     # using them would break gcc on systems where it needs fixed includes.
58495     case $ac_im_incroot in
58496         /usr/include) ac_x_includes= ;;
58497         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
58498     esac
58499     case $ac_im_usrlibdir in
58500         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
58501         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
58502     esac
58503   fi
58504   cd ..
58505   rm -f -r conftest.dir
58506 fi
58507 
58508 # Standard set of common directories for X headers.
58509 # Check X11 before X11Rn because it is often a symlink to the current release.
58510 ac_x_header_dirs='
58511 /usr/X11/include
58512 /usr/X11R7/include
58513 /usr/X11R6/include
58514 /usr/X11R5/include
58515 /usr/X11R4/include
58516 
58517 /usr/include/X11
58518 /usr/include/X11R7
58519 /usr/include/X11R6
58520 /usr/include/X11R5
58521 /usr/include/X11R4
58522 
58523 /usr/local/X11/include
58524 /usr/local/X11R7/include
58525 /usr/local/X11R6/include
58526 /usr/local/X11R5/include
58527 /usr/local/X11R4/include
58528 
58529 /usr/local/include/X11
58530 /usr/local/include/X11R7
58531 /usr/local/include/X11R6
58532 /usr/local/include/X11R5
58533 /usr/local/include/X11R4
58534 
58535 /usr/X386/include
58536 /usr/x386/include
58537 /usr/XFree86/include/X11
58538 
58539 /usr/include
58540 /usr/local/include
58541 /usr/unsupported/include
58542 /usr/athena/include
58543 /usr/local/x11r5/include
58544 /usr/lpp/Xamples/include
58545 
58546 /usr/openwin/include
58547 /usr/openwin/share/include'
58548 
58549 if test "$ac_x_includes" = no; then
58550   # Guess where to find include files, by looking for Xlib.h.
58551   # First, try using that file with no special directory specified.
58552   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58553 /* end confdefs.h.  */
58554 #include <X11/Xlib.h>
58555 _ACEOF
58556 if ac_fn_cxx_try_cpp "$LINENO"; then :
58557   # We can compile using X headers with no special include directory.
58558 ac_x_includes=
58559 else
58560   for ac_dir in $ac_x_header_dirs; do
58561   if test -r "$ac_dir/X11/Xlib.h"; then
58562     ac_x_includes=$ac_dir
58563     break
58564   fi
58565 done
58566 fi
58567 rm -f conftest.err conftest.i conftest.$ac_ext
58568 fi # $ac_x_includes = no
58569 
58570 if test "$ac_x_libraries" = no; then
58571   # Check for the libraries.
58572   # See if we find them without any special options.
58573   # Don't add to $LIBS permanently.
58574   ac_save_LIBS=$LIBS
58575   LIBS="-lX11 $LIBS"
58576   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58577 /* end confdefs.h.  */
58578 #include <X11/Xlib.h>
58579 int
58580 main ()
58581 {
58582 XrmInitialize ()
58583   ;
58584   return 0;
58585 }
58586 _ACEOF
58587 if ac_fn_cxx_try_link "$LINENO"; then :
58588   LIBS=$ac_save_LIBS
58589 # We can link X programs with no special library path.
58590 ac_x_libraries=
58591 else
58592   LIBS=$ac_save_LIBS
58593 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
58594 do
58595   # Don't even attempt the hair of trying to link an X program!
58596   for ac_extension in a so sl dylib la dll; do
58597     if test -r "$ac_dir/libX11.$ac_extension"; then
58598       ac_x_libraries=$ac_dir
58599       break 2
58600     fi
58601   done
58602 done
58603 fi
58604 rm -f core conftest.err conftest.$ac_objext \
58605     conftest$ac_exeext conftest.$ac_ext
58606 fi # $ac_x_libraries = no
58607 
58608 case $ac_x_includes,$ac_x_libraries in #(
58609   no,* | *,no | *\'*)
58610     # Didn't find X, or a directory has "'" in its name.
58611     ac_cv_have_x="have_x=no";; #(
58612   *)
58613     # Record where we found X for the cache.
58614     ac_cv_have_x="have_x=yes\
58615         ac_x_includes='$ac_x_includes'\
58616         ac_x_libraries='$ac_x_libraries'"
58617 esac
58618 fi
58619 ;; #(
58620     *) have_x=yes;;
58621   esac
58622   eval "$ac_cv_have_x"
58623 fi # $with_x != no
58624 
58625 if test "$have_x" != yes; then
58626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
58627 $as_echo "$have_x" >&6; }
58628   no_x=yes
58629 else
58630   # If each of the values was on the command line, it overrides each guess.
58631   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
58632   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
58633   # Update the cache value to reflect the command line values.
58634   ac_cv_have_x="have_x=yes\
58635         ac_x_includes='$x_includes'\
58636         ac_x_libraries='$x_libraries'"
58637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
58638 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
58639 fi
58640 
58641     if test "$no_x" = yes; then
58642   # Not all programs may use this symbol, but it does not hurt to define it.
58643 
58644 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
58645 
58646   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
58647 else
58648   if test -n "$x_includes"; then
58649     X_CFLAGS="$X_CFLAGS -I$x_includes"
58650   fi
58651 
58652   # It would also be nice to do this for all -L options, not just this one.
58653   if test -n "$x_libraries"; then
58654     X_LIBS="$X_LIBS -L$x_libraries"
58655     # For Solaris; some versions of Sun CC require a space after -R and
58656     # others require no space.  Words are not sufficient . . . .
58657     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
58658 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
58659     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
58660     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
58661     ac_cxx_werror_flag=yes
58662     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58663 /* end confdefs.h.  */
58664 
58665 int
58666 main ()
58667 {
58668 
58669   ;
58670   return 0;
58671 }
58672 _ACEOF
58673 if ac_fn_cxx_try_link "$LINENO"; then :
58674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58675 $as_echo "no" >&6; }
58676        X_LIBS="$X_LIBS -R$x_libraries"
58677 else
58678   LIBS="$ac_xsave_LIBS -R $x_libraries"
58679        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58680 /* end confdefs.h.  */
58681 
58682 int
58683 main ()
58684 {
58685 
58686   ;
58687   return 0;
58688 }
58689 _ACEOF
58690 if ac_fn_cxx_try_link "$LINENO"; then :
58691   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58692 $as_echo "yes" >&6; }
58693           X_LIBS="$X_LIBS -R $x_libraries"
58694 else
58695   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
58696 $as_echo "neither works" >&6; }
58697 fi
58698 rm -f core conftest.err conftest.$ac_objext \
58699     conftest$ac_exeext conftest.$ac_ext
58700 fi
58701 rm -f core conftest.err conftest.$ac_objext \
58702     conftest$ac_exeext conftest.$ac_ext
58703     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
58704     LIBS=$ac_xsave_LIBS
58705   fi
58706 
58707   # Check for system-dependent libraries X programs must link with.
58708   # Do this before checking for the system-independent R6 libraries
58709   # (-lICE), since we may need -lsocket or whatever for X linking.
58710 
58711   if test "$ISC" = yes; then
58712     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
58713   else
58714     # Martyn Johnson says this is needed for Ultrix, if the X
58715     # libraries were built with DECnet support.  And Karl Berry says
58716     # the Alpha needs dnet_stub (dnet does not exist).
58717     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
58718     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58719 /* end confdefs.h.  */
58720 
58721 /* Override any GCC internal prototype to avoid an error.
58722    Use char because int might match the return type of a GCC
58723    builtin and then its argument prototype would still apply.  */
58724 #ifdef __cplusplus
58725 extern "C"
58726 #endif
58727 char XOpenDisplay ();
58728 int
58729 main ()
58730 {
58731 return XOpenDisplay ();
58732   ;
58733   return 0;
58734 }
58735 _ACEOF
58736 if ac_fn_cxx_try_link "$LINENO"; then :
58737 
58738 else
58739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
58740 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
58741 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
58742   $as_echo_n "(cached) " >&6
58743 else
58744   ac_check_lib_save_LIBS=$LIBS
58745 LIBS="-ldnet  $LIBS"
58746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58747 /* end confdefs.h.  */
58748 
58749 /* Override any GCC internal prototype to avoid an error.
58750    Use char because int might match the return type of a GCC
58751    builtin and then its argument prototype would still apply.  */
58752 #ifdef __cplusplus
58753 extern "C"
58754 #endif
58755 char dnet_ntoa ();
58756 int
58757 main ()
58758 {
58759 return dnet_ntoa ();
58760   ;
58761   return 0;
58762 }
58763 _ACEOF
58764 if ac_fn_cxx_try_link "$LINENO"; then :
58765   ac_cv_lib_dnet_dnet_ntoa=yes
58766 else
58767   ac_cv_lib_dnet_dnet_ntoa=no
58768 fi
58769 rm -f core conftest.err conftest.$ac_objext \
58770     conftest$ac_exeext conftest.$ac_ext
58771 LIBS=$ac_check_lib_save_LIBS
58772 fi
58773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
58774 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
58775 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
58776   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
58777 fi
58778 
58779     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
58780       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
58781 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
58782 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
58783   $as_echo_n "(cached) " >&6
58784 else
58785   ac_check_lib_save_LIBS=$LIBS
58786 LIBS="-ldnet_stub  $LIBS"
58787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58788 /* end confdefs.h.  */
58789 
58790 /* Override any GCC internal prototype to avoid an error.
58791    Use char because int might match the return type of a GCC
58792    builtin and then its argument prototype would still apply.  */
58793 #ifdef __cplusplus
58794 extern "C"
58795 #endif
58796 char dnet_ntoa ();
58797 int
58798 main ()
58799 {
58800 return dnet_ntoa ();
58801   ;
58802   return 0;
58803 }
58804 _ACEOF
58805 if ac_fn_cxx_try_link "$LINENO"; then :
58806   ac_cv_lib_dnet_stub_dnet_ntoa=yes
58807 else
58808   ac_cv_lib_dnet_stub_dnet_ntoa=no
58809 fi
58810 rm -f core conftest.err conftest.$ac_objext \
58811     conftest$ac_exeext conftest.$ac_ext
58812 LIBS=$ac_check_lib_save_LIBS
58813 fi
58814 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
58815 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
58816 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
58817   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
58818 fi
58819 
58820     fi
58821 fi
58822 rm -f core conftest.err conftest.$ac_objext \
58823     conftest$ac_exeext conftest.$ac_ext
58824     LIBS="$ac_xsave_LIBS"
58825 
58826     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
58827     # to get the SysV transport functions.
58828     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
58829     # needs -lnsl.
58830     # The nsl library prevents programs from opening the X display
58831     # on Irix 5.2, according to T.E. Dickey.
58832     # The functions gethostbyname, getservbyname, and inet_addr are
58833     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
58834     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
58835 if test "x$ac_cv_func_gethostbyname" = xyes; then :
58836 
58837 fi
58838 
58839     if test $ac_cv_func_gethostbyname = no; then
58840       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
58841 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
58842 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
58843   $as_echo_n "(cached) " >&6
58844 else
58845   ac_check_lib_save_LIBS=$LIBS
58846 LIBS="-lnsl  $LIBS"
58847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58848 /* end confdefs.h.  */
58849 
58850 /* Override any GCC internal prototype to avoid an error.
58851    Use char because int might match the return type of a GCC
58852    builtin and then its argument prototype would still apply.  */
58853 #ifdef __cplusplus
58854 extern "C"
58855 #endif
58856 char gethostbyname ();
58857 int
58858 main ()
58859 {
58860 return gethostbyname ();
58861   ;
58862   return 0;
58863 }
58864 _ACEOF
58865 if ac_fn_cxx_try_link "$LINENO"; then :
58866   ac_cv_lib_nsl_gethostbyname=yes
58867 else
58868   ac_cv_lib_nsl_gethostbyname=no
58869 fi
58870 rm -f core conftest.err conftest.$ac_objext \
58871     conftest$ac_exeext conftest.$ac_ext
58872 LIBS=$ac_check_lib_save_LIBS
58873 fi
58874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
58875 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
58876 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
58877   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
58878 fi
58879 
58880       if test $ac_cv_lib_nsl_gethostbyname = no; then
58881         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
58882 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
58883 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
58884   $as_echo_n "(cached) " >&6
58885 else
58886   ac_check_lib_save_LIBS=$LIBS
58887 LIBS="-lbsd  $LIBS"
58888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58889 /* end confdefs.h.  */
58890 
58891 /* Override any GCC internal prototype to avoid an error.
58892    Use char because int might match the return type of a GCC
58893    builtin and then its argument prototype would still apply.  */
58894 #ifdef __cplusplus
58895 extern "C"
58896 #endif
58897 char gethostbyname ();
58898 int
58899 main ()
58900 {
58901 return gethostbyname ();
58902   ;
58903   return 0;
58904 }
58905 _ACEOF
58906 if ac_fn_cxx_try_link "$LINENO"; then :
58907   ac_cv_lib_bsd_gethostbyname=yes
58908 else
58909   ac_cv_lib_bsd_gethostbyname=no
58910 fi
58911 rm -f core conftest.err conftest.$ac_objext \
58912     conftest$ac_exeext conftest.$ac_ext
58913 LIBS=$ac_check_lib_save_LIBS
58914 fi
58915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
58916 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
58917 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
58918   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
58919 fi
58920 
58921       fi
58922     fi
58923 
58924     # lieder@skyler.mavd.honeywell.com says without -lsocket,
58925     # socket/setsockopt and other routines are undefined under SCO ODT
58926     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
58927     # on later versions), says Simon Leinen: it contains gethostby*
58928     # variants that don't use the name server (or something).  -lsocket
58929     # must be given before -lnsl if both are needed.  We assume that
58930     # if connect needs -lnsl, so does gethostbyname.
58931     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
58932 if test "x$ac_cv_func_connect" = xyes; then :
58933 
58934 fi
58935 
58936     if test $ac_cv_func_connect = no; then
58937       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
58938 $as_echo_n "checking for connect in -lsocket... " >&6; }
58939 if ${ac_cv_lib_socket_connect+:} false; then :
58940   $as_echo_n "(cached) " >&6
58941 else
58942   ac_check_lib_save_LIBS=$LIBS
58943 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
58944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58945 /* end confdefs.h.  */
58946 
58947 /* Override any GCC internal prototype to avoid an error.
58948    Use char because int might match the return type of a GCC
58949    builtin and then its argument prototype would still apply.  */
58950 #ifdef __cplusplus
58951 extern "C"
58952 #endif
58953 char connect ();
58954 int
58955 main ()
58956 {
58957 return connect ();
58958   ;
58959   return 0;
58960 }
58961 _ACEOF
58962 if ac_fn_cxx_try_link "$LINENO"; then :
58963   ac_cv_lib_socket_connect=yes
58964 else
58965   ac_cv_lib_socket_connect=no
58966 fi
58967 rm -f core conftest.err conftest.$ac_objext \
58968     conftest$ac_exeext conftest.$ac_ext
58969 LIBS=$ac_check_lib_save_LIBS
58970 fi
58971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
58972 $as_echo "$ac_cv_lib_socket_connect" >&6; }
58973 if test "x$ac_cv_lib_socket_connect" = xyes; then :
58974   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
58975 fi
58976 
58977     fi
58978 
58979     # Guillermo Gomez says -lposix is necessary on A/UX.
58980     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
58981 if test "x$ac_cv_func_remove" = xyes; then :
58982 
58983 fi
58984 
58985     if test $ac_cv_func_remove = no; then
58986       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
58987 $as_echo_n "checking for remove in -lposix... " >&6; }
58988 if ${ac_cv_lib_posix_remove+:} false; then :
58989   $as_echo_n "(cached) " >&6
58990 else
58991   ac_check_lib_save_LIBS=$LIBS
58992 LIBS="-lposix  $LIBS"
58993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
58994 /* end confdefs.h.  */
58995 
58996 /* Override any GCC internal prototype to avoid an error.
58997    Use char because int might match the return type of a GCC
58998    builtin and then its argument prototype would still apply.  */
58999 #ifdef __cplusplus
59000 extern "C"
59001 #endif
59002 char remove ();
59003 int
59004 main ()
59005 {
59006 return remove ();
59007   ;
59008   return 0;
59009 }
59010 _ACEOF
59011 if ac_fn_cxx_try_link "$LINENO"; then :
59012   ac_cv_lib_posix_remove=yes
59013 else
59014   ac_cv_lib_posix_remove=no
59015 fi
59016 rm -f core conftest.err conftest.$ac_objext \
59017     conftest$ac_exeext conftest.$ac_ext
59018 LIBS=$ac_check_lib_save_LIBS
59019 fi
59020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
59021 $as_echo "$ac_cv_lib_posix_remove" >&6; }
59022 if test "x$ac_cv_lib_posix_remove" = xyes; then :
59023   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
59024 fi
59025 
59026     fi
59027 
59028     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
59029     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
59030 if test "x$ac_cv_func_shmat" = xyes; then :
59031 
59032 fi
59033 
59034     if test $ac_cv_func_shmat = no; then
59035       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
59036 $as_echo_n "checking for shmat in -lipc... " >&6; }
59037 if ${ac_cv_lib_ipc_shmat+:} false; then :
59038   $as_echo_n "(cached) " >&6
59039 else
59040   ac_check_lib_save_LIBS=$LIBS
59041 LIBS="-lipc  $LIBS"
59042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59043 /* end confdefs.h.  */
59044 
59045 /* Override any GCC internal prototype to avoid an error.
59046    Use char because int might match the return type of a GCC
59047    builtin and then its argument prototype would still apply.  */
59048 #ifdef __cplusplus
59049 extern "C"
59050 #endif
59051 char shmat ();
59052 int
59053 main ()
59054 {
59055 return shmat ();
59056   ;
59057   return 0;
59058 }
59059 _ACEOF
59060 if ac_fn_cxx_try_link "$LINENO"; then :
59061   ac_cv_lib_ipc_shmat=yes
59062 else
59063   ac_cv_lib_ipc_shmat=no
59064 fi
59065 rm -f core conftest.err conftest.$ac_objext \
59066     conftest$ac_exeext conftest.$ac_ext
59067 LIBS=$ac_check_lib_save_LIBS
59068 fi
59069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
59070 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
59071 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
59072   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
59073 fi
59074 
59075     fi
59076   fi
59077 
59078   # Check for libraries that X11R6 Xt/Xaw programs need.
59079   ac_save_LDFLAGS=$LDFLAGS
59080   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
59081   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
59082   # check for ICE first), but we must link in the order -lSM -lICE or
59083   # we get undefined symbols.  So assume we have SM if we have ICE.
59084   # These have to be linked with before -lX11, unlike the other
59085   # libraries we check for below, so use a different variable.
59086   # John Interrante, Karl Berry
59087   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
59088 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
59089 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
59090   $as_echo_n "(cached) " >&6
59091 else
59092   ac_check_lib_save_LIBS=$LIBS
59093 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
59094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59095 /* end confdefs.h.  */
59096 
59097 /* Override any GCC internal prototype to avoid an error.
59098    Use char because int might match the return type of a GCC
59099    builtin and then its argument prototype would still apply.  */
59100 #ifdef __cplusplus
59101 extern "C"
59102 #endif
59103 char IceConnectionNumber ();
59104 int
59105 main ()
59106 {
59107 return IceConnectionNumber ();
59108   ;
59109   return 0;
59110 }
59111 _ACEOF
59112 if ac_fn_cxx_try_link "$LINENO"; then :
59113   ac_cv_lib_ICE_IceConnectionNumber=yes
59114 else
59115   ac_cv_lib_ICE_IceConnectionNumber=no
59116 fi
59117 rm -f core conftest.err conftest.$ac_objext \
59118     conftest$ac_exeext conftest.$ac_ext
59119 LIBS=$ac_check_lib_save_LIBS
59120 fi
59121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
59122 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
59123 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
59124   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
59125 fi
59126 
59127   LDFLAGS=$ac_save_LDFLAGS
59128 
59129 fi
59130 
59131 
59132     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
59133     # this doesn't make sense so we remove it.
59134     if test "x$COMPILE_TYPE" = xcross; then
59135       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
59136     fi
59137 
59138     if test "x$no_x" = xyes; then
59139 
59140   # Print a helpful message on how to acquire the necessary build dependency.
59141   # x11 is the help tag: freetype, cups, alsa etc
59142   MISSING_DEPENDENCY=x11
59143 
59144   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59145     cygwin_help $MISSING_DEPENDENCY
59146   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59147     msys_help $MISSING_DEPENDENCY
59148   else
59149     PKGHANDLER_COMMAND=
59150 
59151     case $PKGHANDLER in
59152       apt-get)
59153         apt_help     $MISSING_DEPENDENCY ;;
59154       yum)
59155         yum_help     $MISSING_DEPENDENCY ;;
59156       brew)
59157         brew_help    $MISSING_DEPENDENCY ;;
59158       port)
59159         port_help    $MISSING_DEPENDENCY ;;
59160       pkgutil)
59161         pkgutil_help $MISSING_DEPENDENCY ;;
59162       pkgadd)
59163         pkgadd_help  $MISSING_DEPENDENCY ;;
59164     esac
59165 
59166     if test "x$PKGHANDLER_COMMAND" != x; then
59167       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59168     fi
59169   fi
59170 
59171       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
59172     fi
59173 
59174     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
59175       OPENWIN_HOME="/usr/openwin"
59176       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
59177       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
59178           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
59179     fi
59180 
59181     ac_ext=c
59182 ac_cpp='$CPP $CPPFLAGS'
59183 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59184 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59185 ac_compiler_gnu=$ac_cv_c_compiler_gnu
59186 
59187     OLD_CFLAGS="$CFLAGS"
59188     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
59189 
59190     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
59191     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
59192 do :
59193   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
59194 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
59195           # include <X11/Xlib.h>
59196           # include <X11/Xutil.h>
59197 
59198 
59199 "
59200 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
59201   cat >>confdefs.h <<_ACEOF
59202 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
59203 _ACEOF
59204  X11_HEADERS_OK=yes
59205 else
59206   X11_HEADERS_OK=no; break
59207 fi
59208 
59209 done
59210 
59211 
59212     if test "x$X11_HEADERS_OK" = xno; then
59213 
59214   # Print a helpful message on how to acquire the necessary build dependency.
59215   # x11 is the help tag: freetype, cups, alsa etc
59216   MISSING_DEPENDENCY=x11
59217 
59218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59219     cygwin_help $MISSING_DEPENDENCY
59220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59221     msys_help $MISSING_DEPENDENCY
59222   else
59223     PKGHANDLER_COMMAND=
59224 
59225     case $PKGHANDLER in
59226       apt-get)
59227         apt_help     $MISSING_DEPENDENCY ;;
59228       yum)
59229         yum_help     $MISSING_DEPENDENCY ;;
59230       brew)
59231         brew_help    $MISSING_DEPENDENCY ;;
59232       port)
59233         port_help    $MISSING_DEPENDENCY ;;
59234       pkgutil)
59235         pkgutil_help $MISSING_DEPENDENCY ;;
59236       pkgadd)
59237         pkgadd_help  $MISSING_DEPENDENCY ;;
59238     esac
59239 
59240     if test "x$PKGHANDLER_COMMAND" != x; then
59241       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59242     fi
59243   fi
59244 
59245       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
59246     fi
59247 
59248     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
59249     # defined in libawt_xawt.
59250     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
59251 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
59252     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
59253 /* end confdefs.h.  */
59254 #include <X11/extensions/Xrender.h>
59255 int
59256 main ()
59257 {
59258 XLinearGradient x;
59259   ;
59260   return 0;
59261 }
59262 _ACEOF
59263 if ac_fn_c_try_compile "$LINENO"; then :
59264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
59265 $as_echo "yes" >&6; }
59266 else
59267   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
59268 $as_echo "no" >&6; }
59269          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
59270 fi
59271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
59272 
59273     CFLAGS="$OLD_CFLAGS"
59274     ac_ext=cpp
59275 ac_cpp='$CXXCPP $CPPFLAGS'
59276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
59277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
59278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
59279 
59280   fi # NEEDS_LIB_X11
59281 
59282 
59283 
59284 
59285 
59286 
59287 # Check whether --with-cups was given.
59288 if test "${with_cups+set}" = set; then :
59289   withval=$with_cups;
59290 fi
59291 
59292 
59293 # Check whether --with-cups-include was given.
59294 if test "${with_cups_include+set}" = set; then :
59295   withval=$with_cups_include;
59296 fi
59297 
59298 
59299   if test "x$NEEDS_LIB_CUPS" = xfalse; then
59300     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
59301         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
59302       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
59303 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
59304     fi
59305     CUPS_CFLAGS=
59306   else
59307     CUPS_FOUND=no
59308 
59309     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
59310       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
59311     fi
59312 
59313     if test "x${with_cups}" != x; then
59314       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
59315 $as_echo_n "checking for cups headers... " >&6; }
59316       if test -s "${with_cups}/include/cups/cups.h"; then
59317         CUPS_CFLAGS="-I${with_cups}/include"
59318         CUPS_FOUND=yes
59319         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
59320 $as_echo "$CUPS_FOUND" >&6; }
59321       else
59322         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
59323       fi
59324     fi
59325     if test "x${with_cups_include}" != x; then
59326       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
59327 $as_echo_n "checking for cups headers... " >&6; }
59328       if test -s "${with_cups_include}/cups/cups.h"; then
59329         CUPS_CFLAGS="-I${with_cups_include}"
59330         CUPS_FOUND=yes
59331         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
59332 $as_echo "$CUPS_FOUND" >&6; }
59333       else
59334         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
59335       fi
59336     fi
59337     if test "x$CUPS_FOUND" = xno; then
59338       # Are the cups headers installed in the default /usr/include location?
59339       for ac_header in cups/cups.h cups/ppd.h
59340 do :
59341   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
59342 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
59343 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
59344   cat >>confdefs.h <<_ACEOF
59345 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
59346 _ACEOF
59347 
59348           CUPS_FOUND=yes
59349           CUPS_CFLAGS=
59350           DEFAULT_CUPS=yes
59351 
59352 fi
59353 
59354 done
59355 
59356     fi
59357     if test "x$CUPS_FOUND" = xno; then
59358 
59359   # Print a helpful message on how to acquire the necessary build dependency.
59360   # cups is the help tag: freetype, cups, alsa etc
59361   MISSING_DEPENDENCY=cups
59362 
59363   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59364     cygwin_help $MISSING_DEPENDENCY
59365   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59366     msys_help $MISSING_DEPENDENCY
59367   else
59368     PKGHANDLER_COMMAND=
59369 
59370     case $PKGHANDLER in
59371       apt-get)
59372         apt_help     $MISSING_DEPENDENCY ;;
59373       yum)
59374         yum_help     $MISSING_DEPENDENCY ;;
59375       brew)
59376         brew_help    $MISSING_DEPENDENCY ;;
59377       port)
59378         port_help    $MISSING_DEPENDENCY ;;
59379       pkgutil)
59380         pkgutil_help $MISSING_DEPENDENCY ;;
59381       pkgadd)
59382         pkgadd_help  $MISSING_DEPENDENCY ;;
59383     esac
59384 
59385     if test "x$PKGHANDLER_COMMAND" != x; then
59386       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59387     fi
59388   fi
59389 
59390       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
59391     fi
59392   fi
59393 
59394 
59395 
59396 
59397 
59398 # Check whether --with-fontconfig was given.
59399 if test "${with_fontconfig+set}" = set; then :
59400   withval=$with_fontconfig;
59401 fi
59402 
59403 
59404 # Check whether --with-fontconfig-include was given.
59405 if test "${with_fontconfig_include+set}" = set; then :
59406   withval=$with_fontconfig_include;
59407 fi
59408 
59409 
59410   if test "x$NEEDS_LIB_FONTCONFIG" = xfalse; then
59411     if (test "x${with_fontconfig}" != x && test "x${with_fontconfig}" != xno) || \
59412         (test "x${with_fontconfig_include}" != x && test "x${with_fontconfig_include}" != xno); then
59413       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&5
59414 $as_echo "$as_me: WARNING: fontconfig not used, so --with-fontconfig[-*] is ignored" >&2;}
59415     fi
59416     FONTCONFIG_CFLAGS=
59417   else
59418     FONTCONFIG_FOUND=no
59419 
59420     if test "x${with_fontconfig}" = xno || test "x${with_fontconfig_include}" = xno; then
59421       as_fn_error $? "It is not possible to disable the use of fontconfig. Remove the --without-fontconfig option." "$LINENO" 5
59422     fi
59423 
59424     if test "x${with_fontconfig}" != x; then
59425       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
59426 $as_echo_n "checking for fontconfig headers... " >&6; }
59427       if test -s "${with_fontconfig}/include/fontconfig/fontconfig.h"; then
59428         FONTCONFIG_CFLAGS="-I${with_fontconfig}/include"
59429         FONTCONFIG_FOUND=yes
59430         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
59431 $as_echo "$FONTCONFIG_FOUND" >&6; }
59432       else
59433         as_fn_error $? "Can't find 'include/fontconfig/fontconfig.h' under ${with_fontconfig} given with the --with-fontconfig option." "$LINENO" 5
59434       fi
59435     fi
59436     if test "x${with_fontconfig_include}" != x; then
59437       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fontconfig headers" >&5
59438 $as_echo_n "checking for fontconfig headers... " >&6; }
59439       if test -s "${with_fontconfig_include}/fontconfig/fontconfig.h"; then
59440         FONTCONFIG_CFLAGS="-I${with_fontconfig_include}"
59441         FONTCONFIG_FOUND=yes
59442         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FONTCONFIG_FOUND" >&5
59443 $as_echo "$FONTCONFIG_FOUND" >&6; }
59444       else
59445         as_fn_error $? "Can't find 'fontconfig/fontconfig.h' under ${with_fontconfig_include} given with the --with-fontconfig-include option." "$LINENO" 5
59446       fi
59447     fi
59448     if test "x$FONTCONFIG_FOUND" = xno; then
59449       # Are the fontconfig headers installed in the default /usr/include location?
59450       for ac_header in fontconfig/fontconfig.h
59451 do :
59452   ac_fn_cxx_check_header_mongrel "$LINENO" "fontconfig/fontconfig.h" "ac_cv_header_fontconfig_fontconfig_h" "$ac_includes_default"
59453 if test "x$ac_cv_header_fontconfig_fontconfig_h" = xyes; then :
59454   cat >>confdefs.h <<_ACEOF
59455 #define HAVE_FONTCONFIG_FONTCONFIG_H 1
59456 _ACEOF
59457 
59458           FONTCONFIG_FOUND=yes
59459           FONTCONFIG_CFLAGS=
59460           DEFAULT_FONTCONFIG=yes
59461 
59462 fi
59463 
59464 done
59465 
59466     fi
59467     if test "x$FONTCONFIG_FOUND" = xno; then
59468 
59469   # Print a helpful message on how to acquire the necessary build dependency.
59470   # fontconfig is the help tag: freetype, cups, alsa etc
59471   MISSING_DEPENDENCY=fontconfig
59472 
59473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59474     cygwin_help $MISSING_DEPENDENCY
59475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59476     msys_help $MISSING_DEPENDENCY
59477   else
59478     PKGHANDLER_COMMAND=
59479 
59480     case $PKGHANDLER in
59481       apt-get)
59482         apt_help     $MISSING_DEPENDENCY ;;
59483       yum)
59484         yum_help     $MISSING_DEPENDENCY ;;
59485       brew)
59486         brew_help    $MISSING_DEPENDENCY ;;
59487       port)
59488         port_help    $MISSING_DEPENDENCY ;;
59489       pkgutil)
59490         pkgutil_help $MISSING_DEPENDENCY ;;
59491       pkgadd)
59492         pkgadd_help  $MISSING_DEPENDENCY ;;
59493     esac
59494 
59495     if test "x$PKGHANDLER_COMMAND" != x; then
59496       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
59497     fi
59498   fi
59499 
59500       as_fn_error $? "Could not find fontconfig! $HELP_MSG " "$LINENO" 5
59501     fi
59502   fi
59503 
59504 
59505 
59506 
59507 
59508 # Check whether --with-freetype was given.
59509 if test "${with_freetype+set}" = set; then :
59510   withval=$with_freetype;
59511 fi
59512 
59513 
59514 # Check whether --with-freetype-include was given.
59515 if test "${with_freetype_include+set}" = set; then :
59516   withval=$with_freetype_include;
59517 fi
59518 
59519 
59520 # Check whether --with-freetype-lib was given.
59521 if test "${with_freetype_lib+set}" = set; then :
59522   withval=$with_freetype_lib;
59523 fi
59524 
59525 
59526 # Check whether --with-freetype-src was given.
59527 if test "${with_freetype_src+set}" = set; then :
59528   withval=$with_freetype_src;
59529 fi
59530 
59531   # Check whether --enable-freetype-bundling was given.
59532 if test "${enable_freetype_bundling+set}" = set; then :
59533   enableval=$enable_freetype_bundling;
59534 fi
59535 
59536 
59537 # Check whether --with-freetype-license was given.
59538 if test "${with_freetype_license+set}" = set; then :
59539   withval=$with_freetype_license;
59540 fi
59541 
59542 
59543   # Need to specify explicitly since it needs to be overridden on some versions of macosx
59544   FREETYPE_BASE_NAME=freetype
59545   FREETYPE_CFLAGS=
59546   FREETYPE_LIBS=
59547   FREETYPE_BUNDLE_LIB_PATH=
59548 
59549   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
59550     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
59551         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
59552         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
59553         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
59554       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
59555 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
59556     fi
59557     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
59558       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
59559 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
59560     fi
59561   else
59562     # freetype is needed to build; go get it!
59563 
59564     BUNDLE_FREETYPE="$enable_freetype_bundling"
59565 
59566     if  test "x$with_freetype_src" != x; then
59567       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59568         # Try to build freetype if --with-freetype-src was given on Windows
59569 
59570   FREETYPE_SRC_PATH="$with_freetype_src"
59571   BUILD_FREETYPE=yes
59572 
59573   # Check if the freetype sources are acessible..
59574   if ! test -d $FREETYPE_SRC_PATH; then
59575     { $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
59576 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59577     BUILD_FREETYPE=no
59578   fi
59579   # ..and contain a vc2010 project file
59580   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59581   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59582     { $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
59583 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59584     BUILD_FREETYPE=no
59585   fi
59586   # Now check if configure found a version of 'msbuild.exe'
59587   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59588     { $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
59589 $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;}
59590     BUILD_FREETYPE=no
59591   fi
59592 
59593   # Ready to go..
59594   if test "x$BUILD_FREETYPE" = xyes; then
59595     # msbuild requires trailing slashes for output directories
59596     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59597     freetype_lib_path_unix="$freetype_lib_path"
59598     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59599 
59600   unix_path="$vcxproj_path"
59601   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59602     windows_path=`$CYGPATH -m "$unix_path"`
59603     vcxproj_path="$windows_path"
59604   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59605     windows_path=`cmd //c echo $unix_path`
59606     vcxproj_path="$windows_path"
59607   fi
59608 
59609 
59610   unix_path="$freetype_lib_path"
59611   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59612     windows_path=`$CYGPATH -m "$unix_path"`
59613     freetype_lib_path="$windows_path"
59614   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59615     windows_path=`cmd //c echo $unix_path`
59616     freetype_lib_path="$windows_path"
59617   fi
59618 
59619 
59620   unix_path="$freetype_obj_path"
59621   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59622     windows_path=`$CYGPATH -m "$unix_path"`
59623     freetype_obj_path="$windows_path"
59624   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59625     windows_path=`cmd //c echo $unix_path`
59626     freetype_obj_path="$windows_path"
59627   fi
59628 
59629     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59630       freetype_platform=x64
59631     else
59632       freetype_platform=win32
59633     fi
59634 
59635     # The original freetype project file is for VS 2010 (i.e. 'v100'),
59636     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59637     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59638     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59639     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59640 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59641 
59642     # First we try to build the freetype.dll
59643     $ECHO -e "@echo off\n"\
59644         "$MSBUILD $vcxproj_path "\
59645         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59646         "/p:Configuration=\"Release Multithreaded\" "\
59647         "/p:Platform=$freetype_platform "\
59648         "/p:ConfigurationType=DynamicLibrary "\
59649         "/p:TargetName=freetype "\
59650         "/p:OutDir=\"$freetype_lib_path\" "\
59651         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59652     cmd /c freetype.bat
59653 
59654     if test -s "$freetype_lib_path_unix/freetype.dll"; then
59655       # If that succeeds we also build freetype.lib
59656       $ECHO -e "@echo off\n"\
59657           "$MSBUILD $vcxproj_path "\
59658           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59659           "/p:Configuration=\"Release Multithreaded\" "\
59660           "/p:Platform=$freetype_platform "\
59661           "/p:ConfigurationType=StaticLibrary "\
59662           "/p:TargetName=freetype "\
59663           "/p:OutDir=\"$freetype_lib_path\" "\
59664           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59665       cmd /c freetype.bat
59666 
59667       if test -s "$freetype_lib_path_unix/freetype.lib"; then
59668         # Once we build both, lib and dll, set freetype lib and include path appropriately
59669         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59670         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59671         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59672 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59673       else
59674         BUILD_FREETYPE=no
59675       fi
59676     else
59677       BUILD_FREETYPE=no
59678     fi
59679   fi
59680 
59681         if test "x$BUILD_FREETYPE" = xyes; then
59682           # Okay, we built it. Check that it works.
59683 
59684   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59685   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59686   METHOD="--with-freetype-src"
59687 
59688   # Let's start with an optimistic view of the world :-)
59689   FOUND_FREETYPE=yes
59690 
59691   # First look for the canonical freetype main include file ft2build.h.
59692   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59693     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59694     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59695     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59696       # Fail.
59697       FOUND_FREETYPE=no
59698     fi
59699   fi
59700 
59701   if test "x$FOUND_FREETYPE" = xyes; then
59702     # Include file found, let's continue the sanity check.
59703     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59704 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59705 
59706     # Reset to default value
59707     FREETYPE_BASE_NAME=freetype
59708     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59709     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59710       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59711           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59712         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59713         # for the .6 version explicitly.
59714         FREETYPE_BASE_NAME=freetype.6
59715         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59716         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59717 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59718       else
59719         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59720 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59721         FOUND_FREETYPE=no
59722       fi
59723     else
59724       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59725         # On Windows, we will need both .lib and .dll file.
59726         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59727           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59728 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59729           FOUND_FREETYPE=no
59730         fi
59731       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59732           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59733         # Found lib in isa dir, use that instead.
59734         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59735         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59736 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59737       fi
59738     fi
59739   fi
59740 
59741   if test "x$FOUND_FREETYPE" = xyes; then
59742 
59743   # Only process if variable expands to non-empty
59744 
59745   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59746     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59747 
59748   # Input might be given as Windows format, start by converting to
59749   # unix format.
59750   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59751   new_path=`$CYGPATH -u "$path"`
59752 
59753   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59754   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59755   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59756   # "foo.exe" is OK but "foo" is an error.
59757   #
59758   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59759   # It is also a way to make sure we got the proper file name for the real test later on.
59760   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59761   if test "x$test_shortpath" = x; then
59762     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59763 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59764     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59765   fi
59766 
59767   # Call helper function which possibly converts this using DOS-style short mode.
59768   # If so, the updated path is stored in $new_path.
59769 
59770   input_path="$new_path"
59771   # Check if we need to convert this using DOS-style short mode. If the path
59772   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59773   # take no chances and rewrite it.
59774   # Note: m4 eats our [], so we need to use [ and ] instead.
59775   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59776   if test "x$has_forbidden_chars" != x; then
59777     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59778     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59779     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59780     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59781       # Going to short mode and back again did indeed matter. Since short mode is
59782       # case insensitive, let's make it lowercase to improve readability.
59783       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59784       # Now convert it back to Unix-style (cygpath)
59785       input_path=`$CYGPATH -u "$shortmode_path"`
59786       new_path="$input_path"
59787     fi
59788   fi
59789 
59790   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59791   if test "x$test_cygdrive_prefix" = x; then
59792     # As a simple fix, exclude /usr/bin since it's not a real path.
59793     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59794       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59795       # a path prefixed by /cygdrive for fixpath to work.
59796       new_path="$CYGWIN_ROOT_PATH$input_path"
59797     fi
59798   fi
59799 
59800 
59801   if test "x$path" != "x$new_path"; then
59802     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59803     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59804 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59805   fi
59806 
59807     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59808 
59809   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59810   has_colon=`$ECHO $path | $GREP ^.:`
59811   new_path="$path"
59812   if test "x$has_colon" = x; then
59813     # Not in mixed or Windows style, start by that.
59814     new_path=`cmd //c echo $path`
59815   fi
59816 
59817 
59818   input_path="$new_path"
59819   # Check if we need to convert this using DOS-style short mode. If the path
59820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59821   # take no chances and rewrite it.
59822   # Note: m4 eats our [], so we need to use [ and ] instead.
59823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59824   if test "x$has_forbidden_chars" != x; then
59825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59826     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59827   fi
59828 
59829 
59830   windows_path="$new_path"
59831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59832     unix_path=`$CYGPATH -u "$windows_path"`
59833     new_path="$unix_path"
59834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59836     new_path="$unix_path"
59837   fi
59838 
59839   if test "x$path" != "x$new_path"; then
59840     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59841     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59842 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59843   fi
59844 
59845   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59846   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59847 
59848     else
59849       # We're on a unix platform. Hooray! :)
59850       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59851       has_space=`$ECHO "$path" | $GREP " "`
59852       if test "x$has_space" != x; then
59853         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59854 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59855         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59856       fi
59857 
59858       # Use eval to expand a potential ~
59859       eval path="$path"
59860       if test ! -f "$path" && test ! -d "$path"; then
59861         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59862       fi
59863 
59864       if test -d "$path"; then
59865         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59866       else
59867         dir="`$DIRNAME "$path"`"
59868         base="`$BASENAME "$path"`"
59869         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59870       fi
59871     fi
59872   fi
59873 
59874 
59875   # Only process if variable expands to non-empty
59876 
59877   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59878     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59879 
59880   # Input might be given as Windows format, start by converting to
59881   # unix format.
59882   path="$POTENTIAL_FREETYPE_LIB_PATH"
59883   new_path=`$CYGPATH -u "$path"`
59884 
59885   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59886   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59887   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59888   # "foo.exe" is OK but "foo" is an error.
59889   #
59890   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59891   # It is also a way to make sure we got the proper file name for the real test later on.
59892   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59893   if test "x$test_shortpath" = x; then
59894     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59895 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59896     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59897   fi
59898 
59899   # Call helper function which possibly converts this using DOS-style short mode.
59900   # If so, the updated path is stored in $new_path.
59901 
59902   input_path="$new_path"
59903   # Check if we need to convert this using DOS-style short mode. If the path
59904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59905   # take no chances and rewrite it.
59906   # Note: m4 eats our [], so we need to use [ and ] instead.
59907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59908   if test "x$has_forbidden_chars" != x; then
59909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59910     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59911     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59912     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59913       # Going to short mode and back again did indeed matter. Since short mode is
59914       # case insensitive, let's make it lowercase to improve readability.
59915       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59916       # Now convert it back to Unix-style (cygpath)
59917       input_path=`$CYGPATH -u "$shortmode_path"`
59918       new_path="$input_path"
59919     fi
59920   fi
59921 
59922   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59923   if test "x$test_cygdrive_prefix" = x; then
59924     # As a simple fix, exclude /usr/bin since it's not a real path.
59925     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59926       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59927       # a path prefixed by /cygdrive for fixpath to work.
59928       new_path="$CYGWIN_ROOT_PATH$input_path"
59929     fi
59930   fi
59931 
59932 
59933   if test "x$path" != "x$new_path"; then
59934     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59935     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59936 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59937   fi
59938 
59939     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59940 
59941   path="$POTENTIAL_FREETYPE_LIB_PATH"
59942   has_colon=`$ECHO $path | $GREP ^.:`
59943   new_path="$path"
59944   if test "x$has_colon" = x; then
59945     # Not in mixed or Windows style, start by that.
59946     new_path=`cmd //c echo $path`
59947   fi
59948 
59949 
59950   input_path="$new_path"
59951   # Check if we need to convert this using DOS-style short mode. If the path
59952   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59953   # take no chances and rewrite it.
59954   # Note: m4 eats our [], so we need to use [ and ] instead.
59955   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59956   if test "x$has_forbidden_chars" != x; then
59957     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59958     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59959   fi
59960 
59961 
59962   windows_path="$new_path"
59963   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59964     unix_path=`$CYGPATH -u "$windows_path"`
59965     new_path="$unix_path"
59966   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59967     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59968     new_path="$unix_path"
59969   fi
59970 
59971   if test "x$path" != "x$new_path"; then
59972     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59973     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59974 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59975   fi
59976 
59977   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59978   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59979 
59980     else
59981       # We're on a unix platform. Hooray! :)
59982       path="$POTENTIAL_FREETYPE_LIB_PATH"
59983       has_space=`$ECHO "$path" | $GREP " "`
59984       if test "x$has_space" != x; then
59985         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59986 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59987         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59988       fi
59989 
59990       # Use eval to expand a potential ~
59991       eval path="$path"
59992       if test ! -f "$path" && test ! -d "$path"; then
59993         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59994       fi
59995 
59996       if test -d "$path"; then
59997         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59998       else
59999         dir="`$DIRNAME "$path"`"
60000         base="`$BASENAME "$path"`"
60001         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60002       fi
60003     fi
60004   fi
60005 
60006 
60007     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60008     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60009 $as_echo_n "checking for freetype includes... " >&6; }
60010     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60011 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60012     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60013     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60014 $as_echo_n "checking for freetype libraries... " >&6; }
60015     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60016 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60017   fi
60018 
60019           if test "x$FOUND_FREETYPE" != xyes; then
60020             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
60021           fi
60022         else
60023           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
60024 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
60025           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
60026         fi
60027       else
60028         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
60029 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
60030       fi
60031     fi
60032 
60033     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
60034       # User has specified settings
60035 
60036       if test "x$BUNDLE_FREETYPE" = x; then
60037         # If not specified, default is to bundle freetype
60038         BUNDLE_FREETYPE=yes
60039       fi
60040 
60041       if test "x$with_freetype" != x; then
60042         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
60043         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
60044       fi
60045 
60046       # Allow --with-freetype-lib and --with-freetype-include to override
60047       if test "x$with_freetype_include" != x; then
60048         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
60049       fi
60050       if test "x$with_freetype_lib" != x; then
60051         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
60052       fi
60053 
60054       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60055         # Okay, we got it. Check that it works.
60056 
60057   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60058   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60059   METHOD="--with-freetype"
60060 
60061   # Let's start with an optimistic view of the world :-)
60062   FOUND_FREETYPE=yes
60063 
60064   # First look for the canonical freetype main include file ft2build.h.
60065   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60066     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60067     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60068     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60069       # Fail.
60070       FOUND_FREETYPE=no
60071     fi
60072   fi
60073 
60074   if test "x$FOUND_FREETYPE" = xyes; then
60075     # Include file found, let's continue the sanity check.
60076     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60077 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60078 
60079     # Reset to default value
60080     FREETYPE_BASE_NAME=freetype
60081     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60082     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60083       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60084           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60085         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60086         # for the .6 version explicitly.
60087         FREETYPE_BASE_NAME=freetype.6
60088         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60089         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60090 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60091       else
60092         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60093 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60094         FOUND_FREETYPE=no
60095       fi
60096     else
60097       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60098         # On Windows, we will need both .lib and .dll file.
60099         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60100           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60101 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60102           FOUND_FREETYPE=no
60103         fi
60104       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60105           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60106         # Found lib in isa dir, use that instead.
60107         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60108         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60109 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60110       fi
60111     fi
60112   fi
60113 
60114   if test "x$FOUND_FREETYPE" = xyes; then
60115 
60116   # Only process if variable expands to non-empty
60117 
60118   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60119     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60120 
60121   # Input might be given as Windows format, start by converting to
60122   # unix format.
60123   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60124   new_path=`$CYGPATH -u "$path"`
60125 
60126   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60127   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60128   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60129   # "foo.exe" is OK but "foo" is an error.
60130   #
60131   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60132   # It is also a way to make sure we got the proper file name for the real test later on.
60133   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60134   if test "x$test_shortpath" = x; then
60135     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60136 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60137     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60138   fi
60139 
60140   # Call helper function which possibly converts this using DOS-style short mode.
60141   # If so, the updated path is stored in $new_path.
60142 
60143   input_path="$new_path"
60144   # Check if we need to convert this using DOS-style short mode. If the path
60145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60146   # take no chances and rewrite it.
60147   # Note: m4 eats our [], so we need to use [ and ] instead.
60148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60149   if test "x$has_forbidden_chars" != x; then
60150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60151     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60152     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60153     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60154       # Going to short mode and back again did indeed matter. Since short mode is
60155       # case insensitive, let's make it lowercase to improve readability.
60156       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60157       # Now convert it back to Unix-style (cygpath)
60158       input_path=`$CYGPATH -u "$shortmode_path"`
60159       new_path="$input_path"
60160     fi
60161   fi
60162 
60163   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60164   if test "x$test_cygdrive_prefix" = x; then
60165     # As a simple fix, exclude /usr/bin since it's not a real path.
60166     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60167       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60168       # a path prefixed by /cygdrive for fixpath to work.
60169       new_path="$CYGWIN_ROOT_PATH$input_path"
60170     fi
60171   fi
60172 
60173 
60174   if test "x$path" != "x$new_path"; then
60175     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60177 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60178   fi
60179 
60180     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60181 
60182   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60183   has_colon=`$ECHO $path | $GREP ^.:`
60184   new_path="$path"
60185   if test "x$has_colon" = x; then
60186     # Not in mixed or Windows style, start by that.
60187     new_path=`cmd //c echo $path`
60188   fi
60189 
60190 
60191   input_path="$new_path"
60192   # Check if we need to convert this using DOS-style short mode. If the path
60193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60194   # take no chances and rewrite it.
60195   # Note: m4 eats our [], so we need to use [ and ] instead.
60196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60197   if test "x$has_forbidden_chars" != x; then
60198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60199     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60200   fi
60201 
60202 
60203   windows_path="$new_path"
60204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60205     unix_path=`$CYGPATH -u "$windows_path"`
60206     new_path="$unix_path"
60207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60209     new_path="$unix_path"
60210   fi
60211 
60212   if test "x$path" != "x$new_path"; then
60213     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60214     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60215 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60216   fi
60217 
60218   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60219   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60220 
60221     else
60222       # We're on a unix platform. Hooray! :)
60223       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60224       has_space=`$ECHO "$path" | $GREP " "`
60225       if test "x$has_space" != x; then
60226         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60227 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60228         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60229       fi
60230 
60231       # Use eval to expand a potential ~
60232       eval path="$path"
60233       if test ! -f "$path" && test ! -d "$path"; then
60234         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60235       fi
60236 
60237       if test -d "$path"; then
60238         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60239       else
60240         dir="`$DIRNAME "$path"`"
60241         base="`$BASENAME "$path"`"
60242         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60243       fi
60244     fi
60245   fi
60246 
60247 
60248   # Only process if variable expands to non-empty
60249 
60250   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60252 
60253   # Input might be given as Windows format, start by converting to
60254   # unix format.
60255   path="$POTENTIAL_FREETYPE_LIB_PATH"
60256   new_path=`$CYGPATH -u "$path"`
60257 
60258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60261   # "foo.exe" is OK but "foo" is an error.
60262   #
60263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60264   # It is also a way to make sure we got the proper file name for the real test later on.
60265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60266   if test "x$test_shortpath" = x; then
60267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60268 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60269     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60270   fi
60271 
60272   # Call helper function which possibly converts this using DOS-style short mode.
60273   # If so, the updated path is stored in $new_path.
60274 
60275   input_path="$new_path"
60276   # Check if we need to convert this using DOS-style short mode. If the path
60277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60278   # take no chances and rewrite it.
60279   # Note: m4 eats our [], so we need to use [ and ] instead.
60280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60281   if test "x$has_forbidden_chars" != x; then
60282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60286       # Going to short mode and back again did indeed matter. Since short mode is
60287       # case insensitive, let's make it lowercase to improve readability.
60288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60289       # Now convert it back to Unix-style (cygpath)
60290       input_path=`$CYGPATH -u "$shortmode_path"`
60291       new_path="$input_path"
60292     fi
60293   fi
60294 
60295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60296   if test "x$test_cygdrive_prefix" = x; then
60297     # As a simple fix, exclude /usr/bin since it's not a real path.
60298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60300       # a path prefixed by /cygdrive for fixpath to work.
60301       new_path="$CYGWIN_ROOT_PATH$input_path"
60302     fi
60303   fi
60304 
60305 
60306   if test "x$path" != "x$new_path"; then
60307     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60309 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60310   fi
60311 
60312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60313 
60314   path="$POTENTIAL_FREETYPE_LIB_PATH"
60315   has_colon=`$ECHO $path | $GREP ^.:`
60316   new_path="$path"
60317   if test "x$has_colon" = x; then
60318     # Not in mixed or Windows style, start by that.
60319     new_path=`cmd //c echo $path`
60320   fi
60321 
60322 
60323   input_path="$new_path"
60324   # Check if we need to convert this using DOS-style short mode. If the path
60325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60326   # take no chances and rewrite it.
60327   # Note: m4 eats our [], so we need to use [ and ] instead.
60328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60329   if test "x$has_forbidden_chars" != x; then
60330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60332   fi
60333 
60334 
60335   windows_path="$new_path"
60336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60337     unix_path=`$CYGPATH -u "$windows_path"`
60338     new_path="$unix_path"
60339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60341     new_path="$unix_path"
60342   fi
60343 
60344   if test "x$path" != "x$new_path"; then
60345     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60347 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60348   fi
60349 
60350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60352 
60353     else
60354       # We're on a unix platform. Hooray! :)
60355       path="$POTENTIAL_FREETYPE_LIB_PATH"
60356       has_space=`$ECHO "$path" | $GREP " "`
60357       if test "x$has_space" != x; then
60358         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60359 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60360         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60361       fi
60362 
60363       # Use eval to expand a potential ~
60364       eval path="$path"
60365       if test ! -f "$path" && test ! -d "$path"; then
60366         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60367       fi
60368 
60369       if test -d "$path"; then
60370         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60371       else
60372         dir="`$DIRNAME "$path"`"
60373         base="`$BASENAME "$path"`"
60374         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60375       fi
60376     fi
60377   fi
60378 
60379 
60380     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60382 $as_echo_n "checking for freetype includes... " >&6; }
60383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60384 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60385     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60387 $as_echo_n "checking for freetype libraries... " >&6; }
60388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60389 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60390   fi
60391 
60392         if test "x$FOUND_FREETYPE" != xyes; then
60393           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
60394         fi
60395       else
60396         # User specified only one of lib or include. This is an error.
60397         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
60398           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
60399 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
60400           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
60401         else
60402           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
60403 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
60404           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
60405         fi
60406       fi
60407     else
60408       # User did not specify settings, but we need freetype. Try to locate it.
60409 
60410       if test "x$BUNDLE_FREETYPE" = x; then
60411         # If not specified, default is to bundle freetype only on windows
60412         if test "x$OPENJDK_TARGET_OS" = xwindows; then
60413           BUNDLE_FREETYPE=yes
60414         else
60415           BUNDLE_FREETYPE=no
60416         fi
60417       fi
60418 
60419       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
60420       if test "x$SYSROOT" = x; then
60421         if test "x$FOUND_FREETYPE" != xyes; then
60422           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
60423           if test "x$PKG_CONFIG" != x; then
60424 
60425 pkg_failed=no
60426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
60427 $as_echo_n "checking for FREETYPE... " >&6; }
60428 
60429 if test -n "$FREETYPE_CFLAGS"; then
60430     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
60431  elif test -n "$PKG_CONFIG"; then
60432     if test -n "$PKG_CONFIG" && \
60433     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
60434   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
60435   ac_status=$?
60436   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60437   test $ac_status = 0; }; then
60438   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
60439 else
60440   pkg_failed=yes
60441 fi
60442  else
60443     pkg_failed=untried
60444 fi
60445 if test -n "$FREETYPE_LIBS"; then
60446     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
60447  elif test -n "$PKG_CONFIG"; then
60448     if test -n "$PKG_CONFIG" && \
60449     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
60450   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
60451   ac_status=$?
60452   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
60453   test $ac_status = 0; }; then
60454   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
60455 else
60456   pkg_failed=yes
60457 fi
60458  else
60459     pkg_failed=untried
60460 fi
60461 
60462 
60463 
60464 if test $pkg_failed = yes; then
60465 
60466 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
60467         _pkg_short_errors_supported=yes
60468 else
60469         _pkg_short_errors_supported=no
60470 fi
60471         if test $_pkg_short_errors_supported = yes; then
60472                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
60473         else
60474                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
60475         fi
60476         # Put the nasty error message in config.log where it belongs
60477         echo "$FREETYPE_PKG_ERRORS" >&5
60478 
60479         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
60480 $as_echo "no" >&6; }
60481                 FOUND_FREETYPE=no
60482 elif test $pkg_failed = untried; then
60483         FOUND_FREETYPE=no
60484 else
60485         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
60486         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
60487         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
60488 $as_echo "yes" >&6; }
60489         FOUND_FREETYPE=yes
60490 fi
60491             if test "x$FOUND_FREETYPE" = xyes; then
60492               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
60493               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
60494               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
60495               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
60496                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
60497               fi
60498               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
60499               if test "x$BUNDLE_FREETYPE" = xyes; then
60500                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
60501 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
60502                 FOUND_FREETYPE=no
60503               else
60504                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
60505 $as_echo_n "checking for freetype... " >&6; }
60506                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
60507 $as_echo "yes (using pkg-config)" >&6; }
60508               fi
60509             fi
60510           fi
60511         fi
60512       fi
60513 
60514       if test "x$FOUND_FREETYPE" != xyes; then
60515         # Check in well-known locations
60516         if test "x$OPENJDK_TARGET_OS" = xwindows; then
60517           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
60518 
60519   windows_path="$FREETYPE_BASE_DIR"
60520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60521     unix_path=`$CYGPATH -u "$windows_path"`
60522     FREETYPE_BASE_DIR="$unix_path"
60523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60525     FREETYPE_BASE_DIR="$unix_path"
60526   fi
60527 
60528 
60529   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60530   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60531   METHOD="well-known location"
60532 
60533   # Let's start with an optimistic view of the world :-)
60534   FOUND_FREETYPE=yes
60535 
60536   # First look for the canonical freetype main include file ft2build.h.
60537   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60538     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60539     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60540     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60541       # Fail.
60542       FOUND_FREETYPE=no
60543     fi
60544   fi
60545 
60546   if test "x$FOUND_FREETYPE" = xyes; then
60547     # Include file found, let's continue the sanity check.
60548     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60549 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60550 
60551     # Reset to default value
60552     FREETYPE_BASE_NAME=freetype
60553     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60554     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60555       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60556           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60557         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60558         # for the .6 version explicitly.
60559         FREETYPE_BASE_NAME=freetype.6
60560         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60561         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60562 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60563       else
60564         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60565 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60566         FOUND_FREETYPE=no
60567       fi
60568     else
60569       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60570         # On Windows, we will need both .lib and .dll file.
60571         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60572           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60573 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60574           FOUND_FREETYPE=no
60575         fi
60576       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60577           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60578         # Found lib in isa dir, use that instead.
60579         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60580         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60581 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60582       fi
60583     fi
60584   fi
60585 
60586   if test "x$FOUND_FREETYPE" = xyes; then
60587 
60588   # Only process if variable expands to non-empty
60589 
60590   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60591     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60592 
60593   # Input might be given as Windows format, start by converting to
60594   # unix format.
60595   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60596   new_path=`$CYGPATH -u "$path"`
60597 
60598   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60599   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60600   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60601   # "foo.exe" is OK but "foo" is an error.
60602   #
60603   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60604   # It is also a way to make sure we got the proper file name for the real test later on.
60605   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60606   if test "x$test_shortpath" = x; then
60607     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60608 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60609     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60610   fi
60611 
60612   # Call helper function which possibly converts this using DOS-style short mode.
60613   # If so, the updated path is stored in $new_path.
60614 
60615   input_path="$new_path"
60616   # Check if we need to convert this using DOS-style short mode. If the path
60617   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60618   # take no chances and rewrite it.
60619   # Note: m4 eats our [], so we need to use [ and ] instead.
60620   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60621   if test "x$has_forbidden_chars" != x; then
60622     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60623     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60624     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60625     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60626       # Going to short mode and back again did indeed matter. Since short mode is
60627       # case insensitive, let's make it lowercase to improve readability.
60628       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60629       # Now convert it back to Unix-style (cygpath)
60630       input_path=`$CYGPATH -u "$shortmode_path"`
60631       new_path="$input_path"
60632     fi
60633   fi
60634 
60635   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60636   if test "x$test_cygdrive_prefix" = x; then
60637     # As a simple fix, exclude /usr/bin since it's not a real path.
60638     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60639       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60640       # a path prefixed by /cygdrive for fixpath to work.
60641       new_path="$CYGWIN_ROOT_PATH$input_path"
60642     fi
60643   fi
60644 
60645 
60646   if test "x$path" != "x$new_path"; then
60647     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60648     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60649 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60650   fi
60651 
60652     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60653 
60654   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60655   has_colon=`$ECHO $path | $GREP ^.:`
60656   new_path="$path"
60657   if test "x$has_colon" = x; then
60658     # Not in mixed or Windows style, start by that.
60659     new_path=`cmd //c echo $path`
60660   fi
60661 
60662 
60663   input_path="$new_path"
60664   # Check if we need to convert this using DOS-style short mode. If the path
60665   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60666   # take no chances and rewrite it.
60667   # Note: m4 eats our [], so we need to use [ and ] instead.
60668   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60669   if test "x$has_forbidden_chars" != x; then
60670     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60671     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60672   fi
60673 
60674 
60675   windows_path="$new_path"
60676   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60677     unix_path=`$CYGPATH -u "$windows_path"`
60678     new_path="$unix_path"
60679   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60680     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60681     new_path="$unix_path"
60682   fi
60683 
60684   if test "x$path" != "x$new_path"; then
60685     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60686     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60687 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60688   fi
60689 
60690   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60691   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60692 
60693     else
60694       # We're on a unix platform. Hooray! :)
60695       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60696       has_space=`$ECHO "$path" | $GREP " "`
60697       if test "x$has_space" != x; then
60698         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60699 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60700         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60701       fi
60702 
60703       # Use eval to expand a potential ~
60704       eval path="$path"
60705       if test ! -f "$path" && test ! -d "$path"; then
60706         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60707       fi
60708 
60709       if test -d "$path"; then
60710         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60711       else
60712         dir="`$DIRNAME "$path"`"
60713         base="`$BASENAME "$path"`"
60714         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60715       fi
60716     fi
60717   fi
60718 
60719 
60720   # Only process if variable expands to non-empty
60721 
60722   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60723     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60724 
60725   # Input might be given as Windows format, start by converting to
60726   # unix format.
60727   path="$POTENTIAL_FREETYPE_LIB_PATH"
60728   new_path=`$CYGPATH -u "$path"`
60729 
60730   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60731   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60732   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60733   # "foo.exe" is OK but "foo" is an error.
60734   #
60735   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60736   # It is also a way to make sure we got the proper file name for the real test later on.
60737   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60738   if test "x$test_shortpath" = x; then
60739     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60740 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60741     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60742   fi
60743 
60744   # Call helper function which possibly converts this using DOS-style short mode.
60745   # If so, the updated path is stored in $new_path.
60746 
60747   input_path="$new_path"
60748   # Check if we need to convert this using DOS-style short mode. If the path
60749   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60750   # take no chances and rewrite it.
60751   # Note: m4 eats our [], so we need to use [ and ] instead.
60752   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60753   if test "x$has_forbidden_chars" != x; then
60754     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60755     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60756     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60757     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60758       # Going to short mode and back again did indeed matter. Since short mode is
60759       # case insensitive, let's make it lowercase to improve readability.
60760       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60761       # Now convert it back to Unix-style (cygpath)
60762       input_path=`$CYGPATH -u "$shortmode_path"`
60763       new_path="$input_path"
60764     fi
60765   fi
60766 
60767   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60768   if test "x$test_cygdrive_prefix" = x; then
60769     # As a simple fix, exclude /usr/bin since it's not a real path.
60770     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60771       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60772       # a path prefixed by /cygdrive for fixpath to work.
60773       new_path="$CYGWIN_ROOT_PATH$input_path"
60774     fi
60775   fi
60776 
60777 
60778   if test "x$path" != "x$new_path"; then
60779     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60780     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60781 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60782   fi
60783 
60784     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60785 
60786   path="$POTENTIAL_FREETYPE_LIB_PATH"
60787   has_colon=`$ECHO $path | $GREP ^.:`
60788   new_path="$path"
60789   if test "x$has_colon" = x; then
60790     # Not in mixed or Windows style, start by that.
60791     new_path=`cmd //c echo $path`
60792   fi
60793 
60794 
60795   input_path="$new_path"
60796   # Check if we need to convert this using DOS-style short mode. If the path
60797   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60798   # take no chances and rewrite it.
60799   # Note: m4 eats our [], so we need to use [ and ] instead.
60800   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60801   if test "x$has_forbidden_chars" != x; then
60802     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60803     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60804   fi
60805 
60806 
60807   windows_path="$new_path"
60808   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60809     unix_path=`$CYGPATH -u "$windows_path"`
60810     new_path="$unix_path"
60811   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60812     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60813     new_path="$unix_path"
60814   fi
60815 
60816   if test "x$path" != "x$new_path"; then
60817     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60818     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60819 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60820   fi
60821 
60822   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60823   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60824 
60825     else
60826       # We're on a unix platform. Hooray! :)
60827       path="$POTENTIAL_FREETYPE_LIB_PATH"
60828       has_space=`$ECHO "$path" | $GREP " "`
60829       if test "x$has_space" != x; then
60830         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60831 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60832         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60833       fi
60834 
60835       # Use eval to expand a potential ~
60836       eval path="$path"
60837       if test ! -f "$path" && test ! -d "$path"; then
60838         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60839       fi
60840 
60841       if test -d "$path"; then
60842         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60843       else
60844         dir="`$DIRNAME "$path"`"
60845         base="`$BASENAME "$path"`"
60846         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60847       fi
60848     fi
60849   fi
60850 
60851 
60852     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60853     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60854 $as_echo_n "checking for freetype includes... " >&6; }
60855     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60856 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60857     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60858     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60859 $as_echo_n "checking for freetype libraries... " >&6; }
60860     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60861 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60862   fi
60863 
60864           if test "x$FOUND_FREETYPE" != xyes; then
60865             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
60866 
60867   windows_path="$FREETYPE_BASE_DIR"
60868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60869     unix_path=`$CYGPATH -u "$windows_path"`
60870     FREETYPE_BASE_DIR="$unix_path"
60871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60873     FREETYPE_BASE_DIR="$unix_path"
60874   fi
60875 
60876 
60877   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60878   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60879   METHOD="well-known location"
60880 
60881   # Let's start with an optimistic view of the world :-)
60882   FOUND_FREETYPE=yes
60883 
60884   # First look for the canonical freetype main include file ft2build.h.
60885   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60886     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60887     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60888     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60889       # Fail.
60890       FOUND_FREETYPE=no
60891     fi
60892   fi
60893 
60894   if test "x$FOUND_FREETYPE" = xyes; then
60895     # Include file found, let's continue the sanity check.
60896     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60897 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60898 
60899     # Reset to default value
60900     FREETYPE_BASE_NAME=freetype
60901     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60902     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60903       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60904           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60905         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60906         # for the .6 version explicitly.
60907         FREETYPE_BASE_NAME=freetype.6
60908         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60909         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60910 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60911       else
60912         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60913 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60914         FOUND_FREETYPE=no
60915       fi
60916     else
60917       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60918         # On Windows, we will need both .lib and .dll file.
60919         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60920           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60921 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60922           FOUND_FREETYPE=no
60923         fi
60924       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60925           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60926         # Found lib in isa dir, use that instead.
60927         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60928         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60929 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60930       fi
60931     fi
60932   fi
60933 
60934   if test "x$FOUND_FREETYPE" = xyes; then
60935 
60936   # Only process if variable expands to non-empty
60937 
60938   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60940 
60941   # Input might be given as Windows format, start by converting to
60942   # unix format.
60943   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60944   new_path=`$CYGPATH -u "$path"`
60945 
60946   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60947   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60948   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60949   # "foo.exe" is OK but "foo" is an error.
60950   #
60951   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60952   # It is also a way to make sure we got the proper file name for the real test later on.
60953   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60954   if test "x$test_shortpath" = x; then
60955     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60956 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60957     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60958   fi
60959 
60960   # Call helper function which possibly converts this using DOS-style short mode.
60961   # If so, the updated path is stored in $new_path.
60962 
60963   input_path="$new_path"
60964   # Check if we need to convert this using DOS-style short mode. If the path
60965   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60966   # take no chances and rewrite it.
60967   # Note: m4 eats our [], so we need to use [ and ] instead.
60968   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60969   if test "x$has_forbidden_chars" != x; then
60970     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60971     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60972     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60973     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60974       # Going to short mode and back again did indeed matter. Since short mode is
60975       # case insensitive, let's make it lowercase to improve readability.
60976       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60977       # Now convert it back to Unix-style (cygpath)
60978       input_path=`$CYGPATH -u "$shortmode_path"`
60979       new_path="$input_path"
60980     fi
60981   fi
60982 
60983   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60984   if test "x$test_cygdrive_prefix" = x; then
60985     # As a simple fix, exclude /usr/bin since it's not a real path.
60986     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60987       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60988       # a path prefixed by /cygdrive for fixpath to work.
60989       new_path="$CYGWIN_ROOT_PATH$input_path"
60990     fi
60991   fi
60992 
60993 
60994   if test "x$path" != "x$new_path"; then
60995     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60996     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60997 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60998   fi
60999 
61000     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61001 
61002   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61003   has_colon=`$ECHO $path | $GREP ^.:`
61004   new_path="$path"
61005   if test "x$has_colon" = x; then
61006     # Not in mixed or Windows style, start by that.
61007     new_path=`cmd //c echo $path`
61008   fi
61009 
61010 
61011   input_path="$new_path"
61012   # Check if we need to convert this using DOS-style short mode. If the path
61013   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61014   # take no chances and rewrite it.
61015   # Note: m4 eats our [], so we need to use [ and ] instead.
61016   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61017   if test "x$has_forbidden_chars" != x; then
61018     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61019     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61020   fi
61021 
61022 
61023   windows_path="$new_path"
61024   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61025     unix_path=`$CYGPATH -u "$windows_path"`
61026     new_path="$unix_path"
61027   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61028     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61029     new_path="$unix_path"
61030   fi
61031 
61032   if test "x$path" != "x$new_path"; then
61033     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61034     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61035 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61036   fi
61037 
61038   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61039   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61040 
61041     else
61042       # We're on a unix platform. Hooray! :)
61043       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61044       has_space=`$ECHO "$path" | $GREP " "`
61045       if test "x$has_space" != x; then
61046         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61047 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61048         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61049       fi
61050 
61051       # Use eval to expand a potential ~
61052       eval path="$path"
61053       if test ! -f "$path" && test ! -d "$path"; then
61054         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61055       fi
61056 
61057       if test -d "$path"; then
61058         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61059       else
61060         dir="`$DIRNAME "$path"`"
61061         base="`$BASENAME "$path"`"
61062         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61063       fi
61064     fi
61065   fi
61066 
61067 
61068   # Only process if variable expands to non-empty
61069 
61070   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61071     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61072 
61073   # Input might be given as Windows format, start by converting to
61074   # unix format.
61075   path="$POTENTIAL_FREETYPE_LIB_PATH"
61076   new_path=`$CYGPATH -u "$path"`
61077 
61078   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61079   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61080   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61081   # "foo.exe" is OK but "foo" is an error.
61082   #
61083   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61084   # It is also a way to make sure we got the proper file name for the real test later on.
61085   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61086   if test "x$test_shortpath" = x; then
61087     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61088 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61089     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61090   fi
61091 
61092   # Call helper function which possibly converts this using DOS-style short mode.
61093   # If so, the updated path is stored in $new_path.
61094 
61095   input_path="$new_path"
61096   # Check if we need to convert this using DOS-style short mode. If the path
61097   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61098   # take no chances and rewrite it.
61099   # Note: m4 eats our [], so we need to use [ and ] instead.
61100   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61101   if test "x$has_forbidden_chars" != x; then
61102     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61103     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61104     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61105     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61106       # Going to short mode and back again did indeed matter. Since short mode is
61107       # case insensitive, let's make it lowercase to improve readability.
61108       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61109       # Now convert it back to Unix-style (cygpath)
61110       input_path=`$CYGPATH -u "$shortmode_path"`
61111       new_path="$input_path"
61112     fi
61113   fi
61114 
61115   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61116   if test "x$test_cygdrive_prefix" = x; then
61117     # As a simple fix, exclude /usr/bin since it's not a real path.
61118     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61119       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61120       # a path prefixed by /cygdrive for fixpath to work.
61121       new_path="$CYGWIN_ROOT_PATH$input_path"
61122     fi
61123   fi
61124 
61125 
61126   if test "x$path" != "x$new_path"; then
61127     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61128     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61129 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61130   fi
61131 
61132     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61133 
61134   path="$POTENTIAL_FREETYPE_LIB_PATH"
61135   has_colon=`$ECHO $path | $GREP ^.:`
61136   new_path="$path"
61137   if test "x$has_colon" = x; then
61138     # Not in mixed or Windows style, start by that.
61139     new_path=`cmd //c echo $path`
61140   fi
61141 
61142 
61143   input_path="$new_path"
61144   # Check if we need to convert this using DOS-style short mode. If the path
61145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61146   # take no chances and rewrite it.
61147   # Note: m4 eats our [], so we need to use [ and ] instead.
61148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61149   if test "x$has_forbidden_chars" != x; then
61150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61151     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61152   fi
61153 
61154 
61155   windows_path="$new_path"
61156   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61157     unix_path=`$CYGPATH -u "$windows_path"`
61158     new_path="$unix_path"
61159   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61160     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61161     new_path="$unix_path"
61162   fi
61163 
61164   if test "x$path" != "x$new_path"; then
61165     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61166     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61167 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61168   fi
61169 
61170   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61171   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61172 
61173     else
61174       # We're on a unix platform. Hooray! :)
61175       path="$POTENTIAL_FREETYPE_LIB_PATH"
61176       has_space=`$ECHO "$path" | $GREP " "`
61177       if test "x$has_space" != x; then
61178         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61179 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61180         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61181       fi
61182 
61183       # Use eval to expand a potential ~
61184       eval path="$path"
61185       if test ! -f "$path" && test ! -d "$path"; then
61186         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61187       fi
61188 
61189       if test -d "$path"; then
61190         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61191       else
61192         dir="`$DIRNAME "$path"`"
61193         base="`$BASENAME "$path"`"
61194         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61195       fi
61196     fi
61197   fi
61198 
61199 
61200     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61201     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61202 $as_echo_n "checking for freetype includes... " >&6; }
61203     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61204 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61205     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61206     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61207 $as_echo_n "checking for freetype libraries... " >&6; }
61208     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61209 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61210   fi
61211 
61212           fi
61213           if test "x$FOUND_FREETYPE" != xyes; then
61214             FREETYPE_BASE_DIR="$HOME/freetype"
61215 
61216   windows_path="$FREETYPE_BASE_DIR"
61217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61218     unix_path=`$CYGPATH -u "$windows_path"`
61219     FREETYPE_BASE_DIR="$unix_path"
61220   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61221     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61222     FREETYPE_BASE_DIR="$unix_path"
61223   fi
61224 
61225             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61226 
61227   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61228   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
61229   METHOD="well-known location"
61230 
61231   # Let's start with an optimistic view of the world :-)
61232   FOUND_FREETYPE=yes
61233 
61234   # First look for the canonical freetype main include file ft2build.h.
61235   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61236     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61237     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61238     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61239       # Fail.
61240       FOUND_FREETYPE=no
61241     fi
61242   fi
61243 
61244   if test "x$FOUND_FREETYPE" = xyes; then
61245     # Include file found, let's continue the sanity check.
61246     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61247 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61248 
61249     # Reset to default value
61250     FREETYPE_BASE_NAME=freetype
61251     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61252     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61253       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61254           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61255         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61256         # for the .6 version explicitly.
61257         FREETYPE_BASE_NAME=freetype.6
61258         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61259         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61260 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61261       else
61262         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61263 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61264         FOUND_FREETYPE=no
61265       fi
61266     else
61267       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61268         # On Windows, we will need both .lib and .dll file.
61269         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61270           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61271 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61272           FOUND_FREETYPE=no
61273         fi
61274       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61275           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61276         # Found lib in isa dir, use that instead.
61277         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61278         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61279 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61280       fi
61281     fi
61282   fi
61283 
61284   if test "x$FOUND_FREETYPE" = xyes; then
61285 
61286   # Only process if variable expands to non-empty
61287 
61288   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61289     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61290 
61291   # Input might be given as Windows format, start by converting to
61292   # unix format.
61293   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61294   new_path=`$CYGPATH -u "$path"`
61295 
61296   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61297   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61298   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61299   # "foo.exe" is OK but "foo" is an error.
61300   #
61301   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61302   # It is also a way to make sure we got the proper file name for the real test later on.
61303   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61304   if test "x$test_shortpath" = x; then
61305     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61306 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61307     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61308   fi
61309 
61310   # Call helper function which possibly converts this using DOS-style short mode.
61311   # If so, the updated path is stored in $new_path.
61312 
61313   input_path="$new_path"
61314   # Check if we need to convert this using DOS-style short mode. If the path
61315   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61316   # take no chances and rewrite it.
61317   # Note: m4 eats our [], so we need to use [ and ] instead.
61318   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61319   if test "x$has_forbidden_chars" != x; then
61320     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61321     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61322     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61323     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61324       # Going to short mode and back again did indeed matter. Since short mode is
61325       # case insensitive, let's make it lowercase to improve readability.
61326       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61327       # Now convert it back to Unix-style (cygpath)
61328       input_path=`$CYGPATH -u "$shortmode_path"`
61329       new_path="$input_path"
61330     fi
61331   fi
61332 
61333   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61334   if test "x$test_cygdrive_prefix" = x; then
61335     # As a simple fix, exclude /usr/bin since it's not a real path.
61336     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61337       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61338       # a path prefixed by /cygdrive for fixpath to work.
61339       new_path="$CYGWIN_ROOT_PATH$input_path"
61340     fi
61341   fi
61342 
61343 
61344   if test "x$path" != "x$new_path"; then
61345     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61347 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61348   fi
61349 
61350     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61351 
61352   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61353   has_colon=`$ECHO $path | $GREP ^.:`
61354   new_path="$path"
61355   if test "x$has_colon" = x; then
61356     # Not in mixed or Windows style, start by that.
61357     new_path=`cmd //c echo $path`
61358   fi
61359 
61360 
61361   input_path="$new_path"
61362   # Check if we need to convert this using DOS-style short mode. If the path
61363   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61364   # take no chances and rewrite it.
61365   # Note: m4 eats our [], so we need to use [ and ] instead.
61366   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61367   if test "x$has_forbidden_chars" != x; then
61368     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61369     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61370   fi
61371 
61372 
61373   windows_path="$new_path"
61374   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61375     unix_path=`$CYGPATH -u "$windows_path"`
61376     new_path="$unix_path"
61377   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61378     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61379     new_path="$unix_path"
61380   fi
61381 
61382   if test "x$path" != "x$new_path"; then
61383     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61384     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61385 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61386   fi
61387 
61388   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61389   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61390 
61391     else
61392       # We're on a unix platform. Hooray! :)
61393       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61394       has_space=`$ECHO "$path" | $GREP " "`
61395       if test "x$has_space" != x; then
61396         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61397 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61398         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61399       fi
61400 
61401       # Use eval to expand a potential ~
61402       eval path="$path"
61403       if test ! -f "$path" && test ! -d "$path"; then
61404         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61405       fi
61406 
61407       if test -d "$path"; then
61408         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61409       else
61410         dir="`$DIRNAME "$path"`"
61411         base="`$BASENAME "$path"`"
61412         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61413       fi
61414     fi
61415   fi
61416 
61417 
61418   # Only process if variable expands to non-empty
61419 
61420   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61421     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61422 
61423   # Input might be given as Windows format, start by converting to
61424   # unix format.
61425   path="$POTENTIAL_FREETYPE_LIB_PATH"
61426   new_path=`$CYGPATH -u "$path"`
61427 
61428   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61429   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61430   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61431   # "foo.exe" is OK but "foo" is an error.
61432   #
61433   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61434   # It is also a way to make sure we got the proper file name for the real test later on.
61435   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61436   if test "x$test_shortpath" = x; then
61437     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61438 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61439     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61440   fi
61441 
61442   # Call helper function which possibly converts this using DOS-style short mode.
61443   # If so, the updated path is stored in $new_path.
61444 
61445   input_path="$new_path"
61446   # Check if we need to convert this using DOS-style short mode. If the path
61447   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61448   # take no chances and rewrite it.
61449   # Note: m4 eats our [], so we need to use [ and ] instead.
61450   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61451   if test "x$has_forbidden_chars" != x; then
61452     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61453     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61454     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61455     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61456       # Going to short mode and back again did indeed matter. Since short mode is
61457       # case insensitive, let's make it lowercase to improve readability.
61458       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61459       # Now convert it back to Unix-style (cygpath)
61460       input_path=`$CYGPATH -u "$shortmode_path"`
61461       new_path="$input_path"
61462     fi
61463   fi
61464 
61465   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61466   if test "x$test_cygdrive_prefix" = x; then
61467     # As a simple fix, exclude /usr/bin since it's not a real path.
61468     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61469       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61470       # a path prefixed by /cygdrive for fixpath to work.
61471       new_path="$CYGWIN_ROOT_PATH$input_path"
61472     fi
61473   fi
61474 
61475 
61476   if test "x$path" != "x$new_path"; then
61477     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61478     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61479 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61480   fi
61481 
61482     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61483 
61484   path="$POTENTIAL_FREETYPE_LIB_PATH"
61485   has_colon=`$ECHO $path | $GREP ^.:`
61486   new_path="$path"
61487   if test "x$has_colon" = x; then
61488     # Not in mixed or Windows style, start by that.
61489     new_path=`cmd //c echo $path`
61490   fi
61491 
61492 
61493   input_path="$new_path"
61494   # Check if we need to convert this using DOS-style short mode. If the path
61495   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61496   # take no chances and rewrite it.
61497   # Note: m4 eats our [], so we need to use [ and ] instead.
61498   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61499   if test "x$has_forbidden_chars" != x; then
61500     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61501     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61502   fi
61503 
61504 
61505   windows_path="$new_path"
61506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61507     unix_path=`$CYGPATH -u "$windows_path"`
61508     new_path="$unix_path"
61509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61511     new_path="$unix_path"
61512   fi
61513 
61514   if test "x$path" != "x$new_path"; then
61515     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61516     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61517 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61518   fi
61519 
61520   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61521   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61522 
61523     else
61524       # We're on a unix platform. Hooray! :)
61525       path="$POTENTIAL_FREETYPE_LIB_PATH"
61526       has_space=`$ECHO "$path" | $GREP " "`
61527       if test "x$has_space" != x; then
61528         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61529 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61530         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61531       fi
61532 
61533       # Use eval to expand a potential ~
61534       eval path="$path"
61535       if test ! -f "$path" && test ! -d "$path"; then
61536         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61537       fi
61538 
61539       if test -d "$path"; then
61540         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61541       else
61542         dir="`$DIRNAME "$path"`"
61543         base="`$BASENAME "$path"`"
61544         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61545       fi
61546     fi
61547   fi
61548 
61549 
61550     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61551     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61552 $as_echo_n "checking for freetype includes... " >&6; }
61553     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61554 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61555     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61556     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61557 $as_echo_n "checking for freetype libraries... " >&6; }
61558     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61559 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61560   fi
61561 
61562             else
61563 
61564   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61565   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
61566   METHOD="well-known location"
61567 
61568   # Let's start with an optimistic view of the world :-)
61569   FOUND_FREETYPE=yes
61570 
61571   # First look for the canonical freetype main include file ft2build.h.
61572   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61573     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61574     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61575     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61576       # Fail.
61577       FOUND_FREETYPE=no
61578     fi
61579   fi
61580 
61581   if test "x$FOUND_FREETYPE" = xyes; then
61582     # Include file found, let's continue the sanity check.
61583     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61584 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61585 
61586     # Reset to default value
61587     FREETYPE_BASE_NAME=freetype
61588     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61589     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61590       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61591           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61592         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61593         # for the .6 version explicitly.
61594         FREETYPE_BASE_NAME=freetype.6
61595         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61596         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61597 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61598       else
61599         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61600 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61601         FOUND_FREETYPE=no
61602       fi
61603     else
61604       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61605         # On Windows, we will need both .lib and .dll file.
61606         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61607           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61608 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61609           FOUND_FREETYPE=no
61610         fi
61611       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61612           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61613         # Found lib in isa dir, use that instead.
61614         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61615         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61616 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61617       fi
61618     fi
61619   fi
61620 
61621   if test "x$FOUND_FREETYPE" = xyes; then
61622 
61623   # Only process if variable expands to non-empty
61624 
61625   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61626     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61627 
61628   # Input might be given as Windows format, start by converting to
61629   # unix format.
61630   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61631   new_path=`$CYGPATH -u "$path"`
61632 
61633   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61634   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61635   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61636   # "foo.exe" is OK but "foo" is an error.
61637   #
61638   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61639   # It is also a way to make sure we got the proper file name for the real test later on.
61640   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61641   if test "x$test_shortpath" = x; then
61642     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61643 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61644     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61645   fi
61646 
61647   # Call helper function which possibly converts this using DOS-style short mode.
61648   # If so, the updated path is stored in $new_path.
61649 
61650   input_path="$new_path"
61651   # Check if we need to convert this using DOS-style short mode. If the path
61652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61653   # take no chances and rewrite it.
61654   # Note: m4 eats our [], so we need to use [ and ] instead.
61655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61656   if test "x$has_forbidden_chars" != x; then
61657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61658     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61659     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61660     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61661       # Going to short mode and back again did indeed matter. Since short mode is
61662       # case insensitive, let's make it lowercase to improve readability.
61663       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61664       # Now convert it back to Unix-style (cygpath)
61665       input_path=`$CYGPATH -u "$shortmode_path"`
61666       new_path="$input_path"
61667     fi
61668   fi
61669 
61670   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61671   if test "x$test_cygdrive_prefix" = x; then
61672     # As a simple fix, exclude /usr/bin since it's not a real path.
61673     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61674       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61675       # a path prefixed by /cygdrive for fixpath to work.
61676       new_path="$CYGWIN_ROOT_PATH$input_path"
61677     fi
61678   fi
61679 
61680 
61681   if test "x$path" != "x$new_path"; then
61682     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61684 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61685   fi
61686 
61687     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61688 
61689   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61690   has_colon=`$ECHO $path | $GREP ^.:`
61691   new_path="$path"
61692   if test "x$has_colon" = x; then
61693     # Not in mixed or Windows style, start by that.
61694     new_path=`cmd //c echo $path`
61695   fi
61696 
61697 
61698   input_path="$new_path"
61699   # Check if we need to convert this using DOS-style short mode. If the path
61700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61701   # take no chances and rewrite it.
61702   # Note: m4 eats our [], so we need to use [ and ] instead.
61703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61704   if test "x$has_forbidden_chars" != x; then
61705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61706     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61707   fi
61708 
61709 
61710   windows_path="$new_path"
61711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61712     unix_path=`$CYGPATH -u "$windows_path"`
61713     new_path="$unix_path"
61714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61716     new_path="$unix_path"
61717   fi
61718 
61719   if test "x$path" != "x$new_path"; then
61720     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61721     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61722 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61723   fi
61724 
61725   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61726   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61727 
61728     else
61729       # We're on a unix platform. Hooray! :)
61730       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61731       has_space=`$ECHO "$path" | $GREP " "`
61732       if test "x$has_space" != x; then
61733         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61734 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61735         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61736       fi
61737 
61738       # Use eval to expand a potential ~
61739       eval path="$path"
61740       if test ! -f "$path" && test ! -d "$path"; then
61741         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61742       fi
61743 
61744       if test -d "$path"; then
61745         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61746       else
61747         dir="`$DIRNAME "$path"`"
61748         base="`$BASENAME "$path"`"
61749         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61750       fi
61751     fi
61752   fi
61753 
61754 
61755   # Only process if variable expands to non-empty
61756 
61757   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61758     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61759 
61760   # Input might be given as Windows format, start by converting to
61761   # unix format.
61762   path="$POTENTIAL_FREETYPE_LIB_PATH"
61763   new_path=`$CYGPATH -u "$path"`
61764 
61765   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61766   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61767   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61768   # "foo.exe" is OK but "foo" is an error.
61769   #
61770   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61771   # It is also a way to make sure we got the proper file name for the real test later on.
61772   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61773   if test "x$test_shortpath" = x; then
61774     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61775 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61776     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61777   fi
61778 
61779   # Call helper function which possibly converts this using DOS-style short mode.
61780   # If so, the updated path is stored in $new_path.
61781 
61782   input_path="$new_path"
61783   # Check if we need to convert this using DOS-style short mode. If the path
61784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61785   # take no chances and rewrite it.
61786   # Note: m4 eats our [], so we need to use [ and ] instead.
61787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61788   if test "x$has_forbidden_chars" != x; then
61789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61790     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61791     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61792     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61793       # Going to short mode and back again did indeed matter. Since short mode is
61794       # case insensitive, let's make it lowercase to improve readability.
61795       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61796       # Now convert it back to Unix-style (cygpath)
61797       input_path=`$CYGPATH -u "$shortmode_path"`
61798       new_path="$input_path"
61799     fi
61800   fi
61801 
61802   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61803   if test "x$test_cygdrive_prefix" = x; then
61804     # As a simple fix, exclude /usr/bin since it's not a real path.
61805     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61806       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61807       # a path prefixed by /cygdrive for fixpath to work.
61808       new_path="$CYGWIN_ROOT_PATH$input_path"
61809     fi
61810   fi
61811 
61812 
61813   if test "x$path" != "x$new_path"; then
61814     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61815     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61816 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61817   fi
61818 
61819     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61820 
61821   path="$POTENTIAL_FREETYPE_LIB_PATH"
61822   has_colon=`$ECHO $path | $GREP ^.:`
61823   new_path="$path"
61824   if test "x$has_colon" = x; then
61825     # Not in mixed or Windows style, start by that.
61826     new_path=`cmd //c echo $path`
61827   fi
61828 
61829 
61830   input_path="$new_path"
61831   # Check if we need to convert this using DOS-style short mode. If the path
61832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61833   # take no chances and rewrite it.
61834   # Note: m4 eats our [], so we need to use [ and ] instead.
61835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61836   if test "x$has_forbidden_chars" != x; then
61837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61838     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61839   fi
61840 
61841 
61842   windows_path="$new_path"
61843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61844     unix_path=`$CYGPATH -u "$windows_path"`
61845     new_path="$unix_path"
61846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61848     new_path="$unix_path"
61849   fi
61850 
61851   if test "x$path" != "x$new_path"; then
61852     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61854 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61855   fi
61856 
61857   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61858   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61859 
61860     else
61861       # We're on a unix platform. Hooray! :)
61862       path="$POTENTIAL_FREETYPE_LIB_PATH"
61863       has_space=`$ECHO "$path" | $GREP " "`
61864       if test "x$has_space" != x; then
61865         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61866 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61867         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61868       fi
61869 
61870       # Use eval to expand a potential ~
61871       eval path="$path"
61872       if test ! -f "$path" && test ! -d "$path"; then
61873         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61874       fi
61875 
61876       if test -d "$path"; then
61877         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61878       else
61879         dir="`$DIRNAME "$path"`"
61880         base="`$BASENAME "$path"`"
61881         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61882       fi
61883     fi
61884   fi
61885 
61886 
61887     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61888     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61889 $as_echo_n "checking for freetype includes... " >&6; }
61890     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61891 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61892     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61893     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61894 $as_echo_n "checking for freetype libraries... " >&6; }
61895     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61896 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61897   fi
61898 
61899             fi
61900             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
61901                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
61902               # Source is available, as a last resort try to build freetype in default location
61903 
61904   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
61905   BUILD_FREETYPE=yes
61906 
61907   # Check if the freetype sources are acessible..
61908   if ! test -d $FREETYPE_SRC_PATH; then
61909     { $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
61910 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
61911     BUILD_FREETYPE=no
61912   fi
61913   # ..and contain a vc2010 project file
61914   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
61915   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
61916     { $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
61917 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
61918     BUILD_FREETYPE=no
61919   fi
61920   # Now check if configure found a version of 'msbuild.exe'
61921   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
61922     { $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
61923 $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;}
61924     BUILD_FREETYPE=no
61925   fi
61926 
61927   # Ready to go..
61928   if test "x$BUILD_FREETYPE" = xyes; then
61929     # msbuild requires trailing slashes for output directories
61930     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
61931     freetype_lib_path_unix="$freetype_lib_path"
61932     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
61933 
61934   unix_path="$vcxproj_path"
61935   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61936     windows_path=`$CYGPATH -m "$unix_path"`
61937     vcxproj_path="$windows_path"
61938   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61939     windows_path=`cmd //c echo $unix_path`
61940     vcxproj_path="$windows_path"
61941   fi
61942 
61943 
61944   unix_path="$freetype_lib_path"
61945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61946     windows_path=`$CYGPATH -m "$unix_path"`
61947     freetype_lib_path="$windows_path"
61948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61949     windows_path=`cmd //c echo $unix_path`
61950     freetype_lib_path="$windows_path"
61951   fi
61952 
61953 
61954   unix_path="$freetype_obj_path"
61955   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61956     windows_path=`$CYGPATH -m "$unix_path"`
61957     freetype_obj_path="$windows_path"
61958   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61959     windows_path=`cmd //c echo $unix_path`
61960     freetype_obj_path="$windows_path"
61961   fi
61962 
61963     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61964       freetype_platform=x64
61965     else
61966       freetype_platform=win32
61967     fi
61968 
61969     # The original freetype project file is for VS 2010 (i.e. 'v100'),
61970     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
61971     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
61972     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
61973     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
61974 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
61975 
61976     # First we try to build the freetype.dll
61977     $ECHO -e "@echo off\n"\
61978         "$MSBUILD $vcxproj_path "\
61979         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
61980         "/p:Configuration=\"Release Multithreaded\" "\
61981         "/p:Platform=$freetype_platform "\
61982         "/p:ConfigurationType=DynamicLibrary "\
61983         "/p:TargetName=freetype "\
61984         "/p:OutDir=\"$freetype_lib_path\" "\
61985         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
61986     cmd /c freetype.bat
61987 
61988     if test -s "$freetype_lib_path_unix/freetype.dll"; then
61989       # If that succeeds we also build freetype.lib
61990       $ECHO -e "@echo off\n"\
61991           "$MSBUILD $vcxproj_path "\
61992           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
61993           "/p:Configuration=\"Release Multithreaded\" "\
61994           "/p:Platform=$freetype_platform "\
61995           "/p:ConfigurationType=StaticLibrary "\
61996           "/p:TargetName=freetype "\
61997           "/p:OutDir=\"$freetype_lib_path\" "\
61998           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
61999       cmd /c freetype.bat
62000 
62001       if test -s "$freetype_lib_path_unix/freetype.lib"; then
62002         # Once we build both, lib and dll, set freetype lib and include path appropriately
62003         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
62004         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
62005         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
62006 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
62007       else
62008         BUILD_FREETYPE=no
62009       fi
62010     else
62011       BUILD_FREETYPE=no
62012     fi
62013   fi
62014 
62015               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62016 
62017   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62018   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
62019   METHOD="well-known location"
62020 
62021   # Let's start with an optimistic view of the world :-)
62022   FOUND_FREETYPE=yes
62023 
62024   # First look for the canonical freetype main include file ft2build.h.
62025   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62026     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62027     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62028     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62029       # Fail.
62030       FOUND_FREETYPE=no
62031     fi
62032   fi
62033 
62034   if test "x$FOUND_FREETYPE" = xyes; then
62035     # Include file found, let's continue the sanity check.
62036     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62037 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62038 
62039     # Reset to default value
62040     FREETYPE_BASE_NAME=freetype
62041     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62042     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62043       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62044           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62045         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62046         # for the .6 version explicitly.
62047         FREETYPE_BASE_NAME=freetype.6
62048         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62049         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62050 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62051       else
62052         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62053 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62054         FOUND_FREETYPE=no
62055       fi
62056     else
62057       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62058         # On Windows, we will need both .lib and .dll file.
62059         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62060           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62061 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62062           FOUND_FREETYPE=no
62063         fi
62064       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62065           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62066         # Found lib in isa dir, use that instead.
62067         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62068         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62069 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62070       fi
62071     fi
62072   fi
62073 
62074   if test "x$FOUND_FREETYPE" = xyes; then
62075 
62076   # Only process if variable expands to non-empty
62077 
62078   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62079     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62080 
62081   # Input might be given as Windows format, start by converting to
62082   # unix format.
62083   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62084   new_path=`$CYGPATH -u "$path"`
62085 
62086   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62087   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62088   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62089   # "foo.exe" is OK but "foo" is an error.
62090   #
62091   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62092   # It is also a way to make sure we got the proper file name for the real test later on.
62093   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62094   if test "x$test_shortpath" = x; then
62095     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62096 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62097     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62098   fi
62099 
62100   # Call helper function which possibly converts this using DOS-style short mode.
62101   # If so, the updated path is stored in $new_path.
62102 
62103   input_path="$new_path"
62104   # Check if we need to convert this using DOS-style short mode. If the path
62105   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62106   # take no chances and rewrite it.
62107   # Note: m4 eats our [], so we need to use [ and ] instead.
62108   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62109   if test "x$has_forbidden_chars" != x; then
62110     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62111     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62112     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62113     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62114       # Going to short mode and back again did indeed matter. Since short mode is
62115       # case insensitive, let's make it lowercase to improve readability.
62116       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62117       # Now convert it back to Unix-style (cygpath)
62118       input_path=`$CYGPATH -u "$shortmode_path"`
62119       new_path="$input_path"
62120     fi
62121   fi
62122 
62123   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62124   if test "x$test_cygdrive_prefix" = x; then
62125     # As a simple fix, exclude /usr/bin since it's not a real path.
62126     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62127       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62128       # a path prefixed by /cygdrive for fixpath to work.
62129       new_path="$CYGWIN_ROOT_PATH$input_path"
62130     fi
62131   fi
62132 
62133 
62134   if test "x$path" != "x$new_path"; then
62135     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62136     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62137 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62138   fi
62139 
62140     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62141 
62142   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62143   has_colon=`$ECHO $path | $GREP ^.:`
62144   new_path="$path"
62145   if test "x$has_colon" = x; then
62146     # Not in mixed or Windows style, start by that.
62147     new_path=`cmd //c echo $path`
62148   fi
62149 
62150 
62151   input_path="$new_path"
62152   # Check if we need to convert this using DOS-style short mode. If the path
62153   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62154   # take no chances and rewrite it.
62155   # Note: m4 eats our [], so we need to use [ and ] instead.
62156   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62157   if test "x$has_forbidden_chars" != x; then
62158     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62159     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62160   fi
62161 
62162 
62163   windows_path="$new_path"
62164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62165     unix_path=`$CYGPATH -u "$windows_path"`
62166     new_path="$unix_path"
62167   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62168     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62169     new_path="$unix_path"
62170   fi
62171 
62172   if test "x$path" != "x$new_path"; then
62173     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62174     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62175 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62176   fi
62177 
62178   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62179   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62180 
62181     else
62182       # We're on a unix platform. Hooray! :)
62183       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62184       has_space=`$ECHO "$path" | $GREP " "`
62185       if test "x$has_space" != x; then
62186         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62187 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62188         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62189       fi
62190 
62191       # Use eval to expand a potential ~
62192       eval path="$path"
62193       if test ! -f "$path" && test ! -d "$path"; then
62194         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62195       fi
62196 
62197       if test -d "$path"; then
62198         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62199       else
62200         dir="`$DIRNAME "$path"`"
62201         base="`$BASENAME "$path"`"
62202         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62203       fi
62204     fi
62205   fi
62206 
62207 
62208   # Only process if variable expands to non-empty
62209 
62210   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62211     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62212 
62213   # Input might be given as Windows format, start by converting to
62214   # unix format.
62215   path="$POTENTIAL_FREETYPE_LIB_PATH"
62216   new_path=`$CYGPATH -u "$path"`
62217 
62218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62221   # "foo.exe" is OK but "foo" is an error.
62222   #
62223   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62224   # It is also a way to make sure we got the proper file name for the real test later on.
62225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62226   if test "x$test_shortpath" = x; then
62227     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62228 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62229     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62230   fi
62231 
62232   # Call helper function which possibly converts this using DOS-style short mode.
62233   # If so, the updated path is stored in $new_path.
62234 
62235   input_path="$new_path"
62236   # Check if we need to convert this using DOS-style short mode. If the path
62237   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62238   # take no chances and rewrite it.
62239   # Note: m4 eats our [], so we need to use [ and ] instead.
62240   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62241   if test "x$has_forbidden_chars" != x; then
62242     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62243     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62244     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62245     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62246       # Going to short mode and back again did indeed matter. Since short mode is
62247       # case insensitive, let's make it lowercase to improve readability.
62248       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62249       # Now convert it back to Unix-style (cygpath)
62250       input_path=`$CYGPATH -u "$shortmode_path"`
62251       new_path="$input_path"
62252     fi
62253   fi
62254 
62255   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62256   if test "x$test_cygdrive_prefix" = x; then
62257     # As a simple fix, exclude /usr/bin since it's not a real path.
62258     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62259       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62260       # a path prefixed by /cygdrive for fixpath to work.
62261       new_path="$CYGWIN_ROOT_PATH$input_path"
62262     fi
62263   fi
62264 
62265 
62266   if test "x$path" != "x$new_path"; then
62267     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62268     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62269 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62270   fi
62271 
62272     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62273 
62274   path="$POTENTIAL_FREETYPE_LIB_PATH"
62275   has_colon=`$ECHO $path | $GREP ^.:`
62276   new_path="$path"
62277   if test "x$has_colon" = x; then
62278     # Not in mixed or Windows style, start by that.
62279     new_path=`cmd //c echo $path`
62280   fi
62281 
62282 
62283   input_path="$new_path"
62284   # Check if we need to convert this using DOS-style short mode. If the path
62285   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62286   # take no chances and rewrite it.
62287   # Note: m4 eats our [], so we need to use [ and ] instead.
62288   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62289   if test "x$has_forbidden_chars" != x; then
62290     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62291     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62292   fi
62293 
62294 
62295   windows_path="$new_path"
62296   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62297     unix_path=`$CYGPATH -u "$windows_path"`
62298     new_path="$unix_path"
62299   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62300     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62301     new_path="$unix_path"
62302   fi
62303 
62304   if test "x$path" != "x$new_path"; then
62305     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62306     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62307 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62308   fi
62309 
62310   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62311   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62312 
62313     else
62314       # We're on a unix platform. Hooray! :)
62315       path="$POTENTIAL_FREETYPE_LIB_PATH"
62316       has_space=`$ECHO "$path" | $GREP " "`
62317       if test "x$has_space" != x; then
62318         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62319 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62320         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62321       fi
62322 
62323       # Use eval to expand a potential ~
62324       eval path="$path"
62325       if test ! -f "$path" && test ! -d "$path"; then
62326         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62327       fi
62328 
62329       if test -d "$path"; then
62330         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62331       else
62332         dir="`$DIRNAME "$path"`"
62333         base="`$BASENAME "$path"`"
62334         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62335       fi
62336     fi
62337   fi
62338 
62339 
62340     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62341     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62342 $as_echo_n "checking for freetype includes... " >&6; }
62343     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62344 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62345     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62346     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62347 $as_echo_n "checking for freetype libraries... " >&6; }
62348     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62349 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62350   fi
62351 
62352               else
62353 
62354   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62355   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62356   METHOD="well-known location"
62357 
62358   # Let's start with an optimistic view of the world :-)
62359   FOUND_FREETYPE=yes
62360 
62361   # First look for the canonical freetype main include file ft2build.h.
62362   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62363     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62364     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62365     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62366       # Fail.
62367       FOUND_FREETYPE=no
62368     fi
62369   fi
62370 
62371   if test "x$FOUND_FREETYPE" = xyes; then
62372     # Include file found, let's continue the sanity check.
62373     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62374 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62375 
62376     # Reset to default value
62377     FREETYPE_BASE_NAME=freetype
62378     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62379     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62380       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62381           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62382         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62383         # for the .6 version explicitly.
62384         FREETYPE_BASE_NAME=freetype.6
62385         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62386         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62387 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62388       else
62389         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62390 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62391         FOUND_FREETYPE=no
62392       fi
62393     else
62394       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62395         # On Windows, we will need both .lib and .dll file.
62396         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62397           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62398 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62399           FOUND_FREETYPE=no
62400         fi
62401       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62402           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62403         # Found lib in isa dir, use that instead.
62404         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62405         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62406 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62407       fi
62408     fi
62409   fi
62410 
62411   if test "x$FOUND_FREETYPE" = xyes; then
62412 
62413   # Only process if variable expands to non-empty
62414 
62415   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62416     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62417 
62418   # Input might be given as Windows format, start by converting to
62419   # unix format.
62420   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62421   new_path=`$CYGPATH -u "$path"`
62422 
62423   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62424   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62425   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62426   # "foo.exe" is OK but "foo" is an error.
62427   #
62428   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62429   # It is also a way to make sure we got the proper file name for the real test later on.
62430   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62431   if test "x$test_shortpath" = x; then
62432     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62433 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62434     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62435   fi
62436 
62437   # Call helper function which possibly converts this using DOS-style short mode.
62438   # If so, the updated path is stored in $new_path.
62439 
62440   input_path="$new_path"
62441   # Check if we need to convert this using DOS-style short mode. If the path
62442   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62443   # take no chances and rewrite it.
62444   # Note: m4 eats our [], so we need to use [ and ] instead.
62445   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62446   if test "x$has_forbidden_chars" != x; then
62447     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62448     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62449     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62450     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62451       # Going to short mode and back again did indeed matter. Since short mode is
62452       # case insensitive, let's make it lowercase to improve readability.
62453       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62454       # Now convert it back to Unix-style (cygpath)
62455       input_path=`$CYGPATH -u "$shortmode_path"`
62456       new_path="$input_path"
62457     fi
62458   fi
62459 
62460   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62461   if test "x$test_cygdrive_prefix" = x; then
62462     # As a simple fix, exclude /usr/bin since it's not a real path.
62463     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62464       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62465       # a path prefixed by /cygdrive for fixpath to work.
62466       new_path="$CYGWIN_ROOT_PATH$input_path"
62467     fi
62468   fi
62469 
62470 
62471   if test "x$path" != "x$new_path"; then
62472     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62473     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62474 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62475   fi
62476 
62477     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62478 
62479   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62480   has_colon=`$ECHO $path | $GREP ^.:`
62481   new_path="$path"
62482   if test "x$has_colon" = x; then
62483     # Not in mixed or Windows style, start by that.
62484     new_path=`cmd //c echo $path`
62485   fi
62486 
62487 
62488   input_path="$new_path"
62489   # Check if we need to convert this using DOS-style short mode. If the path
62490   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62491   # take no chances and rewrite it.
62492   # Note: m4 eats our [], so we need to use [ and ] instead.
62493   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62494   if test "x$has_forbidden_chars" != x; then
62495     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62496     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62497   fi
62498 
62499 
62500   windows_path="$new_path"
62501   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62502     unix_path=`$CYGPATH -u "$windows_path"`
62503     new_path="$unix_path"
62504   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62505     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62506     new_path="$unix_path"
62507   fi
62508 
62509   if test "x$path" != "x$new_path"; then
62510     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62511     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62512 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62513   fi
62514 
62515   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62516   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62517 
62518     else
62519       # We're on a unix platform. Hooray! :)
62520       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62521       has_space=`$ECHO "$path" | $GREP " "`
62522       if test "x$has_space" != x; then
62523         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62524 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62525         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62526       fi
62527 
62528       # Use eval to expand a potential ~
62529       eval path="$path"
62530       if test ! -f "$path" && test ! -d "$path"; then
62531         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62532       fi
62533 
62534       if test -d "$path"; then
62535         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62536       else
62537         dir="`$DIRNAME "$path"`"
62538         base="`$BASENAME "$path"`"
62539         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62540       fi
62541     fi
62542   fi
62543 
62544 
62545   # Only process if variable expands to non-empty
62546 
62547   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62548     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62549 
62550   # Input might be given as Windows format, start by converting to
62551   # unix format.
62552   path="$POTENTIAL_FREETYPE_LIB_PATH"
62553   new_path=`$CYGPATH -u "$path"`
62554 
62555   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62556   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62557   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62558   # "foo.exe" is OK but "foo" is an error.
62559   #
62560   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62561   # It is also a way to make sure we got the proper file name for the real test later on.
62562   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62563   if test "x$test_shortpath" = x; then
62564     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62565 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62566     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62567   fi
62568 
62569   # Call helper function which possibly converts this using DOS-style short mode.
62570   # If so, the updated path is stored in $new_path.
62571 
62572   input_path="$new_path"
62573   # Check if we need to convert this using DOS-style short mode. If the path
62574   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62575   # take no chances and rewrite it.
62576   # Note: m4 eats our [], so we need to use [ and ] instead.
62577   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62578   if test "x$has_forbidden_chars" != x; then
62579     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62580     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62581     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62582     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62583       # Going to short mode and back again did indeed matter. Since short mode is
62584       # case insensitive, let's make it lowercase to improve readability.
62585       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62586       # Now convert it back to Unix-style (cygpath)
62587       input_path=`$CYGPATH -u "$shortmode_path"`
62588       new_path="$input_path"
62589     fi
62590   fi
62591 
62592   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62593   if test "x$test_cygdrive_prefix" = x; then
62594     # As a simple fix, exclude /usr/bin since it's not a real path.
62595     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62596       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62597       # a path prefixed by /cygdrive for fixpath to work.
62598       new_path="$CYGWIN_ROOT_PATH$input_path"
62599     fi
62600   fi
62601 
62602 
62603   if test "x$path" != "x$new_path"; then
62604     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62605     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62606 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62607   fi
62608 
62609     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62610 
62611   path="$POTENTIAL_FREETYPE_LIB_PATH"
62612   has_colon=`$ECHO $path | $GREP ^.:`
62613   new_path="$path"
62614   if test "x$has_colon" = x; then
62615     # Not in mixed or Windows style, start by that.
62616     new_path=`cmd //c echo $path`
62617   fi
62618 
62619 
62620   input_path="$new_path"
62621   # Check if we need to convert this using DOS-style short mode. If the path
62622   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62623   # take no chances and rewrite it.
62624   # Note: m4 eats our [], so we need to use [ and ] instead.
62625   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62626   if test "x$has_forbidden_chars" != x; then
62627     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62628     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62629   fi
62630 
62631 
62632   windows_path="$new_path"
62633   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62634     unix_path=`$CYGPATH -u "$windows_path"`
62635     new_path="$unix_path"
62636   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62637     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62638     new_path="$unix_path"
62639   fi
62640 
62641   if test "x$path" != "x$new_path"; then
62642     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62644 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62645   fi
62646 
62647   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62648   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62649 
62650     else
62651       # We're on a unix platform. Hooray! :)
62652       path="$POTENTIAL_FREETYPE_LIB_PATH"
62653       has_space=`$ECHO "$path" | $GREP " "`
62654       if test "x$has_space" != x; then
62655         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62656 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62657         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62658       fi
62659 
62660       # Use eval to expand a potential ~
62661       eval path="$path"
62662       if test ! -f "$path" && test ! -d "$path"; then
62663         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62664       fi
62665 
62666       if test -d "$path"; then
62667         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62668       else
62669         dir="`$DIRNAME "$path"`"
62670         base="`$BASENAME "$path"`"
62671         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62672       fi
62673     fi
62674   fi
62675 
62676 
62677     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62678     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62679 $as_echo_n "checking for freetype includes... " >&6; }
62680     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62681 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62682     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62683     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62684 $as_echo_n "checking for freetype libraries... " >&6; }
62685     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62686 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62687   fi
62688 
62689               fi
62690             fi
62691           fi
62692         else
62693           FREETYPE_BASE_DIR="$SYSROOT/usr"
62694 
62695   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62696   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62697   METHOD="well-known location"
62698 
62699   # Let's start with an optimistic view of the world :-)
62700   FOUND_FREETYPE=yes
62701 
62702   # First look for the canonical freetype main include file ft2build.h.
62703   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62704     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62705     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62706     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62707       # Fail.
62708       FOUND_FREETYPE=no
62709     fi
62710   fi
62711 
62712   if test "x$FOUND_FREETYPE" = xyes; then
62713     # Include file found, let's continue the sanity check.
62714     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62715 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62716 
62717     # Reset to default value
62718     FREETYPE_BASE_NAME=freetype
62719     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62720     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62721       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62722           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62723         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62724         # for the .6 version explicitly.
62725         FREETYPE_BASE_NAME=freetype.6
62726         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62727         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62728 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62729       else
62730         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62731 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62732         FOUND_FREETYPE=no
62733       fi
62734     else
62735       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62736         # On Windows, we will need both .lib and .dll file.
62737         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62738           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62739 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62740           FOUND_FREETYPE=no
62741         fi
62742       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62743           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62744         # Found lib in isa dir, use that instead.
62745         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62746         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62747 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62748       fi
62749     fi
62750   fi
62751 
62752   if test "x$FOUND_FREETYPE" = xyes; then
62753 
62754   # Only process if variable expands to non-empty
62755 
62756   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62757     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62758 
62759   # Input might be given as Windows format, start by converting to
62760   # unix format.
62761   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62762   new_path=`$CYGPATH -u "$path"`
62763 
62764   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62765   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62766   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62767   # "foo.exe" is OK but "foo" is an error.
62768   #
62769   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62770   # It is also a way to make sure we got the proper file name for the real test later on.
62771   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62772   if test "x$test_shortpath" = x; then
62773     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62774 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62775     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62776   fi
62777 
62778   # Call helper function which possibly converts this using DOS-style short mode.
62779   # If so, the updated path is stored in $new_path.
62780 
62781   input_path="$new_path"
62782   # Check if we need to convert this using DOS-style short mode. If the path
62783   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62784   # take no chances and rewrite it.
62785   # Note: m4 eats our [], so we need to use [ and ] instead.
62786   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62787   if test "x$has_forbidden_chars" != x; then
62788     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62789     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62790     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62791     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62792       # Going to short mode and back again did indeed matter. Since short mode is
62793       # case insensitive, let's make it lowercase to improve readability.
62794       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62795       # Now convert it back to Unix-style (cygpath)
62796       input_path=`$CYGPATH -u "$shortmode_path"`
62797       new_path="$input_path"
62798     fi
62799   fi
62800 
62801   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62802   if test "x$test_cygdrive_prefix" = x; then
62803     # As a simple fix, exclude /usr/bin since it's not a real path.
62804     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62805       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62806       # a path prefixed by /cygdrive for fixpath to work.
62807       new_path="$CYGWIN_ROOT_PATH$input_path"
62808     fi
62809   fi
62810 
62811 
62812   if test "x$path" != "x$new_path"; then
62813     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62814     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62815 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62816   fi
62817 
62818     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62819 
62820   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62821   has_colon=`$ECHO $path | $GREP ^.:`
62822   new_path="$path"
62823   if test "x$has_colon" = x; then
62824     # Not in mixed or Windows style, start by that.
62825     new_path=`cmd //c echo $path`
62826   fi
62827 
62828 
62829   input_path="$new_path"
62830   # Check if we need to convert this using DOS-style short mode. If the path
62831   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62832   # take no chances and rewrite it.
62833   # Note: m4 eats our [], so we need to use [ and ] instead.
62834   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62835   if test "x$has_forbidden_chars" != x; then
62836     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62837     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62838   fi
62839 
62840 
62841   windows_path="$new_path"
62842   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62843     unix_path=`$CYGPATH -u "$windows_path"`
62844     new_path="$unix_path"
62845   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62846     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62847     new_path="$unix_path"
62848   fi
62849 
62850   if test "x$path" != "x$new_path"; then
62851     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62852     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62853 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62854   fi
62855 
62856   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62857   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62858 
62859     else
62860       # We're on a unix platform. Hooray! :)
62861       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62862       has_space=`$ECHO "$path" | $GREP " "`
62863       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
62867       fi
62868 
62869       # Use eval to expand a potential ~
62870       eval path="$path"
62871       if test ! -f "$path" && test ! -d "$path"; then
62872         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62873       fi
62874 
62875       if test -d "$path"; then
62876         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62877       else
62878         dir="`$DIRNAME "$path"`"
62879         base="`$BASENAME "$path"`"
62880         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62881       fi
62882     fi
62883   fi
62884 
62885 
62886   # Only process if variable expands to non-empty
62887 
62888   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62889     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62890 
62891   # Input might be given as Windows format, start by converting to
62892   # unix format.
62893   path="$POTENTIAL_FREETYPE_LIB_PATH"
62894   new_path=`$CYGPATH -u "$path"`
62895 
62896   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62897   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62898   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62899   # "foo.exe" is OK but "foo" is an error.
62900   #
62901   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62902   # It is also a way to make sure we got the proper file name for the real test later on.
62903   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62904   if test "x$test_shortpath" = x; then
62905     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62906 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62907     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62908   fi
62909 
62910   # Call helper function which possibly converts this using DOS-style short mode.
62911   # If so, the updated path is stored in $new_path.
62912 
62913   input_path="$new_path"
62914   # Check if we need to convert this using DOS-style short mode. If the path
62915   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62916   # take no chances and rewrite it.
62917   # Note: m4 eats our [], so we need to use [ and ] instead.
62918   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62919   if test "x$has_forbidden_chars" != x; then
62920     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62921     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62922     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62923     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62924       # Going to short mode and back again did indeed matter. Since short mode is
62925       # case insensitive, let's make it lowercase to improve readability.
62926       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62927       # Now convert it back to Unix-style (cygpath)
62928       input_path=`$CYGPATH -u "$shortmode_path"`
62929       new_path="$input_path"
62930     fi
62931   fi
62932 
62933   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62934   if test "x$test_cygdrive_prefix" = x; then
62935     # As a simple fix, exclude /usr/bin since it's not a real path.
62936     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62937       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62938       # a path prefixed by /cygdrive for fixpath to work.
62939       new_path="$CYGWIN_ROOT_PATH$input_path"
62940     fi
62941   fi
62942 
62943 
62944   if test "x$path" != "x$new_path"; then
62945     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62946     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62947 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62948   fi
62949 
62950     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62951 
62952   path="$POTENTIAL_FREETYPE_LIB_PATH"
62953   has_colon=`$ECHO $path | $GREP ^.:`
62954   new_path="$path"
62955   if test "x$has_colon" = x; then
62956     # Not in mixed or Windows style, start by that.
62957     new_path=`cmd //c echo $path`
62958   fi
62959 
62960 
62961   input_path="$new_path"
62962   # Check if we need to convert this using DOS-style short mode. If the path
62963   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62964   # take no chances and rewrite it.
62965   # Note: m4 eats our [], so we need to use [ and ] instead.
62966   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62967   if test "x$has_forbidden_chars" != x; then
62968     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62969     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62970   fi
62971 
62972 
62973   windows_path="$new_path"
62974   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62975     unix_path=`$CYGPATH -u "$windows_path"`
62976     new_path="$unix_path"
62977   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62978     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62979     new_path="$unix_path"
62980   fi
62981 
62982   if test "x$path" != "x$new_path"; then
62983     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62984     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62985 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62986   fi
62987 
62988   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62989   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62990 
62991     else
62992       # We're on a unix platform. Hooray! :)
62993       path="$POTENTIAL_FREETYPE_LIB_PATH"
62994       has_space=`$ECHO "$path" | $GREP " "`
62995       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
62999       fi
63000 
63001       # Use eval to expand a potential ~
63002       eval path="$path"
63003       if test ! -f "$path" && test ! -d "$path"; then
63004         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63005       fi
63006 
63007       if test -d "$path"; then
63008         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63009       else
63010         dir="`$DIRNAME "$path"`"
63011         base="`$BASENAME "$path"`"
63012         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63013       fi
63014     fi
63015   fi
63016 
63017 
63018     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63019     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63020 $as_echo_n "checking for freetype includes... " >&6; }
63021     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63022 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63023     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63024     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63025 $as_echo_n "checking for freetype libraries... " >&6; }
63026     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63027 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63028   fi
63029 
63030 
63031           if test "x$FOUND_FREETYPE" != xyes; then
63032             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
63033 
63034   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63035   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
63036   METHOD="well-known location"
63037 
63038   # Let's start with an optimistic view of the world :-)
63039   FOUND_FREETYPE=yes
63040 
63041   # First look for the canonical freetype main include file ft2build.h.
63042   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63043     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63044     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63045     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63046       # Fail.
63047       FOUND_FREETYPE=no
63048     fi
63049   fi
63050 
63051   if test "x$FOUND_FREETYPE" = xyes; then
63052     # Include file found, let's continue the sanity check.
63053     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63054 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63055 
63056     # Reset to default value
63057     FREETYPE_BASE_NAME=freetype
63058     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63059     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63060       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63061           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63062         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63063         # for the .6 version explicitly.
63064         FREETYPE_BASE_NAME=freetype.6
63065         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63066         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63067 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63068       else
63069         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63070 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63071         FOUND_FREETYPE=no
63072       fi
63073     else
63074       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63075         # On Windows, we will need both .lib and .dll file.
63076         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63077           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63078 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63079           FOUND_FREETYPE=no
63080         fi
63081       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63082           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63083         # Found lib in isa dir, use that instead.
63084         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63085         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63086 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63087       fi
63088     fi
63089   fi
63090 
63091   if test "x$FOUND_FREETYPE" = xyes; then
63092 
63093   # Only process if variable expands to non-empty
63094 
63095   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63096     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63097 
63098   # Input might be given as Windows format, start by converting to
63099   # unix format.
63100   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63101   new_path=`$CYGPATH -u "$path"`
63102 
63103   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63104   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63105   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63106   # "foo.exe" is OK but "foo" is an error.
63107   #
63108   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63109   # It is also a way to make sure we got the proper file name for the real test later on.
63110   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63111   if test "x$test_shortpath" = x; then
63112     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63113 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63114     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63115   fi
63116 
63117   # Call helper function which possibly converts this using DOS-style short mode.
63118   # If so, the updated path is stored in $new_path.
63119 
63120   input_path="$new_path"
63121   # Check if we need to convert this using DOS-style short mode. If the path
63122   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63123   # take no chances and rewrite it.
63124   # Note: m4 eats our [], so we need to use [ and ] instead.
63125   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63126   if test "x$has_forbidden_chars" != x; then
63127     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63128     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63129     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63130     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63131       # Going to short mode and back again did indeed matter. Since short mode is
63132       # case insensitive, let's make it lowercase to improve readability.
63133       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63134       # Now convert it back to Unix-style (cygpath)
63135       input_path=`$CYGPATH -u "$shortmode_path"`
63136       new_path="$input_path"
63137     fi
63138   fi
63139 
63140   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63141   if test "x$test_cygdrive_prefix" = x; then
63142     # As a simple fix, exclude /usr/bin since it's not a real path.
63143     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63144       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63145       # a path prefixed by /cygdrive for fixpath to work.
63146       new_path="$CYGWIN_ROOT_PATH$input_path"
63147     fi
63148   fi
63149 
63150 
63151   if test "x$path" != "x$new_path"; then
63152     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63153     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63154 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63155   fi
63156 
63157     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63158 
63159   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63160   has_colon=`$ECHO $path | $GREP ^.:`
63161   new_path="$path"
63162   if test "x$has_colon" = x; then
63163     # Not in mixed or Windows style, start by that.
63164     new_path=`cmd //c echo $path`
63165   fi
63166 
63167 
63168   input_path="$new_path"
63169   # Check if we need to convert this using DOS-style short mode. If the path
63170   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63171   # take no chances and rewrite it.
63172   # Note: m4 eats our [], so we need to use [ and ] instead.
63173   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63174   if test "x$has_forbidden_chars" != x; then
63175     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63176     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63177   fi
63178 
63179 
63180   windows_path="$new_path"
63181   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63182     unix_path=`$CYGPATH -u "$windows_path"`
63183     new_path="$unix_path"
63184   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63185     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63186     new_path="$unix_path"
63187   fi
63188 
63189   if test "x$path" != "x$new_path"; then
63190     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63191     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63192 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63193   fi
63194 
63195   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63196   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63197 
63198     else
63199       # We're on a unix platform. Hooray! :)
63200       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63201       has_space=`$ECHO "$path" | $GREP " "`
63202       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
63206       fi
63207 
63208       # Use eval to expand a potential ~
63209       eval path="$path"
63210       if test ! -f "$path" && test ! -d "$path"; then
63211         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63212       fi
63213 
63214       if test -d "$path"; then
63215         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63216       else
63217         dir="`$DIRNAME "$path"`"
63218         base="`$BASENAME "$path"`"
63219         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63220       fi
63221     fi
63222   fi
63223 
63224 
63225   # Only process if variable expands to non-empty
63226 
63227   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63229 
63230   # Input might be given as Windows format, start by converting to
63231   # unix format.
63232   path="$POTENTIAL_FREETYPE_LIB_PATH"
63233   new_path=`$CYGPATH -u "$path"`
63234 
63235   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63236   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63237   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63238   # "foo.exe" is OK but "foo" is an error.
63239   #
63240   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63241   # It is also a way to make sure we got the proper file name for the real test later on.
63242   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63243   if test "x$test_shortpath" = x; then
63244     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63245 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63246     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63247   fi
63248 
63249   # Call helper function which possibly converts this using DOS-style short mode.
63250   # If so, the updated path is stored in $new_path.
63251 
63252   input_path="$new_path"
63253   # Check if we need to convert this using DOS-style short mode. If the path
63254   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63255   # take no chances and rewrite it.
63256   # Note: m4 eats our [], so we need to use [ and ] instead.
63257   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63258   if test "x$has_forbidden_chars" != x; then
63259     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63260     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63261     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63262     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63263       # Going to short mode and back again did indeed matter. Since short mode is
63264       # case insensitive, let's make it lowercase to improve readability.
63265       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63266       # Now convert it back to Unix-style (cygpath)
63267       input_path=`$CYGPATH -u "$shortmode_path"`
63268       new_path="$input_path"
63269     fi
63270   fi
63271 
63272   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63273   if test "x$test_cygdrive_prefix" = x; then
63274     # As a simple fix, exclude /usr/bin since it's not a real path.
63275     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63276       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63277       # a path prefixed by /cygdrive for fixpath to work.
63278       new_path="$CYGWIN_ROOT_PATH$input_path"
63279     fi
63280   fi
63281 
63282 
63283   if test "x$path" != "x$new_path"; then
63284     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63285     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63286 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63287   fi
63288 
63289     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63290 
63291   path="$POTENTIAL_FREETYPE_LIB_PATH"
63292   has_colon=`$ECHO $path | $GREP ^.:`
63293   new_path="$path"
63294   if test "x$has_colon" = x; then
63295     # Not in mixed or Windows style, start by that.
63296     new_path=`cmd //c echo $path`
63297   fi
63298 
63299 
63300   input_path="$new_path"
63301   # Check if we need to convert this using DOS-style short mode. If the path
63302   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63303   # take no chances and rewrite it.
63304   # Note: m4 eats our [], so we need to use [ and ] instead.
63305   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63306   if test "x$has_forbidden_chars" != x; then
63307     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63308     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63309   fi
63310 
63311 
63312   windows_path="$new_path"
63313   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63314     unix_path=`$CYGPATH -u "$windows_path"`
63315     new_path="$unix_path"
63316   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63317     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63318     new_path="$unix_path"
63319   fi
63320 
63321   if test "x$path" != "x$new_path"; then
63322     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63323     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63324 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63325   fi
63326 
63327   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63328   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63329 
63330     else
63331       # We're on a unix platform. Hooray! :)
63332       path="$POTENTIAL_FREETYPE_LIB_PATH"
63333       has_space=`$ECHO "$path" | $GREP " "`
63334       if test "x$has_space" != 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 $? "Spaces are not allowed in this path." "$LINENO" 5
63338       fi
63339 
63340       # Use eval to expand a potential ~
63341       eval path="$path"
63342       if test ! -f "$path" && test ! -d "$path"; then
63343         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63344       fi
63345 
63346       if test -d "$path"; then
63347         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63348       else
63349         dir="`$DIRNAME "$path"`"
63350         base="`$BASENAME "$path"`"
63351         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63352       fi
63353     fi
63354   fi
63355 
63356 
63357     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63358     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63359 $as_echo_n "checking for freetype includes... " >&6; }
63360     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63361 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63362     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63363     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63364 $as_echo_n "checking for freetype libraries... " >&6; }
63365     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63366 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63367   fi
63368 
63369           fi
63370           if test "x$FOUND_FREETYPE" != xyes; then
63371             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
63372 
63373   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63374   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
63375   METHOD="well-known location"
63376 
63377   # Let's start with an optimistic view of the world :-)
63378   FOUND_FREETYPE=yes
63379 
63380   # First look for the canonical freetype main include file ft2build.h.
63381   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63382     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63383     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63384     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63385       # Fail.
63386       FOUND_FREETYPE=no
63387     fi
63388   fi
63389 
63390   if test "x$FOUND_FREETYPE" = xyes; then
63391     # Include file found, let's continue the sanity check.
63392     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63393 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63394 
63395     # Reset to default value
63396     FREETYPE_BASE_NAME=freetype
63397     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63398     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63399       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63400           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63401         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63402         # for the .6 version explicitly.
63403         FREETYPE_BASE_NAME=freetype.6
63404         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63405         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63406 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63407       else
63408         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63409 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63410         FOUND_FREETYPE=no
63411       fi
63412     else
63413       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63414         # On Windows, we will need both .lib and .dll file.
63415         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63416           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63417 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63418           FOUND_FREETYPE=no
63419         fi
63420       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63421           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63422         # Found lib in isa dir, use that instead.
63423         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63424         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63425 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63426       fi
63427     fi
63428   fi
63429 
63430   if test "x$FOUND_FREETYPE" = xyes; then
63431 
63432   # Only process if variable expands to non-empty
63433 
63434   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63435     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63436 
63437   # Input might be given as Windows format, start by converting to
63438   # unix format.
63439   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63440   new_path=`$CYGPATH -u "$path"`
63441 
63442   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63443   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63444   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63445   # "foo.exe" is OK but "foo" is an error.
63446   #
63447   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63448   # It is also a way to make sure we got the proper file name for the real test later on.
63449   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63450   if test "x$test_shortpath" = x; then
63451     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63452 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63453     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63454   fi
63455 
63456   # Call helper function which possibly converts this using DOS-style short mode.
63457   # If so, the updated path is stored in $new_path.
63458 
63459   input_path="$new_path"
63460   # Check if we need to convert this using DOS-style short mode. If the path
63461   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63462   # take no chances and rewrite it.
63463   # Note: m4 eats our [], so we need to use [ and ] instead.
63464   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63465   if test "x$has_forbidden_chars" != x; then
63466     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63467     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63468     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63469     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63470       # Going to short mode and back again did indeed matter. Since short mode is
63471       # case insensitive, let's make it lowercase to improve readability.
63472       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63473       # Now convert it back to Unix-style (cygpath)
63474       input_path=`$CYGPATH -u "$shortmode_path"`
63475       new_path="$input_path"
63476     fi
63477   fi
63478 
63479   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63480   if test "x$test_cygdrive_prefix" = x; then
63481     # As a simple fix, exclude /usr/bin since it's not a real path.
63482     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63483       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63484       # a path prefixed by /cygdrive for fixpath to work.
63485       new_path="$CYGWIN_ROOT_PATH$input_path"
63486     fi
63487   fi
63488 
63489 
63490   if test "x$path" != "x$new_path"; then
63491     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63492     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63493 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63494   fi
63495 
63496     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63497 
63498   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63499   has_colon=`$ECHO $path | $GREP ^.:`
63500   new_path="$path"
63501   if test "x$has_colon" = x; then
63502     # Not in mixed or Windows style, start by that.
63503     new_path=`cmd //c echo $path`
63504   fi
63505 
63506 
63507   input_path="$new_path"
63508   # Check if we need to convert this using DOS-style short mode. If the path
63509   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63510   # take no chances and rewrite it.
63511   # Note: m4 eats our [], so we need to use [ and ] instead.
63512   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63513   if test "x$has_forbidden_chars" != x; then
63514     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63515     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63516   fi
63517 
63518 
63519   windows_path="$new_path"
63520   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63521     unix_path=`$CYGPATH -u "$windows_path"`
63522     new_path="$unix_path"
63523   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63524     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63525     new_path="$unix_path"
63526   fi
63527 
63528   if test "x$path" != "x$new_path"; then
63529     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63530     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63531 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63532   fi
63533 
63534   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63535   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63536 
63537     else
63538       # We're on a unix platform. Hooray! :)
63539       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63540       has_space=`$ECHO "$path" | $GREP " "`
63541       if test "x$has_space" != x; then
63542         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63543 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63544         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63545       fi
63546 
63547       # Use eval to expand a potential ~
63548       eval path="$path"
63549       if test ! -f "$path" && test ! -d "$path"; then
63550         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63551       fi
63552 
63553       if test -d "$path"; then
63554         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63555       else
63556         dir="`$DIRNAME "$path"`"
63557         base="`$BASENAME "$path"`"
63558         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63559       fi
63560     fi
63561   fi
63562 
63563 
63564   # Only process if variable expands to non-empty
63565 
63566   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63567     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63568 
63569   # Input might be given as Windows format, start by converting to
63570   # unix format.
63571   path="$POTENTIAL_FREETYPE_LIB_PATH"
63572   new_path=`$CYGPATH -u "$path"`
63573 
63574   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63575   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63576   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63577   # "foo.exe" is OK but "foo" is an error.
63578   #
63579   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63580   # It is also a way to make sure we got the proper file name for the real test later on.
63581   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63582   if test "x$test_shortpath" = x; then
63583     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63584 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63585     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63586   fi
63587 
63588   # Call helper function which possibly converts this using DOS-style short mode.
63589   # If so, the updated path is stored in $new_path.
63590 
63591   input_path="$new_path"
63592   # Check if we need to convert this using DOS-style short mode. If the path
63593   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63594   # take no chances and rewrite it.
63595   # Note: m4 eats our [], so we need to use [ and ] instead.
63596   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63597   if test "x$has_forbidden_chars" != x; then
63598     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63599     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63600     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63601     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63602       # Going to short mode and back again did indeed matter. Since short mode is
63603       # case insensitive, let's make it lowercase to improve readability.
63604       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63605       # Now convert it back to Unix-style (cygpath)
63606       input_path=`$CYGPATH -u "$shortmode_path"`
63607       new_path="$input_path"
63608     fi
63609   fi
63610 
63611   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63612   if test "x$test_cygdrive_prefix" = x; then
63613     # As a simple fix, exclude /usr/bin since it's not a real path.
63614     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63615       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63616       # a path prefixed by /cygdrive for fixpath to work.
63617       new_path="$CYGWIN_ROOT_PATH$input_path"
63618     fi
63619   fi
63620 
63621 
63622   if test "x$path" != "x$new_path"; then
63623     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63624     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63625 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63626   fi
63627 
63628     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63629 
63630   path="$POTENTIAL_FREETYPE_LIB_PATH"
63631   has_colon=`$ECHO $path | $GREP ^.:`
63632   new_path="$path"
63633   if test "x$has_colon" = x; then
63634     # Not in mixed or Windows style, start by that.
63635     new_path=`cmd //c echo $path`
63636   fi
63637 
63638 
63639   input_path="$new_path"
63640   # Check if we need to convert this using DOS-style short mode. If the path
63641   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63642   # take no chances and rewrite it.
63643   # Note: m4 eats our [], so we need to use [ and ] instead.
63644   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63645   if test "x$has_forbidden_chars" != x; then
63646     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63647     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63648   fi
63649 
63650 
63651   windows_path="$new_path"
63652   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63653     unix_path=`$CYGPATH -u "$windows_path"`
63654     new_path="$unix_path"
63655   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63656     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63657     new_path="$unix_path"
63658   fi
63659 
63660   if test "x$path" != "x$new_path"; then
63661     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63662     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63663 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63664   fi
63665 
63666   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63667   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63668 
63669     else
63670       # We're on a unix platform. Hooray! :)
63671       path="$POTENTIAL_FREETYPE_LIB_PATH"
63672       has_space=`$ECHO "$path" | $GREP " "`
63673       if test "x$has_space" != x; then
63674         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63675 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63676         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63677       fi
63678 
63679       # Use eval to expand a potential ~
63680       eval path="$path"
63681       if test ! -f "$path" && test ! -d "$path"; then
63682         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63683       fi
63684 
63685       if test -d "$path"; then
63686         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63687       else
63688         dir="`$DIRNAME "$path"`"
63689         base="`$BASENAME "$path"`"
63690         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63691       fi
63692     fi
63693   fi
63694 
63695 
63696     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63697     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63698 $as_echo_n "checking for freetype includes... " >&6; }
63699     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63700 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63701     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63703 $as_echo_n "checking for freetype libraries... " >&6; }
63704     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63705 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63706   fi
63707 
63708           fi
63709 
63710           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
63711             if test "x$FOUND_FREETYPE" != xyes; then
63712               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
63713               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
63714 
63715   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63716   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
63717   METHOD="well-known location"
63718 
63719   # Let's start with an optimistic view of the world :-)
63720   FOUND_FREETYPE=yes
63721 
63722   # First look for the canonical freetype main include file ft2build.h.
63723   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63724     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63725     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63726     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63727       # Fail.
63728       FOUND_FREETYPE=no
63729     fi
63730   fi
63731 
63732   if test "x$FOUND_FREETYPE" = xyes; then
63733     # Include file found, let's continue the sanity check.
63734     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63735 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63736 
63737     # Reset to default value
63738     FREETYPE_BASE_NAME=freetype
63739     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63740     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63741       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63742           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63743         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63744         # for the .6 version explicitly.
63745         FREETYPE_BASE_NAME=freetype.6
63746         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63747         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63748 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63749       else
63750         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63751 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63752         FOUND_FREETYPE=no
63753       fi
63754     else
63755       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63756         # On Windows, we will need both .lib and .dll file.
63757         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63758           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63759 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63760           FOUND_FREETYPE=no
63761         fi
63762       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63763           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63764         # Found lib in isa dir, use that instead.
63765         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63766         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63767 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63768       fi
63769     fi
63770   fi
63771 
63772   if test "x$FOUND_FREETYPE" = xyes; then
63773 
63774   # Only process if variable expands to non-empty
63775 
63776   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63777     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63778 
63779   # Input might be given as Windows format, start by converting to
63780   # unix format.
63781   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63782   new_path=`$CYGPATH -u "$path"`
63783 
63784   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63785   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63786   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63787   # "foo.exe" is OK but "foo" is an error.
63788   #
63789   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63790   # It is also a way to make sure we got the proper file name for the real test later on.
63791   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63792   if test "x$test_shortpath" = x; then
63793     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63794 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63795     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63796   fi
63797 
63798   # Call helper function which possibly converts this using DOS-style short mode.
63799   # If so, the updated path is stored in $new_path.
63800 
63801   input_path="$new_path"
63802   # Check if we need to convert this using DOS-style short mode. If the path
63803   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63804   # take no chances and rewrite it.
63805   # Note: m4 eats our [], so we need to use [ and ] instead.
63806   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63807   if test "x$has_forbidden_chars" != x; then
63808     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63809     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63810     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63811     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63812       # Going to short mode and back again did indeed matter. Since short mode is
63813       # case insensitive, let's make it lowercase to improve readability.
63814       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63815       # Now convert it back to Unix-style (cygpath)
63816       input_path=`$CYGPATH -u "$shortmode_path"`
63817       new_path="$input_path"
63818     fi
63819   fi
63820 
63821   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63822   if test "x$test_cygdrive_prefix" = x; then
63823     # As a simple fix, exclude /usr/bin since it's not a real path.
63824     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63825       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63826       # a path prefixed by /cygdrive for fixpath to work.
63827       new_path="$CYGWIN_ROOT_PATH$input_path"
63828     fi
63829   fi
63830 
63831 
63832   if test "x$path" != "x$new_path"; then
63833     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63834     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63835 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63836   fi
63837 
63838     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63839 
63840   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63841   has_colon=`$ECHO $path | $GREP ^.:`
63842   new_path="$path"
63843   if test "x$has_colon" = x; then
63844     # Not in mixed or Windows style, start by that.
63845     new_path=`cmd //c echo $path`
63846   fi
63847 
63848 
63849   input_path="$new_path"
63850   # Check if we need to convert this using DOS-style short mode. If the path
63851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63852   # take no chances and rewrite it.
63853   # Note: m4 eats our [], so we need to use [ and ] instead.
63854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63855   if test "x$has_forbidden_chars" != x; then
63856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63857     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63858   fi
63859 
63860 
63861   windows_path="$new_path"
63862   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63863     unix_path=`$CYGPATH -u "$windows_path"`
63864     new_path="$unix_path"
63865   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63866     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63867     new_path="$unix_path"
63868   fi
63869 
63870   if test "x$path" != "x$new_path"; then
63871     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63872     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63873 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63874   fi
63875 
63876   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63877   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63878 
63879     else
63880       # We're on a unix platform. Hooray! :)
63881       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63882       has_space=`$ECHO "$path" | $GREP " "`
63883       if test "x$has_space" != x; then
63884         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63885 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63886         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63887       fi
63888 
63889       # Use eval to expand a potential ~
63890       eval path="$path"
63891       if test ! -f "$path" && test ! -d "$path"; then
63892         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63893       fi
63894 
63895       if test -d "$path"; then
63896         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63897       else
63898         dir="`$DIRNAME "$path"`"
63899         base="`$BASENAME "$path"`"
63900         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63901       fi
63902     fi
63903   fi
63904 
63905 
63906   # Only process if variable expands to non-empty
63907 
63908   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63909     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63910 
63911   # Input might be given as Windows format, start by converting to
63912   # unix format.
63913   path="$POTENTIAL_FREETYPE_LIB_PATH"
63914   new_path=`$CYGPATH -u "$path"`
63915 
63916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63919   # "foo.exe" is OK but "foo" is an error.
63920   #
63921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63922   # It is also a way to make sure we got the proper file name for the real test later on.
63923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63924   if test "x$test_shortpath" = x; then
63925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63926 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63927     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63928   fi
63929 
63930   # Call helper function which possibly converts this using DOS-style short mode.
63931   # If so, the updated path is stored in $new_path.
63932 
63933   input_path="$new_path"
63934   # Check if we need to convert this using DOS-style short mode. If the path
63935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63936   # take no chances and rewrite it.
63937   # Note: m4 eats our [], so we need to use [ and ] instead.
63938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63939   if test "x$has_forbidden_chars" != x; then
63940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63944       # Going to short mode and back again did indeed matter. Since short mode is
63945       # case insensitive, let's make it lowercase to improve readability.
63946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63947       # Now convert it back to Unix-style (cygpath)
63948       input_path=`$CYGPATH -u "$shortmode_path"`
63949       new_path="$input_path"
63950     fi
63951   fi
63952 
63953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63954   if test "x$test_cygdrive_prefix" = x; then
63955     # As a simple fix, exclude /usr/bin since it's not a real path.
63956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63958       # a path prefixed by /cygdrive for fixpath to work.
63959       new_path="$CYGWIN_ROOT_PATH$input_path"
63960     fi
63961   fi
63962 
63963 
63964   if test "x$path" != "x$new_path"; then
63965     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63967 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63968   fi
63969 
63970     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63971 
63972   path="$POTENTIAL_FREETYPE_LIB_PATH"
63973   has_colon=`$ECHO $path | $GREP ^.:`
63974   new_path="$path"
63975   if test "x$has_colon" = x; then
63976     # Not in mixed or Windows style, start by that.
63977     new_path=`cmd //c echo $path`
63978   fi
63979 
63980 
63981   input_path="$new_path"
63982   # Check if we need to convert this using DOS-style short mode. If the path
63983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63984   # take no chances and rewrite it.
63985   # Note: m4 eats our [], so we need to use [ and ] instead.
63986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63987   if test "x$has_forbidden_chars" != x; then
63988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63990   fi
63991 
63992 
63993   windows_path="$new_path"
63994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63995     unix_path=`$CYGPATH -u "$windows_path"`
63996     new_path="$unix_path"
63997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63999     new_path="$unix_path"
64000   fi
64001 
64002   if test "x$path" != "x$new_path"; then
64003     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64005 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64006   fi
64007 
64008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64010 
64011     else
64012       # We're on a unix platform. Hooray! :)
64013       path="$POTENTIAL_FREETYPE_LIB_PATH"
64014       has_space=`$ECHO "$path" | $GREP " "`
64015       if test "x$has_space" != x; then
64016         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64017 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64018         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64019       fi
64020 
64021       # Use eval to expand a potential ~
64022       eval path="$path"
64023       if test ! -f "$path" && test ! -d "$path"; then
64024         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64025       fi
64026 
64027       if test -d "$path"; then
64028         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64029       else
64030         dir="`$DIRNAME "$path"`"
64031         base="`$BASENAME "$path"`"
64032         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64033       fi
64034     fi
64035   fi
64036 
64037 
64038     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
64040 $as_echo_n "checking for freetype includes... " >&6; }
64041     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
64042 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
64043     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
64044     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
64045 $as_echo_n "checking for freetype libraries... " >&6; }
64046     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
64047 $as_echo "$FREETYPE_LIB_PATH" >&6; }
64048   fi
64049 
64050             fi
64051           fi
64052 
64053           if test "x$FOUND_FREETYPE" != xyes; then
64054             FREETYPE_BASE_DIR="$SYSROOT/usr"
64055             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
64056 
64057   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
64058   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/$OPENJDK_TARGET_CPU-linux-gnu"
64059   METHOD="well-known location"
64060 
64061   # Let's start with an optimistic view of the world :-)
64062   FOUND_FREETYPE=yes
64063 
64064   # First look for the canonical freetype main include file ft2build.h.
64065   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64066     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
64067     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
64068     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64069       # Fail.
64070       FOUND_FREETYPE=no
64071     fi
64072   fi
64073 
64074   if test "x$FOUND_FREETYPE" = xyes; then
64075     # Include file found, let's continue the sanity check.
64076     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
64077 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
64078 
64079     # Reset to default value
64080     FREETYPE_BASE_NAME=freetype
64081     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64082     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
64083       if test "x$OPENJDK_TARGET_OS" = xmacosx \
64084           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
64085         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
64086         # for the .6 version explicitly.
64087         FREETYPE_BASE_NAME=freetype.6
64088         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64089         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
64090 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
64091       else
64092         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
64093 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
64094         FOUND_FREETYPE=no
64095       fi
64096     else
64097       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64098         # On Windows, we will need both .lib and .dll file.
64099         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
64100           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
64101 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
64102           FOUND_FREETYPE=no
64103         fi
64104       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
64105           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
64106         # Found lib in isa dir, use that instead.
64107         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
64108         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
64109 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
64110       fi
64111     fi
64112   fi
64113 
64114   if test "x$FOUND_FREETYPE" = xyes; then
64115 
64116   # Only process if variable expands to non-empty
64117 
64118   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
64119     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64120 
64121   # Input might be given as Windows format, start by converting to
64122   # unix format.
64123   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64124   new_path=`$CYGPATH -u "$path"`
64125 
64126   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64127   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64128   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64129   # "foo.exe" is OK but "foo" is an error.
64130   #
64131   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64132   # It is also a way to make sure we got the proper file name for the real test later on.
64133   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64134   if test "x$test_shortpath" = x; then
64135     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64136 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64137     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
64138   fi
64139 
64140   # Call helper function which possibly converts this using DOS-style short mode.
64141   # If so, the updated path is stored in $new_path.
64142 
64143   input_path="$new_path"
64144   # Check if we need to convert this using DOS-style short mode. If the path
64145   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64146   # take no chances and rewrite it.
64147   # Note: m4 eats our [], so we need to use [ and ] instead.
64148   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64149   if test "x$has_forbidden_chars" != x; then
64150     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64151     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64152     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64153     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64154       # Going to short mode and back again did indeed matter. Since short mode is
64155       # case insensitive, let's make it lowercase to improve readability.
64156       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64157       # Now convert it back to Unix-style (cygpath)
64158       input_path=`$CYGPATH -u "$shortmode_path"`
64159       new_path="$input_path"
64160     fi
64161   fi
64162 
64163   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64164   if test "x$test_cygdrive_prefix" = x; then
64165     # As a simple fix, exclude /usr/bin since it's not a real path.
64166     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64167       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64168       # a path prefixed by /cygdrive for fixpath to work.
64169       new_path="$CYGWIN_ROOT_PATH$input_path"
64170     fi
64171   fi
64172 
64173 
64174   if test "x$path" != "x$new_path"; then
64175     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64176     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64177 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64178   fi
64179 
64180     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64181 
64182   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64183   has_colon=`$ECHO $path | $GREP ^.:`
64184   new_path="$path"
64185   if test "x$has_colon" = x; then
64186     # Not in mixed or Windows style, start by that.
64187     new_path=`cmd //c echo $path`
64188   fi
64189 
64190 
64191   input_path="$new_path"
64192   # Check if we need to convert this using DOS-style short mode. If the path
64193   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64194   # take no chances and rewrite it.
64195   # Note: m4 eats our [], so we need to use [ and ] instead.
64196   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64197   if test "x$has_forbidden_chars" != x; then
64198     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64199     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64200   fi
64201 
64202 
64203   windows_path="$new_path"
64204   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64205     unix_path=`$CYGPATH -u "$windows_path"`
64206     new_path="$unix_path"
64207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64208     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64209     new_path="$unix_path"
64210   fi
64211 
64212   if test "x$path" != "x$new_path"; then
64213     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64214     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64215 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64216   fi
64217 
64218   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64219   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64220 
64221     else
64222       # We're on a unix platform. Hooray! :)
64223       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64224       has_space=`$ECHO "$path" | $GREP " "`
64225       if test "x$has_space" != x; then
64226         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64227 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64228         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64229       fi
64230 
64231       # Use eval to expand a potential ~
64232       eval path="$path"
64233       if test ! -f "$path" && test ! -d "$path"; then
64234         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64235       fi
64236 
64237       if test -d "$path"; then
64238         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
64239       else
64240         dir="`$DIRNAME "$path"`"
64241         base="`$BASENAME "$path"`"
64242         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64243       fi
64244     fi
64245   fi
64246 
64247 
64248   # Only process if variable expands to non-empty
64249 
64250   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
64251     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64252 
64253   # Input might be given as Windows format, start by converting to
64254   # unix format.
64255   path="$POTENTIAL_FREETYPE_LIB_PATH"
64256   new_path=`$CYGPATH -u "$path"`
64257 
64258   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64259   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64260   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64261   # "foo.exe" is OK but "foo" is an error.
64262   #
64263   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64264   # It is also a way to make sure we got the proper file name for the real test later on.
64265   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64266   if test "x$test_shortpath" = x; then
64267     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64268 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64269     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
64270   fi
64271 
64272   # Call helper function which possibly converts this using DOS-style short mode.
64273   # If so, the updated path is stored in $new_path.
64274 
64275   input_path="$new_path"
64276   # Check if we need to convert this using DOS-style short mode. If the path
64277   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64278   # take no chances and rewrite it.
64279   # Note: m4 eats our [], so we need to use [ and ] instead.
64280   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64281   if test "x$has_forbidden_chars" != x; then
64282     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64283     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64284     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64285     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64286       # Going to short mode and back again did indeed matter. Since short mode is
64287       # case insensitive, let's make it lowercase to improve readability.
64288       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64289       # Now convert it back to Unix-style (cygpath)
64290       input_path=`$CYGPATH -u "$shortmode_path"`
64291       new_path="$input_path"
64292     fi
64293   fi
64294 
64295   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64296   if test "x$test_cygdrive_prefix" = x; then
64297     # As a simple fix, exclude /usr/bin since it's not a real path.
64298     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64299       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64300       # a path prefixed by /cygdrive for fixpath to work.
64301       new_path="$CYGWIN_ROOT_PATH$input_path"
64302     fi
64303   fi
64304 
64305 
64306   if test "x$path" != "x$new_path"; then
64307     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64308     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64309 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64310   fi
64311 
64312     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64313 
64314   path="$POTENTIAL_FREETYPE_LIB_PATH"
64315   has_colon=`$ECHO $path | $GREP ^.:`
64316   new_path="$path"
64317   if test "x$has_colon" = x; then
64318     # Not in mixed or Windows style, start by that.
64319     new_path=`cmd //c echo $path`
64320   fi
64321 
64322 
64323   input_path="$new_path"
64324   # Check if we need to convert this using DOS-style short mode. If the path
64325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64326   # take no chances and rewrite it.
64327   # Note: m4 eats our [], so we need to use [ and ] instead.
64328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64329   if test "x$has_forbidden_chars" != x; then
64330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64331     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64332   fi
64333 
64334 
64335   windows_path="$new_path"
64336   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64337     unix_path=`$CYGPATH -u "$windows_path"`
64338     new_path="$unix_path"
64339   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64340     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64341     new_path="$unix_path"
64342   fi
64343 
64344   if test "x$path" != "x$new_path"; then
64345     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64346     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64347 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64348   fi
64349 
64350   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64351   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64352 
64353     else
64354       # We're on a unix platform. Hooray! :)
64355       path="$POTENTIAL_FREETYPE_LIB_PATH"
64356       has_space=`$ECHO "$path" | $GREP " "`
64357       if test "x$has_space" != x; then
64358         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64359 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64360         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64361       fi
64362 
64363       # Use eval to expand a potential ~
64364       eval path="$path"
64365       if test ! -f "$path" && test ! -d "$path"; then
64366         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64367       fi
64368 
64369       if test -d "$path"; then
64370         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64371       else
64372         dir="`$DIRNAME "$path"`"
64373         base="`$BASENAME "$path"`"
64374         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64375       fi
64376     fi
64377   fi
64378 
64379 
64380     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64381     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
64382 $as_echo_n "checking for freetype includes... " >&6; }
64383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
64384 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
64385     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
64386     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
64387 $as_echo_n "checking for freetype libraries... " >&6; }
64388     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
64389 $as_echo "$FREETYPE_LIB_PATH" >&6; }
64390   fi
64391 
64392             else
64393 
64394   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
64395   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
64396   METHOD="well-known location"
64397 
64398   # Let's start with an optimistic view of the world :-)
64399   FOUND_FREETYPE=yes
64400 
64401   # First look for the canonical freetype main include file ft2build.h.
64402   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64403     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
64404     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
64405     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64406       # Fail.
64407       FOUND_FREETYPE=no
64408     fi
64409   fi
64410 
64411   if test "x$FOUND_FREETYPE" = xyes; then
64412     # Include file found, let's continue the sanity check.
64413     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
64414 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
64415 
64416     # Reset to default value
64417     FREETYPE_BASE_NAME=freetype
64418     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64419     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
64420       if test "x$OPENJDK_TARGET_OS" = xmacosx \
64421           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
64422         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
64423         # for the .6 version explicitly.
64424         FREETYPE_BASE_NAME=freetype.6
64425         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64426         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
64427 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
64428       else
64429         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
64430 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
64431         FOUND_FREETYPE=no
64432       fi
64433     else
64434       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64435         # On Windows, we will need both .lib and .dll file.
64436         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
64437           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
64438 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
64439           FOUND_FREETYPE=no
64440         fi
64441       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
64442           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
64443         # Found lib in isa dir, use that instead.
64444         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
64445         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
64446 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
64447       fi
64448     fi
64449   fi
64450 
64451   if test "x$FOUND_FREETYPE" = xyes; then
64452 
64453   # Only process if variable expands to non-empty
64454 
64455   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
64456     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64457 
64458   # Input might be given as Windows format, start by converting to
64459   # unix format.
64460   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64461   new_path=`$CYGPATH -u "$path"`
64462 
64463   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64464   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64465   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64466   # "foo.exe" is OK but "foo" is an error.
64467   #
64468   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64469   # It is also a way to make sure we got the proper file name for the real test later on.
64470   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64471   if test "x$test_shortpath" = x; then
64472     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64473 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64474     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
64475   fi
64476 
64477   # Call helper function which possibly converts this using DOS-style short mode.
64478   # If so, the updated path is stored in $new_path.
64479 
64480   input_path="$new_path"
64481   # Check if we need to convert this using DOS-style short mode. If the path
64482   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64483   # take no chances and rewrite it.
64484   # Note: m4 eats our [], so we need to use [ and ] instead.
64485   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64486   if test "x$has_forbidden_chars" != x; then
64487     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64488     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64489     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64490     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64491       # Going to short mode and back again did indeed matter. Since short mode is
64492       # case insensitive, let's make it lowercase to improve readability.
64493       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64494       # Now convert it back to Unix-style (cygpath)
64495       input_path=`$CYGPATH -u "$shortmode_path"`
64496       new_path="$input_path"
64497     fi
64498   fi
64499 
64500   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64501   if test "x$test_cygdrive_prefix" = x; then
64502     # As a simple fix, exclude /usr/bin since it's not a real path.
64503     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64504       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64505       # a path prefixed by /cygdrive for fixpath to work.
64506       new_path="$CYGWIN_ROOT_PATH$input_path"
64507     fi
64508   fi
64509 
64510 
64511   if test "x$path" != "x$new_path"; then
64512     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64513     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64514 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64515   fi
64516 
64517     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64518 
64519   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64520   has_colon=`$ECHO $path | $GREP ^.:`
64521   new_path="$path"
64522   if test "x$has_colon" = x; then
64523     # Not in mixed or Windows style, start by that.
64524     new_path=`cmd //c echo $path`
64525   fi
64526 
64527 
64528   input_path="$new_path"
64529   # Check if we need to convert this using DOS-style short mode. If the path
64530   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64531   # take no chances and rewrite it.
64532   # Note: m4 eats our [], so we need to use [ and ] instead.
64533   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64534   if test "x$has_forbidden_chars" != x; then
64535     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64536     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64537   fi
64538 
64539 
64540   windows_path="$new_path"
64541   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64542     unix_path=`$CYGPATH -u "$windows_path"`
64543     new_path="$unix_path"
64544   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64545     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64546     new_path="$unix_path"
64547   fi
64548 
64549   if test "x$path" != "x$new_path"; then
64550     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64552 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64553   fi
64554 
64555   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64556   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64557 
64558     else
64559       # We're on a unix platform. Hooray! :)
64560       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64561       has_space=`$ECHO "$path" | $GREP " "`
64562       if test "x$has_space" != x; then
64563         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64564 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64565         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64566       fi
64567 
64568       # Use eval to expand a potential ~
64569       eval path="$path"
64570       if test ! -f "$path" && test ! -d "$path"; then
64571         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64572       fi
64573 
64574       if test -d "$path"; then
64575         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
64576       else
64577         dir="`$DIRNAME "$path"`"
64578         base="`$BASENAME "$path"`"
64579         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64580       fi
64581     fi
64582   fi
64583 
64584 
64585   # Only process if variable expands to non-empty
64586 
64587   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
64588     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64589 
64590   # Input might be given as Windows format, start by converting to
64591   # unix format.
64592   path="$POTENTIAL_FREETYPE_LIB_PATH"
64593   new_path=`$CYGPATH -u "$path"`
64594 
64595   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64596   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64597   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64598   # "foo.exe" is OK but "foo" is an error.
64599   #
64600   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64601   # It is also a way to make sure we got the proper file name for the real test later on.
64602   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64603   if test "x$test_shortpath" = x; then
64604     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64605 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64606     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
64607   fi
64608 
64609   # Call helper function which possibly converts this using DOS-style short mode.
64610   # If so, the updated path is stored in $new_path.
64611 
64612   input_path="$new_path"
64613   # Check if we need to convert this using DOS-style short mode. If the path
64614   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64615   # take no chances and rewrite it.
64616   # Note: m4 eats our [], so we need to use [ and ] instead.
64617   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64618   if test "x$has_forbidden_chars" != x; then
64619     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64620     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64621     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64622     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64623       # Going to short mode and back again did indeed matter. Since short mode is
64624       # case insensitive, let's make it lowercase to improve readability.
64625       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64626       # Now convert it back to Unix-style (cygpath)
64627       input_path=`$CYGPATH -u "$shortmode_path"`
64628       new_path="$input_path"
64629     fi
64630   fi
64631 
64632   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64633   if test "x$test_cygdrive_prefix" = x; then
64634     # As a simple fix, exclude /usr/bin since it's not a real path.
64635     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64636       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64637       # a path prefixed by /cygdrive for fixpath to work.
64638       new_path="$CYGWIN_ROOT_PATH$input_path"
64639     fi
64640   fi
64641 
64642 
64643   if test "x$path" != "x$new_path"; then
64644     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64645     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64646 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64647   fi
64648 
64649     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64650 
64651   path="$POTENTIAL_FREETYPE_LIB_PATH"
64652   has_colon=`$ECHO $path | $GREP ^.:`
64653   new_path="$path"
64654   if test "x$has_colon" = x; then
64655     # Not in mixed or Windows style, start by that.
64656     new_path=`cmd //c echo $path`
64657   fi
64658 
64659 
64660   input_path="$new_path"
64661   # Check if we need to convert this using DOS-style short mode. If the path
64662   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64663   # take no chances and rewrite it.
64664   # Note: m4 eats our [], so we need to use [ and ] instead.
64665   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64666   if test "x$has_forbidden_chars" != x; then
64667     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64668     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64669   fi
64670 
64671 
64672   windows_path="$new_path"
64673   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64674     unix_path=`$CYGPATH -u "$windows_path"`
64675     new_path="$unix_path"
64676   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64677     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64678     new_path="$unix_path"
64679   fi
64680 
64681   if test "x$path" != "x$new_path"; then
64682     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64684 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64685   fi
64686 
64687   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64688   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64689 
64690     else
64691       # We're on a unix platform. Hooray! :)
64692       path="$POTENTIAL_FREETYPE_LIB_PATH"
64693       has_space=`$ECHO "$path" | $GREP " "`
64694       if test "x$has_space" != x; then
64695         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64696 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64697         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64698       fi
64699 
64700       # Use eval to expand a potential ~
64701       eval path="$path"
64702       if test ! -f "$path" && test ! -d "$path"; then
64703         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64704       fi
64705 
64706       if test -d "$path"; then
64707         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
64708       else
64709         dir="`$DIRNAME "$path"`"
64710         base="`$BASENAME "$path"`"
64711         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64712       fi
64713     fi
64714   fi
64715 
64716 
64717     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64718     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
64719 $as_echo_n "checking for freetype includes... " >&6; }
64720     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
64721 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
64722     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
64723     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
64724 $as_echo_n "checking for freetype libraries... " >&6; }
64725     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
64726 $as_echo "$FREETYPE_LIB_PATH" >&6; }
64727   fi
64728 
64729               if test "x$FOUND_FREETYPE" != xyes; then
64730 
64731   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
64732   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
64733   METHOD="well-known location"
64734 
64735   # Let's start with an optimistic view of the world :-)
64736   FOUND_FREETYPE=yes
64737 
64738   # First look for the canonical freetype main include file ft2build.h.
64739   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64740     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
64741     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
64742     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
64743       # Fail.
64744       FOUND_FREETYPE=no
64745     fi
64746   fi
64747 
64748   if test "x$FOUND_FREETYPE" = xyes; then
64749     # Include file found, let's continue the sanity check.
64750     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
64751 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
64752 
64753     # Reset to default value
64754     FREETYPE_BASE_NAME=freetype
64755     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64756     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
64757       if test "x$OPENJDK_TARGET_OS" = xmacosx \
64758           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
64759         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
64760         # for the .6 version explicitly.
64761         FREETYPE_BASE_NAME=freetype.6
64762         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
64763         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
64764 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
64765       else
64766         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
64767 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
64768         FOUND_FREETYPE=no
64769       fi
64770     else
64771       if test "x$OPENJDK_TARGET_OS" = xwindows; then
64772         # On Windows, we will need both .lib and .dll file.
64773         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
64774           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
64775 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
64776           FOUND_FREETYPE=no
64777         fi
64778       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
64779           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
64780         # Found lib in isa dir, use that instead.
64781         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
64782         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
64783 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
64784       fi
64785     fi
64786   fi
64787 
64788   if test "x$FOUND_FREETYPE" = xyes; then
64789 
64790   # Only process if variable expands to non-empty
64791 
64792   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
64793     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64794 
64795   # Input might be given as Windows format, start by converting to
64796   # unix format.
64797   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64798   new_path=`$CYGPATH -u "$path"`
64799 
64800   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64801   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64802   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64803   # "foo.exe" is OK but "foo" is an error.
64804   #
64805   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64806   # It is also a way to make sure we got the proper file name for the real test later on.
64807   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64808   if test "x$test_shortpath" = x; then
64809     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64810 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64811     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
64812   fi
64813 
64814   # Call helper function which possibly converts this using DOS-style short mode.
64815   # If so, the updated path is stored in $new_path.
64816 
64817   input_path="$new_path"
64818   # Check if we need to convert this using DOS-style short mode. If the path
64819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64820   # take no chances and rewrite it.
64821   # Note: m4 eats our [], so we need to use [ and ] instead.
64822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64823   if test "x$has_forbidden_chars" != x; then
64824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64828       # Going to short mode and back again did indeed matter. Since short mode is
64829       # case insensitive, let's make it lowercase to improve readability.
64830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64831       # Now convert it back to Unix-style (cygpath)
64832       input_path=`$CYGPATH -u "$shortmode_path"`
64833       new_path="$input_path"
64834     fi
64835   fi
64836 
64837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64838   if test "x$test_cygdrive_prefix" = x; then
64839     # As a simple fix, exclude /usr/bin since it's not a real path.
64840     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64842       # a path prefixed by /cygdrive for fixpath to work.
64843       new_path="$CYGWIN_ROOT_PATH$input_path"
64844     fi
64845   fi
64846 
64847 
64848   if test "x$path" != "x$new_path"; then
64849     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64850     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64851 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64852   fi
64853 
64854     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64855 
64856   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64857   has_colon=`$ECHO $path | $GREP ^.:`
64858   new_path="$path"
64859   if test "x$has_colon" = x; then
64860     # Not in mixed or Windows style, start by that.
64861     new_path=`cmd //c echo $path`
64862   fi
64863 
64864 
64865   input_path="$new_path"
64866   # Check if we need to convert this using DOS-style short mode. If the path
64867   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64868   # take no chances and rewrite it.
64869   # Note: m4 eats our [], so we need to use [ and ] instead.
64870   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64871   if test "x$has_forbidden_chars" != x; then
64872     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64873     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64874   fi
64875 
64876 
64877   windows_path="$new_path"
64878   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64879     unix_path=`$CYGPATH -u "$windows_path"`
64880     new_path="$unix_path"
64881   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64882     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64883     new_path="$unix_path"
64884   fi
64885 
64886   if test "x$path" != "x$new_path"; then
64887     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
64888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
64889 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
64890   fi
64891 
64892   # Save the first 10 bytes of this path to the storage, so fixpath can work.
64893   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64894 
64895     else
64896       # We're on a unix platform. Hooray! :)
64897       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
64898       has_space=`$ECHO "$path" | $GREP " "`
64899       if test "x$has_space" != x; then
64900         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
64901 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
64902         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64903       fi
64904 
64905       # Use eval to expand a potential ~
64906       eval path="$path"
64907       if test ! -f "$path" && test ! -d "$path"; then
64908         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
64909       fi
64910 
64911       if test -d "$path"; then
64912         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
64913       else
64914         dir="`$DIRNAME "$path"`"
64915         base="`$BASENAME "$path"`"
64916         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
64917       fi
64918     fi
64919   fi
64920 
64921 
64922   # Only process if variable expands to non-empty
64923 
64924   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
64925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64926 
64927   # Input might be given as Windows format, start by converting to
64928   # unix format.
64929   path="$POTENTIAL_FREETYPE_LIB_PATH"
64930   new_path=`$CYGPATH -u "$path"`
64931 
64932   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64933   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64934   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64935   # "foo.exe" is OK but "foo" is an error.
64936   #
64937   # This test is therefore slightly more accurate than "test -f" to check for file precense.
64938   # It is also a way to make sure we got the proper file name for the real test later on.
64939   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64940   if test "x$test_shortpath" = x; then
64941     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
64942 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
64943     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
64944   fi
64945 
64946   # Call helper function which possibly converts this using DOS-style short mode.
64947   # If so, the updated path is stored in $new_path.
64948 
64949   input_path="$new_path"
64950   # Check if we need to convert this using DOS-style short mode. If the path
64951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
64952   # take no chances and rewrite it.
64953   # Note: m4 eats our [], so we need to use [ and ] instead.
64954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64955   if test "x$has_forbidden_chars" != x; then
64956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64957     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64958     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64959     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64960       # Going to short mode and back again did indeed matter. Since short mode is
64961       # case insensitive, let's make it lowercase to improve readability.
64962       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64963       # Now convert it back to Unix-style (cygpath)
64964       input_path=`$CYGPATH -u "$shortmode_path"`
64965       new_path="$input_path"
64966     fi
64967   fi
64968 
64969   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64970   if test "x$test_cygdrive_prefix" = x; then
64971     # As a simple fix, exclude /usr/bin since it's not a real path.
64972     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64973       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64974       # a path prefixed by /cygdrive for fixpath to work.
64975       new_path="$CYGWIN_ROOT_PATH$input_path"
64976     fi
64977   fi
64978 
64979 
64980   if test "x$path" != "x$new_path"; then
64981     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
64982     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
64983 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
64984   fi
64985 
64986     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64987 
64988   path="$POTENTIAL_FREETYPE_LIB_PATH"
64989   has_colon=`$ECHO $path | $GREP ^.:`
64990   new_path="$path"
64991   if test "x$has_colon" = x; then
64992     # Not in mixed or Windows style, start by that.
64993     new_path=`cmd //c echo $path`
64994   fi
64995 
64996 
64997   input_path="$new_path"
64998   # Check if we need to convert this using DOS-style short mode. If the path
64999   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65000   # take no chances and rewrite it.
65001   # Note: m4 eats our [], so we need to use [ and ] instead.
65002   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65003   if test "x$has_forbidden_chars" != x; then
65004     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65005     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65006   fi
65007 
65008 
65009   windows_path="$new_path"
65010   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65011     unix_path=`$CYGPATH -u "$windows_path"`
65012     new_path="$unix_path"
65013   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65014     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65015     new_path="$unix_path"
65016   fi
65017 
65018   if test "x$path" != "x$new_path"; then
65019     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
65020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
65021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
65022   fi
65023 
65024   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65025   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65026 
65027     else
65028       # We're on a unix platform. Hooray! :)
65029       path="$POTENTIAL_FREETYPE_LIB_PATH"
65030       has_space=`$ECHO "$path" | $GREP " "`
65031       if test "x$has_space" != x; then
65032         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
65033 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
65034         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65035       fi
65036 
65037       # Use eval to expand a potential ~
65038       eval path="$path"
65039       if test ! -f "$path" && test ! -d "$path"; then
65040         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
65041       fi
65042 
65043       if test -d "$path"; then
65044         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
65045       else
65046         dir="`$DIRNAME "$path"`"
65047         base="`$BASENAME "$path"`"
65048         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
65049       fi
65050     fi
65051   fi
65052 
65053 
65054     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
65055     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
65056 $as_echo_n "checking for freetype includes... " >&6; }
65057     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
65058 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
65059     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
65060     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
65061 $as_echo_n "checking for freetype libraries... " >&6; }
65062     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
65063 $as_echo "$FREETYPE_LIB_PATH" >&6; }
65064   fi
65065 
65066               fi
65067             fi
65068           fi
65069         fi
65070       fi # end check in well-known locations
65071 
65072       if test "x$FOUND_FREETYPE" != xyes; then
65073 
65074   # Print a helpful message on how to acquire the necessary build dependency.
65075   # freetype is the help tag: freetype, cups, alsa etc
65076   MISSING_DEPENDENCY=freetype
65077 
65078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65079     cygwin_help $MISSING_DEPENDENCY
65080   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65081     msys_help $MISSING_DEPENDENCY
65082   else
65083     PKGHANDLER_COMMAND=
65084 
65085     case $PKGHANDLER in
65086       apt-get)
65087         apt_help     $MISSING_DEPENDENCY ;;
65088       yum)
65089         yum_help     $MISSING_DEPENDENCY ;;
65090       brew)
65091         brew_help    $MISSING_DEPENDENCY ;;
65092       port)
65093         port_help    $MISSING_DEPENDENCY ;;
65094       pkgutil)
65095         pkgutil_help $MISSING_DEPENDENCY ;;
65096       pkgadd)
65097         pkgadd_help  $MISSING_DEPENDENCY ;;
65098     esac
65099 
65100     if test "x$PKGHANDLER_COMMAND" != x; then
65101       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65102     fi
65103   fi
65104 
65105         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
65106       fi
65107     fi # end user specified settings
65108 
65109     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
65110     if test "x$FREETYPE_CFLAGS" = x; then
65111 
65112   # Only process if variable expands to non-empty
65113 
65114   if test "x$FREETYPE_INCLUDE_PATH" != x; then
65115     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65116 
65117   # Input might be given as Windows format, start by converting to
65118   # unix format.
65119   path="$FREETYPE_INCLUDE_PATH"
65120   new_path=`$CYGPATH -u "$path"`
65121 
65122   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65123   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65124   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65125   # "foo.exe" is OK but "foo" is an error.
65126   #
65127   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65128   # It is also a way to make sure we got the proper file name for the real test later on.
65129   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65130   if test "x$test_shortpath" = x; then
65131     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
65132 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
65133     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
65134   fi
65135 
65136   # Call helper function which possibly converts this using DOS-style short mode.
65137   # If so, the updated path is stored in $new_path.
65138 
65139   input_path="$new_path"
65140   # Check if we need to convert this using DOS-style short mode. If the path
65141   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65142   # take no chances and rewrite it.
65143   # Note: m4 eats our [], so we need to use [ and ] instead.
65144   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65145   if test "x$has_forbidden_chars" != x; then
65146     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65147     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65148     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65149     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65150       # Going to short mode and back again did indeed matter. Since short mode is
65151       # case insensitive, let's make it lowercase to improve readability.
65152       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65153       # Now convert it back to Unix-style (cygpath)
65154       input_path=`$CYGPATH -u "$shortmode_path"`
65155       new_path="$input_path"
65156     fi
65157   fi
65158 
65159   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65160   if test "x$test_cygdrive_prefix" = x; then
65161     # As a simple fix, exclude /usr/bin since it's not a real path.
65162     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65163       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65164       # a path prefixed by /cygdrive for fixpath to work.
65165       new_path="$CYGWIN_ROOT_PATH$input_path"
65166     fi
65167   fi
65168 
65169 
65170   if test "x$path" != "x$new_path"; then
65171     FREETYPE_INCLUDE_PATH="$new_path"
65172     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
65173 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
65174   fi
65175 
65176     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65177 
65178   path="$FREETYPE_INCLUDE_PATH"
65179   has_colon=`$ECHO $path | $GREP ^.:`
65180   new_path="$path"
65181   if test "x$has_colon" = x; then
65182     # Not in mixed or Windows style, start by that.
65183     new_path=`cmd //c echo $path`
65184   fi
65185 
65186 
65187   input_path="$new_path"
65188   # Check if we need to convert this using DOS-style short mode. If the path
65189   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65190   # take no chances and rewrite it.
65191   # Note: m4 eats our [], so we need to use [ and ] instead.
65192   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65193   if test "x$has_forbidden_chars" != x; then
65194     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65195     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65196   fi
65197 
65198 
65199   windows_path="$new_path"
65200   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65201     unix_path=`$CYGPATH -u "$windows_path"`
65202     new_path="$unix_path"
65203   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65204     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65205     new_path="$unix_path"
65206   fi
65207 
65208   if test "x$path" != "x$new_path"; then
65209     FREETYPE_INCLUDE_PATH="$new_path"
65210     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
65211 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
65212   fi
65213 
65214   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65215   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65216 
65217     else
65218       # We're on a unix platform. Hooray! :)
65219       path="$FREETYPE_INCLUDE_PATH"
65220       has_space=`$ECHO "$path" | $GREP " "`
65221       if test "x$has_space" != x; then
65222         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
65223 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
65224         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65225       fi
65226 
65227       # Use eval to expand a potential ~
65228       eval path="$path"
65229       if test ! -f "$path" && test ! -d "$path"; then
65230         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
65231       fi
65232 
65233       if test -d "$path"; then
65234         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
65235       else
65236         dir="`$DIRNAME "$path"`"
65237         base="`$BASENAME "$path"`"
65238         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
65239       fi
65240     fi
65241   fi
65242 
65243       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
65244         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
65245       else
65246         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
65247       fi
65248     fi
65249 
65250     if test "x$FREETYPE_LIBS" = x; then
65251 
65252   # Only process if variable expands to non-empty
65253 
65254   if test "x$FREETYPE_LIB_PATH" != 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_LIB_PATH"
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_LIB_PATH, which resolves as \"$path\", is invalid." >&5
65272 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
65273     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$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_LIB_PATH="$new_path"
65312     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
65313 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
65314   fi
65315 
65316     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65317 
65318   path="$FREETYPE_LIB_PATH"
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_LIB_PATH="$new_path"
65350     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
65351 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH 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_LIB_PATH"
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_LIB_PATH, which resolves as \"$path\", is invalid." >&5
65363 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, 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_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
65371       fi
65372 
65373       if test -d "$path"; then
65374         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
65375       else
65376         dir="`$DIRNAME "$path"`"
65377         base="`$BASENAME "$path"`"
65378         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
65379       fi
65380     fi
65381   fi
65382 
65383       if test "x$OPENJDK_TARGET_OS" = xwindows; then
65384         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
65385       else
65386         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
65387       fi
65388     fi
65389 
65390     # Try to compile it
65391     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
65392 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
65393     ac_ext=cpp
65394 ac_cpp='$CXXCPP $CPPFLAGS'
65395 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65396 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65397 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65398 
65399     PREV_CXXCFLAGS="$CXXFLAGS"
65400     PREV_LIBS="$LIBS"
65401     PREV_CXX="$CXX"
65402     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
65403     LIBS="$LIBS $FREETYPE_LIBS"
65404     CXX="$FIXPATH $CXX"
65405     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65406 /* end confdefs.h.  */
65407 
65408           #include<ft2build.h>
65409           #include FT_FREETYPE_H
65410           int main () {
65411             FT_Init_FreeType(NULL);
65412             return 0;
65413           }
65414 
65415 _ACEOF
65416 if ac_fn_cxx_try_link "$LINENO"; then :
65417 
65418           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65419 $as_echo "yes" >&6; }
65420 
65421 else
65422 
65423           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65424 $as_echo "no" >&6; }
65425           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
65426 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
65427           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
65428 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
65429 
65430 
65431   # Print a helpful message on how to acquire the necessary build dependency.
65432   # freetype is the help tag: freetype, cups, alsa etc
65433   MISSING_DEPENDENCY=freetype
65434 
65435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65436     cygwin_help $MISSING_DEPENDENCY
65437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65438     msys_help $MISSING_DEPENDENCY
65439   else
65440     PKGHANDLER_COMMAND=
65441 
65442     case $PKGHANDLER in
65443       apt-get)
65444         apt_help     $MISSING_DEPENDENCY ;;
65445       yum)
65446         yum_help     $MISSING_DEPENDENCY ;;
65447       brew)
65448         brew_help    $MISSING_DEPENDENCY ;;
65449       port)
65450         port_help    $MISSING_DEPENDENCY ;;
65451       pkgutil)
65452         pkgutil_help $MISSING_DEPENDENCY ;;
65453       pkgadd)
65454         pkgadd_help  $MISSING_DEPENDENCY ;;
65455     esac
65456 
65457     if test "x$PKGHANDLER_COMMAND" != x; then
65458       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65459     fi
65460   fi
65461 
65462 
65463           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
65464 
65465 
65466 fi
65467 rm -f core conftest.err conftest.$ac_objext \
65468     conftest$ac_exeext conftest.$ac_ext
65469     CXXCFLAGS="$PREV_CXXFLAGS"
65470     LIBS="$PREV_LIBS"
65471     CXX="$PREV_CXX"
65472     ac_ext=cpp
65473 ac_cpp='$CXXCPP $CPPFLAGS'
65474 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65475 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65476 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65477 
65478 
65479     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
65480 $as_echo_n "checking if we should bundle freetype... " >&6; }
65481     if test "x$BUNDLE_FREETYPE" = xyes; then
65482       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
65483     fi
65484     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
65485 $as_echo "$BUNDLE_FREETYPE" >&6; }
65486 
65487     if test "x$BUNDLE_FREETYPE" = xyes; then
65488       FREETYPE_LICENSE=""
65489       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
65490 $as_echo_n "checking for freetype license... " >&6; }
65491       if test "x$with_freetype_license" = "xyes"; then
65492         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65493 $as_echo "no" >&6; }
65494         as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
65495       elif test "x$with_freetype_license" != "x"; then
65496         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
65497 $as_echo "$with_freetype_license" >&6; }
65498         FREETYPE_LICENSE="$with_freetype_license"
65499 
65500   # Only process if variable expands to non-empty
65501 
65502   if test "x$FREETYPE_LICENSE" != x; then
65503     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65504 
65505   # Input might be given as Windows format, start by converting to
65506   # unix format.
65507   path="$FREETYPE_LICENSE"
65508   new_path=`$CYGPATH -u "$path"`
65509 
65510   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65511   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65512   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65513   # "foo.exe" is OK but "foo" is an error.
65514   #
65515   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65516   # It is also a way to make sure we got the proper file name for the real test later on.
65517   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65518   if test "x$test_shortpath" = x; then
65519     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65520 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65521     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
65522   fi
65523 
65524   # Call helper function which possibly converts this using DOS-style short mode.
65525   # If so, the updated path is stored in $new_path.
65526 
65527   input_path="$new_path"
65528   # Check if we need to convert this using DOS-style short mode. If the path
65529   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65530   # take no chances and rewrite it.
65531   # Note: m4 eats our [], so we need to use [ and ] instead.
65532   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65533   if test "x$has_forbidden_chars" != x; then
65534     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65535     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65536     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65537     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65538       # Going to short mode and back again did indeed matter. Since short mode is
65539       # case insensitive, let's make it lowercase to improve readability.
65540       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65541       # Now convert it back to Unix-style (cygpath)
65542       input_path=`$CYGPATH -u "$shortmode_path"`
65543       new_path="$input_path"
65544     fi
65545   fi
65546 
65547   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65548   if test "x$test_cygdrive_prefix" = x; then
65549     # As a simple fix, exclude /usr/bin since it's not a real path.
65550     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65551       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65552       # a path prefixed by /cygdrive for fixpath to work.
65553       new_path="$CYGWIN_ROOT_PATH$input_path"
65554     fi
65555   fi
65556 
65557 
65558   if test "x$path" != "x$new_path"; then
65559     FREETYPE_LICENSE="$new_path"
65560     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65561 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65562   fi
65563 
65564     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65565 
65566   path="$FREETYPE_LICENSE"
65567   has_colon=`$ECHO $path | $GREP ^.:`
65568   new_path="$path"
65569   if test "x$has_colon" = x; then
65570     # Not in mixed or Windows style, start by that.
65571     new_path=`cmd //c echo $path`
65572   fi
65573 
65574 
65575   input_path="$new_path"
65576   # Check if we need to convert this using DOS-style short mode. If the path
65577   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65578   # take no chances and rewrite it.
65579   # Note: m4 eats our [], so we need to use [ and ] instead.
65580   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65581   if test "x$has_forbidden_chars" != x; then
65582     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65583     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65584   fi
65585 
65586 
65587   windows_path="$new_path"
65588   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65589     unix_path=`$CYGPATH -u "$windows_path"`
65590     new_path="$unix_path"
65591   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65592     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65593     new_path="$unix_path"
65594   fi
65595 
65596   if test "x$path" != "x$new_path"; then
65597     FREETYPE_LICENSE="$new_path"
65598     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65599 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65600   fi
65601 
65602   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65603   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65604 
65605     else
65606       # We're on a unix platform. Hooray! :)
65607       path="$FREETYPE_LICENSE"
65608       has_space=`$ECHO "$path" | $GREP " "`
65609       if test "x$has_space" != x; then
65610         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65611 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65612         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65613       fi
65614 
65615       # Use eval to expand a potential ~
65616       eval path="$path"
65617       if test ! -f "$path" && test ! -d "$path"; then
65618         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
65619       fi
65620 
65621       if test -d "$path"; then
65622         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
65623       else
65624         dir="`$DIRNAME "$path"`"
65625         base="`$BASENAME "$path"`"
65626         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
65627       fi
65628     fi
65629   fi
65630 
65631         if test ! -f "$FREETYPE_LICENSE"; then
65632           as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
65633         fi
65634       else
65635         if test "x$with_freetype" != "x" && test -f $with_freetype/freetype.md; then
65636           FREETYPE_LICENSE="$with_freetype/freetype.md"
65637           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LICENSE" >&5
65638 $as_echo "$FREETYPE_LICENSE" >&6; }
65639 
65640   # Only process if variable expands to non-empty
65641 
65642   if test "x$FREETYPE_LICENSE" != x; then
65643     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65644 
65645   # Input might be given as Windows format, start by converting to
65646   # unix format.
65647   path="$FREETYPE_LICENSE"
65648   new_path=`$CYGPATH -u "$path"`
65649 
65650   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65651   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65652   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65653   # "foo.exe" is OK but "foo" is an error.
65654   #
65655   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65656   # It is also a way to make sure we got the proper file name for the real test later on.
65657   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65658   if test "x$test_shortpath" = x; then
65659     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65660 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65661     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
65662   fi
65663 
65664   # Call helper function which possibly converts this using DOS-style short mode.
65665   # If so, the updated path is stored in $new_path.
65666 
65667   input_path="$new_path"
65668   # Check if we need to convert this using DOS-style short mode. If the path
65669   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65670   # take no chances and rewrite it.
65671   # Note: m4 eats our [], so we need to use [ and ] instead.
65672   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65673   if test "x$has_forbidden_chars" != x; then
65674     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65675     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65676     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65677     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65678       # Going to short mode and back again did indeed matter. Since short mode is
65679       # case insensitive, let's make it lowercase to improve readability.
65680       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65681       # Now convert it back to Unix-style (cygpath)
65682       input_path=`$CYGPATH -u "$shortmode_path"`
65683       new_path="$input_path"
65684     fi
65685   fi
65686 
65687   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65688   if test "x$test_cygdrive_prefix" = x; then
65689     # As a simple fix, exclude /usr/bin since it's not a real path.
65690     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65691       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65692       # a path prefixed by /cygdrive for fixpath to work.
65693       new_path="$CYGWIN_ROOT_PATH$input_path"
65694     fi
65695   fi
65696 
65697 
65698   if test "x$path" != "x$new_path"; then
65699     FREETYPE_LICENSE="$new_path"
65700     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65701 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65702   fi
65703 
65704     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65705 
65706   path="$FREETYPE_LICENSE"
65707   has_colon=`$ECHO $path | $GREP ^.:`
65708   new_path="$path"
65709   if test "x$has_colon" = x; then
65710     # Not in mixed or Windows style, start by that.
65711     new_path=`cmd //c echo $path`
65712   fi
65713 
65714 
65715   input_path="$new_path"
65716   # Check if we need to convert this using DOS-style short mode. If the path
65717   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65718   # take no chances and rewrite it.
65719   # Note: m4 eats our [], so we need to use [ and ] instead.
65720   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65721   if test "x$has_forbidden_chars" != x; then
65722     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65723     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65724   fi
65725 
65726 
65727   windows_path="$new_path"
65728   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65729     unix_path=`$CYGPATH -u "$windows_path"`
65730     new_path="$unix_path"
65731   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65732     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65733     new_path="$unix_path"
65734   fi
65735 
65736   if test "x$path" != "x$new_path"; then
65737     FREETYPE_LICENSE="$new_path"
65738     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
65739 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
65740   fi
65741 
65742   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65743   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65744 
65745     else
65746       # We're on a unix platform. Hooray! :)
65747       path="$FREETYPE_LICENSE"
65748       has_space=`$ECHO "$path" | $GREP " "`
65749       if test "x$has_space" != x; then
65750         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
65751 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
65752         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65753       fi
65754 
65755       # Use eval to expand a potential ~
65756       eval path="$path"
65757       if test ! -f "$path" && test ! -d "$path"; then
65758         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
65759       fi
65760 
65761       if test -d "$path"; then
65762         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
65763       else
65764         dir="`$DIRNAME "$path"`"
65765         base="`$BASENAME "$path"`"
65766         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
65767       fi
65768     fi
65769   fi
65770 
65771         else
65772           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65773 $as_echo "no" >&6; }
65774         fi
65775       fi
65776     fi
65777 
65778   fi # end freetype needed
65779 
65780 
65781 
65782 
65783 
65784 
65785 
65786 
65787 # Check whether --with-alsa was given.
65788 if test "${with_alsa+set}" = set; then :
65789   withval=$with_alsa;
65790 fi
65791 
65792 
65793 # Check whether --with-alsa-include was given.
65794 if test "${with_alsa_include+set}" = set; then :
65795   withval=$with_alsa_include;
65796 fi
65797 
65798 
65799 # Check whether --with-alsa-lib was given.
65800 if test "${with_alsa_lib+set}" = set; then :
65801   withval=$with_alsa_lib;
65802 fi
65803 
65804 
65805   if test "x$NEEDS_LIB_ALSA" = xfalse; then
65806     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
65807         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
65808         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
65809       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
65810 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
65811     fi
65812     ALSA_CFLAGS=
65813     ALSA_LIBS=
65814   else
65815     ALSA_FOUND=no
65816 
65817     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
65818       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
65819     fi
65820 
65821     if test "x${with_alsa}" != x; then
65822       ALSA_LIBS="-L${with_alsa}/lib -lasound"
65823       ALSA_CFLAGS="-I${with_alsa}/include"
65824       ALSA_FOUND=yes
65825     fi
65826     if test "x${with_alsa_include}" != x; then
65827       ALSA_CFLAGS="-I${with_alsa_include}"
65828       ALSA_FOUND=yes
65829     fi
65830     if test "x${with_alsa_lib}" != x; then
65831       ALSA_LIBS="-L${with_alsa_lib} -lasound"
65832       ALSA_FOUND=yes
65833     fi
65834     # Do not try pkg-config if we have a sysroot set.
65835     if test "x$SYSROOT" = x; then
65836       if test "x$ALSA_FOUND" = xno; then
65837 
65838 pkg_failed=no
65839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
65840 $as_echo_n "checking for ALSA... " >&6; }
65841 
65842 if test -n "$ALSA_CFLAGS"; then
65843     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
65844  elif test -n "$PKG_CONFIG"; then
65845     if test -n "$PKG_CONFIG" && \
65846     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
65847   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
65848   ac_status=$?
65849   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65850   test $ac_status = 0; }; then
65851   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
65852 else
65853   pkg_failed=yes
65854 fi
65855  else
65856     pkg_failed=untried
65857 fi
65858 if test -n "$ALSA_LIBS"; then
65859     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
65860  elif test -n "$PKG_CONFIG"; then
65861     if test -n "$PKG_CONFIG" && \
65862     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
65863   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
65864   ac_status=$?
65865   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65866   test $ac_status = 0; }; then
65867   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
65868 else
65869   pkg_failed=yes
65870 fi
65871  else
65872     pkg_failed=untried
65873 fi
65874 
65875 
65876 
65877 if test $pkg_failed = yes; then
65878 
65879 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65880         _pkg_short_errors_supported=yes
65881 else
65882         _pkg_short_errors_supported=no
65883 fi
65884         if test $_pkg_short_errors_supported = yes; then
65885                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
65886         else
65887                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
65888         fi
65889         # Put the nasty error message in config.log where it belongs
65890         echo "$ALSA_PKG_ERRORS" >&5
65891 
65892         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65893 $as_echo "no" >&6; }
65894                 ALSA_FOUND=no
65895 elif test $pkg_failed = untried; then
65896         ALSA_FOUND=no
65897 else
65898         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
65899         ALSA_LIBS=$pkg_cv_ALSA_LIBS
65900         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65901 $as_echo "yes" >&6; }
65902         ALSA_FOUND=yes
65903 fi
65904       fi
65905     fi
65906     if test "x$ALSA_FOUND" = xno; then
65907       for ac_header in alsa/asoundlib.h
65908 do :
65909   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
65910 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
65911   cat >>confdefs.h <<_ACEOF
65912 #define HAVE_ALSA_ASOUNDLIB_H 1
65913 _ACEOF
65914 
65915             ALSA_FOUND=yes
65916             ALSA_CFLAGS=-Iignoreme
65917             ALSA_LIBS=-lasound
65918             DEFAULT_ALSA=yes
65919 
65920 else
65921   ALSA_FOUND=no
65922 
65923 fi
65924 
65925 done
65926 
65927     fi
65928     if test "x$ALSA_FOUND" = xno; then
65929 
65930   # Print a helpful message on how to acquire the necessary build dependency.
65931   # alsa is the help tag: freetype, cups, alsa etc
65932   MISSING_DEPENDENCY=alsa
65933 
65934   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65935     cygwin_help $MISSING_DEPENDENCY
65936   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65937     msys_help $MISSING_DEPENDENCY
65938   else
65939     PKGHANDLER_COMMAND=
65940 
65941     case $PKGHANDLER in
65942       apt-get)
65943         apt_help     $MISSING_DEPENDENCY ;;
65944       yum)
65945         yum_help     $MISSING_DEPENDENCY ;;
65946       brew)
65947         brew_help    $MISSING_DEPENDENCY ;;
65948       port)
65949         port_help    $MISSING_DEPENDENCY ;;
65950       pkgutil)
65951         pkgutil_help $MISSING_DEPENDENCY ;;
65952       pkgadd)
65953         pkgadd_help  $MISSING_DEPENDENCY ;;
65954     esac
65955 
65956     if test "x$PKGHANDLER_COMMAND" != x; then
65957       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65958     fi
65959   fi
65960 
65961       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
65962     fi
65963   fi
65964 
65965 
65966 
65967 
65968 
65969 
65970 # Check whether --with-libffi was given.
65971 if test "${with_libffi+set}" = set; then :
65972   withval=$with_libffi;
65973 fi
65974 
65975 
65976 # Check whether --with-libffi-include was given.
65977 if test "${with_libffi_include+set}" = set; then :
65978   withval=$with_libffi_include;
65979 fi
65980 
65981 
65982 # Check whether --with-libffi-lib was given.
65983 if test "${with_libffi_lib+set}" = set; then :
65984   withval=$with_libffi_lib;
65985 fi
65986 
65987   # Check whether --enable-libffi-bundling was given.
65988 if test "${enable_libffi_bundling+set}" = set; then :
65989   enableval=$enable_libffi_bundling;
65990 fi
65991 
65992 
65993   if test "x$NEEDS_LIB_FFI" = xfalse; then
65994     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
65995         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
65996         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
65997       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
65998 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
65999     fi
66000     LIBFFI_CFLAGS=
66001     LIBFFI_LIBS=
66002   else
66003     LIBFFI_FOUND=no
66004 
66005     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
66006       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
66007     fi
66008 
66009     if test "x${with_libffi}" != x; then
66010       LIBFFI_LIB_PATH="${with_libffi}/lib"
66011       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
66012       LIBFFI_CFLAGS="-I${with_libffi}/include"
66013       LIBFFI_FOUND=yes
66014     fi
66015     if test "x${with_libffi_include}" != x; then
66016       LIBFFI_CFLAGS="-I${with_libffi_include}"
66017       LIBFFI_FOUND=yes
66018     fi
66019     if test "x${with_libffi_lib}" != x; then
66020       LIBFFI_LIB_PATH="${with_libffi_lib}"
66021       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
66022       LIBFFI_FOUND=yes
66023     fi
66024     # Do not try pkg-config if we have a sysroot set.
66025     if test "x$SYSROOT" = x; then
66026       if test "x$LIBFFI_FOUND" = xno; then
66027         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
66028 
66029 pkg_failed=no
66030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
66031 $as_echo_n "checking for LIBFFI... " >&6; }
66032 
66033 if test -n "$LIBFFI_CFLAGS"; then
66034     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
66035  elif test -n "$PKG_CONFIG"; then
66036     if test -n "$PKG_CONFIG" && \
66037     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
66038   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
66039   ac_status=$?
66040   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66041   test $ac_status = 0; }; then
66042   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
66043 else
66044   pkg_failed=yes
66045 fi
66046  else
66047     pkg_failed=untried
66048 fi
66049 if test -n "$LIBFFI_LIBS"; then
66050     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
66051  elif test -n "$PKG_CONFIG"; then
66052     if test -n "$PKG_CONFIG" && \
66053     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
66054   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
66055   ac_status=$?
66056   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66057   test $ac_status = 0; }; then
66058   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
66059 else
66060   pkg_failed=yes
66061 fi
66062  else
66063     pkg_failed=untried
66064 fi
66065 
66066 
66067 
66068 if test $pkg_failed = yes; then
66069 
66070 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
66071         _pkg_short_errors_supported=yes
66072 else
66073         _pkg_short_errors_supported=no
66074 fi
66075         if test $_pkg_short_errors_supported = yes; then
66076                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
66077         else
66078                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
66079         fi
66080         # Put the nasty error message in config.log where it belongs
66081         echo "$LIBFFI_PKG_ERRORS" >&5
66082 
66083         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66084 $as_echo "no" >&6; }
66085                 LIBFFI_FOUND=no
66086 elif test $pkg_failed = untried; then
66087         LIBFFI_FOUND=no
66088 else
66089         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
66090         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
66091         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66092 $as_echo "yes" >&6; }
66093         LIBFFI_FOUND=yes
66094 fi
66095       fi
66096     fi
66097     if test "x$LIBFFI_FOUND" = xno; then
66098       for ac_header in ffi.h
66099 do :
66100   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
66101 if test "x$ac_cv_header_ffi_h" = xyes; then :
66102   cat >>confdefs.h <<_ACEOF
66103 #define HAVE_FFI_H 1
66104 _ACEOF
66105 
66106             LIBFFI_FOUND=yes
66107             LIBFFI_CFLAGS=
66108             LIBFFI_LIBS=-lffi
66109 
66110 else
66111   LIBFFI_FOUND=no
66112 
66113 fi
66114 
66115 done
66116 
66117     fi
66118     if test "x$LIBFFI_FOUND" = xno; then
66119 
66120   # Print a helpful message on how to acquire the necessary build dependency.
66121   # ffi is the help tag: freetype, cups, alsa etc
66122   MISSING_DEPENDENCY=ffi
66123 
66124   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66125     cygwin_help $MISSING_DEPENDENCY
66126   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66127     msys_help $MISSING_DEPENDENCY
66128   else
66129     PKGHANDLER_COMMAND=
66130 
66131     case $PKGHANDLER in
66132       apt-get)
66133         apt_help     $MISSING_DEPENDENCY ;;
66134       yum)
66135         yum_help     $MISSING_DEPENDENCY ;;
66136       brew)
66137         brew_help    $MISSING_DEPENDENCY ;;
66138       port)
66139         port_help    $MISSING_DEPENDENCY ;;
66140       pkgutil)
66141         pkgutil_help $MISSING_DEPENDENCY ;;
66142       pkgadd)
66143         pkgadd_help  $MISSING_DEPENDENCY ;;
66144     esac
66145 
66146     if test "x$PKGHANDLER_COMMAND" != x; then
66147       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
66148     fi
66149   fi
66150 
66151       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
66152     fi
66153 
66154     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
66155 $as_echo_n "checking if libffi works... " >&6; }
66156     ac_ext=c
66157 ac_cpp='$CPP $CPPFLAGS'
66158 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
66159 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
66160 ac_compiler_gnu=$ac_cv_c_compiler_gnu
66161 
66162     OLD_CFLAGS="$CFLAGS"
66163     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
66164     OLD_LIBS="$LIBS"
66165     LIBS="$LIBS $LIBFFI_LIBS"
66166     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66167 /* end confdefs.h.  */
66168 #include <ffi.h>
66169 int
66170 main ()
66171 {
66172 
66173           ffi_call(NULL, NULL, NULL, NULL);
66174           return 0;
66175 
66176   ;
66177   return 0;
66178 }
66179 _ACEOF
66180 if ac_fn_c_try_link "$LINENO"; then :
66181   LIBFFI_WORKS=yes
66182 else
66183   LIBFFI_WORKS=no
66184 
66185 fi
66186 rm -f core conftest.err conftest.$ac_objext \
66187     conftest$ac_exeext conftest.$ac_ext
66188     CFLAGS="$OLD_CFLAGS"
66189     LIBS="$OLD_LIBS"
66190     ac_ext=cpp
66191 ac_cpp='$CXXCPP $CPPFLAGS'
66192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
66193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
66194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
66195 
66196     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
66197 $as_echo "$LIBFFI_WORKS" >&6; }
66198 
66199     if test "x$LIBFFI_WORKS" = xno; then
66200 
66201   # Print a helpful message on how to acquire the necessary build dependency.
66202   # ffi is the help tag: freetype, cups, alsa etc
66203   MISSING_DEPENDENCY=ffi
66204 
66205   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66206     cygwin_help $MISSING_DEPENDENCY
66207   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66208     msys_help $MISSING_DEPENDENCY
66209   else
66210     PKGHANDLER_COMMAND=
66211 
66212     case $PKGHANDLER in
66213       apt-get)
66214         apt_help     $MISSING_DEPENDENCY ;;
66215       yum)
66216         yum_help     $MISSING_DEPENDENCY ;;
66217       brew)
66218         brew_help    $MISSING_DEPENDENCY ;;
66219       port)
66220         port_help    $MISSING_DEPENDENCY ;;
66221       pkgutil)
66222         pkgutil_help $MISSING_DEPENDENCY ;;
66223       pkgadd)
66224         pkgadd_help  $MISSING_DEPENDENCY ;;
66225     esac
66226 
66227     if test "x$PKGHANDLER_COMMAND" != x; then
66228       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
66229     fi
66230   fi
66231 
66232       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
66233     fi
66234 
66235     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
66236 $as_echo_n "checking if libffi should be bundled... " >&6; }
66237     if test "x$enable_libffi_bundling" = "x"; then
66238       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66239 $as_echo "no" >&6; }
66240       ENABLE_LIBFFI_BUNDLING=false
66241     elif  test "x$enable_libffi_bundling" = "xno"; then
66242       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66243 $as_echo "no, forced" >&6; }
66244       ENABLE_LIBFFI_BUNDLING=false
66245     elif  test "x$enable_libffi_bundling" = "xyes"; then
66246       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
66247 $as_echo "yes, forced" >&6; }
66248       ENABLE_LIBFFI_BUNDLING=true
66249     else
66250       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
66251     fi
66252 
66253     # Find the libffi.so.X to bundle
66254     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
66255       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
66256 $as_echo_n "checking for libffi lib file location... " >&6; }
66257       if test "x${LIBFFI_LIB_PATH}" != x; then
66258         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
66259           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
66260         else
66261           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
66262         fi
66263       else
66264         # If we don't have an explicit path, look in a few obvious places
66265         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
66266           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
66267             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
66268           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
66269             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
66270           else
66271             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
66272           fi
66273         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
66274           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
66275             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
66276           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
66277             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
66278           else
66279             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
66280           fi
66281         else
66282           # Fallback on the default /usr/lib dir
66283           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
66284             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
66285           else
66286             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
66287           fi
66288         fi
66289       fi
66290       # Make sure the wildcard is evaluated
66291       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
66292       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
66293 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
66294     fi
66295   fi
66296 
66297 
66298 
66299 
66300 
66301 
66302 
66303 
66304 # Check whether --with-libjpeg was given.
66305 if test "${with_libjpeg+set}" = set; then :
66306   withval=$with_libjpeg;
66307 fi
66308 
66309 
66310   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
66311 $as_echo_n "checking for which libjpeg to use... " >&6; }
66312   # default is bundled
66313   DEFAULT_LIBJPEG=bundled
66314   # if user didn't specify, use DEFAULT_LIBJPEG
66315   if test "x${with_libjpeg}" = "x"; then
66316     with_libjpeg=${DEFAULT_LIBJPEG}
66317   fi
66318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
66319 $as_echo "${with_libjpeg}" >&6; }
66320 
66321   if test "x${with_libjpeg}" = "xbundled"; then
66322     USE_EXTERNAL_LIBJPEG=false
66323   elif test "x${with_libjpeg}" = "xsystem"; then
66324     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
66325 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
66326 
66327 else
66328    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
66329 fi
66330 
66331 
66332     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
66333 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
66334 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
66335   $as_echo_n "(cached) " >&6
66336 else
66337   ac_check_lib_save_LIBS=$LIBS
66338 LIBS="-ljpeg  $LIBS"
66339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66340 /* end confdefs.h.  */
66341 
66342 /* Override any GCC internal prototype to avoid an error.
66343    Use char because int might match the return type of a GCC
66344    builtin and then its argument prototype would still apply.  */
66345 #ifdef __cplusplus
66346 extern "C"
66347 #endif
66348 char jpeg_CreateDecompress ();
66349 int
66350 main ()
66351 {
66352 return jpeg_CreateDecompress ();
66353   ;
66354   return 0;
66355 }
66356 _ACEOF
66357 if ac_fn_cxx_try_link "$LINENO"; then :
66358   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
66359 else
66360   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
66361 fi
66362 rm -f core conftest.err conftest.$ac_objext \
66363     conftest$ac_exeext conftest.$ac_ext
66364 LIBS=$ac_check_lib_save_LIBS
66365 fi
66366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
66367 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
66368 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
66369   cat >>confdefs.h <<_ACEOF
66370 #define HAVE_LIBJPEG 1
66371 _ACEOF
66372 
66373   LIBS="-ljpeg $LIBS"
66374 
66375 else
66376    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
66377 fi
66378 
66379 
66380     USE_EXTERNAL_LIBJPEG=true
66381   else
66382     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
66383   fi
66384 
66385 
66386 
66387 
66388 
66389 # Check whether --with-giflib was given.
66390 if test "${with_giflib+set}" = set; then :
66391   withval=$with_giflib;
66392 fi
66393 
66394 
66395   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
66396 $as_echo_n "checking for which giflib to use... " >&6; }
66397   # default is bundled
66398   DEFAULT_GIFLIB=bundled
66399   # if user didn't specify, use DEFAULT_GIFLIB
66400   if test "x${with_giflib}" = "x"; then
66401     with_giflib=${DEFAULT_GIFLIB}
66402   fi
66403   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
66404 $as_echo "${with_giflib}" >&6; }
66405 
66406   if test "x${with_giflib}" = "xbundled"; then
66407     USE_EXTERNAL_LIBGIF=false
66408   elif test "x${with_giflib}" = "xsystem"; then
66409     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
66410 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
66411 
66412 else
66413    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
66414 fi
66415 
66416 
66417     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
66418 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
66419 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
66420   $as_echo_n "(cached) " >&6
66421 else
66422   ac_check_lib_save_LIBS=$LIBS
66423 LIBS="-lgif  $LIBS"
66424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66425 /* end confdefs.h.  */
66426 
66427 /* Override any GCC internal prototype to avoid an error.
66428    Use char because int might match the return type of a GCC
66429    builtin and then its argument prototype would still apply.  */
66430 #ifdef __cplusplus
66431 extern "C"
66432 #endif
66433 char DGifGetCode ();
66434 int
66435 main ()
66436 {
66437 return DGifGetCode ();
66438   ;
66439   return 0;
66440 }
66441 _ACEOF
66442 if ac_fn_cxx_try_link "$LINENO"; then :
66443   ac_cv_lib_gif_DGifGetCode=yes
66444 else
66445   ac_cv_lib_gif_DGifGetCode=no
66446 fi
66447 rm -f core conftest.err conftest.$ac_objext \
66448     conftest$ac_exeext conftest.$ac_ext
66449 LIBS=$ac_check_lib_save_LIBS
66450 fi
66451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
66452 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
66453 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
66454   cat >>confdefs.h <<_ACEOF
66455 #define HAVE_LIBGIF 1
66456 _ACEOF
66457 
66458   LIBS="-lgif $LIBS"
66459 
66460 else
66461    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
66462 fi
66463 
66464 
66465     USE_EXTERNAL_LIBGIF=true
66466   else
66467     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
66468   fi
66469 
66470 
66471 
66472 
66473 
66474 # Check whether --with-libpng was given.
66475 if test "${with_libpng+set}" = set; then :
66476   withval=$with_libpng;
66477 fi
66478 
66479 
66480 
66481 pkg_failed=no
66482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
66483 $as_echo_n "checking for PNG... " >&6; }
66484 
66485 if test -n "$PNG_CFLAGS"; then
66486     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
66487  elif test -n "$PKG_CONFIG"; then
66488     if test -n "$PKG_CONFIG" && \
66489     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
66490   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
66491   ac_status=$?
66492   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66493   test $ac_status = 0; }; then
66494   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
66495 else
66496   pkg_failed=yes
66497 fi
66498  else
66499     pkg_failed=untried
66500 fi
66501 if test -n "$PNG_LIBS"; then
66502     pkg_cv_PNG_LIBS="$PNG_LIBS"
66503  elif test -n "$PKG_CONFIG"; then
66504     if test -n "$PKG_CONFIG" && \
66505     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
66506   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
66507   ac_status=$?
66508   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66509   test $ac_status = 0; }; then
66510   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
66511 else
66512   pkg_failed=yes
66513 fi
66514  else
66515     pkg_failed=untried
66516 fi
66517 
66518 
66519 
66520 if test $pkg_failed = yes; then
66521 
66522 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
66523         _pkg_short_errors_supported=yes
66524 else
66525         _pkg_short_errors_supported=no
66526 fi
66527         if test $_pkg_short_errors_supported = yes; then
66528                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
66529         else
66530                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
66531         fi
66532         # Put the nasty error message in config.log where it belongs
66533         echo "$PNG_PKG_ERRORS" >&5
66534 
66535         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66536 $as_echo "no" >&6; }
66537                 LIBPNG_FOUND=no
66538 elif test $pkg_failed = untried; then
66539         LIBPNG_FOUND=no
66540 else
66541         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
66542         PNG_LIBS=$pkg_cv_PNG_LIBS
66543         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66544 $as_echo "yes" >&6; }
66545         LIBPNG_FOUND=yes
66546 fi
66547   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
66548 $as_echo_n "checking for which libpng to use... " >&6; }
66549 
66550   # default is bundled
66551   DEFAULT_LIBPNG=bundled
66552   # if user didn't specify, use DEFAULT_LIBPNG
66553   if test "x${with_libpng}" = "x"; then
66554     with_libpng=${DEFAULT_LIBPNG}
66555   fi
66556 
66557   if test "x${with_libpng}" = "xbundled"; then
66558     USE_EXTERNAL_LIBPNG=false
66559     PNG_CFLAGS=""
66560     PNG_LIBS=""
66561     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
66562 $as_echo "bundled" >&6; }
66563   elif test "x${with_libpng}" = "xsystem"; then
66564     if test "x${LIBPNG_FOUND}" = "xyes"; then
66565       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
66566       USE_EXTERNAL_LIBPNG=true
66567       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
66568 $as_echo "system" >&6; }
66569     else
66570       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
66571 $as_echo "system not found" >&6; }
66572       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
66573     fi
66574   else
66575     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
66576   fi
66577 
66578 
66579 
66580 
66581 
66582 
66583 
66584 # Check whether --with-zlib was given.
66585 if test "${with_zlib+set}" = set; then :
66586   withval=$with_zlib;
66587 fi
66588 
66589 
66590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
66591 $as_echo_n "checking for compress in -lz... " >&6; }
66592 if ${ac_cv_lib_z_compress+:} false; then :
66593   $as_echo_n "(cached) " >&6
66594 else
66595   ac_check_lib_save_LIBS=$LIBS
66596 LIBS="-lz  $LIBS"
66597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66598 /* end confdefs.h.  */
66599 
66600 /* Override any GCC internal prototype to avoid an error.
66601    Use char because int might match the return type of a GCC
66602    builtin and then its argument prototype would still apply.  */
66603 #ifdef __cplusplus
66604 extern "C"
66605 #endif
66606 char compress ();
66607 int
66608 main ()
66609 {
66610 return compress ();
66611   ;
66612   return 0;
66613 }
66614 _ACEOF
66615 if ac_fn_cxx_try_link "$LINENO"; then :
66616   ac_cv_lib_z_compress=yes
66617 else
66618   ac_cv_lib_z_compress=no
66619 fi
66620 rm -f core conftest.err conftest.$ac_objext \
66621     conftest$ac_exeext conftest.$ac_ext
66622 LIBS=$ac_check_lib_save_LIBS
66623 fi
66624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
66625 $as_echo "$ac_cv_lib_z_compress" >&6; }
66626 if test "x$ac_cv_lib_z_compress" = xyes; then :
66627    ZLIB_FOUND=yes
66628 else
66629    ZLIB_FOUND=no
66630 fi
66631 
66632 
66633   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
66634 $as_echo_n "checking for which zlib to use... " >&6; }
66635 
66636   DEFAULT_ZLIB=system
66637   if test "x$OPENJDK_TARGET_OS" = xwindows; then
66638     # On windows default is bundled...on others default is system
66639     DEFAULT_ZLIB=bundled
66640   fi
66641 
66642   if test "x${ZLIB_FOUND}" != "xyes"; then
66643     # If we don't find any system...set default to bundled
66644     DEFAULT_ZLIB=bundled
66645   fi
66646 
66647   # If user didn't specify, use DEFAULT_ZLIB
66648   if test "x${with_zlib}" = "x"; then
66649     with_zlib=${DEFAULT_ZLIB}
66650   fi
66651 
66652   if test "x${with_zlib}" = "xbundled"; then
66653     USE_EXTERNAL_LIBZ=false
66654     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
66655 $as_echo "bundled" >&6; }
66656   elif test "x${with_zlib}" = "xsystem"; then
66657     if test "x${ZLIB_FOUND}" = "xyes"; then
66658       USE_EXTERNAL_LIBZ=true
66659       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
66660 $as_echo "system" >&6; }
66661 
66662       if test "x$USE_EXTERNAL_LIBPNG" != "xtrue"; then
66663         # If we use bundled libpng, we must verify that we have a proper zlib.
66664         # For instance zlib-ng has had issues with inflateValidate().
66665         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for system zlib functionality" >&5
66666 $as_echo_n "checking for system zlib functionality... " >&6; }
66667         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66668 /* end confdefs.h.  */
66669 #include "zlib.h"
66670 int
66671 main ()
66672 {
66673 
66674                 #if ZLIB_VERNUM >= 0x1281
66675                   inflateValidate(NULL, 0);
66676                 #endif
66677 
66678   ;
66679   return 0;
66680 }
66681 _ACEOF
66682 if ac_fn_cxx_try_compile "$LINENO"; then :
66683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
66684 $as_echo "ok" >&6; }
66685 else
66686 
66687                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not ok" >&5
66688 $as_echo "not ok" >&6; }
66689                 as_fn_error $? "System zlib not working correctly" "$LINENO" 5
66690 
66691 
66692 fi
66693 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66694       fi
66695     else
66696       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
66697 $as_echo "system not found" >&6; }
66698       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
66699     fi
66700   else
66701     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
66702   fi
66703 
66704 
66705 
66706 
66707 
66708 # Check whether --with-lcms was given.
66709 if test "${with_lcms+set}" = set; then :
66710   withval=$with_lcms;
66711 fi
66712 
66713 
66714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
66715 $as_echo_n "checking for which lcms to use... " >&6; }
66716 
66717   DEFAULT_LCMS=bundled
66718   # If user didn't specify, use DEFAULT_LCMS
66719   if test "x${with_lcms}" = "x"; then
66720     with_lcms=${DEFAULT_LCMS}
66721   fi
66722 
66723   if test "x${with_lcms}" = "xbundled"; then
66724     USE_EXTERNAL_LCMS=false
66725     LCMS_CFLAGS=""
66726     LCMS_LIBS=""
66727     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
66728 $as_echo "bundled" >&6; }
66729   elif test "x${with_lcms}" = "xsystem"; then
66730     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
66731 $as_echo "system" >&6; }
66732 
66733 pkg_failed=no
66734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
66735 $as_echo_n "checking for LCMS... " >&6; }
66736 
66737 if test -n "$LCMS_CFLAGS"; then
66738     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
66739  elif test -n "$PKG_CONFIG"; then
66740     if test -n "$PKG_CONFIG" && \
66741     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
66742   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
66743   ac_status=$?
66744   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66745   test $ac_status = 0; }; then
66746   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
66747 else
66748   pkg_failed=yes
66749 fi
66750  else
66751     pkg_failed=untried
66752 fi
66753 if test -n "$LCMS_LIBS"; then
66754     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
66755  elif test -n "$PKG_CONFIG"; then
66756     if test -n "$PKG_CONFIG" && \
66757     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
66758   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
66759   ac_status=$?
66760   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
66761   test $ac_status = 0; }; then
66762   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
66763 else
66764   pkg_failed=yes
66765 fi
66766  else
66767     pkg_failed=untried
66768 fi
66769 
66770 
66771 
66772 if test $pkg_failed = yes; then
66773 
66774 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
66775         _pkg_short_errors_supported=yes
66776 else
66777         _pkg_short_errors_supported=no
66778 fi
66779         if test $_pkg_short_errors_supported = yes; then
66780                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
66781         else
66782                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
66783         fi
66784         # Put the nasty error message in config.log where it belongs
66785         echo "$LCMS_PKG_ERRORS" >&5
66786 
66787         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66788 $as_echo "no" >&6; }
66789                 LCMS_FOUND=no
66790 elif test $pkg_failed = untried; then
66791         LCMS_FOUND=no
66792 else
66793         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
66794         LCMS_LIBS=$pkg_cv_LCMS_LIBS
66795         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66796 $as_echo "yes" >&6; }
66797         LCMS_FOUND=yes
66798 fi
66799     if test "x${LCMS_FOUND}" = "xyes"; then
66800       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
66801       USE_EXTERNAL_LCMS=true
66802     else
66803       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
66804     fi
66805   else
66806     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
66807   fi
66808 
66809 
66810 
66811 
66812 
66813 
66814 
66815 
66816 
66817 
66818 
66819 
66820 
66821   # Setup libm (the maths library)
66822   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
66823     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
66824 $as_echo_n "checking for cos in -lm... " >&6; }
66825 if ${ac_cv_lib_m_cos+:} false; then :
66826   $as_echo_n "(cached) " >&6
66827 else
66828   ac_check_lib_save_LIBS=$LIBS
66829 LIBS="-lm  $LIBS"
66830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66831 /* end confdefs.h.  */
66832 
66833 /* Override any GCC internal prototype to avoid an error.
66834    Use char because int might match the return type of a GCC
66835    builtin and then its argument prototype would still apply.  */
66836 #ifdef __cplusplus
66837 extern "C"
66838 #endif
66839 char cos ();
66840 int
66841 main ()
66842 {
66843 return cos ();
66844   ;
66845   return 0;
66846 }
66847 _ACEOF
66848 if ac_fn_cxx_try_link "$LINENO"; then :
66849   ac_cv_lib_m_cos=yes
66850 else
66851   ac_cv_lib_m_cos=no
66852 fi
66853 rm -f core conftest.err conftest.$ac_objext \
66854     conftest$ac_exeext conftest.$ac_ext
66855 LIBS=$ac_check_lib_save_LIBS
66856 fi
66857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
66858 $as_echo "$ac_cv_lib_m_cos" >&6; }
66859 if test "x$ac_cv_lib_m_cos" = xyes; then :
66860   cat >>confdefs.h <<_ACEOF
66861 #define HAVE_LIBM 1
66862 _ACEOF
66863 
66864   LIBS="-lm $LIBS"
66865 
66866 else
66867 
66868         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
66869 $as_echo "$as_me: Maths library was not found" >&6;}
66870 
66871 fi
66872 
66873     LIBM="-lm"
66874   else
66875     LIBM=""
66876   fi
66877 
66878 
66879   # Setup libdl (for dynamic library loading)
66880   save_LIBS="$LIBS"
66881   LIBS=""
66882   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
66883 $as_echo_n "checking for dlopen in -ldl... " >&6; }
66884 if ${ac_cv_lib_dl_dlopen+:} false; then :
66885   $as_echo_n "(cached) " >&6
66886 else
66887   ac_check_lib_save_LIBS=$LIBS
66888 LIBS="-ldl  $LIBS"
66889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66890 /* end confdefs.h.  */
66891 
66892 /* Override any GCC internal prototype to avoid an error.
66893    Use char because int might match the return type of a GCC
66894    builtin and then its argument prototype would still apply.  */
66895 #ifdef __cplusplus
66896 extern "C"
66897 #endif
66898 char dlopen ();
66899 int
66900 main ()
66901 {
66902 return dlopen ();
66903   ;
66904   return 0;
66905 }
66906 _ACEOF
66907 if ac_fn_cxx_try_link "$LINENO"; then :
66908   ac_cv_lib_dl_dlopen=yes
66909 else
66910   ac_cv_lib_dl_dlopen=no
66911 fi
66912 rm -f core conftest.err conftest.$ac_objext \
66913     conftest$ac_exeext conftest.$ac_ext
66914 LIBS=$ac_check_lib_save_LIBS
66915 fi
66916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
66917 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
66918 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
66919   cat >>confdefs.h <<_ACEOF
66920 #define HAVE_LIBDL 1
66921 _ACEOF
66922 
66923   LIBS="-ldl $LIBS"
66924 
66925 fi
66926 
66927   LIBDL="$LIBS"
66928 
66929   LIBS="$save_LIBS"
66930 
66931   # Deprecated libraries, keep the flags for backwards compatibility
66932   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
66933 
66934 
66935 # Check whether --with-dxsdk was given.
66936 if test "${with_dxsdk+set}" = set; then :
66937   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
66938 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
66939 fi
66940 
66941 
66942 
66943 
66944 # Check whether --with-dxsdk-lib was given.
66945 if test "${with_dxsdk_lib+set}" = set; then :
66946   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
66947 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
66948 fi
66949 
66950 
66951 
66952 
66953 # Check whether --with-dxsdk-include was given.
66954 if test "${with_dxsdk_include+set}" = set; then :
66955   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
66956 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
66957 fi
66958 
66959 
66960   fi
66961 
66962   # Control if libzip can use mmap. Available for purposes of overriding.
66963   LIBZIP_CAN_USE_MMAP=true
66964 
66965 
66966 
66967   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
66968     # Find the root of the Solaris Studio installation from the compiler path
66969     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
66970     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
66971     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
66972 $as_echo_n "checking for libstlport.so.1... " >&6; }
66973     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
66974       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
66975       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
66976     fi
66977     if test -f "$STLPORT_LIB"; then
66978       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
66979 $as_echo "yes, $STLPORT_LIB" >&6; }
66980 
66981   # Only process if variable expands to non-empty
66982 
66983   if test "x$STLPORT_LIB" != x; then
66984     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66985 
66986   # Input might be given as Windows format, start by converting to
66987   # unix format.
66988   path="$STLPORT_LIB"
66989   new_path=`$CYGPATH -u "$path"`
66990 
66991   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
66992   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
66993   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
66994   # "foo.exe" is OK but "foo" is an error.
66995   #
66996   # This test is therefore slightly more accurate than "test -f" to check for file precense.
66997   # It is also a way to make sure we got the proper file name for the real test later on.
66998   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
66999   if test "x$test_shortpath" = x; then
67000     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
67001 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
67002     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
67003   fi
67004 
67005   # Call helper function which possibly converts this using DOS-style short mode.
67006   # If so, the updated path is stored in $new_path.
67007 
67008   input_path="$new_path"
67009   # Check if we need to convert this using DOS-style short mode. If the path
67010   # contains just simple characters, use it. Otherwise (spaces, weird characters),
67011   # take no chances and rewrite it.
67012   # Note: m4 eats our [], so we need to use [ and ] instead.
67013   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
67014   if test "x$has_forbidden_chars" != x; then
67015     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
67016     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
67017     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
67018     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
67019       # Going to short mode and back again did indeed matter. Since short mode is
67020       # case insensitive, let's make it lowercase to improve readability.
67021       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
67022       # Now convert it back to Unix-style (cygpath)
67023       input_path=`$CYGPATH -u "$shortmode_path"`
67024       new_path="$input_path"
67025     fi
67026   fi
67027 
67028   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
67029   if test "x$test_cygdrive_prefix" = x; then
67030     # As a simple fix, exclude /usr/bin since it's not a real path.
67031     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
67032       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
67033       # a path prefixed by /cygdrive for fixpath to work.
67034       new_path="$CYGWIN_ROOT_PATH$input_path"
67035     fi
67036   fi
67037 
67038 
67039   if test "x$path" != "x$new_path"; then
67040     STLPORT_LIB="$new_path"
67041     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
67042 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
67043   fi
67044 
67045     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67046 
67047   path="$STLPORT_LIB"
67048   has_colon=`$ECHO $path | $GREP ^.:`
67049   new_path="$path"
67050   if test "x$has_colon" = x; then
67051     # Not in mixed or Windows style, start by that.
67052     new_path=`cmd //c echo $path`
67053   fi
67054 
67055 
67056   input_path="$new_path"
67057   # Check if we need to convert this using DOS-style short mode. If the path
67058   # contains just simple characters, use it. Otherwise (spaces, weird characters),
67059   # take no chances and rewrite it.
67060   # Note: m4 eats our [], so we need to use [ and ] instead.
67061   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
67062   if test "x$has_forbidden_chars" != x; then
67063     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
67064     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
67065   fi
67066 
67067 
67068   windows_path="$new_path"
67069   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67070     unix_path=`$CYGPATH -u "$windows_path"`
67071     new_path="$unix_path"
67072   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67073     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
67074     new_path="$unix_path"
67075   fi
67076 
67077   if test "x$path" != "x$new_path"; then
67078     STLPORT_LIB="$new_path"
67079     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
67080 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
67081   fi
67082 
67083   # Save the first 10 bytes of this path to the storage, so fixpath can work.
67084   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
67085 
67086     else
67087       # We're on a unix platform. Hooray! :)
67088       path="$STLPORT_LIB"
67089       has_space=`$ECHO "$path" | $GREP " "`
67090       if test "x$has_space" != x; then
67091         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
67092 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
67093         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
67094       fi
67095 
67096       # Use eval to expand a potential ~
67097       eval path="$path"
67098       if test ! -f "$path" && test ! -d "$path"; then
67099         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
67100       fi
67101 
67102       if test -d "$path"; then
67103         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
67104       else
67105         dir="`$DIRNAME "$path"`"
67106         base="`$BASENAME "$path"`"
67107         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
67108       fi
67109     fi
67110   fi
67111 
67112     else
67113       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
67114 $as_echo "no, not found at $STLPORT_LIB" >&6; }
67115       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
67116     fi
67117 
67118   fi
67119 
67120 
67121 
67122 
67123 
67124 
67125 
67126 
67127 
67128 
67129 
67130 
67131 
67132 
67133 # Hotspot setup depends on lib checks.
67134 
67135 
67136   # The user can in some cases supply additional jvm features. For the custom
67137   # variant, this defines the entire variant.
67138 
67139 # Check whether --with-jvm-features was given.
67140 if test "${with_jvm_features+set}" = set; then :
67141   withval=$with_jvm_features;
67142 fi
67143 
67144   if test "x$with_jvm_features" != x; then
67145     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
67146 $as_echo_n "checking additional JVM features... " >&6; }
67147     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
67148     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
67149 $as_echo "$JVM_FEATURES" >&6; }
67150   fi
67151 
67152   # Override hotspot cpu definitions for ARM platforms
67153   if test "x$OPENJDK_TARGET_CPU" = xarm; then
67154     HOTSPOT_TARGET_CPU=arm_32
67155     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
67156     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
67157     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
67158   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
67159     HOTSPOT_TARGET_CPU=arm_64
67160     HOTSPOT_TARGET_CPU_ARCH=arm
67161     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
67162     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
67163   fi
67164 
67165   # Verify that dependencies are met for explicitly set features.
67166   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
67167     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
67168   fi
67169 
67170   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
67171     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
67172   fi
67173 
67174   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
67175     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
67176   fi
67177 
67178   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
67179     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
67180   fi
67181 
67182   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
67183     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
67184   fi
67185 
67186   # Turn on additional features based on other parts of configure
67187   if test "x$INCLUDE_DTRACE" = "xtrue"; then
67188     JVM_FEATURES="$JVM_FEATURES dtrace"
67189   else
67190     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
67191       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
67192     fi
67193   fi
67194 
67195   if test "x$STATIC_BUILD" = "xtrue"; then
67196     JVM_FEATURES="$JVM_FEATURES static-build"
67197   else
67198     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
67199       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
67200     fi
67201   fi
67202 
67203   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]  ; then
67204     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
67205       as_fn_error $? "To enable zero, you must use --with-jvm-variants=zero" "$LINENO" 5
67206     fi
67207   fi
67208 
67209   # Only enable jvmci on x86_64, sparcv9 and aarch64.
67210   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
67211      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
67212      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
67213     JVM_FEATURES_jvmci="jvmci"
67214   else
67215     JVM_FEATURES_jvmci=""
67216   fi
67217 
67218   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
67219 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
67220   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
67221     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67222 $as_echo "yes, forced" >&6; }
67223     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
67224       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
67225     fi
67226     INCLUDE_GRAAL="true"
67227   else
67228     # By default enable graal build on linux-x64 or where AOT is available.
67229     # graal build requires jvmci.
67230     if test "x$JVM_FEATURES_jvmci" = "xjvmci" && \
67231         (test "x$OPENJDK_TARGET_CPU" = "xx86_64" && \
67232          test "x$OPENJDK_TARGET_OS" = "xlinux" || \
67233          test "x$ENABLE_AOT" = "xtrue") ; then
67234       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67235 $as_echo "yes" >&6; }
67236       JVM_FEATURES_graal="graal"
67237       INCLUDE_GRAAL="true"
67238     else
67239       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67240 $as_echo "no" >&6; }
67241       JVM_FEATURES_graal=""
67242       INCLUDE_GRAAL="false"
67243     fi
67244   fi
67245 
67246 
67247 
67248   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
67249 $as_echo_n "checking if aot should be enabled... " >&6; }
67250   if test "x$ENABLE_AOT" = "xtrue"; then
67251     if test "x$enable_aot" = "xyes"; then
67252       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67253 $as_echo "yes, forced" >&6; }
67254     else
67255       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67256 $as_echo "yes" >&6; }
67257     fi
67258     JVM_FEATURES_aot="aot"
67259   else
67260     if test "x$enable_aot" = "xno"; then
67261       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67262 $as_echo "no, forced" >&6; }
67263     else
67264       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67265 $as_echo "no" >&6; }
67266     fi
67267     JVM_FEATURES_aot=""
67268   fi
67269 
67270   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
67271     # Default to use link time optimizations on minimal on arm
67272     JVM_FEATURES_link_time_opt="link-time-opt"
67273   else
67274     JVM_FEATURES_link_time_opt=""
67275   fi
67276 
67277   # All variants but minimal (and custom) get these features
67278   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti vm-structs jni-check services management all-gcs nmt"
67279   if test "x$ENABLE_CDS" = "xtrue"; then
67280     NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES cds"
67281   fi
67282 
67283   # Enable features depending on variant.
67284   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
67285   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
67286   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
67287   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
67288   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
67289   JVM_FEATURES_custom="$JVM_FEATURES"
67290 
67291 
67292 
67293 
67294 
67295 
67296 
67297 
67298   # Used for verification of Makefiles by check-jvm-feature
67299 
67300 
67301   # We don't support --with-jvm-interpreter anymore, use zero instead.
67302 
67303 
67304 # Check whether --with-jvm-interpreter was given.
67305 if test "${with_jvm_interpreter+set}" = set; then :
67306   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
67307 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
67308 fi
67309 
67310 
67311 
67312 
67313 ###############################################################################
67314 #
67315 # We need to do some final tweaking, when everything else is done.
67316 #
67317 ###############################################################################
67318 
67319 
67320   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
67321 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
67322 
67323   if test -d "${TOPDIR}/src/jdk.crypto.ec/share/native/libsunec/impl"; then
67324     ENABLE_INTREE_EC=true
67325     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67326 $as_echo "yes" >&6; }
67327   else
67328     ENABLE_INTREE_EC=false
67329     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67330 $as_echo "no" >&6; }
67331   fi
67332 
67333 
67334 
67335 
67336   # Check whether --enable-jtreg-failure-handler was given.
67337 if test "${enable_jtreg_failure_handler+set}" = set; then :
67338   enableval=$enable_jtreg_failure_handler;
67339 fi
67340 
67341 
67342   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
67343 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
67344 
67345   if test "x$enable_jtreg_failure_handler" = "xyes"; then
67346     if test "x$JT_HOME" = "x"; then
67347       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
67348     else
67349       BUILD_FAILURE_HANDLER=true
67350       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67351 $as_echo "yes, forced" >&6; }
67352     fi
67353   elif test "x$enable_jtreg_failure_handler" = "xno"; then
67354     BUILD_FAILURE_HANDLER=false
67355     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67356 $as_echo "no, forced" >&6; }
67357   elif test "x$enable_jtreg_failure_handler" = "xauto" \
67358       || test "x$enable_jtreg_failure_handler" = "x"; then
67359     if test "x$JT_HOME" = "x"; then
67360       BUILD_FAILURE_HANDLER=false
67361       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
67362 $as_echo "no, missing jtreg" >&6; }
67363     else
67364       BUILD_FAILURE_HANDLER=true
67365       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
67366 $as_echo "yes, jtreg present" >&6; }
67367     fi
67368   else
67369     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
67370   fi
67371 
67372 
67373 
67374 
67375   # Check whether --enable-generate-classlist was given.
67376 if test "${enable_generate_classlist+set}" = set; then :
67377   enableval=$enable_generate_classlist;
67378 fi
67379 
67380 
67381   # Check if it's likely that it's possible to generate the classlist. Depending
67382   # on exact jvm configuration it could be possible anyway.
67383   if test "x$ENABLE_CDS" = "xtrue" && (  [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ); then
67384     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
67385   else
67386     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
67387   fi
67388 
67389   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
67390 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
67391   if test "x$enable_generate_classlist" = "xyes"; then
67392     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
67393 $as_echo "yes, forced" >&6; }
67394     ENABLE_GENERATE_CLASSLIST="true"
67395     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
67396       { $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
67397 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS and enable-cds=$ENABLE_CDS" >&2;}
67398     fi
67399   elif test "x$enable_generate_classlist" = "xno"; then
67400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67401 $as_echo "no, forced" >&6; }
67402     ENABLE_GENERATE_CLASSLIST="false"
67403   elif test "x$enable_generate_classlist" = "x"; then
67404     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
67405       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67406 $as_echo "yes" >&6; }
67407       ENABLE_GENERATE_CLASSLIST="true"
67408     else
67409       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67410 $as_echo "no" >&6; }
67411       ENABLE_GENERATE_CLASSLIST="false"
67412     fi
67413   else
67414     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
67415   fi
67416 
67417 
67418 
67419 
67420 ###############################################################################
67421 #
67422 # Configure parts of the build that only affect the build performance,
67423 # not the result.
67424 #
67425 ###############################################################################
67426 
67427 
67428   # How many cores do we have on this build system?
67429 
67430 # Check whether --with-num-cores was given.
67431 if test "${with_num_cores+set}" = set; then :
67432   withval=$with_num_cores;
67433 fi
67434 
67435   if test "x$with_num_cores" = x; then
67436     # The number of cores were not specified, try to probe them.
67437 
67438   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
67439 $as_echo_n "checking for number of cores... " >&6; }
67440   NUM_CORES=1
67441   FOUND_CORES=no
67442 
67443   if test -f /proc/cpuinfo; then
67444     # Looks like a Linux (or cygwin) system
67445     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
67446     FOUND_CORES=yes
67447   elif test -x /usr/sbin/psrinfo; then
67448     # Looks like a Solaris system
67449     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
67450     FOUND_CORES=yes
67451   elif test -x /usr/sbin/sysctl; then
67452     # Looks like a MacOSX system
67453     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
67454     FOUND_CORES=yes
67455   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
67456     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
67457     FOUND_CORES=yes
67458   elif test -n "$NUMBER_OF_PROCESSORS"; then
67459     # On windows, look in the env
67460     NUM_CORES=$NUMBER_OF_PROCESSORS
67461     FOUND_CORES=yes
67462   fi
67463 
67464   if test "x$FOUND_CORES" = xyes; then
67465     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
67466 $as_echo "$NUM_CORES" >&6; }
67467   else
67468     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
67469 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
67470     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
67471 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
67472   fi
67473 
67474   else
67475     NUM_CORES=$with_num_cores
67476   fi
67477 
67478 
67479 
67480   # How much memory do we have on this build system?
67481 
67482 # Check whether --with-memory-size was given.
67483 if test "${with_memory_size+set}" = set; then :
67484   withval=$with_memory_size;
67485 fi
67486 
67487   if test "x$with_memory_size" = x; then
67488     # The memory size was not specified, try to probe it.
67489 
67490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
67491 $as_echo_n "checking for memory size... " >&6; }
67492   # Default to 1024 MB
67493   MEMORY_SIZE=1024
67494   FOUND_MEM=no
67495 
67496   if test -f /proc/meminfo; then
67497     # Looks like a Linux (or cygwin) system
67498     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
67499     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
67500     FOUND_MEM=yes
67501   elif test -x /usr/sbin/prtconf; then
67502     # Looks like a Solaris or AIX system
67503     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
67504     FOUND_MEM=yes
67505   elif test -x /usr/sbin/sysctl; then
67506     # Looks like a MacOSX system
67507     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
67508     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
67509     FOUND_MEM=yes
67510   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
67511     # Windows, but without cygwin
67512     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
67513     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
67514     FOUND_MEM=yes
67515   fi
67516 
67517   if test "x$FOUND_MEM" = xyes; then
67518     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
67519 $as_echo "$MEMORY_SIZE MB" >&6; }
67520   else
67521     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
67522 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
67523     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
67524 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
67525   fi
67526 
67527   else
67528     MEMORY_SIZE=$with_memory_size
67529   fi
67530 
67531 
67532 
67533   # Provide a decent default number of parallel jobs for make depending on
67534   # number of cores, amount of memory and machine architecture.
67535 
67536 # Check whether --with-jobs was given.
67537 if test "${with_jobs+set}" = set; then :
67538   withval=$with_jobs;
67539 fi
67540 
67541   if test "x$with_jobs" = x; then
67542     # Number of jobs was not specified, calculate.
67543     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
67544 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
67545     # Approximate memory in GB.
67546     memory_gb=`expr $MEMORY_SIZE / 1024`
67547     # Pick the lowest of memory in gb and number of cores.
67548     if test "$memory_gb" -lt "$NUM_CORES"; then
67549       JOBS="$memory_gb"
67550     else
67551       JOBS="$NUM_CORES"
67552     fi
67553     if test "$JOBS" -eq "0"; then
67554       JOBS=1
67555     fi
67556     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
67557 $as_echo "$JOBS" >&6; }
67558   else
67559     JOBS=$with_jobs
67560   fi
67561 
67562 
67563 
67564   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
67565 
67566 # Check whether --with-test-jobs was given.
67567 if test "${with_test_jobs+set}" = set; then :
67568   withval=$with_test_jobs;
67569 fi
67570 
67571   if test "x$with_test_jobs" = x; then
67572       TEST_JOBS=0
67573   else
67574       TEST_JOBS=$with_test_jobs
67575   fi
67576 
67577 
67578 
67579 # Setup arguments for the boot jdk (after cores and memory have been setup)
67580 
67581   ##############################################################################
67582   #
67583   # Specify jvm options for anything that is run with the Boot JDK.
67584   # Not all JVM:s accept the same arguments on the command line.
67585   #
67586 
67587 # Check whether --with-boot-jdk-jvmargs was given.
67588 if test "${with_boot_jdk_jvmargs+set}" = set; then :
67589   withval=$with_boot_jdk_jvmargs;
67590 fi
67591 
67592 
67593   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
67594 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
67595 
67596   # Force en-US environment
67597 
67598   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
67599   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
67600   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
67601   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67602   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67603   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67604     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
67605     JVM_ARG_OK=true
67606   else
67607     $ECHO "Arg failed:" >&5
67608     $ECHO "$OUTPUT" >&5
67609     JVM_ARG_OK=false
67610   fi
67611 
67612 
67613   if test "x$BOOTJDK_USE_LOCAL_CDS" = xtrue; then
67614     # Use our own CDS archive
67615 
67616   $ECHO "Check if jvm arg is ok: $boot_jdk_cds_args -Xshare:auto" >&5
67617   $ECHO "Command: $JAVA $boot_jdk_cds_args -Xshare:auto -version" >&5
67618   OUTPUT=`$JAVA $boot_jdk_cds_args -Xshare:auto -version 2>&1`
67619   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67620   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67621   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67622     boot_jdk_jvmargs="$boot_jdk_jvmargs $boot_jdk_cds_args -Xshare:auto"
67623     JVM_ARG_OK=true
67624   else
67625     $ECHO "Arg failed:" >&5
67626     $ECHO "$OUTPUT" >&5
67627     JVM_ARG_OK=false
67628   fi
67629 
67630   else
67631     # Otherwise optimistically use the system-wide one, if one is present
67632 
67633   $ECHO "Check if jvm arg is ok: -Xshare:auto" >&5
67634   $ECHO "Command: $JAVA -Xshare:auto -version" >&5
67635   OUTPUT=`$JAVA -Xshare:auto -version 2>&1`
67636   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67637   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67638   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67639     boot_jdk_jvmargs="$boot_jdk_jvmargs -Xshare:auto"
67640     JVM_ARG_OK=true
67641   else
67642     $ECHO "Arg failed:" >&5
67643     $ECHO "$OUTPUT" >&5
67644     JVM_ARG_OK=false
67645   fi
67646 
67647   fi
67648 
67649   # Apply user provided options.
67650 
67651   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
67652   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
67653   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
67654   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67655   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67656   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67657     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
67658     JVM_ARG_OK=true
67659   else
67660     $ECHO "Arg failed:" >&5
67661     $ECHO "$OUTPUT" >&5
67662     JVM_ARG_OK=false
67663   fi
67664 
67665 
67666   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
67667 $as_echo "$boot_jdk_jvmargs" >&6; }
67668 
67669   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
67670   JAVA_FLAGS=$boot_jdk_jvmargs
67671 
67672 
67673   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
67674 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
67675 
67676   # Starting amount of heap memory.
67677 
67678   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
67679   $ECHO "Command: $JAVA -Xms64M -version" >&5
67680   OUTPUT=`$JAVA -Xms64M -version 2>&1`
67681   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67682   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67683   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67684     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
67685     JVM_ARG_OK=true
67686   else
67687     $ECHO "Arg failed:" >&5
67688     $ECHO "$OUTPUT" >&5
67689     JVM_ARG_OK=false
67690   fi
67691 
67692   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
67693 
67694   # Maximum amount of heap memory and stack size.
67695   JVM_HEAP_LIMIT_32="1024"
67696   # Running a 64 bit JVM allows for and requires a bigger heap
67697   JVM_HEAP_LIMIT_64="1600"
67698   STACK_SIZE_32=768
67699   STACK_SIZE_64=1536
67700   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
67701   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
67702     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
67703   fi
67704   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
67705     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
67706   fi
67707   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
67708     JVM_HEAP_LIMIT_32=512
67709     JVM_HEAP_LIMIT_64=512
67710   fi
67711 
67712   if test "x$BOOT_JDK_BITS" = "x32"; then
67713     STACK_SIZE=$STACK_SIZE_32
67714     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
67715   else
67716     STACK_SIZE=$STACK_SIZE_64
67717     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
67718   fi
67719 
67720   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
67721   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
67722   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
67723   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67724   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67725   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67726     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
67727     JVM_ARG_OK=true
67728   else
67729     $ECHO "Arg failed:" >&5
67730     $ECHO "$OUTPUT" >&5
67731     JVM_ARG_OK=false
67732   fi
67733 
67734 
67735   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
67736   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
67737   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
67738   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67739   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67740   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67741     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
67742     JVM_ARG_OK=true
67743   else
67744     $ECHO "Arg failed:" >&5
67745     $ECHO "$OUTPUT" >&5
67746     JVM_ARG_OK=false
67747   fi
67748 
67749 
67750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
67751 $as_echo "$boot_jdk_jvmargs_big" >&6; }
67752 
67753   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
67754 
67755 
67756   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
67757     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
67758     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
67759   else
67760     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
67761     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
67762   fi
67763   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
67764   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
67765   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
67766 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
67767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
67768 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
67769 
67770 
67771   # By default, the main javac compilations use big
67772   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
67773 
67774 
67775   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
67776 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
67777 
67778   # Use serial gc for small short lived tools if possible
67779 
67780   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
67781   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
67782   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
67783   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67784   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67785   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67786     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
67787     JVM_ARG_OK=true
67788   else
67789     $ECHO "Arg failed:" >&5
67790     $ECHO "$OUTPUT" >&5
67791     JVM_ARG_OK=false
67792   fi
67793 
67794 
67795   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
67796   $ECHO "Command: $JAVA -Xms32M -version" >&5
67797   OUTPUT=`$JAVA -Xms32M -version 2>&1`
67798   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67799   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67800   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67801     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
67802     JVM_ARG_OK=true
67803   else
67804     $ECHO "Arg failed:" >&5
67805     $ECHO "$OUTPUT" >&5
67806     JVM_ARG_OK=false
67807   fi
67808 
67809 
67810   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
67811   $ECHO "Command: $JAVA -Xmx512M -version" >&5
67812   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
67813   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67814   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67815   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67816     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
67817     JVM_ARG_OK=true
67818   else
67819     $ECHO "Arg failed:" >&5
67820     $ECHO "$OUTPUT" >&5
67821     JVM_ARG_OK=false
67822   fi
67823 
67824 
67825   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
67826   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
67827   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
67828   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67829   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67830   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67831     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
67832     JVM_ARG_OK=true
67833   else
67834     $ECHO "Arg failed:" >&5
67835     $ECHO "$OUTPUT" >&5
67836     JVM_ARG_OK=false
67837   fi
67838 
67839 
67840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
67841 $as_echo "$boot_jdk_jvmargs_small" >&6; }
67842 
67843   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
67844 
67845 
67846   JAVA_TOOL_FLAGS_SMALL=""
67847   for f in $JAVA_FLAGS_SMALL; do
67848     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
67849   done
67850 
67851 
67852 
67853 # Setup smart javac (after cores and memory have been setup)
67854 
67855 
67856 # Check whether --with-sjavac-server-java was given.
67857 if test "${with_sjavac_server_java+set}" = set; then :
67858   withval=$with_sjavac_server_java;
67859 fi
67860 
67861 
67862   if test "x$with_sjavac_server_java" != x; then
67863     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
67864     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
67865     if test "x$FOUND_VERSION" = x; then
67866       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
67867     fi
67868   else
67869     SJAVAC_SERVER_JAVA="$JAVA"
67870   fi
67871 
67872 
67873   if test "$MEMORY_SIZE" -gt "3000"; then
67874     if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
67875       JVM_64BIT=true
67876     fi
67877   fi
67878 
67879   MX_VALUE=`expr $MEMORY_SIZE / 2`
67880   if test "$JVM_64BIT" = true; then
67881     # Set ms lower than mx since more than one instance of the server might
67882     # get launched at the same time before they figure out which instance won.
67883     MS_VALUE=512
67884     if test "$MX_VALUE" -gt "2048"; then
67885       MX_VALUE=2048
67886     fi
67887   else
67888     MS_VALUE=256
67889     if test "$MX_VALUE" -gt "1500"; then
67890       MX_VALUE=1500
67891     fi
67892   fi
67893   if test "$MX_VALUE" -lt "512"; then
67894     MX_VALUE=512
67895   fi
67896 
67897   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
67898   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
67899   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
67900   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
67901   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
67902   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
67903     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
67904     JVM_ARG_OK=true
67905   else
67906     $ECHO "Arg failed:" >&5
67907     $ECHO "$OUTPUT" >&5
67908     JVM_ARG_OK=false
67909   fi
67910 
67911 
67912 
67913   # Check whether --enable-sjavac was given.
67914 if test "${enable_sjavac+set}" = set; then :
67915   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
67916 else
67917   ENABLE_SJAVAC="no"
67918 fi
67919 
67920   if test "x$JVM_ARG_OK" = "xfalse"; then
67921     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
67922 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
67923     ENABLE_SJAVAC="no"
67924   fi
67925   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
67926 $as_echo_n "checking whether to use sjavac... " >&6; }
67927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
67928 $as_echo "$ENABLE_SJAVAC" >&6; }
67929 
67930 
67931   # Check whether --enable-javac-server was given.
67932 if test "${enable_javac_server+set}" = set; then :
67933   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
67934 else
67935   ENABLE_JAVAC_SERVER="yes"
67936 fi
67937 
67938   if test "x$JVM_ARG_OK" = "xfalse"; then
67939     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
67940 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
67941     ENABLE_JAVAC_SERVER="no"
67942   fi
67943   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
67944 $as_echo_n "checking whether to use javac server... " >&6; }
67945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
67946 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
67947 
67948 
67949   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
67950     # When using a server javac, the small client instances do not need much
67951     # resources.
67952     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
67953   fi
67954 
67955 
67956 # Setup use of icecc if requested
67957 
67958   # Check whether --enable-icecc was given.
67959 if test "${enable_icecc+set}" = set; then :
67960   enableval=$enable_icecc;
67961 fi
67962 
67963 
67964   if test "x${enable_icecc}" = "xyes"; then
67965 
67966 
67967 
67968   # Publish this variable in the help.
67969 
67970 
67971   if [ -z "${ICECC_CMD+x}" ]; then
67972     # The variable is not set by user, try to locate tool using the code snippet
67973     for ac_prog in icecc
67974 do
67975   # Extract the first word of "$ac_prog", so it can be a program name with args.
67976 set dummy $ac_prog; ac_word=$2
67977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67978 $as_echo_n "checking for $ac_word... " >&6; }
67979 if ${ac_cv_path_ICECC_CMD+:} false; then :
67980   $as_echo_n "(cached) " >&6
67981 else
67982   case $ICECC_CMD in
67983   [\\/]* | ?:[\\/]*)
67984   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
67985   ;;
67986   *)
67987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67988 for as_dir in $PATH
67989 do
67990   IFS=$as_save_IFS
67991   test -z "$as_dir" && as_dir=.
67992     for ac_exec_ext in '' $ac_executable_extensions; do
67993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67994     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
67995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67996     break 2
67997   fi
67998 done
67999   done
68000 IFS=$as_save_IFS
68001 
68002   ;;
68003 esac
68004 fi
68005 ICECC_CMD=$ac_cv_path_ICECC_CMD
68006 if test -n "$ICECC_CMD"; then
68007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
68008 $as_echo "$ICECC_CMD" >&6; }
68009 else
68010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68011 $as_echo "no" >&6; }
68012 fi
68013 
68014 
68015   test -n "$ICECC_CMD" && break
68016 done
68017 
68018   else
68019     # The variable is set, but is it from the command line or the environment?
68020 
68021     # Try to remove the string !ICECC_CMD! from our list.
68022     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
68023     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
68024       # If it failed, the variable was not from the command line. Ignore it,
68025       # but warn the user (except for BASH, which is always set by the calling BASH).
68026       if test "xICECC_CMD" != xBASH; then
68027         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
68028 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
68029       fi
68030       # Try to locate tool using the code snippet
68031       for ac_prog in icecc
68032 do
68033   # Extract the first word of "$ac_prog", so it can be a program name with args.
68034 set dummy $ac_prog; ac_word=$2
68035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68036 $as_echo_n "checking for $ac_word... " >&6; }
68037 if ${ac_cv_path_ICECC_CMD+:} false; then :
68038   $as_echo_n "(cached) " >&6
68039 else
68040   case $ICECC_CMD in
68041   [\\/]* | ?:[\\/]*)
68042   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
68043   ;;
68044   *)
68045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68046 for as_dir in $PATH
68047 do
68048   IFS=$as_save_IFS
68049   test -z "$as_dir" && as_dir=.
68050     for ac_exec_ext in '' $ac_executable_extensions; do
68051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68052     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
68053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68054     break 2
68055   fi
68056 done
68057   done
68058 IFS=$as_save_IFS
68059 
68060   ;;
68061 esac
68062 fi
68063 ICECC_CMD=$ac_cv_path_ICECC_CMD
68064 if test -n "$ICECC_CMD"; then
68065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
68066 $as_echo "$ICECC_CMD" >&6; }
68067 else
68068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68069 $as_echo "no" >&6; }
68070 fi
68071 
68072 
68073   test -n "$ICECC_CMD" && break
68074 done
68075 
68076     else
68077       # If it succeeded, then it was overridden by the user. We will use it
68078       # for the tool.
68079 
68080       # First remove it from the list of overridden variables, so we can test
68081       # for unknown variables in the end.
68082       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68083 
68084       # Check if we try to supply an empty value
68085       if test "x$ICECC_CMD" = x; then
68086         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
68087 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
68088         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
68089 $as_echo_n "checking for ICECC_CMD... " >&6; }
68090         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68091 $as_echo "disabled" >&6; }
68092       else
68093         # Check if the provided tool contains a complete path.
68094         tool_specified="$ICECC_CMD"
68095         tool_basename="${tool_specified##*/}"
68096         if test "x$tool_basename" = "x$tool_specified"; then
68097           # A command without a complete path is provided, search $PATH.
68098           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
68099 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
68100           # Extract the first word of "$tool_basename", so it can be a program name with args.
68101 set dummy $tool_basename; ac_word=$2
68102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68103 $as_echo_n "checking for $ac_word... " >&6; }
68104 if ${ac_cv_path_ICECC_CMD+:} false; then :
68105   $as_echo_n "(cached) " >&6
68106 else
68107   case $ICECC_CMD in
68108   [\\/]* | ?:[\\/]*)
68109   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
68110   ;;
68111   *)
68112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68113 for as_dir in $PATH
68114 do
68115   IFS=$as_save_IFS
68116   test -z "$as_dir" && as_dir=.
68117     for ac_exec_ext in '' $ac_executable_extensions; do
68118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68119     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
68120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68121     break 2
68122   fi
68123 done
68124   done
68125 IFS=$as_save_IFS
68126 
68127   ;;
68128 esac
68129 fi
68130 ICECC_CMD=$ac_cv_path_ICECC_CMD
68131 if test -n "$ICECC_CMD"; then
68132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
68133 $as_echo "$ICECC_CMD" >&6; }
68134 else
68135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68136 $as_echo "no" >&6; }
68137 fi
68138 
68139 
68140           if test "x$ICECC_CMD" = x; then
68141             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68142           fi
68143         else
68144           # Otherwise we believe it is a complete path. Use it as it is.
68145           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
68146 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
68147           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
68148 $as_echo_n "checking for ICECC_CMD... " >&6; }
68149           if test ! -x "$tool_specified"; then
68150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68151 $as_echo "not found" >&6; }
68152             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
68153           fi
68154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68155 $as_echo "$tool_specified" >&6; }
68156         fi
68157       fi
68158     fi
68159 
68160   fi
68161 
68162 
68163 
68164   if test "x$ICECC_CMD" = x; then
68165     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
68166   fi
68167 
68168 
68169     old_path="$PATH"
68170 
68171     # Look for icecc-create-env in some known places
68172     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
68173 
68174 
68175 
68176   # Publish this variable in the help.
68177 
68178 
68179   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
68180     # The variable is not set by user, try to locate tool using the code snippet
68181     for ac_prog in icecc-create-env
68182 do
68183   # Extract the first word of "$ac_prog", so it can be a program name with args.
68184 set dummy $ac_prog; ac_word=$2
68185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68186 $as_echo_n "checking for $ac_word... " >&6; }
68187 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
68188   $as_echo_n "(cached) " >&6
68189 else
68190   case $ICECC_CREATE_ENV in
68191   [\\/]* | ?:[\\/]*)
68192   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
68193   ;;
68194   *)
68195   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68196 for as_dir in $PATH
68197 do
68198   IFS=$as_save_IFS
68199   test -z "$as_dir" && as_dir=.
68200     for ac_exec_ext in '' $ac_executable_extensions; do
68201   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68202     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
68203     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68204     break 2
68205   fi
68206 done
68207   done
68208 IFS=$as_save_IFS
68209 
68210   ;;
68211 esac
68212 fi
68213 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
68214 if test -n "$ICECC_CREATE_ENV"; then
68215   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
68216 $as_echo "$ICECC_CREATE_ENV" >&6; }
68217 else
68218   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68219 $as_echo "no" >&6; }
68220 fi
68221 
68222 
68223   test -n "$ICECC_CREATE_ENV" && break
68224 done
68225 
68226   else
68227     # The variable is set, but is it from the command line or the environment?
68228 
68229     # Try to remove the string !ICECC_CREATE_ENV! from our list.
68230     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
68231     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
68232       # If it failed, the variable was not from the command line. Ignore it,
68233       # but warn the user (except for BASH, which is always set by the calling BASH).
68234       if test "xICECC_CREATE_ENV" != xBASH; then
68235         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
68236 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
68237       fi
68238       # Try to locate tool using the code snippet
68239       for ac_prog in icecc-create-env
68240 do
68241   # Extract the first word of "$ac_prog", so it can be a program name with args.
68242 set dummy $ac_prog; ac_word=$2
68243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68244 $as_echo_n "checking for $ac_word... " >&6; }
68245 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
68246   $as_echo_n "(cached) " >&6
68247 else
68248   case $ICECC_CREATE_ENV in
68249   [\\/]* | ?:[\\/]*)
68250   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
68251   ;;
68252   *)
68253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68254 for as_dir in $PATH
68255 do
68256   IFS=$as_save_IFS
68257   test -z "$as_dir" && as_dir=.
68258     for ac_exec_ext in '' $ac_executable_extensions; do
68259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68260     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
68261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68262     break 2
68263   fi
68264 done
68265   done
68266 IFS=$as_save_IFS
68267 
68268   ;;
68269 esac
68270 fi
68271 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
68272 if test -n "$ICECC_CREATE_ENV"; then
68273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
68274 $as_echo "$ICECC_CREATE_ENV" >&6; }
68275 else
68276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68277 $as_echo "no" >&6; }
68278 fi
68279 
68280 
68281   test -n "$ICECC_CREATE_ENV" && break
68282 done
68283 
68284     else
68285       # If it succeeded, then it was overridden by the user. We will use it
68286       # for the tool.
68287 
68288       # First remove it from the list of overridden variables, so we can test
68289       # for unknown variables in the end.
68290       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68291 
68292       # Check if we try to supply an empty value
68293       if test "x$ICECC_CREATE_ENV" = x; then
68294         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
68295 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
68296         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
68297 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
68298         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68299 $as_echo "disabled" >&6; }
68300       else
68301         # Check if the provided tool contains a complete path.
68302         tool_specified="$ICECC_CREATE_ENV"
68303         tool_basename="${tool_specified##*/}"
68304         if test "x$tool_basename" = "x$tool_specified"; then
68305           # A command without a complete path is provided, search $PATH.
68306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
68307 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
68308           # Extract the first word of "$tool_basename", so it can be a program name with args.
68309 set dummy $tool_basename; ac_word=$2
68310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68311 $as_echo_n "checking for $ac_word... " >&6; }
68312 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
68313   $as_echo_n "(cached) " >&6
68314 else
68315   case $ICECC_CREATE_ENV in
68316   [\\/]* | ?:[\\/]*)
68317   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
68318   ;;
68319   *)
68320   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68321 for as_dir in $PATH
68322 do
68323   IFS=$as_save_IFS
68324   test -z "$as_dir" && as_dir=.
68325     for ac_exec_ext in '' $ac_executable_extensions; do
68326   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68327     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
68328     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68329     break 2
68330   fi
68331 done
68332   done
68333 IFS=$as_save_IFS
68334 
68335   ;;
68336 esac
68337 fi
68338 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
68339 if test -n "$ICECC_CREATE_ENV"; then
68340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
68341 $as_echo "$ICECC_CREATE_ENV" >&6; }
68342 else
68343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68344 $as_echo "no" >&6; }
68345 fi
68346 
68347 
68348           if test "x$ICECC_CREATE_ENV" = x; then
68349             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68350           fi
68351         else
68352           # Otherwise we believe it is a complete path. Use it as it is.
68353           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
68354 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
68355           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
68356 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
68357           if test ! -x "$tool_specified"; then
68358             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68359 $as_echo "not found" >&6; }
68360             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
68361           fi
68362           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68363 $as_echo "$tool_specified" >&6; }
68364         fi
68365       fi
68366     fi
68367 
68368   fi
68369 
68370 
68371 
68372   if test "x$ICECC_CREATE_ENV" = x; then
68373     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
68374   fi
68375 
68376 
68377     # Use icecc-create-env to create a minimal compilation environment that can
68378     # be sent to the other hosts in the icecream cluster.
68379     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
68380     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
68381     # Older versions of icecc does not have the --gcc parameter
68382     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
68383       icecc_gcc_arg="--gcc"
68384     fi
68385     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
68386 
68387   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68388       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
68389           ${icecc_create_env_log} 2>&1 )
68390   if test "$?" != "0"; then
68391     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68392 $as_echo "$as_me: icecc-create-env output:" >&6;}
68393     cat \
68394           ${icecc_create_env_log}
68395     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68396   fi
68397 
68398     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
68399       # For clang, the icecc compilerwrapper is needed. It usually resides next
68400       # to icecc-create-env.
68401 
68402 
68403 
68404   # Publish this variable in the help.
68405 
68406 
68407   if [ -z "${ICECC_WRAPPER+x}" ]; then
68408     # The variable is not set by user, try to locate tool using the code snippet
68409     for ac_prog in compilerwrapper
68410 do
68411   # Extract the first word of "$ac_prog", so it can be a program name with args.
68412 set dummy $ac_prog; ac_word=$2
68413 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68414 $as_echo_n "checking for $ac_word... " >&6; }
68415 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
68416   $as_echo_n "(cached) " >&6
68417 else
68418   case $ICECC_WRAPPER in
68419   [\\/]* | ?:[\\/]*)
68420   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
68421   ;;
68422   *)
68423   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68424 for as_dir in $PATH
68425 do
68426   IFS=$as_save_IFS
68427   test -z "$as_dir" && as_dir=.
68428     for ac_exec_ext in '' $ac_executable_extensions; do
68429   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68430     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
68431     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68432     break 2
68433   fi
68434 done
68435   done
68436 IFS=$as_save_IFS
68437 
68438   ;;
68439 esac
68440 fi
68441 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
68442 if test -n "$ICECC_WRAPPER"; then
68443   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
68444 $as_echo "$ICECC_WRAPPER" >&6; }
68445 else
68446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68447 $as_echo "no" >&6; }
68448 fi
68449 
68450 
68451   test -n "$ICECC_WRAPPER" && break
68452 done
68453 
68454   else
68455     # The variable is set, but is it from the command line or the environment?
68456 
68457     # Try to remove the string !ICECC_WRAPPER! from our list.
68458     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
68459     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
68460       # If it failed, the variable was not from the command line. Ignore it,
68461       # but warn the user (except for BASH, which is always set by the calling BASH).
68462       if test "xICECC_WRAPPER" != xBASH; then
68463         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
68464 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
68465       fi
68466       # Try to locate tool using the code snippet
68467       for ac_prog in compilerwrapper
68468 do
68469   # Extract the first word of "$ac_prog", so it can be a program name with args.
68470 set dummy $ac_prog; ac_word=$2
68471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68472 $as_echo_n "checking for $ac_word... " >&6; }
68473 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
68474   $as_echo_n "(cached) " >&6
68475 else
68476   case $ICECC_WRAPPER in
68477   [\\/]* | ?:[\\/]*)
68478   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
68479   ;;
68480   *)
68481   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68482 for as_dir in $PATH
68483 do
68484   IFS=$as_save_IFS
68485   test -z "$as_dir" && as_dir=.
68486     for ac_exec_ext in '' $ac_executable_extensions; do
68487   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68488     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
68489     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68490     break 2
68491   fi
68492 done
68493   done
68494 IFS=$as_save_IFS
68495 
68496   ;;
68497 esac
68498 fi
68499 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
68500 if test -n "$ICECC_WRAPPER"; then
68501   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
68502 $as_echo "$ICECC_WRAPPER" >&6; }
68503 else
68504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68505 $as_echo "no" >&6; }
68506 fi
68507 
68508 
68509   test -n "$ICECC_WRAPPER" && break
68510 done
68511 
68512     else
68513       # If it succeeded, then it was overridden by the user. We will use it
68514       # for the tool.
68515 
68516       # First remove it from the list of overridden variables, so we can test
68517       # for unknown variables in the end.
68518       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68519 
68520       # Check if we try to supply an empty value
68521       if test "x$ICECC_WRAPPER" = x; then
68522         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
68523 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
68524         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
68525 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
68526         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68527 $as_echo "disabled" >&6; }
68528       else
68529         # Check if the provided tool contains a complete path.
68530         tool_specified="$ICECC_WRAPPER"
68531         tool_basename="${tool_specified##*/}"
68532         if test "x$tool_basename" = "x$tool_specified"; then
68533           # A command without a complete path is provided, search $PATH.
68534           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
68535 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
68536           # Extract the first word of "$tool_basename", so it can be a program name with args.
68537 set dummy $tool_basename; ac_word=$2
68538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68539 $as_echo_n "checking for $ac_word... " >&6; }
68540 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
68541   $as_echo_n "(cached) " >&6
68542 else
68543   case $ICECC_WRAPPER in
68544   [\\/]* | ?:[\\/]*)
68545   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
68546   ;;
68547   *)
68548   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68549 for as_dir in $PATH
68550 do
68551   IFS=$as_save_IFS
68552   test -z "$as_dir" && as_dir=.
68553     for ac_exec_ext in '' $ac_executable_extensions; do
68554   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68555     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
68556     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68557     break 2
68558   fi
68559 done
68560   done
68561 IFS=$as_save_IFS
68562 
68563   ;;
68564 esac
68565 fi
68566 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
68567 if test -n "$ICECC_WRAPPER"; then
68568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
68569 $as_echo "$ICECC_WRAPPER" >&6; }
68570 else
68571   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68572 $as_echo "no" >&6; }
68573 fi
68574 
68575 
68576           if test "x$ICECC_WRAPPER" = x; then
68577             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68578           fi
68579         else
68580           # Otherwise we believe it is a complete path. Use it as it is.
68581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
68582 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
68583           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
68584 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
68585           if test ! -x "$tool_specified"; then
68586             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68587 $as_echo "not found" >&6; }
68588             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
68589           fi
68590           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68591 $as_echo "$tool_specified" >&6; }
68592         fi
68593       fi
68594     fi
68595 
68596   fi
68597 
68598 
68599 
68600   if test "x$ICECC_WRAPPER" = x; then
68601     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
68602   fi
68603 
68604 
68605 
68606   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68607       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
68608   if test "$?" != "0"; then
68609     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68610 $as_echo "$as_me: icecc-create-env output:" >&6;}
68611     cat ${icecc_create_env_log}
68612     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68613   fi
68614 
68615     else
68616       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
68617     fi
68618     PATH="$old_path"
68619     # The bundle with the compiler gets a name based on checksums. Parse log file
68620     # to find it.
68621     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
68622     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
68623     if test ! -f ${ICECC_ENV_BUNDLE}; then
68624       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
68625     fi
68626     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
68627 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
68628     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
68629 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
68630     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
68631 
68632     if test "x${COMPILE_TYPE}" = "xcross"; then
68633       # If cross compiling, create a separate env package for the build compiler
68634       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
68635       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
68636       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
68637 
68638   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68639       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
68640             ${icecc_create_env_log_build} 2>&1 )
68641   if test "$?" != "0"; then
68642     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68643 $as_echo "$as_me: icecc-create-env output:" >&6;}
68644     cat \
68645             ${icecc_create_env_log_build}
68646     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68647   fi
68648 
68649       elif test "x${BUILD_CC##*/}" = "xclang"; then
68650 
68651   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
68652       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
68653   if test "$?" != "0"; then
68654     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
68655 $as_echo "$as_me: icecc-create-env output:" >&6;}
68656     cat ${icecc_create_env_log_build}
68657     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
68658   fi
68659 
68660       else
68661         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
68662       fi
68663       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
68664       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
68665       if test ! -f ${ICECC_ENV_BUNDLE}; then
68666         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
68667       fi
68668       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
68669 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
68670       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
68671 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
68672       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
68673           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
68674     else
68675       BUILD_ICECC="${ICECC}"
68676     fi
68677 
68678 
68679   fi
68680 
68681 
68682 # Can the C/C++ compiler use precompiled headers?
68683 
68684 
68685   ###############################################################################
68686   #
68687   # Can the C/C++ compiler use precompiled headers?
68688   #
68689   # Check whether --enable-precompiled-headers was given.
68690 if test "${enable_precompiled_headers+set}" = set; then :
68691   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
68692 else
68693   ENABLE_PRECOMPH=yes
68694 fi
68695 
68696 
68697   USE_PRECOMPILED_HEADER=true
68698   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
68699 $as_echo_n "checking If precompiled header is enabled... " >&6; }
68700   if test "x$ENABLE_PRECOMPH" = xno; then
68701     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
68702 $as_echo "no, forced" >&6; }
68703     USE_PRECOMPILED_HEADER=false
68704   elif test "x$ICECC" != "x"; then
68705     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
68706 $as_echo "no, does not work effectively with icecc" >&6; }
68707     USE_PRECOMPILED_HEADER=false
68708   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
68709     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
68710 $as_echo "no, does not work with Solaris Studio" >&6; }
68711     USE_PRECOMPILED_HEADER=false
68712   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
68713     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
68714 $as_echo "no, does not work with xlc" >&6; }
68715     USE_PRECOMPILED_HEADER=false
68716   else
68717     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68718 $as_echo "yes" >&6; }
68719   fi
68720 
68721   if test "x$ENABLE_PRECOMPH" = xyes; then
68722     # Check that the compiler actually supports precomp headers.
68723     if test "x$TOOLCHAIN_TYPE" = xgcc; then
68724       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
68725 $as_echo_n "checking that precompiled headers work... " >&6; }
68726       echo "int alfa();" > conftest.h
68727       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
68728       if test ! -f conftest.hpp.gch; then
68729         USE_PRECOMPILED_HEADER=false
68730         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68731 $as_echo "no" >&6; }
68732       else
68733         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68734 $as_echo "yes" >&6; }
68735       fi
68736       $RM conftest.h conftest.hpp.gch
68737     fi
68738   fi
68739 
68740 
68741 
68742 
68743 # Setup use of ccache, if available
68744 
68745   # Check whether --enable-ccache was given.
68746 if test "${enable_ccache+set}" = set; then :
68747   enableval=$enable_ccache;
68748 fi
68749 
68750 
68751   CCACHE_STATUS=
68752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
68753 $as_echo_n "checking is ccache enabled... " >&6; }
68754   if test "x$enable_ccache" = xyes; then
68755     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
68756       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
68757 $as_echo "yes" >&6; }
68758       OLD_PATH="$PATH"
68759       if test "x$TOOLCHAIN_PATH" != x; then
68760         PATH=$TOOLCHAIN_PATH:$PATH
68761       fi
68762 
68763 
68764 
68765   # Publish this variable in the help.
68766 
68767 
68768   if [ -z "${CCACHE+x}" ]; then
68769     # The variable is not set by user, try to locate tool using the code snippet
68770     for ac_prog in ccache
68771 do
68772   # Extract the first word of "$ac_prog", so it can be a program name with args.
68773 set dummy $ac_prog; ac_word=$2
68774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68775 $as_echo_n "checking for $ac_word... " >&6; }
68776 if ${ac_cv_path_CCACHE+:} false; then :
68777   $as_echo_n "(cached) " >&6
68778 else
68779   case $CCACHE in
68780   [\\/]* | ?:[\\/]*)
68781   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
68782   ;;
68783   *)
68784   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68785 for as_dir in $PATH
68786 do
68787   IFS=$as_save_IFS
68788   test -z "$as_dir" && as_dir=.
68789     for ac_exec_ext in '' $ac_executable_extensions; do
68790   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68791     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
68792     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68793     break 2
68794   fi
68795 done
68796   done
68797 IFS=$as_save_IFS
68798 
68799   ;;
68800 esac
68801 fi
68802 CCACHE=$ac_cv_path_CCACHE
68803 if test -n "$CCACHE"; then
68804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
68805 $as_echo "$CCACHE" >&6; }
68806 else
68807   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68808 $as_echo "no" >&6; }
68809 fi
68810 
68811 
68812   test -n "$CCACHE" && break
68813 done
68814 
68815   else
68816     # The variable is set, but is it from the command line or the environment?
68817 
68818     # Try to remove the string !CCACHE! from our list.
68819     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
68820     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
68821       # If it failed, the variable was not from the command line. Ignore it,
68822       # but warn the user (except for BASH, which is always set by the calling BASH).
68823       if test "xCCACHE" != xBASH; then
68824         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
68825 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
68826       fi
68827       # Try to locate tool using the code snippet
68828       for ac_prog in ccache
68829 do
68830   # Extract the first word of "$ac_prog", so it can be a program name with args.
68831 set dummy $ac_prog; ac_word=$2
68832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68833 $as_echo_n "checking for $ac_word... " >&6; }
68834 if ${ac_cv_path_CCACHE+:} false; then :
68835   $as_echo_n "(cached) " >&6
68836 else
68837   case $CCACHE in
68838   [\\/]* | ?:[\\/]*)
68839   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
68840   ;;
68841   *)
68842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68843 for as_dir in $PATH
68844 do
68845   IFS=$as_save_IFS
68846   test -z "$as_dir" && as_dir=.
68847     for ac_exec_ext in '' $ac_executable_extensions; do
68848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68849     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
68850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68851     break 2
68852   fi
68853 done
68854   done
68855 IFS=$as_save_IFS
68856 
68857   ;;
68858 esac
68859 fi
68860 CCACHE=$ac_cv_path_CCACHE
68861 if test -n "$CCACHE"; then
68862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
68863 $as_echo "$CCACHE" >&6; }
68864 else
68865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68866 $as_echo "no" >&6; }
68867 fi
68868 
68869 
68870   test -n "$CCACHE" && break
68871 done
68872 
68873     else
68874       # If it succeeded, then it was overridden by the user. We will use it
68875       # for the tool.
68876 
68877       # First remove it from the list of overridden variables, so we can test
68878       # for unknown variables in the end.
68879       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
68880 
68881       # Check if we try to supply an empty value
68882       if test "x$CCACHE" = x; then
68883         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
68884 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
68885         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
68886 $as_echo_n "checking for CCACHE... " >&6; }
68887         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
68888 $as_echo "disabled" >&6; }
68889       else
68890         # Check if the provided tool contains a complete path.
68891         tool_specified="$CCACHE"
68892         tool_basename="${tool_specified##*/}"
68893         if test "x$tool_basename" = "x$tool_specified"; then
68894           # A command without a complete path is provided, search $PATH.
68895           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
68896 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
68897           # Extract the first word of "$tool_basename", so it can be a program name with args.
68898 set dummy $tool_basename; ac_word=$2
68899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
68900 $as_echo_n "checking for $ac_word... " >&6; }
68901 if ${ac_cv_path_CCACHE+:} false; then :
68902   $as_echo_n "(cached) " >&6
68903 else
68904   case $CCACHE in
68905   [\\/]* | ?:[\\/]*)
68906   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
68907   ;;
68908   *)
68909   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
68910 for as_dir in $PATH
68911 do
68912   IFS=$as_save_IFS
68913   test -z "$as_dir" && as_dir=.
68914     for ac_exec_ext in '' $ac_executable_extensions; do
68915   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
68916     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
68917     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
68918     break 2
68919   fi
68920 done
68921   done
68922 IFS=$as_save_IFS
68923 
68924   ;;
68925 esac
68926 fi
68927 CCACHE=$ac_cv_path_CCACHE
68928 if test -n "$CCACHE"; then
68929   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
68930 $as_echo "$CCACHE" >&6; }
68931 else
68932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68933 $as_echo "no" >&6; }
68934 fi
68935 
68936 
68937           if test "x$CCACHE" = x; then
68938             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
68939           fi
68940         else
68941           # Otherwise we believe it is a complete path. Use it as it is.
68942           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
68943 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
68944           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
68945 $as_echo_n "checking for CCACHE... " >&6; }
68946           if test ! -x "$tool_specified"; then
68947             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
68948 $as_echo "not found" >&6; }
68949             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
68950           fi
68951           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
68952 $as_echo "$tool_specified" >&6; }
68953         fi
68954       fi
68955     fi
68956 
68957   fi
68958 
68959 
68960 
68961   if test "x$CCACHE" = x; then
68962     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
68963   fi
68964 
68965 
68966       PATH="$OLD_PATH"
68967       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
68968       CCACHE_STATUS="Active ($CCACHE_VERSION)"
68969     else
68970       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68971 $as_echo "no" >&6; }
68972       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
68973 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
68974     fi
68975   elif test "x$enable_ccache" = xno; then
68976     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
68977 $as_echo "no, explicitly disabled" >&6; }
68978     CCACHE_STATUS="Disabled"
68979   elif test "x$enable_ccache" = x; then
68980     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
68981 $as_echo "no" >&6; }
68982   else
68983     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
68984 $as_echo "unknown" >&6; }
68985     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
68986   fi
68987 
68988 
68989 
68990 # Check whether --with-ccache-dir was given.
68991 if test "${with_ccache_dir+set}" = set; then :
68992   withval=$with_ccache_dir;
68993 fi
68994 
68995 
68996   if test "x$with_ccache_dir" != x; then
68997     # When using a non home ccache directory, assume the use is to share ccache files
68998     # with other users. Thus change the umask.
68999     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
69000     if test "x$CCACHE" = x; then
69001       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
69002 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
69003     fi
69004   fi
69005 
69006   if test "x$CCACHE" != x; then
69007 
69008   if test "x$CCACHE" != x; then
69009     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
69010       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
69011           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
69012       if test "x$HAS_BAD_CCACHE" != "x"; then
69013         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
69014       fi
69015     fi
69016     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
69017       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
69018           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
69019       if test "x$HAS_BAD_CCACHE" != "x"; then
69020         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
69021       fi
69022       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
69023 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
69024       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
69025       PUSHED_FLAGS="$CXXFLAGS"
69026       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
69027       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
69028 /* end confdefs.h.  */
69029 
69030 int
69031 main ()
69032 {
69033 
69034   ;
69035   return 0;
69036 }
69037 _ACEOF
69038 if ac_fn_cxx_try_compile "$LINENO"; then :
69039   CC_KNOWS_CCACHE_TRICK=yes
69040 else
69041   CC_KNOWS_CCACHE_TRICK=no
69042 fi
69043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
69044       CXXFLAGS="$PUSHED_FLAGS"
69045       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
69046         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
69047 $as_echo "yes" >&6; }
69048         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
69049 
69050         CCACHE_SLOPPINESS=pch_defines,time_macros
69051       else
69052         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
69053 $as_echo "no" >&6; }
69054         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
69055       fi
69056     fi
69057 
69058     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
69059         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
69060 
69061     if test "x$SET_CCACHE_DIR" != x; then
69062       mkdir -p $CCACHE_DIR > /dev/null 2>&1
69063       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
69064     fi
69065   fi
69066 
69067   fi
69068 
69069 
69070 ###############################################################################
69071 #
69072 # And now the finish...
69073 #
69074 ###############################################################################
69075 
69076 # Check for some common pitfalls
69077 
69078   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
69079     file_to_test="$TOPDIR/LICENSE"
69080     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
69081       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
69082     fi
69083   fi
69084 
69085 
69086   # Did user specify any unknown variables?
69087 
69088   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
69089     # Replace the separating ! with spaces before presenting for end user.
69090     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
69091     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
69092 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
69093   fi
69094 
69095 
69096   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
69097 $as_echo_n "checking if build directory is on local disk... " >&6; }
69098 
69099   # df -l lists only local disks; if the given directory is not found then
69100   # a non-zero exit code is given
69101   if test "x$DF" = x; then
69102     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
69103       # msys does not have df; use Windows "net use" instead.
69104       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
69105       if test "x$IS_NETWORK_DISK" = x; then
69106         OUTPUT_DIR_IS_LOCAL="yes"
69107       else
69108         OUTPUT_DIR_IS_LOCAL="no"
69109       fi
69110     else
69111       # No df here, say it's local
69112       OUTPUT_DIR_IS_LOCAL="yes"
69113     fi
69114   else
69115     # JDK-8189619
69116     # df on AIX does not understand -l. On modern AIXes it understands "-T local" which
69117     # is the same. On older AIXes we just continue to live with a "not local build" warning.
69118     if test "x$OPENJDK_TARGET_OS" = xaix; then
69119       DF_LOCAL_ONLY_OPTION='-T local'
69120     else
69121       DF_LOCAL_ONLY_OPTION='-l'
69122     fi
69123     if $DF $DF_LOCAL_ONLY_OPTION $OUTPUTDIR > /dev/null 2>&1; then
69124       OUTPUT_DIR_IS_LOCAL="yes"
69125     else
69126       OUTPUT_DIR_IS_LOCAL="no"
69127     fi
69128   fi
69129 
69130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
69131 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
69132 
69133 
69134 
69135   # Check if the user has any old-style ALT_ variables set.
69136   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
69137 
69138   # Before generating output files, test if they exist. If they do, this is a reconfigure.
69139   # Since we can't properly handle the dependencies for this, warn the user about the situation
69140   if test -e $OUTPUTDIR/spec.gmk; then
69141     IS_RECONFIGURE=yes
69142   else
69143     IS_RECONFIGURE=no
69144   fi
69145 
69146 
69147 # At the end, call the custom hook. (Dummy macro if no custom sources available)
69148 
69149 
69150 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
69151 
69152   # Keep feature lists sorted and free of duplicates
69153   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
69154   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
69155   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
69156   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
69157   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
69158   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
69159 
69160   # Validate features
69161   for variant in $JVM_VARIANTS; do
69162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
69163 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
69164     features_var_name=JVM_FEATURES_$variant
69165     JVM_FEATURES_TO_TEST=${!features_var_name}
69166     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
69167 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
69168     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
69169     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
69170     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
69171     if test "x$INVALID_FEATURES" != x; then
69172       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
69173     fi
69174   done
69175 
69176 
69177 # We're messing a bit with internal autoconf variables to put the config.status
69178 # in the output directory instead of the current directory.
69179 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
69180 
69181 # Create the actual output files. Now the main work of configure is done.
69182 cat >confcache <<\_ACEOF
69183 # This file is a shell script that caches the results of configure
69184 # tests run on this system so they can be shared between configure
69185 # scripts and configure runs, see configure's option --config-cache.
69186 # It is not useful on other systems.  If it contains results you don't
69187 # want to keep, you may remove or edit it.
69188 #
69189 # config.status only pays attention to the cache file if you give it
69190 # the --recheck option to rerun configure.
69191 #
69192 # `ac_cv_env_foo' variables (set or unset) will be overridden when
69193 # loading this file, other *unset* `ac_cv_foo' will be assigned the
69194 # following values.
69195 
69196 _ACEOF
69197 
69198 # The following way of writing the cache mishandles newlines in values,
69199 # but we know of no workaround that is simple, portable, and efficient.
69200 # So, we kill variables containing newlines.
69201 # Ultrix sh set writes to stderr and can't be redirected directly,
69202 # and sets the high bit in the cache file unless we assign to the vars.
69203 (
69204   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
69205     eval ac_val=\$$ac_var
69206     case $ac_val in #(
69207     *${as_nl}*)
69208       case $ac_var in #(
69209       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
69210 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
69211       esac
69212       case $ac_var in #(
69213       _ | IFS | as_nl) ;; #(
69214       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
69215       *) { eval $ac_var=; unset $ac_var;} ;;
69216       esac ;;
69217     esac
69218   done
69219 
69220   (set) 2>&1 |
69221     case $as_nl`(ac_space=' '; set) 2>&1` in #(
69222     *${as_nl}ac_space=\ *)
69223       # `set' does not quote correctly, so add quotes: double-quote
69224       # substitution turns \\\\ into \\, and sed turns \\ into \.
69225       sed -n \
69226         "s/'/'\\\\''/g;
69227           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
69228       ;; #(
69229     *)
69230       # `set' quotes correctly as required by POSIX, so do not add quotes.
69231       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
69232       ;;
69233     esac |
69234     sort
69235 ) |
69236   sed '
69237      /^ac_cv_env_/b end
69238      t clear
69239      :clear
69240      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
69241      t end
69242      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
69243      :end' >>confcache
69244 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
69245   if test -w "$cache_file"; then
69246     if test "x$cache_file" != "x/dev/null"; then
69247       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
69248 $as_echo "$as_me: updating cache $cache_file" >&6;}
69249       if test ! -f "$cache_file" || test -h "$cache_file"; then
69250         cat confcache >"$cache_file"
69251       else
69252         case $cache_file in #(
69253         */* | ?:*)
69254           mv -f confcache "$cache_file"$$ &&
69255           mv -f "$cache_file"$$ "$cache_file" ;; #(
69256         *)
69257           mv -f confcache "$cache_file" ;;
69258         esac
69259       fi
69260     fi
69261   else
69262     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
69263 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
69264   fi
69265 fi
69266 rm -f confcache
69267 
69268 test "x$prefix" = xNONE && prefix=$ac_default_prefix
69269 # Let make expand exec_prefix.
69270 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
69271 
69272 # Transform confdefs.h into DEFS.
69273 # Protect against shell expansion while executing Makefile rules.
69274 # Protect against Makefile macro expansion.
69275 #
69276 # If the first sed substitution is executed (which looks for macros that
69277 # take arguments), then branch to the quote section.  Otherwise,
69278 # look for a macro that doesn't take arguments.
69279 ac_script='
69280 :mline
69281 /\\$/{
69282  N
69283  s,\\\n,,
69284  b mline
69285 }
69286 t clear
69287 :clear
69288 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
69289 t quote
69290 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
69291 t quote
69292 b any
69293 :quote
69294 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
69295 s/\[/\\&/g
69296 s/\]/\\&/g
69297 s/\$/$$/g
69298 H
69299 :any
69300 ${
69301         g
69302         s/^\n//
69303         s/\n/ /g
69304         p
69305 }
69306 '
69307 DEFS=`sed -n "$ac_script" confdefs.h`
69308 
69309 
69310 ac_libobjs=
69311 ac_ltlibobjs=
69312 U=
69313 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
69314   # 1. Remove the extension, and $U if already installed.
69315   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
69316   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
69317   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
69318   #    will be set to the directory where LIBOBJS objects are built.
69319   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
69320   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
69321 done
69322 LIBOBJS=$ac_libobjs
69323 
69324 LTLIBOBJS=$ac_ltlibobjs
69325 
69326 
69327 
69328 : "${CONFIG_STATUS=./config.status}"
69329 ac_write_fail=0
69330 ac_clean_files_save=$ac_clean_files
69331 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
69332 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
69333 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
69334 as_write_fail=0
69335 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
69336 #! $SHELL
69337 # Generated by $as_me.
69338 # Run this file to recreate the current configuration.
69339 # Compiler output produced by configure, useful for debugging
69340 # configure, is in config.log if it exists.
69341 
69342 debug=false
69343 ac_cs_recheck=false
69344 ac_cs_silent=false
69345 
69346 SHELL=\${CONFIG_SHELL-$SHELL}
69347 export SHELL
69348 _ASEOF
69349 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
69350 ## -------------------- ##
69351 ## M4sh Initialization. ##
69352 ## -------------------- ##
69353 
69354 # Be more Bourne compatible
69355 DUALCASE=1; export DUALCASE # for MKS sh
69356 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
69357   emulate sh
69358   NULLCMD=:
69359   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
69360   # is contrary to our usage.  Disable this feature.
69361   alias -g '${1+"$@"}'='"$@"'
69362   setopt NO_GLOB_SUBST
69363 else
69364   case `(set -o) 2>/dev/null` in #(
69365   *posix*) :
69366     set -o posix ;; #(
69367   *) :
69368      ;;
69369 esac
69370 fi
69371 
69372 
69373 as_nl='
69374 '
69375 export as_nl
69376 # Printing a long string crashes Solaris 7 /usr/bin/printf.
69377 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
69378 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
69379 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
69380 # Prefer a ksh shell builtin over an external printf program on Solaris,
69381 # but without wasting forks for bash or zsh.
69382 if test -z "$BASH_VERSION$ZSH_VERSION" \
69383     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
69384   as_echo='print -r --'
69385   as_echo_n='print -rn --'
69386 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
69387   as_echo='printf %s\n'
69388   as_echo_n='printf %s'
69389 else
69390   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
69391     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
69392     as_echo_n='/usr/ucb/echo -n'
69393   else
69394     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
69395     as_echo_n_body='eval
69396       arg=$1;
69397       case $arg in #(
69398       *"$as_nl"*)
69399         expr "X$arg" : "X\\(.*\\)$as_nl";
69400         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
69401       esac;
69402       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69403     '
69404     export as_echo_n_body
69405     as_echo_n='sh -c $as_echo_n_body as_echo'
69406   fi
69407   export as_echo_body
69408   as_echo='sh -c $as_echo_body as_echo'
69409 fi
69410 
69411 # The user is always right.
69412 if test "${PATH_SEPARATOR+set}" != set; then
69413   PATH_SEPARATOR=:
69414   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
69415     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
69416       PATH_SEPARATOR=';'
69417   }
69418 fi
69419 
69420 
69421 # IFS
69422 # We need space, tab and new line, in precisely that order.  Quoting is
69423 # there to prevent editors from complaining about space-tab.
69424 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
69425 # splitting by setting IFS to empty value.)
69426 IFS=" ""        $as_nl"
69427 
69428 # Find who we are.  Look in the path if we contain no directory separator.
69429 as_myself=
69430 case $0 in #((
69431   *[\\/]* ) as_myself=$0 ;;
69432   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
69433 for as_dir in $PATH
69434 do
69435   IFS=$as_save_IFS
69436   test -z "$as_dir" && as_dir=.
69437     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
69438   done
69439 IFS=$as_save_IFS
69440 
69441      ;;
69442 esac
69443 # We did not find ourselves, most probably we were run as `sh COMMAND'
69444 # in which case we are not to be found in the path.
69445 if test "x$as_myself" = x; then
69446   as_myself=$0
69447 fi
69448 if test ! -f "$as_myself"; then
69449   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
69450   exit 1
69451 fi
69452 
69453 # Unset variables that we do not need and which cause bugs (e.g. in
69454 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
69455 # suppresses any "Segmentation fault" message there.  '((' could
69456 # trigger a bug in pdksh 5.2.14.
69457 for as_var in BASH_ENV ENV MAIL MAILPATH
69458 do eval test x\${$as_var+set} = xset \
69459   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
69460 done
69461 PS1='$ '
69462 PS2='> '
69463 PS4='+ '
69464 
69465 # NLS nuisances.
69466 LC_ALL=C
69467 export LC_ALL
69468 LANGUAGE=C
69469 export LANGUAGE
69470 
69471 # CDPATH.
69472 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
69473 
69474 
69475 # as_fn_error STATUS ERROR [LINENO LOG_FD]
69476 # ----------------------------------------
69477 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
69478 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
69479 # script with STATUS, using 1 if that was 0.
69480 as_fn_error ()
69481 {
69482   as_status=$1; test $as_status -eq 0 && as_status=1
69483   if test "$4"; then
69484     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
69485     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
69486   fi
69487   $as_echo "$as_me: error: $2" >&2
69488   as_fn_exit $as_status
69489 } # as_fn_error
69490 
69491 
69492 # as_fn_set_status STATUS
69493 # -----------------------
69494 # Set $? to STATUS, without forking.
69495 as_fn_set_status ()
69496 {
69497   return $1
69498 } # as_fn_set_status
69499 
69500 # as_fn_exit STATUS
69501 # -----------------
69502 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
69503 as_fn_exit ()
69504 {
69505   set +e
69506   as_fn_set_status $1
69507   exit $1
69508 } # as_fn_exit
69509 
69510 # as_fn_unset VAR
69511 # ---------------
69512 # Portably unset VAR.
69513 as_fn_unset ()
69514 {
69515   { eval $1=; unset $1;}
69516 }
69517 as_unset=as_fn_unset
69518 # as_fn_append VAR VALUE
69519 # ----------------------
69520 # Append the text in VALUE to the end of the definition contained in VAR. Take
69521 # advantage of any shell optimizations that allow amortized linear growth over
69522 # repeated appends, instead of the typical quadratic growth present in naive
69523 # implementations.
69524 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
69525   eval 'as_fn_append ()
69526   {
69527     eval $1+=\$2
69528   }'
69529 else
69530   as_fn_append ()
69531   {
69532     eval $1=\$$1\$2
69533   }
69534 fi # as_fn_append
69535 
69536 # as_fn_arith ARG...
69537 # ------------------
69538 # Perform arithmetic evaluation on the ARGs, and store the result in the
69539 # global $as_val. Take advantage of shells that can avoid forks. The arguments
69540 # must be portable across $(()) and expr.
69541 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
69542   eval 'as_fn_arith ()
69543   {
69544     as_val=$(( $* ))
69545   }'
69546 else
69547   as_fn_arith ()
69548   {
69549     as_val=`expr "$@" || test $? -eq 1`
69550   }
69551 fi # as_fn_arith
69552 
69553 
69554 if expr a : '\(a\)' >/dev/null 2>&1 &&
69555    test "X`expr 00001 : '.*\(...\)'`" = X001; then
69556   as_expr=expr
69557 else
69558   as_expr=false
69559 fi
69560 
69561 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
69562   as_basename=basename
69563 else
69564   as_basename=false
69565 fi
69566 
69567 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
69568   as_dirname=dirname
69569 else
69570   as_dirname=false
69571 fi
69572 
69573 as_me=`$as_basename -- "$0" ||
69574 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69575          X"$0" : 'X\(//\)$' \| \
69576          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
69577 $as_echo X/"$0" |
69578     sed '/^.*\/\([^/][^/]*\)\/*$/{
69579             s//\1/
69580             q
69581           }
69582           /^X\/\(\/\/\)$/{
69583             s//\1/
69584             q
69585           }
69586           /^X\/\(\/\).*/{
69587             s//\1/
69588             q
69589           }
69590           s/.*/./; q'`
69591 
69592 # Avoid depending upon Character Ranges.
69593 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
69594 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
69595 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
69596 as_cr_digits='0123456789'
69597 as_cr_alnum=$as_cr_Letters$as_cr_digits
69598 
69599 ECHO_C= ECHO_N= ECHO_T=
69600 case `echo -n x` in #(((((
69601 -n*)
69602   case `echo 'xy\c'` in
69603   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
69604   xy)  ECHO_C='\c';;
69605   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
69606        ECHO_T=' ';;
69607   esac;;
69608 *)
69609   ECHO_N='-n';;
69610 esac
69611 
69612 rm -f conf$$ conf$$.exe conf$$.file
69613 if test -d conf$$.dir; then
69614   rm -f conf$$.dir/conf$$.file
69615 else
69616   rm -f conf$$.dir
69617   mkdir conf$$.dir 2>/dev/null
69618 fi
69619 if (echo >conf$$.file) 2>/dev/null; then
69620   if ln -s conf$$.file conf$$ 2>/dev/null; then
69621     as_ln_s='ln -s'
69622     # ... but there are two gotchas:
69623     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
69624     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
69625     # In both cases, we have to default to `cp -pR'.
69626     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
69627       as_ln_s='cp -pR'
69628   elif ln conf$$.file conf$$ 2>/dev/null; then
69629     as_ln_s=ln
69630   else
69631     as_ln_s='cp -pR'
69632   fi
69633 else
69634   as_ln_s='cp -pR'
69635 fi
69636 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
69637 rmdir conf$$.dir 2>/dev/null
69638 
69639 
69640 # as_fn_mkdir_p
69641 # -------------
69642 # Create "$as_dir" as a directory, including parents if necessary.
69643 as_fn_mkdir_p ()
69644 {
69645 
69646   case $as_dir in #(
69647   -*) as_dir=./$as_dir;;
69648   esac
69649   test -d "$as_dir" || eval $as_mkdir_p || {
69650     as_dirs=
69651     while :; do
69652       case $as_dir in #(
69653       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
69654       *) as_qdir=$as_dir;;
69655       esac
69656       as_dirs="'$as_qdir' $as_dirs"
69657       as_dir=`$as_dirname -- "$as_dir" ||
69658 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
69659          X"$as_dir" : 'X\(//\)[^/]' \| \
69660          X"$as_dir" : 'X\(//\)$' \| \
69661          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
69662 $as_echo X"$as_dir" |
69663     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
69664             s//\1/
69665             q
69666           }
69667           /^X\(\/\/\)[^/].*/{
69668             s//\1/
69669             q
69670           }
69671           /^X\(\/\/\)$/{
69672             s//\1/
69673             q
69674           }
69675           /^X\(\/\).*/{
69676             s//\1/
69677             q
69678           }
69679           s/.*/./; q'`
69680       test -d "$as_dir" && break
69681     done
69682     test -z "$as_dirs" || eval "mkdir $as_dirs"
69683   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
69684 
69685 
69686 } # as_fn_mkdir_p
69687 if mkdir -p . 2>/dev/null; then
69688   as_mkdir_p='mkdir -p "$as_dir"'
69689 else
69690   test -d ./-p && rmdir ./-p
69691   as_mkdir_p=false
69692 fi
69693 
69694 
69695 # as_fn_executable_p FILE
69696 # -----------------------
69697 # Test if FILE is an executable regular file.
69698 as_fn_executable_p ()
69699 {
69700   test -f "$1" && test -x "$1"
69701 } # as_fn_executable_p
69702 as_test_x='test -x'
69703 as_executable_p=as_fn_executable_p
69704 
69705 # Sed expression to map a string onto a valid CPP name.
69706 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
69707 
69708 # Sed expression to map a string onto a valid variable name.
69709 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
69710 
69711 
69712 exec 6>&1
69713 ## ----------------------------------- ##
69714 ## Main body of $CONFIG_STATUS script. ##
69715 ## ----------------------------------- ##
69716 _ASEOF
69717 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
69718 
69719 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69720 # Save the log message, to keep $0 and so on meaningful, and to
69721 # report actual input values of CONFIG_FILES etc. instead of their
69722 # values after options handling.
69723 ac_log="
69724 This file was extended by OpenJDK $as_me jdk9, which was
69725 generated by GNU Autoconf 2.69.  Invocation command line was
69726 
69727   CONFIG_FILES    = $CONFIG_FILES
69728   CONFIG_HEADERS  = $CONFIG_HEADERS
69729   CONFIG_LINKS    = $CONFIG_LINKS
69730   CONFIG_COMMANDS = $CONFIG_COMMANDS
69731   $ $0 $@
69732 
69733 on `(hostname || uname -n) 2>/dev/null | sed 1q`
69734 "
69735 
69736 _ACEOF
69737 
69738 case $ac_config_files in *"
69739 "*) set x $ac_config_files; shift; ac_config_files=$*;;
69740 esac
69741 
69742 
69743 
69744 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69745 # Files that config.status was made for.
69746 config_files="$ac_config_files"
69747 
69748 _ACEOF
69749 
69750 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69751 ac_cs_usage="\
69752 \`$as_me' instantiates files and other configuration actions
69753 from templates according to the current configuration.  Unless the files
69754 and actions are specified as TAGs, all are instantiated by default.
69755 
69756 Usage: $0 [OPTION]... [TAG]...
69757 
69758   -h, --help       print this help, then exit
69759   -V, --version    print version number and configuration settings, then exit
69760       --config     print configuration, then exit
69761   -q, --quiet, --silent
69762                    do not print progress messages
69763   -d, --debug      don't remove temporary files
69764       --recheck    update $as_me by reconfiguring in the same conditions
69765       --file=FILE[:TEMPLATE]
69766                    instantiate the configuration file FILE
69767 
69768 Configuration files:
69769 $config_files
69770 
69771 Report bugs to <build-dev@openjdk.java.net>.
69772 OpenJDK home page: <http://openjdk.java.net>."
69773 
69774 _ACEOF
69775 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69776 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
69777 ac_cs_version="\\
69778 OpenJDK config.status jdk9
69779 configured by $0, generated by GNU Autoconf 2.69,
69780   with options \\"\$ac_cs_config\\"
69781 
69782 Copyright (C) 2012 Free Software Foundation, Inc.
69783 This config.status script is free software; the Free Software Foundation
69784 gives unlimited permission to copy, distribute and modify it."
69785 
69786 ac_pwd='$ac_pwd'
69787 srcdir='$srcdir'
69788 AWK='$AWK'
69789 test -n "\$AWK" || AWK=awk
69790 _ACEOF
69791 
69792 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69793 # The default lists apply if the user does not specify any file.
69794 ac_need_defaults=:
69795 while test $# != 0
69796 do
69797   case $1 in
69798   --*=?*)
69799     ac_option=`expr "X$1" : 'X\([^=]*\)='`
69800     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
69801     ac_shift=:
69802     ;;
69803   --*=)
69804     ac_option=`expr "X$1" : 'X\([^=]*\)='`
69805     ac_optarg=
69806     ac_shift=:
69807     ;;
69808   *)
69809     ac_option=$1
69810     ac_optarg=$2
69811     ac_shift=shift
69812     ;;
69813   esac
69814 
69815   case $ac_option in
69816   # Handling of the options.
69817   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
69818     ac_cs_recheck=: ;;
69819   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
69820     $as_echo "$ac_cs_version"; exit ;;
69821   --config | --confi | --conf | --con | --co | --c )
69822     $as_echo "$ac_cs_config"; exit ;;
69823   --debug | --debu | --deb | --de | --d | -d )
69824     debug=: ;;
69825   --file | --fil | --fi | --f )
69826     $ac_shift
69827     case $ac_optarg in
69828     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
69829     '') as_fn_error $? "missing file argument" ;;
69830     esac
69831     as_fn_append CONFIG_FILES " '$ac_optarg'"
69832     ac_need_defaults=false;;
69833   --he | --h |  --help | --hel | -h )
69834     $as_echo "$ac_cs_usage"; exit ;;
69835   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
69836   | -silent | --silent | --silen | --sile | --sil | --si | --s)
69837     ac_cs_silent=: ;;
69838 
69839   # This is an error.
69840   -*) as_fn_error $? "unrecognized option: \`$1'
69841 Try \`$0 --help' for more information." ;;
69842 
69843   *) as_fn_append ac_config_targets " $1"
69844      ac_need_defaults=false ;;
69845 
69846   esac
69847   shift
69848 done
69849 
69850 ac_configure_extra_args=
69851 
69852 if $ac_cs_silent; then
69853   exec 6>/dev/null
69854   ac_configure_extra_args="$ac_configure_extra_args --silent"
69855 fi
69856 
69857 _ACEOF
69858 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69859 if \$ac_cs_recheck; then
69860   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
69861   shift
69862   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
69863   CONFIG_SHELL='$SHELL'
69864   export CONFIG_SHELL
69865   exec "\$@"
69866 fi
69867 
69868 _ACEOF
69869 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69870 exec 5>>config.log
69871 {
69872   echo
69873   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
69874 ## Running $as_me. ##
69875 _ASBOX
69876   $as_echo "$ac_log"
69877 } >&5
69878 
69879 _ACEOF
69880 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69881 _ACEOF
69882 
69883 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
69884 
69885 # Handling of arguments.
69886 for ac_config_target in $ac_config_targets
69887 do
69888   case $ac_config_target in
69889     "$OUTPUTDIR/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
69890     "$OUTPUTDIR/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
69891     "$OUTPUTDIR/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
69892     "$OUTPUTDIR/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
69893     "$OUTPUTDIR/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUTDIR/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
69894 
69895   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
69896   esac
69897 done
69898 
69899 
69900 # If the user did not use the arguments to specify the items to instantiate,
69901 # then the envvar interface is used.  Set only those that are not.
69902 # We use the long form for the default assignment because of an extremely
69903 # bizarre bug on SunOS 4.1.3.
69904 if $ac_need_defaults; then
69905   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
69906 fi
69907 
69908 # Have a temporary directory for convenience.  Make it in the build tree
69909 # simply because there is no reason against having it here, and in addition,
69910 # creating and moving files from /tmp can sometimes cause problems.
69911 # Hook for its removal unless debugging.
69912 # Note that there is a small window in which the directory will not be cleaned:
69913 # after its creation but before its name has been assigned to `$tmp'.
69914 $debug ||
69915 {
69916   tmp= ac_tmp=
69917   trap 'exit_status=$?
69918   : "${ac_tmp:=$tmp}"
69919   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
69920 ' 0
69921   trap 'as_fn_exit 1' 1 2 13 15
69922 }
69923 # Create a (secure) tmp directory for tmp files.
69924 
69925 {
69926   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
69927   test -d "$tmp"
69928 }  ||
69929 {
69930   tmp=./conf$$-$RANDOM
69931   (umask 077 && mkdir "$tmp")
69932 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
69933 ac_tmp=$tmp
69934 
69935 # Set up the scripts for CONFIG_FILES section.
69936 # No need to generate them if there are no CONFIG_FILES.
69937 # This happens for instance with `./config.status config.h'.
69938 if test -n "$CONFIG_FILES"; then
69939 
69940 
69941 ac_cr=`echo X | tr X '\015'`
69942 # On cygwin, bash can eat \r inside `` if the user requested igncr.
69943 # But we know of no other shell where ac_cr would be empty at this
69944 # point, so we can use a bashism as a fallback.
69945 if test "x$ac_cr" = x; then
69946   eval ac_cr=\$\'\\r\'
69947 fi
69948 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
69949 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
69950   ac_cs_awk_cr='\\r'
69951 else
69952   ac_cs_awk_cr=$ac_cr
69953 fi
69954 
69955 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
69956 _ACEOF
69957 
69958 
69959 {
69960   echo "cat >conf$$subs.awk <<_ACEOF" &&
69961   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
69962   echo "_ACEOF"
69963 } >conf$$subs.sh ||
69964   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
69965 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
69966 ac_delim='%!_!# '
69967 for ac_last_try in false false false false false :; do
69968   . ./conf$$subs.sh ||
69969     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
69970 
69971   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
69972   if test $ac_delim_n = $ac_delim_num; then
69973     break
69974   elif $ac_last_try; then
69975     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
69976   else
69977     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
69978   fi
69979 done
69980 rm -f conf$$subs.sh
69981 
69982 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
69983 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
69984 _ACEOF
69985 sed -n '
69986 h
69987 s/^/S["/; s/!.*/"]=/
69988 p
69989 g
69990 s/^[^!]*!//
69991 :repl
69992 t repl
69993 s/'"$ac_delim"'$//
69994 t delim
69995 :nl
69996 h
69997 s/\(.\{148\}\)..*/\1/
69998 t more1
69999 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
70000 p
70001 n
70002 b repl
70003 :more1
70004 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
70005 p
70006 g
70007 s/.\{148\}//
70008 t nl
70009 :delim
70010 h
70011 s/\(.\{148\}\)..*/\1/
70012 t more2
70013 s/["\\]/\\&/g; s/^/"/; s/$/"/
70014 p
70015 b
70016 :more2
70017 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
70018 p
70019 g
70020 s/.\{148\}//
70021 t delim
70022 ' <conf$$subs.awk | sed '
70023 /^[^""]/{
70024   N
70025   s/\n//
70026 }
70027 ' >>$CONFIG_STATUS || ac_write_fail=1
70028 rm -f conf$$subs.awk
70029 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70030 _ACAWK
70031 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
70032   for (key in S) S_is_set[key] = 1
70033   FS = ""
70034 
70035 }
70036 {
70037   line = $ 0
70038   nfields = split(line, field, "@")
70039   substed = 0
70040   len = length(field[1])
70041   for (i = 2; i < nfields; i++) {
70042     key = field[i]
70043     keylen = length(key)
70044     if (S_is_set[key]) {
70045       value = S[key]
70046       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
70047       len += length(value) + length(field[++i])
70048       substed = 1
70049     } else
70050       len += 1 + keylen
70051   }
70052 
70053   print line
70054 }
70055 
70056 _ACAWK
70057 _ACEOF
70058 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
70059 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
70060   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
70061 else
70062   cat
70063 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
70064   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
70065 _ACEOF
70066 
70067 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
70068 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
70069 # trailing colons and then remove the whole line if VPATH becomes empty
70070 # (actually we leave an empty line to preserve line numbers).
70071 if test "x$srcdir" = x.; then
70072   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
70073 h
70074 s///
70075 s/^/:/
70076 s/[      ]*$/:/
70077 s/:\$(srcdir):/:/g
70078 s/:\${srcdir}:/:/g
70079 s/:@srcdir@:/:/g
70080 s/^:*//
70081 s/:*$//
70082 x
70083 s/\(=[   ]*\).*/\1/
70084 G
70085 s/\n//
70086 s/^[^=]*=[       ]*$//
70087 }'
70088 fi
70089 
70090 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
70091 fi # test -n "$CONFIG_FILES"
70092 
70093 
70094 eval set X "  :F $CONFIG_FILES      "
70095 shift
70096 for ac_tag
70097 do
70098   case $ac_tag in
70099   :[FHLC]) ac_mode=$ac_tag; continue;;
70100   esac
70101   case $ac_mode$ac_tag in
70102   :[FHL]*:*);;
70103   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
70104   :[FH]-) ac_tag=-:-;;
70105   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
70106   esac
70107   ac_save_IFS=$IFS
70108   IFS=:
70109   set x $ac_tag
70110   IFS=$ac_save_IFS
70111   shift
70112   ac_file=$1
70113   shift
70114 
70115   case $ac_mode in
70116   :L) ac_source=$1;;
70117   :[FH])
70118     ac_file_inputs=
70119     for ac_f
70120     do
70121       case $ac_f in
70122       -) ac_f="$ac_tmp/stdin";;
70123       *) # Look for the file first in the build tree, then in the source tree
70124          # (if the path is not absolute).  The absolute path cannot be DOS-style,
70125          # because $ac_f cannot contain `:'.
70126          test -f "$ac_f" ||
70127            case $ac_f in
70128            [\\/$]*) false;;
70129            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
70130            esac ||
70131            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
70132       esac
70133       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
70134       as_fn_append ac_file_inputs " '$ac_f'"
70135     done
70136 
70137     # Let's still pretend it is `configure' which instantiates (i.e., don't
70138     # use $as_me), people would be surprised to read:
70139     #    /* config.h.  Generated by config.status.  */
70140     configure_input='Generated from '`
70141           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
70142         `' by configure.'
70143     if test x"$ac_file" != x-; then
70144       configure_input="$ac_file.  $configure_input"
70145       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
70146 $as_echo "$as_me: creating $ac_file" >&6;}
70147     fi
70148     # Neutralize special characters interpreted by sed in replacement strings.
70149     case $configure_input in #(
70150     *\&* | *\|* | *\\* )
70151        ac_sed_conf_input=`$as_echo "$configure_input" |
70152        sed 's/[\\\\&|]/\\\\&/g'`;; #(
70153     *) ac_sed_conf_input=$configure_input;;
70154     esac
70155 
70156     case $ac_tag in
70157     *:-:* | *:-) cat >"$ac_tmp/stdin" \
70158       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
70159     esac
70160     ;;
70161   esac
70162 
70163   ac_dir=`$as_dirname -- "$ac_file" ||
70164 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
70165          X"$ac_file" : 'X\(//\)[^/]' \| \
70166          X"$ac_file" : 'X\(//\)$' \| \
70167          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
70168 $as_echo X"$ac_file" |
70169     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
70170             s//\1/
70171             q
70172           }
70173           /^X\(\/\/\)[^/].*/{
70174             s//\1/
70175             q
70176           }
70177           /^X\(\/\/\)$/{
70178             s//\1/
70179             q
70180           }
70181           /^X\(\/\).*/{
70182             s//\1/
70183             q
70184           }
70185           s/.*/./; q'`
70186   as_dir="$ac_dir"; as_fn_mkdir_p
70187   ac_builddir=.
70188 
70189 case "$ac_dir" in
70190 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
70191 *)
70192   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
70193   # A ".." for each directory in $ac_dir_suffix.
70194   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
70195   case $ac_top_builddir_sub in
70196   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
70197   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
70198   esac ;;
70199 esac
70200 ac_abs_top_builddir=$ac_pwd
70201 ac_abs_builddir=$ac_pwd$ac_dir_suffix
70202 # for backward compatibility:
70203 ac_top_builddir=$ac_top_build_prefix
70204 
70205 case $srcdir in
70206   .)  # We are building in place.
70207     ac_srcdir=.
70208     ac_top_srcdir=$ac_top_builddir_sub
70209     ac_abs_top_srcdir=$ac_pwd ;;
70210   [\\/]* | ?:[\\/]* )  # Absolute name.
70211     ac_srcdir=$srcdir$ac_dir_suffix;
70212     ac_top_srcdir=$srcdir
70213     ac_abs_top_srcdir=$srcdir ;;
70214   *) # Relative name.
70215     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
70216     ac_top_srcdir=$ac_top_build_prefix$srcdir
70217     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
70218 esac
70219 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
70220 
70221 
70222   case $ac_mode in
70223   :F)
70224   #
70225   # CONFIG_FILE
70226   #
70227 
70228 _ACEOF
70229 
70230 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
70231 # If the template does not know about datarootdir, expand it.
70232 # FIXME: This hack should be removed a few years after 2.60.
70233 ac_datarootdir_hack=; ac_datarootdir_seen=
70234 ac_sed_dataroot='
70235 /datarootdir/ {
70236   p
70237   q
70238 }
70239 /@datadir@/p
70240 /@docdir@/p
70241 /@infodir@/p
70242 /@localedir@/p
70243 /@mandir@/p'
70244 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
70245 *datarootdir*) ac_datarootdir_seen=yes;;
70246 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
70247   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
70248 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
70249 _ACEOF
70250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70251   ac_datarootdir_hack='
70252   s&@datadir@&$datadir&g
70253   s&@docdir@&$docdir&g
70254   s&@infodir@&$infodir&g
70255   s&@localedir@&$localedir&g
70256   s&@mandir@&$mandir&g
70257   s&\\\${datarootdir}&$datarootdir&g' ;;
70258 esac
70259 _ACEOF
70260 
70261 # Neutralize VPATH when `$srcdir' = `.'.
70262 # Shell code in configure.ac might set extrasub.
70263 # FIXME: do we really want to maintain this feature?
70264 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
70265 ac_sed_extra="$ac_vpsub
70266 $extrasub
70267 _ACEOF
70268 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
70269 :t
70270 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
70271 s|@configure_input@|$ac_sed_conf_input|;t t
70272 s&@top_builddir@&$ac_top_builddir_sub&;t t
70273 s&@top_build_prefix@&$ac_top_build_prefix&;t t
70274 s&@srcdir@&$ac_srcdir&;t t
70275 s&@abs_srcdir@&$ac_abs_srcdir&;t t
70276 s&@top_srcdir@&$ac_top_srcdir&;t t
70277 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
70278 s&@builddir@&$ac_builddir&;t t
70279 s&@abs_builddir@&$ac_abs_builddir&;t t
70280 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
70281 $ac_datarootdir_hack
70282 "
70283 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
70284   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
70285 
70286 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
70287   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
70288   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
70289       "$ac_tmp/out"`; test -z "$ac_out"; } &&
70290   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
70291 which seems to be undefined.  Please make sure it is defined" >&5
70292 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
70293 which seems to be undefined.  Please make sure it is defined" >&2;}
70294 
70295   rm -f "$ac_tmp/stdin"
70296   case $ac_file in
70297   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
70298   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
70299   esac \
70300   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
70301  ;;
70302 
70303 
70304 
70305   esac
70306 
70307 done # for ac_tag
70308 
70309 
70310 as_fn_exit 0
70311 _ACEOF
70312 ac_clean_files=$ac_clean_files_save
70313 
70314 test $ac_write_fail = 0 ||
70315   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
70316 
70317 
70318 # configure is writing to config.log, and then calls config.status.
70319 # config.status does its own redirection, appending to config.log.
70320 # Unfortunately, on DOS this fails, as config.log is still kept open
70321 # by configure, so config.status won't be able to write to it; its
70322 # output is simply discarded.  So we exec the FD to /dev/null,
70323 # effectively closing config.log, so it can be properly (re)opened and
70324 # appended to by config.status.  When coming back to configure, we
70325 # need to make the FD available again.
70326 if test "$no_create" != yes; then
70327   ac_cs_success=:
70328   ac_config_status_args=
70329   test "$silent" = yes &&
70330     ac_config_status_args="$ac_config_status_args --quiet"
70331   exec 5>/dev/null
70332   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
70333   exec 5>>config.log
70334   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
70335   # would make configure fail if this is the last instruction.
70336   $ac_cs_success || as_fn_exit 1
70337 fi
70338 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
70339   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
70340 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
70341 fi
70342 
70343 
70344 # After AC_OUTPUT, we need to do final work
70345 
70346 
70347   # Try to move config.log (generated by autoconf) to the configure-support directory.
70348   if test -e ./config.log; then
70349     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
70350   fi
70351 
70352   # Rotate our log file (configure.log)
70353   if test -e "$OUTPUTDIR/configure.log.old"; then
70354     $RM -f "$OUTPUTDIR/configure.log.old"
70355   fi
70356   if test -e "$OUTPUTDIR/configure.log"; then
70357     $MV -f "$OUTPUTDIR/configure.log" "$OUTPUTDIR/configure.log.old" 2> /dev/null
70358   fi
70359 
70360   # Move configure.log from current directory to the build output root
70361   if test -e ./configure.log; then
70362     $MV -f ./configure.log "$OUTPUTDIR/configure.log" 2> /dev/null
70363   fi
70364 
70365   # Make the compare script executable
70366   $CHMOD +x $OUTPUTDIR/compare.sh
70367 
70368 
70369 # Finally output some useful information to the user
70370 
70371   # Finally output some useful information to the user
70372 
70373   printf "\n"
70374   printf "====================================================\n"
70375   if test "x$no_create" != "xyes"; then
70376     if test "x$IS_RECONFIGURE" != "xyes"; then
70377       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUTDIR"
70378     else
70379       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUTDIR"
70380     fi
70381   else
70382     if test "x$IS_RECONFIGURE" != "xyes"; then
70383       printf "A configuration has been successfully checked but not created\n"
70384     else
70385       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUTDIR"
70386     fi
70387   fi
70388   if test "x$CONFIGURE_COMMAND_LINE" != x; then
70389     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
70390   else
70391     printf "using default settings.\n"
70392   fi
70393 
70394   printf "\n"
70395   printf "Configuration summary:\n"
70396   printf "* Debug level:    $DEBUG_LEVEL\n"
70397   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
70398   printf "* JDK variant:    $JDK_VARIANT\n"
70399   printf "* JVM variants:   $JVM_VARIANTS\n"
70400   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
70401   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
70402 
70403   printf "\n"
70404   printf "Tools summary:\n"
70405   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
70406     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
70407   fi
70408   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
70409   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
70410   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
70411   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
70412 
70413   printf "\n"
70414   printf "Build performance summary:\n"
70415   printf "* Cores to use:   $JOBS\n"
70416   printf "* Memory limit:   $MEMORY_SIZE MB\n"
70417   if test "x$CCACHE_STATUS" != "x"; then
70418     printf "* ccache status:  $CCACHE_STATUS\n"
70419   fi
70420   printf "\n"
70421 
70422   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
70423     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
70424     printf "will result in longer build times.\n"
70425     printf "\n"
70426   fi
70427 
70428   if test "x$FOUND_ALT_VARIABLES" != "x"; then
70429     printf "WARNING: You have old-style ALT_ environment variables set.\n"
70430     printf "These are not respected, and will be ignored. It is recommended\n"
70431     printf "that you clean your environment. The following variables are set:\n"
70432     printf "$FOUND_ALT_VARIABLES\n"
70433     printf "\n"
70434   fi
70435 
70436   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
70437     printf "WARNING: Your build output directory is not on a local disk.\n"
70438     printf "This will severely degrade build performance!\n"
70439     printf "It is recommended that you create an output directory on a local disk,\n"
70440     printf "and run the configure script again from that directory.\n"
70441     printf "\n"
70442   fi
70443 
70444   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
70445     printf "WARNING: The result of this configuration has overridden an older\n"
70446     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
70447     printf "proper build. Failure to do so might result in strange build problems.\n"
70448     printf "\n"
70449   fi
70450 
70451   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
70452     printf "WARNING: The result of this configuration was not saved.\n"
70453     printf "You should run without '--no-create | -n' to create the configuration.\n"
70454     printf "\n"
70455   fi
70456 
70457   if test "x$UNSUPPORTED_TOOLCHAIN_VERSION" = "xyes"; then
70458     printf "WARNING: The toolchain version used is known to have issues. Please\n"
70459     printf "consider using a supported version unless you know what you are doing.\n"
70460     printf "\n"
70461   fi
70462 
70463 
70464 
70465   # Locate config.log.
70466   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
70467     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
70468   elif test -e "./config.log"; then
70469     CONFIG_LOG_PATH="."
70470   fi
70471 
70472   if test -e "$CONFIG_LOG_PATH/config.log"; then
70473     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
70474     if test $? -eq 0; then
70475       printf "The following warnings were produced. Repeated here for convenience:\n"
70476       # We must quote sed expression (using []) to stop m4 from eating the [].
70477       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
70478       printf "\n"
70479     fi
70480   fi
70481