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_zeroshark
 660 JVM_FEATURES_zero
 661 JVM_FEATURES_minimal
 662 JVM_FEATURES_core
 663 JVM_FEATURES_client
 664 JVM_FEATURES_server
 665 INCLUDE_GRAAL
 666 ELF_LIBS
 667 ELF_CFLAGS
 668 STLPORT_LIB
 669 LIBZIP_CAN_USE_MMAP
 670 LIBDL
 671 LIBM
 672 USE_EXTERNAL_LCMS
 673 LCMS_LIBS
 674 LCMS_CFLAGS
 675 USE_EXTERNAL_LIBZ
 676 USE_EXTERNAL_LIBPNG
 677 PNG_LIBS
 678 PNG_CFLAGS
 679 USE_EXTERNAL_LIBGIF
 680 USE_EXTERNAL_LIBJPEG
 681 LLVM_LIBS
 682 LLVM_LDFLAGS
 683 LLVM_CFLAGS
 684 LLVM_CONFIG
 685 LIBFFI_LIB_FILE
 686 ENABLE_LIBFFI_BUNDLING
 687 LIBFFI_LIBS
 688 LIBFFI_CFLAGS
 689 ALSA_LIBS
 690 ALSA_CFLAGS
 691 FREETYPE_LICENSE
 692 FREETYPE_BUNDLE_LIB_PATH
 693 FREETYPE_LIBS
 694 FREETYPE_CFLAGS
 695 CUPS_CFLAGS
 696 X_EXTRA_LIBS
 697 X_LIBS
 698 X_PRE_LIBS
 699 X_CFLAGS
 700 XMKMF
 701 MSVCP_DLL
 702 MSVCR_DLL
 703 LIBCXX
 704 FIXPATH_DETACH_FLAG
 705 FIXPATH
 706 BUILD_GTEST
 707 ENABLE_AOT
 708 GCOV_ENABLED
 709 ZIP_EXTERNAL_DEBUG_SYMBOLS
 710 COPY_DEBUG_SYMBOLS
 711 COMPILE_WITH_DEBUG_SYMBOLS
 712 CFLAGS_WARNINGS_ARE_ERRORS
 713 BUILD_CC_DISABLE_WARNING_PREFIX
 714 DISABLE_WARNING_PREFIX
 715 WARNINGS_AS_ERRORS
 716 COMPILER_SUPPORTS_TARGET_BITS_FLAG
 717 LDFLAGS_TESTEXE
 718 LDFLAGS_TESTLIB
 719 CXXFLAGS_TESTEXE
 720 CXXFLAGS_TESTLIB
 721 CFLAGS_TESTEXE
 722 CFLAGS_TESTLIB
 723 OPENJDK_BUILD_JVM_LIBS
 724 OPENJDK_BUILD_JVM_ASFLAGS
 725 OPENJDK_BUILD_JVM_LDFLAGS
 726 OPENJDK_BUILD_JVM_CFLAGS
 727 OPENJDK_BUILD_LDFLAGS_HASH_STYLE
 728 OPENJDK_BUILD_LDFLAGS_CXX_JDK
 729 OPENJDK_BUILD_JDKEXE_LIBS
 730 OPENJDK_BUILD_JDKLIB_LIBS
 731 OPENJDK_BUILD_LDFLAGS_JDKEXE
 732 OPENJDK_BUILD_LDFLAGS_JDKLIB
 733 OPENJDK_BUILD_CXXFLAGS_JDKEXE
 734 OPENJDK_BUILD_CXXFLAGS_JDKLIB
 735 OPENJDK_BUILD_CFLAGS_JDKEXE
 736 OPENJDK_BUILD_CFLAGS_JDKLIB
 737 OPENJDK_BUILD_CXXSTD_CXXFLAG
 738 JVM_LIBS
 739 JVM_ASFLAGS
 740 JVM_LDFLAGS
 741 JVM_CFLAGS
 742 LDFLAGS_HASH_STYLE
 743 LDFLAGS_CXX_JDK
 744 JDKEXE_LIBS
 745 JDKLIB_LIBS
 746 LDFLAGS_JDKEXE
 747 LDFLAGS_JDKLIB
 748 CXXFLAGS_JDKEXE
 749 CXXFLAGS_JDKLIB
 750 CFLAGS_JDKEXE
 751 CFLAGS_JDKLIB
 752 MACOSX_VERSION_MIN
 753 CXXSTD_CXXFLAG
 754 JDK_ARCH_ABI_PROP_NAME
 755 CXX_O_FLAG_SIZE
 756 CXX_O_FLAG_NONE
 757 CXX_O_FLAG_DEBUG
 758 CXX_O_FLAG_NORM
 759 CXX_O_FLAG_HI
 760 CXX_O_FLAG_HIGHEST
 761 CXX_O_FLAG_HIGHEST_JVM
 762 C_O_FLAG_SIZE
 763 C_O_FLAG_NONE
 764 C_O_FLAG_DEBUG
 765 C_O_FLAG_NORM
 766 C_O_FLAG_HI
 767 C_O_FLAG_HIGHEST
 768 C_O_FLAG_HIGHEST_JVM
 769 JVM_CFLAGS_SYMBOLS
 770 CXXFLAGS_DEBUG_SYMBOLS
 771 CFLAGS_DEBUG_SYMBOLS
 772 CXX_FLAG_DEPS
 773 C_FLAG_DEPS
 774 SHARED_LIBRARY_FLAGS
 775 SET_SHARED_LIBRARY_MAPFILE
 776 SET_SHARED_LIBRARY_NAME
 777 SET_SHARED_LIBRARY_ORIGIN
 778 SET_EXECUTABLE_ORIGIN
 779 CXX_FLAG_REORDER
 780 C_FLAG_REORDER
 781 JVM_RCFLAGS
 782 RC_FLAGS
 783 AR_OUT_OPTION
 784 LD_OUT_OPTION
 785 EXE_OUT_OPTION
 786 CC_OUT_OPTION
 787 STRIPFLAGS
 788 ARFLAGS
 789 COMPILER_BINDCMD_FILE_FLAG
 790 COMPILER_COMMAND_FILE_FLAG
 791 COMPILER_TARGET_BITS_FLAG
 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 LIPO
 822 ac_ct_AR
 823 AR
 824 AS
 825 LDCXX
 826 LD
 827 CXXCPP
 828 CPP
 829 CXX_VERSION_NUMBER
 830 CC_VERSION_NUMBER
 831 ac_ct_CXX
 832 CXXFLAGS
 833 CXX
 834 TOOLCHAIN_PATH_CXX
 835 POTENTIAL_CXX
 836 OBJEXT
 837 EXEEXT
 838 ac_ct_CC
 839 CPPFLAGS
 840 LDFLAGS
 841 CFLAGS
 842 CC
 843 TOOLCHAIN_PATH_CC
 844 POTENTIAL_CC
 845 TOOLCHAIN_VERSION
 846 VS_LIB
 847 VS_INCLUDE
 848 VS_PATH
 849 CYGWIN_LINK
 850 SYSROOT_LDFLAGS
 851 SYSROOT_CFLAGS
 852 EXTRA_LDFLAGS
 853 EXTRA_CXXFLAGS
 854 EXTRA_CFLAGS
 855 EXE_SUFFIX
 856 OBJ_SUFFIX
 857 STATIC_LIBRARY
 858 SHARED_LIBRARY
 859 STATIC_LIBRARY_SUFFIX
 860 SHARED_LIBRARY_SUFFIX
 861 LIBRARY_PREFIX
 862 TOOLCHAIN_TYPE
 863 STATIC_BUILD
 864 IMPORT_MODULES_MAKE
 865 IMPORT_MODULES_SRC
 866 IMPORT_MODULES_MAN
 867 IMPORT_MODULES_LEGAL
 868 IMPORT_MODULES_CONF
 869 IMPORT_MODULES_LIBS
 870 IMPORT_MODULES_CMDS
 871 IMPORT_MODULES_CLASSES
 872 BUILD_OUTPUT
 873 JDK_TOPDIR
 874 NASHORN_TOPDIR
 875 HOTSPOT_TOPDIR
 876 JAXWS_TOPDIR
 877 JAXP_TOPDIR
 878 CORBA_TOPDIR
 879 LANGTOOLS_TOPDIR
 880 EXTERNAL_BUILDJDK
 881 BUILD_JDK
 882 CREATE_BUILDJDK
 883 JLINK
 884 JMOD
 885 JAVAC_FLAGS
 886 BOOT_JDK_MODULAR
 887 BOOT_JDK_SOURCETARGET
 888 JARSIGNER
 889 JAR
 890 JAVAH
 891 JAVAC
 892 JAVA
 893 BOOT_JDK
 894 JAVA_CHECK
 895 JAVAC_CHECK
 896 VERSION_IS_GA
 897 VERSION_SHORT
 898 VERSION_STRING
 899 VERSION_NUMBER_FOUR_POSITIONS
 900 VERSION_NUMBER
 901 VERSION_OPT
 902 VERSION_BUILD
 903 VERSION_PRE
 904 VERSION_PATCH
 905 VERSION_SECURITY
 906 VERSION_MINOR
 907 VERSION_MAJOR
 908 MACOSX_BUNDLE_ID_BASE
 909 MACOSX_BUNDLE_NAME_BASE
 910 HOTSPOT_VM_DISTRO
 911 COMPANY_NAME
 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 OTOOL
 944 LDD
 945 ZIPEXE
 946 UNZIP
 947 TAR_SUPPORTS_TRANSFORM
 948 TAR_INCLUDE_PARAM
 949 TAR_CREATE_EXTRA_PARAM
 950 TAR_TYPE
 951 FIND_DELETE
 952 OUTPUT_SYNC
 953 OUTPUT_SYNC_SUPPORTED
 954 CHECK_TOOLSDIR_MAKE
 955 CHECK_TOOLSDIR_GMAKE
 956 CHECK_MAKE
 957 CHECK_GMAKE
 958 MAKE
 959 PKGHANDLER
 960 CONFIGURESUPPORT_OUTPUTDIR
 961 OUTPUT_ROOT
 962 CONF_NAME
 963 SPEC
 964 SDKROOT
 965 XCODEBUILD
 966 JVM_VARIANT_MAIN
 967 VALID_JVM_VARIANTS
 968 JVM_VARIANTS
 969 DEBUG_LEVEL
 970 HOTSPOT_DEBUG_LEVEL
 971 JDK_VARIANT
 972 USERNAME
 973 CANONICAL_TOPDIR
 974 ORIGINAL_TOPDIR
 975 TOPDIR
 976 PATH_SEP
 977 HOTSPOT_BUILD_CPU_DEFINE
 978 HOTSPOT_BUILD_CPU_ARCH
 979 HOTSPOT_BUILD_CPU
 980 HOTSPOT_BUILD_OS_TYPE
 981 HOTSPOT_BUILD_OS
 982 OPENJDK_BUILD_BUNDLE_PLATFORM
 983 OPENJDK_BUILD_OS_EXPORT_DIR
 984 OPENJDK_BUILD_CPU_OSARCH
 985 OPENJDK_BUILD_CPU_ISADIR
 986 OPENJDK_BUILD_CPU_LEGACY_LIB
 987 OPENJDK_BUILD_CPU_LEGACY
 988 HOTSPOT_TARGET_CPU_DEFINE
 989 HOTSPOT_TARGET_CPU_ARCH
 990 HOTSPOT_TARGET_CPU
 991 HOTSPOT_TARGET_OS_TYPE
 992 HOTSPOT_TARGET_OS
 993 DEFINE_CROSS_COMPILE_ARCH
 994 OPENJDK_TARGET_BUNDLE_PLATFORM
 995 OPENJDK_TARGET_OS_EXPORT_DIR
 996 OPENJDK_TARGET_CPU_OSARCH
 997 OPENJDK_TARGET_CPU_ISADIR
 998 OPENJDK_TARGET_CPU_LEGACY_LIB
 999 OPENJDK_TARGET_CPU_LEGACY
1000 RELEASE_FILE_OS_ARCH
1001 RELEASE_FILE_OS_NAME
1002 OPENJDK_MODULE_TARGET_PLATFORM
1003 COMPILE_TYPE
1004 OPENJDK_TARGET_CPU_ENDIAN
1005 OPENJDK_TARGET_CPU_BITS
1006 OPENJDK_TARGET_CPU_ARCH
1007 OPENJDK_TARGET_CPU
1008 OPENJDK_TARGET_OS_ENV
1009 OPENJDK_TARGET_OS_TYPE
1010 OPENJDK_TARGET_OS
1011 OPENJDK_BUILD_CPU_ENDIAN
1012 OPENJDK_BUILD_CPU_BITS
1013 OPENJDK_BUILD_CPU_ARCH
1014 OPENJDK_BUILD_CPU
1015 OPENJDK_BUILD_OS_ENV
1016 OPENJDK_BUILD_OS_TYPE
1017 OPENJDK_BUILD_OS
1018 OPENJDK_BUILD_AUTOCONF_NAME
1019 OPENJDK_TARGET_AUTOCONF_NAME
1020 target_os
1021 target_vendor
1022 target_cpu
1023 target
1024 host_os
1025 host_vendor
1026 host_cpu
1027 host
1028 build_os
1029 build_vendor
1030 build_cpu
1031 build
1032 PANDOC
1033 NICE
1034 CPIO
1035 DF
1036 READLINK
1037 CYGPATH
1038 SED
1039 FGREP
1040 EGREP
1041 GREP
1042 AWK
1043 XARGS
1044 WHICH
1045 WC
1046 UNIQ
1047 UNAME
1048 TR
1049 TOUCH
1050 TEE
1051 TAR
1052 TAIL
1053 SORT
1054 SH
1055 RMDIR
1056 RM
1057 PRINTF
1058 NAWK
1059 MV
1060 MKTEMP
1061 MKDIR
1062 LS
1063 LN
1064 GZIP
1065 GUNZIP
1066 HEAD
1067 FIND
1068 FILE
1069 EXPR
1070 ECHO
1071 DIRNAME
1072 DIFF
1073 DATE
1074 CUT
1075 CP
1076 COMM
1077 CMP
1078 CHMOD
1079 CAT
1080 BASH
1081 BASENAME
1082 DATE_WHEN_CONFIGURED
1083 ORIGINAL_PATH
1084 CONFIGURE_COMMAND_LINE
1085 target_alias
1086 host_alias
1087 build_alias
1088 LIBS
1089 ECHO_T
1090 ECHO_N
1091 ECHO_C
1092 DEFS
1093 mandir
1094 localedir
1095 libdir
1096 psdir
1097 pdfdir
1098 dvidir
1099 htmldir
1100 infodir
1101 docdir
1102 oldincludedir
1103 includedir
1104 localstatedir
1105 sharedstatedir
1106 sysconfdir
1107 datadir
1108 datarootdir
1109 libexecdir
1110 sbindir
1111 bindir
1112 program_transform_name
1113 prefix
1114 exec_prefix
1115 PACKAGE_URL
1116 PACKAGE_BUGREPORT
1117 PACKAGE_STRING
1118 PACKAGE_VERSION
1119 PACKAGE_TARNAME
1120 PACKAGE_NAME
1121 PATH_SEPARATOR
1122 SHELL'
1123 ac_subst_files=''
1124 ac_user_opts='
1125 enable_option_checking
1126 with_target_bits
1127 enable_openjdk_only
1128 with_custom_make_dir
1129 with_jdk_variant
1130 enable_debug
1131 with_debug_level
1132 with_jvm_variants
1133 with_cpu_port
1134 with_devkit
1135 with_sys_root
1136 with_sysroot
1137 with_tools_dir
1138 with_toolchain_path
1139 with_extra_path
1140 with_sdk_name
1141 with_conf_name
1142 with_output_sync
1143 with_default_make_target
1144 enable_headless_only
1145 enable_full_docs
1146 with_cacerts_file
1147 enable_unlimited_crypto
1148 with_copyright_year
1149 enable_keep_packaged_modules
1150 with_milestone
1151 with_update_version
1152 with_user_release_suffix
1153 with_build_number
1154 with_version_string
1155 with_version_pre
1156 with_version_opt
1157 with_version_build
1158 with_version_major
1159 with_version_minor
1160 with_version_security
1161 with_version_patch
1162 with_boot_jdk
1163 with_build_jdk
1164 with_add_source_root
1165 with_override_source_root
1166 with_adds_and_overrides
1167 with_override_langtools
1168 with_override_corba
1169 with_override_jaxp
1170 with_override_jaxws
1171 with_override_hotspot
1172 with_override_nashorn
1173 with_override_jdk
1174 with_import_hotspot
1175 with_import_modules
1176 enable_static_build
1177 with_toolchain_type
1178 with_extra_cflags
1179 with_extra_cxxflags
1180 with_extra_ldflags
1181 with_toolchain_version
1182 with_build_devkit
1183 with_jtreg
1184 with_abi_profile
1185 enable_warnings_as_errors
1186 with_native_debug_symbols
1187 enable_debug_symbols
1188 enable_zip_debug_info
1189 enable_native_coverage
1190 enable_dtrace
1191 enable_aot
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_freetype
1200 with_freetype_include
1201 with_freetype_lib
1202 with_freetype_src
1203 enable_freetype_bundling
1204 with_freetype_license
1205 with_alsa
1206 with_alsa_include
1207 with_alsa_lib
1208 with_libffi
1209 with_libffi_include
1210 with_libffi_lib
1211 enable_libffi_bundling
1212 with_libjpeg
1213 with_giflib
1214 with_libpng
1215 with_zlib
1216 with_lcms
1217 with_dxsdk
1218 with_dxsdk_lib
1219 with_dxsdk_include
1220 with_libelf
1221 with_libelf_include
1222 with_libelf_lib
1223 with_jvm_features
1224 with_jvm_interpreter
1225 enable_jtreg_failure_handler
1226 enable_generate_classlist
1227 with_num_cores
1228 with_memory_size
1229 with_jobs
1230 with_test_jobs
1231 with_boot_jdk_jvmargs
1232 with_sjavac_server_java
1233 enable_sjavac
1234 enable_javac_server
1235 enable_icecc
1236 enable_precompiled_headers
1237 enable_ccache
1238 with_ccache_dir
1239 '
1240       ac_precious_vars='build_alias
1241 host_alias
1242 target_alias
1243 BASENAME
1244 BASH
1245 CAT
1246 CHMOD
1247 CMP
1248 COMM
1249 CP
1250 CUT
1251 DATE
1252 DIFF
1253 DIRNAME
1254 ECHO
1255 EXPR
1256 FILE
1257 FIND
1258 HEAD
1259 GUNZIP
1260 GZIP
1261 LN
1262 LS
1263 MKDIR
1264 MKTEMP
1265 MV
1266 NAWK
1267 PRINTF
1268 RM
1269 RMDIR
1270 SH
1271 SORT
1272 TAIL
1273 TAR
1274 TEE
1275 TOUCH
1276 TR
1277 UNAME
1278 UNIQ
1279 WC
1280 WHICH
1281 XARGS
1282 AWK
1283 GREP
1284 EGREP
1285 FGREP
1286 SED
1287 CYGPATH
1288 READLINK
1289 DF
1290 CPIO
1291 NICE
1292 PANDOC
1293 MAKE
1294 UNZIP
1295 ZIPEXE
1296 LDD
1297 OTOOL
1298 READELF
1299 DOT
1300 HG
1301 STAT
1302 TIME
1303 FLOCK
1304 DTRACE
1305 PATCH
1306 DSYMUTIL
1307 XATTR
1308 CODESIGN
1309 SETFILE
1310 PKG_CONFIG
1311 JAVA
1312 JAVAC
1313 JAVAH
1314 JAR
1315 JARSIGNER
1316 CC
1317 CFLAGS
1318 LDFLAGS
1319 LIBS
1320 CPPFLAGS
1321 CXX
1322 CXXFLAGS
1323 CCC
1324 CPP
1325 CXXCPP
1326 AS
1327 AR
1328 LIPO
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 ELF_CFLAGS
1353 ELF_LIBS
1354 ICECC_CMD
1355 ICECC_CREATE_ENV
1356 ICECC_WRAPPER
1357 CCACHE'
1358 
1359 
1360 # Initialize some variables set by options.
1361 ac_init_help=
1362 ac_init_version=false
1363 ac_unrecognized_opts=
1364 ac_unrecognized_sep=
1365 # The variables have the same names as the options, with
1366 # dashes changed to underlines.
1367 cache_file=/dev/null
1368 exec_prefix=NONE
1369 no_create=
1370 no_recursion=
1371 prefix=NONE
1372 program_prefix=NONE
1373 program_suffix=NONE
1374 program_transform_name=s,x,x,
1375 silent=
1376 site=
1377 srcdir=
1378 verbose=
1379 x_includes=NONE
1380 x_libraries=NONE
1381 
1382 # Installation directory options.
1383 # These are left unexpanded so users can "make install exec_prefix=/foo"
1384 # and all the variables that are supposed to be based on exec_prefix
1385 # by default will actually change.
1386 # Use braces instead of parens because sh, perl, etc. also accept them.
1387 # (The list follows the same order as the GNU Coding Standards.)
1388 bindir='${exec_prefix}/bin'
1389 sbindir='${exec_prefix}/sbin'
1390 libexecdir='${exec_prefix}/libexec'
1391 datarootdir='${prefix}/share'
1392 datadir='${datarootdir}'
1393 sysconfdir='${prefix}/etc'
1394 sharedstatedir='${prefix}/com'
1395 localstatedir='${prefix}/var'
1396 includedir='${prefix}/include'
1397 oldincludedir='/usr/include'
1398 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1399 infodir='${datarootdir}/info'
1400 htmldir='${docdir}'
1401 dvidir='${docdir}'
1402 pdfdir='${docdir}'
1403 psdir='${docdir}'
1404 libdir='${exec_prefix}/lib'
1405 localedir='${datarootdir}/locale'
1406 mandir='${datarootdir}/man'
1407 
1408 ac_prev=
1409 ac_dashdash=
1410 for ac_option
1411 do
1412   # If the previous option needs an argument, assign it.
1413   if test -n "$ac_prev"; then
1414     eval $ac_prev=\$ac_option
1415     ac_prev=
1416     continue
1417   fi
1418 
1419   case $ac_option in
1420   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1421   *=)   ac_optarg= ;;
1422   *)    ac_optarg=yes ;;
1423   esac
1424 
1425   # Accept the important Cygnus configure options, so we can diagnose typos.
1426 
1427   case $ac_dashdash$ac_option in
1428   --)
1429     ac_dashdash=yes ;;
1430 
1431   -bindir | --bindir | --bindi | --bind | --bin | --bi)
1432     ac_prev=bindir ;;
1433   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1434     bindir=$ac_optarg ;;
1435 
1436   -build | --build | --buil | --bui | --bu)
1437     ac_prev=build_alias ;;
1438   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1439     build_alias=$ac_optarg ;;
1440 
1441   -cache-file | --cache-file | --cache-fil | --cache-fi \
1442   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1443     ac_prev=cache_file ;;
1444   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1445   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1446     cache_file=$ac_optarg ;;
1447 
1448   --config-cache | -C)
1449     cache_file=config.cache ;;
1450 
1451   -datadir | --datadir | --datadi | --datad)
1452     ac_prev=datadir ;;
1453   -datadir=* | --datadir=* | --datadi=* | --datad=*)
1454     datadir=$ac_optarg ;;
1455 
1456   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1457   | --dataroo | --dataro | --datar)
1458     ac_prev=datarootdir ;;
1459   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1460   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1461     datarootdir=$ac_optarg ;;
1462 
1463   -disable-* | --disable-*)
1464     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1465     # Reject names that are not valid shell variable names.
1466     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1467       as_fn_error $? "invalid feature name: $ac_useropt"
1468     ac_useropt_orig=$ac_useropt
1469     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1470     case $ac_user_opts in
1471       *"
1472 "enable_$ac_useropt"
1473 "*) ;;
1474       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1475          ac_unrecognized_sep=', ';;
1476     esac
1477     eval enable_$ac_useropt=no ;;
1478 
1479   -docdir | --docdir | --docdi | --doc | --do)
1480     ac_prev=docdir ;;
1481   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1482     docdir=$ac_optarg ;;
1483 
1484   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1485     ac_prev=dvidir ;;
1486   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1487     dvidir=$ac_optarg ;;
1488 
1489   -enable-* | --enable-*)
1490     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1491     # Reject names that are not valid shell variable names.
1492     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1493       as_fn_error $? "invalid feature name: $ac_useropt"
1494     ac_useropt_orig=$ac_useropt
1495     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1496     case $ac_user_opts in
1497       *"
1498 "enable_$ac_useropt"
1499 "*) ;;
1500       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1501          ac_unrecognized_sep=', ';;
1502     esac
1503     eval enable_$ac_useropt=\$ac_optarg ;;
1504 
1505   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1506   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1507   | --exec | --exe | --ex)
1508     ac_prev=exec_prefix ;;
1509   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1510   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1511   | --exec=* | --exe=* | --ex=*)
1512     exec_prefix=$ac_optarg ;;
1513 
1514   -gas | --gas | --ga | --g)
1515     # Obsolete; use --with-gas.
1516     with_gas=yes ;;
1517 
1518   -help | --help | --hel | --he | -h)
1519     ac_init_help=long ;;
1520   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1521     ac_init_help=recursive ;;
1522   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1523     ac_init_help=short ;;
1524 
1525   -host | --host | --hos | --ho)
1526     ac_prev=host_alias ;;
1527   -host=* | --host=* | --hos=* | --ho=*)
1528     host_alias=$ac_optarg ;;
1529 
1530   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1531     ac_prev=htmldir ;;
1532   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1533   | --ht=*)
1534     htmldir=$ac_optarg ;;
1535 
1536   -includedir | --includedir | --includedi | --included | --include \
1537   | --includ | --inclu | --incl | --inc)
1538     ac_prev=includedir ;;
1539   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1540   | --includ=* | --inclu=* | --incl=* | --inc=*)
1541     includedir=$ac_optarg ;;
1542 
1543   -infodir | --infodir | --infodi | --infod | --info | --inf)
1544     ac_prev=infodir ;;
1545   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1546     infodir=$ac_optarg ;;
1547 
1548   -libdir | --libdir | --libdi | --libd)
1549     ac_prev=libdir ;;
1550   -libdir=* | --libdir=* | --libdi=* | --libd=*)
1551     libdir=$ac_optarg ;;
1552 
1553   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1554   | --libexe | --libex | --libe)
1555     ac_prev=libexecdir ;;
1556   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1557   | --libexe=* | --libex=* | --libe=*)
1558     libexecdir=$ac_optarg ;;
1559 
1560   -localedir | --localedir | --localedi | --localed | --locale)
1561     ac_prev=localedir ;;
1562   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1563     localedir=$ac_optarg ;;
1564 
1565   -localstatedir | --localstatedir | --localstatedi | --localstated \
1566   | --localstate | --localstat | --localsta | --localst | --locals)
1567     ac_prev=localstatedir ;;
1568   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1569   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1570     localstatedir=$ac_optarg ;;
1571 
1572   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1573     ac_prev=mandir ;;
1574   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1575     mandir=$ac_optarg ;;
1576 
1577   -nfp | --nfp | --nf)
1578     # Obsolete; use --without-fp.
1579     with_fp=no ;;
1580 
1581   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1582   | --no-cr | --no-c | -n)
1583     no_create=yes ;;
1584 
1585   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1586   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1587     no_recursion=yes ;;
1588 
1589   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1590   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1591   | --oldin | --oldi | --old | --ol | --o)
1592     ac_prev=oldincludedir ;;
1593   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1594   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1595   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1596     oldincludedir=$ac_optarg ;;
1597 
1598   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1599     ac_prev=prefix ;;
1600   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1601     prefix=$ac_optarg ;;
1602 
1603   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1604   | --program-pre | --program-pr | --program-p)
1605     ac_prev=program_prefix ;;
1606   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1607   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1608     program_prefix=$ac_optarg ;;
1609 
1610   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1611   | --program-suf | --program-su | --program-s)
1612     ac_prev=program_suffix ;;
1613   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1614   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1615     program_suffix=$ac_optarg ;;
1616 
1617   -program-transform-name | --program-transform-name \
1618   | --program-transform-nam | --program-transform-na \
1619   | --program-transform-n | --program-transform- \
1620   | --program-transform | --program-transfor \
1621   | --program-transfo | --program-transf \
1622   | --program-trans | --program-tran \
1623   | --progr-tra | --program-tr | --program-t)
1624     ac_prev=program_transform_name ;;
1625   -program-transform-name=* | --program-transform-name=* \
1626   | --program-transform-nam=* | --program-transform-na=* \
1627   | --program-transform-n=* | --program-transform-=* \
1628   | --program-transform=* | --program-transfor=* \
1629   | --program-transfo=* | --program-transf=* \
1630   | --program-trans=* | --program-tran=* \
1631   | --progr-tra=* | --program-tr=* | --program-t=*)
1632     program_transform_name=$ac_optarg ;;
1633 
1634   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1635     ac_prev=pdfdir ;;
1636   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1637     pdfdir=$ac_optarg ;;
1638 
1639   -psdir | --psdir | --psdi | --psd | --ps)
1640     ac_prev=psdir ;;
1641   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1642     psdir=$ac_optarg ;;
1643 
1644   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1645   | -silent | --silent | --silen | --sile | --sil)
1646     silent=yes ;;
1647 
1648   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1649     ac_prev=sbindir ;;
1650   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1651   | --sbi=* | --sb=*)
1652     sbindir=$ac_optarg ;;
1653 
1654   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1655   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1656   | --sharedst | --shareds | --shared | --share | --shar \
1657   | --sha | --sh)
1658     ac_prev=sharedstatedir ;;
1659   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1660   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1661   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1662   | --sha=* | --sh=*)
1663     sharedstatedir=$ac_optarg ;;
1664 
1665   -site | --site | --sit)
1666     ac_prev=site ;;
1667   -site=* | --site=* | --sit=*)
1668     site=$ac_optarg ;;
1669 
1670   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1671     ac_prev=srcdir ;;
1672   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1673     srcdir=$ac_optarg ;;
1674 
1675   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1676   | --syscon | --sysco | --sysc | --sys | --sy)
1677     ac_prev=sysconfdir ;;
1678   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1679   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1680     sysconfdir=$ac_optarg ;;
1681 
1682   -target | --target | --targe | --targ | --tar | --ta | --t)
1683     ac_prev=target_alias ;;
1684   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1685     target_alias=$ac_optarg ;;
1686 
1687   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1688     verbose=yes ;;
1689 
1690   -version | --version | --versio | --versi | --vers | -V)
1691     ac_init_version=: ;;
1692 
1693   -with-* | --with-*)
1694     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1695     # Reject names that are not valid shell variable names.
1696     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1697       as_fn_error $? "invalid package name: $ac_useropt"
1698     ac_useropt_orig=$ac_useropt
1699     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1700     case $ac_user_opts in
1701       *"
1702 "with_$ac_useropt"
1703 "*) ;;
1704       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1705          ac_unrecognized_sep=', ';;
1706     esac
1707     eval with_$ac_useropt=\$ac_optarg ;;
1708 
1709   -without-* | --without-*)
1710     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1711     # Reject names that are not valid shell variable names.
1712     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1713       as_fn_error $? "invalid package name: $ac_useropt"
1714     ac_useropt_orig=$ac_useropt
1715     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1716     case $ac_user_opts in
1717       *"
1718 "with_$ac_useropt"
1719 "*) ;;
1720       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1721          ac_unrecognized_sep=', ';;
1722     esac
1723     eval with_$ac_useropt=no ;;
1724 
1725   --x)
1726     # Obsolete; use --with-x.
1727     with_x=yes ;;
1728 
1729   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1730   | --x-incl | --x-inc | --x-in | --x-i)
1731     ac_prev=x_includes ;;
1732   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1733   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1734     x_includes=$ac_optarg ;;
1735 
1736   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1737   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1738     ac_prev=x_libraries ;;
1739   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1740   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1741     x_libraries=$ac_optarg ;;
1742 
1743   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1744 Try \`$0 --help' for more information"
1745     ;;
1746 
1747   *=*)
1748     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1749     # Reject names that are not valid shell variable names.
1750     case $ac_envvar in #(
1751       '' | [0-9]* | *[!_$as_cr_alnum]* )
1752       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1753     esac
1754     eval $ac_envvar=\$ac_optarg
1755     export $ac_envvar ;;
1756 
1757   *)
1758     # FIXME: should be removed in autoconf 3.0.
1759     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1760     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1761       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1762     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1763     ;;
1764 
1765   esac
1766 done
1767 
1768 if test -n "$ac_prev"; then
1769   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1770   as_fn_error $? "missing argument to $ac_option"
1771 fi
1772 
1773 if test -n "$ac_unrecognized_opts"; then
1774   case $enable_option_checking in
1775     no) ;;
1776     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1777     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1778   esac
1779 fi
1780 
1781 # Check all directory arguments for consistency.
1782 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1783                 datadir sysconfdir sharedstatedir localstatedir includedir \
1784                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1785                 libdir localedir mandir
1786 do
1787   eval ac_val=\$$ac_var
1788   # Remove trailing slashes.
1789   case $ac_val in
1790     */ )
1791       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1792       eval $ac_var=\$ac_val;;
1793   esac
1794   # Be sure to have absolute directory names.
1795   case $ac_val in
1796     [\\/$]* | ?:[\\/]* )  continue;;
1797     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1798   esac
1799   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1800 done
1801 
1802 # There might be people who depend on the old broken behavior: `$host'
1803 # used to hold the argument of --host etc.
1804 # FIXME: To remove some day.
1805 build=$build_alias
1806 host=$host_alias
1807 target=$target_alias
1808 
1809 # FIXME: To remove some day.
1810 if test "x$host_alias" != x; then
1811   if test "x$build_alias" = x; then
1812     cross_compiling=maybe
1813   elif test "x$build_alias" != "x$host_alias"; then
1814     cross_compiling=yes
1815   fi
1816 fi
1817 
1818 ac_tool_prefix=
1819 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1820 
1821 test "$silent" = yes && exec 6>/dev/null
1822 
1823 
1824 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1825 ac_ls_di=`ls -di .` &&
1826 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1827   as_fn_error $? "working directory cannot be determined"
1828 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1829   as_fn_error $? "pwd does not report name of working directory"
1830 
1831 
1832 # Find the source files, if location was not specified.
1833 if test -z "$srcdir"; then
1834   ac_srcdir_defaulted=yes
1835   # Try the directory containing this script, then the parent directory.
1836   ac_confdir=`$as_dirname -- "$as_myself" ||
1837 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1838          X"$as_myself" : 'X\(//\)[^/]' \| \
1839          X"$as_myself" : 'X\(//\)$' \| \
1840          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1841 $as_echo X"$as_myself" |
1842     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1843             s//\1/
1844             q
1845           }
1846           /^X\(\/\/\)[^/].*/{
1847             s//\1/
1848             q
1849           }
1850           /^X\(\/\/\)$/{
1851             s//\1/
1852             q
1853           }
1854           /^X\(\/\).*/{
1855             s//\1/
1856             q
1857           }
1858           s/.*/./; q'`
1859   srcdir=$ac_confdir
1860   if test ! -r "$srcdir/$ac_unique_file"; then
1861     srcdir=..
1862   fi
1863 else
1864   ac_srcdir_defaulted=no
1865 fi
1866 if test ! -r "$srcdir/$ac_unique_file"; then
1867   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1868   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1869 fi
1870 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1871 ac_abs_confdir=`(
1872         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1873         pwd)`
1874 # When building in place, set srcdir=.
1875 if test "$ac_abs_confdir" = "$ac_pwd"; then
1876   srcdir=.
1877 fi
1878 # Remove unnecessary trailing slashes from srcdir.
1879 # Double slashes in file names in object file debugging info
1880 # mess up M-x gdb in Emacs.
1881 case $srcdir in
1882 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1883 esac
1884 for ac_var in $ac_precious_vars; do
1885   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1886   eval ac_env_${ac_var}_value=\$${ac_var}
1887   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1888   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1889 done
1890 
1891 #
1892 # Report the --help message.
1893 #
1894 if test "$ac_init_help" = "long"; then
1895   # Omit some internal or obsolete options to make the list less imposing.
1896   # This message is too long to be a string in the A/UX 3.1 sh.
1897   cat <<_ACEOF
1898 \`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1899 
1900 Usage: $0 [OPTION]... [VAR=VALUE]...
1901 
1902 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1903 VAR=VALUE.  See below for descriptions of some of the useful variables.
1904 
1905 Defaults for the options are specified in brackets.
1906 
1907 Configuration:
1908   -h, --help              display this help and exit
1909       --help=short        display options specific to this package
1910       --help=recursive    display the short help of all the included packages
1911   -V, --version           display version information and exit
1912   -q, --quiet, --silent   do not print \`checking ...' messages
1913       --cache-file=FILE   cache test results in FILE [disabled]
1914   -C, --config-cache      alias for \`--cache-file=config.cache'
1915   -n, --no-create         do not create output files
1916       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1917 
1918 Installation directories:
1919   --prefix=PREFIX         install architecture-independent files in PREFIX
1920                           [$ac_default_prefix]
1921   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1922                           [PREFIX]
1923 
1924 By default, \`make install' will install all the files in
1925 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1926 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1927 for instance \`--prefix=\$HOME'.
1928 
1929 For better control, use the options below.
1930 
1931 Fine tuning of the installation directories:
1932   --bindir=DIR            user executables [EPREFIX/bin]
1933   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1934   --libexecdir=DIR        program executables [EPREFIX/libexec]
1935   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1936   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1937   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1938   --libdir=DIR            object code libraries [EPREFIX/lib]
1939   --includedir=DIR        C header files [PREFIX/include]
1940   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1941   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1942   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1943   --infodir=DIR           info documentation [DATAROOTDIR/info]
1944   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1945   --mandir=DIR            man documentation [DATAROOTDIR/man]
1946   --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1947   --htmldir=DIR           html documentation [DOCDIR]
1948   --dvidir=DIR            dvi documentation [DOCDIR]
1949   --pdfdir=DIR            pdf documentation [DOCDIR]
1950   --psdir=DIR             ps documentation [DOCDIR]
1951 _ACEOF
1952 
1953   cat <<\_ACEOF
1954 
1955 X features:
1956   --x-includes=DIR    X include files are in DIR
1957   --x-libraries=DIR   X library files are in DIR
1958 
1959 System types:
1960   --build=BUILD     configure for building on BUILD [guessed]
1961   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1962   --target=TARGET   configure for building compilers for TARGET [HOST]
1963 _ACEOF
1964 fi
1965 
1966 if test -n "$ac_init_help"; then
1967   case $ac_init_help in
1968      short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1969    esac
1970   cat <<\_ACEOF
1971 
1972 Optional Features:
1973   --disable-option-checking  ignore unrecognized --enable/--with options
1974   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1975   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1976   --enable-openjdk-only   suppress building custom source even if present
1977                           [disabled]
1978   --enable-debug          set the debug level to fastdebug (shorthand for
1979                           --with-debug-level=fastdebug) [disabled]
1980   --enable-headless-only  only build headless (no GUI) support [disabled]
1981   --enable-full-docs      build complete documentation [enabled if all tools
1982                           found]
1983   --disable-unlimited-crypto
1984                           Disable unlimited crypto policy [enabled]
1985   --disable-keep-packaged-modules
1986                           Do not keep packaged modules in jdk image [enable]
1987   --enable-static-build   enable static library build [disabled]
1988   --disable-warnings-as-errors
1989                           do not consider native warnings to be an error
1990                           [enabled]
1991   --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                           compatibility and is ignored
1993   --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                           compatibility and is ignored
1995   --enable-native-coverage
1996                           enable native compilation with code coverage
1997                           data[disabled]
1998   --enable-dtrace[=yes/no/auto]
1999                           enable dtrace. Default is auto, where dtrace is
2000                           enabled if all dependencies are present.
2001   --enable-aot[=yes/no/auto]
2002                           enable ahead of time compilation feature. Default is
2003                           auto, where aot is enabled if all dependencies are
2004                           present.
2005   --disable-hotspot-gtest Disables building of the Hotspot unit tests
2006   --disable-freetype-bundling
2007                           disable bundling of the freetype library with the
2008                           build result [enabled on Windows or when using
2009                           --with-freetype, disabled otherwise]
2010   --enable-libffi-bundling
2011                           enable bundling of libffi.so to make the built JDK
2012                           runnable on more systems
2013   --enable-jtreg-failure-handler
2014                           forces build of the jtreg failure handler to be
2015                           enabled, missing dependencies become fatal errors.
2016                           Default is auto, where the failure handler is built
2017                           if all dependencies are present and otherwise just
2018                           disabled.
2019   --disable-generate-classlist
2020                           forces enabling or disabling of the generation of a
2021                           CDS classlist at build time. Default is to generate
2022                           it when either the server or client JVMs are built.
2023   --enable-sjavac         use sjavac to do fast incremental compiles
2024                           [disabled]
2025   --disable-javac-server  disable javac server [enabled]
2026   --enable-icecc          enable distribted compilation of native code using
2027                           icecc/icecream [disabled]
2028   --disable-precompiled-headers
2029                           disable using precompiled headers when compiling C++
2030                           [enabled]
2031   --enable-ccache         enable using ccache to speed up recompilations
2032                           [disabled]
2033 
2034 Optional Packages:
2035   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2036   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2037   --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2038                           support it), e.g. --with-target-bits=32 [guessed]
2039   --with-custom-make-dir  Deprecated. Option is kept for backwards
2040                           compatibility and is ignored
2041   --with-jdk-variant      JDK variant to build (normal) [normal]
2042   --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2043                           optimized) [release]
2044   --with-jvm-variants     JVM variants (separated by commas) to build
2045                           (server,client,minimal,core,zero,zeroshark,custom)
2046                           [server]
2047   --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2048                           (arm64,aarch64) [aarch64]
2049   --with-devkit           use this devkit for compilers, tools and resources
2050   --with-sys-root         alias for --with-sysroot for backwards compatability
2051   --with-sysroot          use this directory as sysroot
2052   --with-tools-dir        alias for --with-toolchain-path for backwards
2053                           compatibility
2054   --with-toolchain-path   prepend these directories when searching for
2055                           toolchain binaries (compilers etc)
2056   --with-extra-path       prepend these directories to the default path
2057   --with-sdk-name         use the platform SDK of the given name. [macosx]
2058   --with-conf-name        use this as the name of the configuration [generated
2059                           from important configuration options]
2060   --with-output-sync      set make output sync type if supported by make.
2061                           [recurse]
2062   --with-default-make-target
2063                           set the default make target [exploded-image]
2064   --with-cacerts-file     specify alternative cacerts file
2065   --with-copyright-year   Set copyright year value for build [current year]
2066   --with-milestone        Deprecated. Option is kept for backwards
2067                           compatibility and is ignored
2068   --with-update-version   Deprecated. Option is kept for backwards
2069                           compatibility and is ignored
2070   --with-user-release-suffix
2071                           Deprecated. Option is kept for backwards
2072                           compatibility and is ignored
2073   --with-build-number     Deprecated. Option is kept for backwards
2074                           compatibility and is ignored
2075   --with-version-string   Set version string [calculated]
2076   --with-version-pre      Set the base part of the version 'PRE' field
2077                           (pre-release identifier) ['internal']
2078   --with-version-opt      Set version 'OPT' field (build metadata)
2079                           [<timestamp>.<user>.<dirname>]
2080   --with-version-build    Set version 'BUILD' field (build number) [not
2081                           specified]
2082   --with-version-major    Set version 'MAJOR' field (first number) [current
2083                           source value]
2084   --with-version-minor    Set version 'MINOR' field (second number) [current
2085                           source value]
2086   --with-version-security Set version 'SECURITY' field (third number) [current
2087                           source value]
2088   --with-version-patch    Set version 'PATCH' field (fourth number) [not
2089                           specified]
2090   --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2091   --with-build-jdk        path to JDK of same version as is being built[the
2092                           newly built JDK]
2093   --with-add-source-root  Deprecated. Option is kept for backwards
2094                           compatibility and is ignored
2095   --with-override-source-root
2096                           Deprecated. Option is kept for backwards
2097                           compatibility and is ignored
2098   --with-adds-and-overrides
2099                           Deprecated. Option is kept for backwards
2100                           compatibility and is ignored
2101   --with-override-langtools
2102                           Deprecated. Option is kept for backwards
2103                           compatibility and is ignored
2104   --with-override-corba   Deprecated. Option is kept for backwards
2105                           compatibility and is ignored
2106   --with-override-jaxp    Deprecated. Option is kept for backwards
2107                           compatibility and is ignored
2108   --with-override-jaxws   Deprecated. Option is kept for backwards
2109                           compatibility and is ignored
2110   --with-override-hotspot Deprecated. Option is kept for backwards
2111                           compatibility and is ignored
2112   --with-override-nashorn Deprecated. Option is kept for backwards
2113                           compatibility and is ignored
2114   --with-override-jdk     Deprecated. Option is kept for backwards
2115                           compatibility and is ignored
2116   --with-import_hotspot   Deprecated. Option is kept for backwards
2117                           compatibility and is ignored
2118   --with-import-modules   import a set of prebuilt modules either as a zip
2119                           file or an exploded directory
2120   --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2121                           to show possible values [platform dependent]
2122   --with-extra-cflags     extra flags to be used when compiling jdk c-files
2123   --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2124   --with-extra-ldflags    extra flags to be used when linking jdk
2125   --with-toolchain-version
2126                           the version of the toolchain to look for, use
2127                           '--help' to show possible values [platform
2128                           dependent]
2129   --with-build-devkit     Devkit to use for the build platform toolchain
2130   --with-jtreg            Regression Test Harness [probed]
2131   --with-abi-profile      specify ABI profile for ARM builds
2132                           (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2133                           armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2134                           [toolchain dependent]
2135   --with-native-debug-symbols
2136                           set the native debug symbol configuration (none,
2137                           internal, external, zipped) [varying]
2138   --with-stdc++lib=<static>,<dynamic>,<default>
2139                           force linking of the C++ runtime on Linux to either
2140                           static or dynamic, default is static with dynamic as
2141                           fallback
2142   --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2143                           (Windows only) [probed]
2144   --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2145                           (Windows only) [probed]
2146   --with-x                use the X Window System
2147   --with-cups             specify prefix directory for the cups package
2148                           (expecting the headers under PATH/include)
2149   --with-cups-include     specify directory for the cups include files
2150   --with-freetype         specify prefix directory for the freetype package
2151                           (expecting the libraries under PATH/lib and the
2152                           headers under PATH/include)
2153   --with-freetype-include specify directory for the freetype include files
2154   --with-freetype-lib     specify directory for the freetype library
2155   --with-freetype-src     specify directory with freetype sources to
2156                           automatically build the library (experimental,
2157                           Windows-only)
2158   --with-freetype-license if bundling freetype, also bundle this license file
2159   --with-alsa             specify prefix directory for the alsa package
2160                           (expecting the libraries under PATH/lib and the
2161                           headers under PATH/include)
2162   --with-alsa-include     specify directory for the alsa include files
2163   --with-alsa-lib         specify directory for the alsa library
2164   --with-libffi           specify prefix directory for the libffi package
2165                           (expecting the libraries under PATH/lib and the
2166                           headers under PATH/include)
2167   --with-libffi-include   specify directory for the libffi include files
2168   --with-libffi-lib       specify directory for the libffi library
2169   --with-libjpeg          use libjpeg from build system or OpenJDK source
2170                           (system, bundled) [bundled]
2171   --with-giflib           use giflib from build system or OpenJDK source
2172                           (system, bundled) [bundled]
2173   --with-libpng           use libpng from build system or OpenJDK source
2174                           (system, bundled) [bundled]
2175   --with-zlib             use zlib from build system or OpenJDK source
2176                           (system, bundled) [bundled]
2177   --with-lcms             use lcms2 from build system or OpenJDK source
2178                           (system, bundled) [bundled]
2179   --with-dxsdk            Deprecated. Option is kept for backwards
2180                           compatibility and is ignored
2181   --with-dxsdk-lib        Deprecated. Option is kept for backwards
2182                           compatibility and is ignored
2183   --with-dxsdk-include    Deprecated. Option is kept for backwards
2184                           compatibility and is ignored
2185   --with-libelf           specify prefix directory for the libelf package
2186                           (expecting the libraries under PATH/lib and the
2187                           headers under PATH/include)
2188   --with-libelf-include   specify directory for the libelf include files
2189   --with-libelf-lib       specify directory for the libelf library
2190   --with-jvm-features     additional JVM features to enable (separated by
2191                           comma), use '--help' to show possible values [none]
2192   --with-jvm-interpreter  Deprecated. Option is kept for backwards
2193                           compatibility and is ignored
2194   --with-num-cores        number of cores in the build system, e.g.
2195                           --with-num-cores=8 [probed]
2196   --with-memory-size      memory (in MB) available in the build system, e.g.
2197                           --with-memory-size=1024 [probed]
2198   --with-jobs             number of parallel jobs to let make run [calculated
2199                           based on cores and memory]
2200   --with-test-jobs        number of parallel tests jobs to run [based on build
2201                           jobs]
2202   --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2203                           invocations of boot JDK, overriding the default
2204                           values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2205                           -enableassertions"
2206   --with-sjavac-server-java
2207                           use this java binary for running the sjavac
2208                           background server [Boot JDK java]
2209   --with-ccache-dir       where to store ccache files [~/.ccache]
2210 
2211 Some influential environment variables:
2212   BASENAME    Override default value for BASENAME
2213   BASH        Override default value for BASH
2214   CAT         Override default value for CAT
2215   CHMOD       Override default value for CHMOD
2216   CMP         Override default value for CMP
2217   COMM        Override default value for COMM
2218   CP          Override default value for CP
2219   CUT         Override default value for CUT
2220   DATE        Override default value for DATE
2221   DIFF        Override default value for DIFF
2222   DIRNAME     Override default value for DIRNAME
2223   ECHO        Override default value for ECHO
2224   EXPR        Override default value for EXPR
2225   FILE        Override default value for FILE
2226   FIND        Override default value for FIND
2227   HEAD        Override default value for HEAD
2228   GUNZIP      Override default value for GUNZIP
2229   GZIP        Override default value for GZIP
2230   LN          Override default value for LN
2231   LS          Override default value for LS
2232   MKDIR       Override default value for MKDIR
2233   MKTEMP      Override default value for MKTEMP
2234   MV          Override default value for MV
2235   NAWK        Override default value for NAWK
2236   PRINTF      Override default value for PRINTF
2237   RM          Override default value for RM
2238   RMDIR       Override default value for RMDIR
2239   SH          Override default value for SH
2240   SORT        Override default value for SORT
2241   TAIL        Override default value for TAIL
2242   TAR         Override default value for TAR
2243   TEE         Override default value for TEE
2244   TOUCH       Override default value for TOUCH
2245   TR          Override default value for TR
2246   UNAME       Override default value for UNAME
2247   UNIQ        Override default value for UNIQ
2248   WC          Override default value for WC
2249   WHICH       Override default value for WHICH
2250   XARGS       Override default value for XARGS
2251   AWK         Override default value for AWK
2252   GREP        Override default value for GREP
2253   EGREP       Override default value for EGREP
2254   FGREP       Override default value for FGREP
2255   SED         Override default value for SED
2256   CYGPATH     Override default value for CYGPATH
2257   READLINK    Override default value for READLINK
2258   DF          Override default value for DF
2259   CPIO        Override default value for CPIO
2260   NICE        Override default value for NICE
2261   PANDOC      Override default value for PANDOC
2262   MAKE        Override default value for MAKE
2263   UNZIP       Override default value for UNZIP
2264   ZIPEXE      Override default value for ZIPEXE
2265   LDD         Override default value for LDD
2266   OTOOL       Override default value for OTOOL
2267   READELF     Override default value for READELF
2268   DOT         Override default value for DOT
2269   HG          Override default value for HG
2270   STAT        Override default value for STAT
2271   TIME        Override default value for TIME
2272   FLOCK       Override default value for FLOCK
2273   DTRACE      Override default value for DTRACE
2274   PATCH       Override default value for PATCH
2275   DSYMUTIL    Override default value for DSYMUTIL
2276   XATTR       Override default value for XATTR
2277   CODESIGN    Override default value for CODESIGN
2278   SETFILE     Override default value for SETFILE
2279   PKG_CONFIG  path to pkg-config utility
2280   JAVA        Override default value for JAVA
2281   JAVAC       Override default value for JAVAC
2282   JAVAH       Override default value for JAVAH
2283   JAR         Override default value for JAR
2284   JARSIGNER   Override default value for JARSIGNER
2285   CC          C compiler command
2286   CFLAGS      C compiler flags
2287   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2288               nonstandard directory <lib dir>
2289   LIBS        libraries to pass to the linker, e.g. -l<library>
2290   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2291               you have headers in a nonstandard directory <include dir>
2292   CXX         C++ compiler command
2293   CXXFLAGS    C++ compiler flags
2294   CPP         C preprocessor
2295   CXXCPP      C++ preprocessor
2296   AS          Override default value for AS
2297   AR          Override default value for AR
2298   LIPO        Override default value for LIPO
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   ELF_CFLAGS  C compiler flags for ELF, overriding pkg-config
2327   ELF_LIBS    linker flags for ELF, overriding pkg-config
2328   ICECC_CMD   Override default value for ICECC_CMD
2329   ICECC_CREATE_ENV
2330               Override default value for ICECC_CREATE_ENV
2331   ICECC_WRAPPER
2332               Override default value for ICECC_WRAPPER
2333   CCACHE      Override default value for CCACHE
2334 
2335 Use these variables to override the choices made by `configure' or to help
2336 it to find libraries and programs with nonstandard names/locations.
2337 
2338 Report bugs to <build-dev@openjdk.java.net>.
2339 OpenJDK home page: <http://openjdk.java.net>.
2340 _ACEOF
2341 ac_status=$?
2342 fi
2343 
2344 if test "$ac_init_help" = "recursive"; then
2345   # If there are subdirs, report their specific --help.
2346   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2347     test -d "$ac_dir" ||
2348       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2349       continue
2350     ac_builddir=.
2351 
2352 case "$ac_dir" in
2353 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2354 *)
2355   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2356   # A ".." for each directory in $ac_dir_suffix.
2357   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2358   case $ac_top_builddir_sub in
2359   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2360   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2361   esac ;;
2362 esac
2363 ac_abs_top_builddir=$ac_pwd
2364 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2365 # for backward compatibility:
2366 ac_top_builddir=$ac_top_build_prefix
2367 
2368 case $srcdir in
2369   .)  # We are building in place.
2370     ac_srcdir=.
2371     ac_top_srcdir=$ac_top_builddir_sub
2372     ac_abs_top_srcdir=$ac_pwd ;;
2373   [\\/]* | ?:[\\/]* )  # Absolute name.
2374     ac_srcdir=$srcdir$ac_dir_suffix;
2375     ac_top_srcdir=$srcdir
2376     ac_abs_top_srcdir=$srcdir ;;
2377   *) # Relative name.
2378     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2379     ac_top_srcdir=$ac_top_build_prefix$srcdir
2380     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2381 esac
2382 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2383 
2384     cd "$ac_dir" || { ac_status=$?; continue; }
2385     # Check for guested configure.
2386     if test -f "$ac_srcdir/configure.gnu"; then
2387       echo &&
2388       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2389     elif test -f "$ac_srcdir/configure"; then
2390       echo &&
2391       $SHELL "$ac_srcdir/configure" --help=recursive
2392     else
2393       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2394     fi || ac_status=$?
2395     cd "$ac_pwd" || { ac_status=$?; break; }
2396   done
2397 fi
2398 
2399 test -n "$ac_init_help" && exit $ac_status
2400 if $ac_init_version; then
2401   cat <<\_ACEOF
2402 OpenJDK configure jdk9
2403 generated by GNU Autoconf 2.69
2404 
2405 Copyright (C) 2012 Free Software Foundation, Inc.
2406 This configure script is free software; the Free Software Foundation
2407 gives unlimited permission to copy, distribute and modify it.
2408 _ACEOF
2409   exit
2410 fi
2411 
2412 ## ------------------------ ##
2413 ## Autoconf initialization. ##
2414 ## ------------------------ ##
2415 
2416 # ac_fn_c_try_compile LINENO
2417 # --------------------------
2418 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2419 ac_fn_c_try_compile ()
2420 {
2421   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2422   rm -f conftest.$ac_objext
2423   if { { ac_try="$ac_compile"
2424 case "(($ac_try" in
2425   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2426   *) ac_try_echo=$ac_try;;
2427 esac
2428 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2429 $as_echo "$ac_try_echo"; } >&5
2430   (eval "$ac_compile") 2>conftest.err
2431   ac_status=$?
2432   if test -s conftest.err; then
2433     grep -v '^ *+' conftest.err >conftest.er1
2434     cat conftest.er1 >&5
2435     mv -f conftest.er1 conftest.err
2436   fi
2437   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2438   test $ac_status = 0; } && {
2439          test -z "$ac_c_werror_flag" ||
2440          test ! -s conftest.err
2441        } && test -s conftest.$ac_objext; then :
2442   ac_retval=0
2443 else
2444   $as_echo "$as_me: failed program was:" >&5
2445 sed 's/^/| /' conftest.$ac_ext >&5
2446 
2447         ac_retval=1
2448 fi
2449   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2450   as_fn_set_status $ac_retval
2451 
2452 } # ac_fn_c_try_compile
2453 
2454 # ac_fn_cxx_try_compile LINENO
2455 # ----------------------------
2456 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2457 ac_fn_cxx_try_compile ()
2458 {
2459   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2460   rm -f conftest.$ac_objext
2461   if { { ac_try="$ac_compile"
2462 case "(($ac_try" in
2463   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2464   *) ac_try_echo=$ac_try;;
2465 esac
2466 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2467 $as_echo "$ac_try_echo"; } >&5
2468   (eval "$ac_compile") 2>conftest.err
2469   ac_status=$?
2470   if test -s conftest.err; then
2471     grep -v '^ *+' conftest.err >conftest.er1
2472     cat conftest.er1 >&5
2473     mv -f conftest.er1 conftest.err
2474   fi
2475   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2476   test $ac_status = 0; } && {
2477          test -z "$ac_cxx_werror_flag" ||
2478          test ! -s conftest.err
2479        } && test -s conftest.$ac_objext; then :
2480   ac_retval=0
2481 else
2482   $as_echo "$as_me: failed program was:" >&5
2483 sed 's/^/| /' conftest.$ac_ext >&5
2484 
2485         ac_retval=1
2486 fi
2487   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2488   as_fn_set_status $ac_retval
2489 
2490 } # ac_fn_cxx_try_compile
2491 
2492 # ac_fn_c_try_cpp LINENO
2493 # ----------------------
2494 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2495 ac_fn_c_try_cpp ()
2496 {
2497   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2498   if { { ac_try="$ac_cpp conftest.$ac_ext"
2499 case "(($ac_try" in
2500   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2501   *) ac_try_echo=$ac_try;;
2502 esac
2503 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2504 $as_echo "$ac_try_echo"; } >&5
2505   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2506   ac_status=$?
2507   if test -s conftest.err; then
2508     grep -v '^ *+' conftest.err >conftest.er1
2509     cat conftest.er1 >&5
2510     mv -f conftest.er1 conftest.err
2511   fi
2512   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2513   test $ac_status = 0; } > conftest.i && {
2514          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2515          test ! -s conftest.err
2516        }; then :
2517   ac_retval=0
2518 else
2519   $as_echo "$as_me: failed program was:" >&5
2520 sed 's/^/| /' conftest.$ac_ext >&5
2521 
2522     ac_retval=1
2523 fi
2524   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2525   as_fn_set_status $ac_retval
2526 
2527 } # ac_fn_c_try_cpp
2528 
2529 # ac_fn_cxx_try_cpp LINENO
2530 # ------------------------
2531 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2532 ac_fn_cxx_try_cpp ()
2533 {
2534   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2535   if { { ac_try="$ac_cpp conftest.$ac_ext"
2536 case "(($ac_try" in
2537   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2538   *) ac_try_echo=$ac_try;;
2539 esac
2540 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2541 $as_echo "$ac_try_echo"; } >&5
2542   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2543   ac_status=$?
2544   if test -s conftest.err; then
2545     grep -v '^ *+' conftest.err >conftest.er1
2546     cat conftest.er1 >&5
2547     mv -f conftest.er1 conftest.err
2548   fi
2549   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2550   test $ac_status = 0; } > conftest.i && {
2551          test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2552          test ! -s conftest.err
2553        }; then :
2554   ac_retval=0
2555 else
2556   $as_echo "$as_me: failed program was:" >&5
2557 sed 's/^/| /' conftest.$ac_ext >&5
2558 
2559     ac_retval=1
2560 fi
2561   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2562   as_fn_set_status $ac_retval
2563 
2564 } # ac_fn_cxx_try_cpp
2565 
2566 # ac_fn_c_try_link LINENO
2567 # -----------------------
2568 # Try to link conftest.$ac_ext, and return whether this succeeded.
2569 ac_fn_c_try_link ()
2570 {
2571   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2572   rm -f conftest.$ac_objext conftest$ac_exeext
2573   if { { ac_try="$ac_link"
2574 case "(($ac_try" in
2575   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2576   *) ac_try_echo=$ac_try;;
2577 esac
2578 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2579 $as_echo "$ac_try_echo"; } >&5
2580   (eval "$ac_link") 2>conftest.err
2581   ac_status=$?
2582   if test -s conftest.err; then
2583     grep -v '^ *+' conftest.err >conftest.er1
2584     cat conftest.er1 >&5
2585     mv -f conftest.er1 conftest.err
2586   fi
2587   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2588   test $ac_status = 0; } && {
2589          test -z "$ac_c_werror_flag" ||
2590          test ! -s conftest.err
2591        } && test -s conftest$ac_exeext && {
2592          test "$cross_compiling" = yes ||
2593          test -x conftest$ac_exeext
2594        }; then :
2595   ac_retval=0
2596 else
2597   $as_echo "$as_me: failed program was:" >&5
2598 sed 's/^/| /' conftest.$ac_ext >&5
2599 
2600         ac_retval=1
2601 fi
2602   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2603   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2604   # interfere with the next link command; also delete a directory that is
2605   # left behind by Apple's compiler.  We do this before executing the actions.
2606   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2607   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2608   as_fn_set_status $ac_retval
2609 
2610 } # ac_fn_c_try_link
2611 
2612 # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2613 # ---------------------------------------------------------
2614 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2615 # the include files in INCLUDES and setting the cache variable VAR
2616 # accordingly.
2617 ac_fn_cxx_check_header_mongrel ()
2618 {
2619   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2620   if eval \${$3+:} false; then :
2621   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2622 $as_echo_n "checking for $2... " >&6; }
2623 if eval \${$3+:} false; then :
2624   $as_echo_n "(cached) " >&6
2625 fi
2626 eval ac_res=\$$3
2627                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2628 $as_echo "$ac_res" >&6; }
2629 else
2630   # Is the header compilable?
2631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2632 $as_echo_n "checking $2 usability... " >&6; }
2633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2634 /* end confdefs.h.  */
2635 $4
2636 #include <$2>
2637 _ACEOF
2638 if ac_fn_cxx_try_compile "$LINENO"; then :
2639   ac_header_compiler=yes
2640 else
2641   ac_header_compiler=no
2642 fi
2643 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2645 $as_echo "$ac_header_compiler" >&6; }
2646 
2647 # Is the header present?
2648 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2649 $as_echo_n "checking $2 presence... " >&6; }
2650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2651 /* end confdefs.h.  */
2652 #include <$2>
2653 _ACEOF
2654 if ac_fn_cxx_try_cpp "$LINENO"; then :
2655   ac_header_preproc=yes
2656 else
2657   ac_header_preproc=no
2658 fi
2659 rm -f conftest.err conftest.i conftest.$ac_ext
2660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2661 $as_echo "$ac_header_preproc" >&6; }
2662 
2663 # So?  What about this header?
2664 case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2665   yes:no: )
2666     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2667 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2668     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2669 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2670     ;;
2671   no:yes:* )
2672     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2673 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2674     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2675 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2676     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2677 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2678     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2679 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2680     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2681 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2682 ( $as_echo "## ----------------------------------------- ##
2683 ## Report this to build-dev@openjdk.java.net ##
2684 ## ----------------------------------------- ##"
2685      ) | sed "s/^/$as_me: WARNING:     /" >&2
2686     ;;
2687 esac
2688   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2689 $as_echo_n "checking for $2... " >&6; }
2690 if eval \${$3+:} false; then :
2691   $as_echo_n "(cached) " >&6
2692 else
2693   eval "$3=\$ac_header_compiler"
2694 fi
2695 eval ac_res=\$$3
2696                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2697 $as_echo "$ac_res" >&6; }
2698 fi
2699   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2700 
2701 } # ac_fn_cxx_check_header_mongrel
2702 
2703 # ac_fn_cxx_try_run LINENO
2704 # ------------------------
2705 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2706 # that executables *can* be run.
2707 ac_fn_cxx_try_run ()
2708 {
2709   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2710   if { { ac_try="$ac_link"
2711 case "(($ac_try" in
2712   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2713   *) ac_try_echo=$ac_try;;
2714 esac
2715 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2716 $as_echo "$ac_try_echo"; } >&5
2717   (eval "$ac_link") 2>&5
2718   ac_status=$?
2719   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2720   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2721   { { case "(($ac_try" in
2722   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2723   *) ac_try_echo=$ac_try;;
2724 esac
2725 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2726 $as_echo "$ac_try_echo"; } >&5
2727   (eval "$ac_try") 2>&5
2728   ac_status=$?
2729   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2730   test $ac_status = 0; }; }; then :
2731   ac_retval=0
2732 else
2733   $as_echo "$as_me: program exited with status $ac_status" >&5
2734        $as_echo "$as_me: failed program was:" >&5
2735 sed 's/^/| /' conftest.$ac_ext >&5
2736 
2737        ac_retval=$ac_status
2738 fi
2739   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2740   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2741   as_fn_set_status $ac_retval
2742 
2743 } # ac_fn_cxx_try_run
2744 
2745 # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2746 # ---------------------------------------------------------
2747 # Tests whether HEADER exists and can be compiled using the include files in
2748 # INCLUDES, setting the cache variable VAR accordingly.
2749 ac_fn_cxx_check_header_compile ()
2750 {
2751   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2752   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2753 $as_echo_n "checking for $2... " >&6; }
2754 if eval \${$3+:} false; then :
2755   $as_echo_n "(cached) " >&6
2756 else
2757   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2758 /* end confdefs.h.  */
2759 $4
2760 #include <$2>
2761 _ACEOF
2762 if ac_fn_cxx_try_compile "$LINENO"; then :
2763   eval "$3=yes"
2764 else
2765   eval "$3=no"
2766 fi
2767 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2768 fi
2769 eval ac_res=\$$3
2770                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2771 $as_echo "$ac_res" >&6; }
2772   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2773 
2774 } # ac_fn_cxx_check_header_compile
2775 
2776 # ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2777 # ----------------------------------------------
2778 # Tries to find the compile-time value of EXPR in a program that includes
2779 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2780 # computed
2781 ac_fn_cxx_compute_int ()
2782 {
2783   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2784   if test "$cross_compiling" = yes; then
2785     # Depending upon the size, compute the lo and hi bounds.
2786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2787 /* end confdefs.h.  */
2788 $4
2789 int
2790 main ()
2791 {
2792 static int test_array [1 - 2 * !(($2) >= 0)];
2793 test_array [0] = 0;
2794 return test_array [0];
2795 
2796   ;
2797   return 0;
2798 }
2799 _ACEOF
2800 if ac_fn_cxx_try_compile "$LINENO"; then :
2801   ac_lo=0 ac_mid=0
2802   while :; do
2803     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804 /* end confdefs.h.  */
2805 $4
2806 int
2807 main ()
2808 {
2809 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2810 test_array [0] = 0;
2811 return test_array [0];
2812 
2813   ;
2814   return 0;
2815 }
2816 _ACEOF
2817 if ac_fn_cxx_try_compile "$LINENO"; then :
2818   ac_hi=$ac_mid; break
2819 else
2820   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2821                         if test $ac_lo -le $ac_mid; then
2822                           ac_lo= ac_hi=
2823                           break
2824                         fi
2825                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2826 fi
2827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2828   done
2829 else
2830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2831 /* end confdefs.h.  */
2832 $4
2833 int
2834 main ()
2835 {
2836 static int test_array [1 - 2 * !(($2) < 0)];
2837 test_array [0] = 0;
2838 return test_array [0];
2839 
2840   ;
2841   return 0;
2842 }
2843 _ACEOF
2844 if ac_fn_cxx_try_compile "$LINENO"; then :
2845   ac_hi=-1 ac_mid=-1
2846   while :; do
2847     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2848 /* end confdefs.h.  */
2849 $4
2850 int
2851 main ()
2852 {
2853 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2854 test_array [0] = 0;
2855 return test_array [0];
2856 
2857   ;
2858   return 0;
2859 }
2860 _ACEOF
2861 if ac_fn_cxx_try_compile "$LINENO"; then :
2862   ac_lo=$ac_mid; break
2863 else
2864   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2865                         if test $ac_mid -le $ac_hi; then
2866                           ac_lo= ac_hi=
2867                           break
2868                         fi
2869                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2870 fi
2871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2872   done
2873 else
2874   ac_lo= ac_hi=
2875 fi
2876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877 fi
2878 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879 # Binary search between lo and hi bounds.
2880 while test "x$ac_lo" != "x$ac_hi"; do
2881   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2882   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883 /* end confdefs.h.  */
2884 $4
2885 int
2886 main ()
2887 {
2888 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2889 test_array [0] = 0;
2890 return test_array [0];
2891 
2892   ;
2893   return 0;
2894 }
2895 _ACEOF
2896 if ac_fn_cxx_try_compile "$LINENO"; then :
2897   ac_hi=$ac_mid
2898 else
2899   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2900 fi
2901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2902 done
2903 case $ac_lo in #((
2904 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2905 '') ac_retval=1 ;;
2906 esac
2907   else
2908     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2909 /* end confdefs.h.  */
2910 $4
2911 static long int longval () { return $2; }
2912 static unsigned long int ulongval () { return $2; }
2913 #include <stdio.h>
2914 #include <stdlib.h>
2915 int
2916 main ()
2917 {
2918 
2919   FILE *f = fopen ("conftest.val", "w");
2920   if (! f)
2921     return 1;
2922   if (($2) < 0)
2923     {
2924       long int i = longval ();
2925       if (i != ($2))
2926         return 1;
2927       fprintf (f, "%ld", i);
2928     }
2929   else
2930     {
2931       unsigned long int i = ulongval ();
2932       if (i != ($2))
2933         return 1;
2934       fprintf (f, "%lu", i);
2935     }
2936   /* Do not output a trailing newline, as this causes \r\n confusion
2937      on some platforms.  */
2938   return ferror (f) || fclose (f) != 0;
2939 
2940   ;
2941   return 0;
2942 }
2943 _ACEOF
2944 if ac_fn_cxx_try_run "$LINENO"; then :
2945   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2946 else
2947   ac_retval=1
2948 fi
2949 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2950   conftest.$ac_objext conftest.beam conftest.$ac_ext
2951 rm -f conftest.val
2952 
2953   fi
2954   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2955   as_fn_set_status $ac_retval
2956 
2957 } # ac_fn_cxx_compute_int
2958 
2959 # ac_fn_cxx_try_link LINENO
2960 # -------------------------
2961 # Try to link conftest.$ac_ext, and return whether this succeeded.
2962 ac_fn_cxx_try_link ()
2963 {
2964   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2965   rm -f conftest.$ac_objext conftest$ac_exeext
2966   if { { ac_try="$ac_link"
2967 case "(($ac_try" in
2968   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2969   *) ac_try_echo=$ac_try;;
2970 esac
2971 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2972 $as_echo "$ac_try_echo"; } >&5
2973   (eval "$ac_link") 2>conftest.err
2974   ac_status=$?
2975   if test -s conftest.err; then
2976     grep -v '^ *+' conftest.err >conftest.er1
2977     cat conftest.er1 >&5
2978     mv -f conftest.er1 conftest.err
2979   fi
2980   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2981   test $ac_status = 0; } && {
2982          test -z "$ac_cxx_werror_flag" ||
2983          test ! -s conftest.err
2984        } && test -s conftest$ac_exeext && {
2985          test "$cross_compiling" = yes ||
2986          test -x conftest$ac_exeext
2987        }; then :
2988   ac_retval=0
2989 else
2990   $as_echo "$as_me: failed program was:" >&5
2991 sed 's/^/| /' conftest.$ac_ext >&5
2992 
2993         ac_retval=1
2994 fi
2995   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2996   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2997   # interfere with the next link command; also delete a directory that is
2998   # left behind by Apple's compiler.  We do this before executing the actions.
2999   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
3000   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3001   as_fn_set_status $ac_retval
3002 
3003 } # ac_fn_cxx_try_link
3004 
3005 # ac_fn_cxx_check_func LINENO FUNC VAR
3006 # ------------------------------------
3007 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3008 ac_fn_cxx_check_func ()
3009 {
3010   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3011   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3012 $as_echo_n "checking for $2... " >&6; }
3013 if eval \${$3+:} false; then :
3014   $as_echo_n "(cached) " >&6
3015 else
3016   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3017 /* end confdefs.h.  */
3018 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3019    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
3020 #define $2 innocuous_$2
3021 
3022 /* System header to define __stub macros and hopefully few prototypes,
3023     which can conflict with char $2 (); below.
3024     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3025     <limits.h> exists even on freestanding compilers.  */
3026 
3027 #ifdef __STDC__
3028 # include <limits.h>
3029 #else
3030 # include <assert.h>
3031 #endif
3032 
3033 #undef $2
3034 
3035 /* Override any GCC internal prototype to avoid an error.
3036    Use char because int might match the return type of a GCC
3037    builtin and then its argument prototype would still apply.  */
3038 #ifdef __cplusplus
3039 extern "C"
3040 #endif
3041 char $2 ();
3042 /* The GNU C library defines this for functions which it implements
3043     to always fail with ENOSYS.  Some functions are actually named
3044     something starting with __ and the normal name is an alias.  */
3045 #if defined __stub_$2 || defined __stub___$2
3046 choke me
3047 #endif
3048 
3049 int
3050 main ()
3051 {
3052 return $2 ();
3053   ;
3054   return 0;
3055 }
3056 _ACEOF
3057 if ac_fn_cxx_try_link "$LINENO"; then :
3058   eval "$3=yes"
3059 else
3060   eval "$3=no"
3061 fi
3062 rm -f core conftest.err conftest.$ac_objext \
3063     conftest$ac_exeext conftest.$ac_ext
3064 fi
3065 eval ac_res=\$$3
3066                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3067 $as_echo "$ac_res" >&6; }
3068   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3069 
3070 } # ac_fn_cxx_check_func
3071 
3072 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3073 # -------------------------------------------------------
3074 # Tests whether HEADER exists and can be compiled using the include files in
3075 # INCLUDES, setting the cache variable VAR accordingly.
3076 ac_fn_c_check_header_compile ()
3077 {
3078   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3079   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3080 $as_echo_n "checking for $2... " >&6; }
3081 if eval \${$3+:} false; then :
3082   $as_echo_n "(cached) " >&6
3083 else
3084   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3085 /* end confdefs.h.  */
3086 $4
3087 #include <$2>
3088 _ACEOF
3089 if ac_fn_c_try_compile "$LINENO"; then :
3090   eval "$3=yes"
3091 else
3092   eval "$3=no"
3093 fi
3094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3095 fi
3096 eval ac_res=\$$3
3097                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3098 $as_echo "$ac_res" >&6; }
3099   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3100 
3101 } # ac_fn_c_check_header_compile
3102 cat >config.log <<_ACEOF
3103 This file contains any messages produced by compilers while
3104 running configure, to aid debugging if configure makes a mistake.
3105 
3106 It was created by OpenJDK $as_me jdk9, which was
3107 generated by GNU Autoconf 2.69.  Invocation command line was
3108 
3109   $ $0 $@
3110 
3111 _ACEOF
3112 exec 5>>config.log
3113 {
3114 cat <<_ASUNAME
3115 ## --------- ##
3116 ## Platform. ##
3117 ## --------- ##
3118 
3119 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3120 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3121 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3122 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3123 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3124 
3125 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3126 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3127 
3128 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3129 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3130 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3131 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3132 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3133 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3134 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3135 
3136 _ASUNAME
3137 
3138 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3139 for as_dir in $PATH
3140 do
3141   IFS=$as_save_IFS
3142   test -z "$as_dir" && as_dir=.
3143     $as_echo "PATH: $as_dir"
3144   done
3145 IFS=$as_save_IFS
3146 
3147 } >&5
3148 
3149 cat >&5 <<_ACEOF
3150 
3151 
3152 ## ----------- ##
3153 ## Core tests. ##
3154 ## ----------- ##
3155 
3156 _ACEOF
3157 
3158 
3159 # Keep a trace of the command line.
3160 # Strip out --no-create and --no-recursion so they do not pile up.
3161 # Strip out --silent because we don't want to record it for future runs.
3162 # Also quote any args containing shell meta-characters.
3163 # Make two passes to allow for proper duplicate-argument suppression.
3164 ac_configure_args=
3165 ac_configure_args0=
3166 ac_configure_args1=
3167 ac_must_keep_next=false
3168 for ac_pass in 1 2
3169 do
3170   for ac_arg
3171   do
3172     case $ac_arg in
3173     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3174     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3175     | -silent | --silent | --silen | --sile | --sil)
3176       continue ;;
3177     *\'*)
3178       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3179     esac
3180     case $ac_pass in
3181     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3182     2)
3183       as_fn_append ac_configure_args1 " '$ac_arg'"
3184       if test $ac_must_keep_next = true; then
3185         ac_must_keep_next=false # Got value, back to normal.
3186       else
3187         case $ac_arg in
3188           *=* | --config-cache | -C | -disable-* | --disable-* \
3189           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3190           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3191           | -with-* | --with-* | -without-* | --without-* | --x)
3192             case "$ac_configure_args0 " in
3193               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3194             esac
3195             ;;
3196           -* ) ac_must_keep_next=true ;;
3197         esac
3198       fi
3199       as_fn_append ac_configure_args " '$ac_arg'"
3200       ;;
3201     esac
3202   done
3203 done
3204 { ac_configure_args0=; unset ac_configure_args0;}
3205 { ac_configure_args1=; unset ac_configure_args1;}
3206 
3207 # When interrupted or exit'd, cleanup temporary files, and complete
3208 # config.log.  We remove comments because anyway the quotes in there
3209 # would cause problems or look ugly.
3210 # WARNING: Use '\'' to represent an apostrophe within the trap.
3211 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3212 trap 'exit_status=$?
3213   # Save into config.log some information that might help in debugging.
3214   {
3215     echo
3216 
3217     $as_echo "## ---------------- ##
3218 ## Cache variables. ##
3219 ## ---------------- ##"
3220     echo
3221     # The following way of writing the cache mishandles newlines in values,
3222 (
3223   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3224     eval ac_val=\$$ac_var
3225     case $ac_val in #(
3226     *${as_nl}*)
3227       case $ac_var in #(
3228       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3229 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3230       esac
3231       case $ac_var in #(
3232       _ | IFS | as_nl) ;; #(
3233       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3234       *) { eval $ac_var=; unset $ac_var;} ;;
3235       esac ;;
3236     esac
3237   done
3238   (set) 2>&1 |
3239     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3240     *${as_nl}ac_space=\ *)
3241       sed -n \
3242         "s/'\''/'\''\\\\'\'''\''/g;
3243           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3244       ;; #(
3245     *)
3246       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3247       ;;
3248     esac |
3249     sort
3250 )
3251     echo
3252 
3253     $as_echo "## ----------------- ##
3254 ## Output variables. ##
3255 ## ----------------- ##"
3256     echo
3257     for ac_var in $ac_subst_vars
3258     do
3259       eval ac_val=\$$ac_var
3260       case $ac_val in
3261       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3262       esac
3263       $as_echo "$ac_var='\''$ac_val'\''"
3264     done | sort
3265     echo
3266 
3267     if test -n "$ac_subst_files"; then
3268       $as_echo "## ------------------- ##
3269 ## File substitutions. ##
3270 ## ------------------- ##"
3271       echo
3272       for ac_var in $ac_subst_files
3273       do
3274         eval ac_val=\$$ac_var
3275         case $ac_val in
3276         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3277         esac
3278         $as_echo "$ac_var='\''$ac_val'\''"
3279       done | sort
3280       echo
3281     fi
3282 
3283     if test -s confdefs.h; then
3284       $as_echo "## ----------- ##
3285 ## confdefs.h. ##
3286 ## ----------- ##"
3287       echo
3288       cat confdefs.h
3289       echo
3290     fi
3291     test "$ac_signal" != 0 &&
3292       $as_echo "$as_me: caught signal $ac_signal"
3293     $as_echo "$as_me: exit $exit_status"
3294   } >&5
3295   rm -f core *.core core.conftest.* &&
3296     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3297     exit $exit_status
3298 ' 0
3299 for ac_signal in 1 2 13 15; do
3300   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3301 done
3302 ac_signal=0
3303 
3304 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3305 rm -f -r conftest* confdefs.h
3306 
3307 $as_echo "/* confdefs.h */" > confdefs.h
3308 
3309 # Predefined preprocessor variables.
3310 
3311 cat >>confdefs.h <<_ACEOF
3312 #define PACKAGE_NAME "$PACKAGE_NAME"
3313 _ACEOF
3314 
3315 cat >>confdefs.h <<_ACEOF
3316 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3317 _ACEOF
3318 
3319 cat >>confdefs.h <<_ACEOF
3320 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3321 _ACEOF
3322 
3323 cat >>confdefs.h <<_ACEOF
3324 #define PACKAGE_STRING "$PACKAGE_STRING"
3325 _ACEOF
3326 
3327 cat >>confdefs.h <<_ACEOF
3328 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3329 _ACEOF
3330 
3331 cat >>confdefs.h <<_ACEOF
3332 #define PACKAGE_URL "$PACKAGE_URL"
3333 _ACEOF
3334 
3335 
3336 # Let the site file select an alternate cache file if it wants to.
3337 # Prefer an explicitly selected file to automatically selected ones.
3338 ac_site_file1=NONE
3339 ac_site_file2=NONE
3340 if test -n "$CONFIG_SITE"; then
3341   # We do not want a PATH search for config.site.
3342   case $CONFIG_SITE in #((
3343     -*)  ac_site_file1=./$CONFIG_SITE;;
3344     */*) ac_site_file1=$CONFIG_SITE;;
3345     *)   ac_site_file1=./$CONFIG_SITE;;
3346   esac
3347 elif test "x$prefix" != xNONE; then
3348   ac_site_file1=$prefix/share/config.site
3349   ac_site_file2=$prefix/etc/config.site
3350 else
3351   ac_site_file1=$ac_default_prefix/share/config.site
3352   ac_site_file2=$ac_default_prefix/etc/config.site
3353 fi
3354 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3355 do
3356   test "x$ac_site_file" = xNONE && continue
3357   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3358     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3359 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3360     sed 's/^/| /' "$ac_site_file" >&5
3361     . "$ac_site_file" \
3362       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3363 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3364 as_fn_error $? "failed to load site script $ac_site_file
3365 See \`config.log' for more details" "$LINENO" 5; }
3366   fi
3367 done
3368 
3369 if test -r "$cache_file"; then
3370   # Some versions of bash will fail to source /dev/null (special files
3371   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3372   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3373     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3374 $as_echo "$as_me: loading cache $cache_file" >&6;}
3375     case $cache_file in
3376       [\\/]* | ?:[\\/]* ) . "$cache_file";;
3377       *)                      . "./$cache_file";;
3378     esac
3379   fi
3380 else
3381   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3382 $as_echo "$as_me: creating cache $cache_file" >&6;}
3383   >$cache_file
3384 fi
3385 
3386 # Check that the precious variables saved in the cache have kept the same
3387 # value.
3388 ac_cache_corrupted=false
3389 for ac_var in $ac_precious_vars; do
3390   eval ac_old_set=\$ac_cv_env_${ac_var}_set
3391   eval ac_new_set=\$ac_env_${ac_var}_set
3392   eval ac_old_val=\$ac_cv_env_${ac_var}_value
3393   eval ac_new_val=\$ac_env_${ac_var}_value
3394   case $ac_old_set,$ac_new_set in
3395     set,)
3396       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3397 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3398       ac_cache_corrupted=: ;;
3399     ,set)
3400       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3401 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3402       ac_cache_corrupted=: ;;
3403     ,);;
3404     *)
3405       if test "x$ac_old_val" != "x$ac_new_val"; then
3406         # differences in whitespace do not lead to failure.
3407         ac_old_val_w=`echo x $ac_old_val`
3408         ac_new_val_w=`echo x $ac_new_val`
3409         if test "$ac_old_val_w" != "$ac_new_val_w"; then
3410           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3411 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3412           ac_cache_corrupted=:
3413         else
3414           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3415 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3416           eval $ac_var=\$ac_old_val
3417         fi
3418         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3419 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3420         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3421 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3422       fi;;
3423   esac
3424   # Pass precious variables to config.status.
3425   if test "$ac_new_set" = set; then
3426     case $ac_new_val in
3427     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3428     *) ac_arg=$ac_var=$ac_new_val ;;
3429     esac
3430     case " $ac_configure_args " in
3431       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3432       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3433     esac
3434   fi
3435 done
3436 if $ac_cache_corrupted; then
3437   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3438 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3439   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3440 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3441   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3442 fi
3443 ## -------------------- ##
3444 ## Main body of script. ##
3445 ## -------------------- ##
3446 
3447 ac_ext=c
3448 ac_cpp='$CPP $CPPFLAGS'
3449 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3450 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3451 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3452 
3453 
3454 
3455 ac_aux_dir=
3456 for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3457   if test -f "$ac_dir/install-sh"; then
3458     ac_aux_dir=$ac_dir
3459     ac_install_sh="$ac_aux_dir/install-sh -c"
3460     break
3461   elif test -f "$ac_dir/install.sh"; then
3462     ac_aux_dir=$ac_dir
3463     ac_install_sh="$ac_aux_dir/install.sh -c"
3464     break
3465   elif test -f "$ac_dir/shtool"; then
3466     ac_aux_dir=$ac_dir
3467     ac_install_sh="$ac_aux_dir/shtool install -c"
3468     break
3469   fi
3470 done
3471 if test -z "$ac_aux_dir"; then
3472   as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3473 fi
3474 
3475 # These three variables are undocumented and unsupported,
3476 # and are intended to be withdrawn in a future Autoconf release.
3477 # They can cause serious problems if a builder's source tree is in a directory
3478 # whose full name contains unusual characters.
3479 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3480 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3481 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3482 
3483 
3484 # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3485 
3486 #
3487 # Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3488 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3489 #
3490 # This code is free software; you can redistribute it and/or modify it
3491 # under the terms of the GNU General Public License version 2 only, as
3492 # published by the Free Software Foundation.  Oracle designates this
3493 # particular file as subject to the "Classpath" exception as provided
3494 # by Oracle in the LICENSE file that accompanied this code.
3495 #
3496 # This code is distributed in the hope that it will be useful, but WITHOUT
3497 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3498 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3499 # version 2 for more details (a copy is included in the LICENSE file that
3500 # accompanied this code).
3501 #
3502 # You should have received a copy of the GNU General Public License version
3503 # 2 along with this work; if not, write to the Free Software Foundation,
3504 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3505 #
3506 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3507 # or visit www.oracle.com if you need additional information or have any
3508 # questions.
3509 #
3510 
3511 #
3512 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
3513 #
3514 # This program is free software; you can redistribute it and/or modify
3515 # it under the terms of the GNU General Public License as published by
3516 # the Free Software Foundation; either version 2 of the License, or
3517 # (at your option) any later version.
3518 #
3519 # This program is distributed in the hope that it will be useful, but
3520 # WITHOUT ANY WARRANTY; without even the implied warranty of
3521 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3522 # General Public License for more details.
3523 #
3524 # You should have received a copy of the GNU General Public License
3525 # along with this program; if not, write to the Free Software
3526 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3527 #
3528 # As a special exception to the GNU General Public License, if you
3529 # distribute this file as part of a program that contains a
3530 # configuration script generated by Autoconf, you may include it under
3531 # the same distribution terms that you use for the rest of that program.
3532 
3533 # PKG_PROG_PKG_CONFIG([MIN-VERSION])
3534 # ----------------------------------
3535 # PKG_PROG_PKG_CONFIG
3536 
3537 # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3538 #
3539 # Check to see whether a particular set of modules exists.  Similar
3540 # to PKG_CHECK_MODULES(), but does not set variables or print errors.
3541 #
3542 #
3543 # Similar to PKG_CHECK_MODULES, make sure that the first instance of
3544 # this or PKG_CHECK_MODULES is called, or make sure to call
3545 # PKG_CHECK_EXISTS manually
3546 # --------------------------------------------------------------
3547 
3548 
3549 
3550 # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3551 # ---------------------------------------------
3552 # _PKG_CONFIG
3553 
3554 # _PKG_SHORT_ERRORS_SUPPORTED
3555 # -----------------------------
3556 # _PKG_SHORT_ERRORS_SUPPORTED
3557 
3558 
3559 # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3560 # [ACTION-IF-NOT-FOUND])
3561 #
3562 #
3563 # Note that if there is a possibility the first call to
3564 # PKG_CHECK_MODULES might not happen, you should be sure to include an
3565 # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3566 #
3567 #
3568 # --------------------------------------------------------------
3569 # PKG_CHECK_MODULES
3570 
3571 
3572 # Include these first...
3573 #
3574 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3575 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3576 #
3577 # This code is free software; you can redistribute it and/or modify it
3578 # under the terms of the GNU General Public License version 2 only, as
3579 # published by the Free Software Foundation.  Oracle designates this
3580 # particular file as subject to the "Classpath" exception as provided
3581 # by Oracle in the LICENSE file that accompanied this code.
3582 #
3583 # This code is distributed in the hope that it will be useful, but WITHOUT
3584 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3585 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3586 # version 2 for more details (a copy is included in the LICENSE file that
3587 # accompanied this code).
3588 #
3589 # You should have received a copy of the GNU General Public License version
3590 # 2 along with this work; if not, write to the Free Software Foundation,
3591 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3592 #
3593 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3594 # or visit www.oracle.com if you need additional information or have any
3595 # questions.
3596 #
3597 
3598 # Create a function/macro that takes a series of named arguments. The call is
3599 # similar to AC_DEFUN, but the setup of the function looks like this:
3600 # BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3601 # ... do something
3602 #   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3603 # ])
3604 # A star (*) in front of a named argument means that it is required and it's
3605 # presence will be verified. To pass e.g. the first value as a normal indexed
3606 # argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3607 # arguments are referenced in the function by their name prefixed by ARG_, e.g.
3608 # "ARG_FOO".
3609 #
3610 # The generated function can be called like this:
3611 # MYFUNC(FOO: [foo-val],
3612 #     BAR: [
3613 #         $ECHO hello world
3614 #     ])
3615 # Note that the argument value must start on the same line as the argument name.
3616 #
3617 # Argument 1: Name of the function to define
3618 # Argument 2: List of legal named arguments, with a * prefix for required arguments
3619 # Argument 3: Argument array to treat as named, typically $@
3620 # Argument 4: The main function body
3621 
3622 
3623 # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3624 # If so, then append $1 to $2 \
3625 # Also set JVM_ARG_OK to true/false depending on outcome.
3626 
3627 
3628 # Appends a string to a path variable, only adding the : when needed.
3629 
3630 
3631 # Prepends a string to a path variable, only adding the : when needed.
3632 
3633 
3634 # This will make sure the given variable points to a full and proper
3635 # path. This means:
3636 # 1) There will be no spaces in the path. On unix platforms,
3637 #    spaces in the path will result in an error. On Windows,
3638 #    the path will be rewritten using short-style to be space-free.
3639 # 2) The path will be absolute, and it will be in unix-style (on
3640 #     cygwin).
3641 # $1: The name of the variable to fix
3642 
3643 
3644 # This will make sure the given variable points to a executable
3645 # with a full and proper path. This means:
3646 # 1) There will be no spaces in the path. On unix platforms,
3647 #    spaces in the path will result in an error. On Windows,
3648 #    the path will be rewritten using short-style to be space-free.
3649 # 2) The path will be absolute, and it will be in unix-style (on
3650 #     cygwin).
3651 # Any arguments given to the executable is preserved.
3652 # If the input variable does not have a directory specification, then
3653 # it need to be in the PATH.
3654 # $1: The name of the variable to fix
3655 
3656 
3657 
3658 
3659 # Register a --with argument but mark it as deprecated
3660 # $1: The name of the with argument to deprecate, not including --with-
3661 
3662 
3663 # Register a --enable argument but mark it as deprecated
3664 # $1: The name of the with argument to deprecate, not including --enable-
3665 # $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3666 # $3: Messages to user.
3667 
3668 
3669 
3670 
3671 # Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3672 # $1: variable to check
3673 
3674 
3675 # Check that there are no unprocessed overridden variables left.
3676 # If so, they are an incorrect argument and we will exit with an error.
3677 
3678 
3679 # Setup a tool for the given variable. If correctly specified by the user,
3680 # use that value, otherwise search for the tool using the supplied code snippet.
3681 # $1: variable to set
3682 # $2: code snippet to call to look for the tool
3683 # $3: code snippet to call if variable was used to find tool
3684 
3685 
3686 # Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3687 # $1: variable to set
3688 # $2: executable name (or list of names) to look for
3689 # $3: [path]
3690 
3691 
3692 # Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3693 # $1: variable to set
3694 # $2: executable name (or list of names) to look for
3695 
3696 
3697 # Like BASIC_PATH_PROGS but fails if no tool was found.
3698 # $1: variable to set
3699 # $2: executable name (or list of names) to look for
3700 # $3: [path]
3701 
3702 
3703 # Like BASIC_SETUP_TOOL but fails if no tool was found.
3704 # $1: variable to set
3705 # $2: autoconf macro to call to look for the special tool
3706 
3707 
3708 # Setup the most fundamental tools that relies on not much else to set up,
3709 # but is used by much of the early bootstrap code.
3710 
3711 
3712 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3713 
3714 
3715 # Evaluates platform specific overrides for devkit variables.
3716 # $1: Name of variable
3717 
3718 
3719 
3720 
3721 
3722 
3723 #%%% Simple tools %%%
3724 
3725 # Check if we have found a usable version of make
3726 # $1: the path to a potential make binary (or empty)
3727 # $2: the description on how we found this
3728 
3729 
3730 
3731 
3732 # Goes looking for a usable version of GNU make.
3733 
3734 
3735 
3736 
3737 
3738 
3739 
3740 
3741 
3742 
3743 # Check if build directory is on local disk. If not possible to determine,
3744 # we prefer to claim it's local.
3745 # Argument 1: directory to test
3746 # Argument 2: what to do if it is on local disk
3747 # Argument 3: what to do otherwise (remote disk or failure)
3748 
3749 
3750 # Check that source files have basic read permissions set. This might
3751 # not be the case in cygwin in certain conditions.
3752 
3753 
3754 
3755 
3756 # Check for support for specific options in bash
3757 
3758 
3759 ################################################################################
3760 #
3761 # Default make target
3762 #
3763 
3764 
3765 # Code to run after AC_OUTPUT
3766 
3767 
3768 #
3769 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3770 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3771 #
3772 # This code is free software; you can redistribute it and/or modify it
3773 # under the terms of the GNU General Public License version 2 only, as
3774 # published by the Free Software Foundation.  Oracle designates this
3775 # particular file as subject to the "Classpath" exception as provided
3776 # by Oracle in the LICENSE file that accompanied this code.
3777 #
3778 # This code is distributed in the hope that it will be useful, but WITHOUT
3779 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3780 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3781 # version 2 for more details (a copy is included in the LICENSE file that
3782 # accompanied this code).
3783 #
3784 # You should have received a copy of the GNU General Public License version
3785 # 2 along with this work; if not, write to the Free Software Foundation,
3786 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3787 #
3788 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3789 # or visit www.oracle.com if you need additional information or have any
3790 # questions.
3791 #
3792 
3793 
3794 
3795 
3796 
3797 # Helper function which possibly converts a path using DOS-style short mode.
3798 # If so, the updated path is stored in $new_path.
3799 # $1: The path to check
3800 
3801 
3802 # Helper function which possibly converts a path using DOS-style short mode.
3803 # If so, the updated path is stored in $new_path.
3804 # $1: The path to check
3805 
3806 
3807 # FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3808 # and could probably be heavily simplified. However, all changes in this
3809 # area tend to need lot of testing in different scenarios, and in lack of
3810 # proper unit testing, cleaning this up has not been deemed worth the effort
3811 # at the moment.
3812 
3813 
3814 
3815 
3816 
3817 
3818 
3819 
3820 
3821 # Setup basic configuration paths, and platform-specific stuff related to PATHs.
3822 
3823 
3824 
3825 
3826 # ... then the rest
3827 #
3828 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3829 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3830 #
3831 # This code is free software; you can redistribute it and/or modify it
3832 # under the terms of the GNU General Public License version 2 only, as
3833 # published by the Free Software Foundation.  Oracle designates this
3834 # particular file as subject to the "Classpath" exception as provided
3835 # by Oracle in the LICENSE file that accompanied this code.
3836 #
3837 # This code is distributed in the hope that it will be useful, but WITHOUT
3838 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3839 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3840 # version 2 for more details (a copy is included in the LICENSE file that
3841 # accompanied this code).
3842 #
3843 # You should have received a copy of the GNU General Public License version
3844 # 2 along with this work; if not, write to the Free Software Foundation,
3845 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3846 #
3847 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3848 # or visit www.oracle.com if you need additional information or have any
3849 # questions.
3850 #
3851 
3852 ########################################################################
3853 # This file handles detection of the Boot JDK. The Boot JDK detection
3854 # process has been developed as a response to solve a complex real-world
3855 # problem. Initially, it was simple, but it has grown as platform after
3856 # platform, idiosyncracy after idiosyncracy has been supported.
3857 #
3858 # The basic idea is this:
3859 # 1) You need an acceptable *) JDK to use as a Boot JDK
3860 # 2) There are several ways to locate a JDK, that are mostly platform
3861 #    dependent **)
3862 # 3) You can have multiple JDKs installed
3863 # 4) If possible, configure should try to dig out an acceptable JDK
3864 #    automatically, without having to resort to command-line options
3865 #
3866 # *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3867 #     javac) and not a JRE, etc.
3868 #
3869 # **) On Windows we typically use a well-known path.
3870 #     On MacOSX we typically use the tool java_home.
3871 #     On Linux we typically find javac in the $PATH, and then follow a
3872 #     chain of symlinks that often ends up in a real JDK.
3873 #
3874 # This leads to the code where we check in different ways to locate a
3875 # JDK, and if one is found, check if it is acceptable. If not, we print
3876 # our reasons for rejecting it (useful when debugging non-working
3877 # configure situations) and continue checking the next one.
3878 ########################################################################
3879 
3880 # Execute the check given as argument, and verify the result
3881 # If the Boot JDK was previously found, do nothing
3882 # $1 A command line (typically autoconf macro) to execute
3883 
3884 
3885 # Test: Is bootjdk explicitly set by command line arguments?
3886 
3887 
3888 # Test: Is $JAVA_HOME set?
3889 
3890 
3891 # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3892 
3893 
3894 # Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3895 # $1: Argument to the java_home binary (optional)
3896 
3897 
3898 # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3899 
3900 
3901 # Look for a jdk in the given path. If there are multiple, try to select the newest.
3902 # If found, set BOOT_JDK and BOOT_JDK_FOUND.
3903 # $1 = Path to directory containing jdk installations.
3904 # $2 = String to append to the found JDK directory to get the proper JDK home
3905 
3906 
3907 # Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3908 # environmental variable as base for where to look.
3909 # $1 Name of an environmal variable, assumed to point to the Program Files directory.
3910 
3911 
3912 # Test: Is there a JDK installed in default, well-known locations?
3913 
3914 
3915 # Check that a command-line tool in the Boot JDK is correct
3916 # $1 = name of variable to assign
3917 # $2 = name of binary
3918 
3919 
3920 ###############################################################################
3921 #
3922 # We need a Boot JDK to bootstrap the build.
3923 #
3924 
3925 
3926 
3927 
3928 
3929 # BUILD_JDK: the location of the latest JDK that can run
3930 #   on the host system and supports the target class file version
3931 #   generated in this JDK build.  This variable should only be
3932 #   used after the launchers are built.
3933 #
3934 
3935 # Execute the check given as argument, and verify the result.
3936 # If the JDK was previously found, do nothing.
3937 # $1 A command line (typically autoconf macro) to execute
3938 
3939 
3940 # By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3941 # is different than the host system doing the build (e.g. cross-compilation),
3942 # a special BUILD_JDK is built as part of the build process.  An external
3943 # prebuilt BUILD_JDK can also be supplied.
3944 
3945 
3946 #
3947 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3948 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3949 #
3950 # This code is free software; you can redistribute it and/or modify it
3951 # under the terms of the GNU General Public License version 2 only, as
3952 # published by the Free Software Foundation.  Oracle designates this
3953 # particular file as subject to the "Classpath" exception as provided
3954 # by Oracle in the LICENSE file that accompanied this code.
3955 #
3956 # This code is distributed in the hope that it will be useful, but WITHOUT
3957 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3958 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3959 # version 2 for more details (a copy is included in the LICENSE file that
3960 # accompanied this code).
3961 #
3962 # You should have received a copy of the GNU General Public License version
3963 # 2 along with this work; if not, write to the Free Software Foundation,
3964 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3965 #
3966 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3967 # or visit www.oracle.com if you need additional information or have any
3968 # questions.
3969 #
3970 
3971 
3972 
3973 
3974 
3975 
3976 
3977 
3978 
3979 
3980 
3981 
3982 
3983 
3984 
3985 
3986 
3987 ################################################################################
3988 #
3989 # Runs icecc-create-env once and prints the error if it fails
3990 #
3991 # $1: arguments to icecc-create-env
3992 # $2: log file
3993 #
3994 
3995 
3996 ################################################################################
3997 #
3998 # Optionally enable distributed compilation of native code using icecc/icecream
3999 #
4000 
4001 
4002 
4003 
4004 
4005 
4006 
4007 #
4008 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4009 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4010 #
4011 # This code is free software; you can redistribute it and/or modify it
4012 # under the terms of the GNU General Public License version 2 only, as
4013 # published by the Free Software Foundation.  Oracle designates this
4014 # particular file as subject to the "Classpath" exception as provided
4015 # by Oracle in the LICENSE file that accompanied this code.
4016 #
4017 # This code is distributed in the hope that it will be useful, but WITHOUT
4018 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4019 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4020 # version 2 for more details (a copy is included in the LICENSE file that
4021 # accompanied this code).
4022 #
4023 # You should have received a copy of the GNU General Public License version
4024 # 2 along with this work; if not, write to the Free Software Foundation,
4025 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4026 #
4027 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4028 # or visit www.oracle.com if you need additional information or have any
4029 # questions.
4030 #
4031 
4032 ################################################################################
4033 #
4034 # Setup ABI profile (for arm)
4035 #
4036 
4037 
4038 # Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4039 # corresponding configure arguments instead
4040 
4041 
4042 # Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4043 # that configure can use them while detecting compilers.
4044 # TOOLCHAIN_TYPE is available here.
4045 # Param 1 - Optional prefix to all variables. (e.g BUILD_)
4046 
4047 
4048 
4049 
4050 
4051 
4052 # Documentation on common flags used for solstudio in HIGHEST.
4053 #
4054 # WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4055 #          done with care, there are some assumptions below that need to
4056 #          be understood about the use of pointers, and IEEE behavior.
4057 #
4058 # -fns: Use non-standard floating point mode (not IEEE 754)
4059 # -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4060 # -fsingle: Use single precision floating point with 'float'
4061 # -xalias_level=basic: Assume memory references via basic pointer types do not alias
4062 #   (Source with excessing pointer casting and data access with mixed
4063 #    pointer types are not recommended)
4064 # -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4065 #   (If you expect perfect errno behavior, do not use this)
4066 # -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4067 # -xrestrict: Pointer parameters to functions do not overlap
4068 #   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4069 #    If you pass in multiple pointers to the same data, do not use this)
4070 # -xlibmil: Inline some library routines
4071 #   (If you expect perfect errno behavior, do not use this)
4072 # -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4073 #   (If you expect perfect errno behavior, do not use this)
4074 #  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4075 
4076     # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4077     # Bug?
4078     #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4079     #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4080     #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4081     #fi
4082 
4083 
4084 
4085 
4086 
4087 
4088 ################################################################################
4089 # $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4090 #      conditionals against.
4091 # $2 - Optional prefix for each variable defined.
4092 
4093 
4094 # FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4095 #                                  IF_FALSE: [RUN-IF-FALSE])
4096 # ------------------------------------------------------------
4097 # Check that the C compiler supports an argument
4098 
4099 
4100 
4101 
4102 # FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4103 #                                    IF_FALSE: [RUN-IF-FALSE])
4104 # ------------------------------------------------------------
4105 # Check that the C++ compiler supports an argument
4106 
4107 
4108 
4109 
4110 # FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4111 #                                IF_FALSE: [RUN-IF-FALSE])
4112 # ------------------------------------------------------------
4113 # Check that the C and C++ compilers support an argument
4114 
4115 
4116 
4117 
4118 # FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4119 #                                   IF_FALSE: [RUN-IF-FALSE])
4120 # ------------------------------------------------------------
4121 # Check that the linker support an argument
4122 
4123 
4124 
4125 
4126 
4127 
4128 # FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4129 # Arguments:
4130 # $1 - Optional prefix for each variable defined.
4131 
4132 
4133 #
4134 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4135 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4136 #
4137 # This code is free software; you can redistribute it and/or modify it
4138 # under the terms of the GNU General Public License version 2 only, as
4139 # published by the Free Software Foundation.  Oracle designates this
4140 # particular file as subject to the "Classpath" exception as provided
4141 # by Oracle in the LICENSE file that accompanied this code.
4142 #
4143 # This code is distributed in the hope that it will be useful, but WITHOUT
4144 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4145 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4146 # version 2 for more details (a copy is included in the LICENSE file that
4147 # accompanied this code).
4148 #
4149 # You should have received a copy of the GNU General Public License version
4150 # 2 along with this work; if not, write to the Free Software Foundation,
4151 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4152 #
4153 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4154 # or visit www.oracle.com if you need additional information or have any
4155 # questions.
4156 #
4157 
4158 
4159 
4160 
4161 
4162 cygwin_help() {
4163   case $1 in
4164     unzip)
4165       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4166       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4167       ;;
4168     zip)
4169       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4170       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4171       ;;
4172     make)
4173       PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4174       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4175       ;;
4176     freetype)
4177       HELP_MSG="
4178 The freetype library can now be build during the configure process.
4179 Download the freetype sources and unpack them into an arbitrary directory:
4180 
4181 wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4182 tar -xzf freetype-2.5.3.tar.gz
4183 
4184 Then run configure with '--with-freetype-src=<freetype_src>'. This will
4185 automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4186 builds or into '<freetype_src>/lib32' for 32-bit builds.
4187 Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4188 and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4189 
4190 Alternatively you can unpack the sources like this to use the default directory:
4191 
4192 tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4193       ;;
4194   esac
4195 }
4196 
4197 msys_help() {
4198   PKGHANDLER_COMMAND=""
4199 }
4200 
4201 apt_help() {
4202   case $1 in
4203     reduced)
4204       PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4205     devkit)
4206       PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4207     openjdk)
4208       PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4209     alsa)
4210       PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4211     cups)
4212       PKGHANDLER_COMMAND="sudo apt-get install libcups2-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     elf)
4224       PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4225   esac
4226 }
4227 
4228 yum_help() {
4229   case $1 in
4230     devkit)
4231       PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4232     openjdk)
4233       PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4234     alsa)
4235       PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4236     cups)
4237       PKGHANDLER_COMMAND="sudo yum install cups-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     elf)
4245       PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4246   esac
4247 }
4248 
4249 brew_help() {
4250   case $1 in
4251     openjdk)
4252       PKGHANDLER_COMMAND="brew cask install java" ;;
4253     freetype)
4254       PKGHANDLER_COMMAND="brew install freetype" ;;
4255     ccache)
4256       PKGHANDLER_COMMAND="brew install ccache" ;;
4257   esac
4258 }
4259 
4260 port_help() {
4261   PKGHANDLER_COMMAND=""
4262 }
4263 
4264 pkgutil_help() {
4265   PKGHANDLER_COMMAND=""
4266 }
4267 
4268 pkgadd_help() {
4269   PKGHANDLER_COMMAND=""
4270 }
4271 
4272 # This function will check if we're called from the "configure" wrapper while
4273 # printing --help. If so, we will print out additional information that can
4274 # only be extracted within the autoconf script, and then exit. This must be
4275 # called at the very beginning in configure.ac.
4276 
4277 
4278 
4279 
4280 
4281 
4282 #
4283 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4284 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4285 #
4286 # This code is free software; you can redistribute it and/or modify it
4287 # under the terms of the GNU General Public License version 2 only, as
4288 # published by the Free Software Foundation.  Oracle designates this
4289 # particular file as subject to the "Classpath" exception as provided
4290 # by Oracle in the LICENSE file that accompanied this code.
4291 #
4292 # This code is distributed in the hope that it will be useful, but WITHOUT
4293 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4294 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4295 # version 2 for more details (a copy is included in the LICENSE file that
4296 # accompanied this code).
4297 #
4298 # You should have received a copy of the GNU General Public License version
4299 # 2 along with this work; if not, write to the Free Software Foundation,
4300 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4301 #
4302 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4303 # or visit www.oracle.com if you need additional information or have any
4304 # questions.
4305 #
4306 
4307 # All valid JVM features, regardless of platform
4308 VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4309     graal fprof vm-structs jni-check services management all-gcs nmt cds \
4310     static-build link-time-opt aot"
4311 
4312 # All valid JVM variants
4313 VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4314 
4315 ###############################################################################
4316 # Check if the specified JVM variant should be built. To be used in shell if
4317 # constructs, like this:
4318 # if HOTSPOT_CHECK_JVM_VARIANT(server); then
4319 #
4320 # Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4321 
4322 # Definition kept in one line to allow inlining in if statements.
4323 # Additional [] needed to keep m4 from mangling shell constructs.
4324 
4325 
4326 ###############################################################################
4327 # Check if the specified JVM features are explicitly enabled. To be used in
4328 # shell if constructs, like this:
4329 # if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4330 #
4331 # Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4332 
4333 # Definition kept in one line to allow inlining in if statements.
4334 # Additional [] needed to keep m4 from mangling shell constructs.
4335 
4336 
4337 ###############################################################################
4338 # Check which variants of the JVM that we want to build. Available variants are:
4339 #   server: normal interpreter, and a tiered C1/C2 compiler
4340 #   client: normal interpreter, and C1 (no C2 compiler)
4341 #   minimal: reduced form of client with optional features stripped out
4342 #   core: normal interpreter only, no compiler
4343 #   zero: C++ based interpreter only, no compiler
4344 #   zeroshark: C++ based interpreter, and a llvm-based compiler
4345 #   custom: baseline JVM with no default features
4346 #
4347 
4348 
4349 ###############################################################################
4350 # Check if dtrace should be enabled and has all prerequisites present.
4351 #
4352 
4353 
4354 ################################################################################
4355 # Check if AOT should be enabled
4356 #
4357 
4358 
4359 ###############################################################################
4360 # Set up all JVM features for each JVM variant.
4361 #
4362 
4363 
4364 ###############################################################################
4365 # Validate JVM features once all setup is complete, including custom setup.
4366 #
4367 
4368 
4369 ################################################################################
4370 #
4371 # Specify which sources will be used to build the 64-bit ARM port
4372 #
4373 # --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4374 # --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4375 #
4376 
4377 
4378 
4379 ################################################################################
4380 # Check if gtest should be built
4381 #
4382 
4383 
4384 #
4385 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4386 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4387 #
4388 # This code is free software; you can redistribute it and/or modify it
4389 # under the terms of the GNU General Public License version 2 only, as
4390 # published by the Free Software Foundation.  Oracle designates this
4391 # particular file as subject to the "Classpath" exception as provided
4392 # by Oracle in the LICENSE file that accompanied this code.
4393 #
4394 # This code is distributed in the hope that it will be useful, but WITHOUT
4395 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4396 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4397 # version 2 for more details (a copy is included in the LICENSE file that
4398 # accompanied this code).
4399 #
4400 # You should have received a copy of the GNU General Public License version
4401 # 2 along with this work; if not, write to the Free Software Foundation,
4402 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4403 #
4404 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4405 # or visit www.oracle.com if you need additional information or have any
4406 # questions.
4407 #
4408 
4409 ###############################################################################
4410 # Check which variant of the JDK that we want to build.
4411 # Currently we have:
4412 #    normal:   standard edition
4413 # but the custom make system may add other variants
4414 #
4415 # Effectively the JDK variant gives a name to a specific set of
4416 # modules to compile into the JDK.
4417 
4418 
4419 ###############################################################################
4420 # Set the debug level
4421 #    release: no debug information, all optimizations, no asserts.
4422 #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4423 #    fastdebug: debug information (-g), all optimizations, all asserts
4424 #    slowdebug: debug information (-g), no optimizations, all asserts
4425 
4426 
4427 ###############################################################################
4428 #
4429 # Should we build only OpenJDK even if closed sources are present?
4430 #
4431 
4432 
4433 
4434 
4435 ###############################################################################
4436 #
4437 # Enable or disable the elliptic curve crypto implementation
4438 #
4439 
4440 
4441 
4442 
4443 ################################################################################
4444 #
4445 # Gcov coverage data for hotspot
4446 #
4447 
4448 
4449 ################################################################################
4450 #
4451 # Static build support.  When enabled will generate static
4452 # libraries instead of shared libraries for all JDK libs.
4453 #
4454 
4455 
4456 ################################################################################
4457 #
4458 # jlink options.
4459 # We always keep packaged modules in JDK image.
4460 #
4461 
4462 
4463 ################################################################################
4464 #
4465 # Check if building of the jtreg failure handler should be enabled.
4466 #
4467 
4468 
4469 ################################################################################
4470 #
4471 # Enable or disable generation of the classlist at build time
4472 #
4473 
4474 
4475 #
4476 # Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4477 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4478 #
4479 # This code is free software; you can redistribute it and/or modify it
4480 # under the terms of the GNU General Public License version 2 only, as
4481 # published by the Free Software Foundation.  Oracle designates this
4482 # particular file as subject to the "Classpath" exception as provided
4483 # by Oracle in the LICENSE file that accompanied this code.
4484 #
4485 # This code is distributed in the hope that it will be useful, but WITHOUT
4486 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4487 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4488 # version 2 for more details (a copy is included in the LICENSE file that
4489 # accompanied this code).
4490 #
4491 # You should have received a copy of the GNU General Public License version
4492 # 2 along with this work; if not, write to the Free Software Foundation,
4493 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4494 #
4495 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4496 # or visit www.oracle.com if you need additional information or have any
4497 # questions.
4498 #
4499 
4500 ###############################################################################
4501 #
4502 # Setup version numbers
4503 #
4504 
4505 # Verify that a given string represents a valid version number, and assign it
4506 # to a variable.
4507 
4508 # Argument 1: the variable to assign to
4509 # Argument 2: the value given by the user
4510 
4511 
4512 
4513 
4514 #
4515 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4516 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4517 #
4518 # This code is free software; you can redistribute it and/or modify it
4519 # under the terms of the GNU General Public License version 2 only, as
4520 # published by the Free Software Foundation.  Oracle designates this
4521 # particular file as subject to the "Classpath" exception as provided
4522 # by Oracle in the LICENSE file that accompanied this code.
4523 #
4524 # This code is distributed in the hope that it will be useful, but WITHOUT
4525 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4526 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4527 # version 2 for more details (a copy is included in the LICENSE file that
4528 # accompanied this code).
4529 #
4530 # You should have received a copy of the GNU General Public License version
4531 # 2 along with this work; if not, write to the Free Software Foundation,
4532 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4533 #
4534 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4535 # or visit www.oracle.com if you need additional information or have any
4536 # questions.
4537 #
4538 
4539 # Major library component reside in separate files.
4540 #
4541 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4542 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4543 #
4544 # This code is free software; you can redistribute it and/or modify it
4545 # under the terms of the GNU General Public License version 2 only, as
4546 # published by the Free Software Foundation.  Oracle designates this
4547 # particular file as subject to the "Classpath" exception as provided
4548 # by Oracle in the LICENSE file that accompanied this code.
4549 #
4550 # This code is distributed in the hope that it will be useful, but WITHOUT
4551 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4552 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4553 # version 2 for more details (a copy is included in the LICENSE file that
4554 # accompanied this code).
4555 #
4556 # You should have received a copy of the GNU General Public License version
4557 # 2 along with this work; if not, write to the Free Software Foundation,
4558 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4559 #
4560 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4561 # or visit www.oracle.com if you need additional information or have any
4562 # questions.
4563 #
4564 
4565 ################################################################################
4566 # Setup alsa (Advanced Linux Sound Architecture)
4567 ################################################################################
4568 
4569 
4570 #
4571 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4572 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4573 #
4574 # This code is free software; you can redistribute it and/or modify it
4575 # under the terms of the GNU General Public License version 2 only, as
4576 # published by the Free Software Foundation.  Oracle designates this
4577 # particular file as subject to the "Classpath" exception as provided
4578 # by Oracle in the LICENSE file that accompanied this code.
4579 #
4580 # This code is distributed in the hope that it will be useful, but WITHOUT
4581 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4582 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4583 # version 2 for more details (a copy is included in the LICENSE file that
4584 # accompanied this code).
4585 #
4586 # You should have received a copy of the GNU General Public License version
4587 # 2 along with this work; if not, write to the Free Software Foundation,
4588 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4589 #
4590 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4591 # or visit www.oracle.com if you need additional information or have any
4592 # questions.
4593 #
4594 
4595 ################################################################################
4596 # Setup bundled libraries.
4597 #
4598 # For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4599 # OpenJDK repository. Default is to use these libraries as bundled, but they
4600 # might be replaced by en external version by the user.
4601 ################################################################################
4602 
4603 
4604 ################################################################################
4605 # Setup libjpeg
4606 ################################################################################
4607 
4608 
4609 ################################################################################
4610 # Setup giflib
4611 ################################################################################
4612 
4613 
4614 ################################################################################
4615 # Setup libpng
4616 ################################################################################
4617 
4618 
4619 ################################################################################
4620 # Setup zlib
4621 ################################################################################
4622 
4623 
4624 ################################################################################
4625 # Setup lcms (Little CMS)
4626 ################################################################################
4627 
4628 
4629 #
4630 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4631 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4632 #
4633 # This code is free software; you can redistribute it and/or modify it
4634 # under the terms of the GNU General Public License version 2 only, as
4635 # published by the Free Software Foundation.  Oracle designates this
4636 # particular file as subject to the "Classpath" exception as provided
4637 # by Oracle in the LICENSE file that accompanied this code.
4638 #
4639 # This code is distributed in the hope that it will be useful, but WITHOUT
4640 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4641 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4642 # version 2 for more details (a copy is included in the LICENSE file that
4643 # accompanied this code).
4644 #
4645 # You should have received a copy of the GNU General Public License version
4646 # 2 along with this work; if not, write to the Free Software Foundation,
4647 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4648 #
4649 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4650 # or visit www.oracle.com if you need additional information or have any
4651 # questions.
4652 #
4653 
4654 ################################################################################
4655 # Setup cups (Common Unix Printing System)
4656 ################################################################################
4657 
4658 
4659 #
4660 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4661 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4662 #
4663 # This code is free software; you can redistribute it and/or modify it
4664 # under the terms of the GNU General Public License version 2 only, as
4665 # published by the Free Software Foundation.  Oracle designates this
4666 # particular file as subject to the "Classpath" exception as provided
4667 # by Oracle in the LICENSE file that accompanied this code.
4668 #
4669 # This code is distributed in the hope that it will be useful, but WITHOUT
4670 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4671 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4672 # version 2 for more details (a copy is included in the LICENSE file that
4673 # accompanied this code).
4674 #
4675 # You should have received a copy of the GNU General Public License version
4676 # 2 along with this work; if not, write to the Free Software Foundation,
4677 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4678 #
4679 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4680 # or visit www.oracle.com if you need additional information or have any
4681 # questions.
4682 #
4683 
4684 ################################################################################
4685 # Setup libffi (Foreign Function Interface)
4686 ################################################################################
4687 
4688 
4689 #
4690 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4691 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4692 #
4693 # This code is free software; you can redistribute it and/or modify it
4694 # under the terms of the GNU General Public License version 2 only, as
4695 # published by the Free Software Foundation.  Oracle designates this
4696 # particular file as subject to the "Classpath" exception as provided
4697 # by Oracle in the LICENSE file that accompanied this code.
4698 #
4699 # This code is distributed in the hope that it will be useful, but WITHOUT
4700 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4701 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4702 # version 2 for more details (a copy is included in the LICENSE file that
4703 # accompanied this code).
4704 #
4705 # You should have received a copy of the GNU General Public License version
4706 # 2 along with this work; if not, write to the Free Software Foundation,
4707 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4708 #
4709 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4710 # or visit www.oracle.com if you need additional information or have any
4711 # questions.
4712 #
4713 
4714 ################################################################################
4715 # Build the freetype lib from source
4716 ################################################################################
4717 
4718 
4719 ################################################################################
4720 # Check if a potential freeype library match is correct and usable
4721 ################################################################################
4722 
4723 
4724 ################################################################################
4725 # Setup freetype (The FreeType2 font rendering library)
4726 ################################################################################
4727 
4728 
4729 #
4730 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4731 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4732 #
4733 # This code is free software; you can redistribute it and/or modify it
4734 # under the terms of the GNU General Public License version 2 only, as
4735 # published by the Free Software Foundation.  Oracle designates this
4736 # particular file as subject to the "Classpath" exception as provided
4737 # by Oracle in the LICENSE file that accompanied this code.
4738 #
4739 # This code is distributed in the hope that it will be useful, but WITHOUT
4740 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4741 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4742 # version 2 for more details (a copy is included in the LICENSE file that
4743 # accompanied this code).
4744 #
4745 # You should have received a copy of the GNU General Public License version
4746 # 2 along with this work; if not, write to the Free Software Foundation,
4747 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4748 #
4749 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4750 # or visit www.oracle.com if you need additional information or have any
4751 # questions.
4752 #
4753 
4754 ################################################################################
4755 # Setup the standard C/C++ runtime libraries.
4756 #
4757 # Most importantly, determine if stdc++ should be linked statically or
4758 # dynamically.
4759 ################################################################################
4760 
4761 
4762 #
4763 # Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4764 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4765 #
4766 # This code is free software; you can redistribute it and/or modify it
4767 # under the terms of the GNU General Public License version 2 only, as
4768 # published by the Free Software Foundation.  Oracle designates this
4769 # particular file as subject to the "Classpath" exception as provided
4770 # by Oracle in the LICENSE file that accompanied this code.
4771 #
4772 # This code is distributed in the hope that it will be useful, but WITHOUT
4773 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4774 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4775 # version 2 for more details (a copy is included in the LICENSE file that
4776 # accompanied this code).
4777 #
4778 # You should have received a copy of the GNU General Public License version
4779 # 2 along with this work; if not, write to the Free Software Foundation,
4780 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4781 #
4782 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4783 # or visit www.oracle.com if you need additional information or have any
4784 # questions.
4785 #
4786 
4787 ################################################################################
4788 # Setup X11 Windows system
4789 ################################################################################
4790 
4791 
4792 #
4793 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4794 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4795 #
4796 # This code is free software; you can redistribute it and/or modify it
4797 # under the terms of the GNU General Public License version 2 only, as
4798 # published by the Free Software Foundation.  Oracle designates this
4799 # particular file as subject to the "Classpath" exception as provided
4800 # by Oracle in the LICENSE file that accompanied this code.
4801 #
4802 # This code is distributed in the hope that it will be useful, but WITHOUT
4803 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4804 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4805 # version 2 for more details (a copy is included in the LICENSE file that
4806 # accompanied this code).
4807 #
4808 # You should have received a copy of the GNU General Public License version
4809 # 2 along with this work; if not, write to the Free Software Foundation,
4810 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4811 #
4812 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4813 # or visit www.oracle.com if you need additional information or have any
4814 # questions.
4815 #
4816 
4817 ################################################################################
4818 # Setup libelf (ELF library)
4819 ################################################################################
4820 
4821 
4822 
4823 ################################################################################
4824 # Determine which libraries are needed for this configuration
4825 ################################################################################
4826 
4827 
4828 ################################################################################
4829 # Parse library options, and setup needed libraries
4830 ################################################################################
4831 
4832 
4833 ################################################################################
4834 # Setup llvm (Low-Level VM)
4835 ################################################################################
4836 
4837 
4838 ################################################################################
4839 # Setup various libraries, typically small system libraries
4840 ################################################################################
4841 
4842 
4843 ################################################################################
4844 # libstlport.so.1 is needed for running gtest on Solaris. Find it to
4845 # redistribute it in the test image.
4846 ################################################################################
4847 
4848 
4849 
4850 #
4851 # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4852 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4853 #
4854 # This code is free software; you can redistribute it and/or modify it
4855 # under the terms of the GNU General Public License version 2 only, as
4856 # published by the Free Software Foundation.  Oracle designates this
4857 # particular file as subject to the "Classpath" exception as provided
4858 # by Oracle in the LICENSE file that accompanied this code.
4859 #
4860 # This code is distributed in the hope that it will be useful, but WITHOUT
4861 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4862 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4863 # version 2 for more details (a copy is included in the LICENSE file that
4864 # accompanied this code).
4865 #
4866 # You should have received a copy of the GNU General Public License version
4867 # 2 along with this work; if not, write to the Free Software Foundation,
4868 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4869 #
4870 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4871 # or visit www.oracle.com if you need additional information or have any
4872 # questions.
4873 #
4874 
4875 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4876 # Converts autoconf style CPU name to OpenJDK style, into
4877 # VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4878 
4879 
4880 # Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4881 # Converts autoconf style OS name to OpenJDK style, into
4882 # VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4883 
4884 
4885 # Expects $host_os $host_cpu $build_os and $build_cpu
4886 # and $with_target_bits to have been setup!
4887 #
4888 # Translate the standard triplet(quadruplet) definition
4889 # of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4890 # OPENJDK_BUILD_OS, etc.
4891 
4892 
4893 # Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4894 # accordingly. Must be done after setting up build and target system, but before
4895 # doing anything else with these values.
4896 
4897 
4898 # Setup the legacy variables, for controlling the old makefiles.
4899 #
4900 
4901 
4902 # $1 - Either TARGET or BUILD to setup the variables for.
4903 
4904 
4905 
4906 
4907 
4908 
4909 #%%% Build and target systems %%%
4910 
4911 
4912 
4913 
4914 # Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4915 # Add -mX to various FLAGS variables.
4916 
4917 
4918 
4919 
4920 
4921 
4922 #
4923 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4924 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4925 #
4926 # This code is free software; you can redistribute it and/or modify it
4927 # under the terms of the GNU General Public License version 2 only, as
4928 # published by the Free Software Foundation.  Oracle designates this
4929 # particular file as subject to the "Classpath" exception as provided
4930 # by Oracle in the LICENSE file that accompanied this code.
4931 #
4932 # This code is distributed in the hope that it will be useful, but WITHOUT
4933 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4934 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4935 # version 2 for more details (a copy is included in the LICENSE file that
4936 # accompanied this code).
4937 #
4938 # You should have received a copy of the GNU General Public License version
4939 # 2 along with this work; if not, write to the Free Software Foundation,
4940 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4941 #
4942 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4943 # or visit www.oracle.com if you need additional information or have any
4944 # questions.
4945 #
4946 
4947 
4948 
4949 
4950 
4951 
4952 
4953 ################################################################################
4954 # Define a mechanism for importing extra prebuilt modules
4955 #
4956 
4957 
4958 
4959 #
4960 # Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4961 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4962 #
4963 # This code is free software; you can redistribute it and/or modify it
4964 # under the terms of the GNU General Public License version 2 only, as
4965 # published by the Free Software Foundation.  Oracle designates this
4966 # particular file as subject to the "Classpath" exception as provided
4967 # by Oracle in the LICENSE file that accompanied this code.
4968 #
4969 # This code is distributed in the hope that it will be useful, but WITHOUT
4970 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4971 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4972 # version 2 for more details (a copy is included in the LICENSE file that
4973 # accompanied this code).
4974 #
4975 # You should have received a copy of the GNU General Public License version
4976 # 2 along with this work; if not, write to the Free Software Foundation,
4977 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4978 #
4979 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4980 # or visit www.oracle.com if you need additional information or have any
4981 # questions.
4982 #
4983 
4984 ########################################################################
4985 # This file is responsible for detecting, verifying and setting up the
4986 # toolchain, i.e. the compiler, linker and related utilities. It will setup
4987 # proper paths to the binaries, but it will not setup any flags.
4988 #
4989 # The binaries used is determined by the toolchain type, which is the family of
4990 # compilers and related tools that are used.
4991 ########################################################################
4992 
4993 
4994 # All valid toolchains, regardless of platform (used by help.m4)
4995 VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4996 
4997 # These toolchains are valid on different platforms
4998 VALID_TOOLCHAINS_linux="gcc clang"
4999 VALID_TOOLCHAINS_solaris="solstudio"
5000 VALID_TOOLCHAINS_macosx="gcc clang"
5001 VALID_TOOLCHAINS_aix="xlc"
5002 VALID_TOOLCHAINS_windows="microsoft"
5003 
5004 # Toolchain descriptions
5005 TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
5006 TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
5007 TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
5008 TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
5009 TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
5010 
5011 # Minimum supported versions, empty means unspecified
5012 TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
5013 TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
5014 TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
5015 TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
5016 TOOLCHAIN_MINIMUM_VERSION_xlc=""
5017 
5018 # Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
5019 # Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
5020 # $1 - optional variable prefix for compiler and version variables (BUILD_)
5021 # $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
5022 
5023 
5024 # Check if the configured compiler (C and C++) is of a specific version or
5025 # newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
5026 #
5027 # Arguments:
5028 #   VERSION:   The version string to check against the found version
5029 #   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
5030 #   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
5031 #   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
5032 
5033 
5034 
5035 
5036 # Setup a number of variables describing how native output files are
5037 # named on this platform/toolchain.
5038 
5039 
5040 # Determine which toolchain type to use, and make sure it is valid for this
5041 # platform. Setup various information about the selected toolchain.
5042 
5043 
5044 # Before we start detecting the toolchain executables, we might need some
5045 # special setup, e.g. additional paths etc.
5046 
5047 
5048 # Restore path, etc
5049 
5050 
5051 # Check if a compiler is of the toolchain type we expect, and save the version
5052 # information from it. If the compiler does not match the expected type,
5053 # this function will abort using AC_MSG_ERROR. If it matches, the version will
5054 # be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
5055 # the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
5056 #
5057 # $1 = compiler to test (CC or CXX)
5058 # $2 = human readable name of compiler (C or C++)
5059 
5060 
5061 # Try to locate the given C or C++ compiler in the path, or otherwise.
5062 #
5063 # $1 = compiler to test (CC or CXX)
5064 # $2 = human readable name of compiler (C or C++)
5065 # $3 = compiler name to search for
5066 
5067 
5068 # Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5069 # preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5070 # archiver (AR). Verify that the compilers are correct according to the
5071 # toolchain type.
5072 
5073 
5074 # Setup additional tools that is considered a part of the toolchain, but not the
5075 # core part. Many of these are highly platform-specific and do not exist,
5076 # and/or are not needed on all platforms.
5077 
5078 
5079 # Setup the build tools (i.e, the compiler and linker used to build programs
5080 # that should be run on the build platform, not the target platform, as a build
5081 # helper). Since the non-cross-compile case uses the normal, target compilers
5082 # for this, we can only do this after these have been setup.
5083 
5084 
5085 # Do some additional checks on the detected tools.
5086 
5087 
5088 # Setup the JTReg Regression Test Harness.
5089 
5090 
5091 #
5092 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5093 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5094 #
5095 # This code is free software; you can redistribute it and/or modify it
5096 # under the terms of the GNU General Public License version 2 only, as
5097 # published by the Free Software Foundation.  Oracle designates this
5098 # particular file as subject to the "Classpath" exception as provided
5099 # by Oracle in the LICENSE file that accompanied this code.
5100 #
5101 # This code is distributed in the hope that it will be useful, but WITHOUT
5102 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5103 # FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5104 # version 2 for more details (a copy is included in the LICENSE file that
5105 # accompanied this code).
5106 #
5107 # You should have received a copy of the GNU General Public License version
5108 # 2 along with this work; if not, write to the Free Software Foundation,
5109 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5110 #
5111 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5112 # or visit www.oracle.com if you need additional information or have any
5113 # questions.
5114 #
5115 
5116 ################################################################################
5117 # The order of these defines the priority by which we try to find them.
5118 VALID_VS_VERSIONS="2013 2012 2010"
5119 
5120 VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5121 VS_VERSION_INTERNAL_2010=100
5122 VS_MSVCR_2010=msvcr100.dll
5123 # We don't use msvcp on Visual Studio 2010
5124 #VS_MSVCP_2010=msvcp100.dll
5125 VS_ENVVAR_2010="VS100COMNTOOLS"
5126 VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5127 VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5128 VS_VS_PLATFORM_NAME_2010="v100"
5129 VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5130 
5131 VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5132 VS_VERSION_INTERNAL_2012=110
5133 VS_MSVCR_2012=msvcr110.dll
5134 VS_MSVCP_2012=msvcp110.dll
5135 VS_ENVVAR_2012="VS110COMNTOOLS"
5136 VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5137 VS_SDK_INSTALLDIR_2012=
5138 VS_VS_PLATFORM_NAME_2012="v110"
5139 VS_SDK_PLATFORM_NAME_2012=
5140 
5141 VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5142 VS_VERSION_INTERNAL_2013=120
5143 VS_MSVCR_2013=msvcr120.dll
5144 VS_MSVCP_2013=msvcp120.dll
5145 VS_ENVVAR_2013="VS120COMNTOOLS"
5146 VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5147 VS_SDK_INSTALLDIR_2013=
5148 VS_VS_PLATFORM_NAME_2013="v120"
5149 VS_SDK_PLATFORM_NAME_2013=
5150 
5151 ################################################################################
5152 
5153 
5154 
5155 ################################################################################
5156 
5157 
5158 
5159 ################################################################################
5160 # Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5161 # build environment and assigns it to VS_ENV_CMD
5162 
5163 
5164 ################################################################################
5165 
5166 
5167 
5168 ################################################################################
5169 # Check if the VS env variables were setup prior to running configure.
5170 # If not, then find vcvarsall.bat and run it automatically, and integrate
5171 # the set env variables into the spec file.
5172 
5173 
5174 
5175 
5176 
5177 
5178 
5179 
5180 
5181 
5182 
5183 
5184 
5185 
5186 # This line needs to be here, verbatim, after all includes and the dummy hook
5187 # definitions. It is replaced with custom functionality when building
5188 # custom sources.
5189 #CUSTOM_AUTOCONF_INCLUDE
5190 
5191 # Do not change or remove the following line, it is needed for consistency checks:
5192 DATE_WHEN_GENERATED=1496926402
5193 
5194 ###############################################################################
5195 #
5196 # Initialization / Boot-strapping
5197 #
5198 # The bootstrapping process needs to solve the "chicken or the egg" problem,
5199 # thus it jumps back and forth, each time gaining something needed later on.
5200 #
5201 ###############################################################################
5202 
5203 # If we are requested to print additional help, do that and then exit.
5204 # This must be the very first call.
5205 
5206   if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5207 
5208     # Print available toolchains
5209     $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5210     $PRINTF "Which are valid to use depends on the build platform.\n"
5211     for toolchain in $VALID_TOOLCHAINS_all; do
5212       # Use indirect variable referencing
5213       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5214       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5215       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5216     done
5217     $PRINTF "\n"
5218 
5219     # Print available jvm features
5220     $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5221     $PRINTF "Which are valid to use depends on the target platform.\n  "
5222     $PRINTF "%s " $VALID_JVM_FEATURES
5223     $PRINTF "\n"
5224 
5225     # And now exit directly
5226     exit 0
5227   fi
5228 
5229 
5230 # Basic initialization that must happen first of all in the normal process.
5231 
5232   # Save the original command line. This is passed to us by the wrapper configure script.
5233 
5234   # Save the path variable before it gets changed
5235   ORIGINAL_PATH="$PATH"
5236 
5237   DATE_WHEN_CONFIGURED=`LANG=C date`
5238 
5239   { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5240 $as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5241   { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5242 $as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5243 
5244 
5245   # Start with tools that do not need have cross compilation support
5246   # and can be expected to be found in the default PATH. These tools are
5247   # used by configure.
5248 
5249   # First are all the simple required tools.
5250 
5251 
5252 
5253   # Publish this variable in the help.
5254 
5255 
5256   if [ -z "${BASENAME+x}" ]; then
5257     # The variable is not set by user, try to locate tool using the code snippet
5258     for ac_prog in basename
5259 do
5260   # Extract the first word of "$ac_prog", so it can be a program name with args.
5261 set dummy $ac_prog; ac_word=$2
5262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5263 $as_echo_n "checking for $ac_word... " >&6; }
5264 if ${ac_cv_path_BASENAME+:} false; then :
5265   $as_echo_n "(cached) " >&6
5266 else
5267   case $BASENAME in
5268   [\\/]* | ?:[\\/]*)
5269   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5270   ;;
5271   *)
5272   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5273 for as_dir in $PATH
5274 do
5275   IFS=$as_save_IFS
5276   test -z "$as_dir" && as_dir=.
5277     for ac_exec_ext in '' $ac_executable_extensions; do
5278   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5279     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5280     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5281     break 2
5282   fi
5283 done
5284   done
5285 IFS=$as_save_IFS
5286 
5287   ;;
5288 esac
5289 fi
5290 BASENAME=$ac_cv_path_BASENAME
5291 if test -n "$BASENAME"; then
5292   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5293 $as_echo "$BASENAME" >&6; }
5294 else
5295   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296 $as_echo "no" >&6; }
5297 fi
5298 
5299 
5300   test -n "$BASENAME" && break
5301 done
5302 
5303   else
5304     # The variable is set, but is it from the command line or the environment?
5305 
5306     # Try to remove the string !BASENAME! from our list.
5307     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5308     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5309       # If it failed, the variable was not from the command line. Ignore it,
5310       # but warn the user (except for BASH, which is always set by the calling BASH).
5311       if test "xBASENAME" != xBASH; then
5312         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5313 $as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5314       fi
5315       # Try to locate tool using the code snippet
5316       for ac_prog in basename
5317 do
5318   # Extract the first word of "$ac_prog", so it can be a program name with args.
5319 set dummy $ac_prog; ac_word=$2
5320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5321 $as_echo_n "checking for $ac_word... " >&6; }
5322 if ${ac_cv_path_BASENAME+:} false; then :
5323   $as_echo_n "(cached) " >&6
5324 else
5325   case $BASENAME in
5326   [\\/]* | ?:[\\/]*)
5327   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5328   ;;
5329   *)
5330   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5331 for as_dir in $PATH
5332 do
5333   IFS=$as_save_IFS
5334   test -z "$as_dir" && as_dir=.
5335     for ac_exec_ext in '' $ac_executable_extensions; do
5336   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5337     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5338     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5339     break 2
5340   fi
5341 done
5342   done
5343 IFS=$as_save_IFS
5344 
5345   ;;
5346 esac
5347 fi
5348 BASENAME=$ac_cv_path_BASENAME
5349 if test -n "$BASENAME"; then
5350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5351 $as_echo "$BASENAME" >&6; }
5352 else
5353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5354 $as_echo "no" >&6; }
5355 fi
5356 
5357 
5358   test -n "$BASENAME" && break
5359 done
5360 
5361     else
5362       # If it succeeded, then it was overridden by the user. We will use it
5363       # for the tool.
5364 
5365       # First remove it from the list of overridden variables, so we can test
5366       # for unknown variables in the end.
5367       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5368 
5369       # Check if we try to supply an empty value
5370       if test "x$BASENAME" = x; then
5371         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5372 $as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5373         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5374 $as_echo_n "checking for BASENAME... " >&6; }
5375         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5376 $as_echo "disabled" >&6; }
5377       else
5378         # Check if the provided tool contains a complete path.
5379         tool_specified="$BASENAME"
5380         tool_basename="${tool_specified##*/}"
5381         if test "x$tool_basename" = "x$tool_specified"; then
5382           # A command without a complete path is provided, search $PATH.
5383           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5384 $as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5385           # Extract the first word of "$tool_basename", so it can be a program name with args.
5386 set dummy $tool_basename; ac_word=$2
5387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5388 $as_echo_n "checking for $ac_word... " >&6; }
5389 if ${ac_cv_path_BASENAME+:} false; then :
5390   $as_echo_n "(cached) " >&6
5391 else
5392   case $BASENAME in
5393   [\\/]* | ?:[\\/]*)
5394   ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5395   ;;
5396   *)
5397   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5398 for as_dir in $PATH
5399 do
5400   IFS=$as_save_IFS
5401   test -z "$as_dir" && as_dir=.
5402     for ac_exec_ext in '' $ac_executable_extensions; do
5403   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5404     ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5405     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5406     break 2
5407   fi
5408 done
5409   done
5410 IFS=$as_save_IFS
5411 
5412   ;;
5413 esac
5414 fi
5415 BASENAME=$ac_cv_path_BASENAME
5416 if test -n "$BASENAME"; then
5417   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5418 $as_echo "$BASENAME" >&6; }
5419 else
5420   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5421 $as_echo "no" >&6; }
5422 fi
5423 
5424 
5425           if test "x$BASENAME" = x; then
5426             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5427           fi
5428         else
5429           # Otherwise we believe it is a complete path. Use it as it is.
5430           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5431 $as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5432           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5433 $as_echo_n "checking for BASENAME... " >&6; }
5434           if test ! -x "$tool_specified"; then
5435             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5436 $as_echo "not found" >&6; }
5437             as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5438           fi
5439           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5440 $as_echo "$tool_specified" >&6; }
5441         fi
5442       fi
5443     fi
5444 
5445   fi
5446 
5447 
5448 
5449   if test "x$BASENAME" = x; then
5450     as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5451   fi
5452 
5453 
5454 
5455 
5456 
5457   # Publish this variable in the help.
5458 
5459 
5460   if [ -z "${BASH+x}" ]; then
5461     # The variable is not set by user, try to locate tool using the code snippet
5462     for ac_prog in bash
5463 do
5464   # Extract the first word of "$ac_prog", so it can be a program name with args.
5465 set dummy $ac_prog; ac_word=$2
5466 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5467 $as_echo_n "checking for $ac_word... " >&6; }
5468 if ${ac_cv_path_BASH+:} false; then :
5469   $as_echo_n "(cached) " >&6
5470 else
5471   case $BASH in
5472   [\\/]* | ?:[\\/]*)
5473   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5474   ;;
5475   *)
5476   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5477 for as_dir in $PATH
5478 do
5479   IFS=$as_save_IFS
5480   test -z "$as_dir" && as_dir=.
5481     for ac_exec_ext in '' $ac_executable_extensions; do
5482   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5483     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5484     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5485     break 2
5486   fi
5487 done
5488   done
5489 IFS=$as_save_IFS
5490 
5491   ;;
5492 esac
5493 fi
5494 BASH=$ac_cv_path_BASH
5495 if test -n "$BASH"; then
5496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5497 $as_echo "$BASH" >&6; }
5498 else
5499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5500 $as_echo "no" >&6; }
5501 fi
5502 
5503 
5504   test -n "$BASH" && break
5505 done
5506 
5507   else
5508     # The variable is set, but is it from the command line or the environment?
5509 
5510     # Try to remove the string !BASH! from our list.
5511     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5512     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5513       # If it failed, the variable was not from the command line. Ignore it,
5514       # but warn the user (except for BASH, which is always set by the calling BASH).
5515       if test "xBASH" != xBASH; then
5516         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5517 $as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5518       fi
5519       # Try to locate tool using the code snippet
5520       for ac_prog in bash
5521 do
5522   # Extract the first word of "$ac_prog", so it can be a program name with args.
5523 set dummy $ac_prog; ac_word=$2
5524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5525 $as_echo_n "checking for $ac_word... " >&6; }
5526 if ${ac_cv_path_BASH+:} false; then :
5527   $as_echo_n "(cached) " >&6
5528 else
5529   case $BASH in
5530   [\\/]* | ?:[\\/]*)
5531   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5532   ;;
5533   *)
5534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5535 for as_dir in $PATH
5536 do
5537   IFS=$as_save_IFS
5538   test -z "$as_dir" && as_dir=.
5539     for ac_exec_ext in '' $ac_executable_extensions; do
5540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5541     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5543     break 2
5544   fi
5545 done
5546   done
5547 IFS=$as_save_IFS
5548 
5549   ;;
5550 esac
5551 fi
5552 BASH=$ac_cv_path_BASH
5553 if test -n "$BASH"; then
5554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5555 $as_echo "$BASH" >&6; }
5556 else
5557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5558 $as_echo "no" >&6; }
5559 fi
5560 
5561 
5562   test -n "$BASH" && break
5563 done
5564 
5565     else
5566       # If it succeeded, then it was overridden by the user. We will use it
5567       # for the tool.
5568 
5569       # First remove it from the list of overridden variables, so we can test
5570       # for unknown variables in the end.
5571       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5572 
5573       # Check if we try to supply an empty value
5574       if test "x$BASH" = x; then
5575         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5576 $as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5577         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5578 $as_echo_n "checking for BASH... " >&6; }
5579         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5580 $as_echo "disabled" >&6; }
5581       else
5582         # Check if the provided tool contains a complete path.
5583         tool_specified="$BASH"
5584         tool_basename="${tool_specified##*/}"
5585         if test "x$tool_basename" = "x$tool_specified"; then
5586           # A command without a complete path is provided, search $PATH.
5587           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5588 $as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5589           # Extract the first word of "$tool_basename", so it can be a program name with args.
5590 set dummy $tool_basename; ac_word=$2
5591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5592 $as_echo_n "checking for $ac_word... " >&6; }
5593 if ${ac_cv_path_BASH+:} false; then :
5594   $as_echo_n "(cached) " >&6
5595 else
5596   case $BASH in
5597   [\\/]* | ?:[\\/]*)
5598   ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5599   ;;
5600   *)
5601   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5602 for as_dir in $PATH
5603 do
5604   IFS=$as_save_IFS
5605   test -z "$as_dir" && as_dir=.
5606     for ac_exec_ext in '' $ac_executable_extensions; do
5607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5608     ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5610     break 2
5611   fi
5612 done
5613   done
5614 IFS=$as_save_IFS
5615 
5616   ;;
5617 esac
5618 fi
5619 BASH=$ac_cv_path_BASH
5620 if test -n "$BASH"; then
5621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5622 $as_echo "$BASH" >&6; }
5623 else
5624   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5625 $as_echo "no" >&6; }
5626 fi
5627 
5628 
5629           if test "x$BASH" = x; then
5630             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5631           fi
5632         else
5633           # Otherwise we believe it is a complete path. Use it as it is.
5634           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5635 $as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5636           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5637 $as_echo_n "checking for BASH... " >&6; }
5638           if test ! -x "$tool_specified"; then
5639             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5640 $as_echo "not found" >&6; }
5641             as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5642           fi
5643           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5644 $as_echo "$tool_specified" >&6; }
5645         fi
5646       fi
5647     fi
5648 
5649   fi
5650 
5651 
5652 
5653   if test "x$BASH" = x; then
5654     as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5655   fi
5656 
5657 
5658 
5659 
5660 
5661   # Publish this variable in the help.
5662 
5663 
5664   if [ -z "${CAT+x}" ]; then
5665     # The variable is not set by user, try to locate tool using the code snippet
5666     for ac_prog in cat
5667 do
5668   # Extract the first word of "$ac_prog", so it can be a program name with args.
5669 set dummy $ac_prog; ac_word=$2
5670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5671 $as_echo_n "checking for $ac_word... " >&6; }
5672 if ${ac_cv_path_CAT+:} false; then :
5673   $as_echo_n "(cached) " >&6
5674 else
5675   case $CAT in
5676   [\\/]* | ?:[\\/]*)
5677   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5678   ;;
5679   *)
5680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5681 for as_dir in $PATH
5682 do
5683   IFS=$as_save_IFS
5684   test -z "$as_dir" && as_dir=.
5685     for ac_exec_ext in '' $ac_executable_extensions; do
5686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5687     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5689     break 2
5690   fi
5691 done
5692   done
5693 IFS=$as_save_IFS
5694 
5695   ;;
5696 esac
5697 fi
5698 CAT=$ac_cv_path_CAT
5699 if test -n "$CAT"; then
5700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5701 $as_echo "$CAT" >&6; }
5702 else
5703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704 $as_echo "no" >&6; }
5705 fi
5706 
5707 
5708   test -n "$CAT" && break
5709 done
5710 
5711   else
5712     # The variable is set, but is it from the command line or the environment?
5713 
5714     # Try to remove the string !CAT! from our list.
5715     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5716     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5717       # If it failed, the variable was not from the command line. Ignore it,
5718       # but warn the user (except for BASH, which is always set by the calling BASH).
5719       if test "xCAT" != xBASH; then
5720         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5721 $as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5722       fi
5723       # Try to locate tool using the code snippet
5724       for ac_prog in cat
5725 do
5726   # Extract the first word of "$ac_prog", so it can be a program name with args.
5727 set dummy $ac_prog; ac_word=$2
5728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5729 $as_echo_n "checking for $ac_word... " >&6; }
5730 if ${ac_cv_path_CAT+:} false; then :
5731   $as_echo_n "(cached) " >&6
5732 else
5733   case $CAT in
5734   [\\/]* | ?:[\\/]*)
5735   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5736   ;;
5737   *)
5738   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5739 for as_dir in $PATH
5740 do
5741   IFS=$as_save_IFS
5742   test -z "$as_dir" && as_dir=.
5743     for ac_exec_ext in '' $ac_executable_extensions; do
5744   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5745     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5747     break 2
5748   fi
5749 done
5750   done
5751 IFS=$as_save_IFS
5752 
5753   ;;
5754 esac
5755 fi
5756 CAT=$ac_cv_path_CAT
5757 if test -n "$CAT"; then
5758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5759 $as_echo "$CAT" >&6; }
5760 else
5761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5762 $as_echo "no" >&6; }
5763 fi
5764 
5765 
5766   test -n "$CAT" && break
5767 done
5768 
5769     else
5770       # If it succeeded, then it was overridden by the user. We will use it
5771       # for the tool.
5772 
5773       # First remove it from the list of overridden variables, so we can test
5774       # for unknown variables in the end.
5775       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5776 
5777       # Check if we try to supply an empty value
5778       if test "x$CAT" = x; then
5779         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5780 $as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5781         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5782 $as_echo_n "checking for CAT... " >&6; }
5783         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5784 $as_echo "disabled" >&6; }
5785       else
5786         # Check if the provided tool contains a complete path.
5787         tool_specified="$CAT"
5788         tool_basename="${tool_specified##*/}"
5789         if test "x$tool_basename" = "x$tool_specified"; then
5790           # A command without a complete path is provided, search $PATH.
5791           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5792 $as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5793           # Extract the first word of "$tool_basename", so it can be a program name with args.
5794 set dummy $tool_basename; ac_word=$2
5795 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5796 $as_echo_n "checking for $ac_word... " >&6; }
5797 if ${ac_cv_path_CAT+:} false; then :
5798   $as_echo_n "(cached) " >&6
5799 else
5800   case $CAT in
5801   [\\/]* | ?:[\\/]*)
5802   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5803   ;;
5804   *)
5805   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5806 for as_dir in $PATH
5807 do
5808   IFS=$as_save_IFS
5809   test -z "$as_dir" && as_dir=.
5810     for ac_exec_ext in '' $ac_executable_extensions; do
5811   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5812     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5813     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5814     break 2
5815   fi
5816 done
5817   done
5818 IFS=$as_save_IFS
5819 
5820   ;;
5821 esac
5822 fi
5823 CAT=$ac_cv_path_CAT
5824 if test -n "$CAT"; then
5825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5826 $as_echo "$CAT" >&6; }
5827 else
5828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5829 $as_echo "no" >&6; }
5830 fi
5831 
5832 
5833           if test "x$CAT" = x; then
5834             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5835           fi
5836         else
5837           # Otherwise we believe it is a complete path. Use it as it is.
5838           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5839 $as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5840           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5841 $as_echo_n "checking for CAT... " >&6; }
5842           if test ! -x "$tool_specified"; then
5843             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5844 $as_echo "not found" >&6; }
5845             as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5846           fi
5847           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5848 $as_echo "$tool_specified" >&6; }
5849         fi
5850       fi
5851     fi
5852 
5853   fi
5854 
5855 
5856 
5857   if test "x$CAT" = x; then
5858     as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5859   fi
5860 
5861 
5862 
5863 
5864 
5865   # Publish this variable in the help.
5866 
5867 
5868   if [ -z "${CHMOD+x}" ]; then
5869     # The variable is not set by user, try to locate tool using the code snippet
5870     for ac_prog in chmod
5871 do
5872   # Extract the first word of "$ac_prog", so it can be a program name with args.
5873 set dummy $ac_prog; ac_word=$2
5874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5875 $as_echo_n "checking for $ac_word... " >&6; }
5876 if ${ac_cv_path_CHMOD+:} false; then :
5877   $as_echo_n "(cached) " >&6
5878 else
5879   case $CHMOD in
5880   [\\/]* | ?:[\\/]*)
5881   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5882   ;;
5883   *)
5884   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5885 for as_dir in $PATH
5886 do
5887   IFS=$as_save_IFS
5888   test -z "$as_dir" && as_dir=.
5889     for ac_exec_ext in '' $ac_executable_extensions; do
5890   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5891     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5892     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5893     break 2
5894   fi
5895 done
5896   done
5897 IFS=$as_save_IFS
5898 
5899   ;;
5900 esac
5901 fi
5902 CHMOD=$ac_cv_path_CHMOD
5903 if test -n "$CHMOD"; then
5904   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5905 $as_echo "$CHMOD" >&6; }
5906 else
5907   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5908 $as_echo "no" >&6; }
5909 fi
5910 
5911 
5912   test -n "$CHMOD" && break
5913 done
5914 
5915   else
5916     # The variable is set, but is it from the command line or the environment?
5917 
5918     # Try to remove the string !CHMOD! from our list.
5919     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5920     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5921       # If it failed, the variable was not from the command line. Ignore it,
5922       # but warn the user (except for BASH, which is always set by the calling BASH).
5923       if test "xCHMOD" != xBASH; then
5924         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5925 $as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5926       fi
5927       # Try to locate tool using the code snippet
5928       for ac_prog in chmod
5929 do
5930   # Extract the first word of "$ac_prog", so it can be a program name with args.
5931 set dummy $ac_prog; ac_word=$2
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5933 $as_echo_n "checking for $ac_word... " >&6; }
5934 if ${ac_cv_path_CHMOD+:} false; then :
5935   $as_echo_n "(cached) " >&6
5936 else
5937   case $CHMOD in
5938   [\\/]* | ?:[\\/]*)
5939   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5940   ;;
5941   *)
5942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5943 for as_dir in $PATH
5944 do
5945   IFS=$as_save_IFS
5946   test -z "$as_dir" && as_dir=.
5947     for ac_exec_ext in '' $ac_executable_extensions; do
5948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5949     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5951     break 2
5952   fi
5953 done
5954   done
5955 IFS=$as_save_IFS
5956 
5957   ;;
5958 esac
5959 fi
5960 CHMOD=$ac_cv_path_CHMOD
5961 if test -n "$CHMOD"; then
5962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5963 $as_echo "$CHMOD" >&6; }
5964 else
5965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5966 $as_echo "no" >&6; }
5967 fi
5968 
5969 
5970   test -n "$CHMOD" && break
5971 done
5972 
5973     else
5974       # If it succeeded, then it was overridden by the user. We will use it
5975       # for the tool.
5976 
5977       # First remove it from the list of overridden variables, so we can test
5978       # for unknown variables in the end.
5979       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5980 
5981       # Check if we try to supply an empty value
5982       if test "x$CHMOD" = x; then
5983         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5984 $as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5985         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5986 $as_echo_n "checking for CHMOD... " >&6; }
5987         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5988 $as_echo "disabled" >&6; }
5989       else
5990         # Check if the provided tool contains a complete path.
5991         tool_specified="$CHMOD"
5992         tool_basename="${tool_specified##*/}"
5993         if test "x$tool_basename" = "x$tool_specified"; then
5994           # A command without a complete path is provided, search $PATH.
5995           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5996 $as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5997           # Extract the first word of "$tool_basename", so it can be a program name with args.
5998 set dummy $tool_basename; ac_word=$2
5999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6000 $as_echo_n "checking for $ac_word... " >&6; }
6001 if ${ac_cv_path_CHMOD+:} false; then :
6002   $as_echo_n "(cached) " >&6
6003 else
6004   case $CHMOD in
6005   [\\/]* | ?:[\\/]*)
6006   ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
6007   ;;
6008   *)
6009   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6010 for as_dir in $PATH
6011 do
6012   IFS=$as_save_IFS
6013   test -z "$as_dir" && as_dir=.
6014     for ac_exec_ext in '' $ac_executable_extensions; do
6015   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6016     ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
6017     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6018     break 2
6019   fi
6020 done
6021   done
6022 IFS=$as_save_IFS
6023 
6024   ;;
6025 esac
6026 fi
6027 CHMOD=$ac_cv_path_CHMOD
6028 if test -n "$CHMOD"; then
6029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
6030 $as_echo "$CHMOD" >&6; }
6031 else
6032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6033 $as_echo "no" >&6; }
6034 fi
6035 
6036 
6037           if test "x$CHMOD" = x; then
6038             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6039           fi
6040         else
6041           # Otherwise we believe it is a complete path. Use it as it is.
6042           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
6043 $as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
6044           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
6045 $as_echo_n "checking for CHMOD... " >&6; }
6046           if test ! -x "$tool_specified"; then
6047             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6048 $as_echo "not found" >&6; }
6049             as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
6050           fi
6051           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6052 $as_echo "$tool_specified" >&6; }
6053         fi
6054       fi
6055     fi
6056 
6057   fi
6058 
6059 
6060 
6061   if test "x$CHMOD" = x; then
6062     as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6063   fi
6064 
6065 
6066 
6067 
6068 
6069   # Publish this variable in the help.
6070 
6071 
6072   if [ -z "${CMP+x}" ]; then
6073     # The variable is not set by user, try to locate tool using the code snippet
6074     for ac_prog in cmp
6075 do
6076   # Extract the first word of "$ac_prog", so it can be a program name with args.
6077 set dummy $ac_prog; ac_word=$2
6078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6079 $as_echo_n "checking for $ac_word... " >&6; }
6080 if ${ac_cv_path_CMP+:} false; then :
6081   $as_echo_n "(cached) " >&6
6082 else
6083   case $CMP in
6084   [\\/]* | ?:[\\/]*)
6085   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6086   ;;
6087   *)
6088   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089 for as_dir in $PATH
6090 do
6091   IFS=$as_save_IFS
6092   test -z "$as_dir" && as_dir=.
6093     for ac_exec_ext in '' $ac_executable_extensions; do
6094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6095     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6097     break 2
6098   fi
6099 done
6100   done
6101 IFS=$as_save_IFS
6102 
6103   ;;
6104 esac
6105 fi
6106 CMP=$ac_cv_path_CMP
6107 if test -n "$CMP"; then
6108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6109 $as_echo "$CMP" >&6; }
6110 else
6111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112 $as_echo "no" >&6; }
6113 fi
6114 
6115 
6116   test -n "$CMP" && break
6117 done
6118 
6119   else
6120     # The variable is set, but is it from the command line or the environment?
6121 
6122     # Try to remove the string !CMP! from our list.
6123     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6124     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6125       # If it failed, the variable was not from the command line. Ignore it,
6126       # but warn the user (except for BASH, which is always set by the calling BASH).
6127       if test "xCMP" != xBASH; then
6128         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6129 $as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6130       fi
6131       # Try to locate tool using the code snippet
6132       for ac_prog in cmp
6133 do
6134   # Extract the first word of "$ac_prog", so it can be a program name with args.
6135 set dummy $ac_prog; ac_word=$2
6136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6137 $as_echo_n "checking for $ac_word... " >&6; }
6138 if ${ac_cv_path_CMP+:} false; then :
6139   $as_echo_n "(cached) " >&6
6140 else
6141   case $CMP in
6142   [\\/]* | ?:[\\/]*)
6143   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6144   ;;
6145   *)
6146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147 for as_dir in $PATH
6148 do
6149   IFS=$as_save_IFS
6150   test -z "$as_dir" && as_dir=.
6151     for ac_exec_ext in '' $ac_executable_extensions; do
6152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6153     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6155     break 2
6156   fi
6157 done
6158   done
6159 IFS=$as_save_IFS
6160 
6161   ;;
6162 esac
6163 fi
6164 CMP=$ac_cv_path_CMP
6165 if test -n "$CMP"; then
6166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6167 $as_echo "$CMP" >&6; }
6168 else
6169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6170 $as_echo "no" >&6; }
6171 fi
6172 
6173 
6174   test -n "$CMP" && break
6175 done
6176 
6177     else
6178       # If it succeeded, then it was overridden by the user. We will use it
6179       # for the tool.
6180 
6181       # First remove it from the list of overridden variables, so we can test
6182       # for unknown variables in the end.
6183       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6184 
6185       # Check if we try to supply an empty value
6186       if test "x$CMP" = x; then
6187         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6188 $as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6189         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6190 $as_echo_n "checking for CMP... " >&6; }
6191         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6192 $as_echo "disabled" >&6; }
6193       else
6194         # Check if the provided tool contains a complete path.
6195         tool_specified="$CMP"
6196         tool_basename="${tool_specified##*/}"
6197         if test "x$tool_basename" = "x$tool_specified"; then
6198           # A command without a complete path is provided, search $PATH.
6199           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6200 $as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6201           # Extract the first word of "$tool_basename", so it can be a program name with args.
6202 set dummy $tool_basename; ac_word=$2
6203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6204 $as_echo_n "checking for $ac_word... " >&6; }
6205 if ${ac_cv_path_CMP+:} false; then :
6206   $as_echo_n "(cached) " >&6
6207 else
6208   case $CMP in
6209   [\\/]* | ?:[\\/]*)
6210   ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6211   ;;
6212   *)
6213   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6214 for as_dir in $PATH
6215 do
6216   IFS=$as_save_IFS
6217   test -z "$as_dir" && as_dir=.
6218     for ac_exec_ext in '' $ac_executable_extensions; do
6219   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6220     ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6221     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6222     break 2
6223   fi
6224 done
6225   done
6226 IFS=$as_save_IFS
6227 
6228   ;;
6229 esac
6230 fi
6231 CMP=$ac_cv_path_CMP
6232 if test -n "$CMP"; then
6233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6234 $as_echo "$CMP" >&6; }
6235 else
6236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237 $as_echo "no" >&6; }
6238 fi
6239 
6240 
6241           if test "x$CMP" = x; then
6242             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6243           fi
6244         else
6245           # Otherwise we believe it is a complete path. Use it as it is.
6246           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6247 $as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6248           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6249 $as_echo_n "checking for CMP... " >&6; }
6250           if test ! -x "$tool_specified"; then
6251             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6252 $as_echo "not found" >&6; }
6253             as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6254           fi
6255           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6256 $as_echo "$tool_specified" >&6; }
6257         fi
6258       fi
6259     fi
6260 
6261   fi
6262 
6263 
6264 
6265   if test "x$CMP" = x; then
6266     as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6267   fi
6268 
6269 
6270 
6271 
6272 
6273   # Publish this variable in the help.
6274 
6275 
6276   if [ -z "${COMM+x}" ]; then
6277     # The variable is not set by user, try to locate tool using the code snippet
6278     for ac_prog in comm
6279 do
6280   # Extract the first word of "$ac_prog", so it can be a program name with args.
6281 set dummy $ac_prog; ac_word=$2
6282 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6283 $as_echo_n "checking for $ac_word... " >&6; }
6284 if ${ac_cv_path_COMM+:} false; then :
6285   $as_echo_n "(cached) " >&6
6286 else
6287   case $COMM in
6288   [\\/]* | ?:[\\/]*)
6289   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6290   ;;
6291   *)
6292   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6293 for as_dir in $PATH
6294 do
6295   IFS=$as_save_IFS
6296   test -z "$as_dir" && as_dir=.
6297     for ac_exec_ext in '' $ac_executable_extensions; do
6298   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6299     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6300     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6301     break 2
6302   fi
6303 done
6304   done
6305 IFS=$as_save_IFS
6306 
6307   ;;
6308 esac
6309 fi
6310 COMM=$ac_cv_path_COMM
6311 if test -n "$COMM"; then
6312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6313 $as_echo "$COMM" >&6; }
6314 else
6315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6316 $as_echo "no" >&6; }
6317 fi
6318 
6319 
6320   test -n "$COMM" && break
6321 done
6322 
6323   else
6324     # The variable is set, but is it from the command line or the environment?
6325 
6326     # Try to remove the string !COMM! from our list.
6327     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6328     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6329       # If it failed, the variable was not from the command line. Ignore it,
6330       # but warn the user (except for BASH, which is always set by the calling BASH).
6331       if test "xCOMM" != xBASH; then
6332         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6333 $as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6334       fi
6335       # Try to locate tool using the code snippet
6336       for ac_prog in comm
6337 do
6338   # Extract the first word of "$ac_prog", so it can be a program name with args.
6339 set dummy $ac_prog; ac_word=$2
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6341 $as_echo_n "checking for $ac_word... " >&6; }
6342 if ${ac_cv_path_COMM+:} false; then :
6343   $as_echo_n "(cached) " >&6
6344 else
6345   case $COMM in
6346   [\\/]* | ?:[\\/]*)
6347   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6348   ;;
6349   *)
6350   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6351 for as_dir in $PATH
6352 do
6353   IFS=$as_save_IFS
6354   test -z "$as_dir" && as_dir=.
6355     for ac_exec_ext in '' $ac_executable_extensions; do
6356   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6357     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6358     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6359     break 2
6360   fi
6361 done
6362   done
6363 IFS=$as_save_IFS
6364 
6365   ;;
6366 esac
6367 fi
6368 COMM=$ac_cv_path_COMM
6369 if test -n "$COMM"; then
6370   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6371 $as_echo "$COMM" >&6; }
6372 else
6373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6374 $as_echo "no" >&6; }
6375 fi
6376 
6377 
6378   test -n "$COMM" && break
6379 done
6380 
6381     else
6382       # If it succeeded, then it was overridden by the user. We will use it
6383       # for the tool.
6384 
6385       # First remove it from the list of overridden variables, so we can test
6386       # for unknown variables in the end.
6387       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6388 
6389       # Check if we try to supply an empty value
6390       if test "x$COMM" = x; then
6391         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6392 $as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6393         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6394 $as_echo_n "checking for COMM... " >&6; }
6395         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6396 $as_echo "disabled" >&6; }
6397       else
6398         # Check if the provided tool contains a complete path.
6399         tool_specified="$COMM"
6400         tool_basename="${tool_specified##*/}"
6401         if test "x$tool_basename" = "x$tool_specified"; then
6402           # A command without a complete path is provided, search $PATH.
6403           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6404 $as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6405           # Extract the first word of "$tool_basename", so it can be a program name with args.
6406 set dummy $tool_basename; ac_word=$2
6407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6408 $as_echo_n "checking for $ac_word... " >&6; }
6409 if ${ac_cv_path_COMM+:} false; then :
6410   $as_echo_n "(cached) " >&6
6411 else
6412   case $COMM in
6413   [\\/]* | ?:[\\/]*)
6414   ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6415   ;;
6416   *)
6417   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6418 for as_dir in $PATH
6419 do
6420   IFS=$as_save_IFS
6421   test -z "$as_dir" && as_dir=.
6422     for ac_exec_ext in '' $ac_executable_extensions; do
6423   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6424     ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6425     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6426     break 2
6427   fi
6428 done
6429   done
6430 IFS=$as_save_IFS
6431 
6432   ;;
6433 esac
6434 fi
6435 COMM=$ac_cv_path_COMM
6436 if test -n "$COMM"; then
6437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6438 $as_echo "$COMM" >&6; }
6439 else
6440   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6441 $as_echo "no" >&6; }
6442 fi
6443 
6444 
6445           if test "x$COMM" = x; then
6446             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6447           fi
6448         else
6449           # Otherwise we believe it is a complete path. Use it as it is.
6450           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6451 $as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6452           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6453 $as_echo_n "checking for COMM... " >&6; }
6454           if test ! -x "$tool_specified"; then
6455             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6456 $as_echo "not found" >&6; }
6457             as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6458           fi
6459           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6460 $as_echo "$tool_specified" >&6; }
6461         fi
6462       fi
6463     fi
6464 
6465   fi
6466 
6467 
6468 
6469   if test "x$COMM" = x; then
6470     as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6471   fi
6472 
6473 
6474 
6475 
6476 
6477   # Publish this variable in the help.
6478 
6479 
6480   if [ -z "${CP+x}" ]; then
6481     # The variable is not set by user, try to locate tool using the code snippet
6482     for ac_prog in cp
6483 do
6484   # Extract the first word of "$ac_prog", so it can be a program name with args.
6485 set dummy $ac_prog; ac_word=$2
6486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6487 $as_echo_n "checking for $ac_word... " >&6; }
6488 if ${ac_cv_path_CP+:} false; then :
6489   $as_echo_n "(cached) " >&6
6490 else
6491   case $CP in
6492   [\\/]* | ?:[\\/]*)
6493   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6494   ;;
6495   *)
6496   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6497 for as_dir in $PATH
6498 do
6499   IFS=$as_save_IFS
6500   test -z "$as_dir" && as_dir=.
6501     for ac_exec_ext in '' $ac_executable_extensions; do
6502   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6503     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6504     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6505     break 2
6506   fi
6507 done
6508   done
6509 IFS=$as_save_IFS
6510 
6511   ;;
6512 esac
6513 fi
6514 CP=$ac_cv_path_CP
6515 if test -n "$CP"; then
6516   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6517 $as_echo "$CP" >&6; }
6518 else
6519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6520 $as_echo "no" >&6; }
6521 fi
6522 
6523 
6524   test -n "$CP" && break
6525 done
6526 
6527   else
6528     # The variable is set, but is it from the command line or the environment?
6529 
6530     # Try to remove the string !CP! from our list.
6531     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6532     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6533       # If it failed, the variable was not from the command line. Ignore it,
6534       # but warn the user (except for BASH, which is always set by the calling BASH).
6535       if test "xCP" != xBASH; then
6536         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6537 $as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6538       fi
6539       # Try to locate tool using the code snippet
6540       for ac_prog in cp
6541 do
6542   # Extract the first word of "$ac_prog", so it can be a program name with args.
6543 set dummy $ac_prog; ac_word=$2
6544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6545 $as_echo_n "checking for $ac_word... " >&6; }
6546 if ${ac_cv_path_CP+:} false; then :
6547   $as_echo_n "(cached) " >&6
6548 else
6549   case $CP in
6550   [\\/]* | ?:[\\/]*)
6551   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6552   ;;
6553   *)
6554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6555 for as_dir in $PATH
6556 do
6557   IFS=$as_save_IFS
6558   test -z "$as_dir" && as_dir=.
6559     for ac_exec_ext in '' $ac_executable_extensions; do
6560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6561     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6563     break 2
6564   fi
6565 done
6566   done
6567 IFS=$as_save_IFS
6568 
6569   ;;
6570 esac
6571 fi
6572 CP=$ac_cv_path_CP
6573 if test -n "$CP"; then
6574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6575 $as_echo "$CP" >&6; }
6576 else
6577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6578 $as_echo "no" >&6; }
6579 fi
6580 
6581 
6582   test -n "$CP" && break
6583 done
6584 
6585     else
6586       # If it succeeded, then it was overridden by the user. We will use it
6587       # for the tool.
6588 
6589       # First remove it from the list of overridden variables, so we can test
6590       # for unknown variables in the end.
6591       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6592 
6593       # Check if we try to supply an empty value
6594       if test "x$CP" = x; then
6595         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6596 $as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6597         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6598 $as_echo_n "checking for CP... " >&6; }
6599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6600 $as_echo "disabled" >&6; }
6601       else
6602         # Check if the provided tool contains a complete path.
6603         tool_specified="$CP"
6604         tool_basename="${tool_specified##*/}"
6605         if test "x$tool_basename" = "x$tool_specified"; then
6606           # A command without a complete path is provided, search $PATH.
6607           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6608 $as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6609           # Extract the first word of "$tool_basename", so it can be a program name with args.
6610 set dummy $tool_basename; ac_word=$2
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6612 $as_echo_n "checking for $ac_word... " >&6; }
6613 if ${ac_cv_path_CP+:} false; then :
6614   $as_echo_n "(cached) " >&6
6615 else
6616   case $CP in
6617   [\\/]* | ?:[\\/]*)
6618   ac_cv_path_CP="$CP" # Let the user override the test with a path.
6619   ;;
6620   *)
6621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6622 for as_dir in $PATH
6623 do
6624   IFS=$as_save_IFS
6625   test -z "$as_dir" && as_dir=.
6626     for ac_exec_ext in '' $ac_executable_extensions; do
6627   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6628     ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6630     break 2
6631   fi
6632 done
6633   done
6634 IFS=$as_save_IFS
6635 
6636   ;;
6637 esac
6638 fi
6639 CP=$ac_cv_path_CP
6640 if test -n "$CP"; then
6641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6642 $as_echo "$CP" >&6; }
6643 else
6644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6645 $as_echo "no" >&6; }
6646 fi
6647 
6648 
6649           if test "x$CP" = x; then
6650             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6651           fi
6652         else
6653           # Otherwise we believe it is a complete path. Use it as it is.
6654           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6655 $as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6656           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6657 $as_echo_n "checking for CP... " >&6; }
6658           if test ! -x "$tool_specified"; then
6659             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6660 $as_echo "not found" >&6; }
6661             as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6662           fi
6663           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6664 $as_echo "$tool_specified" >&6; }
6665         fi
6666       fi
6667     fi
6668 
6669   fi
6670 
6671 
6672 
6673   if test "x$CP" = x; then
6674     as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6675   fi
6676 
6677 
6678 
6679 
6680 
6681   # Publish this variable in the help.
6682 
6683 
6684   if [ -z "${CUT+x}" ]; then
6685     # The variable is not set by user, try to locate tool using the code snippet
6686     for ac_prog in cut
6687 do
6688   # Extract the first word of "$ac_prog", so it can be a program name with args.
6689 set dummy $ac_prog; ac_word=$2
6690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6691 $as_echo_n "checking for $ac_word... " >&6; }
6692 if ${ac_cv_path_CUT+:} false; then :
6693   $as_echo_n "(cached) " >&6
6694 else
6695   case $CUT in
6696   [\\/]* | ?:[\\/]*)
6697   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6698   ;;
6699   *)
6700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6701 for as_dir in $PATH
6702 do
6703   IFS=$as_save_IFS
6704   test -z "$as_dir" && as_dir=.
6705     for ac_exec_ext in '' $ac_executable_extensions; do
6706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6707     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6709     break 2
6710   fi
6711 done
6712   done
6713 IFS=$as_save_IFS
6714 
6715   ;;
6716 esac
6717 fi
6718 CUT=$ac_cv_path_CUT
6719 if test -n "$CUT"; then
6720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6721 $as_echo "$CUT" >&6; }
6722 else
6723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6724 $as_echo "no" >&6; }
6725 fi
6726 
6727 
6728   test -n "$CUT" && break
6729 done
6730 
6731   else
6732     # The variable is set, but is it from the command line or the environment?
6733 
6734     # Try to remove the string !CUT! from our list.
6735     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6736     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6737       # If it failed, the variable was not from the command line. Ignore it,
6738       # but warn the user (except for BASH, which is always set by the calling BASH).
6739       if test "xCUT" != xBASH; then
6740         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6741 $as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6742       fi
6743       # Try to locate tool using the code snippet
6744       for ac_prog in cut
6745 do
6746   # Extract the first word of "$ac_prog", so it can be a program name with args.
6747 set dummy $ac_prog; ac_word=$2
6748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749 $as_echo_n "checking for $ac_word... " >&6; }
6750 if ${ac_cv_path_CUT+:} false; then :
6751   $as_echo_n "(cached) " >&6
6752 else
6753   case $CUT in
6754   [\\/]* | ?:[\\/]*)
6755   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6756   ;;
6757   *)
6758   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6759 for as_dir in $PATH
6760 do
6761   IFS=$as_save_IFS
6762   test -z "$as_dir" && as_dir=.
6763     for ac_exec_ext in '' $ac_executable_extensions; do
6764   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6765     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6766     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6767     break 2
6768   fi
6769 done
6770   done
6771 IFS=$as_save_IFS
6772 
6773   ;;
6774 esac
6775 fi
6776 CUT=$ac_cv_path_CUT
6777 if test -n "$CUT"; then
6778   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6779 $as_echo "$CUT" >&6; }
6780 else
6781   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782 $as_echo "no" >&6; }
6783 fi
6784 
6785 
6786   test -n "$CUT" && break
6787 done
6788 
6789     else
6790       # If it succeeded, then it was overridden by the user. We will use it
6791       # for the tool.
6792 
6793       # First remove it from the list of overridden variables, so we can test
6794       # for unknown variables in the end.
6795       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6796 
6797       # Check if we try to supply an empty value
6798       if test "x$CUT" = x; then
6799         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6800 $as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6801         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6802 $as_echo_n "checking for CUT... " >&6; }
6803         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6804 $as_echo "disabled" >&6; }
6805       else
6806         # Check if the provided tool contains a complete path.
6807         tool_specified="$CUT"
6808         tool_basename="${tool_specified##*/}"
6809         if test "x$tool_basename" = "x$tool_specified"; then
6810           # A command without a complete path is provided, search $PATH.
6811           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6812 $as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6813           # Extract the first word of "$tool_basename", so it can be a program name with args.
6814 set dummy $tool_basename; ac_word=$2
6815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6816 $as_echo_n "checking for $ac_word... " >&6; }
6817 if ${ac_cv_path_CUT+:} false; then :
6818   $as_echo_n "(cached) " >&6
6819 else
6820   case $CUT in
6821   [\\/]* | ?:[\\/]*)
6822   ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6823   ;;
6824   *)
6825   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6826 for as_dir in $PATH
6827 do
6828   IFS=$as_save_IFS
6829   test -z "$as_dir" && as_dir=.
6830     for ac_exec_ext in '' $ac_executable_extensions; do
6831   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6832     ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6833     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6834     break 2
6835   fi
6836 done
6837   done
6838 IFS=$as_save_IFS
6839 
6840   ;;
6841 esac
6842 fi
6843 CUT=$ac_cv_path_CUT
6844 if test -n "$CUT"; then
6845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6846 $as_echo "$CUT" >&6; }
6847 else
6848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6849 $as_echo "no" >&6; }
6850 fi
6851 
6852 
6853           if test "x$CUT" = x; then
6854             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6855           fi
6856         else
6857           # Otherwise we believe it is a complete path. Use it as it is.
6858           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6859 $as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6860           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6861 $as_echo_n "checking for CUT... " >&6; }
6862           if test ! -x "$tool_specified"; then
6863             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6864 $as_echo "not found" >&6; }
6865             as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6866           fi
6867           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6868 $as_echo "$tool_specified" >&6; }
6869         fi
6870       fi
6871     fi
6872 
6873   fi
6874 
6875 
6876 
6877   if test "x$CUT" = x; then
6878     as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6879   fi
6880 
6881 
6882 
6883 
6884 
6885   # Publish this variable in the help.
6886 
6887 
6888   if [ -z "${DATE+x}" ]; then
6889     # The variable is not set by user, try to locate tool using the code snippet
6890     for ac_prog in date
6891 do
6892   # Extract the first word of "$ac_prog", so it can be a program name with args.
6893 set dummy $ac_prog; ac_word=$2
6894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6895 $as_echo_n "checking for $ac_word... " >&6; }
6896 if ${ac_cv_path_DATE+:} false; then :
6897   $as_echo_n "(cached) " >&6
6898 else
6899   case $DATE in
6900   [\\/]* | ?:[\\/]*)
6901   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6902   ;;
6903   *)
6904   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6905 for as_dir in $PATH
6906 do
6907   IFS=$as_save_IFS
6908   test -z "$as_dir" && as_dir=.
6909     for ac_exec_ext in '' $ac_executable_extensions; do
6910   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6911     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6912     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6913     break 2
6914   fi
6915 done
6916   done
6917 IFS=$as_save_IFS
6918 
6919   ;;
6920 esac
6921 fi
6922 DATE=$ac_cv_path_DATE
6923 if test -n "$DATE"; then
6924   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6925 $as_echo "$DATE" >&6; }
6926 else
6927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6928 $as_echo "no" >&6; }
6929 fi
6930 
6931 
6932   test -n "$DATE" && break
6933 done
6934 
6935   else
6936     # The variable is set, but is it from the command line or the environment?
6937 
6938     # Try to remove the string !DATE! from our list.
6939     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6940     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6941       # If it failed, the variable was not from the command line. Ignore it,
6942       # but warn the user (except for BASH, which is always set by the calling BASH).
6943       if test "xDATE" != xBASH; then
6944         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6945 $as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6946       fi
6947       # Try to locate tool using the code snippet
6948       for ac_prog in date
6949 do
6950   # Extract the first word of "$ac_prog", so it can be a program name with args.
6951 set dummy $ac_prog; ac_word=$2
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6953 $as_echo_n "checking for $ac_word... " >&6; }
6954 if ${ac_cv_path_DATE+:} false; then :
6955   $as_echo_n "(cached) " >&6
6956 else
6957   case $DATE in
6958   [\\/]* | ?:[\\/]*)
6959   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6960   ;;
6961   *)
6962   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6963 for as_dir in $PATH
6964 do
6965   IFS=$as_save_IFS
6966   test -z "$as_dir" && as_dir=.
6967     for ac_exec_ext in '' $ac_executable_extensions; do
6968   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6969     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6970     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6971     break 2
6972   fi
6973 done
6974   done
6975 IFS=$as_save_IFS
6976 
6977   ;;
6978 esac
6979 fi
6980 DATE=$ac_cv_path_DATE
6981 if test -n "$DATE"; then
6982   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6983 $as_echo "$DATE" >&6; }
6984 else
6985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6986 $as_echo "no" >&6; }
6987 fi
6988 
6989 
6990   test -n "$DATE" && break
6991 done
6992 
6993     else
6994       # If it succeeded, then it was overridden by the user. We will use it
6995       # for the tool.
6996 
6997       # First remove it from the list of overridden variables, so we can test
6998       # for unknown variables in the end.
6999       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7000 
7001       # Check if we try to supply an empty value
7002       if test "x$DATE" = x; then
7003         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
7004 $as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
7005         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7006 $as_echo_n "checking for DATE... " >&6; }
7007         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7008 $as_echo "disabled" >&6; }
7009       else
7010         # Check if the provided tool contains a complete path.
7011         tool_specified="$DATE"
7012         tool_basename="${tool_specified##*/}"
7013         if test "x$tool_basename" = "x$tool_specified"; then
7014           # A command without a complete path is provided, search $PATH.
7015           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
7016 $as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
7017           # Extract the first word of "$tool_basename", so it can be a program name with args.
7018 set dummy $tool_basename; ac_word=$2
7019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7020 $as_echo_n "checking for $ac_word... " >&6; }
7021 if ${ac_cv_path_DATE+:} false; then :
7022   $as_echo_n "(cached) " >&6
7023 else
7024   case $DATE in
7025   [\\/]* | ?:[\\/]*)
7026   ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
7027   ;;
7028   *)
7029   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7030 for as_dir in $PATH
7031 do
7032   IFS=$as_save_IFS
7033   test -z "$as_dir" && as_dir=.
7034     for ac_exec_ext in '' $ac_executable_extensions; do
7035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7036     ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
7037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7038     break 2
7039   fi
7040 done
7041   done
7042 IFS=$as_save_IFS
7043 
7044   ;;
7045 esac
7046 fi
7047 DATE=$ac_cv_path_DATE
7048 if test -n "$DATE"; then
7049   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
7050 $as_echo "$DATE" >&6; }
7051 else
7052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7053 $as_echo "no" >&6; }
7054 fi
7055 
7056 
7057           if test "x$DATE" = x; then
7058             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7059           fi
7060         else
7061           # Otherwise we believe it is a complete path. Use it as it is.
7062           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7063 $as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7064           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7065 $as_echo_n "checking for DATE... " >&6; }
7066           if test ! -x "$tool_specified"; then
7067             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7068 $as_echo "not found" >&6; }
7069             as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7070           fi
7071           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7072 $as_echo "$tool_specified" >&6; }
7073         fi
7074       fi
7075     fi
7076 
7077   fi
7078 
7079 
7080 
7081   if test "x$DATE" = x; then
7082     as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7083   fi
7084 
7085 
7086 
7087 
7088 
7089   # Publish this variable in the help.
7090 
7091 
7092   if [ -z "${DIFF+x}" ]; then
7093     # The variable is not set by user, try to locate tool using the code snippet
7094     for ac_prog in gdiff diff
7095 do
7096   # Extract the first word of "$ac_prog", so it can be a program name with args.
7097 set dummy $ac_prog; ac_word=$2
7098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7099 $as_echo_n "checking for $ac_word... " >&6; }
7100 if ${ac_cv_path_DIFF+:} false; then :
7101   $as_echo_n "(cached) " >&6
7102 else
7103   case $DIFF in
7104   [\\/]* | ?:[\\/]*)
7105   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7106   ;;
7107   *)
7108   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7109 for as_dir in $PATH
7110 do
7111   IFS=$as_save_IFS
7112   test -z "$as_dir" && as_dir=.
7113     for ac_exec_ext in '' $ac_executable_extensions; do
7114   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7115     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7116     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7117     break 2
7118   fi
7119 done
7120   done
7121 IFS=$as_save_IFS
7122 
7123   ;;
7124 esac
7125 fi
7126 DIFF=$ac_cv_path_DIFF
7127 if test -n "$DIFF"; then
7128   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7129 $as_echo "$DIFF" >&6; }
7130 else
7131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7132 $as_echo "no" >&6; }
7133 fi
7134 
7135 
7136   test -n "$DIFF" && break
7137 done
7138 
7139   else
7140     # The variable is set, but is it from the command line or the environment?
7141 
7142     # Try to remove the string !DIFF! from our list.
7143     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7144     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7145       # If it failed, the variable was not from the command line. Ignore it,
7146       # but warn the user (except for BASH, which is always set by the calling BASH).
7147       if test "xDIFF" != xBASH; then
7148         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7149 $as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7150       fi
7151       # Try to locate tool using the code snippet
7152       for ac_prog in gdiff diff
7153 do
7154   # Extract the first word of "$ac_prog", so it can be a program name with args.
7155 set dummy $ac_prog; ac_word=$2
7156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7157 $as_echo_n "checking for $ac_word... " >&6; }
7158 if ${ac_cv_path_DIFF+:} false; then :
7159   $as_echo_n "(cached) " >&6
7160 else
7161   case $DIFF in
7162   [\\/]* | ?:[\\/]*)
7163   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7164   ;;
7165   *)
7166   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7167 for as_dir in $PATH
7168 do
7169   IFS=$as_save_IFS
7170   test -z "$as_dir" && as_dir=.
7171     for ac_exec_ext in '' $ac_executable_extensions; do
7172   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7173     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7174     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7175     break 2
7176   fi
7177 done
7178   done
7179 IFS=$as_save_IFS
7180 
7181   ;;
7182 esac
7183 fi
7184 DIFF=$ac_cv_path_DIFF
7185 if test -n "$DIFF"; then
7186   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7187 $as_echo "$DIFF" >&6; }
7188 else
7189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7190 $as_echo "no" >&6; }
7191 fi
7192 
7193 
7194   test -n "$DIFF" && break
7195 done
7196 
7197     else
7198       # If it succeeded, then it was overridden by the user. We will use it
7199       # for the tool.
7200 
7201       # First remove it from the list of overridden variables, so we can test
7202       # for unknown variables in the end.
7203       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7204 
7205       # Check if we try to supply an empty value
7206       if test "x$DIFF" = x; then
7207         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7208 $as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7209         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7210 $as_echo_n "checking for DIFF... " >&6; }
7211         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7212 $as_echo "disabled" >&6; }
7213       else
7214         # Check if the provided tool contains a complete path.
7215         tool_specified="$DIFF"
7216         tool_basename="${tool_specified##*/}"
7217         if test "x$tool_basename" = "x$tool_specified"; then
7218           # A command without a complete path is provided, search $PATH.
7219           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7220 $as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7221           # Extract the first word of "$tool_basename", so it can be a program name with args.
7222 set dummy $tool_basename; ac_word=$2
7223 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7224 $as_echo_n "checking for $ac_word... " >&6; }
7225 if ${ac_cv_path_DIFF+:} false; then :
7226   $as_echo_n "(cached) " >&6
7227 else
7228   case $DIFF in
7229   [\\/]* | ?:[\\/]*)
7230   ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7231   ;;
7232   *)
7233   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7234 for as_dir in $PATH
7235 do
7236   IFS=$as_save_IFS
7237   test -z "$as_dir" && as_dir=.
7238     for ac_exec_ext in '' $ac_executable_extensions; do
7239   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7240     ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7241     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7242     break 2
7243   fi
7244 done
7245   done
7246 IFS=$as_save_IFS
7247 
7248   ;;
7249 esac
7250 fi
7251 DIFF=$ac_cv_path_DIFF
7252 if test -n "$DIFF"; then
7253   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7254 $as_echo "$DIFF" >&6; }
7255 else
7256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7257 $as_echo "no" >&6; }
7258 fi
7259 
7260 
7261           if test "x$DIFF" = x; then
7262             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7263           fi
7264         else
7265           # Otherwise we believe it is a complete path. Use it as it is.
7266           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7267 $as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7268           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7269 $as_echo_n "checking for DIFF... " >&6; }
7270           if test ! -x "$tool_specified"; then
7271             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7272 $as_echo "not found" >&6; }
7273             as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7274           fi
7275           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7276 $as_echo "$tool_specified" >&6; }
7277         fi
7278       fi
7279     fi
7280 
7281   fi
7282 
7283 
7284 
7285   if test "x$DIFF" = x; then
7286     as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7287   fi
7288 
7289 
7290 
7291 
7292 
7293   # Publish this variable in the help.
7294 
7295 
7296   if [ -z "${DIRNAME+x}" ]; then
7297     # The variable is not set by user, try to locate tool using the code snippet
7298     for ac_prog in dirname
7299 do
7300   # Extract the first word of "$ac_prog", so it can be a program name with args.
7301 set dummy $ac_prog; ac_word=$2
7302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7303 $as_echo_n "checking for $ac_word... " >&6; }
7304 if ${ac_cv_path_DIRNAME+:} false; then :
7305   $as_echo_n "(cached) " >&6
7306 else
7307   case $DIRNAME in
7308   [\\/]* | ?:[\\/]*)
7309   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7310   ;;
7311   *)
7312   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7313 for as_dir in $PATH
7314 do
7315   IFS=$as_save_IFS
7316   test -z "$as_dir" && as_dir=.
7317     for ac_exec_ext in '' $ac_executable_extensions; do
7318   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7319     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7320     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7321     break 2
7322   fi
7323 done
7324   done
7325 IFS=$as_save_IFS
7326 
7327   ;;
7328 esac
7329 fi
7330 DIRNAME=$ac_cv_path_DIRNAME
7331 if test -n "$DIRNAME"; then
7332   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7333 $as_echo "$DIRNAME" >&6; }
7334 else
7335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7336 $as_echo "no" >&6; }
7337 fi
7338 
7339 
7340   test -n "$DIRNAME" && break
7341 done
7342 
7343   else
7344     # The variable is set, but is it from the command line or the environment?
7345 
7346     # Try to remove the string !DIRNAME! from our list.
7347     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7348     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7349       # If it failed, the variable was not from the command line. Ignore it,
7350       # but warn the user (except for BASH, which is always set by the calling BASH).
7351       if test "xDIRNAME" != xBASH; then
7352         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7353 $as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7354       fi
7355       # Try to locate tool using the code snippet
7356       for ac_prog in dirname
7357 do
7358   # Extract the first word of "$ac_prog", so it can be a program name with args.
7359 set dummy $ac_prog; ac_word=$2
7360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7361 $as_echo_n "checking for $ac_word... " >&6; }
7362 if ${ac_cv_path_DIRNAME+:} false; then :
7363   $as_echo_n "(cached) " >&6
7364 else
7365   case $DIRNAME in
7366   [\\/]* | ?:[\\/]*)
7367   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7368   ;;
7369   *)
7370   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7371 for as_dir in $PATH
7372 do
7373   IFS=$as_save_IFS
7374   test -z "$as_dir" && as_dir=.
7375     for ac_exec_ext in '' $ac_executable_extensions; do
7376   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7377     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7378     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7379     break 2
7380   fi
7381 done
7382   done
7383 IFS=$as_save_IFS
7384 
7385   ;;
7386 esac
7387 fi
7388 DIRNAME=$ac_cv_path_DIRNAME
7389 if test -n "$DIRNAME"; then
7390   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7391 $as_echo "$DIRNAME" >&6; }
7392 else
7393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7394 $as_echo "no" >&6; }
7395 fi
7396 
7397 
7398   test -n "$DIRNAME" && break
7399 done
7400 
7401     else
7402       # If it succeeded, then it was overridden by the user. We will use it
7403       # for the tool.
7404 
7405       # First remove it from the list of overridden variables, so we can test
7406       # for unknown variables in the end.
7407       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7408 
7409       # Check if we try to supply an empty value
7410       if test "x$DIRNAME" = x; then
7411         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7412 $as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7413         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7414 $as_echo_n "checking for DIRNAME... " >&6; }
7415         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7416 $as_echo "disabled" >&6; }
7417       else
7418         # Check if the provided tool contains a complete path.
7419         tool_specified="$DIRNAME"
7420         tool_basename="${tool_specified##*/}"
7421         if test "x$tool_basename" = "x$tool_specified"; then
7422           # A command without a complete path is provided, search $PATH.
7423           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7424 $as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7425           # Extract the first word of "$tool_basename", so it can be a program name with args.
7426 set dummy $tool_basename; ac_word=$2
7427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7428 $as_echo_n "checking for $ac_word... " >&6; }
7429 if ${ac_cv_path_DIRNAME+:} false; then :
7430   $as_echo_n "(cached) " >&6
7431 else
7432   case $DIRNAME in
7433   [\\/]* | ?:[\\/]*)
7434   ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7435   ;;
7436   *)
7437   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7438 for as_dir in $PATH
7439 do
7440   IFS=$as_save_IFS
7441   test -z "$as_dir" && as_dir=.
7442     for ac_exec_ext in '' $ac_executable_extensions; do
7443   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7444     ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7445     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7446     break 2
7447   fi
7448 done
7449   done
7450 IFS=$as_save_IFS
7451 
7452   ;;
7453 esac
7454 fi
7455 DIRNAME=$ac_cv_path_DIRNAME
7456 if test -n "$DIRNAME"; then
7457   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7458 $as_echo "$DIRNAME" >&6; }
7459 else
7460   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7461 $as_echo "no" >&6; }
7462 fi
7463 
7464 
7465           if test "x$DIRNAME" = x; then
7466             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7467           fi
7468         else
7469           # Otherwise we believe it is a complete path. Use it as it is.
7470           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7471 $as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7472           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7473 $as_echo_n "checking for DIRNAME... " >&6; }
7474           if test ! -x "$tool_specified"; then
7475             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7476 $as_echo "not found" >&6; }
7477             as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7478           fi
7479           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7480 $as_echo "$tool_specified" >&6; }
7481         fi
7482       fi
7483     fi
7484 
7485   fi
7486 
7487 
7488 
7489   if test "x$DIRNAME" = x; then
7490     as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7491   fi
7492 
7493 
7494 
7495 
7496 
7497   # Publish this variable in the help.
7498 
7499 
7500   if [ -z "${ECHO+x}" ]; then
7501     # The variable is not set by user, try to locate tool using the code snippet
7502     for ac_prog in echo
7503 do
7504   # Extract the first word of "$ac_prog", so it can be a program name with args.
7505 set dummy $ac_prog; ac_word=$2
7506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7507 $as_echo_n "checking for $ac_word... " >&6; }
7508 if ${ac_cv_path_ECHO+:} false; then :
7509   $as_echo_n "(cached) " >&6
7510 else
7511   case $ECHO in
7512   [\\/]* | ?:[\\/]*)
7513   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7514   ;;
7515   *)
7516   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7517 for as_dir in $PATH
7518 do
7519   IFS=$as_save_IFS
7520   test -z "$as_dir" && as_dir=.
7521     for ac_exec_ext in '' $ac_executable_extensions; do
7522   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7523     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7524     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7525     break 2
7526   fi
7527 done
7528   done
7529 IFS=$as_save_IFS
7530 
7531   ;;
7532 esac
7533 fi
7534 ECHO=$ac_cv_path_ECHO
7535 if test -n "$ECHO"; then
7536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7537 $as_echo "$ECHO" >&6; }
7538 else
7539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7540 $as_echo "no" >&6; }
7541 fi
7542 
7543 
7544   test -n "$ECHO" && break
7545 done
7546 
7547   else
7548     # The variable is set, but is it from the command line or the environment?
7549 
7550     # Try to remove the string !ECHO! from our list.
7551     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7552     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7553       # If it failed, the variable was not from the command line. Ignore it,
7554       # but warn the user (except for BASH, which is always set by the calling BASH).
7555       if test "xECHO" != xBASH; then
7556         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7557 $as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7558       fi
7559       # Try to locate tool using the code snippet
7560       for ac_prog in echo
7561 do
7562   # Extract the first word of "$ac_prog", so it can be a program name with args.
7563 set dummy $ac_prog; ac_word=$2
7564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7565 $as_echo_n "checking for $ac_word... " >&6; }
7566 if ${ac_cv_path_ECHO+:} false; then :
7567   $as_echo_n "(cached) " >&6
7568 else
7569   case $ECHO in
7570   [\\/]* | ?:[\\/]*)
7571   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7572   ;;
7573   *)
7574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7575 for as_dir in $PATH
7576 do
7577   IFS=$as_save_IFS
7578   test -z "$as_dir" && as_dir=.
7579     for ac_exec_ext in '' $ac_executable_extensions; do
7580   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7581     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7582     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7583     break 2
7584   fi
7585 done
7586   done
7587 IFS=$as_save_IFS
7588 
7589   ;;
7590 esac
7591 fi
7592 ECHO=$ac_cv_path_ECHO
7593 if test -n "$ECHO"; then
7594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7595 $as_echo "$ECHO" >&6; }
7596 else
7597   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7598 $as_echo "no" >&6; }
7599 fi
7600 
7601 
7602   test -n "$ECHO" && break
7603 done
7604 
7605     else
7606       # If it succeeded, then it was overridden by the user. We will use it
7607       # for the tool.
7608 
7609       # First remove it from the list of overridden variables, so we can test
7610       # for unknown variables in the end.
7611       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7612 
7613       # Check if we try to supply an empty value
7614       if test "x$ECHO" = x; then
7615         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7616 $as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7617         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7618 $as_echo_n "checking for ECHO... " >&6; }
7619         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7620 $as_echo "disabled" >&6; }
7621       else
7622         # Check if the provided tool contains a complete path.
7623         tool_specified="$ECHO"
7624         tool_basename="${tool_specified##*/}"
7625         if test "x$tool_basename" = "x$tool_specified"; then
7626           # A command without a complete path is provided, search $PATH.
7627           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7628 $as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7629           # Extract the first word of "$tool_basename", so it can be a program name with args.
7630 set dummy $tool_basename; ac_word=$2
7631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7632 $as_echo_n "checking for $ac_word... " >&6; }
7633 if ${ac_cv_path_ECHO+:} false; then :
7634   $as_echo_n "(cached) " >&6
7635 else
7636   case $ECHO in
7637   [\\/]* | ?:[\\/]*)
7638   ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7639   ;;
7640   *)
7641   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7642 for as_dir in $PATH
7643 do
7644   IFS=$as_save_IFS
7645   test -z "$as_dir" && as_dir=.
7646     for ac_exec_ext in '' $ac_executable_extensions; do
7647   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7648     ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7649     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7650     break 2
7651   fi
7652 done
7653   done
7654 IFS=$as_save_IFS
7655 
7656   ;;
7657 esac
7658 fi
7659 ECHO=$ac_cv_path_ECHO
7660 if test -n "$ECHO"; then
7661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7662 $as_echo "$ECHO" >&6; }
7663 else
7664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7665 $as_echo "no" >&6; }
7666 fi
7667 
7668 
7669           if test "x$ECHO" = x; then
7670             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7671           fi
7672         else
7673           # Otherwise we believe it is a complete path. Use it as it is.
7674           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7675 $as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7676           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7677 $as_echo_n "checking for ECHO... " >&6; }
7678           if test ! -x "$tool_specified"; then
7679             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7680 $as_echo "not found" >&6; }
7681             as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7682           fi
7683           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7684 $as_echo "$tool_specified" >&6; }
7685         fi
7686       fi
7687     fi
7688 
7689   fi
7690 
7691 
7692 
7693   if test "x$ECHO" = x; then
7694     as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7695   fi
7696 
7697 
7698 
7699 
7700 
7701   # Publish this variable in the help.
7702 
7703 
7704   if [ -z "${EXPR+x}" ]; then
7705     # The variable is not set by user, try to locate tool using the code snippet
7706     for ac_prog in expr
7707 do
7708   # Extract the first word of "$ac_prog", so it can be a program name with args.
7709 set dummy $ac_prog; ac_word=$2
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711 $as_echo_n "checking for $ac_word... " >&6; }
7712 if ${ac_cv_path_EXPR+:} false; then :
7713   $as_echo_n "(cached) " >&6
7714 else
7715   case $EXPR in
7716   [\\/]* | ?:[\\/]*)
7717   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7718   ;;
7719   *)
7720   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721 for as_dir in $PATH
7722 do
7723   IFS=$as_save_IFS
7724   test -z "$as_dir" && as_dir=.
7725     for ac_exec_ext in '' $ac_executable_extensions; do
7726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7727     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729     break 2
7730   fi
7731 done
7732   done
7733 IFS=$as_save_IFS
7734 
7735   ;;
7736 esac
7737 fi
7738 EXPR=$ac_cv_path_EXPR
7739 if test -n "$EXPR"; then
7740   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7741 $as_echo "$EXPR" >&6; }
7742 else
7743   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744 $as_echo "no" >&6; }
7745 fi
7746 
7747 
7748   test -n "$EXPR" && break
7749 done
7750 
7751   else
7752     # The variable is set, but is it from the command line or the environment?
7753 
7754     # Try to remove the string !EXPR! from our list.
7755     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7756     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7757       # If it failed, the variable was not from the command line. Ignore it,
7758       # but warn the user (except for BASH, which is always set by the calling BASH).
7759       if test "xEXPR" != xBASH; then
7760         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7761 $as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7762       fi
7763       # Try to locate tool using the code snippet
7764       for ac_prog in expr
7765 do
7766   # Extract the first word of "$ac_prog", so it can be a program name with args.
7767 set dummy $ac_prog; ac_word=$2
7768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769 $as_echo_n "checking for $ac_word... " >&6; }
7770 if ${ac_cv_path_EXPR+:} false; then :
7771   $as_echo_n "(cached) " >&6
7772 else
7773   case $EXPR in
7774   [\\/]* | ?:[\\/]*)
7775   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7776   ;;
7777   *)
7778   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779 for as_dir in $PATH
7780 do
7781   IFS=$as_save_IFS
7782   test -z "$as_dir" && as_dir=.
7783     for ac_exec_ext in '' $ac_executable_extensions; do
7784   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7785     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7787     break 2
7788   fi
7789 done
7790   done
7791 IFS=$as_save_IFS
7792 
7793   ;;
7794 esac
7795 fi
7796 EXPR=$ac_cv_path_EXPR
7797 if test -n "$EXPR"; then
7798   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7799 $as_echo "$EXPR" >&6; }
7800 else
7801   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802 $as_echo "no" >&6; }
7803 fi
7804 
7805 
7806   test -n "$EXPR" && break
7807 done
7808 
7809     else
7810       # If it succeeded, then it was overridden by the user. We will use it
7811       # for the tool.
7812 
7813       # First remove it from the list of overridden variables, so we can test
7814       # for unknown variables in the end.
7815       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7816 
7817       # Check if we try to supply an empty value
7818       if test "x$EXPR" = x; then
7819         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7820 $as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7821         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7822 $as_echo_n "checking for EXPR... " >&6; }
7823         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7824 $as_echo "disabled" >&6; }
7825       else
7826         # Check if the provided tool contains a complete path.
7827         tool_specified="$EXPR"
7828         tool_basename="${tool_specified##*/}"
7829         if test "x$tool_basename" = "x$tool_specified"; then
7830           # A command without a complete path is provided, search $PATH.
7831           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7832 $as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7833           # Extract the first word of "$tool_basename", so it can be a program name with args.
7834 set dummy $tool_basename; ac_word=$2
7835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7836 $as_echo_n "checking for $ac_word... " >&6; }
7837 if ${ac_cv_path_EXPR+:} false; then :
7838   $as_echo_n "(cached) " >&6
7839 else
7840   case $EXPR in
7841   [\\/]* | ?:[\\/]*)
7842   ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7843   ;;
7844   *)
7845   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7846 for as_dir in $PATH
7847 do
7848   IFS=$as_save_IFS
7849   test -z "$as_dir" && as_dir=.
7850     for ac_exec_ext in '' $ac_executable_extensions; do
7851   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7852     ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7853     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7854     break 2
7855   fi
7856 done
7857   done
7858 IFS=$as_save_IFS
7859 
7860   ;;
7861 esac
7862 fi
7863 EXPR=$ac_cv_path_EXPR
7864 if test -n "$EXPR"; then
7865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7866 $as_echo "$EXPR" >&6; }
7867 else
7868   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7869 $as_echo "no" >&6; }
7870 fi
7871 
7872 
7873           if test "x$EXPR" = x; then
7874             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7875           fi
7876         else
7877           # Otherwise we believe it is a complete path. Use it as it is.
7878           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7879 $as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7880           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7881 $as_echo_n "checking for EXPR... " >&6; }
7882           if test ! -x "$tool_specified"; then
7883             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7884 $as_echo "not found" >&6; }
7885             as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7886           fi
7887           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7888 $as_echo "$tool_specified" >&6; }
7889         fi
7890       fi
7891     fi
7892 
7893   fi
7894 
7895 
7896 
7897   if test "x$EXPR" = x; then
7898     as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7899   fi
7900 
7901 
7902 
7903 
7904 
7905   # Publish this variable in the help.
7906 
7907 
7908   if [ -z "${FILE+x}" ]; then
7909     # The variable is not set by user, try to locate tool using the code snippet
7910     for ac_prog in file
7911 do
7912   # Extract the first word of "$ac_prog", so it can be a program name with args.
7913 set dummy $ac_prog; ac_word=$2
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7915 $as_echo_n "checking for $ac_word... " >&6; }
7916 if ${ac_cv_path_FILE+:} false; then :
7917   $as_echo_n "(cached) " >&6
7918 else
7919   case $FILE in
7920   [\\/]* | ?:[\\/]*)
7921   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7922   ;;
7923   *)
7924   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7925 for as_dir in $PATH
7926 do
7927   IFS=$as_save_IFS
7928   test -z "$as_dir" && as_dir=.
7929     for ac_exec_ext in '' $ac_executable_extensions; do
7930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7931     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7933     break 2
7934   fi
7935 done
7936   done
7937 IFS=$as_save_IFS
7938 
7939   ;;
7940 esac
7941 fi
7942 FILE=$ac_cv_path_FILE
7943 if test -n "$FILE"; then
7944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7945 $as_echo "$FILE" >&6; }
7946 else
7947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7948 $as_echo "no" >&6; }
7949 fi
7950 
7951 
7952   test -n "$FILE" && break
7953 done
7954 
7955   else
7956     # The variable is set, but is it from the command line or the environment?
7957 
7958     # Try to remove the string !FILE! from our list.
7959     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7960     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7961       # If it failed, the variable was not from the command line. Ignore it,
7962       # but warn the user (except for BASH, which is always set by the calling BASH).
7963       if test "xFILE" != xBASH; then
7964         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7965 $as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7966       fi
7967       # Try to locate tool using the code snippet
7968       for ac_prog in file
7969 do
7970   # Extract the first word of "$ac_prog", so it can be a program name with args.
7971 set dummy $ac_prog; ac_word=$2
7972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7973 $as_echo_n "checking for $ac_word... " >&6; }
7974 if ${ac_cv_path_FILE+:} false; then :
7975   $as_echo_n "(cached) " >&6
7976 else
7977   case $FILE in
7978   [\\/]* | ?:[\\/]*)
7979   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7980   ;;
7981   *)
7982   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7983 for as_dir in $PATH
7984 do
7985   IFS=$as_save_IFS
7986   test -z "$as_dir" && as_dir=.
7987     for ac_exec_ext in '' $ac_executable_extensions; do
7988   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7989     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7990     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7991     break 2
7992   fi
7993 done
7994   done
7995 IFS=$as_save_IFS
7996 
7997   ;;
7998 esac
7999 fi
8000 FILE=$ac_cv_path_FILE
8001 if test -n "$FILE"; then
8002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8003 $as_echo "$FILE" >&6; }
8004 else
8005   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8006 $as_echo "no" >&6; }
8007 fi
8008 
8009 
8010   test -n "$FILE" && break
8011 done
8012 
8013     else
8014       # If it succeeded, then it was overridden by the user. We will use it
8015       # for the tool.
8016 
8017       # First remove it from the list of overridden variables, so we can test
8018       # for unknown variables in the end.
8019       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8020 
8021       # Check if we try to supply an empty value
8022       if test "x$FILE" = x; then
8023         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
8024 $as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
8025         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8026 $as_echo_n "checking for FILE... " >&6; }
8027         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8028 $as_echo "disabled" >&6; }
8029       else
8030         # Check if the provided tool contains a complete path.
8031         tool_specified="$FILE"
8032         tool_basename="${tool_specified##*/}"
8033         if test "x$tool_basename" = "x$tool_specified"; then
8034           # A command without a complete path is provided, search $PATH.
8035           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
8036 $as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
8037           # Extract the first word of "$tool_basename", so it can be a program name with args.
8038 set dummy $tool_basename; ac_word=$2
8039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8040 $as_echo_n "checking for $ac_word... " >&6; }
8041 if ${ac_cv_path_FILE+:} false; then :
8042   $as_echo_n "(cached) " >&6
8043 else
8044   case $FILE in
8045   [\\/]* | ?:[\\/]*)
8046   ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
8047   ;;
8048   *)
8049   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8050 for as_dir in $PATH
8051 do
8052   IFS=$as_save_IFS
8053   test -z "$as_dir" && as_dir=.
8054     for ac_exec_ext in '' $ac_executable_extensions; do
8055   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8056     ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8057     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8058     break 2
8059   fi
8060 done
8061   done
8062 IFS=$as_save_IFS
8063 
8064   ;;
8065 esac
8066 fi
8067 FILE=$ac_cv_path_FILE
8068 if test -n "$FILE"; then
8069   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8070 $as_echo "$FILE" >&6; }
8071 else
8072   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8073 $as_echo "no" >&6; }
8074 fi
8075 
8076 
8077           if test "x$FILE" = x; then
8078             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8079           fi
8080         else
8081           # Otherwise we believe it is a complete path. Use it as it is.
8082           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8083 $as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8084           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8085 $as_echo_n "checking for FILE... " >&6; }
8086           if test ! -x "$tool_specified"; then
8087             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8088 $as_echo "not found" >&6; }
8089             as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8090           fi
8091           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8092 $as_echo "$tool_specified" >&6; }
8093         fi
8094       fi
8095     fi
8096 
8097   fi
8098 
8099 
8100 
8101   if test "x$FILE" = x; then
8102     as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8103   fi
8104 
8105 
8106 
8107 
8108 
8109   # Publish this variable in the help.
8110 
8111 
8112   if [ -z "${FIND+x}" ]; then
8113     # The variable is not set by user, try to locate tool using the code snippet
8114     for ac_prog in find
8115 do
8116   # Extract the first word of "$ac_prog", so it can be a program name with args.
8117 set dummy $ac_prog; ac_word=$2
8118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8119 $as_echo_n "checking for $ac_word... " >&6; }
8120 if ${ac_cv_path_FIND+:} false; then :
8121   $as_echo_n "(cached) " >&6
8122 else
8123   case $FIND in
8124   [\\/]* | ?:[\\/]*)
8125   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8126   ;;
8127   *)
8128   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8129 for as_dir in $PATH
8130 do
8131   IFS=$as_save_IFS
8132   test -z "$as_dir" && as_dir=.
8133     for ac_exec_ext in '' $ac_executable_extensions; do
8134   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8135     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8136     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8137     break 2
8138   fi
8139 done
8140   done
8141 IFS=$as_save_IFS
8142 
8143   ;;
8144 esac
8145 fi
8146 FIND=$ac_cv_path_FIND
8147 if test -n "$FIND"; then
8148   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8149 $as_echo "$FIND" >&6; }
8150 else
8151   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8152 $as_echo "no" >&6; }
8153 fi
8154 
8155 
8156   test -n "$FIND" && break
8157 done
8158 
8159   else
8160     # The variable is set, but is it from the command line or the environment?
8161 
8162     # Try to remove the string !FIND! from our list.
8163     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8164     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8165       # If it failed, the variable was not from the command line. Ignore it,
8166       # but warn the user (except for BASH, which is always set by the calling BASH).
8167       if test "xFIND" != xBASH; then
8168         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8169 $as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8170       fi
8171       # Try to locate tool using the code snippet
8172       for ac_prog in find
8173 do
8174   # Extract the first word of "$ac_prog", so it can be a program name with args.
8175 set dummy $ac_prog; ac_word=$2
8176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8177 $as_echo_n "checking for $ac_word... " >&6; }
8178 if ${ac_cv_path_FIND+:} false; then :
8179   $as_echo_n "(cached) " >&6
8180 else
8181   case $FIND in
8182   [\\/]* | ?:[\\/]*)
8183   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8184   ;;
8185   *)
8186   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8187 for as_dir in $PATH
8188 do
8189   IFS=$as_save_IFS
8190   test -z "$as_dir" && as_dir=.
8191     for ac_exec_ext in '' $ac_executable_extensions; do
8192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8193     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8195     break 2
8196   fi
8197 done
8198   done
8199 IFS=$as_save_IFS
8200 
8201   ;;
8202 esac
8203 fi
8204 FIND=$ac_cv_path_FIND
8205 if test -n "$FIND"; then
8206   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8207 $as_echo "$FIND" >&6; }
8208 else
8209   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8210 $as_echo "no" >&6; }
8211 fi
8212 
8213 
8214   test -n "$FIND" && break
8215 done
8216 
8217     else
8218       # If it succeeded, then it was overridden by the user. We will use it
8219       # for the tool.
8220 
8221       # First remove it from the list of overridden variables, so we can test
8222       # for unknown variables in the end.
8223       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8224 
8225       # Check if we try to supply an empty value
8226       if test "x$FIND" = x; then
8227         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8228 $as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8229         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8230 $as_echo_n "checking for FIND... " >&6; }
8231         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8232 $as_echo "disabled" >&6; }
8233       else
8234         # Check if the provided tool contains a complete path.
8235         tool_specified="$FIND"
8236         tool_basename="${tool_specified##*/}"
8237         if test "x$tool_basename" = "x$tool_specified"; then
8238           # A command without a complete path is provided, search $PATH.
8239           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8240 $as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8241           # Extract the first word of "$tool_basename", so it can be a program name with args.
8242 set dummy $tool_basename; ac_word=$2
8243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8244 $as_echo_n "checking for $ac_word... " >&6; }
8245 if ${ac_cv_path_FIND+:} false; then :
8246   $as_echo_n "(cached) " >&6
8247 else
8248   case $FIND in
8249   [\\/]* | ?:[\\/]*)
8250   ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8251   ;;
8252   *)
8253   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8254 for as_dir in $PATH
8255 do
8256   IFS=$as_save_IFS
8257   test -z "$as_dir" && as_dir=.
8258     for ac_exec_ext in '' $ac_executable_extensions; do
8259   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8260     ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8261     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8262     break 2
8263   fi
8264 done
8265   done
8266 IFS=$as_save_IFS
8267 
8268   ;;
8269 esac
8270 fi
8271 FIND=$ac_cv_path_FIND
8272 if test -n "$FIND"; then
8273   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8274 $as_echo "$FIND" >&6; }
8275 else
8276   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8277 $as_echo "no" >&6; }
8278 fi
8279 
8280 
8281           if test "x$FIND" = x; then
8282             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8283           fi
8284         else
8285           # Otherwise we believe it is a complete path. Use it as it is.
8286           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8287 $as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8288           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8289 $as_echo_n "checking for FIND... " >&6; }
8290           if test ! -x "$tool_specified"; then
8291             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8292 $as_echo "not found" >&6; }
8293             as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8294           fi
8295           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8296 $as_echo "$tool_specified" >&6; }
8297         fi
8298       fi
8299     fi
8300 
8301   fi
8302 
8303 
8304 
8305   if test "x$FIND" = x; then
8306     as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8307   fi
8308 
8309 
8310 
8311 
8312 
8313   # Publish this variable in the help.
8314 
8315 
8316   if [ -z "${HEAD+x}" ]; then
8317     # The variable is not set by user, try to locate tool using the code snippet
8318     for ac_prog in head
8319 do
8320   # Extract the first word of "$ac_prog", so it can be a program name with args.
8321 set dummy $ac_prog; ac_word=$2
8322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8323 $as_echo_n "checking for $ac_word... " >&6; }
8324 if ${ac_cv_path_HEAD+:} false; then :
8325   $as_echo_n "(cached) " >&6
8326 else
8327   case $HEAD in
8328   [\\/]* | ?:[\\/]*)
8329   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8330   ;;
8331   *)
8332   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8333 for as_dir in $PATH
8334 do
8335   IFS=$as_save_IFS
8336   test -z "$as_dir" && as_dir=.
8337     for ac_exec_ext in '' $ac_executable_extensions; do
8338   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8339     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8340     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8341     break 2
8342   fi
8343 done
8344   done
8345 IFS=$as_save_IFS
8346 
8347   ;;
8348 esac
8349 fi
8350 HEAD=$ac_cv_path_HEAD
8351 if test -n "$HEAD"; then
8352   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8353 $as_echo "$HEAD" >&6; }
8354 else
8355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8356 $as_echo "no" >&6; }
8357 fi
8358 
8359 
8360   test -n "$HEAD" && break
8361 done
8362 
8363   else
8364     # The variable is set, but is it from the command line or the environment?
8365 
8366     # Try to remove the string !HEAD! from our list.
8367     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8368     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8369       # If it failed, the variable was not from the command line. Ignore it,
8370       # but warn the user (except for BASH, which is always set by the calling BASH).
8371       if test "xHEAD" != xBASH; then
8372         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8373 $as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8374       fi
8375       # Try to locate tool using the code snippet
8376       for ac_prog in head
8377 do
8378   # Extract the first word of "$ac_prog", so it can be a program name with args.
8379 set dummy $ac_prog; ac_word=$2
8380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8381 $as_echo_n "checking for $ac_word... " >&6; }
8382 if ${ac_cv_path_HEAD+:} false; then :
8383   $as_echo_n "(cached) " >&6
8384 else
8385   case $HEAD in
8386   [\\/]* | ?:[\\/]*)
8387   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8388   ;;
8389   *)
8390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8391 for as_dir in $PATH
8392 do
8393   IFS=$as_save_IFS
8394   test -z "$as_dir" && as_dir=.
8395     for ac_exec_ext in '' $ac_executable_extensions; do
8396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8397     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8399     break 2
8400   fi
8401 done
8402   done
8403 IFS=$as_save_IFS
8404 
8405   ;;
8406 esac
8407 fi
8408 HEAD=$ac_cv_path_HEAD
8409 if test -n "$HEAD"; then
8410   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8411 $as_echo "$HEAD" >&6; }
8412 else
8413   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8414 $as_echo "no" >&6; }
8415 fi
8416 
8417 
8418   test -n "$HEAD" && break
8419 done
8420 
8421     else
8422       # If it succeeded, then it was overridden by the user. We will use it
8423       # for the tool.
8424 
8425       # First remove it from the list of overridden variables, so we can test
8426       # for unknown variables in the end.
8427       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8428 
8429       # Check if we try to supply an empty value
8430       if test "x$HEAD" = x; then
8431         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8432 $as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8433         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8434 $as_echo_n "checking for HEAD... " >&6; }
8435         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8436 $as_echo "disabled" >&6; }
8437       else
8438         # Check if the provided tool contains a complete path.
8439         tool_specified="$HEAD"
8440         tool_basename="${tool_specified##*/}"
8441         if test "x$tool_basename" = "x$tool_specified"; then
8442           # A command without a complete path is provided, search $PATH.
8443           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8444 $as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8445           # Extract the first word of "$tool_basename", so it can be a program name with args.
8446 set dummy $tool_basename; ac_word=$2
8447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8448 $as_echo_n "checking for $ac_word... " >&6; }
8449 if ${ac_cv_path_HEAD+:} false; then :
8450   $as_echo_n "(cached) " >&6
8451 else
8452   case $HEAD in
8453   [\\/]* | ?:[\\/]*)
8454   ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8455   ;;
8456   *)
8457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8458 for as_dir in $PATH
8459 do
8460   IFS=$as_save_IFS
8461   test -z "$as_dir" && as_dir=.
8462     for ac_exec_ext in '' $ac_executable_extensions; do
8463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8464     ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8466     break 2
8467   fi
8468 done
8469   done
8470 IFS=$as_save_IFS
8471 
8472   ;;
8473 esac
8474 fi
8475 HEAD=$ac_cv_path_HEAD
8476 if test -n "$HEAD"; then
8477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8478 $as_echo "$HEAD" >&6; }
8479 else
8480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8481 $as_echo "no" >&6; }
8482 fi
8483 
8484 
8485           if test "x$HEAD" = x; then
8486             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8487           fi
8488         else
8489           # Otherwise we believe it is a complete path. Use it as it is.
8490           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8491 $as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8492           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8493 $as_echo_n "checking for HEAD... " >&6; }
8494           if test ! -x "$tool_specified"; then
8495             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8496 $as_echo "not found" >&6; }
8497             as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8498           fi
8499           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8500 $as_echo "$tool_specified" >&6; }
8501         fi
8502       fi
8503     fi
8504 
8505   fi
8506 
8507 
8508 
8509   if test "x$HEAD" = x; then
8510     as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8511   fi
8512 
8513 
8514 
8515 
8516 
8517   # Publish this variable in the help.
8518 
8519 
8520   if [ -z "${GUNZIP+x}" ]; then
8521     # The variable is not set by user, try to locate tool using the code snippet
8522     for ac_prog in gunzip
8523 do
8524   # Extract the first word of "$ac_prog", so it can be a program name with args.
8525 set dummy $ac_prog; ac_word=$2
8526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8527 $as_echo_n "checking for $ac_word... " >&6; }
8528 if ${ac_cv_path_GUNZIP+:} false; then :
8529   $as_echo_n "(cached) " >&6
8530 else
8531   case $GUNZIP in
8532   [\\/]* | ?:[\\/]*)
8533   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8534   ;;
8535   *)
8536   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8537 for as_dir in $PATH
8538 do
8539   IFS=$as_save_IFS
8540   test -z "$as_dir" && as_dir=.
8541     for ac_exec_ext in '' $ac_executable_extensions; do
8542   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8543     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8544     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8545     break 2
8546   fi
8547 done
8548   done
8549 IFS=$as_save_IFS
8550 
8551   ;;
8552 esac
8553 fi
8554 GUNZIP=$ac_cv_path_GUNZIP
8555 if test -n "$GUNZIP"; then
8556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8557 $as_echo "$GUNZIP" >&6; }
8558 else
8559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8560 $as_echo "no" >&6; }
8561 fi
8562 
8563 
8564   test -n "$GUNZIP" && break
8565 done
8566 
8567   else
8568     # The variable is set, but is it from the command line or the environment?
8569 
8570     # Try to remove the string !GUNZIP! from our list.
8571     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8572     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8573       # If it failed, the variable was not from the command line. Ignore it,
8574       # but warn the user (except for BASH, which is always set by the calling BASH).
8575       if test "xGUNZIP" != xBASH; then
8576         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8577 $as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8578       fi
8579       # Try to locate tool using the code snippet
8580       for ac_prog in gunzip
8581 do
8582   # Extract the first word of "$ac_prog", so it can be a program name with args.
8583 set dummy $ac_prog; ac_word=$2
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8585 $as_echo_n "checking for $ac_word... " >&6; }
8586 if ${ac_cv_path_GUNZIP+:} false; then :
8587   $as_echo_n "(cached) " >&6
8588 else
8589   case $GUNZIP in
8590   [\\/]* | ?:[\\/]*)
8591   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8592   ;;
8593   *)
8594   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8595 for as_dir in $PATH
8596 do
8597   IFS=$as_save_IFS
8598   test -z "$as_dir" && as_dir=.
8599     for ac_exec_ext in '' $ac_executable_extensions; do
8600   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8601     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8602     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8603     break 2
8604   fi
8605 done
8606   done
8607 IFS=$as_save_IFS
8608 
8609   ;;
8610 esac
8611 fi
8612 GUNZIP=$ac_cv_path_GUNZIP
8613 if test -n "$GUNZIP"; then
8614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8615 $as_echo "$GUNZIP" >&6; }
8616 else
8617   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8618 $as_echo "no" >&6; }
8619 fi
8620 
8621 
8622   test -n "$GUNZIP" && break
8623 done
8624 
8625     else
8626       # If it succeeded, then it was overridden by the user. We will use it
8627       # for the tool.
8628 
8629       # First remove it from the list of overridden variables, so we can test
8630       # for unknown variables in the end.
8631       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8632 
8633       # Check if we try to supply an empty value
8634       if test "x$GUNZIP" = x; then
8635         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8636 $as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8638 $as_echo_n "checking for GUNZIP... " >&6; }
8639         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8640 $as_echo "disabled" >&6; }
8641       else
8642         # Check if the provided tool contains a complete path.
8643         tool_specified="$GUNZIP"
8644         tool_basename="${tool_specified##*/}"
8645         if test "x$tool_basename" = "x$tool_specified"; then
8646           # A command without a complete path is provided, search $PATH.
8647           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8648 $as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8649           # Extract the first word of "$tool_basename", so it can be a program name with args.
8650 set dummy $tool_basename; ac_word=$2
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8652 $as_echo_n "checking for $ac_word... " >&6; }
8653 if ${ac_cv_path_GUNZIP+:} false; then :
8654   $as_echo_n "(cached) " >&6
8655 else
8656   case $GUNZIP in
8657   [\\/]* | ?:[\\/]*)
8658   ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8659   ;;
8660   *)
8661   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8662 for as_dir in $PATH
8663 do
8664   IFS=$as_save_IFS
8665   test -z "$as_dir" && as_dir=.
8666     for ac_exec_ext in '' $ac_executable_extensions; do
8667   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8668     ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8669     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8670     break 2
8671   fi
8672 done
8673   done
8674 IFS=$as_save_IFS
8675 
8676   ;;
8677 esac
8678 fi
8679 GUNZIP=$ac_cv_path_GUNZIP
8680 if test -n "$GUNZIP"; then
8681   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8682 $as_echo "$GUNZIP" >&6; }
8683 else
8684   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8685 $as_echo "no" >&6; }
8686 fi
8687 
8688 
8689           if test "x$GUNZIP" = x; then
8690             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8691           fi
8692         else
8693           # Otherwise we believe it is a complete path. Use it as it is.
8694           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8695 $as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8696           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8697 $as_echo_n "checking for GUNZIP... " >&6; }
8698           if test ! -x "$tool_specified"; then
8699             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8700 $as_echo "not found" >&6; }
8701             as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8702           fi
8703           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8704 $as_echo "$tool_specified" >&6; }
8705         fi
8706       fi
8707     fi
8708 
8709   fi
8710 
8711 
8712 
8713   if test "x$GUNZIP" = x; then
8714     as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8715   fi
8716 
8717 
8718 
8719 
8720 
8721   # Publish this variable in the help.
8722 
8723 
8724   if [ -z "${GZIP+x}" ]; then
8725     # The variable is not set by user, try to locate tool using the code snippet
8726     for ac_prog in pigz gzip
8727 do
8728   # Extract the first word of "$ac_prog", so it can be a program name with args.
8729 set dummy $ac_prog; ac_word=$2
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8731 $as_echo_n "checking for $ac_word... " >&6; }
8732 if ${ac_cv_path_GZIP+:} false; then :
8733   $as_echo_n "(cached) " >&6
8734 else
8735   case $GZIP in
8736   [\\/]* | ?:[\\/]*)
8737   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8738   ;;
8739   *)
8740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8741 for as_dir in $PATH
8742 do
8743   IFS=$as_save_IFS
8744   test -z "$as_dir" && as_dir=.
8745     for ac_exec_ext in '' $ac_executable_extensions; do
8746   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8747     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8748     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8749     break 2
8750   fi
8751 done
8752   done
8753 IFS=$as_save_IFS
8754 
8755   ;;
8756 esac
8757 fi
8758 GZIP=$ac_cv_path_GZIP
8759 if test -n "$GZIP"; then
8760   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8761 $as_echo "$GZIP" >&6; }
8762 else
8763   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8764 $as_echo "no" >&6; }
8765 fi
8766 
8767 
8768   test -n "$GZIP" && break
8769 done
8770 
8771   else
8772     # The variable is set, but is it from the command line or the environment?
8773 
8774     # Try to remove the string !GZIP! from our list.
8775     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8776     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8777       # If it failed, the variable was not from the command line. Ignore it,
8778       # but warn the user (except for BASH, which is always set by the calling BASH).
8779       if test "xGZIP" != xBASH; then
8780         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8781 $as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8782       fi
8783       # Try to locate tool using the code snippet
8784       for ac_prog in pigz gzip
8785 do
8786   # Extract the first word of "$ac_prog", so it can be a program name with args.
8787 set dummy $ac_prog; ac_word=$2
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8789 $as_echo_n "checking for $ac_word... " >&6; }
8790 if ${ac_cv_path_GZIP+:} false; then :
8791   $as_echo_n "(cached) " >&6
8792 else
8793   case $GZIP in
8794   [\\/]* | ?:[\\/]*)
8795   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8796   ;;
8797   *)
8798   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8799 for as_dir in $PATH
8800 do
8801   IFS=$as_save_IFS
8802   test -z "$as_dir" && as_dir=.
8803     for ac_exec_ext in '' $ac_executable_extensions; do
8804   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8805     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8806     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8807     break 2
8808   fi
8809 done
8810   done
8811 IFS=$as_save_IFS
8812 
8813   ;;
8814 esac
8815 fi
8816 GZIP=$ac_cv_path_GZIP
8817 if test -n "$GZIP"; then
8818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8819 $as_echo "$GZIP" >&6; }
8820 else
8821   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8822 $as_echo "no" >&6; }
8823 fi
8824 
8825 
8826   test -n "$GZIP" && break
8827 done
8828 
8829     else
8830       # If it succeeded, then it was overridden by the user. We will use it
8831       # for the tool.
8832 
8833       # First remove it from the list of overridden variables, so we can test
8834       # for unknown variables in the end.
8835       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8836 
8837       # Check if we try to supply an empty value
8838       if test "x$GZIP" = x; then
8839         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8840 $as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8841         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8842 $as_echo_n "checking for GZIP... " >&6; }
8843         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8844 $as_echo "disabled" >&6; }
8845       else
8846         # Check if the provided tool contains a complete path.
8847         tool_specified="$GZIP"
8848         tool_basename="${tool_specified##*/}"
8849         if test "x$tool_basename" = "x$tool_specified"; then
8850           # A command without a complete path is provided, search $PATH.
8851           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8852 $as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8853           # Extract the first word of "$tool_basename", so it can be a program name with args.
8854 set dummy $tool_basename; ac_word=$2
8855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8856 $as_echo_n "checking for $ac_word... " >&6; }
8857 if ${ac_cv_path_GZIP+:} false; then :
8858   $as_echo_n "(cached) " >&6
8859 else
8860   case $GZIP in
8861   [\\/]* | ?:[\\/]*)
8862   ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8863   ;;
8864   *)
8865   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8866 for as_dir in $PATH
8867 do
8868   IFS=$as_save_IFS
8869   test -z "$as_dir" && as_dir=.
8870     for ac_exec_ext in '' $ac_executable_extensions; do
8871   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8872     ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8873     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8874     break 2
8875   fi
8876 done
8877   done
8878 IFS=$as_save_IFS
8879 
8880   ;;
8881 esac
8882 fi
8883 GZIP=$ac_cv_path_GZIP
8884 if test -n "$GZIP"; then
8885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8886 $as_echo "$GZIP" >&6; }
8887 else
8888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8889 $as_echo "no" >&6; }
8890 fi
8891 
8892 
8893           if test "x$GZIP" = x; then
8894             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8895           fi
8896         else
8897           # Otherwise we believe it is a complete path. Use it as it is.
8898           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8899 $as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8900           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8901 $as_echo_n "checking for GZIP... " >&6; }
8902           if test ! -x "$tool_specified"; then
8903             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8904 $as_echo "not found" >&6; }
8905             as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8906           fi
8907           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8908 $as_echo "$tool_specified" >&6; }
8909         fi
8910       fi
8911     fi
8912 
8913   fi
8914 
8915 
8916 
8917   if test "x$GZIP" = x; then
8918     as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8919   fi
8920 
8921 
8922 
8923 
8924 
8925   # Publish this variable in the help.
8926 
8927 
8928   if [ -z "${LN+x}" ]; then
8929     # The variable is not set by user, try to locate tool using the code snippet
8930     for ac_prog in ln
8931 do
8932   # Extract the first word of "$ac_prog", so it can be a program name with args.
8933 set dummy $ac_prog; ac_word=$2
8934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8935 $as_echo_n "checking for $ac_word... " >&6; }
8936 if ${ac_cv_path_LN+:} false; then :
8937   $as_echo_n "(cached) " >&6
8938 else
8939   case $LN in
8940   [\\/]* | ?:[\\/]*)
8941   ac_cv_path_LN="$LN" # Let the user override the test with a path.
8942   ;;
8943   *)
8944   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8945 for as_dir in $PATH
8946 do
8947   IFS=$as_save_IFS
8948   test -z "$as_dir" && as_dir=.
8949     for ac_exec_ext in '' $ac_executable_extensions; do
8950   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8951     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8952     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8953     break 2
8954   fi
8955 done
8956   done
8957 IFS=$as_save_IFS
8958 
8959   ;;
8960 esac
8961 fi
8962 LN=$ac_cv_path_LN
8963 if test -n "$LN"; then
8964   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8965 $as_echo "$LN" >&6; }
8966 else
8967   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8968 $as_echo "no" >&6; }
8969 fi
8970 
8971 
8972   test -n "$LN" && break
8973 done
8974 
8975   else
8976     # The variable is set, but is it from the command line or the environment?
8977 
8978     # Try to remove the string !LN! from our list.
8979     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8980     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8981       # If it failed, the variable was not from the command line. Ignore it,
8982       # but warn the user (except for BASH, which is always set by the calling BASH).
8983       if test "xLN" != xBASH; then
8984         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8985 $as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8986       fi
8987       # Try to locate tool using the code snippet
8988       for ac_prog in ln
8989 do
8990   # Extract the first word of "$ac_prog", so it can be a program name with args.
8991 set dummy $ac_prog; ac_word=$2
8992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8993 $as_echo_n "checking for $ac_word... " >&6; }
8994 if ${ac_cv_path_LN+:} false; then :
8995   $as_echo_n "(cached) " >&6
8996 else
8997   case $LN in
8998   [\\/]* | ?:[\\/]*)
8999   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9000   ;;
9001   *)
9002   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9003 for as_dir in $PATH
9004 do
9005   IFS=$as_save_IFS
9006   test -z "$as_dir" && as_dir=.
9007     for ac_exec_ext in '' $ac_executable_extensions; do
9008   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9009     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9010     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9011     break 2
9012   fi
9013 done
9014   done
9015 IFS=$as_save_IFS
9016 
9017   ;;
9018 esac
9019 fi
9020 LN=$ac_cv_path_LN
9021 if test -n "$LN"; then
9022   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9023 $as_echo "$LN" >&6; }
9024 else
9025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9026 $as_echo "no" >&6; }
9027 fi
9028 
9029 
9030   test -n "$LN" && break
9031 done
9032 
9033     else
9034       # If it succeeded, then it was overridden by the user. We will use it
9035       # for the tool.
9036 
9037       # First remove it from the list of overridden variables, so we can test
9038       # for unknown variables in the end.
9039       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9040 
9041       # Check if we try to supply an empty value
9042       if test "x$LN" = x; then
9043         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
9044 $as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
9045         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9046 $as_echo_n "checking for LN... " >&6; }
9047         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9048 $as_echo "disabled" >&6; }
9049       else
9050         # Check if the provided tool contains a complete path.
9051         tool_specified="$LN"
9052         tool_basename="${tool_specified##*/}"
9053         if test "x$tool_basename" = "x$tool_specified"; then
9054           # A command without a complete path is provided, search $PATH.
9055           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9056 $as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9057           # Extract the first word of "$tool_basename", so it can be a program name with args.
9058 set dummy $tool_basename; ac_word=$2
9059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9060 $as_echo_n "checking for $ac_word... " >&6; }
9061 if ${ac_cv_path_LN+:} false; then :
9062   $as_echo_n "(cached) " >&6
9063 else
9064   case $LN in
9065   [\\/]* | ?:[\\/]*)
9066   ac_cv_path_LN="$LN" # Let the user override the test with a path.
9067   ;;
9068   *)
9069   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9070 for as_dir in $PATH
9071 do
9072   IFS=$as_save_IFS
9073   test -z "$as_dir" && as_dir=.
9074     for ac_exec_ext in '' $ac_executable_extensions; do
9075   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9076     ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9077     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9078     break 2
9079   fi
9080 done
9081   done
9082 IFS=$as_save_IFS
9083 
9084   ;;
9085 esac
9086 fi
9087 LN=$ac_cv_path_LN
9088 if test -n "$LN"; then
9089   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9090 $as_echo "$LN" >&6; }
9091 else
9092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9093 $as_echo "no" >&6; }
9094 fi
9095 
9096 
9097           if test "x$LN" = x; then
9098             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9099           fi
9100         else
9101           # Otherwise we believe it is a complete path. Use it as it is.
9102           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9103 $as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9104           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9105 $as_echo_n "checking for LN... " >&6; }
9106           if test ! -x "$tool_specified"; then
9107             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9108 $as_echo "not found" >&6; }
9109             as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9110           fi
9111           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9112 $as_echo "$tool_specified" >&6; }
9113         fi
9114       fi
9115     fi
9116 
9117   fi
9118 
9119 
9120 
9121   if test "x$LN" = x; then
9122     as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9123   fi
9124 
9125 
9126 
9127 
9128 
9129   # Publish this variable in the help.
9130 
9131 
9132   if [ -z "${LS+x}" ]; then
9133     # The variable is not set by user, try to locate tool using the code snippet
9134     for ac_prog in ls
9135 do
9136   # Extract the first word of "$ac_prog", so it can be a program name with args.
9137 set dummy $ac_prog; ac_word=$2
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9139 $as_echo_n "checking for $ac_word... " >&6; }
9140 if ${ac_cv_path_LS+:} false; then :
9141   $as_echo_n "(cached) " >&6
9142 else
9143   case $LS in
9144   [\\/]* | ?:[\\/]*)
9145   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9146   ;;
9147   *)
9148   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9149 for as_dir in $PATH
9150 do
9151   IFS=$as_save_IFS
9152   test -z "$as_dir" && as_dir=.
9153     for ac_exec_ext in '' $ac_executable_extensions; do
9154   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9155     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9156     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9157     break 2
9158   fi
9159 done
9160   done
9161 IFS=$as_save_IFS
9162 
9163   ;;
9164 esac
9165 fi
9166 LS=$ac_cv_path_LS
9167 if test -n "$LS"; then
9168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9169 $as_echo "$LS" >&6; }
9170 else
9171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9172 $as_echo "no" >&6; }
9173 fi
9174 
9175 
9176   test -n "$LS" && break
9177 done
9178 
9179   else
9180     # The variable is set, but is it from the command line or the environment?
9181 
9182     # Try to remove the string !LS! from our list.
9183     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9184     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9185       # If it failed, the variable was not from the command line. Ignore it,
9186       # but warn the user (except for BASH, which is always set by the calling BASH).
9187       if test "xLS" != xBASH; then
9188         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9189 $as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9190       fi
9191       # Try to locate tool using the code snippet
9192       for ac_prog in ls
9193 do
9194   # Extract the first word of "$ac_prog", so it can be a program name with args.
9195 set dummy $ac_prog; ac_word=$2
9196 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9197 $as_echo_n "checking for $ac_word... " >&6; }
9198 if ${ac_cv_path_LS+:} false; then :
9199   $as_echo_n "(cached) " >&6
9200 else
9201   case $LS in
9202   [\\/]* | ?:[\\/]*)
9203   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9204   ;;
9205   *)
9206   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207 for as_dir in $PATH
9208 do
9209   IFS=$as_save_IFS
9210   test -z "$as_dir" && as_dir=.
9211     for ac_exec_ext in '' $ac_executable_extensions; do
9212   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9213     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9214     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9215     break 2
9216   fi
9217 done
9218   done
9219 IFS=$as_save_IFS
9220 
9221   ;;
9222 esac
9223 fi
9224 LS=$ac_cv_path_LS
9225 if test -n "$LS"; then
9226   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9227 $as_echo "$LS" >&6; }
9228 else
9229   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9230 $as_echo "no" >&6; }
9231 fi
9232 
9233 
9234   test -n "$LS" && break
9235 done
9236 
9237     else
9238       # If it succeeded, then it was overridden by the user. We will use it
9239       # for the tool.
9240 
9241       # First remove it from the list of overridden variables, so we can test
9242       # for unknown variables in the end.
9243       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9244 
9245       # Check if we try to supply an empty value
9246       if test "x$LS" = x; then
9247         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9248 $as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9249         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9250 $as_echo_n "checking for LS... " >&6; }
9251         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9252 $as_echo "disabled" >&6; }
9253       else
9254         # Check if the provided tool contains a complete path.
9255         tool_specified="$LS"
9256         tool_basename="${tool_specified##*/}"
9257         if test "x$tool_basename" = "x$tool_specified"; then
9258           # A command without a complete path is provided, search $PATH.
9259           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9260 $as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9261           # Extract the first word of "$tool_basename", so it can be a program name with args.
9262 set dummy $tool_basename; ac_word=$2
9263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9264 $as_echo_n "checking for $ac_word... " >&6; }
9265 if ${ac_cv_path_LS+:} false; then :
9266   $as_echo_n "(cached) " >&6
9267 else
9268   case $LS in
9269   [\\/]* | ?:[\\/]*)
9270   ac_cv_path_LS="$LS" # Let the user override the test with a path.
9271   ;;
9272   *)
9273   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9274 for as_dir in $PATH
9275 do
9276   IFS=$as_save_IFS
9277   test -z "$as_dir" && as_dir=.
9278     for ac_exec_ext in '' $ac_executable_extensions; do
9279   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9280     ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9281     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9282     break 2
9283   fi
9284 done
9285   done
9286 IFS=$as_save_IFS
9287 
9288   ;;
9289 esac
9290 fi
9291 LS=$ac_cv_path_LS
9292 if test -n "$LS"; then
9293   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9294 $as_echo "$LS" >&6; }
9295 else
9296   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9297 $as_echo "no" >&6; }
9298 fi
9299 
9300 
9301           if test "x$LS" = x; then
9302             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9303           fi
9304         else
9305           # Otherwise we believe it is a complete path. Use it as it is.
9306           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9307 $as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9308           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9309 $as_echo_n "checking for LS... " >&6; }
9310           if test ! -x "$tool_specified"; then
9311             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9312 $as_echo "not found" >&6; }
9313             as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9314           fi
9315           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9316 $as_echo "$tool_specified" >&6; }
9317         fi
9318       fi
9319     fi
9320 
9321   fi
9322 
9323 
9324 
9325   if test "x$LS" = x; then
9326     as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9327   fi
9328 
9329 
9330 
9331 
9332 
9333   # Publish this variable in the help.
9334 
9335 
9336   if [ -z "${MKDIR+x}" ]; then
9337     # The variable is not set by user, try to locate tool using the code snippet
9338     for ac_prog in mkdir
9339 do
9340   # Extract the first word of "$ac_prog", so it can be a program name with args.
9341 set dummy $ac_prog; ac_word=$2
9342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9343 $as_echo_n "checking for $ac_word... " >&6; }
9344 if ${ac_cv_path_MKDIR+:} false; then :
9345   $as_echo_n "(cached) " >&6
9346 else
9347   case $MKDIR in
9348   [\\/]* | ?:[\\/]*)
9349   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9350   ;;
9351   *)
9352   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9353 for as_dir in $PATH
9354 do
9355   IFS=$as_save_IFS
9356   test -z "$as_dir" && as_dir=.
9357     for ac_exec_ext in '' $ac_executable_extensions; do
9358   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9359     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9360     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9361     break 2
9362   fi
9363 done
9364   done
9365 IFS=$as_save_IFS
9366 
9367   ;;
9368 esac
9369 fi
9370 MKDIR=$ac_cv_path_MKDIR
9371 if test -n "$MKDIR"; then
9372   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9373 $as_echo "$MKDIR" >&6; }
9374 else
9375   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9376 $as_echo "no" >&6; }
9377 fi
9378 
9379 
9380   test -n "$MKDIR" && break
9381 done
9382 
9383   else
9384     # The variable is set, but is it from the command line or the environment?
9385 
9386     # Try to remove the string !MKDIR! from our list.
9387     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9388     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9389       # If it failed, the variable was not from the command line. Ignore it,
9390       # but warn the user (except for BASH, which is always set by the calling BASH).
9391       if test "xMKDIR" != xBASH; then
9392         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9393 $as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9394       fi
9395       # Try to locate tool using the code snippet
9396       for ac_prog in mkdir
9397 do
9398   # Extract the first word of "$ac_prog", so it can be a program name with args.
9399 set dummy $ac_prog; ac_word=$2
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9401 $as_echo_n "checking for $ac_word... " >&6; }
9402 if ${ac_cv_path_MKDIR+:} false; then :
9403   $as_echo_n "(cached) " >&6
9404 else
9405   case $MKDIR in
9406   [\\/]* | ?:[\\/]*)
9407   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9408   ;;
9409   *)
9410   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9411 for as_dir in $PATH
9412 do
9413   IFS=$as_save_IFS
9414   test -z "$as_dir" && as_dir=.
9415     for ac_exec_ext in '' $ac_executable_extensions; do
9416   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9417     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9418     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9419     break 2
9420   fi
9421 done
9422   done
9423 IFS=$as_save_IFS
9424 
9425   ;;
9426 esac
9427 fi
9428 MKDIR=$ac_cv_path_MKDIR
9429 if test -n "$MKDIR"; then
9430   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9431 $as_echo "$MKDIR" >&6; }
9432 else
9433   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9434 $as_echo "no" >&6; }
9435 fi
9436 
9437 
9438   test -n "$MKDIR" && break
9439 done
9440 
9441     else
9442       # If it succeeded, then it was overridden by the user. We will use it
9443       # for the tool.
9444 
9445       # First remove it from the list of overridden variables, so we can test
9446       # for unknown variables in the end.
9447       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9448 
9449       # Check if we try to supply an empty value
9450       if test "x$MKDIR" = x; then
9451         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9452 $as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9453         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9454 $as_echo_n "checking for MKDIR... " >&6; }
9455         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9456 $as_echo "disabled" >&6; }
9457       else
9458         # Check if the provided tool contains a complete path.
9459         tool_specified="$MKDIR"
9460         tool_basename="${tool_specified##*/}"
9461         if test "x$tool_basename" = "x$tool_specified"; then
9462           # A command without a complete path is provided, search $PATH.
9463           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9464 $as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9465           # Extract the first word of "$tool_basename", so it can be a program name with args.
9466 set dummy $tool_basename; ac_word=$2
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9468 $as_echo_n "checking for $ac_word... " >&6; }
9469 if ${ac_cv_path_MKDIR+:} false; then :
9470   $as_echo_n "(cached) " >&6
9471 else
9472   case $MKDIR in
9473   [\\/]* | ?:[\\/]*)
9474   ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9475   ;;
9476   *)
9477   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9478 for as_dir in $PATH
9479 do
9480   IFS=$as_save_IFS
9481   test -z "$as_dir" && as_dir=.
9482     for ac_exec_ext in '' $ac_executable_extensions; do
9483   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9484     ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9485     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9486     break 2
9487   fi
9488 done
9489   done
9490 IFS=$as_save_IFS
9491 
9492   ;;
9493 esac
9494 fi
9495 MKDIR=$ac_cv_path_MKDIR
9496 if test -n "$MKDIR"; then
9497   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9498 $as_echo "$MKDIR" >&6; }
9499 else
9500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9501 $as_echo "no" >&6; }
9502 fi
9503 
9504 
9505           if test "x$MKDIR" = x; then
9506             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9507           fi
9508         else
9509           # Otherwise we believe it is a complete path. Use it as it is.
9510           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9511 $as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9512           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9513 $as_echo_n "checking for MKDIR... " >&6; }
9514           if test ! -x "$tool_specified"; then
9515             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9516 $as_echo "not found" >&6; }
9517             as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9518           fi
9519           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9520 $as_echo "$tool_specified" >&6; }
9521         fi
9522       fi
9523     fi
9524 
9525   fi
9526 
9527 
9528 
9529   if test "x$MKDIR" = x; then
9530     as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9531   fi
9532 
9533 
9534 
9535 
9536 
9537   # Publish this variable in the help.
9538 
9539 
9540   if [ -z "${MKTEMP+x}" ]; then
9541     # The variable is not set by user, try to locate tool using the code snippet
9542     for ac_prog in mktemp
9543 do
9544   # Extract the first word of "$ac_prog", so it can be a program name with args.
9545 set dummy $ac_prog; ac_word=$2
9546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9547 $as_echo_n "checking for $ac_word... " >&6; }
9548 if ${ac_cv_path_MKTEMP+:} false; then :
9549   $as_echo_n "(cached) " >&6
9550 else
9551   case $MKTEMP in
9552   [\\/]* | ?:[\\/]*)
9553   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9554   ;;
9555   *)
9556   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9557 for as_dir in $PATH
9558 do
9559   IFS=$as_save_IFS
9560   test -z "$as_dir" && as_dir=.
9561     for ac_exec_ext in '' $ac_executable_extensions; do
9562   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9563     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9564     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9565     break 2
9566   fi
9567 done
9568   done
9569 IFS=$as_save_IFS
9570 
9571   ;;
9572 esac
9573 fi
9574 MKTEMP=$ac_cv_path_MKTEMP
9575 if test -n "$MKTEMP"; then
9576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9577 $as_echo "$MKTEMP" >&6; }
9578 else
9579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9580 $as_echo "no" >&6; }
9581 fi
9582 
9583 
9584   test -n "$MKTEMP" && break
9585 done
9586 
9587   else
9588     # The variable is set, but is it from the command line or the environment?
9589 
9590     # Try to remove the string !MKTEMP! from our list.
9591     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9592     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9593       # If it failed, the variable was not from the command line. Ignore it,
9594       # but warn the user (except for BASH, which is always set by the calling BASH).
9595       if test "xMKTEMP" != xBASH; then
9596         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9597 $as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9598       fi
9599       # Try to locate tool using the code snippet
9600       for ac_prog in mktemp
9601 do
9602   # Extract the first word of "$ac_prog", so it can be a program name with args.
9603 set dummy $ac_prog; ac_word=$2
9604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9605 $as_echo_n "checking for $ac_word... " >&6; }
9606 if ${ac_cv_path_MKTEMP+:} false; then :
9607   $as_echo_n "(cached) " >&6
9608 else
9609   case $MKTEMP in
9610   [\\/]* | ?:[\\/]*)
9611   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9612   ;;
9613   *)
9614   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9615 for as_dir in $PATH
9616 do
9617   IFS=$as_save_IFS
9618   test -z "$as_dir" && as_dir=.
9619     for ac_exec_ext in '' $ac_executable_extensions; do
9620   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9621     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9622     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9623     break 2
9624   fi
9625 done
9626   done
9627 IFS=$as_save_IFS
9628 
9629   ;;
9630 esac
9631 fi
9632 MKTEMP=$ac_cv_path_MKTEMP
9633 if test -n "$MKTEMP"; then
9634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9635 $as_echo "$MKTEMP" >&6; }
9636 else
9637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9638 $as_echo "no" >&6; }
9639 fi
9640 
9641 
9642   test -n "$MKTEMP" && break
9643 done
9644 
9645     else
9646       # If it succeeded, then it was overridden by the user. We will use it
9647       # for the tool.
9648 
9649       # First remove it from the list of overridden variables, so we can test
9650       # for unknown variables in the end.
9651       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9652 
9653       # Check if we try to supply an empty value
9654       if test "x$MKTEMP" = x; then
9655         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9656 $as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9657         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9658 $as_echo_n "checking for MKTEMP... " >&6; }
9659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9660 $as_echo "disabled" >&6; }
9661       else
9662         # Check if the provided tool contains a complete path.
9663         tool_specified="$MKTEMP"
9664         tool_basename="${tool_specified##*/}"
9665         if test "x$tool_basename" = "x$tool_specified"; then
9666           # A command without a complete path is provided, search $PATH.
9667           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9668 $as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9669           # Extract the first word of "$tool_basename", so it can be a program name with args.
9670 set dummy $tool_basename; ac_word=$2
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9672 $as_echo_n "checking for $ac_word... " >&6; }
9673 if ${ac_cv_path_MKTEMP+:} false; then :
9674   $as_echo_n "(cached) " >&6
9675 else
9676   case $MKTEMP in
9677   [\\/]* | ?:[\\/]*)
9678   ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9679   ;;
9680   *)
9681   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9682 for as_dir in $PATH
9683 do
9684   IFS=$as_save_IFS
9685   test -z "$as_dir" && as_dir=.
9686     for ac_exec_ext in '' $ac_executable_extensions; do
9687   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9688     ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9689     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9690     break 2
9691   fi
9692 done
9693   done
9694 IFS=$as_save_IFS
9695 
9696   ;;
9697 esac
9698 fi
9699 MKTEMP=$ac_cv_path_MKTEMP
9700 if test -n "$MKTEMP"; then
9701   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9702 $as_echo "$MKTEMP" >&6; }
9703 else
9704   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9705 $as_echo "no" >&6; }
9706 fi
9707 
9708 
9709           if test "x$MKTEMP" = x; then
9710             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9711           fi
9712         else
9713           # Otherwise we believe it is a complete path. Use it as it is.
9714           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9715 $as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9716           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9717 $as_echo_n "checking for MKTEMP... " >&6; }
9718           if test ! -x "$tool_specified"; then
9719             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9720 $as_echo "not found" >&6; }
9721             as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9722           fi
9723           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9724 $as_echo "$tool_specified" >&6; }
9725         fi
9726       fi
9727     fi
9728 
9729   fi
9730 
9731 
9732 
9733   if test "x$MKTEMP" = x; then
9734     as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9735   fi
9736 
9737 
9738 
9739 
9740 
9741   # Publish this variable in the help.
9742 
9743 
9744   if [ -z "${MV+x}" ]; then
9745     # The variable is not set by user, try to locate tool using the code snippet
9746     for ac_prog in mv
9747 do
9748   # Extract the first word of "$ac_prog", so it can be a program name with args.
9749 set dummy $ac_prog; ac_word=$2
9750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9751 $as_echo_n "checking for $ac_word... " >&6; }
9752 if ${ac_cv_path_MV+:} false; then :
9753   $as_echo_n "(cached) " >&6
9754 else
9755   case $MV in
9756   [\\/]* | ?:[\\/]*)
9757   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9758   ;;
9759   *)
9760   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9761 for as_dir in $PATH
9762 do
9763   IFS=$as_save_IFS
9764   test -z "$as_dir" && as_dir=.
9765     for ac_exec_ext in '' $ac_executable_extensions; do
9766   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9767     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9768     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9769     break 2
9770   fi
9771 done
9772   done
9773 IFS=$as_save_IFS
9774 
9775   ;;
9776 esac
9777 fi
9778 MV=$ac_cv_path_MV
9779 if test -n "$MV"; then
9780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9781 $as_echo "$MV" >&6; }
9782 else
9783   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9784 $as_echo "no" >&6; }
9785 fi
9786 
9787 
9788   test -n "$MV" && break
9789 done
9790 
9791   else
9792     # The variable is set, but is it from the command line or the environment?
9793 
9794     # Try to remove the string !MV! from our list.
9795     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9796     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9797       # If it failed, the variable was not from the command line. Ignore it,
9798       # but warn the user (except for BASH, which is always set by the calling BASH).
9799       if test "xMV" != xBASH; then
9800         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9801 $as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9802       fi
9803       # Try to locate tool using the code snippet
9804       for ac_prog in mv
9805 do
9806   # Extract the first word of "$ac_prog", so it can be a program name with args.
9807 set dummy $ac_prog; ac_word=$2
9808 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9809 $as_echo_n "checking for $ac_word... " >&6; }
9810 if ${ac_cv_path_MV+:} false; then :
9811   $as_echo_n "(cached) " >&6
9812 else
9813   case $MV in
9814   [\\/]* | ?:[\\/]*)
9815   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9816   ;;
9817   *)
9818   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9819 for as_dir in $PATH
9820 do
9821   IFS=$as_save_IFS
9822   test -z "$as_dir" && as_dir=.
9823     for ac_exec_ext in '' $ac_executable_extensions; do
9824   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9825     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9826     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9827     break 2
9828   fi
9829 done
9830   done
9831 IFS=$as_save_IFS
9832 
9833   ;;
9834 esac
9835 fi
9836 MV=$ac_cv_path_MV
9837 if test -n "$MV"; then
9838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9839 $as_echo "$MV" >&6; }
9840 else
9841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9842 $as_echo "no" >&6; }
9843 fi
9844 
9845 
9846   test -n "$MV" && break
9847 done
9848 
9849     else
9850       # If it succeeded, then it was overridden by the user. We will use it
9851       # for the tool.
9852 
9853       # First remove it from the list of overridden variables, so we can test
9854       # for unknown variables in the end.
9855       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9856 
9857       # Check if we try to supply an empty value
9858       if test "x$MV" = x; then
9859         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9860 $as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9861         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9862 $as_echo_n "checking for MV... " >&6; }
9863         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9864 $as_echo "disabled" >&6; }
9865       else
9866         # Check if the provided tool contains a complete path.
9867         tool_specified="$MV"
9868         tool_basename="${tool_specified##*/}"
9869         if test "x$tool_basename" = "x$tool_specified"; then
9870           # A command without a complete path is provided, search $PATH.
9871           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9872 $as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9873           # Extract the first word of "$tool_basename", so it can be a program name with args.
9874 set dummy $tool_basename; ac_word=$2
9875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9876 $as_echo_n "checking for $ac_word... " >&6; }
9877 if ${ac_cv_path_MV+:} false; then :
9878   $as_echo_n "(cached) " >&6
9879 else
9880   case $MV in
9881   [\\/]* | ?:[\\/]*)
9882   ac_cv_path_MV="$MV" # Let the user override the test with a path.
9883   ;;
9884   *)
9885   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9886 for as_dir in $PATH
9887 do
9888   IFS=$as_save_IFS
9889   test -z "$as_dir" && as_dir=.
9890     for ac_exec_ext in '' $ac_executable_extensions; do
9891   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9892     ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9893     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9894     break 2
9895   fi
9896 done
9897   done
9898 IFS=$as_save_IFS
9899 
9900   ;;
9901 esac
9902 fi
9903 MV=$ac_cv_path_MV
9904 if test -n "$MV"; then
9905   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9906 $as_echo "$MV" >&6; }
9907 else
9908   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9909 $as_echo "no" >&6; }
9910 fi
9911 
9912 
9913           if test "x$MV" = x; then
9914             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9915           fi
9916         else
9917           # Otherwise we believe it is a complete path. Use it as it is.
9918           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9919 $as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9920           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9921 $as_echo_n "checking for MV... " >&6; }
9922           if test ! -x "$tool_specified"; then
9923             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9924 $as_echo "not found" >&6; }
9925             as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9926           fi
9927           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9928 $as_echo "$tool_specified" >&6; }
9929         fi
9930       fi
9931     fi
9932 
9933   fi
9934 
9935 
9936 
9937   if test "x$MV" = x; then
9938     as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9939   fi
9940 
9941 
9942 
9943 
9944 
9945   # Publish this variable in the help.
9946 
9947 
9948   if [ -z "${NAWK+x}" ]; then
9949     # The variable is not set by user, try to locate tool using the code snippet
9950     for ac_prog in nawk gawk awk
9951 do
9952   # Extract the first word of "$ac_prog", so it can be a program name with args.
9953 set dummy $ac_prog; ac_word=$2
9954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9955 $as_echo_n "checking for $ac_word... " >&6; }
9956 if ${ac_cv_path_NAWK+:} false; then :
9957   $as_echo_n "(cached) " >&6
9958 else
9959   case $NAWK in
9960   [\\/]* | ?:[\\/]*)
9961   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9962   ;;
9963   *)
9964   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9965 for as_dir in $PATH
9966 do
9967   IFS=$as_save_IFS
9968   test -z "$as_dir" && as_dir=.
9969     for ac_exec_ext in '' $ac_executable_extensions; do
9970   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9971     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9972     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9973     break 2
9974   fi
9975 done
9976   done
9977 IFS=$as_save_IFS
9978 
9979   ;;
9980 esac
9981 fi
9982 NAWK=$ac_cv_path_NAWK
9983 if test -n "$NAWK"; then
9984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9985 $as_echo "$NAWK" >&6; }
9986 else
9987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988 $as_echo "no" >&6; }
9989 fi
9990 
9991 
9992   test -n "$NAWK" && break
9993 done
9994 
9995   else
9996     # The variable is set, but is it from the command line or the environment?
9997 
9998     # Try to remove the string !NAWK! from our list.
9999     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
10000     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10001       # If it failed, the variable was not from the command line. Ignore it,
10002       # but warn the user (except for BASH, which is always set by the calling BASH).
10003       if test "xNAWK" != xBASH; then
10004         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
10005 $as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
10006       fi
10007       # Try to locate tool using the code snippet
10008       for ac_prog in nawk gawk awk
10009 do
10010   # Extract the first word of "$ac_prog", so it can be a program name with args.
10011 set dummy $ac_prog; ac_word=$2
10012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10013 $as_echo_n "checking for $ac_word... " >&6; }
10014 if ${ac_cv_path_NAWK+:} false; then :
10015   $as_echo_n "(cached) " >&6
10016 else
10017   case $NAWK in
10018   [\\/]* | ?:[\\/]*)
10019   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10020   ;;
10021   *)
10022   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10023 for as_dir in $PATH
10024 do
10025   IFS=$as_save_IFS
10026   test -z "$as_dir" && as_dir=.
10027     for ac_exec_ext in '' $ac_executable_extensions; do
10028   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10029     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10030     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10031     break 2
10032   fi
10033 done
10034   done
10035 IFS=$as_save_IFS
10036 
10037   ;;
10038 esac
10039 fi
10040 NAWK=$ac_cv_path_NAWK
10041 if test -n "$NAWK"; then
10042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10043 $as_echo "$NAWK" >&6; }
10044 else
10045   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10046 $as_echo "no" >&6; }
10047 fi
10048 
10049 
10050   test -n "$NAWK" && break
10051 done
10052 
10053     else
10054       # If it succeeded, then it was overridden by the user. We will use it
10055       # for the tool.
10056 
10057       # First remove it from the list of overridden variables, so we can test
10058       # for unknown variables in the end.
10059       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10060 
10061       # Check if we try to supply an empty value
10062       if test "x$NAWK" = x; then
10063         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10064 $as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10065         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10066 $as_echo_n "checking for NAWK... " >&6; }
10067         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10068 $as_echo "disabled" >&6; }
10069       else
10070         # Check if the provided tool contains a complete path.
10071         tool_specified="$NAWK"
10072         tool_basename="${tool_specified##*/}"
10073         if test "x$tool_basename" = "x$tool_specified"; then
10074           # A command without a complete path is provided, search $PATH.
10075           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10076 $as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10077           # Extract the first word of "$tool_basename", so it can be a program name with args.
10078 set dummy $tool_basename; ac_word=$2
10079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10080 $as_echo_n "checking for $ac_word... " >&6; }
10081 if ${ac_cv_path_NAWK+:} false; then :
10082   $as_echo_n "(cached) " >&6
10083 else
10084   case $NAWK in
10085   [\\/]* | ?:[\\/]*)
10086   ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10087   ;;
10088   *)
10089   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10090 for as_dir in $PATH
10091 do
10092   IFS=$as_save_IFS
10093   test -z "$as_dir" && as_dir=.
10094     for ac_exec_ext in '' $ac_executable_extensions; do
10095   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10096     ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10097     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10098     break 2
10099   fi
10100 done
10101   done
10102 IFS=$as_save_IFS
10103 
10104   ;;
10105 esac
10106 fi
10107 NAWK=$ac_cv_path_NAWK
10108 if test -n "$NAWK"; then
10109   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10110 $as_echo "$NAWK" >&6; }
10111 else
10112   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10113 $as_echo "no" >&6; }
10114 fi
10115 
10116 
10117           if test "x$NAWK" = x; then
10118             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10119           fi
10120         else
10121           # Otherwise we believe it is a complete path. Use it as it is.
10122           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10123 $as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10124           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10125 $as_echo_n "checking for NAWK... " >&6; }
10126           if test ! -x "$tool_specified"; then
10127             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10128 $as_echo "not found" >&6; }
10129             as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10130           fi
10131           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10132 $as_echo "$tool_specified" >&6; }
10133         fi
10134       fi
10135     fi
10136 
10137   fi
10138 
10139 
10140 
10141   if test "x$NAWK" = x; then
10142     as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10143   fi
10144 
10145 
10146 
10147 
10148 
10149   # Publish this variable in the help.
10150 
10151 
10152   if [ -z "${PRINTF+x}" ]; then
10153     # The variable is not set by user, try to locate tool using the code snippet
10154     for ac_prog in printf
10155 do
10156   # Extract the first word of "$ac_prog", so it can be a program name with args.
10157 set dummy $ac_prog; ac_word=$2
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10159 $as_echo_n "checking for $ac_word... " >&6; }
10160 if ${ac_cv_path_PRINTF+:} false; then :
10161   $as_echo_n "(cached) " >&6
10162 else
10163   case $PRINTF in
10164   [\\/]* | ?:[\\/]*)
10165   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10166   ;;
10167   *)
10168   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10169 for as_dir in $PATH
10170 do
10171   IFS=$as_save_IFS
10172   test -z "$as_dir" && as_dir=.
10173     for ac_exec_ext in '' $ac_executable_extensions; do
10174   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10175     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10176     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10177     break 2
10178   fi
10179 done
10180   done
10181 IFS=$as_save_IFS
10182 
10183   ;;
10184 esac
10185 fi
10186 PRINTF=$ac_cv_path_PRINTF
10187 if test -n "$PRINTF"; then
10188   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10189 $as_echo "$PRINTF" >&6; }
10190 else
10191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10192 $as_echo "no" >&6; }
10193 fi
10194 
10195 
10196   test -n "$PRINTF" && break
10197 done
10198 
10199   else
10200     # The variable is set, but is it from the command line or the environment?
10201 
10202     # Try to remove the string !PRINTF! from our list.
10203     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10204     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10205       # If it failed, the variable was not from the command line. Ignore it,
10206       # but warn the user (except for BASH, which is always set by the calling BASH).
10207       if test "xPRINTF" != xBASH; then
10208         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10209 $as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10210       fi
10211       # Try to locate tool using the code snippet
10212       for ac_prog in printf
10213 do
10214   # Extract the first word of "$ac_prog", so it can be a program name with args.
10215 set dummy $ac_prog; ac_word=$2
10216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10217 $as_echo_n "checking for $ac_word... " >&6; }
10218 if ${ac_cv_path_PRINTF+:} false; then :
10219   $as_echo_n "(cached) " >&6
10220 else
10221   case $PRINTF in
10222   [\\/]* | ?:[\\/]*)
10223   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10224   ;;
10225   *)
10226   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10227 for as_dir in $PATH
10228 do
10229   IFS=$as_save_IFS
10230   test -z "$as_dir" && as_dir=.
10231     for ac_exec_ext in '' $ac_executable_extensions; do
10232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10233     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10234     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10235     break 2
10236   fi
10237 done
10238   done
10239 IFS=$as_save_IFS
10240 
10241   ;;
10242 esac
10243 fi
10244 PRINTF=$ac_cv_path_PRINTF
10245 if test -n "$PRINTF"; then
10246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10247 $as_echo "$PRINTF" >&6; }
10248 else
10249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10250 $as_echo "no" >&6; }
10251 fi
10252 
10253 
10254   test -n "$PRINTF" && break
10255 done
10256 
10257     else
10258       # If it succeeded, then it was overridden by the user. We will use it
10259       # for the tool.
10260 
10261       # First remove it from the list of overridden variables, so we can test
10262       # for unknown variables in the end.
10263       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10264 
10265       # Check if we try to supply an empty value
10266       if test "x$PRINTF" = x; then
10267         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10268 $as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10269         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10270 $as_echo_n "checking for PRINTF... " >&6; }
10271         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10272 $as_echo "disabled" >&6; }
10273       else
10274         # Check if the provided tool contains a complete path.
10275         tool_specified="$PRINTF"
10276         tool_basename="${tool_specified##*/}"
10277         if test "x$tool_basename" = "x$tool_specified"; then
10278           # A command without a complete path is provided, search $PATH.
10279           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10280 $as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10281           # Extract the first word of "$tool_basename", so it can be a program name with args.
10282 set dummy $tool_basename; ac_word=$2
10283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10284 $as_echo_n "checking for $ac_word... " >&6; }
10285 if ${ac_cv_path_PRINTF+:} false; then :
10286   $as_echo_n "(cached) " >&6
10287 else
10288   case $PRINTF in
10289   [\\/]* | ?:[\\/]*)
10290   ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10291   ;;
10292   *)
10293   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10294 for as_dir in $PATH
10295 do
10296   IFS=$as_save_IFS
10297   test -z "$as_dir" && as_dir=.
10298     for ac_exec_ext in '' $ac_executable_extensions; do
10299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10300     ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10302     break 2
10303   fi
10304 done
10305   done
10306 IFS=$as_save_IFS
10307 
10308   ;;
10309 esac
10310 fi
10311 PRINTF=$ac_cv_path_PRINTF
10312 if test -n "$PRINTF"; then
10313   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10314 $as_echo "$PRINTF" >&6; }
10315 else
10316   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317 $as_echo "no" >&6; }
10318 fi
10319 
10320 
10321           if test "x$PRINTF" = x; then
10322             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10323           fi
10324         else
10325           # Otherwise we believe it is a complete path. Use it as it is.
10326           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10327 $as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10328           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10329 $as_echo_n "checking for PRINTF... " >&6; }
10330           if test ! -x "$tool_specified"; then
10331             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10332 $as_echo "not found" >&6; }
10333             as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10334           fi
10335           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10336 $as_echo "$tool_specified" >&6; }
10337         fi
10338       fi
10339     fi
10340 
10341   fi
10342 
10343 
10344 
10345   if test "x$PRINTF" = x; then
10346     as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10347   fi
10348 
10349 
10350 
10351 
10352 
10353   # Publish this variable in the help.
10354 
10355 
10356   if [ -z "${RM+x}" ]; then
10357     # The variable is not set by user, try to locate tool using the code snippet
10358     for ac_prog in rm
10359 do
10360   # Extract the first word of "$ac_prog", so it can be a program name with args.
10361 set dummy $ac_prog; ac_word=$2
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10363 $as_echo_n "checking for $ac_word... " >&6; }
10364 if ${ac_cv_path_RM+:} false; then :
10365   $as_echo_n "(cached) " >&6
10366 else
10367   case $RM in
10368   [\\/]* | ?:[\\/]*)
10369   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10370   ;;
10371   *)
10372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10373 for as_dir in $PATH
10374 do
10375   IFS=$as_save_IFS
10376   test -z "$as_dir" && as_dir=.
10377     for ac_exec_ext in '' $ac_executable_extensions; do
10378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10379     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10381     break 2
10382   fi
10383 done
10384   done
10385 IFS=$as_save_IFS
10386 
10387   ;;
10388 esac
10389 fi
10390 RM=$ac_cv_path_RM
10391 if test -n "$RM"; then
10392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10393 $as_echo "$RM" >&6; }
10394 else
10395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10396 $as_echo "no" >&6; }
10397 fi
10398 
10399 
10400   test -n "$RM" && break
10401 done
10402 
10403   else
10404     # The variable is set, but is it from the command line or the environment?
10405 
10406     # Try to remove the string !RM! from our list.
10407     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10408     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10409       # If it failed, the variable was not from the command line. Ignore it,
10410       # but warn the user (except for BASH, which is always set by the calling BASH).
10411       if test "xRM" != xBASH; then
10412         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10413 $as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10414       fi
10415       # Try to locate tool using the code snippet
10416       for ac_prog in rm
10417 do
10418   # Extract the first word of "$ac_prog", so it can be a program name with args.
10419 set dummy $ac_prog; ac_word=$2
10420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10421 $as_echo_n "checking for $ac_word... " >&6; }
10422 if ${ac_cv_path_RM+:} false; then :
10423   $as_echo_n "(cached) " >&6
10424 else
10425   case $RM in
10426   [\\/]* | ?:[\\/]*)
10427   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10428   ;;
10429   *)
10430   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10431 for as_dir in $PATH
10432 do
10433   IFS=$as_save_IFS
10434   test -z "$as_dir" && as_dir=.
10435     for ac_exec_ext in '' $ac_executable_extensions; do
10436   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10437     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10438     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10439     break 2
10440   fi
10441 done
10442   done
10443 IFS=$as_save_IFS
10444 
10445   ;;
10446 esac
10447 fi
10448 RM=$ac_cv_path_RM
10449 if test -n "$RM"; then
10450   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10451 $as_echo "$RM" >&6; }
10452 else
10453   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10454 $as_echo "no" >&6; }
10455 fi
10456 
10457 
10458   test -n "$RM" && break
10459 done
10460 
10461     else
10462       # If it succeeded, then it was overridden by the user. We will use it
10463       # for the tool.
10464 
10465       # First remove it from the list of overridden variables, so we can test
10466       # for unknown variables in the end.
10467       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10468 
10469       # Check if we try to supply an empty value
10470       if test "x$RM" = x; then
10471         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10472 $as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10473         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10474 $as_echo_n "checking for RM... " >&6; }
10475         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10476 $as_echo "disabled" >&6; }
10477       else
10478         # Check if the provided tool contains a complete path.
10479         tool_specified="$RM"
10480         tool_basename="${tool_specified##*/}"
10481         if test "x$tool_basename" = "x$tool_specified"; then
10482           # A command without a complete path is provided, search $PATH.
10483           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10484 $as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10485           # Extract the first word of "$tool_basename", so it can be a program name with args.
10486 set dummy $tool_basename; ac_word=$2
10487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10488 $as_echo_n "checking for $ac_word... " >&6; }
10489 if ${ac_cv_path_RM+:} false; then :
10490   $as_echo_n "(cached) " >&6
10491 else
10492   case $RM in
10493   [\\/]* | ?:[\\/]*)
10494   ac_cv_path_RM="$RM" # Let the user override the test with a path.
10495   ;;
10496   *)
10497   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10498 for as_dir in $PATH
10499 do
10500   IFS=$as_save_IFS
10501   test -z "$as_dir" && as_dir=.
10502     for ac_exec_ext in '' $ac_executable_extensions; do
10503   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10504     ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10505     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10506     break 2
10507   fi
10508 done
10509   done
10510 IFS=$as_save_IFS
10511 
10512   ;;
10513 esac
10514 fi
10515 RM=$ac_cv_path_RM
10516 if test -n "$RM"; then
10517   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10518 $as_echo "$RM" >&6; }
10519 else
10520   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521 $as_echo "no" >&6; }
10522 fi
10523 
10524 
10525           if test "x$RM" = x; then
10526             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10527           fi
10528         else
10529           # Otherwise we believe it is a complete path. Use it as it is.
10530           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10531 $as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10532           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10533 $as_echo_n "checking for RM... " >&6; }
10534           if test ! -x "$tool_specified"; then
10535             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10536 $as_echo "not found" >&6; }
10537             as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10538           fi
10539           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10540 $as_echo "$tool_specified" >&6; }
10541         fi
10542       fi
10543     fi
10544 
10545   fi
10546 
10547 
10548 
10549   if test "x$RM" = x; then
10550     as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10551   fi
10552 
10553 
10554 
10555 
10556 
10557   # Publish this variable in the help.
10558 
10559 
10560   if [ -z "${RMDIR+x}" ]; then
10561     # The variable is not set by user, try to locate tool using the code snippet
10562     for ac_prog in rmdir
10563 do
10564   # Extract the first word of "$ac_prog", so it can be a program name with args.
10565 set dummy $ac_prog; ac_word=$2
10566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10567 $as_echo_n "checking for $ac_word... " >&6; }
10568 if ${ac_cv_path_RMDIR+:} false; then :
10569   $as_echo_n "(cached) " >&6
10570 else
10571   case $RMDIR in
10572   [\\/]* | ?:[\\/]*)
10573   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10574   ;;
10575   *)
10576   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10577 for as_dir in $PATH
10578 do
10579   IFS=$as_save_IFS
10580   test -z "$as_dir" && as_dir=.
10581     for ac_exec_ext in '' $ac_executable_extensions; do
10582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10583     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10585     break 2
10586   fi
10587 done
10588   done
10589 IFS=$as_save_IFS
10590 
10591   ;;
10592 esac
10593 fi
10594 RMDIR=$ac_cv_path_RMDIR
10595 if test -n "$RMDIR"; then
10596   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10597 $as_echo "$RMDIR" >&6; }
10598 else
10599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10600 $as_echo "no" >&6; }
10601 fi
10602 
10603 
10604   test -n "$RMDIR" && break
10605 done
10606 
10607   else
10608     # The variable is set, but is it from the command line or the environment?
10609 
10610     # Try to remove the string !RMDIR! from our list.
10611     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10612     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10613       # If it failed, the variable was not from the command line. Ignore it,
10614       # but warn the user (except for BASH, which is always set by the calling BASH).
10615       if test "xRMDIR" != xBASH; then
10616         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10617 $as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10618       fi
10619       # Try to locate tool using the code snippet
10620       for ac_prog in rmdir
10621 do
10622   # Extract the first word of "$ac_prog", so it can be a program name with args.
10623 set dummy $ac_prog; ac_word=$2
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10625 $as_echo_n "checking for $ac_word... " >&6; }
10626 if ${ac_cv_path_RMDIR+:} false; then :
10627   $as_echo_n "(cached) " >&6
10628 else
10629   case $RMDIR in
10630   [\\/]* | ?:[\\/]*)
10631   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10632   ;;
10633   *)
10634   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10635 for as_dir in $PATH
10636 do
10637   IFS=$as_save_IFS
10638   test -z "$as_dir" && as_dir=.
10639     for ac_exec_ext in '' $ac_executable_extensions; do
10640   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10641     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10642     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10643     break 2
10644   fi
10645 done
10646   done
10647 IFS=$as_save_IFS
10648 
10649   ;;
10650 esac
10651 fi
10652 RMDIR=$ac_cv_path_RMDIR
10653 if test -n "$RMDIR"; then
10654   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10655 $as_echo "$RMDIR" >&6; }
10656 else
10657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10658 $as_echo "no" >&6; }
10659 fi
10660 
10661 
10662   test -n "$RMDIR" && break
10663 done
10664 
10665     else
10666       # If it succeeded, then it was overridden by the user. We will use it
10667       # for the tool.
10668 
10669       # First remove it from the list of overridden variables, so we can test
10670       # for unknown variables in the end.
10671       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10672 
10673       # Check if we try to supply an empty value
10674       if test "x$RMDIR" = x; then
10675         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10676 $as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10677         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10678 $as_echo_n "checking for RMDIR... " >&6; }
10679         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10680 $as_echo "disabled" >&6; }
10681       else
10682         # Check if the provided tool contains a complete path.
10683         tool_specified="$RMDIR"
10684         tool_basename="${tool_specified##*/}"
10685         if test "x$tool_basename" = "x$tool_specified"; then
10686           # A command without a complete path is provided, search $PATH.
10687           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10688 $as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10689           # Extract the first word of "$tool_basename", so it can be a program name with args.
10690 set dummy $tool_basename; ac_word=$2
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10692 $as_echo_n "checking for $ac_word... " >&6; }
10693 if ${ac_cv_path_RMDIR+:} false; then :
10694   $as_echo_n "(cached) " >&6
10695 else
10696   case $RMDIR in
10697   [\\/]* | ?:[\\/]*)
10698   ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10699   ;;
10700   *)
10701   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10702 for as_dir in $PATH
10703 do
10704   IFS=$as_save_IFS
10705   test -z "$as_dir" && as_dir=.
10706     for ac_exec_ext in '' $ac_executable_extensions; do
10707   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10708     ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10709     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10710     break 2
10711   fi
10712 done
10713   done
10714 IFS=$as_save_IFS
10715 
10716   ;;
10717 esac
10718 fi
10719 RMDIR=$ac_cv_path_RMDIR
10720 if test -n "$RMDIR"; then
10721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10722 $as_echo "$RMDIR" >&6; }
10723 else
10724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10725 $as_echo "no" >&6; }
10726 fi
10727 
10728 
10729           if test "x$RMDIR" = x; then
10730             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10731           fi
10732         else
10733           # Otherwise we believe it is a complete path. Use it as it is.
10734           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10735 $as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10736           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10737 $as_echo_n "checking for RMDIR... " >&6; }
10738           if test ! -x "$tool_specified"; then
10739             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10740 $as_echo "not found" >&6; }
10741             as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10742           fi
10743           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10744 $as_echo "$tool_specified" >&6; }
10745         fi
10746       fi
10747     fi
10748 
10749   fi
10750 
10751 
10752 
10753   if test "x$RMDIR" = x; then
10754     as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10755   fi
10756 
10757 
10758 
10759 
10760 
10761   # Publish this variable in the help.
10762 
10763 
10764   if [ -z "${SH+x}" ]; then
10765     # The variable is not set by user, try to locate tool using the code snippet
10766     for ac_prog in sh
10767 do
10768   # Extract the first word of "$ac_prog", so it can be a program name with args.
10769 set dummy $ac_prog; ac_word=$2
10770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10771 $as_echo_n "checking for $ac_word... " >&6; }
10772 if ${ac_cv_path_SH+:} false; then :
10773   $as_echo_n "(cached) " >&6
10774 else
10775   case $SH in
10776   [\\/]* | ?:[\\/]*)
10777   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10778   ;;
10779   *)
10780   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10781 for as_dir in $PATH
10782 do
10783   IFS=$as_save_IFS
10784   test -z "$as_dir" && as_dir=.
10785     for ac_exec_ext in '' $ac_executable_extensions; do
10786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10787     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10789     break 2
10790   fi
10791 done
10792   done
10793 IFS=$as_save_IFS
10794 
10795   ;;
10796 esac
10797 fi
10798 SH=$ac_cv_path_SH
10799 if test -n "$SH"; then
10800   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10801 $as_echo "$SH" >&6; }
10802 else
10803   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10804 $as_echo "no" >&6; }
10805 fi
10806 
10807 
10808   test -n "$SH" && break
10809 done
10810 
10811   else
10812     # The variable is set, but is it from the command line or the environment?
10813 
10814     # Try to remove the string !SH! from our list.
10815     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10816     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10817       # If it failed, the variable was not from the command line. Ignore it,
10818       # but warn the user (except for BASH, which is always set by the calling BASH).
10819       if test "xSH" != xBASH; then
10820         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10821 $as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10822       fi
10823       # Try to locate tool using the code snippet
10824       for ac_prog in sh
10825 do
10826   # Extract the first word of "$ac_prog", so it can be a program name with args.
10827 set dummy $ac_prog; ac_word=$2
10828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10829 $as_echo_n "checking for $ac_word... " >&6; }
10830 if ${ac_cv_path_SH+:} false; then :
10831   $as_echo_n "(cached) " >&6
10832 else
10833   case $SH in
10834   [\\/]* | ?:[\\/]*)
10835   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10836   ;;
10837   *)
10838   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10839 for as_dir in $PATH
10840 do
10841   IFS=$as_save_IFS
10842   test -z "$as_dir" && as_dir=.
10843     for ac_exec_ext in '' $ac_executable_extensions; do
10844   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10845     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10846     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10847     break 2
10848   fi
10849 done
10850   done
10851 IFS=$as_save_IFS
10852 
10853   ;;
10854 esac
10855 fi
10856 SH=$ac_cv_path_SH
10857 if test -n "$SH"; then
10858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10859 $as_echo "$SH" >&6; }
10860 else
10861   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10862 $as_echo "no" >&6; }
10863 fi
10864 
10865 
10866   test -n "$SH" && break
10867 done
10868 
10869     else
10870       # If it succeeded, then it was overridden by the user. We will use it
10871       # for the tool.
10872 
10873       # First remove it from the list of overridden variables, so we can test
10874       # for unknown variables in the end.
10875       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10876 
10877       # Check if we try to supply an empty value
10878       if test "x$SH" = x; then
10879         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10880 $as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10881         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10882 $as_echo_n "checking for SH... " >&6; }
10883         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10884 $as_echo "disabled" >&6; }
10885       else
10886         # Check if the provided tool contains a complete path.
10887         tool_specified="$SH"
10888         tool_basename="${tool_specified##*/}"
10889         if test "x$tool_basename" = "x$tool_specified"; then
10890           # A command without a complete path is provided, search $PATH.
10891           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10892 $as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10893           # Extract the first word of "$tool_basename", so it can be a program name with args.
10894 set dummy $tool_basename; ac_word=$2
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10896 $as_echo_n "checking for $ac_word... " >&6; }
10897 if ${ac_cv_path_SH+:} false; then :
10898   $as_echo_n "(cached) " >&6
10899 else
10900   case $SH in
10901   [\\/]* | ?:[\\/]*)
10902   ac_cv_path_SH="$SH" # Let the user override the test with a path.
10903   ;;
10904   *)
10905   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10906 for as_dir in $PATH
10907 do
10908   IFS=$as_save_IFS
10909   test -z "$as_dir" && as_dir=.
10910     for ac_exec_ext in '' $ac_executable_extensions; do
10911   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10912     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10913     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10914     break 2
10915   fi
10916 done
10917   done
10918 IFS=$as_save_IFS
10919 
10920   ;;
10921 esac
10922 fi
10923 SH=$ac_cv_path_SH
10924 if test -n "$SH"; then
10925   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10926 $as_echo "$SH" >&6; }
10927 else
10928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10929 $as_echo "no" >&6; }
10930 fi
10931 
10932 
10933           if test "x$SH" = x; then
10934             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10935           fi
10936         else
10937           # Otherwise we believe it is a complete path. Use it as it is.
10938           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10939 $as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10940           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10941 $as_echo_n "checking for SH... " >&6; }
10942           if test ! -x "$tool_specified"; then
10943             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10944 $as_echo "not found" >&6; }
10945             as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10946           fi
10947           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10948 $as_echo "$tool_specified" >&6; }
10949         fi
10950       fi
10951     fi
10952 
10953   fi
10954 
10955 
10956 
10957   if test "x$SH" = x; then
10958     as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10959   fi
10960 
10961 
10962 
10963 
10964 
10965   # Publish this variable in the help.
10966 
10967 
10968   if [ -z "${SORT+x}" ]; then
10969     # The variable is not set by user, try to locate tool using the code snippet
10970     for ac_prog in sort
10971 do
10972   # Extract the first word of "$ac_prog", so it can be a program name with args.
10973 set dummy $ac_prog; ac_word=$2
10974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10975 $as_echo_n "checking for $ac_word... " >&6; }
10976 if ${ac_cv_path_SORT+:} false; then :
10977   $as_echo_n "(cached) " >&6
10978 else
10979   case $SORT in
10980   [\\/]* | ?:[\\/]*)
10981   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10982   ;;
10983   *)
10984   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10985 for as_dir in $PATH
10986 do
10987   IFS=$as_save_IFS
10988   test -z "$as_dir" && as_dir=.
10989     for ac_exec_ext in '' $ac_executable_extensions; do
10990   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10991     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10992     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10993     break 2
10994   fi
10995 done
10996   done
10997 IFS=$as_save_IFS
10998 
10999   ;;
11000 esac
11001 fi
11002 SORT=$ac_cv_path_SORT
11003 if test -n "$SORT"; then
11004   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11005 $as_echo "$SORT" >&6; }
11006 else
11007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11008 $as_echo "no" >&6; }
11009 fi
11010 
11011 
11012   test -n "$SORT" && break
11013 done
11014 
11015   else
11016     # The variable is set, but is it from the command line or the environment?
11017 
11018     # Try to remove the string !SORT! from our list.
11019     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
11020     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11021       # If it failed, the variable was not from the command line. Ignore it,
11022       # but warn the user (except for BASH, which is always set by the calling BASH).
11023       if test "xSORT" != xBASH; then
11024         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
11025 $as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
11026       fi
11027       # Try to locate tool using the code snippet
11028       for ac_prog in sort
11029 do
11030   # Extract the first word of "$ac_prog", so it can be a program name with args.
11031 set dummy $ac_prog; ac_word=$2
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11033 $as_echo_n "checking for $ac_word... " >&6; }
11034 if ${ac_cv_path_SORT+:} false; then :
11035   $as_echo_n "(cached) " >&6
11036 else
11037   case $SORT in
11038   [\\/]* | ?:[\\/]*)
11039   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11040   ;;
11041   *)
11042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11043 for as_dir in $PATH
11044 do
11045   IFS=$as_save_IFS
11046   test -z "$as_dir" && as_dir=.
11047     for ac_exec_ext in '' $ac_executable_extensions; do
11048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11049     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11051     break 2
11052   fi
11053 done
11054   done
11055 IFS=$as_save_IFS
11056 
11057   ;;
11058 esac
11059 fi
11060 SORT=$ac_cv_path_SORT
11061 if test -n "$SORT"; then
11062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11063 $as_echo "$SORT" >&6; }
11064 else
11065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11066 $as_echo "no" >&6; }
11067 fi
11068 
11069 
11070   test -n "$SORT" && break
11071 done
11072 
11073     else
11074       # If it succeeded, then it was overridden by the user. We will use it
11075       # for the tool.
11076 
11077       # First remove it from the list of overridden variables, so we can test
11078       # for unknown variables in the end.
11079       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11080 
11081       # Check if we try to supply an empty value
11082       if test "x$SORT" = x; then
11083         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11084 $as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11085         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11086 $as_echo_n "checking for SORT... " >&6; }
11087         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11088 $as_echo "disabled" >&6; }
11089       else
11090         # Check if the provided tool contains a complete path.
11091         tool_specified="$SORT"
11092         tool_basename="${tool_specified##*/}"
11093         if test "x$tool_basename" = "x$tool_specified"; then
11094           # A command without a complete path is provided, search $PATH.
11095           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11096 $as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11097           # Extract the first word of "$tool_basename", so it can be a program name with args.
11098 set dummy $tool_basename; ac_word=$2
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11100 $as_echo_n "checking for $ac_word... " >&6; }
11101 if ${ac_cv_path_SORT+:} false; then :
11102   $as_echo_n "(cached) " >&6
11103 else
11104   case $SORT in
11105   [\\/]* | ?:[\\/]*)
11106   ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11107   ;;
11108   *)
11109   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11110 for as_dir in $PATH
11111 do
11112   IFS=$as_save_IFS
11113   test -z "$as_dir" && as_dir=.
11114     for ac_exec_ext in '' $ac_executable_extensions; do
11115   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11116     ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11117     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11118     break 2
11119   fi
11120 done
11121   done
11122 IFS=$as_save_IFS
11123 
11124   ;;
11125 esac
11126 fi
11127 SORT=$ac_cv_path_SORT
11128 if test -n "$SORT"; then
11129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11130 $as_echo "$SORT" >&6; }
11131 else
11132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11133 $as_echo "no" >&6; }
11134 fi
11135 
11136 
11137           if test "x$SORT" = x; then
11138             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11139           fi
11140         else
11141           # Otherwise we believe it is a complete path. Use it as it is.
11142           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11143 $as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11144           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11145 $as_echo_n "checking for SORT... " >&6; }
11146           if test ! -x "$tool_specified"; then
11147             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11148 $as_echo "not found" >&6; }
11149             as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11150           fi
11151           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11152 $as_echo "$tool_specified" >&6; }
11153         fi
11154       fi
11155     fi
11156 
11157   fi
11158 
11159 
11160 
11161   if test "x$SORT" = x; then
11162     as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11163   fi
11164 
11165 
11166 
11167 
11168 
11169   # Publish this variable in the help.
11170 
11171 
11172   if [ -z "${TAIL+x}" ]; then
11173     # The variable is not set by user, try to locate tool using the code snippet
11174     for ac_prog in tail
11175 do
11176   # Extract the first word of "$ac_prog", so it can be a program name with args.
11177 set dummy $ac_prog; ac_word=$2
11178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11179 $as_echo_n "checking for $ac_word... " >&6; }
11180 if ${ac_cv_path_TAIL+:} false; then :
11181   $as_echo_n "(cached) " >&6
11182 else
11183   case $TAIL in
11184   [\\/]* | ?:[\\/]*)
11185   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11186   ;;
11187   *)
11188   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11189 for as_dir in $PATH
11190 do
11191   IFS=$as_save_IFS
11192   test -z "$as_dir" && as_dir=.
11193     for ac_exec_ext in '' $ac_executable_extensions; do
11194   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11195     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11196     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11197     break 2
11198   fi
11199 done
11200   done
11201 IFS=$as_save_IFS
11202 
11203   ;;
11204 esac
11205 fi
11206 TAIL=$ac_cv_path_TAIL
11207 if test -n "$TAIL"; then
11208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11209 $as_echo "$TAIL" >&6; }
11210 else
11211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11212 $as_echo "no" >&6; }
11213 fi
11214 
11215 
11216   test -n "$TAIL" && break
11217 done
11218 
11219   else
11220     # The variable is set, but is it from the command line or the environment?
11221 
11222     # Try to remove the string !TAIL! from our list.
11223     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11224     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11225       # If it failed, the variable was not from the command line. Ignore it,
11226       # but warn the user (except for BASH, which is always set by the calling BASH).
11227       if test "xTAIL" != xBASH; then
11228         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11229 $as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11230       fi
11231       # Try to locate tool using the code snippet
11232       for ac_prog in tail
11233 do
11234   # Extract the first word of "$ac_prog", so it can be a program name with args.
11235 set dummy $ac_prog; ac_word=$2
11236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11237 $as_echo_n "checking for $ac_word... " >&6; }
11238 if ${ac_cv_path_TAIL+:} false; then :
11239   $as_echo_n "(cached) " >&6
11240 else
11241   case $TAIL in
11242   [\\/]* | ?:[\\/]*)
11243   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11244   ;;
11245   *)
11246   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11247 for as_dir in $PATH
11248 do
11249   IFS=$as_save_IFS
11250   test -z "$as_dir" && as_dir=.
11251     for ac_exec_ext in '' $ac_executable_extensions; do
11252   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11253     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11254     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11255     break 2
11256   fi
11257 done
11258   done
11259 IFS=$as_save_IFS
11260 
11261   ;;
11262 esac
11263 fi
11264 TAIL=$ac_cv_path_TAIL
11265 if test -n "$TAIL"; then
11266   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11267 $as_echo "$TAIL" >&6; }
11268 else
11269   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270 $as_echo "no" >&6; }
11271 fi
11272 
11273 
11274   test -n "$TAIL" && break
11275 done
11276 
11277     else
11278       # If it succeeded, then it was overridden by the user. We will use it
11279       # for the tool.
11280 
11281       # First remove it from the list of overridden variables, so we can test
11282       # for unknown variables in the end.
11283       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11284 
11285       # Check if we try to supply an empty value
11286       if test "x$TAIL" = x; then
11287         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11288 $as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11289         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11290 $as_echo_n "checking for TAIL... " >&6; }
11291         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11292 $as_echo "disabled" >&6; }
11293       else
11294         # Check if the provided tool contains a complete path.
11295         tool_specified="$TAIL"
11296         tool_basename="${tool_specified##*/}"
11297         if test "x$tool_basename" = "x$tool_specified"; then
11298           # A command without a complete path is provided, search $PATH.
11299           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11300 $as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11301           # Extract the first word of "$tool_basename", so it can be a program name with args.
11302 set dummy $tool_basename; ac_word=$2
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11304 $as_echo_n "checking for $ac_word... " >&6; }
11305 if ${ac_cv_path_TAIL+:} false; then :
11306   $as_echo_n "(cached) " >&6
11307 else
11308   case $TAIL in
11309   [\\/]* | ?:[\\/]*)
11310   ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11311   ;;
11312   *)
11313   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11314 for as_dir in $PATH
11315 do
11316   IFS=$as_save_IFS
11317   test -z "$as_dir" && as_dir=.
11318     for ac_exec_ext in '' $ac_executable_extensions; do
11319   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11320     ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11321     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11322     break 2
11323   fi
11324 done
11325   done
11326 IFS=$as_save_IFS
11327 
11328   ;;
11329 esac
11330 fi
11331 TAIL=$ac_cv_path_TAIL
11332 if test -n "$TAIL"; then
11333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11334 $as_echo "$TAIL" >&6; }
11335 else
11336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11337 $as_echo "no" >&6; }
11338 fi
11339 
11340 
11341           if test "x$TAIL" = x; then
11342             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11343           fi
11344         else
11345           # Otherwise we believe it is a complete path. Use it as it is.
11346           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11347 $as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11348           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11349 $as_echo_n "checking for TAIL... " >&6; }
11350           if test ! -x "$tool_specified"; then
11351             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11352 $as_echo "not found" >&6; }
11353             as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11354           fi
11355           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11356 $as_echo "$tool_specified" >&6; }
11357         fi
11358       fi
11359     fi
11360 
11361   fi
11362 
11363 
11364 
11365   if test "x$TAIL" = x; then
11366     as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11367   fi
11368 
11369 
11370 
11371 
11372 
11373   # Publish this variable in the help.
11374 
11375 
11376   if [ -z "${TAR+x}" ]; then
11377     # The variable is not set by user, try to locate tool using the code snippet
11378     for ac_prog in gtar tar
11379 do
11380   # Extract the first word of "$ac_prog", so it can be a program name with args.
11381 set dummy $ac_prog; ac_word=$2
11382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11383 $as_echo_n "checking for $ac_word... " >&6; }
11384 if ${ac_cv_path_TAR+:} false; then :
11385   $as_echo_n "(cached) " >&6
11386 else
11387   case $TAR in
11388   [\\/]* | ?:[\\/]*)
11389   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11390   ;;
11391   *)
11392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11393 for as_dir in $PATH
11394 do
11395   IFS=$as_save_IFS
11396   test -z "$as_dir" && as_dir=.
11397     for ac_exec_ext in '' $ac_executable_extensions; do
11398   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11399     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11401     break 2
11402   fi
11403 done
11404   done
11405 IFS=$as_save_IFS
11406 
11407   ;;
11408 esac
11409 fi
11410 TAR=$ac_cv_path_TAR
11411 if test -n "$TAR"; then
11412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11413 $as_echo "$TAR" >&6; }
11414 else
11415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11416 $as_echo "no" >&6; }
11417 fi
11418 
11419 
11420   test -n "$TAR" && break
11421 done
11422 
11423   else
11424     # The variable is set, but is it from the command line or the environment?
11425 
11426     # Try to remove the string !TAR! from our list.
11427     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11428     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11429       # If it failed, the variable was not from the command line. Ignore it,
11430       # but warn the user (except for BASH, which is always set by the calling BASH).
11431       if test "xTAR" != xBASH; then
11432         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11433 $as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11434       fi
11435       # Try to locate tool using the code snippet
11436       for ac_prog in gtar tar
11437 do
11438   # Extract the first word of "$ac_prog", so it can be a program name with args.
11439 set dummy $ac_prog; ac_word=$2
11440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11441 $as_echo_n "checking for $ac_word... " >&6; }
11442 if ${ac_cv_path_TAR+:} false; then :
11443   $as_echo_n "(cached) " >&6
11444 else
11445   case $TAR in
11446   [\\/]* | ?:[\\/]*)
11447   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11448   ;;
11449   *)
11450   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11451 for as_dir in $PATH
11452 do
11453   IFS=$as_save_IFS
11454   test -z "$as_dir" && as_dir=.
11455     for ac_exec_ext in '' $ac_executable_extensions; do
11456   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11457     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11458     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11459     break 2
11460   fi
11461 done
11462   done
11463 IFS=$as_save_IFS
11464 
11465   ;;
11466 esac
11467 fi
11468 TAR=$ac_cv_path_TAR
11469 if test -n "$TAR"; then
11470   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11471 $as_echo "$TAR" >&6; }
11472 else
11473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11474 $as_echo "no" >&6; }
11475 fi
11476 
11477 
11478   test -n "$TAR" && break
11479 done
11480 
11481     else
11482       # If it succeeded, then it was overridden by the user. We will use it
11483       # for the tool.
11484 
11485       # First remove it from the list of overridden variables, so we can test
11486       # for unknown variables in the end.
11487       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11488 
11489       # Check if we try to supply an empty value
11490       if test "x$TAR" = x; then
11491         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11492 $as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11493         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11494 $as_echo_n "checking for TAR... " >&6; }
11495         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11496 $as_echo "disabled" >&6; }
11497       else
11498         # Check if the provided tool contains a complete path.
11499         tool_specified="$TAR"
11500         tool_basename="${tool_specified##*/}"
11501         if test "x$tool_basename" = "x$tool_specified"; then
11502           # A command without a complete path is provided, search $PATH.
11503           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11504 $as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11505           # Extract the first word of "$tool_basename", so it can be a program name with args.
11506 set dummy $tool_basename; ac_word=$2
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11508 $as_echo_n "checking for $ac_word... " >&6; }
11509 if ${ac_cv_path_TAR+:} false; then :
11510   $as_echo_n "(cached) " >&6
11511 else
11512   case $TAR in
11513   [\\/]* | ?:[\\/]*)
11514   ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11515   ;;
11516   *)
11517   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11518 for as_dir in $PATH
11519 do
11520   IFS=$as_save_IFS
11521   test -z "$as_dir" && as_dir=.
11522     for ac_exec_ext in '' $ac_executable_extensions; do
11523   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11524     ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11525     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11526     break 2
11527   fi
11528 done
11529   done
11530 IFS=$as_save_IFS
11531 
11532   ;;
11533 esac
11534 fi
11535 TAR=$ac_cv_path_TAR
11536 if test -n "$TAR"; then
11537   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11538 $as_echo "$TAR" >&6; }
11539 else
11540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11541 $as_echo "no" >&6; }
11542 fi
11543 
11544 
11545           if test "x$TAR" = x; then
11546             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11547           fi
11548         else
11549           # Otherwise we believe it is a complete path. Use it as it is.
11550           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11551 $as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11552           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11553 $as_echo_n "checking for TAR... " >&6; }
11554           if test ! -x "$tool_specified"; then
11555             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11556 $as_echo "not found" >&6; }
11557             as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11558           fi
11559           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11560 $as_echo "$tool_specified" >&6; }
11561         fi
11562       fi
11563     fi
11564 
11565   fi
11566 
11567 
11568 
11569   if test "x$TAR" = x; then
11570     as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11571   fi
11572 
11573 
11574 
11575 
11576 
11577   # Publish this variable in the help.
11578 
11579 
11580   if [ -z "${TEE+x}" ]; then
11581     # The variable is not set by user, try to locate tool using the code snippet
11582     for ac_prog in tee
11583 do
11584   # Extract the first word of "$ac_prog", so it can be a program name with args.
11585 set dummy $ac_prog; ac_word=$2
11586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11587 $as_echo_n "checking for $ac_word... " >&6; }
11588 if ${ac_cv_path_TEE+:} false; then :
11589   $as_echo_n "(cached) " >&6
11590 else
11591   case $TEE in
11592   [\\/]* | ?:[\\/]*)
11593   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11594   ;;
11595   *)
11596   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11597 for as_dir in $PATH
11598 do
11599   IFS=$as_save_IFS
11600   test -z "$as_dir" && as_dir=.
11601     for ac_exec_ext in '' $ac_executable_extensions; do
11602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11603     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11605     break 2
11606   fi
11607 done
11608   done
11609 IFS=$as_save_IFS
11610 
11611   ;;
11612 esac
11613 fi
11614 TEE=$ac_cv_path_TEE
11615 if test -n "$TEE"; then
11616   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11617 $as_echo "$TEE" >&6; }
11618 else
11619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11620 $as_echo "no" >&6; }
11621 fi
11622 
11623 
11624   test -n "$TEE" && break
11625 done
11626 
11627   else
11628     # The variable is set, but is it from the command line or the environment?
11629 
11630     # Try to remove the string !TEE! from our list.
11631     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11632     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11633       # If it failed, the variable was not from the command line. Ignore it,
11634       # but warn the user (except for BASH, which is always set by the calling BASH).
11635       if test "xTEE" != xBASH; then
11636         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11637 $as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11638       fi
11639       # Try to locate tool using the code snippet
11640       for ac_prog in tee
11641 do
11642   # Extract the first word of "$ac_prog", so it can be a program name with args.
11643 set dummy $ac_prog; ac_word=$2
11644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11645 $as_echo_n "checking for $ac_word... " >&6; }
11646 if ${ac_cv_path_TEE+:} false; then :
11647   $as_echo_n "(cached) " >&6
11648 else
11649   case $TEE in
11650   [\\/]* | ?:[\\/]*)
11651   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11652   ;;
11653   *)
11654   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11655 for as_dir in $PATH
11656 do
11657   IFS=$as_save_IFS
11658   test -z "$as_dir" && as_dir=.
11659     for ac_exec_ext in '' $ac_executable_extensions; do
11660   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11661     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11662     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11663     break 2
11664   fi
11665 done
11666   done
11667 IFS=$as_save_IFS
11668 
11669   ;;
11670 esac
11671 fi
11672 TEE=$ac_cv_path_TEE
11673 if test -n "$TEE"; then
11674   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11675 $as_echo "$TEE" >&6; }
11676 else
11677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11678 $as_echo "no" >&6; }
11679 fi
11680 
11681 
11682   test -n "$TEE" && break
11683 done
11684 
11685     else
11686       # If it succeeded, then it was overridden by the user. We will use it
11687       # for the tool.
11688 
11689       # First remove it from the list of overridden variables, so we can test
11690       # for unknown variables in the end.
11691       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11692 
11693       # Check if we try to supply an empty value
11694       if test "x$TEE" = x; then
11695         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11696 $as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11698 $as_echo_n "checking for TEE... " >&6; }
11699         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11700 $as_echo "disabled" >&6; }
11701       else
11702         # Check if the provided tool contains a complete path.
11703         tool_specified="$TEE"
11704         tool_basename="${tool_specified##*/}"
11705         if test "x$tool_basename" = "x$tool_specified"; then
11706           # A command without a complete path is provided, search $PATH.
11707           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11708 $as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11709           # Extract the first word of "$tool_basename", so it can be a program name with args.
11710 set dummy $tool_basename; ac_word=$2
11711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11712 $as_echo_n "checking for $ac_word... " >&6; }
11713 if ${ac_cv_path_TEE+:} false; then :
11714   $as_echo_n "(cached) " >&6
11715 else
11716   case $TEE in
11717   [\\/]* | ?:[\\/]*)
11718   ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11719   ;;
11720   *)
11721   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11722 for as_dir in $PATH
11723 do
11724   IFS=$as_save_IFS
11725   test -z "$as_dir" && as_dir=.
11726     for ac_exec_ext in '' $ac_executable_extensions; do
11727   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11728     ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11729     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11730     break 2
11731   fi
11732 done
11733   done
11734 IFS=$as_save_IFS
11735 
11736   ;;
11737 esac
11738 fi
11739 TEE=$ac_cv_path_TEE
11740 if test -n "$TEE"; then
11741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11742 $as_echo "$TEE" >&6; }
11743 else
11744   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11745 $as_echo "no" >&6; }
11746 fi
11747 
11748 
11749           if test "x$TEE" = x; then
11750             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11751           fi
11752         else
11753           # Otherwise we believe it is a complete path. Use it as it is.
11754           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11755 $as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11756           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11757 $as_echo_n "checking for TEE... " >&6; }
11758           if test ! -x "$tool_specified"; then
11759             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11760 $as_echo "not found" >&6; }
11761             as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11762           fi
11763           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11764 $as_echo "$tool_specified" >&6; }
11765         fi
11766       fi
11767     fi
11768 
11769   fi
11770 
11771 
11772 
11773   if test "x$TEE" = x; then
11774     as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11775   fi
11776 
11777 
11778 
11779 
11780 
11781   # Publish this variable in the help.
11782 
11783 
11784   if [ -z "${TOUCH+x}" ]; then
11785     # The variable is not set by user, try to locate tool using the code snippet
11786     for ac_prog in touch
11787 do
11788   # Extract the first word of "$ac_prog", so it can be a program name with args.
11789 set dummy $ac_prog; ac_word=$2
11790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11791 $as_echo_n "checking for $ac_word... " >&6; }
11792 if ${ac_cv_path_TOUCH+:} false; then :
11793   $as_echo_n "(cached) " >&6
11794 else
11795   case $TOUCH in
11796   [\\/]* | ?:[\\/]*)
11797   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11798   ;;
11799   *)
11800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11801 for as_dir in $PATH
11802 do
11803   IFS=$as_save_IFS
11804   test -z "$as_dir" && as_dir=.
11805     for ac_exec_ext in '' $ac_executable_extensions; do
11806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11807     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11809     break 2
11810   fi
11811 done
11812   done
11813 IFS=$as_save_IFS
11814 
11815   ;;
11816 esac
11817 fi
11818 TOUCH=$ac_cv_path_TOUCH
11819 if test -n "$TOUCH"; then
11820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11821 $as_echo "$TOUCH" >&6; }
11822 else
11823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11824 $as_echo "no" >&6; }
11825 fi
11826 
11827 
11828   test -n "$TOUCH" && break
11829 done
11830 
11831   else
11832     # The variable is set, but is it from the command line or the environment?
11833 
11834     # Try to remove the string !TOUCH! from our list.
11835     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11836     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11837       # If it failed, the variable was not from the command line. Ignore it,
11838       # but warn the user (except for BASH, which is always set by the calling BASH).
11839       if test "xTOUCH" != xBASH; then
11840         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11841 $as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11842       fi
11843       # Try to locate tool using the code snippet
11844       for ac_prog in touch
11845 do
11846   # Extract the first word of "$ac_prog", so it can be a program name with args.
11847 set dummy $ac_prog; ac_word=$2
11848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11849 $as_echo_n "checking for $ac_word... " >&6; }
11850 if ${ac_cv_path_TOUCH+:} false; then :
11851   $as_echo_n "(cached) " >&6
11852 else
11853   case $TOUCH in
11854   [\\/]* | ?:[\\/]*)
11855   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11856   ;;
11857   *)
11858   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11859 for as_dir in $PATH
11860 do
11861   IFS=$as_save_IFS
11862   test -z "$as_dir" && as_dir=.
11863     for ac_exec_ext in '' $ac_executable_extensions; do
11864   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11865     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11866     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11867     break 2
11868   fi
11869 done
11870   done
11871 IFS=$as_save_IFS
11872 
11873   ;;
11874 esac
11875 fi
11876 TOUCH=$ac_cv_path_TOUCH
11877 if test -n "$TOUCH"; then
11878   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11879 $as_echo "$TOUCH" >&6; }
11880 else
11881   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11882 $as_echo "no" >&6; }
11883 fi
11884 
11885 
11886   test -n "$TOUCH" && break
11887 done
11888 
11889     else
11890       # If it succeeded, then it was overridden by the user. We will use it
11891       # for the tool.
11892 
11893       # First remove it from the list of overridden variables, so we can test
11894       # for unknown variables in the end.
11895       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11896 
11897       # Check if we try to supply an empty value
11898       if test "x$TOUCH" = x; then
11899         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11900 $as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11901         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11902 $as_echo_n "checking for TOUCH... " >&6; }
11903         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11904 $as_echo "disabled" >&6; }
11905       else
11906         # Check if the provided tool contains a complete path.
11907         tool_specified="$TOUCH"
11908         tool_basename="${tool_specified##*/}"
11909         if test "x$tool_basename" = "x$tool_specified"; then
11910           # A command without a complete path is provided, search $PATH.
11911           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11912 $as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11913           # Extract the first word of "$tool_basename", so it can be a program name with args.
11914 set dummy $tool_basename; ac_word=$2
11915 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11916 $as_echo_n "checking for $ac_word... " >&6; }
11917 if ${ac_cv_path_TOUCH+:} false; then :
11918   $as_echo_n "(cached) " >&6
11919 else
11920   case $TOUCH in
11921   [\\/]* | ?:[\\/]*)
11922   ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11923   ;;
11924   *)
11925   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11926 for as_dir in $PATH
11927 do
11928   IFS=$as_save_IFS
11929   test -z "$as_dir" && as_dir=.
11930     for ac_exec_ext in '' $ac_executable_extensions; do
11931   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11932     ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11933     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11934     break 2
11935   fi
11936 done
11937   done
11938 IFS=$as_save_IFS
11939 
11940   ;;
11941 esac
11942 fi
11943 TOUCH=$ac_cv_path_TOUCH
11944 if test -n "$TOUCH"; then
11945   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11946 $as_echo "$TOUCH" >&6; }
11947 else
11948   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11949 $as_echo "no" >&6; }
11950 fi
11951 
11952 
11953           if test "x$TOUCH" = x; then
11954             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11955           fi
11956         else
11957           # Otherwise we believe it is a complete path. Use it as it is.
11958           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11959 $as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11960           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11961 $as_echo_n "checking for TOUCH... " >&6; }
11962           if test ! -x "$tool_specified"; then
11963             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11964 $as_echo "not found" >&6; }
11965             as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11966           fi
11967           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11968 $as_echo "$tool_specified" >&6; }
11969         fi
11970       fi
11971     fi
11972 
11973   fi
11974 
11975 
11976 
11977   if test "x$TOUCH" = x; then
11978     as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11979   fi
11980 
11981 
11982 
11983 
11984 
11985   # Publish this variable in the help.
11986 
11987 
11988   if [ -z "${TR+x}" ]; then
11989     # The variable is not set by user, try to locate tool using the code snippet
11990     for ac_prog in tr
11991 do
11992   # Extract the first word of "$ac_prog", so it can be a program name with args.
11993 set dummy $ac_prog; ac_word=$2
11994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11995 $as_echo_n "checking for $ac_word... " >&6; }
11996 if ${ac_cv_path_TR+:} false; then :
11997   $as_echo_n "(cached) " >&6
11998 else
11999   case $TR in
12000   [\\/]* | ?:[\\/]*)
12001   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12002   ;;
12003   *)
12004   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12005 for as_dir in $PATH
12006 do
12007   IFS=$as_save_IFS
12008   test -z "$as_dir" && as_dir=.
12009     for ac_exec_ext in '' $ac_executable_extensions; do
12010   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12011     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12012     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12013     break 2
12014   fi
12015 done
12016   done
12017 IFS=$as_save_IFS
12018 
12019   ;;
12020 esac
12021 fi
12022 TR=$ac_cv_path_TR
12023 if test -n "$TR"; then
12024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12025 $as_echo "$TR" >&6; }
12026 else
12027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12028 $as_echo "no" >&6; }
12029 fi
12030 
12031 
12032   test -n "$TR" && break
12033 done
12034 
12035   else
12036     # The variable is set, but is it from the command line or the environment?
12037 
12038     # Try to remove the string !TR! from our list.
12039     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
12040     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12041       # If it failed, the variable was not from the command line. Ignore it,
12042       # but warn the user (except for BASH, which is always set by the calling BASH).
12043       if test "xTR" != xBASH; then
12044         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
12045 $as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
12046       fi
12047       # Try to locate tool using the code snippet
12048       for ac_prog in tr
12049 do
12050   # Extract the first word of "$ac_prog", so it can be a program name with args.
12051 set dummy $ac_prog; ac_word=$2
12052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12053 $as_echo_n "checking for $ac_word... " >&6; }
12054 if ${ac_cv_path_TR+:} false; then :
12055   $as_echo_n "(cached) " >&6
12056 else
12057   case $TR in
12058   [\\/]* | ?:[\\/]*)
12059   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12060   ;;
12061   *)
12062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12063 for as_dir in $PATH
12064 do
12065   IFS=$as_save_IFS
12066   test -z "$as_dir" && as_dir=.
12067     for ac_exec_ext in '' $ac_executable_extensions; do
12068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12069     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12071     break 2
12072   fi
12073 done
12074   done
12075 IFS=$as_save_IFS
12076 
12077   ;;
12078 esac
12079 fi
12080 TR=$ac_cv_path_TR
12081 if test -n "$TR"; then
12082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12083 $as_echo "$TR" >&6; }
12084 else
12085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12086 $as_echo "no" >&6; }
12087 fi
12088 
12089 
12090   test -n "$TR" && break
12091 done
12092 
12093     else
12094       # If it succeeded, then it was overridden by the user. We will use it
12095       # for the tool.
12096 
12097       # First remove it from the list of overridden variables, so we can test
12098       # for unknown variables in the end.
12099       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12100 
12101       # Check if we try to supply an empty value
12102       if test "x$TR" = x; then
12103         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12104 $as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12105         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12106 $as_echo_n "checking for TR... " >&6; }
12107         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12108 $as_echo "disabled" >&6; }
12109       else
12110         # Check if the provided tool contains a complete path.
12111         tool_specified="$TR"
12112         tool_basename="${tool_specified##*/}"
12113         if test "x$tool_basename" = "x$tool_specified"; then
12114           # A command without a complete path is provided, search $PATH.
12115           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12116 $as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12117           # Extract the first word of "$tool_basename", so it can be a program name with args.
12118 set dummy $tool_basename; ac_word=$2
12119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12120 $as_echo_n "checking for $ac_word... " >&6; }
12121 if ${ac_cv_path_TR+:} false; then :
12122   $as_echo_n "(cached) " >&6
12123 else
12124   case $TR in
12125   [\\/]* | ?:[\\/]*)
12126   ac_cv_path_TR="$TR" # Let the user override the test with a path.
12127   ;;
12128   *)
12129   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12130 for as_dir in $PATH
12131 do
12132   IFS=$as_save_IFS
12133   test -z "$as_dir" && as_dir=.
12134     for ac_exec_ext in '' $ac_executable_extensions; do
12135   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12136     ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12137     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12138     break 2
12139   fi
12140 done
12141   done
12142 IFS=$as_save_IFS
12143 
12144   ;;
12145 esac
12146 fi
12147 TR=$ac_cv_path_TR
12148 if test -n "$TR"; then
12149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12150 $as_echo "$TR" >&6; }
12151 else
12152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12153 $as_echo "no" >&6; }
12154 fi
12155 
12156 
12157           if test "x$TR" = x; then
12158             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12159           fi
12160         else
12161           # Otherwise we believe it is a complete path. Use it as it is.
12162           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12163 $as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12164           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12165 $as_echo_n "checking for TR... " >&6; }
12166           if test ! -x "$tool_specified"; then
12167             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12168 $as_echo "not found" >&6; }
12169             as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12170           fi
12171           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12172 $as_echo "$tool_specified" >&6; }
12173         fi
12174       fi
12175     fi
12176 
12177   fi
12178 
12179 
12180 
12181   if test "x$TR" = x; then
12182     as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12183   fi
12184 
12185 
12186 
12187 
12188 
12189   # Publish this variable in the help.
12190 
12191 
12192   if [ -z "${UNAME+x}" ]; then
12193     # The variable is not set by user, try to locate tool using the code snippet
12194     for ac_prog in uname
12195 do
12196   # Extract the first word of "$ac_prog", so it can be a program name with args.
12197 set dummy $ac_prog; ac_word=$2
12198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12199 $as_echo_n "checking for $ac_word... " >&6; }
12200 if ${ac_cv_path_UNAME+:} false; then :
12201   $as_echo_n "(cached) " >&6
12202 else
12203   case $UNAME in
12204   [\\/]* | ?:[\\/]*)
12205   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12206   ;;
12207   *)
12208   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12209 for as_dir in $PATH
12210 do
12211   IFS=$as_save_IFS
12212   test -z "$as_dir" && as_dir=.
12213     for ac_exec_ext in '' $ac_executable_extensions; do
12214   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12215     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12216     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12217     break 2
12218   fi
12219 done
12220   done
12221 IFS=$as_save_IFS
12222 
12223   ;;
12224 esac
12225 fi
12226 UNAME=$ac_cv_path_UNAME
12227 if test -n "$UNAME"; then
12228   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12229 $as_echo "$UNAME" >&6; }
12230 else
12231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12232 $as_echo "no" >&6; }
12233 fi
12234 
12235 
12236   test -n "$UNAME" && break
12237 done
12238 
12239   else
12240     # The variable is set, but is it from the command line or the environment?
12241 
12242     # Try to remove the string !UNAME! from our list.
12243     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12244     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12245       # If it failed, the variable was not from the command line. Ignore it,
12246       # but warn the user (except for BASH, which is always set by the calling BASH).
12247       if test "xUNAME" != xBASH; then
12248         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12249 $as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12250       fi
12251       # Try to locate tool using the code snippet
12252       for ac_prog in uname
12253 do
12254   # Extract the first word of "$ac_prog", so it can be a program name with args.
12255 set dummy $ac_prog; ac_word=$2
12256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12257 $as_echo_n "checking for $ac_word... " >&6; }
12258 if ${ac_cv_path_UNAME+:} false; then :
12259   $as_echo_n "(cached) " >&6
12260 else
12261   case $UNAME in
12262   [\\/]* | ?:[\\/]*)
12263   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12264   ;;
12265   *)
12266   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12267 for as_dir in $PATH
12268 do
12269   IFS=$as_save_IFS
12270   test -z "$as_dir" && as_dir=.
12271     for ac_exec_ext in '' $ac_executable_extensions; do
12272   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12273     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12274     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12275     break 2
12276   fi
12277 done
12278   done
12279 IFS=$as_save_IFS
12280 
12281   ;;
12282 esac
12283 fi
12284 UNAME=$ac_cv_path_UNAME
12285 if test -n "$UNAME"; then
12286   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12287 $as_echo "$UNAME" >&6; }
12288 else
12289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12290 $as_echo "no" >&6; }
12291 fi
12292 
12293 
12294   test -n "$UNAME" && break
12295 done
12296 
12297     else
12298       # If it succeeded, then it was overridden by the user. We will use it
12299       # for the tool.
12300 
12301       # First remove it from the list of overridden variables, so we can test
12302       # for unknown variables in the end.
12303       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12304 
12305       # Check if we try to supply an empty value
12306       if test "x$UNAME" = x; then
12307         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12308 $as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12310 $as_echo_n "checking for UNAME... " >&6; }
12311         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12312 $as_echo "disabled" >&6; }
12313       else
12314         # Check if the provided tool contains a complete path.
12315         tool_specified="$UNAME"
12316         tool_basename="${tool_specified##*/}"
12317         if test "x$tool_basename" = "x$tool_specified"; then
12318           # A command without a complete path is provided, search $PATH.
12319           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12320 $as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12321           # Extract the first word of "$tool_basename", so it can be a program name with args.
12322 set dummy $tool_basename; ac_word=$2
12323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12324 $as_echo_n "checking for $ac_word... " >&6; }
12325 if ${ac_cv_path_UNAME+:} false; then :
12326   $as_echo_n "(cached) " >&6
12327 else
12328   case $UNAME in
12329   [\\/]* | ?:[\\/]*)
12330   ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12331   ;;
12332   *)
12333   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12334 for as_dir in $PATH
12335 do
12336   IFS=$as_save_IFS
12337   test -z "$as_dir" && as_dir=.
12338     for ac_exec_ext in '' $ac_executable_extensions; do
12339   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12340     ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12341     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12342     break 2
12343   fi
12344 done
12345   done
12346 IFS=$as_save_IFS
12347 
12348   ;;
12349 esac
12350 fi
12351 UNAME=$ac_cv_path_UNAME
12352 if test -n "$UNAME"; then
12353   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12354 $as_echo "$UNAME" >&6; }
12355 else
12356   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12357 $as_echo "no" >&6; }
12358 fi
12359 
12360 
12361           if test "x$UNAME" = x; then
12362             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12363           fi
12364         else
12365           # Otherwise we believe it is a complete path. Use it as it is.
12366           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12367 $as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12368           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12369 $as_echo_n "checking for UNAME... " >&6; }
12370           if test ! -x "$tool_specified"; then
12371             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12372 $as_echo "not found" >&6; }
12373             as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12374           fi
12375           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12376 $as_echo "$tool_specified" >&6; }
12377         fi
12378       fi
12379     fi
12380 
12381   fi
12382 
12383 
12384 
12385   if test "x$UNAME" = x; then
12386     as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12387   fi
12388 
12389 
12390 
12391 
12392 
12393   # Publish this variable in the help.
12394 
12395 
12396   if [ -z "${UNIQ+x}" ]; then
12397     # The variable is not set by user, try to locate tool using the code snippet
12398     for ac_prog in uniq
12399 do
12400   # Extract the first word of "$ac_prog", so it can be a program name with args.
12401 set dummy $ac_prog; ac_word=$2
12402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12403 $as_echo_n "checking for $ac_word... " >&6; }
12404 if ${ac_cv_path_UNIQ+:} false; then :
12405   $as_echo_n "(cached) " >&6
12406 else
12407   case $UNIQ in
12408   [\\/]* | ?:[\\/]*)
12409   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12410   ;;
12411   *)
12412   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12413 for as_dir in $PATH
12414 do
12415   IFS=$as_save_IFS
12416   test -z "$as_dir" && as_dir=.
12417     for ac_exec_ext in '' $ac_executable_extensions; do
12418   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12419     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12420     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12421     break 2
12422   fi
12423 done
12424   done
12425 IFS=$as_save_IFS
12426 
12427   ;;
12428 esac
12429 fi
12430 UNIQ=$ac_cv_path_UNIQ
12431 if test -n "$UNIQ"; then
12432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12433 $as_echo "$UNIQ" >&6; }
12434 else
12435   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12436 $as_echo "no" >&6; }
12437 fi
12438 
12439 
12440   test -n "$UNIQ" && break
12441 done
12442 
12443   else
12444     # The variable is set, but is it from the command line or the environment?
12445 
12446     # Try to remove the string !UNIQ! from our list.
12447     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12448     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12449       # If it failed, the variable was not from the command line. Ignore it,
12450       # but warn the user (except for BASH, which is always set by the calling BASH).
12451       if test "xUNIQ" != xBASH; then
12452         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12453 $as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12454       fi
12455       # Try to locate tool using the code snippet
12456       for ac_prog in uniq
12457 do
12458   # Extract the first word of "$ac_prog", so it can be a program name with args.
12459 set dummy $ac_prog; ac_word=$2
12460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12461 $as_echo_n "checking for $ac_word... " >&6; }
12462 if ${ac_cv_path_UNIQ+:} false; then :
12463   $as_echo_n "(cached) " >&6
12464 else
12465   case $UNIQ in
12466   [\\/]* | ?:[\\/]*)
12467   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12468   ;;
12469   *)
12470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12471 for as_dir in $PATH
12472 do
12473   IFS=$as_save_IFS
12474   test -z "$as_dir" && as_dir=.
12475     for ac_exec_ext in '' $ac_executable_extensions; do
12476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12477     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12479     break 2
12480   fi
12481 done
12482   done
12483 IFS=$as_save_IFS
12484 
12485   ;;
12486 esac
12487 fi
12488 UNIQ=$ac_cv_path_UNIQ
12489 if test -n "$UNIQ"; then
12490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12491 $as_echo "$UNIQ" >&6; }
12492 else
12493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12494 $as_echo "no" >&6; }
12495 fi
12496 
12497 
12498   test -n "$UNIQ" && break
12499 done
12500 
12501     else
12502       # If it succeeded, then it was overridden by the user. We will use it
12503       # for the tool.
12504 
12505       # First remove it from the list of overridden variables, so we can test
12506       # for unknown variables in the end.
12507       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12508 
12509       # Check if we try to supply an empty value
12510       if test "x$UNIQ" = x; then
12511         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12512 $as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12513         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12514 $as_echo_n "checking for UNIQ... " >&6; }
12515         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12516 $as_echo "disabled" >&6; }
12517       else
12518         # Check if the provided tool contains a complete path.
12519         tool_specified="$UNIQ"
12520         tool_basename="${tool_specified##*/}"
12521         if test "x$tool_basename" = "x$tool_specified"; then
12522           # A command without a complete path is provided, search $PATH.
12523           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12524 $as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12525           # Extract the first word of "$tool_basename", so it can be a program name with args.
12526 set dummy $tool_basename; ac_word=$2
12527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12528 $as_echo_n "checking for $ac_word... " >&6; }
12529 if ${ac_cv_path_UNIQ+:} false; then :
12530   $as_echo_n "(cached) " >&6
12531 else
12532   case $UNIQ in
12533   [\\/]* | ?:[\\/]*)
12534   ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12535   ;;
12536   *)
12537   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12538 for as_dir in $PATH
12539 do
12540   IFS=$as_save_IFS
12541   test -z "$as_dir" && as_dir=.
12542     for ac_exec_ext in '' $ac_executable_extensions; do
12543   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12544     ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12545     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12546     break 2
12547   fi
12548 done
12549   done
12550 IFS=$as_save_IFS
12551 
12552   ;;
12553 esac
12554 fi
12555 UNIQ=$ac_cv_path_UNIQ
12556 if test -n "$UNIQ"; then
12557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12558 $as_echo "$UNIQ" >&6; }
12559 else
12560   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12561 $as_echo "no" >&6; }
12562 fi
12563 
12564 
12565           if test "x$UNIQ" = x; then
12566             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12567           fi
12568         else
12569           # Otherwise we believe it is a complete path. Use it as it is.
12570           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12571 $as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12572           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12573 $as_echo_n "checking for UNIQ... " >&6; }
12574           if test ! -x "$tool_specified"; then
12575             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12576 $as_echo "not found" >&6; }
12577             as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12578           fi
12579           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12580 $as_echo "$tool_specified" >&6; }
12581         fi
12582       fi
12583     fi
12584 
12585   fi
12586 
12587 
12588 
12589   if test "x$UNIQ" = x; then
12590     as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12591   fi
12592 
12593 
12594 
12595 
12596 
12597   # Publish this variable in the help.
12598 
12599 
12600   if [ -z "${WC+x}" ]; then
12601     # The variable is not set by user, try to locate tool using the code snippet
12602     for ac_prog in wc
12603 do
12604   # Extract the first word of "$ac_prog", so it can be a program name with args.
12605 set dummy $ac_prog; ac_word=$2
12606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12607 $as_echo_n "checking for $ac_word... " >&6; }
12608 if ${ac_cv_path_WC+:} false; then :
12609   $as_echo_n "(cached) " >&6
12610 else
12611   case $WC in
12612   [\\/]* | ?:[\\/]*)
12613   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12614   ;;
12615   *)
12616   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12617 for as_dir in $PATH
12618 do
12619   IFS=$as_save_IFS
12620   test -z "$as_dir" && as_dir=.
12621     for ac_exec_ext in '' $ac_executable_extensions; do
12622   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12623     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12624     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12625     break 2
12626   fi
12627 done
12628   done
12629 IFS=$as_save_IFS
12630 
12631   ;;
12632 esac
12633 fi
12634 WC=$ac_cv_path_WC
12635 if test -n "$WC"; then
12636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12637 $as_echo "$WC" >&6; }
12638 else
12639   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12640 $as_echo "no" >&6; }
12641 fi
12642 
12643 
12644   test -n "$WC" && break
12645 done
12646 
12647   else
12648     # The variable is set, but is it from the command line or the environment?
12649 
12650     # Try to remove the string !WC! from our list.
12651     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12652     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12653       # If it failed, the variable was not from the command line. Ignore it,
12654       # but warn the user (except for BASH, which is always set by the calling BASH).
12655       if test "xWC" != xBASH; then
12656         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12657 $as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12658       fi
12659       # Try to locate tool using the code snippet
12660       for ac_prog in wc
12661 do
12662   # Extract the first word of "$ac_prog", so it can be a program name with args.
12663 set dummy $ac_prog; ac_word=$2
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12665 $as_echo_n "checking for $ac_word... " >&6; }
12666 if ${ac_cv_path_WC+:} false; then :
12667   $as_echo_n "(cached) " >&6
12668 else
12669   case $WC in
12670   [\\/]* | ?:[\\/]*)
12671   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12672   ;;
12673   *)
12674   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12675 for as_dir in $PATH
12676 do
12677   IFS=$as_save_IFS
12678   test -z "$as_dir" && as_dir=.
12679     for ac_exec_ext in '' $ac_executable_extensions; do
12680   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12681     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12682     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12683     break 2
12684   fi
12685 done
12686   done
12687 IFS=$as_save_IFS
12688 
12689   ;;
12690 esac
12691 fi
12692 WC=$ac_cv_path_WC
12693 if test -n "$WC"; then
12694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12695 $as_echo "$WC" >&6; }
12696 else
12697   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12698 $as_echo "no" >&6; }
12699 fi
12700 
12701 
12702   test -n "$WC" && break
12703 done
12704 
12705     else
12706       # If it succeeded, then it was overridden by the user. We will use it
12707       # for the tool.
12708 
12709       # First remove it from the list of overridden variables, so we can test
12710       # for unknown variables in the end.
12711       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12712 
12713       # Check if we try to supply an empty value
12714       if test "x$WC" = x; then
12715         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12716 $as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12717         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12718 $as_echo_n "checking for WC... " >&6; }
12719         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12720 $as_echo "disabled" >&6; }
12721       else
12722         # Check if the provided tool contains a complete path.
12723         tool_specified="$WC"
12724         tool_basename="${tool_specified##*/}"
12725         if test "x$tool_basename" = "x$tool_specified"; then
12726           # A command without a complete path is provided, search $PATH.
12727           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12728 $as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12729           # Extract the first word of "$tool_basename", so it can be a program name with args.
12730 set dummy $tool_basename; ac_word=$2
12731 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12732 $as_echo_n "checking for $ac_word... " >&6; }
12733 if ${ac_cv_path_WC+:} false; then :
12734   $as_echo_n "(cached) " >&6
12735 else
12736   case $WC in
12737   [\\/]* | ?:[\\/]*)
12738   ac_cv_path_WC="$WC" # Let the user override the test with a path.
12739   ;;
12740   *)
12741   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12742 for as_dir in $PATH
12743 do
12744   IFS=$as_save_IFS
12745   test -z "$as_dir" && as_dir=.
12746     for ac_exec_ext in '' $ac_executable_extensions; do
12747   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12748     ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12749     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12750     break 2
12751   fi
12752 done
12753   done
12754 IFS=$as_save_IFS
12755 
12756   ;;
12757 esac
12758 fi
12759 WC=$ac_cv_path_WC
12760 if test -n "$WC"; then
12761   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12762 $as_echo "$WC" >&6; }
12763 else
12764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12765 $as_echo "no" >&6; }
12766 fi
12767 
12768 
12769           if test "x$WC" = x; then
12770             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12771           fi
12772         else
12773           # Otherwise we believe it is a complete path. Use it as it is.
12774           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12775 $as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12776           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12777 $as_echo_n "checking for WC... " >&6; }
12778           if test ! -x "$tool_specified"; then
12779             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12780 $as_echo "not found" >&6; }
12781             as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12782           fi
12783           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12784 $as_echo "$tool_specified" >&6; }
12785         fi
12786       fi
12787     fi
12788 
12789   fi
12790 
12791 
12792 
12793   if test "x$WC" = x; then
12794     as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12795   fi
12796 
12797 
12798 
12799 
12800 
12801   # Publish this variable in the help.
12802 
12803 
12804   if [ -z "${WHICH+x}" ]; then
12805     # The variable is not set by user, try to locate tool using the code snippet
12806     for ac_prog in which
12807 do
12808   # Extract the first word of "$ac_prog", so it can be a program name with args.
12809 set dummy $ac_prog; ac_word=$2
12810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12811 $as_echo_n "checking for $ac_word... " >&6; }
12812 if ${ac_cv_path_WHICH+:} false; then :
12813   $as_echo_n "(cached) " >&6
12814 else
12815   case $WHICH in
12816   [\\/]* | ?:[\\/]*)
12817   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12818   ;;
12819   *)
12820   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12821 for as_dir in $PATH
12822 do
12823   IFS=$as_save_IFS
12824   test -z "$as_dir" && as_dir=.
12825     for ac_exec_ext in '' $ac_executable_extensions; do
12826   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12827     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12828     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12829     break 2
12830   fi
12831 done
12832   done
12833 IFS=$as_save_IFS
12834 
12835   ;;
12836 esac
12837 fi
12838 WHICH=$ac_cv_path_WHICH
12839 if test -n "$WHICH"; then
12840   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12841 $as_echo "$WHICH" >&6; }
12842 else
12843   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12844 $as_echo "no" >&6; }
12845 fi
12846 
12847 
12848   test -n "$WHICH" && break
12849 done
12850 
12851   else
12852     # The variable is set, but is it from the command line or the environment?
12853 
12854     # Try to remove the string !WHICH! from our list.
12855     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12856     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12857       # If it failed, the variable was not from the command line. Ignore it,
12858       # but warn the user (except for BASH, which is always set by the calling BASH).
12859       if test "xWHICH" != xBASH; then
12860         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12861 $as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12862       fi
12863       # Try to locate tool using the code snippet
12864       for ac_prog in which
12865 do
12866   # Extract the first word of "$ac_prog", so it can be a program name with args.
12867 set dummy $ac_prog; ac_word=$2
12868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12869 $as_echo_n "checking for $ac_word... " >&6; }
12870 if ${ac_cv_path_WHICH+:} false; then :
12871   $as_echo_n "(cached) " >&6
12872 else
12873   case $WHICH in
12874   [\\/]* | ?:[\\/]*)
12875   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12876   ;;
12877   *)
12878   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12879 for as_dir in $PATH
12880 do
12881   IFS=$as_save_IFS
12882   test -z "$as_dir" && as_dir=.
12883     for ac_exec_ext in '' $ac_executable_extensions; do
12884   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12885     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12886     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12887     break 2
12888   fi
12889 done
12890   done
12891 IFS=$as_save_IFS
12892 
12893   ;;
12894 esac
12895 fi
12896 WHICH=$ac_cv_path_WHICH
12897 if test -n "$WHICH"; then
12898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12899 $as_echo "$WHICH" >&6; }
12900 else
12901   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12902 $as_echo "no" >&6; }
12903 fi
12904 
12905 
12906   test -n "$WHICH" && break
12907 done
12908 
12909     else
12910       # If it succeeded, then it was overridden by the user. We will use it
12911       # for the tool.
12912 
12913       # First remove it from the list of overridden variables, so we can test
12914       # for unknown variables in the end.
12915       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12916 
12917       # Check if we try to supply an empty value
12918       if test "x$WHICH" = x; then
12919         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12920 $as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12921         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12922 $as_echo_n "checking for WHICH... " >&6; }
12923         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12924 $as_echo "disabled" >&6; }
12925       else
12926         # Check if the provided tool contains a complete path.
12927         tool_specified="$WHICH"
12928         tool_basename="${tool_specified##*/}"
12929         if test "x$tool_basename" = "x$tool_specified"; then
12930           # A command without a complete path is provided, search $PATH.
12931           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12932 $as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12933           # Extract the first word of "$tool_basename", so it can be a program name with args.
12934 set dummy $tool_basename; ac_word=$2
12935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12936 $as_echo_n "checking for $ac_word... " >&6; }
12937 if ${ac_cv_path_WHICH+:} false; then :
12938   $as_echo_n "(cached) " >&6
12939 else
12940   case $WHICH in
12941   [\\/]* | ?:[\\/]*)
12942   ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12943   ;;
12944   *)
12945   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12946 for as_dir in $PATH
12947 do
12948   IFS=$as_save_IFS
12949   test -z "$as_dir" && as_dir=.
12950     for ac_exec_ext in '' $ac_executable_extensions; do
12951   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12952     ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12953     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12954     break 2
12955   fi
12956 done
12957   done
12958 IFS=$as_save_IFS
12959 
12960   ;;
12961 esac
12962 fi
12963 WHICH=$ac_cv_path_WHICH
12964 if test -n "$WHICH"; then
12965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12966 $as_echo "$WHICH" >&6; }
12967 else
12968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12969 $as_echo "no" >&6; }
12970 fi
12971 
12972 
12973           if test "x$WHICH" = x; then
12974             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12975           fi
12976         else
12977           # Otherwise we believe it is a complete path. Use it as it is.
12978           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12979 $as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12980           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12981 $as_echo_n "checking for WHICH... " >&6; }
12982           if test ! -x "$tool_specified"; then
12983             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12984 $as_echo "not found" >&6; }
12985             as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12986           fi
12987           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12988 $as_echo "$tool_specified" >&6; }
12989         fi
12990       fi
12991     fi
12992 
12993   fi
12994 
12995 
12996 
12997   if test "x$WHICH" = x; then
12998     as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12999   fi
13000 
13001 
13002 
13003 
13004 
13005   # Publish this variable in the help.
13006 
13007 
13008   if [ -z "${XARGS+x}" ]; then
13009     # The variable is not set by user, try to locate tool using the code snippet
13010     for ac_prog in xargs
13011 do
13012   # Extract the first word of "$ac_prog", so it can be a program name with args.
13013 set dummy $ac_prog; ac_word=$2
13014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13015 $as_echo_n "checking for $ac_word... " >&6; }
13016 if ${ac_cv_path_XARGS+:} false; then :
13017   $as_echo_n "(cached) " >&6
13018 else
13019   case $XARGS in
13020   [\\/]* | ?:[\\/]*)
13021   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13022   ;;
13023   *)
13024   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13025 for as_dir in $PATH
13026 do
13027   IFS=$as_save_IFS
13028   test -z "$as_dir" && as_dir=.
13029     for ac_exec_ext in '' $ac_executable_extensions; do
13030   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13031     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13032     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13033     break 2
13034   fi
13035 done
13036   done
13037 IFS=$as_save_IFS
13038 
13039   ;;
13040 esac
13041 fi
13042 XARGS=$ac_cv_path_XARGS
13043 if test -n "$XARGS"; then
13044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13045 $as_echo "$XARGS" >&6; }
13046 else
13047   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13048 $as_echo "no" >&6; }
13049 fi
13050 
13051 
13052   test -n "$XARGS" && break
13053 done
13054 
13055   else
13056     # The variable is set, but is it from the command line or the environment?
13057 
13058     # Try to remove the string !XARGS! from our list.
13059     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13060     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13061       # If it failed, the variable was not from the command line. Ignore it,
13062       # but warn the user (except for BASH, which is always set by the calling BASH).
13063       if test "xXARGS" != xBASH; then
13064         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13065 $as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13066       fi
13067       # Try to locate tool using the code snippet
13068       for ac_prog in xargs
13069 do
13070   # Extract the first word of "$ac_prog", so it can be a program name with args.
13071 set dummy $ac_prog; ac_word=$2
13072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13073 $as_echo_n "checking for $ac_word... " >&6; }
13074 if ${ac_cv_path_XARGS+:} false; then :
13075   $as_echo_n "(cached) " >&6
13076 else
13077   case $XARGS in
13078   [\\/]* | ?:[\\/]*)
13079   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13080   ;;
13081   *)
13082   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13083 for as_dir in $PATH
13084 do
13085   IFS=$as_save_IFS
13086   test -z "$as_dir" && as_dir=.
13087     for ac_exec_ext in '' $ac_executable_extensions; do
13088   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13089     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13090     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13091     break 2
13092   fi
13093 done
13094   done
13095 IFS=$as_save_IFS
13096 
13097   ;;
13098 esac
13099 fi
13100 XARGS=$ac_cv_path_XARGS
13101 if test -n "$XARGS"; then
13102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13103 $as_echo "$XARGS" >&6; }
13104 else
13105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13106 $as_echo "no" >&6; }
13107 fi
13108 
13109 
13110   test -n "$XARGS" && break
13111 done
13112 
13113     else
13114       # If it succeeded, then it was overridden by the user. We will use it
13115       # for the tool.
13116 
13117       # First remove it from the list of overridden variables, so we can test
13118       # for unknown variables in the end.
13119       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13120 
13121       # Check if we try to supply an empty value
13122       if test "x$XARGS" = x; then
13123         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13124 $as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13125         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13126 $as_echo_n "checking for XARGS... " >&6; }
13127         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13128 $as_echo "disabled" >&6; }
13129       else
13130         # Check if the provided tool contains a complete path.
13131         tool_specified="$XARGS"
13132         tool_basename="${tool_specified##*/}"
13133         if test "x$tool_basename" = "x$tool_specified"; then
13134           # A command without a complete path is provided, search $PATH.
13135           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13136 $as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13137           # Extract the first word of "$tool_basename", so it can be a program name with args.
13138 set dummy $tool_basename; ac_word=$2
13139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13140 $as_echo_n "checking for $ac_word... " >&6; }
13141 if ${ac_cv_path_XARGS+:} false; then :
13142   $as_echo_n "(cached) " >&6
13143 else
13144   case $XARGS in
13145   [\\/]* | ?:[\\/]*)
13146   ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13147   ;;
13148   *)
13149   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13150 for as_dir in $PATH
13151 do
13152   IFS=$as_save_IFS
13153   test -z "$as_dir" && as_dir=.
13154     for ac_exec_ext in '' $ac_executable_extensions; do
13155   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13156     ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13158     break 2
13159   fi
13160 done
13161   done
13162 IFS=$as_save_IFS
13163 
13164   ;;
13165 esac
13166 fi
13167 XARGS=$ac_cv_path_XARGS
13168 if test -n "$XARGS"; then
13169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13170 $as_echo "$XARGS" >&6; }
13171 else
13172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13173 $as_echo "no" >&6; }
13174 fi
13175 
13176 
13177           if test "x$XARGS" = x; then
13178             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13179           fi
13180         else
13181           # Otherwise we believe it is a complete path. Use it as it is.
13182           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13183 $as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13184           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13185 $as_echo_n "checking for XARGS... " >&6; }
13186           if test ! -x "$tool_specified"; then
13187             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13188 $as_echo "not found" >&6; }
13189             as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13190           fi
13191           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13192 $as_echo "$tool_specified" >&6; }
13193         fi
13194       fi
13195     fi
13196 
13197   fi
13198 
13199 
13200 
13201   if test "x$XARGS" = x; then
13202     as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13203   fi
13204 
13205 
13206 
13207   # Then required tools that require some special treatment.
13208 
13209 
13210   # Publish this variable in the help.
13211 
13212 
13213   if [ -z "${AWK+x}" ]; then
13214     # The variable is not set by user, try to locate tool using the code snippet
13215     for ac_prog in gawk mawk nawk awk
13216 do
13217   # Extract the first word of "$ac_prog", so it can be a program name with args.
13218 set dummy $ac_prog; ac_word=$2
13219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13220 $as_echo_n "checking for $ac_word... " >&6; }
13221 if ${ac_cv_prog_AWK+:} false; then :
13222   $as_echo_n "(cached) " >&6
13223 else
13224   if test -n "$AWK"; then
13225   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13226 else
13227 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13228 for as_dir in $PATH
13229 do
13230   IFS=$as_save_IFS
13231   test -z "$as_dir" && as_dir=.
13232     for ac_exec_ext in '' $ac_executable_extensions; do
13233   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13234     ac_cv_prog_AWK="$ac_prog"
13235     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13236     break 2
13237   fi
13238 done
13239   done
13240 IFS=$as_save_IFS
13241 
13242 fi
13243 fi
13244 AWK=$ac_cv_prog_AWK
13245 if test -n "$AWK"; then
13246   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13247 $as_echo "$AWK" >&6; }
13248 else
13249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13250 $as_echo "no" >&6; }
13251 fi
13252 
13253 
13254   test -n "$AWK" && break
13255 done
13256 
13257   else
13258     # The variable is set, but is it from the command line or the environment?
13259 
13260     # Try to remove the string !AWK! from our list.
13261     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13262     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13263       # If it failed, the variable was not from the command line. Ignore it,
13264       # but warn the user (except for BASH, which is always set by the calling BASH).
13265       if test "xAWK" != xBASH; then
13266         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13267 $as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13268       fi
13269       # Try to locate tool using the code snippet
13270       for ac_prog in gawk mawk nawk awk
13271 do
13272   # Extract the first word of "$ac_prog", so it can be a program name with args.
13273 set dummy $ac_prog; ac_word=$2
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13275 $as_echo_n "checking for $ac_word... " >&6; }
13276 if ${ac_cv_prog_AWK+:} false; then :
13277   $as_echo_n "(cached) " >&6
13278 else
13279   if test -n "$AWK"; then
13280   ac_cv_prog_AWK="$AWK" # Let the user override the test.
13281 else
13282 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13283 for as_dir in $PATH
13284 do
13285   IFS=$as_save_IFS
13286   test -z "$as_dir" && as_dir=.
13287     for ac_exec_ext in '' $ac_executable_extensions; do
13288   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13289     ac_cv_prog_AWK="$ac_prog"
13290     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13291     break 2
13292   fi
13293 done
13294   done
13295 IFS=$as_save_IFS
13296 
13297 fi
13298 fi
13299 AWK=$ac_cv_prog_AWK
13300 if test -n "$AWK"; then
13301   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13302 $as_echo "$AWK" >&6; }
13303 else
13304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13305 $as_echo "no" >&6; }
13306 fi
13307 
13308 
13309   test -n "$AWK" && break
13310 done
13311 
13312     else
13313       # If it succeeded, then it was overridden by the user. We will use it
13314       # for the tool.
13315 
13316       # First remove it from the list of overridden variables, so we can test
13317       # for unknown variables in the end.
13318       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13319 
13320       # Check if we try to supply an empty value
13321       if test "x$AWK" = x; then
13322         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13323 $as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13324         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13325 $as_echo_n "checking for AWK... " >&6; }
13326         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13327 $as_echo "disabled" >&6; }
13328       else
13329         # Check if the provided tool contains a complete path.
13330         tool_specified="$AWK"
13331         tool_basename="${tool_specified##*/}"
13332         if test "x$tool_basename" = "x$tool_specified"; then
13333           # A command without a complete path is provided, search $PATH.
13334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13335 $as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13336           # Extract the first word of "$tool_basename", so it can be a program name with args.
13337 set dummy $tool_basename; ac_word=$2
13338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13339 $as_echo_n "checking for $ac_word... " >&6; }
13340 if ${ac_cv_path_AWK+:} false; then :
13341   $as_echo_n "(cached) " >&6
13342 else
13343   case $AWK in
13344   [\\/]* | ?:[\\/]*)
13345   ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13346   ;;
13347   *)
13348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13349 for as_dir in $PATH
13350 do
13351   IFS=$as_save_IFS
13352   test -z "$as_dir" && as_dir=.
13353     for ac_exec_ext in '' $ac_executable_extensions; do
13354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13355     ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13357     break 2
13358   fi
13359 done
13360   done
13361 IFS=$as_save_IFS
13362 
13363   ;;
13364 esac
13365 fi
13366 AWK=$ac_cv_path_AWK
13367 if test -n "$AWK"; then
13368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13369 $as_echo "$AWK" >&6; }
13370 else
13371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13372 $as_echo "no" >&6; }
13373 fi
13374 
13375 
13376           if test "x$AWK" = x; then
13377             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13378           fi
13379         else
13380           # Otherwise we believe it is a complete path. Use it as it is.
13381           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13382 $as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13383           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13384 $as_echo_n "checking for AWK... " >&6; }
13385           if test ! -x "$tool_specified"; then
13386             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13387 $as_echo "not found" >&6; }
13388             as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13389           fi
13390           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13391 $as_echo "$tool_specified" >&6; }
13392         fi
13393       fi
13394     fi
13395 
13396   fi
13397 
13398 
13399   if test "x$AWK" = x; then
13400     as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13401   fi
13402 
13403 
13404 
13405 
13406   # Publish this variable in the help.
13407 
13408 
13409   if [ -z "${GREP+x}" ]; then
13410     # The variable is not set by user, try to locate tool using the code snippet
13411     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13412 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13413 if ${ac_cv_path_GREP+:} false; then :
13414   $as_echo_n "(cached) " >&6
13415 else
13416   if test -z "$GREP"; then
13417   ac_path_GREP_found=false
13418   # Loop through the user's path and test for each of PROGNAME-LIST
13419   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13420 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13421 do
13422   IFS=$as_save_IFS
13423   test -z "$as_dir" && as_dir=.
13424     for ac_prog in grep ggrep; do
13425     for ac_exec_ext in '' $ac_executable_extensions; do
13426       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13427       as_fn_executable_p "$ac_path_GREP" || continue
13428 # Check for GNU ac_path_GREP and select it if it is found.
13429   # Check for GNU $ac_path_GREP
13430 case `"$ac_path_GREP" --version 2>&1` in
13431 *GNU*)
13432   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13433 *)
13434   ac_count=0
13435   $as_echo_n 0123456789 >"conftest.in"
13436   while :
13437   do
13438     cat "conftest.in" "conftest.in" >"conftest.tmp"
13439     mv "conftest.tmp" "conftest.in"
13440     cp "conftest.in" "conftest.nl"
13441     $as_echo 'GREP' >> "conftest.nl"
13442     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13443     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13444     as_fn_arith $ac_count + 1 && ac_count=$as_val
13445     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13446       # Best one so far, save it but keep looking for a better one
13447       ac_cv_path_GREP="$ac_path_GREP"
13448       ac_path_GREP_max=$ac_count
13449     fi
13450     # 10*(2^10) chars as input seems more than enough
13451     test $ac_count -gt 10 && break
13452   done
13453   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13454 esac
13455 
13456       $ac_path_GREP_found && break 3
13457     done
13458   done
13459   done
13460 IFS=$as_save_IFS
13461   if test -z "$ac_cv_path_GREP"; then
13462     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13463   fi
13464 else
13465   ac_cv_path_GREP=$GREP
13466 fi
13467 
13468 fi
13469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13470 $as_echo "$ac_cv_path_GREP" >&6; }
13471  GREP="$ac_cv_path_GREP"
13472 
13473 
13474   else
13475     # The variable is set, but is it from the command line or the environment?
13476 
13477     # Try to remove the string !GREP! from our list.
13478     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13479     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13480       # If it failed, the variable was not from the command line. Ignore it,
13481       # but warn the user (except for BASH, which is always set by the calling BASH).
13482       if test "xGREP" != xBASH; then
13483         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13484 $as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13485       fi
13486       # Try to locate tool using the code snippet
13487       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13488 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13489 if ${ac_cv_path_GREP+:} false; then :
13490   $as_echo_n "(cached) " >&6
13491 else
13492   if test -z "$GREP"; then
13493   ac_path_GREP_found=false
13494   # Loop through the user's path and test for each of PROGNAME-LIST
13495   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13496 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13497 do
13498   IFS=$as_save_IFS
13499   test -z "$as_dir" && as_dir=.
13500     for ac_prog in grep ggrep; do
13501     for ac_exec_ext in '' $ac_executable_extensions; do
13502       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13503       as_fn_executable_p "$ac_path_GREP" || continue
13504 # Check for GNU ac_path_GREP and select it if it is found.
13505   # Check for GNU $ac_path_GREP
13506 case `"$ac_path_GREP" --version 2>&1` in
13507 *GNU*)
13508   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13509 *)
13510   ac_count=0
13511   $as_echo_n 0123456789 >"conftest.in"
13512   while :
13513   do
13514     cat "conftest.in" "conftest.in" >"conftest.tmp"
13515     mv "conftest.tmp" "conftest.in"
13516     cp "conftest.in" "conftest.nl"
13517     $as_echo 'GREP' >> "conftest.nl"
13518     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13519     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13520     as_fn_arith $ac_count + 1 && ac_count=$as_val
13521     if test $ac_count -gt ${ac_path_GREP_max-0}; then
13522       # Best one so far, save it but keep looking for a better one
13523       ac_cv_path_GREP="$ac_path_GREP"
13524       ac_path_GREP_max=$ac_count
13525     fi
13526     # 10*(2^10) chars as input seems more than enough
13527     test $ac_count -gt 10 && break
13528   done
13529   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13530 esac
13531 
13532       $ac_path_GREP_found && break 3
13533     done
13534   done
13535   done
13536 IFS=$as_save_IFS
13537   if test -z "$ac_cv_path_GREP"; then
13538     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13539   fi
13540 else
13541   ac_cv_path_GREP=$GREP
13542 fi
13543 
13544 fi
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13546 $as_echo "$ac_cv_path_GREP" >&6; }
13547  GREP="$ac_cv_path_GREP"
13548 
13549 
13550     else
13551       # If it succeeded, then it was overridden by the user. We will use it
13552       # for the tool.
13553 
13554       # First remove it from the list of overridden variables, so we can test
13555       # for unknown variables in the end.
13556       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13557 
13558       # Check if we try to supply an empty value
13559       if test "x$GREP" = x; then
13560         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13561 $as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13562         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13563 $as_echo_n "checking for GREP... " >&6; }
13564         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13565 $as_echo "disabled" >&6; }
13566       else
13567         # Check if the provided tool contains a complete path.
13568         tool_specified="$GREP"
13569         tool_basename="${tool_specified##*/}"
13570         if test "x$tool_basename" = "x$tool_specified"; then
13571           # A command without a complete path is provided, search $PATH.
13572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13573 $as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13574           # Extract the first word of "$tool_basename", so it can be a program name with args.
13575 set dummy $tool_basename; ac_word=$2
13576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13577 $as_echo_n "checking for $ac_word... " >&6; }
13578 if ${ac_cv_path_GREP+:} false; then :
13579   $as_echo_n "(cached) " >&6
13580 else
13581   case $GREP in
13582   [\\/]* | ?:[\\/]*)
13583   ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13584   ;;
13585   *)
13586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13587 for as_dir in $PATH
13588 do
13589   IFS=$as_save_IFS
13590   test -z "$as_dir" && as_dir=.
13591     for ac_exec_ext in '' $ac_executable_extensions; do
13592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13593     ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13595     break 2
13596   fi
13597 done
13598   done
13599 IFS=$as_save_IFS
13600 
13601   ;;
13602 esac
13603 fi
13604 GREP=$ac_cv_path_GREP
13605 if test -n "$GREP"; then
13606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13607 $as_echo "$GREP" >&6; }
13608 else
13609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13610 $as_echo "no" >&6; }
13611 fi
13612 
13613 
13614           if test "x$GREP" = x; then
13615             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13616           fi
13617         else
13618           # Otherwise we believe it is a complete path. Use it as it is.
13619           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13620 $as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13621           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13622 $as_echo_n "checking for GREP... " >&6; }
13623           if test ! -x "$tool_specified"; then
13624             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13625 $as_echo "not found" >&6; }
13626             as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13627           fi
13628           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13629 $as_echo "$tool_specified" >&6; }
13630         fi
13631       fi
13632     fi
13633 
13634   fi
13635 
13636 
13637   if test "x$GREP" = x; then
13638     as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13639   fi
13640 
13641 
13642 
13643 
13644   # Publish this variable in the help.
13645 
13646 
13647   if [ -z "${EGREP+x}" ]; then
13648     # The variable is not set by user, try to locate tool using the code snippet
13649     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13650 $as_echo_n "checking for egrep... " >&6; }
13651 if ${ac_cv_path_EGREP+:} false; then :
13652   $as_echo_n "(cached) " >&6
13653 else
13654   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13655    then ac_cv_path_EGREP="$GREP -E"
13656    else
13657      if test -z "$EGREP"; then
13658   ac_path_EGREP_found=false
13659   # Loop through the user's path and test for each of PROGNAME-LIST
13660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13661 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13662 do
13663   IFS=$as_save_IFS
13664   test -z "$as_dir" && as_dir=.
13665     for ac_prog in egrep; do
13666     for ac_exec_ext in '' $ac_executable_extensions; do
13667       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13668       as_fn_executable_p "$ac_path_EGREP" || continue
13669 # Check for GNU ac_path_EGREP and select it if it is found.
13670   # Check for GNU $ac_path_EGREP
13671 case `"$ac_path_EGREP" --version 2>&1` in
13672 *GNU*)
13673   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13674 *)
13675   ac_count=0
13676   $as_echo_n 0123456789 >"conftest.in"
13677   while :
13678   do
13679     cat "conftest.in" "conftest.in" >"conftest.tmp"
13680     mv "conftest.tmp" "conftest.in"
13681     cp "conftest.in" "conftest.nl"
13682     $as_echo 'EGREP' >> "conftest.nl"
13683     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13684     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13685     as_fn_arith $ac_count + 1 && ac_count=$as_val
13686     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13687       # Best one so far, save it but keep looking for a better one
13688       ac_cv_path_EGREP="$ac_path_EGREP"
13689       ac_path_EGREP_max=$ac_count
13690     fi
13691     # 10*(2^10) chars as input seems more than enough
13692     test $ac_count -gt 10 && break
13693   done
13694   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13695 esac
13696 
13697       $ac_path_EGREP_found && break 3
13698     done
13699   done
13700   done
13701 IFS=$as_save_IFS
13702   if test -z "$ac_cv_path_EGREP"; then
13703     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13704   fi
13705 else
13706   ac_cv_path_EGREP=$EGREP
13707 fi
13708 
13709    fi
13710 fi
13711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13712 $as_echo "$ac_cv_path_EGREP" >&6; }
13713  EGREP="$ac_cv_path_EGREP"
13714 
13715 
13716   else
13717     # The variable is set, but is it from the command line or the environment?
13718 
13719     # Try to remove the string !EGREP! from our list.
13720     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13721     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13722       # If it failed, the variable was not from the command line. Ignore it,
13723       # but warn the user (except for BASH, which is always set by the calling BASH).
13724       if test "xEGREP" != xBASH; then
13725         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13726 $as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13727       fi
13728       # Try to locate tool using the code snippet
13729       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13730 $as_echo_n "checking for egrep... " >&6; }
13731 if ${ac_cv_path_EGREP+:} false; then :
13732   $as_echo_n "(cached) " >&6
13733 else
13734   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13735    then ac_cv_path_EGREP="$GREP -E"
13736    else
13737      if test -z "$EGREP"; then
13738   ac_path_EGREP_found=false
13739   # Loop through the user's path and test for each of PROGNAME-LIST
13740   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13741 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13742 do
13743   IFS=$as_save_IFS
13744   test -z "$as_dir" && as_dir=.
13745     for ac_prog in egrep; do
13746     for ac_exec_ext in '' $ac_executable_extensions; do
13747       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13748       as_fn_executable_p "$ac_path_EGREP" || continue
13749 # Check for GNU ac_path_EGREP and select it if it is found.
13750   # Check for GNU $ac_path_EGREP
13751 case `"$ac_path_EGREP" --version 2>&1` in
13752 *GNU*)
13753   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13754 *)
13755   ac_count=0
13756   $as_echo_n 0123456789 >"conftest.in"
13757   while :
13758   do
13759     cat "conftest.in" "conftest.in" >"conftest.tmp"
13760     mv "conftest.tmp" "conftest.in"
13761     cp "conftest.in" "conftest.nl"
13762     $as_echo 'EGREP' >> "conftest.nl"
13763     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13764     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13765     as_fn_arith $ac_count + 1 && ac_count=$as_val
13766     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13767       # Best one so far, save it but keep looking for a better one
13768       ac_cv_path_EGREP="$ac_path_EGREP"
13769       ac_path_EGREP_max=$ac_count
13770     fi
13771     # 10*(2^10) chars as input seems more than enough
13772     test $ac_count -gt 10 && break
13773   done
13774   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13775 esac
13776 
13777       $ac_path_EGREP_found && break 3
13778     done
13779   done
13780   done
13781 IFS=$as_save_IFS
13782   if test -z "$ac_cv_path_EGREP"; then
13783     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13784   fi
13785 else
13786   ac_cv_path_EGREP=$EGREP
13787 fi
13788 
13789    fi
13790 fi
13791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13792 $as_echo "$ac_cv_path_EGREP" >&6; }
13793  EGREP="$ac_cv_path_EGREP"
13794 
13795 
13796     else
13797       # If it succeeded, then it was overridden by the user. We will use it
13798       # for the tool.
13799 
13800       # First remove it from the list of overridden variables, so we can test
13801       # for unknown variables in the end.
13802       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13803 
13804       # Check if we try to supply an empty value
13805       if test "x$EGREP" = x; then
13806         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13807 $as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13809 $as_echo_n "checking for EGREP... " >&6; }
13810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13811 $as_echo "disabled" >&6; }
13812       else
13813         # Check if the provided tool contains a complete path.
13814         tool_specified="$EGREP"
13815         tool_basename="${tool_specified##*/}"
13816         if test "x$tool_basename" = "x$tool_specified"; then
13817           # A command without a complete path is provided, search $PATH.
13818           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13819 $as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13820           # Extract the first word of "$tool_basename", so it can be a program name with args.
13821 set dummy $tool_basename; ac_word=$2
13822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13823 $as_echo_n "checking for $ac_word... " >&6; }
13824 if ${ac_cv_path_EGREP+:} false; then :
13825   $as_echo_n "(cached) " >&6
13826 else
13827   case $EGREP in
13828   [\\/]* | ?:[\\/]*)
13829   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13830   ;;
13831   *)
13832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13833 for as_dir in $PATH
13834 do
13835   IFS=$as_save_IFS
13836   test -z "$as_dir" && as_dir=.
13837     for ac_exec_ext in '' $ac_executable_extensions; do
13838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13839     ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13841     break 2
13842   fi
13843 done
13844   done
13845 IFS=$as_save_IFS
13846 
13847   ;;
13848 esac
13849 fi
13850 EGREP=$ac_cv_path_EGREP
13851 if test -n "$EGREP"; then
13852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13853 $as_echo "$EGREP" >&6; }
13854 else
13855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13856 $as_echo "no" >&6; }
13857 fi
13858 
13859 
13860           if test "x$EGREP" = x; then
13861             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13862           fi
13863         else
13864           # Otherwise we believe it is a complete path. Use it as it is.
13865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13866 $as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13867           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13868 $as_echo_n "checking for EGREP... " >&6; }
13869           if test ! -x "$tool_specified"; then
13870             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13871 $as_echo "not found" >&6; }
13872             as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13873           fi
13874           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13875 $as_echo "$tool_specified" >&6; }
13876         fi
13877       fi
13878     fi
13879 
13880   fi
13881 
13882 
13883   if test "x$EGREP" = x; then
13884     as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13885   fi
13886 
13887 
13888 
13889 
13890   # Publish this variable in the help.
13891 
13892 
13893   if [ -z "${FGREP+x}" ]; then
13894     # The variable is not set by user, try to locate tool using the code snippet
13895     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13896 $as_echo_n "checking for fgrep... " >&6; }
13897 if ${ac_cv_path_FGREP+:} false; then :
13898   $as_echo_n "(cached) " >&6
13899 else
13900   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13901    then ac_cv_path_FGREP="$GREP -F"
13902    else
13903      if test -z "$FGREP"; then
13904   ac_path_FGREP_found=false
13905   # Loop through the user's path and test for each of PROGNAME-LIST
13906   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13907 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13908 do
13909   IFS=$as_save_IFS
13910   test -z "$as_dir" && as_dir=.
13911     for ac_prog in fgrep; do
13912     for ac_exec_ext in '' $ac_executable_extensions; do
13913       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13914       as_fn_executable_p "$ac_path_FGREP" || continue
13915 # Check for GNU ac_path_FGREP and select it if it is found.
13916   # Check for GNU $ac_path_FGREP
13917 case `"$ac_path_FGREP" --version 2>&1` in
13918 *GNU*)
13919   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13920 *)
13921   ac_count=0
13922   $as_echo_n 0123456789 >"conftest.in"
13923   while :
13924   do
13925     cat "conftest.in" "conftest.in" >"conftest.tmp"
13926     mv "conftest.tmp" "conftest.in"
13927     cp "conftest.in" "conftest.nl"
13928     $as_echo 'FGREP' >> "conftest.nl"
13929     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13930     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13931     as_fn_arith $ac_count + 1 && ac_count=$as_val
13932     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13933       # Best one so far, save it but keep looking for a better one
13934       ac_cv_path_FGREP="$ac_path_FGREP"
13935       ac_path_FGREP_max=$ac_count
13936     fi
13937     # 10*(2^10) chars as input seems more than enough
13938     test $ac_count -gt 10 && break
13939   done
13940   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13941 esac
13942 
13943       $ac_path_FGREP_found && break 3
13944     done
13945   done
13946   done
13947 IFS=$as_save_IFS
13948   if test -z "$ac_cv_path_FGREP"; then
13949     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13950   fi
13951 else
13952   ac_cv_path_FGREP=$FGREP
13953 fi
13954 
13955    fi
13956 fi
13957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13958 $as_echo "$ac_cv_path_FGREP" >&6; }
13959  FGREP="$ac_cv_path_FGREP"
13960 
13961 
13962   else
13963     # The variable is set, but is it from the command line or the environment?
13964 
13965     # Try to remove the string !FGREP! from our list.
13966     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13967     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13968       # If it failed, the variable was not from the command line. Ignore it,
13969       # but warn the user (except for BASH, which is always set by the calling BASH).
13970       if test "xFGREP" != xBASH; then
13971         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13972 $as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13973       fi
13974       # Try to locate tool using the code snippet
13975       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13976 $as_echo_n "checking for fgrep... " >&6; }
13977 if ${ac_cv_path_FGREP+:} false; then :
13978   $as_echo_n "(cached) " >&6
13979 else
13980   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13981    then ac_cv_path_FGREP="$GREP -F"
13982    else
13983      if test -z "$FGREP"; then
13984   ac_path_FGREP_found=false
13985   # Loop through the user's path and test for each of PROGNAME-LIST
13986   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13987 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13988 do
13989   IFS=$as_save_IFS
13990   test -z "$as_dir" && as_dir=.
13991     for ac_prog in fgrep; do
13992     for ac_exec_ext in '' $ac_executable_extensions; do
13993       ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13994       as_fn_executable_p "$ac_path_FGREP" || continue
13995 # Check for GNU ac_path_FGREP and select it if it is found.
13996   # Check for GNU $ac_path_FGREP
13997 case `"$ac_path_FGREP" --version 2>&1` in
13998 *GNU*)
13999   ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
14000 *)
14001   ac_count=0
14002   $as_echo_n 0123456789 >"conftest.in"
14003   while :
14004   do
14005     cat "conftest.in" "conftest.in" >"conftest.tmp"
14006     mv "conftest.tmp" "conftest.in"
14007     cp "conftest.in" "conftest.nl"
14008     $as_echo 'FGREP' >> "conftest.nl"
14009     "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
14010     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14011     as_fn_arith $ac_count + 1 && ac_count=$as_val
14012     if test $ac_count -gt ${ac_path_FGREP_max-0}; then
14013       # Best one so far, save it but keep looking for a better one
14014       ac_cv_path_FGREP="$ac_path_FGREP"
14015       ac_path_FGREP_max=$ac_count
14016     fi
14017     # 10*(2^10) chars as input seems more than enough
14018     test $ac_count -gt 10 && break
14019   done
14020   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14021 esac
14022 
14023       $ac_path_FGREP_found && break 3
14024     done
14025   done
14026   done
14027 IFS=$as_save_IFS
14028   if test -z "$ac_cv_path_FGREP"; then
14029     as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
14030   fi
14031 else
14032   ac_cv_path_FGREP=$FGREP
14033 fi
14034 
14035    fi
14036 fi
14037 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
14038 $as_echo "$ac_cv_path_FGREP" >&6; }
14039  FGREP="$ac_cv_path_FGREP"
14040 
14041 
14042     else
14043       # If it succeeded, then it was overridden by the user. We will use it
14044       # for the tool.
14045 
14046       # First remove it from the list of overridden variables, so we can test
14047       # for unknown variables in the end.
14048       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14049 
14050       # Check if we try to supply an empty value
14051       if test "x$FGREP" = x; then
14052         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
14053 $as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14054         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14055 $as_echo_n "checking for FGREP... " >&6; }
14056         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14057 $as_echo "disabled" >&6; }
14058       else
14059         # Check if the provided tool contains a complete path.
14060         tool_specified="$FGREP"
14061         tool_basename="${tool_specified##*/}"
14062         if test "x$tool_basename" = "x$tool_specified"; then
14063           # A command without a complete path is provided, search $PATH.
14064           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14065 $as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14066           # Extract the first word of "$tool_basename", so it can be a program name with args.
14067 set dummy $tool_basename; ac_word=$2
14068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14069 $as_echo_n "checking for $ac_word... " >&6; }
14070 if ${ac_cv_path_FGREP+:} false; then :
14071   $as_echo_n "(cached) " >&6
14072 else
14073   case $FGREP in
14074   [\\/]* | ?:[\\/]*)
14075   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14076   ;;
14077   *)
14078   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14079 for as_dir in $PATH
14080 do
14081   IFS=$as_save_IFS
14082   test -z "$as_dir" && as_dir=.
14083     for ac_exec_ext in '' $ac_executable_extensions; do
14084   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14085     ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14086     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14087     break 2
14088   fi
14089 done
14090   done
14091 IFS=$as_save_IFS
14092 
14093   ;;
14094 esac
14095 fi
14096 FGREP=$ac_cv_path_FGREP
14097 if test -n "$FGREP"; then
14098   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14099 $as_echo "$FGREP" >&6; }
14100 else
14101   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14102 $as_echo "no" >&6; }
14103 fi
14104 
14105 
14106           if test "x$FGREP" = x; then
14107             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14108           fi
14109         else
14110           # Otherwise we believe it is a complete path. Use it as it is.
14111           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14112 $as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14113           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14114 $as_echo_n "checking for FGREP... " >&6; }
14115           if test ! -x "$tool_specified"; then
14116             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14117 $as_echo "not found" >&6; }
14118             as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14119           fi
14120           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14121 $as_echo "$tool_specified" >&6; }
14122         fi
14123       fi
14124     fi
14125 
14126   fi
14127 
14128 
14129   if test "x$FGREP" = x; then
14130     as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14131   fi
14132 
14133 
14134 
14135 
14136   # Publish this variable in the help.
14137 
14138 
14139   if [ -z "${SED+x}" ]; then
14140     # The variable is not set by user, try to locate tool using the code snippet
14141     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14142 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14143 if ${ac_cv_path_SED+:} false; then :
14144   $as_echo_n "(cached) " >&6
14145 else
14146             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14147      for ac_i in 1 2 3 4 5 6 7; do
14148        ac_script="$ac_script$as_nl$ac_script"
14149      done
14150      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14151      { ac_script=; unset ac_script;}
14152      if test -z "$SED"; then
14153   ac_path_SED_found=false
14154   # Loop through the user's path and test for each of PROGNAME-LIST
14155   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14156 for as_dir in $PATH
14157 do
14158   IFS=$as_save_IFS
14159   test -z "$as_dir" && as_dir=.
14160     for ac_prog in sed gsed; do
14161     for ac_exec_ext in '' $ac_executable_extensions; do
14162       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14163       as_fn_executable_p "$ac_path_SED" || continue
14164 # Check for GNU ac_path_SED and select it if it is found.
14165   # Check for GNU $ac_path_SED
14166 case `"$ac_path_SED" --version 2>&1` in
14167 *GNU*)
14168   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14169 *)
14170   ac_count=0
14171   $as_echo_n 0123456789 >"conftest.in"
14172   while :
14173   do
14174     cat "conftest.in" "conftest.in" >"conftest.tmp"
14175     mv "conftest.tmp" "conftest.in"
14176     cp "conftest.in" "conftest.nl"
14177     $as_echo '' >> "conftest.nl"
14178     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14179     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14180     as_fn_arith $ac_count + 1 && ac_count=$as_val
14181     if test $ac_count -gt ${ac_path_SED_max-0}; then
14182       # Best one so far, save it but keep looking for a better one
14183       ac_cv_path_SED="$ac_path_SED"
14184       ac_path_SED_max=$ac_count
14185     fi
14186     # 10*(2^10) chars as input seems more than enough
14187     test $ac_count -gt 10 && break
14188   done
14189   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14190 esac
14191 
14192       $ac_path_SED_found && break 3
14193     done
14194   done
14195   done
14196 IFS=$as_save_IFS
14197   if test -z "$ac_cv_path_SED"; then
14198     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14199   fi
14200 else
14201   ac_cv_path_SED=$SED
14202 fi
14203 
14204 fi
14205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14206 $as_echo "$ac_cv_path_SED" >&6; }
14207  SED="$ac_cv_path_SED"
14208   rm -f conftest.sed
14209 
14210   else
14211     # The variable is set, but is it from the command line or the environment?
14212 
14213     # Try to remove the string !SED! from our list.
14214     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14215     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14216       # If it failed, the variable was not from the command line. Ignore it,
14217       # but warn the user (except for BASH, which is always set by the calling BASH).
14218       if test "xSED" != xBASH; then
14219         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14220 $as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14221       fi
14222       # Try to locate tool using the code snippet
14223       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14224 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
14225 if ${ac_cv_path_SED+:} false; then :
14226   $as_echo_n "(cached) " >&6
14227 else
14228             ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14229      for ac_i in 1 2 3 4 5 6 7; do
14230        ac_script="$ac_script$as_nl$ac_script"
14231      done
14232      echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14233      { ac_script=; unset ac_script;}
14234      if test -z "$SED"; then
14235   ac_path_SED_found=false
14236   # Loop through the user's path and test for each of PROGNAME-LIST
14237   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14238 for as_dir in $PATH
14239 do
14240   IFS=$as_save_IFS
14241   test -z "$as_dir" && as_dir=.
14242     for ac_prog in sed gsed; do
14243     for ac_exec_ext in '' $ac_executable_extensions; do
14244       ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14245       as_fn_executable_p "$ac_path_SED" || continue
14246 # Check for GNU ac_path_SED and select it if it is found.
14247   # Check for GNU $ac_path_SED
14248 case `"$ac_path_SED" --version 2>&1` in
14249 *GNU*)
14250   ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14251 *)
14252   ac_count=0
14253   $as_echo_n 0123456789 >"conftest.in"
14254   while :
14255   do
14256     cat "conftest.in" "conftest.in" >"conftest.tmp"
14257     mv "conftest.tmp" "conftest.in"
14258     cp "conftest.in" "conftest.nl"
14259     $as_echo '' >> "conftest.nl"
14260     "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14261     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14262     as_fn_arith $ac_count + 1 && ac_count=$as_val
14263     if test $ac_count -gt ${ac_path_SED_max-0}; then
14264       # Best one so far, save it but keep looking for a better one
14265       ac_cv_path_SED="$ac_path_SED"
14266       ac_path_SED_max=$ac_count
14267     fi
14268     # 10*(2^10) chars as input seems more than enough
14269     test $ac_count -gt 10 && break
14270   done
14271   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14272 esac
14273 
14274       $ac_path_SED_found && break 3
14275     done
14276   done
14277   done
14278 IFS=$as_save_IFS
14279   if test -z "$ac_cv_path_SED"; then
14280     as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14281   fi
14282 else
14283   ac_cv_path_SED=$SED
14284 fi
14285 
14286 fi
14287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14288 $as_echo "$ac_cv_path_SED" >&6; }
14289  SED="$ac_cv_path_SED"
14290   rm -f conftest.sed
14291 
14292     else
14293       # If it succeeded, then it was overridden by the user. We will use it
14294       # for the tool.
14295 
14296       # First remove it from the list of overridden variables, so we can test
14297       # for unknown variables in the end.
14298       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14299 
14300       # Check if we try to supply an empty value
14301       if test "x$SED" = x; then
14302         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14303 $as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14304         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14305 $as_echo_n "checking for SED... " >&6; }
14306         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14307 $as_echo "disabled" >&6; }
14308       else
14309         # Check if the provided tool contains a complete path.
14310         tool_specified="$SED"
14311         tool_basename="${tool_specified##*/}"
14312         if test "x$tool_basename" = "x$tool_specified"; then
14313           # A command without a complete path is provided, search $PATH.
14314           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14315 $as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14316           # Extract the first word of "$tool_basename", so it can be a program name with args.
14317 set dummy $tool_basename; ac_word=$2
14318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14319 $as_echo_n "checking for $ac_word... " >&6; }
14320 if ${ac_cv_path_SED+:} false; then :
14321   $as_echo_n "(cached) " >&6
14322 else
14323   case $SED in
14324   [\\/]* | ?:[\\/]*)
14325   ac_cv_path_SED="$SED" # Let the user override the test with a path.
14326   ;;
14327   *)
14328   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14329 for as_dir in $PATH
14330 do
14331   IFS=$as_save_IFS
14332   test -z "$as_dir" && as_dir=.
14333     for ac_exec_ext in '' $ac_executable_extensions; do
14334   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14335     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14337     break 2
14338   fi
14339 done
14340   done
14341 IFS=$as_save_IFS
14342 
14343   ;;
14344 esac
14345 fi
14346 SED=$ac_cv_path_SED
14347 if test -n "$SED"; then
14348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14349 $as_echo "$SED" >&6; }
14350 else
14351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14352 $as_echo "no" >&6; }
14353 fi
14354 
14355 
14356           if test "x$SED" = x; then
14357             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14358           fi
14359         else
14360           # Otherwise we believe it is a complete path. Use it as it is.
14361           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14362 $as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14363           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14364 $as_echo_n "checking for SED... " >&6; }
14365           if test ! -x "$tool_specified"; then
14366             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14367 $as_echo "not found" >&6; }
14368             as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14369           fi
14370           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14371 $as_echo "$tool_specified" >&6; }
14372         fi
14373       fi
14374     fi
14375 
14376   fi
14377 
14378 
14379   if test "x$SED" = x; then
14380     as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14381   fi
14382 
14383 
14384 
14385   # Always force rm.
14386   RM="$RM -f"
14387 
14388   # pwd behaves differently on various platforms and some don't support the -L flag.
14389   # Always use the bash builtin pwd to get uniform behavior.
14390   THEPWDCMD=pwd
14391 
14392   # These are not required on all platforms
14393 
14394 
14395   # Publish this variable in the help.
14396 
14397 
14398   if [ -z "${CYGPATH+x}" ]; then
14399     # The variable is not set by user, try to locate tool using the code snippet
14400     for ac_prog in cygpath
14401 do
14402   # Extract the first word of "$ac_prog", so it can be a program name with args.
14403 set dummy $ac_prog; ac_word=$2
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14405 $as_echo_n "checking for $ac_word... " >&6; }
14406 if ${ac_cv_path_CYGPATH+:} false; then :
14407   $as_echo_n "(cached) " >&6
14408 else
14409   case $CYGPATH in
14410   [\\/]* | ?:[\\/]*)
14411   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14412   ;;
14413   *)
14414   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14415 for as_dir in $PATH
14416 do
14417   IFS=$as_save_IFS
14418   test -z "$as_dir" && as_dir=.
14419     for ac_exec_ext in '' $ac_executable_extensions; do
14420   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14421     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14422     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14423     break 2
14424   fi
14425 done
14426   done
14427 IFS=$as_save_IFS
14428 
14429   ;;
14430 esac
14431 fi
14432 CYGPATH=$ac_cv_path_CYGPATH
14433 if test -n "$CYGPATH"; then
14434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14435 $as_echo "$CYGPATH" >&6; }
14436 else
14437   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14438 $as_echo "no" >&6; }
14439 fi
14440 
14441 
14442   test -n "$CYGPATH" && break
14443 done
14444 
14445   else
14446     # The variable is set, but is it from the command line or the environment?
14447 
14448     # Try to remove the string !CYGPATH! from our list.
14449     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14450     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14451       # If it failed, the variable was not from the command line. Ignore it,
14452       # but warn the user (except for BASH, which is always set by the calling BASH).
14453       if test "xCYGPATH" != xBASH; then
14454         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14455 $as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14456       fi
14457       # Try to locate tool using the code snippet
14458       for ac_prog in cygpath
14459 do
14460   # Extract the first word of "$ac_prog", so it can be a program name with args.
14461 set dummy $ac_prog; ac_word=$2
14462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14463 $as_echo_n "checking for $ac_word... " >&6; }
14464 if ${ac_cv_path_CYGPATH+:} false; then :
14465   $as_echo_n "(cached) " >&6
14466 else
14467   case $CYGPATH in
14468   [\\/]* | ?:[\\/]*)
14469   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14470   ;;
14471   *)
14472   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14473 for as_dir in $PATH
14474 do
14475   IFS=$as_save_IFS
14476   test -z "$as_dir" && as_dir=.
14477     for ac_exec_ext in '' $ac_executable_extensions; do
14478   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14479     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14480     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14481     break 2
14482   fi
14483 done
14484   done
14485 IFS=$as_save_IFS
14486 
14487   ;;
14488 esac
14489 fi
14490 CYGPATH=$ac_cv_path_CYGPATH
14491 if test -n "$CYGPATH"; then
14492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14493 $as_echo "$CYGPATH" >&6; }
14494 else
14495   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14496 $as_echo "no" >&6; }
14497 fi
14498 
14499 
14500   test -n "$CYGPATH" && break
14501 done
14502 
14503     else
14504       # If it succeeded, then it was overridden by the user. We will use it
14505       # for the tool.
14506 
14507       # First remove it from the list of overridden variables, so we can test
14508       # for unknown variables in the end.
14509       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14510 
14511       # Check if we try to supply an empty value
14512       if test "x$CYGPATH" = x; then
14513         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14514 $as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14516 $as_echo_n "checking for CYGPATH... " >&6; }
14517         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14518 $as_echo "disabled" >&6; }
14519       else
14520         # Check if the provided tool contains a complete path.
14521         tool_specified="$CYGPATH"
14522         tool_basename="${tool_specified##*/}"
14523         if test "x$tool_basename" = "x$tool_specified"; then
14524           # A command without a complete path is provided, search $PATH.
14525           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14526 $as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14527           # Extract the first word of "$tool_basename", so it can be a program name with args.
14528 set dummy $tool_basename; ac_word=$2
14529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14530 $as_echo_n "checking for $ac_word... " >&6; }
14531 if ${ac_cv_path_CYGPATH+:} false; then :
14532   $as_echo_n "(cached) " >&6
14533 else
14534   case $CYGPATH in
14535   [\\/]* | ?:[\\/]*)
14536   ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14537   ;;
14538   *)
14539   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14540 for as_dir in $PATH
14541 do
14542   IFS=$as_save_IFS
14543   test -z "$as_dir" && as_dir=.
14544     for ac_exec_ext in '' $ac_executable_extensions; do
14545   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14546     ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14547     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14548     break 2
14549   fi
14550 done
14551   done
14552 IFS=$as_save_IFS
14553 
14554   ;;
14555 esac
14556 fi
14557 CYGPATH=$ac_cv_path_CYGPATH
14558 if test -n "$CYGPATH"; then
14559   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14560 $as_echo "$CYGPATH" >&6; }
14561 else
14562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563 $as_echo "no" >&6; }
14564 fi
14565 
14566 
14567           if test "x$CYGPATH" = x; then
14568             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14569           fi
14570         else
14571           # Otherwise we believe it is a complete path. Use it as it is.
14572           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14573 $as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14574           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14575 $as_echo_n "checking for CYGPATH... " >&6; }
14576           if test ! -x "$tool_specified"; then
14577             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14578 $as_echo "not found" >&6; }
14579             as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14580           fi
14581           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14582 $as_echo "$tool_specified" >&6; }
14583         fi
14584       fi
14585     fi
14586 
14587   fi
14588 
14589 
14590 
14591 
14592   # Publish this variable in the help.
14593 
14594 
14595   if [ -z "${READLINK+x}" ]; then
14596     # The variable is not set by user, try to locate tool using the code snippet
14597     for ac_prog in greadlink readlink
14598 do
14599   # Extract the first word of "$ac_prog", so it can be a program name with args.
14600 set dummy $ac_prog; ac_word=$2
14601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14602 $as_echo_n "checking for $ac_word... " >&6; }
14603 if ${ac_cv_path_READLINK+:} false; then :
14604   $as_echo_n "(cached) " >&6
14605 else
14606   case $READLINK in
14607   [\\/]* | ?:[\\/]*)
14608   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14609   ;;
14610   *)
14611   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14612 for as_dir in $PATH
14613 do
14614   IFS=$as_save_IFS
14615   test -z "$as_dir" && as_dir=.
14616     for ac_exec_ext in '' $ac_executable_extensions; do
14617   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14618     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14619     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14620     break 2
14621   fi
14622 done
14623   done
14624 IFS=$as_save_IFS
14625 
14626   ;;
14627 esac
14628 fi
14629 READLINK=$ac_cv_path_READLINK
14630 if test -n "$READLINK"; then
14631   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14632 $as_echo "$READLINK" >&6; }
14633 else
14634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14635 $as_echo "no" >&6; }
14636 fi
14637 
14638 
14639   test -n "$READLINK" && break
14640 done
14641 
14642   else
14643     # The variable is set, but is it from the command line or the environment?
14644 
14645     # Try to remove the string !READLINK! from our list.
14646     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14647     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14648       # If it failed, the variable was not from the command line. Ignore it,
14649       # but warn the user (except for BASH, which is always set by the calling BASH).
14650       if test "xREADLINK" != xBASH; then
14651         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14652 $as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14653       fi
14654       # Try to locate tool using the code snippet
14655       for ac_prog in greadlink readlink
14656 do
14657   # Extract the first word of "$ac_prog", so it can be a program name with args.
14658 set dummy $ac_prog; ac_word=$2
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14660 $as_echo_n "checking for $ac_word... " >&6; }
14661 if ${ac_cv_path_READLINK+:} false; then :
14662   $as_echo_n "(cached) " >&6
14663 else
14664   case $READLINK in
14665   [\\/]* | ?:[\\/]*)
14666   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14667   ;;
14668   *)
14669   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14670 for as_dir in $PATH
14671 do
14672   IFS=$as_save_IFS
14673   test -z "$as_dir" && as_dir=.
14674     for ac_exec_ext in '' $ac_executable_extensions; do
14675   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14676     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14677     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14678     break 2
14679   fi
14680 done
14681   done
14682 IFS=$as_save_IFS
14683 
14684   ;;
14685 esac
14686 fi
14687 READLINK=$ac_cv_path_READLINK
14688 if test -n "$READLINK"; then
14689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14690 $as_echo "$READLINK" >&6; }
14691 else
14692   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14693 $as_echo "no" >&6; }
14694 fi
14695 
14696 
14697   test -n "$READLINK" && break
14698 done
14699 
14700     else
14701       # If it succeeded, then it was overridden by the user. We will use it
14702       # for the tool.
14703 
14704       # First remove it from the list of overridden variables, so we can test
14705       # for unknown variables in the end.
14706       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14707 
14708       # Check if we try to supply an empty value
14709       if test "x$READLINK" = x; then
14710         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14711 $as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14712         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14713 $as_echo_n "checking for READLINK... " >&6; }
14714         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14715 $as_echo "disabled" >&6; }
14716       else
14717         # Check if the provided tool contains a complete path.
14718         tool_specified="$READLINK"
14719         tool_basename="${tool_specified##*/}"
14720         if test "x$tool_basename" = "x$tool_specified"; then
14721           # A command without a complete path is provided, search $PATH.
14722           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14723 $as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14724           # Extract the first word of "$tool_basename", so it can be a program name with args.
14725 set dummy $tool_basename; ac_word=$2
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14727 $as_echo_n "checking for $ac_word... " >&6; }
14728 if ${ac_cv_path_READLINK+:} false; then :
14729   $as_echo_n "(cached) " >&6
14730 else
14731   case $READLINK in
14732   [\\/]* | ?:[\\/]*)
14733   ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14734   ;;
14735   *)
14736   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14737 for as_dir in $PATH
14738 do
14739   IFS=$as_save_IFS
14740   test -z "$as_dir" && as_dir=.
14741     for ac_exec_ext in '' $ac_executable_extensions; do
14742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14743     ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14745     break 2
14746   fi
14747 done
14748   done
14749 IFS=$as_save_IFS
14750 
14751   ;;
14752 esac
14753 fi
14754 READLINK=$ac_cv_path_READLINK
14755 if test -n "$READLINK"; then
14756   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14757 $as_echo "$READLINK" >&6; }
14758 else
14759   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14760 $as_echo "no" >&6; }
14761 fi
14762 
14763 
14764           if test "x$READLINK" = x; then
14765             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14766           fi
14767         else
14768           # Otherwise we believe it is a complete path. Use it as it is.
14769           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14770 $as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14771           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14772 $as_echo_n "checking for READLINK... " >&6; }
14773           if test ! -x "$tool_specified"; then
14774             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14775 $as_echo "not found" >&6; }
14776             as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14777           fi
14778           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14779 $as_echo "$tool_specified" >&6; }
14780         fi
14781       fi
14782     fi
14783 
14784   fi
14785 
14786 
14787 
14788 
14789   # Publish this variable in the help.
14790 
14791 
14792   if [ -z "${DF+x}" ]; then
14793     # The variable is not set by user, try to locate tool using the code snippet
14794     for ac_prog in df
14795 do
14796   # Extract the first word of "$ac_prog", so it can be a program name with args.
14797 set dummy $ac_prog; ac_word=$2
14798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14799 $as_echo_n "checking for $ac_word... " >&6; }
14800 if ${ac_cv_path_DF+:} false; then :
14801   $as_echo_n "(cached) " >&6
14802 else
14803   case $DF in
14804   [\\/]* | ?:[\\/]*)
14805   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14806   ;;
14807   *)
14808   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14809 for as_dir in $PATH
14810 do
14811   IFS=$as_save_IFS
14812   test -z "$as_dir" && as_dir=.
14813     for ac_exec_ext in '' $ac_executable_extensions; do
14814   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14815     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14816     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14817     break 2
14818   fi
14819 done
14820   done
14821 IFS=$as_save_IFS
14822 
14823   ;;
14824 esac
14825 fi
14826 DF=$ac_cv_path_DF
14827 if test -n "$DF"; then
14828   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14829 $as_echo "$DF" >&6; }
14830 else
14831   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14832 $as_echo "no" >&6; }
14833 fi
14834 
14835 
14836   test -n "$DF" && break
14837 done
14838 
14839   else
14840     # The variable is set, but is it from the command line or the environment?
14841 
14842     # Try to remove the string !DF! from our list.
14843     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14844     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14845       # If it failed, the variable was not from the command line. Ignore it,
14846       # but warn the user (except for BASH, which is always set by the calling BASH).
14847       if test "xDF" != xBASH; then
14848         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14849 $as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14850       fi
14851       # Try to locate tool using the code snippet
14852       for ac_prog in df
14853 do
14854   # Extract the first word of "$ac_prog", so it can be a program name with args.
14855 set dummy $ac_prog; ac_word=$2
14856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14857 $as_echo_n "checking for $ac_word... " >&6; }
14858 if ${ac_cv_path_DF+:} false; then :
14859   $as_echo_n "(cached) " >&6
14860 else
14861   case $DF in
14862   [\\/]* | ?:[\\/]*)
14863   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14864   ;;
14865   *)
14866   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14867 for as_dir in $PATH
14868 do
14869   IFS=$as_save_IFS
14870   test -z "$as_dir" && as_dir=.
14871     for ac_exec_ext in '' $ac_executable_extensions; do
14872   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14873     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14874     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14875     break 2
14876   fi
14877 done
14878   done
14879 IFS=$as_save_IFS
14880 
14881   ;;
14882 esac
14883 fi
14884 DF=$ac_cv_path_DF
14885 if test -n "$DF"; then
14886   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14887 $as_echo "$DF" >&6; }
14888 else
14889   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14890 $as_echo "no" >&6; }
14891 fi
14892 
14893 
14894   test -n "$DF" && break
14895 done
14896 
14897     else
14898       # If it succeeded, then it was overridden by the user. We will use it
14899       # for the tool.
14900 
14901       # First remove it from the list of overridden variables, so we can test
14902       # for unknown variables in the end.
14903       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14904 
14905       # Check if we try to supply an empty value
14906       if test "x$DF" = x; then
14907         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14908 $as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14909         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14910 $as_echo_n "checking for DF... " >&6; }
14911         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14912 $as_echo "disabled" >&6; }
14913       else
14914         # Check if the provided tool contains a complete path.
14915         tool_specified="$DF"
14916         tool_basename="${tool_specified##*/}"
14917         if test "x$tool_basename" = "x$tool_specified"; then
14918           # A command without a complete path is provided, search $PATH.
14919           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14920 $as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14921           # Extract the first word of "$tool_basename", so it can be a program name with args.
14922 set dummy $tool_basename; ac_word=$2
14923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14924 $as_echo_n "checking for $ac_word... " >&6; }
14925 if ${ac_cv_path_DF+:} false; then :
14926   $as_echo_n "(cached) " >&6
14927 else
14928   case $DF in
14929   [\\/]* | ?:[\\/]*)
14930   ac_cv_path_DF="$DF" # Let the user override the test with a path.
14931   ;;
14932   *)
14933   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14934 for as_dir in $PATH
14935 do
14936   IFS=$as_save_IFS
14937   test -z "$as_dir" && as_dir=.
14938     for ac_exec_ext in '' $ac_executable_extensions; do
14939   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14940     ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14941     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14942     break 2
14943   fi
14944 done
14945   done
14946 IFS=$as_save_IFS
14947 
14948   ;;
14949 esac
14950 fi
14951 DF=$ac_cv_path_DF
14952 if test -n "$DF"; then
14953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14954 $as_echo "$DF" >&6; }
14955 else
14956   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14957 $as_echo "no" >&6; }
14958 fi
14959 
14960 
14961           if test "x$DF" = x; then
14962             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14963           fi
14964         else
14965           # Otherwise we believe it is a complete path. Use it as it is.
14966           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14967 $as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14968           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14969 $as_echo_n "checking for DF... " >&6; }
14970           if test ! -x "$tool_specified"; then
14971             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14972 $as_echo "not found" >&6; }
14973             as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14974           fi
14975           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14976 $as_echo "$tool_specified" >&6; }
14977         fi
14978       fi
14979     fi
14980 
14981   fi
14982 
14983 
14984 
14985 
14986   # Publish this variable in the help.
14987 
14988 
14989   if [ -z "${CPIO+x}" ]; then
14990     # The variable is not set by user, try to locate tool using the code snippet
14991     for ac_prog in cpio bsdcpio
14992 do
14993   # Extract the first word of "$ac_prog", so it can be a program name with args.
14994 set dummy $ac_prog; ac_word=$2
14995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14996 $as_echo_n "checking for $ac_word... " >&6; }
14997 if ${ac_cv_path_CPIO+:} false; then :
14998   $as_echo_n "(cached) " >&6
14999 else
15000   case $CPIO in
15001   [\\/]* | ?:[\\/]*)
15002   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15003   ;;
15004   *)
15005   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15006 for as_dir in $PATH
15007 do
15008   IFS=$as_save_IFS
15009   test -z "$as_dir" && as_dir=.
15010     for ac_exec_ext in '' $ac_executable_extensions; do
15011   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15012     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15013     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15014     break 2
15015   fi
15016 done
15017   done
15018 IFS=$as_save_IFS
15019 
15020   ;;
15021 esac
15022 fi
15023 CPIO=$ac_cv_path_CPIO
15024 if test -n "$CPIO"; then
15025   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15026 $as_echo "$CPIO" >&6; }
15027 else
15028   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15029 $as_echo "no" >&6; }
15030 fi
15031 
15032 
15033   test -n "$CPIO" && break
15034 done
15035 
15036   else
15037     # The variable is set, but is it from the command line or the environment?
15038 
15039     # Try to remove the string !CPIO! from our list.
15040     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
15041     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15042       # If it failed, the variable was not from the command line. Ignore it,
15043       # but warn the user (except for BASH, which is always set by the calling BASH).
15044       if test "xCPIO" != xBASH; then
15045         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
15046 $as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
15047       fi
15048       # Try to locate tool using the code snippet
15049       for ac_prog in cpio bsdcpio
15050 do
15051   # Extract the first word of "$ac_prog", so it can be a program name with args.
15052 set dummy $ac_prog; ac_word=$2
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15054 $as_echo_n "checking for $ac_word... " >&6; }
15055 if ${ac_cv_path_CPIO+:} false; then :
15056   $as_echo_n "(cached) " >&6
15057 else
15058   case $CPIO in
15059   [\\/]* | ?:[\\/]*)
15060   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15061   ;;
15062   *)
15063   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15064 for as_dir in $PATH
15065 do
15066   IFS=$as_save_IFS
15067   test -z "$as_dir" && as_dir=.
15068     for ac_exec_ext in '' $ac_executable_extensions; do
15069   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15070     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15071     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15072     break 2
15073   fi
15074 done
15075   done
15076 IFS=$as_save_IFS
15077 
15078   ;;
15079 esac
15080 fi
15081 CPIO=$ac_cv_path_CPIO
15082 if test -n "$CPIO"; then
15083   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15084 $as_echo "$CPIO" >&6; }
15085 else
15086   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15087 $as_echo "no" >&6; }
15088 fi
15089 
15090 
15091   test -n "$CPIO" && break
15092 done
15093 
15094     else
15095       # If it succeeded, then it was overridden by the user. We will use it
15096       # for the tool.
15097 
15098       # First remove it from the list of overridden variables, so we can test
15099       # for unknown variables in the end.
15100       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15101 
15102       # Check if we try to supply an empty value
15103       if test "x$CPIO" = x; then
15104         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15105 $as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15106         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15107 $as_echo_n "checking for CPIO... " >&6; }
15108         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15109 $as_echo "disabled" >&6; }
15110       else
15111         # Check if the provided tool contains a complete path.
15112         tool_specified="$CPIO"
15113         tool_basename="${tool_specified##*/}"
15114         if test "x$tool_basename" = "x$tool_specified"; then
15115           # A command without a complete path is provided, search $PATH.
15116           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15117 $as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15118           # Extract the first word of "$tool_basename", so it can be a program name with args.
15119 set dummy $tool_basename; ac_word=$2
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15121 $as_echo_n "checking for $ac_word... " >&6; }
15122 if ${ac_cv_path_CPIO+:} false; then :
15123   $as_echo_n "(cached) " >&6
15124 else
15125   case $CPIO in
15126   [\\/]* | ?:[\\/]*)
15127   ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15128   ;;
15129   *)
15130   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15131 for as_dir in $PATH
15132 do
15133   IFS=$as_save_IFS
15134   test -z "$as_dir" && as_dir=.
15135     for ac_exec_ext in '' $ac_executable_extensions; do
15136   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15137     ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15138     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15139     break 2
15140   fi
15141 done
15142   done
15143 IFS=$as_save_IFS
15144 
15145   ;;
15146 esac
15147 fi
15148 CPIO=$ac_cv_path_CPIO
15149 if test -n "$CPIO"; then
15150   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15151 $as_echo "$CPIO" >&6; }
15152 else
15153   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15154 $as_echo "no" >&6; }
15155 fi
15156 
15157 
15158           if test "x$CPIO" = x; then
15159             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15160           fi
15161         else
15162           # Otherwise we believe it is a complete path. Use it as it is.
15163           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15164 $as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15165           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15166 $as_echo_n "checking for CPIO... " >&6; }
15167           if test ! -x "$tool_specified"; then
15168             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15169 $as_echo "not found" >&6; }
15170             as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15171           fi
15172           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15173 $as_echo "$tool_specified" >&6; }
15174         fi
15175       fi
15176     fi
15177 
15178   fi
15179 
15180 
15181 
15182 
15183   # Publish this variable in the help.
15184 
15185 
15186   if [ -z "${NICE+x}" ]; then
15187     # The variable is not set by user, try to locate tool using the code snippet
15188     for ac_prog in nice
15189 do
15190   # Extract the first word of "$ac_prog", so it can be a program name with args.
15191 set dummy $ac_prog; ac_word=$2
15192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15193 $as_echo_n "checking for $ac_word... " >&6; }
15194 if ${ac_cv_path_NICE+:} false; then :
15195   $as_echo_n "(cached) " >&6
15196 else
15197   case $NICE in
15198   [\\/]* | ?:[\\/]*)
15199   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15200   ;;
15201   *)
15202   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15203 for as_dir in $PATH
15204 do
15205   IFS=$as_save_IFS
15206   test -z "$as_dir" && as_dir=.
15207     for ac_exec_ext in '' $ac_executable_extensions; do
15208   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15209     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15210     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15211     break 2
15212   fi
15213 done
15214   done
15215 IFS=$as_save_IFS
15216 
15217   ;;
15218 esac
15219 fi
15220 NICE=$ac_cv_path_NICE
15221 if test -n "$NICE"; then
15222   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15223 $as_echo "$NICE" >&6; }
15224 else
15225   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15226 $as_echo "no" >&6; }
15227 fi
15228 
15229 
15230   test -n "$NICE" && break
15231 done
15232 
15233   else
15234     # The variable is set, but is it from the command line or the environment?
15235 
15236     # Try to remove the string !NICE! from our list.
15237     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15238     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15239       # If it failed, the variable was not from the command line. Ignore it,
15240       # but warn the user (except for BASH, which is always set by the calling BASH).
15241       if test "xNICE" != xBASH; then
15242         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15243 $as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15244       fi
15245       # Try to locate tool using the code snippet
15246       for ac_prog in nice
15247 do
15248   # Extract the first word of "$ac_prog", so it can be a program name with args.
15249 set dummy $ac_prog; ac_word=$2
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15251 $as_echo_n "checking for $ac_word... " >&6; }
15252 if ${ac_cv_path_NICE+:} false; then :
15253   $as_echo_n "(cached) " >&6
15254 else
15255   case $NICE in
15256   [\\/]* | ?:[\\/]*)
15257   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15258   ;;
15259   *)
15260   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15261 for as_dir in $PATH
15262 do
15263   IFS=$as_save_IFS
15264   test -z "$as_dir" && as_dir=.
15265     for ac_exec_ext in '' $ac_executable_extensions; do
15266   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15267     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15268     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15269     break 2
15270   fi
15271 done
15272   done
15273 IFS=$as_save_IFS
15274 
15275   ;;
15276 esac
15277 fi
15278 NICE=$ac_cv_path_NICE
15279 if test -n "$NICE"; then
15280   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15281 $as_echo "$NICE" >&6; }
15282 else
15283   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15284 $as_echo "no" >&6; }
15285 fi
15286 
15287 
15288   test -n "$NICE" && break
15289 done
15290 
15291     else
15292       # If it succeeded, then it was overridden by the user. We will use it
15293       # for the tool.
15294 
15295       # First remove it from the list of overridden variables, so we can test
15296       # for unknown variables in the end.
15297       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15298 
15299       # Check if we try to supply an empty value
15300       if test "x$NICE" = x; then
15301         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15302 $as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15303         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15304 $as_echo_n "checking for NICE... " >&6; }
15305         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15306 $as_echo "disabled" >&6; }
15307       else
15308         # Check if the provided tool contains a complete path.
15309         tool_specified="$NICE"
15310         tool_basename="${tool_specified##*/}"
15311         if test "x$tool_basename" = "x$tool_specified"; then
15312           # A command without a complete path is provided, search $PATH.
15313           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15314 $as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15315           # Extract the first word of "$tool_basename", so it can be a program name with args.
15316 set dummy $tool_basename; ac_word=$2
15317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15318 $as_echo_n "checking for $ac_word... " >&6; }
15319 if ${ac_cv_path_NICE+:} false; then :
15320   $as_echo_n "(cached) " >&6
15321 else
15322   case $NICE in
15323   [\\/]* | ?:[\\/]*)
15324   ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15325   ;;
15326   *)
15327   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15328 for as_dir in $PATH
15329 do
15330   IFS=$as_save_IFS
15331   test -z "$as_dir" && as_dir=.
15332     for ac_exec_ext in '' $ac_executable_extensions; do
15333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15334     ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15336     break 2
15337   fi
15338 done
15339   done
15340 IFS=$as_save_IFS
15341 
15342   ;;
15343 esac
15344 fi
15345 NICE=$ac_cv_path_NICE
15346 if test -n "$NICE"; then
15347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15348 $as_echo "$NICE" >&6; }
15349 else
15350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15351 $as_echo "no" >&6; }
15352 fi
15353 
15354 
15355           if test "x$NICE" = x; then
15356             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15357           fi
15358         else
15359           # Otherwise we believe it is a complete path. Use it as it is.
15360           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15361 $as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15362           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15363 $as_echo_n "checking for NICE... " >&6; }
15364           if test ! -x "$tool_specified"; then
15365             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15366 $as_echo "not found" >&6; }
15367             as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15368           fi
15369           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15370 $as_echo "$tool_specified" >&6; }
15371         fi
15372       fi
15373     fi
15374 
15375   fi
15376 
15377 
15378 
15379 
15380   # Publish this variable in the help.
15381 
15382 
15383   if [ -z "${PANDOC+x}" ]; then
15384     # The variable is not set by user, try to locate tool using the code snippet
15385     for ac_prog in pandoc
15386 do
15387   # Extract the first word of "$ac_prog", so it can be a program name with args.
15388 set dummy $ac_prog; ac_word=$2
15389 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15390 $as_echo_n "checking for $ac_word... " >&6; }
15391 if ${ac_cv_path_PANDOC+:} false; then :
15392   $as_echo_n "(cached) " >&6
15393 else
15394   case $PANDOC in
15395   [\\/]* | ?:[\\/]*)
15396   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15397   ;;
15398   *)
15399   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15400 for as_dir in $PATH
15401 do
15402   IFS=$as_save_IFS
15403   test -z "$as_dir" && as_dir=.
15404     for ac_exec_ext in '' $ac_executable_extensions; do
15405   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15406     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15407     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15408     break 2
15409   fi
15410 done
15411   done
15412 IFS=$as_save_IFS
15413 
15414   ;;
15415 esac
15416 fi
15417 PANDOC=$ac_cv_path_PANDOC
15418 if test -n "$PANDOC"; then
15419   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15420 $as_echo "$PANDOC" >&6; }
15421 else
15422   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15423 $as_echo "no" >&6; }
15424 fi
15425 
15426 
15427   test -n "$PANDOC" && break
15428 done
15429 
15430   else
15431     # The variable is set, but is it from the command line or the environment?
15432 
15433     # Try to remove the string !PANDOC! from our list.
15434     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15435     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15436       # If it failed, the variable was not from the command line. Ignore it,
15437       # but warn the user (except for BASH, which is always set by the calling BASH).
15438       if test "xPANDOC" != xBASH; then
15439         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15440 $as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15441       fi
15442       # Try to locate tool using the code snippet
15443       for ac_prog in pandoc
15444 do
15445   # Extract the first word of "$ac_prog", so it can be a program name with args.
15446 set dummy $ac_prog; ac_word=$2
15447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15448 $as_echo_n "checking for $ac_word... " >&6; }
15449 if ${ac_cv_path_PANDOC+:} false; then :
15450   $as_echo_n "(cached) " >&6
15451 else
15452   case $PANDOC in
15453   [\\/]* | ?:[\\/]*)
15454   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15455   ;;
15456   *)
15457   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15458 for as_dir in $PATH
15459 do
15460   IFS=$as_save_IFS
15461   test -z "$as_dir" && as_dir=.
15462     for ac_exec_ext in '' $ac_executable_extensions; do
15463   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15464     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15465     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15466     break 2
15467   fi
15468 done
15469   done
15470 IFS=$as_save_IFS
15471 
15472   ;;
15473 esac
15474 fi
15475 PANDOC=$ac_cv_path_PANDOC
15476 if test -n "$PANDOC"; then
15477   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15478 $as_echo "$PANDOC" >&6; }
15479 else
15480   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15481 $as_echo "no" >&6; }
15482 fi
15483 
15484 
15485   test -n "$PANDOC" && break
15486 done
15487 
15488     else
15489       # If it succeeded, then it was overridden by the user. We will use it
15490       # for the tool.
15491 
15492       # First remove it from the list of overridden variables, so we can test
15493       # for unknown variables in the end.
15494       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15495 
15496       # Check if we try to supply an empty value
15497       if test "x$PANDOC" = x; then
15498         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15499 $as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15500         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15501 $as_echo_n "checking for PANDOC... " >&6; }
15502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15503 $as_echo "disabled" >&6; }
15504       else
15505         # Check if the provided tool contains a complete path.
15506         tool_specified="$PANDOC"
15507         tool_basename="${tool_specified##*/}"
15508         if test "x$tool_basename" = "x$tool_specified"; then
15509           # A command without a complete path is provided, search $PATH.
15510           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15511 $as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15512           # Extract the first word of "$tool_basename", so it can be a program name with args.
15513 set dummy $tool_basename; ac_word=$2
15514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15515 $as_echo_n "checking for $ac_word... " >&6; }
15516 if ${ac_cv_path_PANDOC+:} false; then :
15517   $as_echo_n "(cached) " >&6
15518 else
15519   case $PANDOC in
15520   [\\/]* | ?:[\\/]*)
15521   ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15522   ;;
15523   *)
15524   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15525 for as_dir in $PATH
15526 do
15527   IFS=$as_save_IFS
15528   test -z "$as_dir" && as_dir=.
15529     for ac_exec_ext in '' $ac_executable_extensions; do
15530   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15531     ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15532     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15533     break 2
15534   fi
15535 done
15536   done
15537 IFS=$as_save_IFS
15538 
15539   ;;
15540 esac
15541 fi
15542 PANDOC=$ac_cv_path_PANDOC
15543 if test -n "$PANDOC"; then
15544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15545 $as_echo "$PANDOC" >&6; }
15546 else
15547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15548 $as_echo "no" >&6; }
15549 fi
15550 
15551 
15552           if test "x$PANDOC" = x; then
15553             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15554           fi
15555         else
15556           # Otherwise we believe it is a complete path. Use it as it is.
15557           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15558 $as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15559           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15560 $as_echo_n "checking for PANDOC... " >&6; }
15561           if test ! -x "$tool_specified"; then
15562             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15563 $as_echo "not found" >&6; }
15564             as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15565           fi
15566           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15567 $as_echo "$tool_specified" >&6; }
15568         fi
15569       fi
15570     fi
15571 
15572   fi
15573 
15574 
15575 
15576 
15577 # Now we can determine OpenJDK build and target platforms. This is required to
15578 # have early on.
15579 # Make sure we can run config.sub.
15580 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15581   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15582 
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15584 $as_echo_n "checking build system type... " >&6; }
15585 if ${ac_cv_build+:} false; then :
15586   $as_echo_n "(cached) " >&6
15587 else
15588   ac_build_alias=$build_alias
15589 test "x$ac_build_alias" = x &&
15590   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15591 test "x$ac_build_alias" = x &&
15592   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15593 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15594   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15595 
15596 fi
15597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15598 $as_echo "$ac_cv_build" >&6; }
15599 case $ac_cv_build in
15600 *-*-*) ;;
15601 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15602 esac
15603 build=$ac_cv_build
15604 ac_save_IFS=$IFS; IFS='-'
15605 set x $ac_cv_build
15606 shift
15607 build_cpu=$1
15608 build_vendor=$2
15609 shift; shift
15610 # Remember, the first character of IFS is used to create $*,
15611 # except with old shells:
15612 build_os=$*
15613 IFS=$ac_save_IFS
15614 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15615 
15616 
15617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15618 $as_echo_n "checking host system type... " >&6; }
15619 if ${ac_cv_host+:} false; then :
15620   $as_echo_n "(cached) " >&6
15621 else
15622   if test "x$host_alias" = x; then
15623   ac_cv_host=$ac_cv_build
15624 else
15625   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15626     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15627 fi
15628 
15629 fi
15630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15631 $as_echo "$ac_cv_host" >&6; }
15632 case $ac_cv_host in
15633 *-*-*) ;;
15634 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15635 esac
15636 host=$ac_cv_host
15637 ac_save_IFS=$IFS; IFS='-'
15638 set x $ac_cv_host
15639 shift
15640 host_cpu=$1
15641 host_vendor=$2
15642 shift; shift
15643 # Remember, the first character of IFS is used to create $*,
15644 # except with old shells:
15645 host_os=$*
15646 IFS=$ac_save_IFS
15647 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15648 
15649 
15650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15651 $as_echo_n "checking target system type... " >&6; }
15652 if ${ac_cv_target+:} false; then :
15653   $as_echo_n "(cached) " >&6
15654 else
15655   if test "x$target_alias" = x; then
15656   ac_cv_target=$ac_cv_host
15657 else
15658   ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15659     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15660 fi
15661 
15662 fi
15663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15664 $as_echo "$ac_cv_target" >&6; }
15665 case $ac_cv_target in
15666 *-*-*) ;;
15667 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15668 esac
15669 target=$ac_cv_target
15670 ac_save_IFS=$IFS; IFS='-'
15671 set x $ac_cv_target
15672 shift
15673 target_cpu=$1
15674 target_vendor=$2
15675 shift; shift
15676 # Remember, the first character of IFS is used to create $*,
15677 # except with old shells:
15678 target_os=$*
15679 IFS=$ac_save_IFS
15680 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15681 
15682 
15683 # The aliases save the names the user supplied, while $host etc.
15684 # will get canonicalized.
15685 test -n "$target_alias" &&
15686   test "$program_prefix$program_suffix$program_transform_name" = \
15687     NONENONEs,x,x, &&
15688   program_prefix=${target_alias}-
15689 
15690   # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15691   # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15692   # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15693   # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15694   # to use the configure naming style.
15695 
15696 
15697 
15698 
15699 
15700   # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15701   # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15702   # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15703   # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15704   OPENJDK_TARGET_AUTOCONF_NAME="$host"
15705   OPENJDK_BUILD_AUTOCONF_NAME="$build"
15706 
15707 
15708 
15709   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15710 
15711   case "$build_os" in
15712     *linux*)
15713       VAR_OS=linux
15714       VAR_OS_TYPE=unix
15715       ;;
15716     *solaris*)
15717       VAR_OS=solaris
15718       VAR_OS_TYPE=unix
15719       ;;
15720     *darwin*)
15721       VAR_OS=macosx
15722       VAR_OS_TYPE=unix
15723       ;;
15724     *bsd*)
15725       VAR_OS=bsd
15726       VAR_OS_TYPE=unix
15727       ;;
15728     *cygwin*)
15729       VAR_OS=windows
15730       VAR_OS_ENV=windows.cygwin
15731       ;;
15732     *mingw*)
15733       VAR_OS=windows
15734       VAR_OS_ENV=windows.msys
15735       ;;
15736     *aix*)
15737       VAR_OS=aix
15738       VAR_OS_TYPE=unix
15739       ;;
15740     *)
15741       as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15742       ;;
15743   esac
15744 
15745 
15746   # First argument is the cpu name from the trip/quad
15747   case "$build_cpu" in
15748     x86_64)
15749       VAR_CPU=x86_64
15750       VAR_CPU_ARCH=x86
15751       VAR_CPU_BITS=64
15752       VAR_CPU_ENDIAN=little
15753       ;;
15754     i?86)
15755       VAR_CPU=x86
15756       VAR_CPU_ARCH=x86
15757       VAR_CPU_BITS=32
15758       VAR_CPU_ENDIAN=little
15759       ;;
15760     arm*)
15761       VAR_CPU=arm
15762       VAR_CPU_ARCH=arm
15763       VAR_CPU_BITS=32
15764       VAR_CPU_ENDIAN=little
15765       ;;
15766     aarch64)
15767       VAR_CPU=aarch64
15768       VAR_CPU_ARCH=aarch64
15769       VAR_CPU_BITS=64
15770       VAR_CPU_ENDIAN=little
15771       ;;
15772     powerpc)
15773       VAR_CPU=ppc
15774       VAR_CPU_ARCH=ppc
15775       VAR_CPU_BITS=32
15776       VAR_CPU_ENDIAN=big
15777       ;;
15778     powerpc64)
15779       VAR_CPU=ppc64
15780       VAR_CPU_ARCH=ppc
15781       VAR_CPU_BITS=64
15782       VAR_CPU_ENDIAN=big
15783       ;;
15784     powerpc64le)
15785       VAR_CPU=ppc64le
15786       VAR_CPU_ARCH=ppc
15787       VAR_CPU_BITS=64
15788       VAR_CPU_ENDIAN=little
15789       ;;
15790     s390)
15791       VAR_CPU=s390
15792       VAR_CPU_ARCH=s390
15793       VAR_CPU_BITS=32
15794       VAR_CPU_ENDIAN=big
15795       ;;
15796     s390x)
15797       VAR_CPU=s390x
15798       VAR_CPU_ARCH=s390
15799       VAR_CPU_BITS=64
15800       VAR_CPU_ENDIAN=big
15801       ;;
15802     sparc)
15803       VAR_CPU=sparc
15804       VAR_CPU_ARCH=sparc
15805       VAR_CPU_BITS=32
15806       VAR_CPU_ENDIAN=big
15807       ;;
15808     sparcv9|sparc64)
15809       VAR_CPU=sparcv9
15810       VAR_CPU_ARCH=sparc
15811       VAR_CPU_BITS=64
15812       VAR_CPU_ENDIAN=big
15813       ;;
15814     *)
15815       as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15816       ;;
15817   esac
15818 
15819   # ..and setup our own variables. (Do this explicitly to facilitate searching)
15820   OPENJDK_BUILD_OS="$VAR_OS"
15821   if test "x$VAR_OS_TYPE" != x; then
15822     OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15823   else
15824     OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15825   fi
15826   if test "x$VAR_OS_ENV" != x; then
15827     OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15828   else
15829     OPENJDK_BUILD_OS_ENV="$VAR_OS"
15830   fi
15831   OPENJDK_BUILD_CPU="$VAR_CPU"
15832   OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15833   OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15834   OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15835 
15836 
15837 
15838 
15839 
15840 
15841 
15842 
15843   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15844 $as_echo_n "checking openjdk-build os-cpu... " >&6; }
15845   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15846 $as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15847 
15848   # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15849 
15850   case "$host_os" in
15851     *linux*)
15852       VAR_OS=linux
15853       VAR_OS_TYPE=unix
15854       ;;
15855     *solaris*)
15856       VAR_OS=solaris
15857       VAR_OS_TYPE=unix
15858       ;;
15859     *darwin*)
15860       VAR_OS=macosx
15861       VAR_OS_TYPE=unix
15862       ;;
15863     *bsd*)
15864       VAR_OS=bsd
15865       VAR_OS_TYPE=unix
15866       ;;
15867     *cygwin*)
15868       VAR_OS=windows
15869       VAR_OS_ENV=windows.cygwin
15870       ;;
15871     *mingw*)
15872       VAR_OS=windows
15873       VAR_OS_ENV=windows.msys
15874       ;;
15875     *aix*)
15876       VAR_OS=aix
15877       VAR_OS_TYPE=unix
15878       ;;
15879     *)
15880       as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15881       ;;
15882   esac
15883 
15884 
15885   # First argument is the cpu name from the trip/quad
15886   case "$host_cpu" in
15887     x86_64)
15888       VAR_CPU=x86_64
15889       VAR_CPU_ARCH=x86
15890       VAR_CPU_BITS=64
15891       VAR_CPU_ENDIAN=little
15892       ;;
15893     i?86)
15894       VAR_CPU=x86
15895       VAR_CPU_ARCH=x86
15896       VAR_CPU_BITS=32
15897       VAR_CPU_ENDIAN=little
15898       ;;
15899     arm*)
15900       VAR_CPU=arm
15901       VAR_CPU_ARCH=arm
15902       VAR_CPU_BITS=32
15903       VAR_CPU_ENDIAN=little
15904       ;;
15905     aarch64)
15906       VAR_CPU=aarch64
15907       VAR_CPU_ARCH=aarch64
15908       VAR_CPU_BITS=64
15909       VAR_CPU_ENDIAN=little
15910       ;;
15911     powerpc)
15912       VAR_CPU=ppc
15913       VAR_CPU_ARCH=ppc
15914       VAR_CPU_BITS=32
15915       VAR_CPU_ENDIAN=big
15916       ;;
15917     powerpc64)
15918       VAR_CPU=ppc64
15919       VAR_CPU_ARCH=ppc
15920       VAR_CPU_BITS=64
15921       VAR_CPU_ENDIAN=big
15922       ;;
15923     powerpc64le)
15924       VAR_CPU=ppc64le
15925       VAR_CPU_ARCH=ppc
15926       VAR_CPU_BITS=64
15927       VAR_CPU_ENDIAN=little
15928       ;;
15929     s390)
15930       VAR_CPU=s390
15931       VAR_CPU_ARCH=s390
15932       VAR_CPU_BITS=32
15933       VAR_CPU_ENDIAN=big
15934       ;;
15935     s390x)
15936       VAR_CPU=s390x
15937       VAR_CPU_ARCH=s390
15938       VAR_CPU_BITS=64
15939       VAR_CPU_ENDIAN=big
15940       ;;
15941     sparc)
15942       VAR_CPU=sparc
15943       VAR_CPU_ARCH=sparc
15944       VAR_CPU_BITS=32
15945       VAR_CPU_ENDIAN=big
15946       ;;
15947     sparcv9|sparc64)
15948       VAR_CPU=sparcv9
15949       VAR_CPU_ARCH=sparc
15950       VAR_CPU_BITS=64
15951       VAR_CPU_ENDIAN=big
15952       ;;
15953     *)
15954       as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15955       ;;
15956   esac
15957 
15958   # ... and setup our own variables. (Do this explicitly to facilitate searching)
15959   OPENJDK_TARGET_OS="$VAR_OS"
15960   if test "x$VAR_OS_TYPE" != x; then
15961     OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15962   else
15963     OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15964   fi
15965   if test "x$VAR_OS_ENV" != x; then
15966     OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15967   else
15968     OPENJDK_TARGET_OS_ENV="$VAR_OS"
15969   fi
15970   OPENJDK_TARGET_CPU="$VAR_CPU"
15971   OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15972   OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15973   OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15974 
15975 
15976 
15977 
15978 
15979 
15980 
15981 
15982   { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15983 $as_echo_n "checking openjdk-target os-cpu... " >&6; }
15984   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15985 $as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15986 
15987 
15988 
15989 # Check whether --with-target-bits was given.
15990 if test "${with_target_bits+set}" = set; then :
15991   withval=$with_target_bits;
15992 fi
15993 
15994 
15995   # We have three types of compiles:
15996   # native  == normal compilation, target system == build system
15997   # cross   == traditional cross compilation, target system != build system; special toolchain needed
15998   # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15999   #
16000   if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
16001     # We're doing a proper cross-compilation
16002     COMPILE_TYPE="cross"
16003   else
16004     COMPILE_TYPE="native"
16005   fi
16006 
16007   if test "x$with_target_bits" != x; then
16008     if test "x$COMPILE_TYPE" = "xcross"; then
16009       as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
16010     fi
16011 
16012     if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16013       # A reduced build is requested
16014       COMPILE_TYPE="reduced"
16015       OPENJDK_TARGET_CPU_BITS=32
16016       if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
16017         OPENJDK_TARGET_CPU=x86
16018       elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
16019         OPENJDK_TARGET_CPU=sparc
16020       else
16021         as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
16022       fi
16023     elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
16024       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
16025     elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
16026       { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
16027 $as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
16028     else
16029       as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
16030     fi
16031   fi
16032 
16033 
16034   { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
16035 $as_echo_n "checking compilation type... " >&6; }
16036   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
16037 $as_echo "$COMPILE_TYPE" >&6; }
16038 
16039 
16040   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16041     OPENJDK_MODULE_TARGET_OS_NAME="macos"
16042   else
16043     OPENJDK_MODULE_TARGET_OS_NAME="$OPENJDK_TARGET_OS"
16044   fi
16045 
16046   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16047     OPENJDK_MODULE_TARGET_OS_ARCH="amd64"
16048   else
16049     OPENJDK_MODULE_TARGET_OS_ARCH="$OPENJDK_TARGET_CPU"
16050   fi
16051 
16052   OPENJDK_MODULE_TARGET_PLATFORM="${OPENJDK_MODULE_TARGET_OS_NAME}-${OPENJDK_MODULE_TARGET_OS_ARCH}"
16053 
16054 
16055 
16056   if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
16057     RELEASE_FILE_OS_NAME=SunOS
16058   fi
16059   if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
16060     RELEASE_FILE_OS_NAME=Linux
16061   fi
16062   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16063     RELEASE_FILE_OS_NAME=Windows
16064   fi
16065   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16066     RELEASE_FILE_OS_NAME="Darwin"
16067   fi
16068   if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16069     RELEASE_FILE_OS_NAME="AIX"
16070   fi
16071   RELEASE_FILE_OS_ARCH=${OPENJDK_TARGET_CPU}
16072 
16073 
16074 
16075 
16076 
16077 
16078   # Also store the legacy naming of the cpu.
16079   # Ie i586 and amd64 instead of x86 and x86_64
16080   OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16081   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16082     OPENJDK_TARGET_CPU_LEGACY="i586"
16083   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16084     # On all platforms except MacOSX replace x86_64 with amd64.
16085     OPENJDK_TARGET_CPU_LEGACY="amd64"
16086   fi
16087 
16088 
16089   # And the second legacy naming of the cpu.
16090   # Ie i386 and amd64 instead of x86 and x86_64.
16091   OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16092   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16093     OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16094   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16095     OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16096   fi
16097 
16098 
16099   # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16100   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16101   # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16102   OPENJDK_TARGET_CPU_ISADIR=""
16103   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16104     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16105       OPENJDK_TARGET_CPU_ISADIR="/amd64"
16106     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16107       OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16108     fi
16109   fi
16110 
16111 
16112   # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16113   OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16114   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16115     # On linux only, we replace x86 with i386.
16116     OPENJDK_TARGET_CPU_OSARCH="i386"
16117   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16118     # On all platforms except macosx, we replace x86_64 with amd64.
16119     OPENJDK_TARGET_CPU_OSARCH="amd64"
16120   fi
16121 
16122 
16123   OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16124   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16125     OPENJDK_TARGET_CPU_JLI="i386"
16126   elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16127     # On all platforms except macosx, we replace x86_64 with amd64.
16128     OPENJDK_TARGET_CPU_JLI="amd64"
16129   fi
16130 
16131   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16132       OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16133   else
16134       OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16135   fi
16136 
16137 
16138   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16139   # Macosx is osx and x86_64 is x64
16140   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16141     OPENJDK_TARGET_OS_BUNDLE="osx"
16142   else
16143     OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16144   fi
16145   if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16146     OPENJDK_TARGET_CPU_BUNDLE="x64"
16147   else
16148     OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16149   fi
16150   OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16151 
16152 
16153   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16154     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16155     # unpack200.exe. This variable is used in
16156     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16157     if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16158       OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16159     fi
16160   fi
16161 
16162   if test "x$COMPILE_TYPE" = "xcross"; then
16163     # FIXME: ... or should this include reduced builds..?
16164     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16165   else
16166     DEFINE_CROSS_COMPILE_ARCH=""
16167   fi
16168 
16169 
16170   # Convert openjdk platform names to hotspot names
16171 
16172   HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16173   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16174     HOTSPOT_TARGET_OS=bsd
16175   fi
16176 
16177 
16178   HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16179   if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16180     HOTSPOT_TARGET_OS_TYPE=posix
16181   fi
16182 
16183 
16184   HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16185   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16186     HOTSPOT_TARGET_CPU=x86_32
16187   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16188     HOTSPOT_TARGET_CPU=sparc
16189   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16190     HOTSPOT_TARGET_CPU=ppc_64
16191   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16192     HOTSPOT_TARGET_CPU=ppc_64
16193   fi
16194 
16195 
16196   # This is identical with OPENJDK_*, but define anyway for consistency.
16197   HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16198 
16199 
16200   # Setup HOTSPOT_TARGET_CPU_DEFINE
16201   if test "x$OPENJDK_TARGET_CPU" = xx86; then
16202     HOTSPOT_TARGET_CPU_DEFINE=IA32
16203   elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16204     HOTSPOT_TARGET_CPU_DEFINE=AMD64
16205   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16206     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16207   elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16208     HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16209   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16210     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16211   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16212     HOTSPOT_TARGET_CPU_DEFINE=PPC64
16213 
16214   # The cpu defines below are for zero, we don't support them directly.
16215   elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16216     HOTSPOT_TARGET_CPU_DEFINE=SPARC
16217   elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16218     HOTSPOT_TARGET_CPU_DEFINE=PPC32
16219   elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16220     HOTSPOT_TARGET_CPU_DEFINE=S390
16221   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16222     HOTSPOT_TARGET_CPU_DEFINE=S390
16223   elif test "x$OPENJDK_TARGET_CPU" != x; then
16224     HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16225   fi
16226 
16227 
16228 
16229 
16230   # Also store the legacy naming of the cpu.
16231   # Ie i586 and amd64 instead of x86 and x86_64
16232   OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16233   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16234     OPENJDK_BUILD_CPU_LEGACY="i586"
16235   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16236     # On all platforms except MacOSX replace x86_64 with amd64.
16237     OPENJDK_BUILD_CPU_LEGACY="amd64"
16238   fi
16239 
16240 
16241   # And the second legacy naming of the cpu.
16242   # Ie i386 and amd64 instead of x86 and x86_64.
16243   OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16244   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16245     OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16246   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16247     OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16248   fi
16249 
16250 
16251   # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16252   # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16253   # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16254   OPENJDK_BUILD_CPU_ISADIR=""
16255   if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16256     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16257       OPENJDK_BUILD_CPU_ISADIR="/amd64"
16258     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16259       OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16260     fi
16261   fi
16262 
16263 
16264   # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16265   OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16266   if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16267     # On linux only, we replace x86 with i386.
16268     OPENJDK_BUILD_CPU_OSARCH="i386"
16269   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16270     # On all platforms except macosx, we replace x86_64 with amd64.
16271     OPENJDK_BUILD_CPU_OSARCH="amd64"
16272   fi
16273 
16274 
16275   OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16276   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16277     OPENJDK_BUILD_CPU_JLI="i386"
16278   elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16279     # On all platforms except macosx, we replace x86_64 with amd64.
16280     OPENJDK_BUILD_CPU_JLI="amd64"
16281   fi
16282 
16283   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16284       OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16285   else
16286       OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16287   fi
16288 
16289 
16290   # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16291   # Macosx is osx and x86_64 is x64
16292   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16293     OPENJDK_BUILD_OS_BUNDLE="osx"
16294   else
16295     OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16296   fi
16297   if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16298     OPENJDK_BUILD_CPU_BUNDLE="x64"
16299   else
16300     OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16301   fi
16302   OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16303 
16304 
16305   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16306     # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16307     # unpack200.exe. This variable is used in
16308     # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16309     if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16310       OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16311     fi
16312   fi
16313 
16314   if test "x$COMPILE_TYPE" = "xcross"; then
16315     # FIXME: ... or should this include reduced builds..?
16316     DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16317   else
16318     DEFINE_CROSS_COMPILE_ARCH=""
16319   fi
16320 
16321 
16322   # Convert openjdk platform names to hotspot names
16323 
16324   HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16325   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16326     HOTSPOT_BUILD_OS=bsd
16327   fi
16328 
16329 
16330   HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16331   if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16332     HOTSPOT_BUILD_OS_TYPE=posix
16333   fi
16334 
16335 
16336   HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16337   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16338     HOTSPOT_BUILD_CPU=x86_32
16339   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16340     HOTSPOT_BUILD_CPU=sparc
16341   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16342     HOTSPOT_BUILD_CPU=ppc_64
16343   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16344     HOTSPOT_BUILD_CPU=ppc_64
16345   fi
16346 
16347 
16348   # This is identical with OPENJDK_*, but define anyway for consistency.
16349   HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16350 
16351 
16352   # Setup HOTSPOT_BUILD_CPU_DEFINE
16353   if test "x$OPENJDK_BUILD_CPU" = xx86; then
16354     HOTSPOT_BUILD_CPU_DEFINE=IA32
16355   elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16356     HOTSPOT_BUILD_CPU_DEFINE=AMD64
16357   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16358     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16359   elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16360     HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16361   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16362     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16363   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16364     HOTSPOT_BUILD_CPU_DEFINE=PPC64
16365 
16366   # The cpu defines below are for zero, we don't support them directly.
16367   elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16368     HOTSPOT_BUILD_CPU_DEFINE=SPARC
16369   elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16370     HOTSPOT_BUILD_CPU_DEFINE=PPC32
16371   elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16372     HOTSPOT_BUILD_CPU_DEFINE=S390
16373   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16374     HOTSPOT_BUILD_CPU_DEFINE=S390
16375   elif test "x$OPENJDK_BUILD_CPU" != x; then
16376     HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16377   fi
16378 
16379 
16380 
16381 
16382 
16383 
16384 # Continue setting up basic stuff. Most remaining code require fundamental tools.
16385 
16386   # Save the current directory this script was started from
16387   CURDIR="$PWD"
16388 
16389   # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16390   # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16391   # was not available at that time.
16392   REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16393   if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16394     ORIGINAL_PATH="$REWRITTEN_PATH"
16395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16396 $as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16397   fi
16398 
16399   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16400     PATH_SEP=";"
16401 
16402   SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16403   if test $SRC_ROOT_LENGTH -gt 100; then
16404     as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16405   fi
16406 
16407   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16408     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16409 $as_echo_n "checking cygwin release... " >&6; }
16410     CYGWIN_VERSION=`$UNAME -r`
16411     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16412 $as_echo "$CYGWIN_VERSION" >&6; }
16413     WINDOWS_ENV_VENDOR='cygwin'
16414     WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16415 
16416     CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16417     if test "x$CYGWIN_VERSION_OLD" != x; then
16418       { $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
16419 $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;}
16420       as_fn_error $? "Cannot continue" "$LINENO" 5
16421     fi
16422     if test "x$CYGPATH" = x; then
16423       as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16424     fi
16425     { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16426 $as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16427     # The cmd output ends with Windows line endings (CR/LF)
16428     cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16429     # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16430     CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16431     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16432 $as_echo "$CYGWIN_ROOT_PATH" >&6; }
16433     WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16434     test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16435     if test "x$test_cygdrive_prefix" = x; then
16436       as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16437     fi
16438   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16439     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16440 $as_echo_n "checking msys release... " >&6; }
16441     MSYS_VERSION=`$UNAME -r`
16442     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16443 $as_echo "$MSYS_VERSION" >&6; }
16444 
16445     WINDOWS_ENV_VENDOR='msys'
16446     WINDOWS_ENV_VERSION="$MSYS_VERSION"
16447 
16448     { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16449 $as_echo_n "checking msys root directory as unix-style path... " >&6; }
16450     # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16451     MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16452 
16453   windows_path="$MSYS_ROOT_PATH"
16454   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16455     unix_path=`$CYGPATH -u "$windows_path"`
16456     MSYS_ROOT_PATH="$unix_path"
16457   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16458     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16459     MSYS_ROOT_PATH="$unix_path"
16460   fi
16461 
16462     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16463 $as_echo "$MSYS_ROOT_PATH" >&6; }
16464     WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16465   else
16466     as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16467   fi
16468 
16469   # Test if windows or unix (cygwin/msys) find is first in path.
16470   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16471 $as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16472   FIND_BINARY_OUTPUT=`find --version 2>&1`
16473   if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16474     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16475 $as_echo "unix style" >&6; }
16476   elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16477     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16478 $as_echo "Windows" >&6; }
16479     { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16480 $as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16481     { $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
16482 $as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16483     as_fn_error $? "Cannot continue" "$LINENO" 5
16484   else
16485     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16486 $as_echo "unknown" >&6; }
16487     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16488 $as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16489   fi
16490 
16491   else
16492     PATH_SEP=":"
16493   fi
16494 
16495 
16496   # We get the top-level directory from the supporting wrappers.
16497   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16498 $as_echo_n "checking for top-level directory... " >&6; }
16499   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16500 $as_echo "$TOPDIR" >&6; }
16501 
16502 
16503   # Save the original version of TOPDIR for string comparisons
16504   ORIGINAL_TOPDIR="$TOPDIR"
16505 
16506 
16507   # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16508 
16509   # Only process if variable expands to non-empty
16510 
16511   if test "x$CURDIR" != x; then
16512     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16513 
16514   # Input might be given as Windows format, start by converting to
16515   # unix format.
16516   path="$CURDIR"
16517   new_path=`$CYGPATH -u "$path"`
16518 
16519   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16520   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16521   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16522   # "foo.exe" is OK but "foo" is an error.
16523   #
16524   # This test is therefore slightly more accurate than "test -f" to check for file precense.
16525   # It is also a way to make sure we got the proper file name for the real test later on.
16526   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16527   if test "x$test_shortpath" = x; then
16528     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16529 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16530     as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16531   fi
16532 
16533   # Call helper function which possibly converts this using DOS-style short mode.
16534   # If so, the updated path is stored in $new_path.
16535 
16536   input_path="$new_path"
16537   # Check if we need to convert this using DOS-style short mode. If the path
16538   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16539   # take no chances and rewrite it.
16540   # Note: m4 eats our [], so we need to use [ and ] instead.
16541   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16542   if test "x$has_forbidden_chars" != x; then
16543     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16544     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16545     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16546     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16547       # Going to short mode and back again did indeed matter. Since short mode is
16548       # case insensitive, let's make it lowercase to improve readability.
16549       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16550       # Now convert it back to Unix-style (cygpath)
16551       input_path=`$CYGPATH -u "$shortmode_path"`
16552       new_path="$input_path"
16553     fi
16554   fi
16555 
16556   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16557   if test "x$test_cygdrive_prefix" = x; then
16558     # As a simple fix, exclude /usr/bin since it's not a real path.
16559     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16560       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16561       # a path prefixed by /cygdrive for fixpath to work.
16562       new_path="$CYGWIN_ROOT_PATH$input_path"
16563     fi
16564   fi
16565 
16566 
16567   if test "x$path" != "x$new_path"; then
16568     CURDIR="$new_path"
16569     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16570 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16571   fi
16572 
16573     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16574 
16575   path="$CURDIR"
16576   has_colon=`$ECHO $path | $GREP ^.:`
16577   new_path="$path"
16578   if test "x$has_colon" = x; then
16579     # Not in mixed or Windows style, start by that.
16580     new_path=`cmd //c echo $path`
16581   fi
16582 
16583 
16584   input_path="$new_path"
16585   # Check if we need to convert this using DOS-style short mode. If the path
16586   # contains just simple characters, use it. Otherwise (spaces, weird characters),
16587   # take no chances and rewrite it.
16588   # Note: m4 eats our [], so we need to use [ and ] instead.
16589   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16590   if test "x$has_forbidden_chars" != x; then
16591     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16592     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16593   fi
16594 
16595 
16596   windows_path="$new_path"
16597   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16598     unix_path=`$CYGPATH -u "$windows_path"`
16599     new_path="$unix_path"
16600   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16601     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16602     new_path="$unix_path"
16603   fi
16604 
16605   if test "x$path" != "x$new_path"; then
16606     CURDIR="$new_path"
16607     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16608 $as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16609   fi
16610 
16611   # Save the first 10 bytes of this path to the storage, so fixpath can work.
16612   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16613 
16614     else
16615       # We're on a unix platform. Hooray! :)
16616       path="$CURDIR"
16617       has_space=`$ECHO "$path" | $GREP " "`
16618       if test "x$has_space" != x; then
16619         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16620 $as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16621         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16622       fi
16623 
16624       # Use eval to expand a potential ~
16625       eval path="$path"
16626       if test ! -f "$path" && test ! -d "$path"; then
16627         as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16628       fi
16629 
16630       if test -d "$path"; then
16631         CURDIR="`cd "$path"; $THEPWDCMD -L`"
16632       else
16633         dir="`$DIRNAME "$path"`"
16634         base="`$BASENAME "$path"`"
16635         CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16636       fi
16637     fi
16638   fi
16639 
16640 
16641   # Only process if variable expands to non-empty
16642 
16643   if test "x$TOPDIR" != 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="$TOPDIR"
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 TOPDIR, which resolves as \"$path\", is invalid." >&5
16661 $as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16662     as_fn_error $? "Cannot locate the the path of TOPDIR" "$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     TOPDIR="$new_path"
16701     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16702 $as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16703   fi
16704 
16705     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16706 
16707   path="$TOPDIR"
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     TOPDIR="$new_path"
16739     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16740 $as_echo "$as_me: Rewriting TOPDIR 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="$TOPDIR"
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 TOPDIR, which resolves as \"$path\", is invalid." >&5
16752 $as_echo "$as_me: The path of TOPDIR, 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 TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16760       fi
16761 
16762       if test -d "$path"; then
16763         TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16764       else
16765         dir="`$DIRNAME "$path"`"
16766         base="`$BASENAME "$path"`"
16767         TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16768       fi
16769     fi
16770   fi
16771 
16772   # SRC_ROOT is a traditional alias for TOPDIR.
16773   SRC_ROOT=$TOPDIR
16774 
16775   # Calculate a canonical version of TOPDIR for string comparisons
16776   CANONICAL_TOPDIR=$TOPDIR
16777 
16778   if test "x$OPENJDK_BUILD_OS" != xwindows; then
16779     # Follow a chain of symbolic links. Use readlink
16780     # where it exists, else fall back to horribly
16781     # complicated shell code.
16782     if test "x$READLINK_TESTED" != yes; then
16783       # On MacOSX there is a readlink tool with a different
16784       # purpose than the GNU readlink tool. Check the found readlink.
16785       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16786       if test "x$ISGNU" = x; then
16787         # A readlink that we do not know how to use.
16788         # Are there other non-GNU readlinks out there?
16789         READLINK_TESTED=yes
16790         READLINK=
16791       fi
16792     fi
16793 
16794     if test "x$READLINK" != x; then
16795       CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16796     else
16797       # Save the current directory for restoring afterwards
16798       STARTDIR=$PWD
16799       COUNTER=0
16800       sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16801       sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16802       cd $sym_link_dir
16803       # Use -P flag to resolve symlinks in directories.
16804       cd `$THEPWDCMD -P`
16805       sym_link_dir=`$THEPWDCMD -P`
16806       # Resolve file symlinks
16807       while test $COUNTER -lt 20; do
16808         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16809         if test "x$ISLINK" == x; then
16810           # This is not a symbolic link! We are done!
16811           break
16812         fi
16813         # Again resolve directory symlinks since the target of the just found
16814         # link could be in a different directory
16815         cd `$DIRNAME $ISLINK`
16816         sym_link_dir=`$THEPWDCMD -P`
16817         sym_link_file=`$BASENAME $ISLINK`
16818         let COUNTER=COUNTER+1
16819       done
16820       cd $STARTDIR
16821       CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16822     fi
16823   fi
16824 
16825 
16826 
16827   # Locate the directory of this script.
16828   AUTOCONF_DIR=$TOPDIR/common/autoconf
16829 
16830   # Setup username (for use in adhoc version strings etc)
16831   # Outer [ ] to quote m4.
16832    USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16833 
16834 
16835 
16836 # Check if it's a pure open build or if custom sources are to be used.
16837 
16838   # Check whether --enable-openjdk-only was given.
16839 if test "${enable_openjdk_only+set}" = set; then :
16840   enableval=$enable_openjdk_only;
16841 else
16842   enable_openjdk_only="no"
16843 fi
16844 
16845 
16846   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16847 $as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16849 $as_echo "$enable_openjdk_only" >&6; }
16850   if test "x$enable_openjdk_only" = "xyes"; then
16851     SUPPRESS_CUSTOM_EXTENSIONS="true"
16852   elif test "x$enable_openjdk_only" = "xno"; then
16853     SUPPRESS_CUSTOM_EXTENSIONS="false"
16854   else
16855     as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16856   fi
16857 
16858   # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16859   # the IncludeCustomExtension macro.
16860 
16861 
16862 # Check whether --with-custom-make-dir was given.
16863 if test "${with_custom_make_dir+set}" = set; then :
16864   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
16865 $as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16866 fi
16867 
16868 
16869 
16870 
16871 # These are needed to be able to create a configuration name (and thus the output directory)
16872 
16873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16874 $as_echo_n "checking which variant of the JDK to build... " >&6; }
16875 
16876 # Check whether --with-jdk-variant was given.
16877 if test "${with_jdk_variant+set}" = set; then :
16878   withval=$with_jdk_variant;
16879 fi
16880 
16881 
16882   if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16883     JDK_VARIANT="normal"
16884   else
16885     as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16886   fi
16887 
16888 
16889 
16890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16891 $as_echo "$JDK_VARIANT" >&6; }
16892 
16893 
16894   DEBUG_LEVEL="release"
16895   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16896 $as_echo_n "checking which debug level to use... " >&6; }
16897   # Check whether --enable-debug was given.
16898 if test "${enable_debug+set}" = set; then :
16899   enableval=$enable_debug;
16900         ENABLE_DEBUG="${enableval}"
16901         DEBUG_LEVEL="fastdebug"
16902 
16903 else
16904   ENABLE_DEBUG="no"
16905 fi
16906 
16907 
16908 
16909 # Check whether --with-debug-level was given.
16910 if test "${with_debug_level+set}" = set; then :
16911   withval=$with_debug_level;
16912         DEBUG_LEVEL="${withval}"
16913         if test "x$ENABLE_DEBUG" = xyes; then
16914           as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16915         fi
16916 
16917 fi
16918 
16919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16920 $as_echo "$DEBUG_LEVEL" >&6; }
16921 
16922   if test "x$DEBUG_LEVEL" != xrelease && \
16923       test "x$DEBUG_LEVEL" != xoptimized && \
16924       test "x$DEBUG_LEVEL" != xfastdebug && \
16925       test "x$DEBUG_LEVEL" != xslowdebug; then
16926     as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16927   fi
16928 
16929   # Translate DEBUG_LEVEL to debug level used by Hotspot
16930   HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16931   if test "x$DEBUG_LEVEL" = xrelease; then
16932     HOTSPOT_DEBUG_LEVEL="product"
16933   elif test "x$DEBUG_LEVEL" = xslowdebug; then
16934     HOTSPOT_DEBUG_LEVEL="debug"
16935   fi
16936 
16937   if test "x$DEBUG_LEVEL" = xoptimized; then
16938     # The debug level 'optimized' is a little special because it is currently only
16939     # applicable to the HotSpot build where it means to build a completely
16940     # optimized version of the VM without any debugging code (like for the
16941     # 'release' debug level which is called 'product' in the HotSpot build) but
16942     # with the exception that it can contain additional code which is otherwise
16943     # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16944     # test new and/or experimental features which are not intended for customer
16945     # shipment. Because these new features need to be tested and benchmarked in
16946     # real world scenarios, we want to build the containing JDK at the 'release'
16947     # debug level.
16948     DEBUG_LEVEL="release"
16949   fi
16950 
16951 
16952 
16953 
16954 
16955 
16956 # Check whether --with-jvm-variants was given.
16957 if test "${with_jvm_variants+set}" = set; then :
16958   withval=$with_jvm_variants;
16959 fi
16960 
16961 
16962 
16963 
16964 # Check whether --with-cpu-port was given.
16965 if test "${with_cpu_port+set}" = set; then :
16966   withval=$with_cpu_port;
16967 fi
16968 
16969 
16970   if test "x$with_cpu_port" != x; then
16971     if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16972       as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16973     fi
16974     if test "x$with_cpu_port" != xarm64 && \
16975         test "x$with_cpu_port" != xaarch64; then
16976       as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16977     fi
16978     HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16979   fi
16980 
16981 
16982   if test "x$with_jvm_variants" = x; then
16983     with_jvm_variants="server"
16984   fi
16985   JVM_VARIANTS_OPT="$with_jvm_variants"
16986 
16987   # Has the user listed more than one variant?
16988   # Additional [] needed to keep m4 from mangling shell constructs.
16989   if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16990     BUILDING_MULTIPLE_JVM_VARIANTS=true
16991   else
16992     BUILDING_MULTIPLE_JVM_VARIANTS=false
16993   fi
16994   # Replace the commas with AND for use in the build directory name.
16995   JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16996 
16997   { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16998 $as_echo_n "checking which variants of the JVM to build... " >&6; }
16999   # JVM_VARIANTS is a space-separated list.
17000   # Also use minimal, not minimal1 (which is kept for backwards compatibility).
17001   JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
17002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
17003 $as_echo "$JVM_VARIANTS" >&6; }
17004 
17005   # Check that the selected variants are valid
17006 
17007   # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
17008   # Notice that the original variant failes on SLES 10 and 11
17009   NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
17010   STACK=${JVM_VARIANTS// /$'\n'}
17011   INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17012   if test "x$INVALID_VARIANTS" != x; then
17013     { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
17014 $as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
17015     as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
17016   fi
17017 
17018   # All "special" variants share the same output directory ("server")
17019   VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
17020   NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
17021   STACK=${JVM_VARIANTS// /$'\n'}
17022   INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
17023   if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
17024     as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
17025   fi
17026 
17027   # The "main" variant is the one used by other libs to link against during the
17028   # build.
17029   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
17030     MAIN_VARIANT_PRIO_ORDER="server client minimal"
17031     for variant in $MAIN_VARIANT_PRIO_ORDER; do
17032       if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
17033         JVM_VARIANT_MAIN="$variant"
17034         break
17035       fi
17036     done
17037   else
17038     JVM_VARIANT_MAIN="$JVM_VARIANTS"
17039   fi
17040 
17041 
17042 
17043 
17044 
17045   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
17046     # zero behaves as a platform and rewrites these values. This is really weird. :(
17047     # We are guaranteed that we do not build any other variants when building zero.
17048     HOTSPOT_TARGET_CPU=zero
17049     HOTSPOT_TARGET_CPU_ARCH=zero
17050   fi
17051 
17052 
17053 # With basic setup done, call the custom early hook.
17054 
17055 
17056 # Check if we have devkits, extra paths or sysroot set.
17057 
17058 
17059 # Check whether --with-devkit was given.
17060 if test "${with_devkit+set}" = set; then :
17061   withval=$with_devkit;
17062 
17063   # Only process if variable expands to non-empty
17064 
17065   if test "x$with_devkit" != x; then
17066     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17067 
17068   # Input might be given as Windows format, start by converting to
17069   # unix format.
17070   path="$with_devkit"
17071   new_path=`$CYGPATH -u "$path"`
17072 
17073   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17074   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17075   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17076   # "foo.exe" is OK but "foo" is an error.
17077   #
17078   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17079   # It is also a way to make sure we got the proper file name for the real test later on.
17080   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17081   if test "x$test_shortpath" = x; then
17082     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17083 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17084     as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17085   fi
17086 
17087   # Call helper function which possibly converts this using DOS-style short mode.
17088   # If so, the updated path is stored in $new_path.
17089 
17090   input_path="$new_path"
17091   # Check if we need to convert this using DOS-style short mode. If the path
17092   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17093   # take no chances and rewrite it.
17094   # Note: m4 eats our [], so we need to use [ and ] instead.
17095   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17096   if test "x$has_forbidden_chars" != x; then
17097     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17098     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17099     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17100     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17101       # Going to short mode and back again did indeed matter. Since short mode is
17102       # case insensitive, let's make it lowercase to improve readability.
17103       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17104       # Now convert it back to Unix-style (cygpath)
17105       input_path=`$CYGPATH -u "$shortmode_path"`
17106       new_path="$input_path"
17107     fi
17108   fi
17109 
17110   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17111   if test "x$test_cygdrive_prefix" = x; then
17112     # As a simple fix, exclude /usr/bin since it's not a real path.
17113     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17114       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17115       # a path prefixed by /cygdrive for fixpath to work.
17116       new_path="$CYGWIN_ROOT_PATH$input_path"
17117     fi
17118   fi
17119 
17120 
17121   if test "x$path" != "x$new_path"; then
17122     with_devkit="$new_path"
17123     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17124 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17125   fi
17126 
17127     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17128 
17129   path="$with_devkit"
17130   has_colon=`$ECHO $path | $GREP ^.:`
17131   new_path="$path"
17132   if test "x$has_colon" = x; then
17133     # Not in mixed or Windows style, start by that.
17134     new_path=`cmd //c echo $path`
17135   fi
17136 
17137 
17138   input_path="$new_path"
17139   # Check if we need to convert this using DOS-style short mode. If the path
17140   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17141   # take no chances and rewrite it.
17142   # Note: m4 eats our [], so we need to use [ and ] instead.
17143   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17144   if test "x$has_forbidden_chars" != x; then
17145     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17146     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17147   fi
17148 
17149 
17150   windows_path="$new_path"
17151   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17152     unix_path=`$CYGPATH -u "$windows_path"`
17153     new_path="$unix_path"
17154   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17155     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17156     new_path="$unix_path"
17157   fi
17158 
17159   if test "x$path" != "x$new_path"; then
17160     with_devkit="$new_path"
17161     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17162 $as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17163   fi
17164 
17165   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17166   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17167 
17168     else
17169       # We're on a unix platform. Hooray! :)
17170       path="$with_devkit"
17171       has_space=`$ECHO "$path" | $GREP " "`
17172       if test "x$has_space" != x; then
17173         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17174 $as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17175         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17176       fi
17177 
17178       # Use eval to expand a potential ~
17179       eval path="$path"
17180       if test ! -f "$path" && test ! -d "$path"; then
17181         as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17182       fi
17183 
17184       if test -d "$path"; then
17185         with_devkit="`cd "$path"; $THEPWDCMD -L`"
17186       else
17187         dir="`$DIRNAME "$path"`"
17188         base="`$BASENAME "$path"`"
17189         with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17190       fi
17191     fi
17192   fi
17193 
17194         DEVKIT_ROOT="$with_devkit"
17195         # Check for a meta data info file in the root of the devkit
17196         if test -f "$DEVKIT_ROOT/devkit.info"; then
17197           . $DEVKIT_ROOT/devkit.info
17198           # This potentially sets the following:
17199           # A descriptive name of the devkit
17200 
17201   if test "x$DEVKIT_NAME" = x; then
17202     eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17203   fi
17204 
17205           # Corresponds to --with-extra-path
17206 
17207   if test "x$DEVKIT_EXTRA_PATH" = x; then
17208     eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17209   fi
17210 
17211           # Corresponds to --with-toolchain-path
17212 
17213   if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17214     eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17215   fi
17216 
17217           # Corresponds to --with-sysroot
17218 
17219   if test "x$DEVKIT_SYSROOT" = x; then
17220     eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17221   fi
17222 
17223 
17224           # Identifies the Visual Studio version in the devkit
17225 
17226   if test "x$DEVKIT_VS_VERSION" = x; then
17227     eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17228   fi
17229 
17230           # The Visual Studio include environment variable
17231 
17232   if test "x$DEVKIT_VS_INCLUDE" = x; then
17233     eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17234   fi
17235 
17236           # The Visual Studio lib environment variable
17237 
17238   if test "x$DEVKIT_VS_LIB" = x; then
17239     eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17240   fi
17241 
17242           # Corresponds to --with-msvcr-dll
17243 
17244   if test "x$DEVKIT_MSVCR_DLL" = x; then
17245     eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17246   fi
17247 
17248           # Corresponds to --with-msvcp-dll
17249 
17250   if test "x$DEVKIT_MSVCP_DLL" = x; then
17251     eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17252   fi
17253 
17254         fi
17255 
17256         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17257 $as_echo_n "checking for devkit... " >&6; }
17258         if test "x$DEVKIT_NAME" != x; then
17259           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17260 $as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17261         else
17262           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17263 $as_echo "$DEVKIT_ROOT" >&6; }
17264         fi
17265 
17266 
17267   if test "x$DEVKIT_EXTRA_PATH" != x; then
17268     if test "x$EXTRA_PATH" = x; then
17269       EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17270     else
17271       EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17272     fi
17273   fi
17274 
17275 
17276         # Fallback default of just /bin if DEVKIT_PATH is not defined
17277         if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17278           DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17279         fi
17280 
17281   if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17282     if test "x$TOOLCHAIN_PATH" = x; then
17283       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17284     else
17285       TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17286     fi
17287   fi
17288 
17289 
17290         # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17291         # places for backwards compatiblity.
17292         if test "x$DEVKIT_SYSROOT" != x; then
17293           SYSROOT="$DEVKIT_SYSROOT"
17294         elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17295           SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17296         elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17297           SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17298         fi
17299 
17300 
17301 fi
17302 
17303 
17304   # You can force the sysroot if the sysroot encoded into the compiler tools
17305   # is not correct.
17306 
17307 # Check whether --with-sys-root was given.
17308 if test "${with_sys_root+set}" = set; then :
17309   withval=$with_sys_root; SYSROOT=$with_sys_root
17310 
17311 fi
17312 
17313 
17314 
17315 # Check whether --with-sysroot was given.
17316 if test "${with_sysroot+set}" = set; then :
17317   withval=$with_sysroot; SYSROOT=$with_sysroot
17318 
17319 fi
17320 
17321 
17322 
17323 # Check whether --with-tools-dir was given.
17324 if test "${with_tools_dir+set}" = set; then :
17325   withval=$with_tools_dir;
17326   if test "x$with_tools_dir" != x; then
17327     if test "x$TOOLCHAIN_PATH" = x; then
17328       TOOLCHAIN_PATH="$with_tools_dir"
17329     else
17330       TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17331     fi
17332   fi
17333 
17334 
17335 fi
17336 
17337 
17338 
17339 # Check whether --with-toolchain-path was given.
17340 if test "${with_toolchain_path+set}" = set; then :
17341   withval=$with_toolchain_path;
17342   if test "x$with_toolchain_path" != x; then
17343     if test "x$TOOLCHAIN_PATH" = x; then
17344       TOOLCHAIN_PATH="$with_toolchain_path"
17345     else
17346       TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17347     fi
17348   fi
17349 
17350 
17351 fi
17352 
17353 
17354 
17355 # Check whether --with-extra-path was given.
17356 if test "${with_extra_path+set}" = set; then :
17357   withval=$with_extra_path;
17358   if test "x$with_extra_path" != x; then
17359     if test "x$EXTRA_PATH" = x; then
17360       EXTRA_PATH="$with_extra_path"
17361     else
17362       EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17363     fi
17364   fi
17365 
17366 
17367 fi
17368 
17369 
17370   if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17371     # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17372     # If not, detect if Xcode is installed by running xcodebuild -version
17373     # if no Xcode installed, xcodebuild exits with 1
17374     # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17375     if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17376       # We need to use xcodebuild in the toolchain dir provided by the user, this will
17377       # fall back on the stub binary in /usr/bin/xcodebuild
17378       # Extract the first word of "xcodebuild", so it can be a program name with args.
17379 set dummy xcodebuild; ac_word=$2
17380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17381 $as_echo_n "checking for $ac_word... " >&6; }
17382 if ${ac_cv_path_XCODEBUILD+:} false; then :
17383   $as_echo_n "(cached) " >&6
17384 else
17385   case $XCODEBUILD in
17386   [\\/]* | ?:[\\/]*)
17387   ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17388   ;;
17389   *)
17390   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17391 for as_dir in $TOOLCHAIN_PATH
17392 do
17393   IFS=$as_save_IFS
17394   test -z "$as_dir" && as_dir=.
17395     for ac_exec_ext in '' $ac_executable_extensions; do
17396   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17397     ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17398     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17399     break 2
17400   fi
17401 done
17402   done
17403 IFS=$as_save_IFS
17404 
17405   test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17406   ;;
17407 esac
17408 fi
17409 XCODEBUILD=$ac_cv_path_XCODEBUILD
17410 if test -n "$XCODEBUILD"; then
17411   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17412 $as_echo "$XCODEBUILD" >&6; }
17413 else
17414   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17415 $as_echo "no" >&6; }
17416 fi
17417 
17418 
17419     else
17420       # this should result in SYSROOT being empty, unless --with-sysroot is provided
17421       # when only the command line tools are installed there are no SDKs, so headers
17422       # are copied into the system frameworks
17423       XCODEBUILD=
17424 
17425     fi
17426 
17427     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17428 $as_echo_n "checking for sdk name... " >&6; }
17429 
17430 # Check whether --with-sdk-name was given.
17431 if test "${with_sdk_name+set}" = set; then :
17432   withval=$with_sdk_name; SDKNAME=$with_sdk_name
17433 
17434 fi
17435 
17436     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17437 $as_echo "$SDKNAME" >&6; }
17438 
17439     # if toolchain path is specified then don't rely on system headers, they may not compile
17440     HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17441     test -z "$TOOLCHAIN_PATH" && \
17442       HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17443 
17444     if test -z "$SYSROOT"; then
17445       if test -n "$XCODEBUILD"; then
17446         # if we don't have system headers, use default SDK name (last resort)
17447         if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17448           SDKNAME=${SDKNAME:-macosx}
17449         fi
17450 
17451         if test -n "$SDKNAME"; then
17452           # Call xcodebuild to determine SYSROOT
17453           SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17454         fi
17455       else
17456         if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17457           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
17458         fi
17459       fi
17460     else
17461       # warn user if --with-sdk-name was also set
17462       if test -n "$with_sdk_name"; then
17463         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17464 $as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17465       fi
17466     fi
17467 
17468     if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17469       # If no system framework headers, then SYSROOT must be set, or we won't build
17470       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
17471     fi
17472 
17473     # Perform a basic sanity test
17474     if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17475       if test -z "$SYSROOT"; then
17476         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
17477       else
17478         as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17479       fi
17480     fi
17481 
17482     # set SDKROOT too, Xcode tools will pick it up
17483     SDKROOT="$SYSROOT"
17484 
17485   fi
17486 
17487   # Prepend the extra path to the global path
17488 
17489   if test "x$EXTRA_PATH" != x; then
17490     if test "x$PATH" = x; then
17491       PATH="$EXTRA_PATH"
17492     else
17493       PATH="$EXTRA_PATH:$PATH"
17494     fi
17495   fi
17496 
17497 
17498   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17499 $as_echo_n "checking for sysroot... " >&6; }
17500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17501 $as_echo "$SYSROOT" >&6; }
17502   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17503 $as_echo_n "checking for toolchain path... " >&6; }
17504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17505 $as_echo "$TOOLCHAIN_PATH" >&6; }
17506   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17507 $as_echo_n "checking for extra path... " >&6; }
17508   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17509 $as_echo "$EXTRA_PATH" >&6; }
17510 
17511 
17512 # To properly create a configuration name, we need to have the OpenJDK target
17513 # and options (variants and debug level) parsed.
17514 
17515 
17516 
17517 # Check whether --with-conf-name was given.
17518 if test "${with_conf_name+set}" = set; then :
17519   withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17520 fi
17521 
17522 
17523   # Test from where we are running configure, in or outside of src root.
17524   { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17525 $as_echo_n "checking where to store configuration... " >&6; }
17526   if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17527       || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17528       || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17529     # We are running configure from the src root.
17530     # Create a default ./build/target-variant-debuglevel output root.
17531     if test "x${CONF_NAME}" = x; then
17532       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17533 $as_echo "in default location" >&6; }
17534       CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17535     else
17536       { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17537 $as_echo "in build directory with custom name" >&6; }
17538     fi
17539     OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17540     $MKDIR -p "$OUTPUT_ROOT"
17541     if test ! -d "$OUTPUT_ROOT"; then
17542       as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17543     fi
17544   else
17545     # We are running configure from outside of the src dir.
17546     # Then use the current directory as output dir!
17547     # If configuration is situated in normal build directory, just use the build
17548     # directory name as configuration name, otherwise use the complete path.
17549     if test "x${CONF_NAME}" = x; then
17550       CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17551     fi
17552     OUTPUT_ROOT="$CURDIR"
17553     { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17554 $as_echo "in current directory" >&6; }
17555 
17556     # WARNING: This might be a bad thing to do. You need to be sure you want to
17557     # have a configuration in this directory. Do some sanity checks!
17558 
17559     if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17560       # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17561       # other files
17562       files_present=`$LS $OUTPUT_ROOT`
17563       # Configure has already touched config.log and confdefs.h in the current dir when this check
17564       # is performed.
17565       filtered_files=`$ECHO "$files_present" \
17566           | $SED -e 's/config.log//g' \
17567               -e 's/configure.log//g' \
17568               -e 's/confdefs.h//g' \
17569               -e 's/ //g' \
17570           | $TR -d '\n'`
17571       if test "x$filtered_files" != x; then
17572         { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17573 $as_echo "$as_me: Current directory is $CURDIR." >&6;}
17574         { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17575 $as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17576         { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17577 $as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17578         { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17579 $as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17580         { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17581 $as_echo "$as_me: seriously mess up just about everything." >&6;}
17582         { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17583 $as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17584         { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17585 $as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17586         as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17587       fi
17588     fi
17589   fi
17590   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17591 $as_echo_n "checking what configuration name to use... " >&6; }
17592   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17593 $as_echo "$CONF_NAME" >&6; }
17594 
17595 
17596   # Only process if variable expands to non-empty
17597 
17598   if test "x$OUTPUT_ROOT" != x; then
17599     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17600 
17601   # Input might be given as Windows format, start by converting to
17602   # unix format.
17603   path="$OUTPUT_ROOT"
17604   new_path=`$CYGPATH -u "$path"`
17605 
17606   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17607   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17608   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17609   # "foo.exe" is OK but "foo" is an error.
17610   #
17611   # This test is therefore slightly more accurate than "test -f" to check for file precense.
17612   # It is also a way to make sure we got the proper file name for the real test later on.
17613   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17614   if test "x$test_shortpath" = x; then
17615     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17616 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17617     as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17618   fi
17619 
17620   # Call helper function which possibly converts this using DOS-style short mode.
17621   # If so, the updated path is stored in $new_path.
17622 
17623   input_path="$new_path"
17624   # Check if we need to convert this using DOS-style short mode. If the path
17625   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17626   # take no chances and rewrite it.
17627   # Note: m4 eats our [], so we need to use [ and ] instead.
17628   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17629   if test "x$has_forbidden_chars" != x; then
17630     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17631     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17632     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17633     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17634       # Going to short mode and back again did indeed matter. Since short mode is
17635       # case insensitive, let's make it lowercase to improve readability.
17636       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17637       # Now convert it back to Unix-style (cygpath)
17638       input_path=`$CYGPATH -u "$shortmode_path"`
17639       new_path="$input_path"
17640     fi
17641   fi
17642 
17643   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17644   if test "x$test_cygdrive_prefix" = x; then
17645     # As a simple fix, exclude /usr/bin since it's not a real path.
17646     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17647       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17648       # a path prefixed by /cygdrive for fixpath to work.
17649       new_path="$CYGWIN_ROOT_PATH$input_path"
17650     fi
17651   fi
17652 
17653 
17654   if test "x$path" != "x$new_path"; then
17655     OUTPUT_ROOT="$new_path"
17656     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17657 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17658   fi
17659 
17660     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17661 
17662   path="$OUTPUT_ROOT"
17663   has_colon=`$ECHO $path | $GREP ^.:`
17664   new_path="$path"
17665   if test "x$has_colon" = x; then
17666     # Not in mixed or Windows style, start by that.
17667     new_path=`cmd //c echo $path`
17668   fi
17669 
17670 
17671   input_path="$new_path"
17672   # Check if we need to convert this using DOS-style short mode. If the path
17673   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17674   # take no chances and rewrite it.
17675   # Note: m4 eats our [], so we need to use [ and ] instead.
17676   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17677   if test "x$has_forbidden_chars" != x; then
17678     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17679     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17680   fi
17681 
17682 
17683   windows_path="$new_path"
17684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17685     unix_path=`$CYGPATH -u "$windows_path"`
17686     new_path="$unix_path"
17687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17689     new_path="$unix_path"
17690   fi
17691 
17692   if test "x$path" != "x$new_path"; then
17693     OUTPUT_ROOT="$new_path"
17694     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17695 $as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17696   fi
17697 
17698   # Save the first 10 bytes of this path to the storage, so fixpath can work.
17699   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17700 
17701     else
17702       # We're on a unix platform. Hooray! :)
17703       path="$OUTPUT_ROOT"
17704       has_space=`$ECHO "$path" | $GREP " "`
17705       if test "x$has_space" != x; then
17706         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17707 $as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17708         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17709       fi
17710 
17711       # Use eval to expand a potential ~
17712       eval path="$path"
17713       if test ! -f "$path" && test ! -d "$path"; then
17714         as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17715       fi
17716 
17717       if test -d "$path"; then
17718         OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17719       else
17720         dir="`$DIRNAME "$path"`"
17721         base="`$BASENAME "$path"`"
17722         OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17723       fi
17724     fi
17725   fi
17726 
17727 
17728   CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17729   $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17730 
17731   SPEC="$OUTPUT_ROOT/spec.gmk"
17732 
17733 
17734 
17735 
17736 
17737   # The spec.gmk file contains all variables for the make system.
17738   ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17739 
17740   # The bootcycle-spec.gmk file contains support for boot cycle builds.
17741   ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17742 
17743   # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17744   ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17745 
17746   # The compare.sh is used to compare the build output to other builds.
17747   ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17748 
17749   # The generated Makefile knows where the spec.gmk is and where the source is.
17750   # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17751   # which will look for generated configurations
17752   ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17753 
17754 
17755 
17756 # Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17757 
17758   for ac_prog in apt-get yum brew port pkgutil pkgadd
17759 do
17760   # Extract the first word of "$ac_prog", so it can be a program name with args.
17761 set dummy $ac_prog; ac_word=$2
17762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17763 $as_echo_n "checking for $ac_word... " >&6; }
17764 if ${ac_cv_prog_PKGHANDLER+:} false; then :
17765   $as_echo_n "(cached) " >&6
17766 else
17767   if test -n "$PKGHANDLER"; then
17768   ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17769 else
17770 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17771 for as_dir in $PATH
17772 do
17773   IFS=$as_save_IFS
17774   test -z "$as_dir" && as_dir=.
17775     for ac_exec_ext in '' $ac_executable_extensions; do
17776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17777     ac_cv_prog_PKGHANDLER="$ac_prog"
17778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17779     break 2
17780   fi
17781 done
17782   done
17783 IFS=$as_save_IFS
17784 
17785 fi
17786 fi
17787 PKGHANDLER=$ac_cv_prog_PKGHANDLER
17788 if test -n "$PKGHANDLER"; then
17789   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17790 $as_echo "$PKGHANDLER" >&6; }
17791 else
17792   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17793 $as_echo "no" >&6; }
17794 fi
17795 
17796 
17797   test -n "$PKGHANDLER" && break
17798 done
17799 
17800 
17801 
17802 # Setup tools that requires more complex handling, or that is not needed by the configure script.
17803 
17804 
17805 
17806   # Publish this variable in the help.
17807 
17808 
17809   if [ -z "${MAKE+x}" ]; then
17810     # The variable is not set by user, try to locate tool using the code snippet
17811 
17812     # Try our hardest to locate a correct version of GNU make
17813     for ac_prog in gmake
17814 do
17815   # Extract the first word of "$ac_prog", so it can be a program name with args.
17816 set dummy $ac_prog; ac_word=$2
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17818 $as_echo_n "checking for $ac_word... " >&6; }
17819 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17820   $as_echo_n "(cached) " >&6
17821 else
17822   case $CHECK_GMAKE in
17823   [\\/]* | ?:[\\/]*)
17824   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17825   ;;
17826   *)
17827   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17828 for as_dir in $PATH
17829 do
17830   IFS=$as_save_IFS
17831   test -z "$as_dir" && as_dir=.
17832     for ac_exec_ext in '' $ac_executable_extensions; do
17833   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17834     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17835     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17836     break 2
17837   fi
17838 done
17839   done
17840 IFS=$as_save_IFS
17841 
17842   ;;
17843 esac
17844 fi
17845 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17846 if test -n "$CHECK_GMAKE"; then
17847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17848 $as_echo "$CHECK_GMAKE" >&6; }
17849 else
17850   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17851 $as_echo "no" >&6; }
17852 fi
17853 
17854 
17855   test -n "$CHECK_GMAKE" && break
17856 done
17857 
17858 
17859   MAKE_CANDIDATE=""$CHECK_GMAKE""
17860   DESCRIPTION="gmake in PATH"
17861 
17862   # On Cygwin, we require a newer version of make than on other platforms
17863   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17864     MAKE_VERSION_EXPR="-e 4\."
17865     MAKE_REQUIRED_VERSION="4.0"
17866    else
17867     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17868     MAKE_REQUIRED_VERSION="3.81"
17869   fi
17870 
17871   if test "x$MAKE_CANDIDATE" != x; then
17872     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17873 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17874     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17875     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17876     if test "x$IS_GNU_MAKE" = x; then
17877       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17878 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17879     else
17880       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17881       if test "x$IS_MODERN_MAKE" = x; then
17882         { $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
17883 $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;}
17884       else
17885         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17886           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17887             MAKE_EXPECTED_ENV='cygwin'
17888           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17889             MAKE_EXPECTED_ENV='msys'
17890           else
17891             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17892           fi
17893           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17894           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17895         else
17896           # Not relevant for non-Windows
17897           IS_MAKE_CORRECT_ENV=true
17898         fi
17899         if test "x$IS_MAKE_CORRECT_ENV" = x; then
17900           { $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
17901 $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;}
17902         else
17903           FOUND_MAKE=$MAKE_CANDIDATE
17904 
17905   # Only process if variable expands to non-empty
17906 
17907   if test "x$FOUND_MAKE" != x; then
17908     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17909 
17910   # First separate the path from the arguments. This will split at the first
17911   # space.
17912   complete="$FOUND_MAKE"
17913   path="${complete%% *}"
17914   tmp="$complete EOL"
17915   arguments="${tmp#* }"
17916 
17917   # Input might be given as Windows format, start by converting to
17918   # unix format.
17919   new_path=`$CYGPATH -u "$path"`
17920 
17921   # Now try to locate executable using which
17922   new_path=`$WHICH "$new_path" 2> /dev/null`
17923   # bat and cmd files are not always considered executable in cygwin causing which
17924   # to not find them
17925   if test "x$new_path" = x \
17926       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17927       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17928     new_path=`$CYGPATH -u "$path"`
17929   fi
17930   if test "x$new_path" = x; then
17931     # Oops. Which didn't find the executable.
17932     # The splitting of arguments from the executable at a space might have been incorrect,
17933     # since paths with space are more likely in Windows. Give it another try with the whole
17934     # argument.
17935     path="$complete"
17936     arguments="EOL"
17937     new_path=`$CYGPATH -u "$path"`
17938     new_path=`$WHICH "$new_path" 2> /dev/null`
17939     # bat and cmd files are not always considered executable in cygwin causing which
17940     # to not find them
17941     if test "x$new_path" = x \
17942         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17943         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17944       new_path=`$CYGPATH -u "$path"`
17945     fi
17946     if test "x$new_path" = x; then
17947       # It's still not found. Now this is an unrecoverable error.
17948       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17949 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17950       has_space=`$ECHO "$complete" | $GREP " "`
17951       if test "x$has_space" != x; then
17952         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17953 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17954       fi
17955       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17956     fi
17957   fi
17958 
17959   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17960   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17961   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17962   # "foo.exe" is OK but "foo" is an error.
17963   #
17964   # This test is therefore slightly more accurate than "test -f" to check for file presence.
17965   # It is also a way to make sure we got the proper file name for the real test later on.
17966   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17967   if test "x$test_shortpath" = x; then
17968     # Short path failed, file does not exist as specified.
17969     # Try adding .exe or .cmd
17970     if test -f "${new_path}.exe"; then
17971       input_to_shortpath="${new_path}.exe"
17972     elif test -f "${new_path}.cmd"; then
17973       input_to_shortpath="${new_path}.cmd"
17974     else
17975       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17976 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17977       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17978 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17979       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17980     fi
17981   else
17982     input_to_shortpath="$new_path"
17983   fi
17984 
17985   # Call helper function which possibly converts this using DOS-style short mode.
17986   # If so, the updated path is stored in $new_path.
17987   new_path="$input_to_shortpath"
17988 
17989   input_path="$input_to_shortpath"
17990   # Check if we need to convert this using DOS-style short mode. If the path
17991   # contains just simple characters, use it. Otherwise (spaces, weird characters),
17992   # take no chances and rewrite it.
17993   # Note: m4 eats our [], so we need to use [ and ] instead.
17994   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17995   if test "x$has_forbidden_chars" != x; then
17996     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17997     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17998     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17999     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18000       # Going to short mode and back again did indeed matter. Since short mode is
18001       # case insensitive, let's make it lowercase to improve readability.
18002       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18003       # Now convert it back to Unix-style (cygpath)
18004       input_path=`$CYGPATH -u "$shortmode_path"`
18005       new_path="$input_path"
18006     fi
18007   fi
18008 
18009   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18010   if test "x$test_cygdrive_prefix" = x; then
18011     # As a simple fix, exclude /usr/bin since it's not a real path.
18012     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18013       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18014       # a path prefixed by /cygdrive for fixpath to work.
18015       new_path="$CYGWIN_ROOT_PATH$input_path"
18016     fi
18017   fi
18018 
18019   # remove trailing .exe if any
18020   new_path="${new_path/%.exe/}"
18021 
18022     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18023 
18024   # First separate the path from the arguments. This will split at the first
18025   # space.
18026   complete="$FOUND_MAKE"
18027   path="${complete%% *}"
18028   tmp="$complete EOL"
18029   arguments="${tmp#* }"
18030 
18031   # Input might be given as Windows format, start by converting to
18032   # unix format.
18033   new_path="$path"
18034 
18035   windows_path="$new_path"
18036   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037     unix_path=`$CYGPATH -u "$windows_path"`
18038     new_path="$unix_path"
18039   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18040     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18041     new_path="$unix_path"
18042   fi
18043 
18044 
18045   # Now try to locate executable using which
18046   new_path=`$WHICH "$new_path" 2> /dev/null`
18047 
18048   if test "x$new_path" = x; then
18049     # Oops. Which didn't find the executable.
18050     # The splitting of arguments from the executable at a space might have been incorrect,
18051     # since paths with space are more likely in Windows. Give it another try with the whole
18052     # argument.
18053     path="$complete"
18054     arguments="EOL"
18055     new_path="$path"
18056 
18057   windows_path="$new_path"
18058   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18059     unix_path=`$CYGPATH -u "$windows_path"`
18060     new_path="$unix_path"
18061   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18062     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18063     new_path="$unix_path"
18064   fi
18065 
18066 
18067     new_path=`$WHICH "$new_path" 2> /dev/null`
18068     # bat and cmd files are not always considered executable in MSYS causing which
18069     # to not find them
18070     if test "x$new_path" = x \
18071         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18072         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18073       new_path="$path"
18074 
18075   windows_path="$new_path"
18076   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18077     unix_path=`$CYGPATH -u "$windows_path"`
18078     new_path="$unix_path"
18079   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18080     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18081     new_path="$unix_path"
18082   fi
18083 
18084     fi
18085 
18086     if test "x$new_path" = x; then
18087       # It's still not found. Now this is an unrecoverable error.
18088       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18089 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18090       has_space=`$ECHO "$complete" | $GREP " "`
18091       if test "x$has_space" != x; then
18092         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18093 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18094       fi
18095       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18096     fi
18097   fi
18098 
18099   # Now new_path has a complete unix path to the binary
18100   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18101     # Keep paths in /bin as-is, but remove trailing .exe if any
18102     new_path="${new_path/%.exe/}"
18103     # Do not save /bin paths to all_fixpath_prefixes!
18104   else
18105     # Not in mixed or Windows style, start by that.
18106     new_path=`cmd //c echo $new_path`
18107 
18108   input_path="$new_path"
18109   # Check if we need to convert this using DOS-style short mode. If the path
18110   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18111   # take no chances and rewrite it.
18112   # Note: m4 eats our [], so we need to use [ and ] instead.
18113   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18114   if test "x$has_forbidden_chars" != x; then
18115     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18116     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18117   fi
18118 
18119     # Output is in $new_path
18120 
18121   windows_path="$new_path"
18122   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18123     unix_path=`$CYGPATH -u "$windows_path"`
18124     new_path="$unix_path"
18125   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18126     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18127     new_path="$unix_path"
18128   fi
18129 
18130     # remove trailing .exe if any
18131     new_path="${new_path/%.exe/}"
18132 
18133     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18134     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18135   fi
18136 
18137     else
18138       # We're on a unix platform. Hooray! :)
18139       # First separate the path from the arguments. This will split at the first
18140       # space.
18141       complete="$FOUND_MAKE"
18142       path="${complete%% *}"
18143       tmp="$complete EOL"
18144       arguments="${tmp#* }"
18145 
18146       # Cannot rely on the command "which" here since it doesn't always work.
18147       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18148       if test -z "$is_absolute_path"; then
18149         # Path to executable is not absolute. Find it.
18150         IFS_save="$IFS"
18151         IFS=:
18152         for p in $PATH; do
18153           if test -f "$p/$path" && test -x "$p/$path"; then
18154             new_path="$p/$path"
18155             break
18156           fi
18157         done
18158         IFS="$IFS_save"
18159       else
18160         # This is an absolute path, we can use it without further modifications.
18161         new_path="$path"
18162       fi
18163 
18164       if test "x$new_path" = x; then
18165         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18166 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18167         has_space=`$ECHO "$complete" | $GREP " "`
18168         if test "x$has_space" != x; then
18169           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18170 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18171         fi
18172         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18173       fi
18174     fi
18175 
18176     # Now join together the path and the arguments once again
18177     if test "x$arguments" != xEOL; then
18178       new_complete="$new_path ${arguments% *}"
18179     else
18180       new_complete="$new_path"
18181     fi
18182 
18183     if test "x$complete" != "x$new_complete"; then
18184       FOUND_MAKE="$new_complete"
18185       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18186 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18187     fi
18188   fi
18189 
18190         fi
18191       fi
18192     fi
18193   fi
18194 
18195 
18196     if test "x$FOUND_MAKE" = x; then
18197       for ac_prog in make
18198 do
18199   # Extract the first word of "$ac_prog", so it can be a program name with args.
18200 set dummy $ac_prog; ac_word=$2
18201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18202 $as_echo_n "checking for $ac_word... " >&6; }
18203 if ${ac_cv_path_CHECK_MAKE+:} false; then :
18204   $as_echo_n "(cached) " >&6
18205 else
18206   case $CHECK_MAKE in
18207   [\\/]* | ?:[\\/]*)
18208   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18209   ;;
18210   *)
18211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18212 for as_dir in $PATH
18213 do
18214   IFS=$as_save_IFS
18215   test -z "$as_dir" && as_dir=.
18216     for ac_exec_ext in '' $ac_executable_extensions; do
18217   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18218     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18219     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18220     break 2
18221   fi
18222 done
18223   done
18224 IFS=$as_save_IFS
18225 
18226   ;;
18227 esac
18228 fi
18229 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18230 if test -n "$CHECK_MAKE"; then
18231   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18232 $as_echo "$CHECK_MAKE" >&6; }
18233 else
18234   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18235 $as_echo "no" >&6; }
18236 fi
18237 
18238 
18239   test -n "$CHECK_MAKE" && break
18240 done
18241 
18242 
18243   MAKE_CANDIDATE=""$CHECK_MAKE""
18244   DESCRIPTION="make in PATH"
18245 
18246   # On Cygwin, we require a newer version of make than on other platforms
18247   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18248     MAKE_VERSION_EXPR="-e 4\."
18249     MAKE_REQUIRED_VERSION="4.0"
18250    else
18251     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18252     MAKE_REQUIRED_VERSION="3.81"
18253   fi
18254 
18255   if test "x$MAKE_CANDIDATE" != x; then
18256     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18257 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18258     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18259     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18260     if test "x$IS_GNU_MAKE" = x; then
18261       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18262 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18263     else
18264       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18265       if test "x$IS_MODERN_MAKE" = x; then
18266         { $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
18267 $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;}
18268       else
18269         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18270           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18271             MAKE_EXPECTED_ENV='cygwin'
18272           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18273             MAKE_EXPECTED_ENV='msys'
18274           else
18275             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18276           fi
18277           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18278           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18279         else
18280           # Not relevant for non-Windows
18281           IS_MAKE_CORRECT_ENV=true
18282         fi
18283         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18284           { $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
18285 $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;}
18286         else
18287           FOUND_MAKE=$MAKE_CANDIDATE
18288 
18289   # Only process if variable expands to non-empty
18290 
18291   if test "x$FOUND_MAKE" != x; then
18292     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18293 
18294   # First separate the path from the arguments. This will split at the first
18295   # space.
18296   complete="$FOUND_MAKE"
18297   path="${complete%% *}"
18298   tmp="$complete EOL"
18299   arguments="${tmp#* }"
18300 
18301   # Input might be given as Windows format, start by converting to
18302   # unix format.
18303   new_path=`$CYGPATH -u "$path"`
18304 
18305   # Now try to locate executable using which
18306   new_path=`$WHICH "$new_path" 2> /dev/null`
18307   # bat and cmd files are not always considered executable in cygwin causing which
18308   # to not find them
18309   if test "x$new_path" = x \
18310       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18311       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18312     new_path=`$CYGPATH -u "$path"`
18313   fi
18314   if test "x$new_path" = x; then
18315     # Oops. Which didn't find the executable.
18316     # The splitting of arguments from the executable at a space might have been incorrect,
18317     # since paths with space are more likely in Windows. Give it another try with the whole
18318     # argument.
18319     path="$complete"
18320     arguments="EOL"
18321     new_path=`$CYGPATH -u "$path"`
18322     new_path=`$WHICH "$new_path" 2> /dev/null`
18323     # bat and cmd files are not always considered executable in cygwin causing which
18324     # to not find them
18325     if test "x$new_path" = x \
18326         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18327         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18328       new_path=`$CYGPATH -u "$path"`
18329     fi
18330     if test "x$new_path" = x; then
18331       # It's still not found. Now this is an unrecoverable error.
18332       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18333 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18334       has_space=`$ECHO "$complete" | $GREP " "`
18335       if test "x$has_space" != x; then
18336         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18337 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18338       fi
18339       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18340     fi
18341   fi
18342 
18343   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18344   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18345   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18346   # "foo.exe" is OK but "foo" is an error.
18347   #
18348   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18349   # It is also a way to make sure we got the proper file name for the real test later on.
18350   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18351   if test "x$test_shortpath" = x; then
18352     # Short path failed, file does not exist as specified.
18353     # Try adding .exe or .cmd
18354     if test -f "${new_path}.exe"; then
18355       input_to_shortpath="${new_path}.exe"
18356     elif test -f "${new_path}.cmd"; then
18357       input_to_shortpath="${new_path}.cmd"
18358     else
18359       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18360 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18361       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18362 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18363       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18364     fi
18365   else
18366     input_to_shortpath="$new_path"
18367   fi
18368 
18369   # Call helper function which possibly converts this using DOS-style short mode.
18370   # If so, the updated path is stored in $new_path.
18371   new_path="$input_to_shortpath"
18372 
18373   input_path="$input_to_shortpath"
18374   # Check if we need to convert this using DOS-style short mode. If the path
18375   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18376   # take no chances and rewrite it.
18377   # Note: m4 eats our [], so we need to use [ and ] instead.
18378   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18379   if test "x$has_forbidden_chars" != x; then
18380     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18381     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18382     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18383     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18384       # Going to short mode and back again did indeed matter. Since short mode is
18385       # case insensitive, let's make it lowercase to improve readability.
18386       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18387       # Now convert it back to Unix-style (cygpath)
18388       input_path=`$CYGPATH -u "$shortmode_path"`
18389       new_path="$input_path"
18390     fi
18391   fi
18392 
18393   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18394   if test "x$test_cygdrive_prefix" = x; then
18395     # As a simple fix, exclude /usr/bin since it's not a real path.
18396     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18397       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18398       # a path prefixed by /cygdrive for fixpath to work.
18399       new_path="$CYGWIN_ROOT_PATH$input_path"
18400     fi
18401   fi
18402 
18403   # remove trailing .exe if any
18404   new_path="${new_path/%.exe/}"
18405 
18406     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18407 
18408   # First separate the path from the arguments. This will split at the first
18409   # space.
18410   complete="$FOUND_MAKE"
18411   path="${complete%% *}"
18412   tmp="$complete EOL"
18413   arguments="${tmp#* }"
18414 
18415   # Input might be given as Windows format, start by converting to
18416   # unix format.
18417   new_path="$path"
18418 
18419   windows_path="$new_path"
18420   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18421     unix_path=`$CYGPATH -u "$windows_path"`
18422     new_path="$unix_path"
18423   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18424     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18425     new_path="$unix_path"
18426   fi
18427 
18428 
18429   # Now try to locate executable using which
18430   new_path=`$WHICH "$new_path" 2> /dev/null`
18431 
18432   if test "x$new_path" = x; then
18433     # Oops. Which didn't find the executable.
18434     # The splitting of arguments from the executable at a space might have been incorrect,
18435     # since paths with space are more likely in Windows. Give it another try with the whole
18436     # argument.
18437     path="$complete"
18438     arguments="EOL"
18439     new_path="$path"
18440 
18441   windows_path="$new_path"
18442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18443     unix_path=`$CYGPATH -u "$windows_path"`
18444     new_path="$unix_path"
18445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18447     new_path="$unix_path"
18448   fi
18449 
18450 
18451     new_path=`$WHICH "$new_path" 2> /dev/null`
18452     # bat and cmd files are not always considered executable in MSYS causing which
18453     # to not find them
18454     if test "x$new_path" = x \
18455         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18456         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18457       new_path="$path"
18458 
18459   windows_path="$new_path"
18460   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18461     unix_path=`$CYGPATH -u "$windows_path"`
18462     new_path="$unix_path"
18463   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18464     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18465     new_path="$unix_path"
18466   fi
18467 
18468     fi
18469 
18470     if test "x$new_path" = x; then
18471       # It's still not found. Now this is an unrecoverable error.
18472       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18473 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18474       has_space=`$ECHO "$complete" | $GREP " "`
18475       if test "x$has_space" != x; then
18476         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18477 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18478       fi
18479       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18480     fi
18481   fi
18482 
18483   # Now new_path has a complete unix path to the binary
18484   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18485     # Keep paths in /bin as-is, but remove trailing .exe if any
18486     new_path="${new_path/%.exe/}"
18487     # Do not save /bin paths to all_fixpath_prefixes!
18488   else
18489     # Not in mixed or Windows style, start by that.
18490     new_path=`cmd //c echo $new_path`
18491 
18492   input_path="$new_path"
18493   # Check if we need to convert this using DOS-style short mode. If the path
18494   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18495   # take no chances and rewrite it.
18496   # Note: m4 eats our [], so we need to use [ and ] instead.
18497   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18498   if test "x$has_forbidden_chars" != x; then
18499     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18500     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18501   fi
18502 
18503     # Output is in $new_path
18504 
18505   windows_path="$new_path"
18506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18507     unix_path=`$CYGPATH -u "$windows_path"`
18508     new_path="$unix_path"
18509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18511     new_path="$unix_path"
18512   fi
18513 
18514     # remove trailing .exe if any
18515     new_path="${new_path/%.exe/}"
18516 
18517     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18518     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18519   fi
18520 
18521     else
18522       # We're on a unix platform. Hooray! :)
18523       # First separate the path from the arguments. This will split at the first
18524       # space.
18525       complete="$FOUND_MAKE"
18526       path="${complete%% *}"
18527       tmp="$complete EOL"
18528       arguments="${tmp#* }"
18529 
18530       # Cannot rely on the command "which" here since it doesn't always work.
18531       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18532       if test -z "$is_absolute_path"; then
18533         # Path to executable is not absolute. Find it.
18534         IFS_save="$IFS"
18535         IFS=:
18536         for p in $PATH; do
18537           if test -f "$p/$path" && test -x "$p/$path"; then
18538             new_path="$p/$path"
18539             break
18540           fi
18541         done
18542         IFS="$IFS_save"
18543       else
18544         # This is an absolute path, we can use it without further modifications.
18545         new_path="$path"
18546       fi
18547 
18548       if test "x$new_path" = x; then
18549         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18550 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18551         has_space=`$ECHO "$complete" | $GREP " "`
18552         if test "x$has_space" != x; then
18553           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18554 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18555         fi
18556         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18557       fi
18558     fi
18559 
18560     # Now join together the path and the arguments once again
18561     if test "x$arguments" != xEOL; then
18562       new_complete="$new_path ${arguments% *}"
18563     else
18564       new_complete="$new_path"
18565     fi
18566 
18567     if test "x$complete" != "x$new_complete"; then
18568       FOUND_MAKE="$new_complete"
18569       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18570 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18571     fi
18572   fi
18573 
18574         fi
18575       fi
18576     fi
18577   fi
18578 
18579     fi
18580 
18581     if test "x$FOUND_MAKE" = x; then
18582       if test "x$TOOLCHAIN_PATH" != x; then
18583         # We have a toolchain path, check that as well before giving up.
18584         OLD_PATH=$PATH
18585         PATH=$TOOLCHAIN_PATH:$PATH
18586         for ac_prog in gmake
18587 do
18588   # Extract the first word of "$ac_prog", so it can be a program name with args.
18589 set dummy $ac_prog; ac_word=$2
18590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18591 $as_echo_n "checking for $ac_word... " >&6; }
18592 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18593   $as_echo_n "(cached) " >&6
18594 else
18595   case $CHECK_TOOLSDIR_GMAKE in
18596   [\\/]* | ?:[\\/]*)
18597   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18598   ;;
18599   *)
18600   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18601 for as_dir in $PATH
18602 do
18603   IFS=$as_save_IFS
18604   test -z "$as_dir" && as_dir=.
18605     for ac_exec_ext in '' $ac_executable_extensions; do
18606   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18607     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18609     break 2
18610   fi
18611 done
18612   done
18613 IFS=$as_save_IFS
18614 
18615   ;;
18616 esac
18617 fi
18618 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18619 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18621 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18622 else
18623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18624 $as_echo "no" >&6; }
18625 fi
18626 
18627 
18628   test -n "$CHECK_TOOLSDIR_GMAKE" && break
18629 done
18630 
18631 
18632   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18633   DESCRIPTION="gmake in tools-dir"
18634 
18635   # On Cygwin, we require a newer version of make than on other platforms
18636   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18637     MAKE_VERSION_EXPR="-e 4\."
18638     MAKE_REQUIRED_VERSION="4.0"
18639    else
18640     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18641     MAKE_REQUIRED_VERSION="3.81"
18642   fi
18643 
18644   if test "x$MAKE_CANDIDATE" != x; then
18645     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18646 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18647     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18648     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18649     if test "x$IS_GNU_MAKE" = x; then
18650       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18651 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18652     else
18653       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18654       if test "x$IS_MODERN_MAKE" = x; then
18655         { $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
18656 $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;}
18657       else
18658         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18659           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18660             MAKE_EXPECTED_ENV='cygwin'
18661           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18662             MAKE_EXPECTED_ENV='msys'
18663           else
18664             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18665           fi
18666           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18667           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18668         else
18669           # Not relevant for non-Windows
18670           IS_MAKE_CORRECT_ENV=true
18671         fi
18672         if test "x$IS_MAKE_CORRECT_ENV" = x; then
18673           { $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
18674 $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;}
18675         else
18676           FOUND_MAKE=$MAKE_CANDIDATE
18677 
18678   # Only process if variable expands to non-empty
18679 
18680   if test "x$FOUND_MAKE" != x; then
18681     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18682 
18683   # First separate the path from the arguments. This will split at the first
18684   # space.
18685   complete="$FOUND_MAKE"
18686   path="${complete%% *}"
18687   tmp="$complete EOL"
18688   arguments="${tmp#* }"
18689 
18690   # Input might be given as Windows format, start by converting to
18691   # unix format.
18692   new_path=`$CYGPATH -u "$path"`
18693 
18694   # Now try to locate executable using which
18695   new_path=`$WHICH "$new_path" 2> /dev/null`
18696   # bat and cmd files are not always considered executable in cygwin causing which
18697   # to not find them
18698   if test "x$new_path" = x \
18699       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18700       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18701     new_path=`$CYGPATH -u "$path"`
18702   fi
18703   if test "x$new_path" = x; then
18704     # Oops. Which didn't find the executable.
18705     # The splitting of arguments from the executable at a space might have been incorrect,
18706     # since paths with space are more likely in Windows. Give it another try with the whole
18707     # argument.
18708     path="$complete"
18709     arguments="EOL"
18710     new_path=`$CYGPATH -u "$path"`
18711     new_path=`$WHICH "$new_path" 2> /dev/null`
18712     # bat and cmd files are not always considered executable in cygwin causing which
18713     # to not find them
18714     if test "x$new_path" = x \
18715         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18716         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18717       new_path=`$CYGPATH -u "$path"`
18718     fi
18719     if test "x$new_path" = x; then
18720       # It's still not found. Now this is an unrecoverable error.
18721       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18722 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18723       has_space=`$ECHO "$complete" | $GREP " "`
18724       if test "x$has_space" != x; then
18725         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18726 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18727       fi
18728       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18729     fi
18730   fi
18731 
18732   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18733   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18734   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18735   # "foo.exe" is OK but "foo" is an error.
18736   #
18737   # This test is therefore slightly more accurate than "test -f" to check for file presence.
18738   # It is also a way to make sure we got the proper file name for the real test later on.
18739   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18740   if test "x$test_shortpath" = x; then
18741     # Short path failed, file does not exist as specified.
18742     # Try adding .exe or .cmd
18743     if test -f "${new_path}.exe"; then
18744       input_to_shortpath="${new_path}.exe"
18745     elif test -f "${new_path}.cmd"; then
18746       input_to_shortpath="${new_path}.cmd"
18747     else
18748       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18749 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18750       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18751 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18752       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18753     fi
18754   else
18755     input_to_shortpath="$new_path"
18756   fi
18757 
18758   # Call helper function which possibly converts this using DOS-style short mode.
18759   # If so, the updated path is stored in $new_path.
18760   new_path="$input_to_shortpath"
18761 
18762   input_path="$input_to_shortpath"
18763   # Check if we need to convert this using DOS-style short mode. If the path
18764   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18765   # take no chances and rewrite it.
18766   # Note: m4 eats our [], so we need to use [ and ] instead.
18767   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18768   if test "x$has_forbidden_chars" != x; then
18769     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18770     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18771     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18772     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18773       # Going to short mode and back again did indeed matter. Since short mode is
18774       # case insensitive, let's make it lowercase to improve readability.
18775       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18776       # Now convert it back to Unix-style (cygpath)
18777       input_path=`$CYGPATH -u "$shortmode_path"`
18778       new_path="$input_path"
18779     fi
18780   fi
18781 
18782   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18783   if test "x$test_cygdrive_prefix" = x; then
18784     # As a simple fix, exclude /usr/bin since it's not a real path.
18785     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18786       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18787       # a path prefixed by /cygdrive for fixpath to work.
18788       new_path="$CYGWIN_ROOT_PATH$input_path"
18789     fi
18790   fi
18791 
18792   # remove trailing .exe if any
18793   new_path="${new_path/%.exe/}"
18794 
18795     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18796 
18797   # First separate the path from the arguments. This will split at the first
18798   # space.
18799   complete="$FOUND_MAKE"
18800   path="${complete%% *}"
18801   tmp="$complete EOL"
18802   arguments="${tmp#* }"
18803 
18804   # Input might be given as Windows format, start by converting to
18805   # unix format.
18806   new_path="$path"
18807 
18808   windows_path="$new_path"
18809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18810     unix_path=`$CYGPATH -u "$windows_path"`
18811     new_path="$unix_path"
18812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18813     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18814     new_path="$unix_path"
18815   fi
18816 
18817 
18818   # Now try to locate executable using which
18819   new_path=`$WHICH "$new_path" 2> /dev/null`
18820 
18821   if test "x$new_path" = x; then
18822     # Oops. Which didn't find the executable.
18823     # The splitting of arguments from the executable at a space might have been incorrect,
18824     # since paths with space are more likely in Windows. Give it another try with the whole
18825     # argument.
18826     path="$complete"
18827     arguments="EOL"
18828     new_path="$path"
18829 
18830   windows_path="$new_path"
18831   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18832     unix_path=`$CYGPATH -u "$windows_path"`
18833     new_path="$unix_path"
18834   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18835     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18836     new_path="$unix_path"
18837   fi
18838 
18839 
18840     new_path=`$WHICH "$new_path" 2> /dev/null`
18841     # bat and cmd files are not always considered executable in MSYS causing which
18842     # to not find them
18843     if test "x$new_path" = x \
18844         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18845         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18846       new_path="$path"
18847 
18848   windows_path="$new_path"
18849   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18850     unix_path=`$CYGPATH -u "$windows_path"`
18851     new_path="$unix_path"
18852   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18853     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18854     new_path="$unix_path"
18855   fi
18856 
18857     fi
18858 
18859     if test "x$new_path" = x; then
18860       # It's still not found. Now this is an unrecoverable error.
18861       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18862 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18863       has_space=`$ECHO "$complete" | $GREP " "`
18864       if test "x$has_space" != x; then
18865         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18866 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18867       fi
18868       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18869     fi
18870   fi
18871 
18872   # Now new_path has a complete unix path to the binary
18873   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18874     # Keep paths in /bin as-is, but remove trailing .exe if any
18875     new_path="${new_path/%.exe/}"
18876     # Do not save /bin paths to all_fixpath_prefixes!
18877   else
18878     # Not in mixed or Windows style, start by that.
18879     new_path=`cmd //c echo $new_path`
18880 
18881   input_path="$new_path"
18882   # Check if we need to convert this using DOS-style short mode. If the path
18883   # contains just simple characters, use it. Otherwise (spaces, weird characters),
18884   # take no chances and rewrite it.
18885   # Note: m4 eats our [], so we need to use [ and ] instead.
18886   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18887   if test "x$has_forbidden_chars" != x; then
18888     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18889     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18890   fi
18891 
18892     # Output is in $new_path
18893 
18894   windows_path="$new_path"
18895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18896     unix_path=`$CYGPATH -u "$windows_path"`
18897     new_path="$unix_path"
18898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18900     new_path="$unix_path"
18901   fi
18902 
18903     # remove trailing .exe if any
18904     new_path="${new_path/%.exe/}"
18905 
18906     # Save the first 10 bytes of this path to the storage, so fixpath can work.
18907     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18908   fi
18909 
18910     else
18911       # We're on a unix platform. Hooray! :)
18912       # First separate the path from the arguments. This will split at the first
18913       # space.
18914       complete="$FOUND_MAKE"
18915       path="${complete%% *}"
18916       tmp="$complete EOL"
18917       arguments="${tmp#* }"
18918 
18919       # Cannot rely on the command "which" here since it doesn't always work.
18920       is_absolute_path=`$ECHO "$path" | $GREP ^/`
18921       if test -z "$is_absolute_path"; then
18922         # Path to executable is not absolute. Find it.
18923         IFS_save="$IFS"
18924         IFS=:
18925         for p in $PATH; do
18926           if test -f "$p/$path" && test -x "$p/$path"; then
18927             new_path="$p/$path"
18928             break
18929           fi
18930         done
18931         IFS="$IFS_save"
18932       else
18933         # This is an absolute path, we can use it without further modifications.
18934         new_path="$path"
18935       fi
18936 
18937       if test "x$new_path" = x; then
18938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18939 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18940         has_space=`$ECHO "$complete" | $GREP " "`
18941         if test "x$has_space" != x; then
18942           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18943 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18944         fi
18945         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18946       fi
18947     fi
18948 
18949     # Now join together the path and the arguments once again
18950     if test "x$arguments" != xEOL; then
18951       new_complete="$new_path ${arguments% *}"
18952     else
18953       new_complete="$new_path"
18954     fi
18955 
18956     if test "x$complete" != "x$new_complete"; then
18957       FOUND_MAKE="$new_complete"
18958       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18959 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18960     fi
18961   fi
18962 
18963         fi
18964       fi
18965     fi
18966   fi
18967 
18968         if test "x$FOUND_MAKE" = x; then
18969           for ac_prog in make
18970 do
18971   # Extract the first word of "$ac_prog", so it can be a program name with args.
18972 set dummy $ac_prog; ac_word=$2
18973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18974 $as_echo_n "checking for $ac_word... " >&6; }
18975 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18976   $as_echo_n "(cached) " >&6
18977 else
18978   case $CHECK_TOOLSDIR_MAKE in
18979   [\\/]* | ?:[\\/]*)
18980   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18981   ;;
18982   *)
18983   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18984 for as_dir in $PATH
18985 do
18986   IFS=$as_save_IFS
18987   test -z "$as_dir" && as_dir=.
18988     for ac_exec_ext in '' $ac_executable_extensions; do
18989   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18990     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18991     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18992     break 2
18993   fi
18994 done
18995   done
18996 IFS=$as_save_IFS
18997 
18998   ;;
18999 esac
19000 fi
19001 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19002 if test -n "$CHECK_TOOLSDIR_MAKE"; then
19003   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19004 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19005 else
19006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19007 $as_echo "no" >&6; }
19008 fi
19009 
19010 
19011   test -n "$CHECK_TOOLSDIR_MAKE" && break
19012 done
19013 
19014 
19015   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19016   DESCRIPTION="make in tools-dir"
19017 
19018   # On Cygwin, we require a newer version of make than on other platforms
19019   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19020     MAKE_VERSION_EXPR="-e 4\."
19021     MAKE_REQUIRED_VERSION="4.0"
19022    else
19023     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19024     MAKE_REQUIRED_VERSION="3.81"
19025   fi
19026 
19027   if test "x$MAKE_CANDIDATE" != x; then
19028     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19029 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19030     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19031     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19032     if test "x$IS_GNU_MAKE" = x; then
19033       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19034 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19035     else
19036       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19037       if test "x$IS_MODERN_MAKE" = x; then
19038         { $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
19039 $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;}
19040       else
19041         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19042           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19043             MAKE_EXPECTED_ENV='cygwin'
19044           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19045             MAKE_EXPECTED_ENV='msys'
19046           else
19047             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19048           fi
19049           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19050           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19051         else
19052           # Not relevant for non-Windows
19053           IS_MAKE_CORRECT_ENV=true
19054         fi
19055         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19056           { $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
19057 $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;}
19058         else
19059           FOUND_MAKE=$MAKE_CANDIDATE
19060 
19061   # Only process if variable expands to non-empty
19062 
19063   if test "x$FOUND_MAKE" != x; then
19064     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19065 
19066   # First separate the path from the arguments. This will split at the first
19067   # space.
19068   complete="$FOUND_MAKE"
19069   path="${complete%% *}"
19070   tmp="$complete EOL"
19071   arguments="${tmp#* }"
19072 
19073   # Input might be given as Windows format, start by converting to
19074   # unix format.
19075   new_path=`$CYGPATH -u "$path"`
19076 
19077   # Now try to locate executable using which
19078   new_path=`$WHICH "$new_path" 2> /dev/null`
19079   # bat and cmd files are not always considered executable in cygwin causing which
19080   # to not find them
19081   if test "x$new_path" = x \
19082       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19083       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19084     new_path=`$CYGPATH -u "$path"`
19085   fi
19086   if test "x$new_path" = x; then
19087     # Oops. Which didn't find the executable.
19088     # The splitting of arguments from the executable at a space might have been incorrect,
19089     # since paths with space are more likely in Windows. Give it another try with the whole
19090     # argument.
19091     path="$complete"
19092     arguments="EOL"
19093     new_path=`$CYGPATH -u "$path"`
19094     new_path=`$WHICH "$new_path" 2> /dev/null`
19095     # bat and cmd files are not always considered executable in cygwin causing which
19096     # to not find them
19097     if test "x$new_path" = x \
19098         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19099         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19100       new_path=`$CYGPATH -u "$path"`
19101     fi
19102     if test "x$new_path" = x; then
19103       # It's still not found. Now this is an unrecoverable error.
19104       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19105 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19106       has_space=`$ECHO "$complete" | $GREP " "`
19107       if test "x$has_space" != x; then
19108         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19109 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19110       fi
19111       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19112     fi
19113   fi
19114 
19115   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19116   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19117   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19118   # "foo.exe" is OK but "foo" is an error.
19119   #
19120   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19121   # It is also a way to make sure we got the proper file name for the real test later on.
19122   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19123   if test "x$test_shortpath" = x; then
19124     # Short path failed, file does not exist as specified.
19125     # Try adding .exe or .cmd
19126     if test -f "${new_path}.exe"; then
19127       input_to_shortpath="${new_path}.exe"
19128     elif test -f "${new_path}.cmd"; then
19129       input_to_shortpath="${new_path}.cmd"
19130     else
19131       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19132 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19133       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19134 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19135       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19136     fi
19137   else
19138     input_to_shortpath="$new_path"
19139   fi
19140 
19141   # Call helper function which possibly converts this using DOS-style short mode.
19142   # If so, the updated path is stored in $new_path.
19143   new_path="$input_to_shortpath"
19144 
19145   input_path="$input_to_shortpath"
19146   # Check if we need to convert this using DOS-style short mode. If the path
19147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19148   # take no chances and rewrite it.
19149   # Note: m4 eats our [], so we need to use [ and ] instead.
19150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19151   if test "x$has_forbidden_chars" != x; then
19152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19153     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19154     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19155     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19156       # Going to short mode and back again did indeed matter. Since short mode is
19157       # case insensitive, let's make it lowercase to improve readability.
19158       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19159       # Now convert it back to Unix-style (cygpath)
19160       input_path=`$CYGPATH -u "$shortmode_path"`
19161       new_path="$input_path"
19162     fi
19163   fi
19164 
19165   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19166   if test "x$test_cygdrive_prefix" = x; then
19167     # As a simple fix, exclude /usr/bin since it's not a real path.
19168     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19169       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19170       # a path prefixed by /cygdrive for fixpath to work.
19171       new_path="$CYGWIN_ROOT_PATH$input_path"
19172     fi
19173   fi
19174 
19175   # remove trailing .exe if any
19176   new_path="${new_path/%.exe/}"
19177 
19178     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19179 
19180   # First separate the path from the arguments. This will split at the first
19181   # space.
19182   complete="$FOUND_MAKE"
19183   path="${complete%% *}"
19184   tmp="$complete EOL"
19185   arguments="${tmp#* }"
19186 
19187   # Input might be given as Windows format, start by converting to
19188   # unix format.
19189   new_path="$path"
19190 
19191   windows_path="$new_path"
19192   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193     unix_path=`$CYGPATH -u "$windows_path"`
19194     new_path="$unix_path"
19195   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19196     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19197     new_path="$unix_path"
19198   fi
19199 
19200 
19201   # Now try to locate executable using which
19202   new_path=`$WHICH "$new_path" 2> /dev/null`
19203 
19204   if test "x$new_path" = x; then
19205     # Oops. Which didn't find the executable.
19206     # The splitting of arguments from the executable at a space might have been incorrect,
19207     # since paths with space are more likely in Windows. Give it another try with the whole
19208     # argument.
19209     path="$complete"
19210     arguments="EOL"
19211     new_path="$path"
19212 
19213   windows_path="$new_path"
19214   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19215     unix_path=`$CYGPATH -u "$windows_path"`
19216     new_path="$unix_path"
19217   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19218     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19219     new_path="$unix_path"
19220   fi
19221 
19222 
19223     new_path=`$WHICH "$new_path" 2> /dev/null`
19224     # bat and cmd files are not always considered executable in MSYS causing which
19225     # to not find them
19226     if test "x$new_path" = x \
19227         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19228         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19229       new_path="$path"
19230 
19231   windows_path="$new_path"
19232   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19233     unix_path=`$CYGPATH -u "$windows_path"`
19234     new_path="$unix_path"
19235   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19236     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19237     new_path="$unix_path"
19238   fi
19239 
19240     fi
19241 
19242     if test "x$new_path" = x; then
19243       # It's still not found. Now this is an unrecoverable error.
19244       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19245 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19246       has_space=`$ECHO "$complete" | $GREP " "`
19247       if test "x$has_space" != x; then
19248         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19249 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19250       fi
19251       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19252     fi
19253   fi
19254 
19255   # Now new_path has a complete unix path to the binary
19256   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19257     # Keep paths in /bin as-is, but remove trailing .exe if any
19258     new_path="${new_path/%.exe/}"
19259     # Do not save /bin paths to all_fixpath_prefixes!
19260   else
19261     # Not in mixed or Windows style, start by that.
19262     new_path=`cmd //c echo $new_path`
19263 
19264   input_path="$new_path"
19265   # Check if we need to convert this using DOS-style short mode. If the path
19266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19267   # take no chances and rewrite it.
19268   # Note: m4 eats our [], so we need to use [ and ] instead.
19269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19270   if test "x$has_forbidden_chars" != x; then
19271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19272     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19273   fi
19274 
19275     # Output is in $new_path
19276 
19277   windows_path="$new_path"
19278   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19279     unix_path=`$CYGPATH -u "$windows_path"`
19280     new_path="$unix_path"
19281   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19282     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19283     new_path="$unix_path"
19284   fi
19285 
19286     # remove trailing .exe if any
19287     new_path="${new_path/%.exe/}"
19288 
19289     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19290     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19291   fi
19292 
19293     else
19294       # We're on a unix platform. Hooray! :)
19295       # First separate the path from the arguments. This will split at the first
19296       # space.
19297       complete="$FOUND_MAKE"
19298       path="${complete%% *}"
19299       tmp="$complete EOL"
19300       arguments="${tmp#* }"
19301 
19302       # Cannot rely on the command "which" here since it doesn't always work.
19303       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19304       if test -z "$is_absolute_path"; then
19305         # Path to executable is not absolute. Find it.
19306         IFS_save="$IFS"
19307         IFS=:
19308         for p in $PATH; do
19309           if test -f "$p/$path" && test -x "$p/$path"; then
19310             new_path="$p/$path"
19311             break
19312           fi
19313         done
19314         IFS="$IFS_save"
19315       else
19316         # This is an absolute path, we can use it without further modifications.
19317         new_path="$path"
19318       fi
19319 
19320       if test "x$new_path" = x; then
19321         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19322 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19323         has_space=`$ECHO "$complete" | $GREP " "`
19324         if test "x$has_space" != x; then
19325           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19326 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19327         fi
19328         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19329       fi
19330     fi
19331 
19332     # Now join together the path and the arguments once again
19333     if test "x$arguments" != xEOL; then
19334       new_complete="$new_path ${arguments% *}"
19335     else
19336       new_complete="$new_path"
19337     fi
19338 
19339     if test "x$complete" != "x$new_complete"; then
19340       FOUND_MAKE="$new_complete"
19341       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19342 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19343     fi
19344   fi
19345 
19346         fi
19347       fi
19348     fi
19349   fi
19350 
19351         fi
19352         PATH=$OLD_PATH
19353       fi
19354     fi
19355 
19356     if test "x$FOUND_MAKE" = x; then
19357       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
19358     fi
19359 
19360   else
19361     # The variable is set, but is it from the command line or the environment?
19362 
19363     # Try to remove the string !MAKE! from our list.
19364     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19365     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19366       # If it failed, the variable was not from the command line. Ignore it,
19367       # but warn the user (except for BASH, which is always set by the calling BASH).
19368       if test "xMAKE" != xBASH; then
19369         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19370 $as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19371       fi
19372       # Try to locate tool using the code snippet
19373 
19374     # Try our hardest to locate a correct version of GNU make
19375     for ac_prog in gmake
19376 do
19377   # Extract the first word of "$ac_prog", so it can be a program name with args.
19378 set dummy $ac_prog; ac_word=$2
19379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19380 $as_echo_n "checking for $ac_word... " >&6; }
19381 if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19382   $as_echo_n "(cached) " >&6
19383 else
19384   case $CHECK_GMAKE in
19385   [\\/]* | ?:[\\/]*)
19386   ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19387   ;;
19388   *)
19389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19390 for as_dir in $PATH
19391 do
19392   IFS=$as_save_IFS
19393   test -z "$as_dir" && as_dir=.
19394     for ac_exec_ext in '' $ac_executable_extensions; do
19395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19396     ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19398     break 2
19399   fi
19400 done
19401   done
19402 IFS=$as_save_IFS
19403 
19404   ;;
19405 esac
19406 fi
19407 CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19408 if test -n "$CHECK_GMAKE"; then
19409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19410 $as_echo "$CHECK_GMAKE" >&6; }
19411 else
19412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19413 $as_echo "no" >&6; }
19414 fi
19415 
19416 
19417   test -n "$CHECK_GMAKE" && break
19418 done
19419 
19420 
19421   MAKE_CANDIDATE=""$CHECK_GMAKE""
19422   DESCRIPTION="gmake in PATH"
19423 
19424   # On Cygwin, we require a newer version of make than on other platforms
19425   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19426     MAKE_VERSION_EXPR="-e 4\."
19427     MAKE_REQUIRED_VERSION="4.0"
19428    else
19429     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19430     MAKE_REQUIRED_VERSION="3.81"
19431   fi
19432 
19433   if test "x$MAKE_CANDIDATE" != x; then
19434     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19435 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19436     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19437     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19438     if test "x$IS_GNU_MAKE" = x; then
19439       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19440 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19441     else
19442       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19443       if test "x$IS_MODERN_MAKE" = x; then
19444         { $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
19445 $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;}
19446       else
19447         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19448           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19449             MAKE_EXPECTED_ENV='cygwin'
19450           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19451             MAKE_EXPECTED_ENV='msys'
19452           else
19453             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19454           fi
19455           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19456           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19457         else
19458           # Not relevant for non-Windows
19459           IS_MAKE_CORRECT_ENV=true
19460         fi
19461         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19462           { $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
19463 $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;}
19464         else
19465           FOUND_MAKE=$MAKE_CANDIDATE
19466 
19467   # Only process if variable expands to non-empty
19468 
19469   if test "x$FOUND_MAKE" != x; then
19470     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19471 
19472   # First separate the path from the arguments. This will split at the first
19473   # space.
19474   complete="$FOUND_MAKE"
19475   path="${complete%% *}"
19476   tmp="$complete EOL"
19477   arguments="${tmp#* }"
19478 
19479   # Input might be given as Windows format, start by converting to
19480   # unix format.
19481   new_path=`$CYGPATH -u "$path"`
19482 
19483   # Now try to locate executable using which
19484   new_path=`$WHICH "$new_path" 2> /dev/null`
19485   # bat and cmd files are not always considered executable in cygwin causing which
19486   # to not find them
19487   if test "x$new_path" = x \
19488       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19489       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19490     new_path=`$CYGPATH -u "$path"`
19491   fi
19492   if test "x$new_path" = x; then
19493     # Oops. Which didn't find the executable.
19494     # The splitting of arguments from the executable at a space might have been incorrect,
19495     # since paths with space are more likely in Windows. Give it another try with the whole
19496     # argument.
19497     path="$complete"
19498     arguments="EOL"
19499     new_path=`$CYGPATH -u "$path"`
19500     new_path=`$WHICH "$new_path" 2> /dev/null`
19501     # bat and cmd files are not always considered executable in cygwin causing which
19502     # to not find them
19503     if test "x$new_path" = x \
19504         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19505         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19506       new_path=`$CYGPATH -u "$path"`
19507     fi
19508     if test "x$new_path" = x; then
19509       # It's still not found. Now this is an unrecoverable error.
19510       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19511 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19512       has_space=`$ECHO "$complete" | $GREP " "`
19513       if test "x$has_space" != x; then
19514         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19515 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19516       fi
19517       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19518     fi
19519   fi
19520 
19521   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19522   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19523   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19524   # "foo.exe" is OK but "foo" is an error.
19525   #
19526   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19527   # It is also a way to make sure we got the proper file name for the real test later on.
19528   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19529   if test "x$test_shortpath" = x; then
19530     # Short path failed, file does not exist as specified.
19531     # Try adding .exe or .cmd
19532     if test -f "${new_path}.exe"; then
19533       input_to_shortpath="${new_path}.exe"
19534     elif test -f "${new_path}.cmd"; then
19535       input_to_shortpath="${new_path}.cmd"
19536     else
19537       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19538 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19539       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19540 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19541       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19542     fi
19543   else
19544     input_to_shortpath="$new_path"
19545   fi
19546 
19547   # Call helper function which possibly converts this using DOS-style short mode.
19548   # If so, the updated path is stored in $new_path.
19549   new_path="$input_to_shortpath"
19550 
19551   input_path="$input_to_shortpath"
19552   # Check if we need to convert this using DOS-style short mode. If the path
19553   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19554   # take no chances and rewrite it.
19555   # Note: m4 eats our [], so we need to use [ and ] instead.
19556   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19557   if test "x$has_forbidden_chars" != x; then
19558     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19559     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19560     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19561     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19562       # Going to short mode and back again did indeed matter. Since short mode is
19563       # case insensitive, let's make it lowercase to improve readability.
19564       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19565       # Now convert it back to Unix-style (cygpath)
19566       input_path=`$CYGPATH -u "$shortmode_path"`
19567       new_path="$input_path"
19568     fi
19569   fi
19570 
19571   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19572   if test "x$test_cygdrive_prefix" = x; then
19573     # As a simple fix, exclude /usr/bin since it's not a real path.
19574     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19575       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19576       # a path prefixed by /cygdrive for fixpath to work.
19577       new_path="$CYGWIN_ROOT_PATH$input_path"
19578     fi
19579   fi
19580 
19581   # remove trailing .exe if any
19582   new_path="${new_path/%.exe/}"
19583 
19584     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19585 
19586   # First separate the path from the arguments. This will split at the first
19587   # space.
19588   complete="$FOUND_MAKE"
19589   path="${complete%% *}"
19590   tmp="$complete EOL"
19591   arguments="${tmp#* }"
19592 
19593   # Input might be given as Windows format, start by converting to
19594   # unix format.
19595   new_path="$path"
19596 
19597   windows_path="$new_path"
19598   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19599     unix_path=`$CYGPATH -u "$windows_path"`
19600     new_path="$unix_path"
19601   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19602     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19603     new_path="$unix_path"
19604   fi
19605 
19606 
19607   # Now try to locate executable using which
19608   new_path=`$WHICH "$new_path" 2> /dev/null`
19609 
19610   if test "x$new_path" = x; then
19611     # Oops. Which didn't find the executable.
19612     # The splitting of arguments from the executable at a space might have been incorrect,
19613     # since paths with space are more likely in Windows. Give it another try with the whole
19614     # argument.
19615     path="$complete"
19616     arguments="EOL"
19617     new_path="$path"
19618 
19619   windows_path="$new_path"
19620   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19621     unix_path=`$CYGPATH -u "$windows_path"`
19622     new_path="$unix_path"
19623   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19624     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19625     new_path="$unix_path"
19626   fi
19627 
19628 
19629     new_path=`$WHICH "$new_path" 2> /dev/null`
19630     # bat and cmd files are not always considered executable in MSYS causing which
19631     # to not find them
19632     if test "x$new_path" = x \
19633         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19634         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19635       new_path="$path"
19636 
19637   windows_path="$new_path"
19638   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19639     unix_path=`$CYGPATH -u "$windows_path"`
19640     new_path="$unix_path"
19641   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19642     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19643     new_path="$unix_path"
19644   fi
19645 
19646     fi
19647 
19648     if test "x$new_path" = x; then
19649       # It's still not found. Now this is an unrecoverable error.
19650       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19651 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19652       has_space=`$ECHO "$complete" | $GREP " "`
19653       if test "x$has_space" != x; then
19654         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19655 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19656       fi
19657       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19658     fi
19659   fi
19660 
19661   # Now new_path has a complete unix path to the binary
19662   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19663     # Keep paths in /bin as-is, but remove trailing .exe if any
19664     new_path="${new_path/%.exe/}"
19665     # Do not save /bin paths to all_fixpath_prefixes!
19666   else
19667     # Not in mixed or Windows style, start by that.
19668     new_path=`cmd //c echo $new_path`
19669 
19670   input_path="$new_path"
19671   # Check if we need to convert this using DOS-style short mode. If the path
19672   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19673   # take no chances and rewrite it.
19674   # Note: m4 eats our [], so we need to use [ and ] instead.
19675   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19676   if test "x$has_forbidden_chars" != x; then
19677     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19678     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19679   fi
19680 
19681     # Output is in $new_path
19682 
19683   windows_path="$new_path"
19684   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19685     unix_path=`$CYGPATH -u "$windows_path"`
19686     new_path="$unix_path"
19687   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19688     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19689     new_path="$unix_path"
19690   fi
19691 
19692     # remove trailing .exe if any
19693     new_path="${new_path/%.exe/}"
19694 
19695     # Save the first 10 bytes of this path to the storage, so fixpath can work.
19696     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19697   fi
19698 
19699     else
19700       # We're on a unix platform. Hooray! :)
19701       # First separate the path from the arguments. This will split at the first
19702       # space.
19703       complete="$FOUND_MAKE"
19704       path="${complete%% *}"
19705       tmp="$complete EOL"
19706       arguments="${tmp#* }"
19707 
19708       # Cannot rely on the command "which" here since it doesn't always work.
19709       is_absolute_path=`$ECHO "$path" | $GREP ^/`
19710       if test -z "$is_absolute_path"; then
19711         # Path to executable is not absolute. Find it.
19712         IFS_save="$IFS"
19713         IFS=:
19714         for p in $PATH; do
19715           if test -f "$p/$path" && test -x "$p/$path"; then
19716             new_path="$p/$path"
19717             break
19718           fi
19719         done
19720         IFS="$IFS_save"
19721       else
19722         # This is an absolute path, we can use it without further modifications.
19723         new_path="$path"
19724       fi
19725 
19726       if test "x$new_path" = x; then
19727         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19728 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19729         has_space=`$ECHO "$complete" | $GREP " "`
19730         if test "x$has_space" != x; then
19731           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19732 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19733         fi
19734         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19735       fi
19736     fi
19737 
19738     # Now join together the path and the arguments once again
19739     if test "x$arguments" != xEOL; then
19740       new_complete="$new_path ${arguments% *}"
19741     else
19742       new_complete="$new_path"
19743     fi
19744 
19745     if test "x$complete" != "x$new_complete"; then
19746       FOUND_MAKE="$new_complete"
19747       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19748 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19749     fi
19750   fi
19751 
19752         fi
19753       fi
19754     fi
19755   fi
19756 
19757 
19758     if test "x$FOUND_MAKE" = x; then
19759       for ac_prog in make
19760 do
19761   # Extract the first word of "$ac_prog", so it can be a program name with args.
19762 set dummy $ac_prog; ac_word=$2
19763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19764 $as_echo_n "checking for $ac_word... " >&6; }
19765 if ${ac_cv_path_CHECK_MAKE+:} false; then :
19766   $as_echo_n "(cached) " >&6
19767 else
19768   case $CHECK_MAKE in
19769   [\\/]* | ?:[\\/]*)
19770   ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19771   ;;
19772   *)
19773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19774 for as_dir in $PATH
19775 do
19776   IFS=$as_save_IFS
19777   test -z "$as_dir" && as_dir=.
19778     for ac_exec_ext in '' $ac_executable_extensions; do
19779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19780     ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19782     break 2
19783   fi
19784 done
19785   done
19786 IFS=$as_save_IFS
19787 
19788   ;;
19789 esac
19790 fi
19791 CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19792 if test -n "$CHECK_MAKE"; then
19793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19794 $as_echo "$CHECK_MAKE" >&6; }
19795 else
19796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19797 $as_echo "no" >&6; }
19798 fi
19799 
19800 
19801   test -n "$CHECK_MAKE" && break
19802 done
19803 
19804 
19805   MAKE_CANDIDATE=""$CHECK_MAKE""
19806   DESCRIPTION="make in PATH"
19807 
19808   # On Cygwin, we require a newer version of make than on other platforms
19809   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19810     MAKE_VERSION_EXPR="-e 4\."
19811     MAKE_REQUIRED_VERSION="4.0"
19812    else
19813     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19814     MAKE_REQUIRED_VERSION="3.81"
19815   fi
19816 
19817   if test "x$MAKE_CANDIDATE" != x; then
19818     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19819 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19820     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19821     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19822     if test "x$IS_GNU_MAKE" = x; then
19823       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19824 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19825     else
19826       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19827       if test "x$IS_MODERN_MAKE" = x; then
19828         { $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
19829 $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;}
19830       else
19831         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19832           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19833             MAKE_EXPECTED_ENV='cygwin'
19834           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19835             MAKE_EXPECTED_ENV='msys'
19836           else
19837             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19838           fi
19839           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19840           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19841         else
19842           # Not relevant for non-Windows
19843           IS_MAKE_CORRECT_ENV=true
19844         fi
19845         if test "x$IS_MAKE_CORRECT_ENV" = x; then
19846           { $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
19847 $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;}
19848         else
19849           FOUND_MAKE=$MAKE_CANDIDATE
19850 
19851   # Only process if variable expands to non-empty
19852 
19853   if test "x$FOUND_MAKE" != x; then
19854     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19855 
19856   # First separate the path from the arguments. This will split at the first
19857   # space.
19858   complete="$FOUND_MAKE"
19859   path="${complete%% *}"
19860   tmp="$complete EOL"
19861   arguments="${tmp#* }"
19862 
19863   # Input might be given as Windows format, start by converting to
19864   # unix format.
19865   new_path=`$CYGPATH -u "$path"`
19866 
19867   # Now try to locate executable using which
19868   new_path=`$WHICH "$new_path" 2> /dev/null`
19869   # bat and cmd files are not always considered executable in cygwin causing which
19870   # to not find them
19871   if test "x$new_path" = x \
19872       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19873       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19874     new_path=`$CYGPATH -u "$path"`
19875   fi
19876   if test "x$new_path" = x; then
19877     # Oops. Which didn't find the executable.
19878     # The splitting of arguments from the executable at a space might have been incorrect,
19879     # since paths with space are more likely in Windows. Give it another try with the whole
19880     # argument.
19881     path="$complete"
19882     arguments="EOL"
19883     new_path=`$CYGPATH -u "$path"`
19884     new_path=`$WHICH "$new_path" 2> /dev/null`
19885     # bat and cmd files are not always considered executable in cygwin causing which
19886     # to not find them
19887     if test "x$new_path" = x \
19888         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19889         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19890       new_path=`$CYGPATH -u "$path"`
19891     fi
19892     if test "x$new_path" = x; then
19893       # It's still not found. Now this is an unrecoverable error.
19894       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19895 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19896       has_space=`$ECHO "$complete" | $GREP " "`
19897       if test "x$has_space" != x; then
19898         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19899 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19900       fi
19901       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19902     fi
19903   fi
19904 
19905   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19906   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19907   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19908   # "foo.exe" is OK but "foo" is an error.
19909   #
19910   # This test is therefore slightly more accurate than "test -f" to check for file presence.
19911   # It is also a way to make sure we got the proper file name for the real test later on.
19912   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19913   if test "x$test_shortpath" = x; then
19914     # Short path failed, file does not exist as specified.
19915     # Try adding .exe or .cmd
19916     if test -f "${new_path}.exe"; then
19917       input_to_shortpath="${new_path}.exe"
19918     elif test -f "${new_path}.cmd"; then
19919       input_to_shortpath="${new_path}.cmd"
19920     else
19921       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19922 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19923       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19924 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19925       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19926     fi
19927   else
19928     input_to_shortpath="$new_path"
19929   fi
19930 
19931   # Call helper function which possibly converts this using DOS-style short mode.
19932   # If so, the updated path is stored in $new_path.
19933   new_path="$input_to_shortpath"
19934 
19935   input_path="$input_to_shortpath"
19936   # Check if we need to convert this using DOS-style short mode. If the path
19937   # contains just simple characters, use it. Otherwise (spaces, weird characters),
19938   # take no chances and rewrite it.
19939   # Note: m4 eats our [], so we need to use [ and ] instead.
19940   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19941   if test "x$has_forbidden_chars" != x; then
19942     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19943     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19944     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19945     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19946       # Going to short mode and back again did indeed matter. Since short mode is
19947       # case insensitive, let's make it lowercase to improve readability.
19948       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19949       # Now convert it back to Unix-style (cygpath)
19950       input_path=`$CYGPATH -u "$shortmode_path"`
19951       new_path="$input_path"
19952     fi
19953   fi
19954 
19955   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19956   if test "x$test_cygdrive_prefix" = x; then
19957     # As a simple fix, exclude /usr/bin since it's not a real path.
19958     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19959       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19960       # a path prefixed by /cygdrive for fixpath to work.
19961       new_path="$CYGWIN_ROOT_PATH$input_path"
19962     fi
19963   fi
19964 
19965   # remove trailing .exe if any
19966   new_path="${new_path/%.exe/}"
19967 
19968     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19969 
19970   # First separate the path from the arguments. This will split at the first
19971   # space.
19972   complete="$FOUND_MAKE"
19973   path="${complete%% *}"
19974   tmp="$complete EOL"
19975   arguments="${tmp#* }"
19976 
19977   # Input might be given as Windows format, start by converting to
19978   # unix format.
19979   new_path="$path"
19980 
19981   windows_path="$new_path"
19982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19983     unix_path=`$CYGPATH -u "$windows_path"`
19984     new_path="$unix_path"
19985   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19986     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19987     new_path="$unix_path"
19988   fi
19989 
19990 
19991   # Now try to locate executable using which
19992   new_path=`$WHICH "$new_path" 2> /dev/null`
19993 
19994   if test "x$new_path" = x; then
19995     # Oops. Which didn't find the executable.
19996     # The splitting of arguments from the executable at a space might have been incorrect,
19997     # since paths with space are more likely in Windows. Give it another try with the whole
19998     # argument.
19999     path="$complete"
20000     arguments="EOL"
20001     new_path="$path"
20002 
20003   windows_path="$new_path"
20004   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20005     unix_path=`$CYGPATH -u "$windows_path"`
20006     new_path="$unix_path"
20007   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20008     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20009     new_path="$unix_path"
20010   fi
20011 
20012 
20013     new_path=`$WHICH "$new_path" 2> /dev/null`
20014     # bat and cmd files are not always considered executable in MSYS causing which
20015     # to not find them
20016     if test "x$new_path" = x \
20017         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20018         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20019       new_path="$path"
20020 
20021   windows_path="$new_path"
20022   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20023     unix_path=`$CYGPATH -u "$windows_path"`
20024     new_path="$unix_path"
20025   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20026     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20027     new_path="$unix_path"
20028   fi
20029 
20030     fi
20031 
20032     if test "x$new_path" = x; then
20033       # It's still not found. Now this is an unrecoverable error.
20034       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20035 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20036       has_space=`$ECHO "$complete" | $GREP " "`
20037       if test "x$has_space" != x; then
20038         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20039 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20040       fi
20041       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20042     fi
20043   fi
20044 
20045   # Now new_path has a complete unix path to the binary
20046   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20047     # Keep paths in /bin as-is, but remove trailing .exe if any
20048     new_path="${new_path/%.exe/}"
20049     # Do not save /bin paths to all_fixpath_prefixes!
20050   else
20051     # Not in mixed or Windows style, start by that.
20052     new_path=`cmd //c echo $new_path`
20053 
20054   input_path="$new_path"
20055   # Check if we need to convert this using DOS-style short mode. If the path
20056   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20057   # take no chances and rewrite it.
20058   # Note: m4 eats our [], so we need to use [ and ] instead.
20059   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20060   if test "x$has_forbidden_chars" != x; then
20061     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20062     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20063   fi
20064 
20065     # Output is in $new_path
20066 
20067   windows_path="$new_path"
20068   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20069     unix_path=`$CYGPATH -u "$windows_path"`
20070     new_path="$unix_path"
20071   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20072     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20073     new_path="$unix_path"
20074   fi
20075 
20076     # remove trailing .exe if any
20077     new_path="${new_path/%.exe/}"
20078 
20079     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20080     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20081   fi
20082 
20083     else
20084       # We're on a unix platform. Hooray! :)
20085       # First separate the path from the arguments. This will split at the first
20086       # space.
20087       complete="$FOUND_MAKE"
20088       path="${complete%% *}"
20089       tmp="$complete EOL"
20090       arguments="${tmp#* }"
20091 
20092       # Cannot rely on the command "which" here since it doesn't always work.
20093       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20094       if test -z "$is_absolute_path"; then
20095         # Path to executable is not absolute. Find it.
20096         IFS_save="$IFS"
20097         IFS=:
20098         for p in $PATH; do
20099           if test -f "$p/$path" && test -x "$p/$path"; then
20100             new_path="$p/$path"
20101             break
20102           fi
20103         done
20104         IFS="$IFS_save"
20105       else
20106         # This is an absolute path, we can use it without further modifications.
20107         new_path="$path"
20108       fi
20109 
20110       if test "x$new_path" = x; then
20111         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20112 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20113         has_space=`$ECHO "$complete" | $GREP " "`
20114         if test "x$has_space" != x; then
20115           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20116 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20117         fi
20118         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20119       fi
20120     fi
20121 
20122     # Now join together the path and the arguments once again
20123     if test "x$arguments" != xEOL; then
20124       new_complete="$new_path ${arguments% *}"
20125     else
20126       new_complete="$new_path"
20127     fi
20128 
20129     if test "x$complete" != "x$new_complete"; then
20130       FOUND_MAKE="$new_complete"
20131       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20132 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20133     fi
20134   fi
20135 
20136         fi
20137       fi
20138     fi
20139   fi
20140 
20141     fi
20142 
20143     if test "x$FOUND_MAKE" = x; then
20144       if test "x$TOOLCHAIN_PATH" != x; then
20145         # We have a toolchain path, check that as well before giving up.
20146         OLD_PATH=$PATH
20147         PATH=$TOOLCHAIN_PATH:$PATH
20148         for ac_prog in gmake
20149 do
20150   # Extract the first word of "$ac_prog", so it can be a program name with args.
20151 set dummy $ac_prog; ac_word=$2
20152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20153 $as_echo_n "checking for $ac_word... " >&6; }
20154 if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20155   $as_echo_n "(cached) " >&6
20156 else
20157   case $CHECK_TOOLSDIR_GMAKE in
20158   [\\/]* | ?:[\\/]*)
20159   ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20160   ;;
20161   *)
20162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20163 for as_dir in $PATH
20164 do
20165   IFS=$as_save_IFS
20166   test -z "$as_dir" && as_dir=.
20167     for ac_exec_ext in '' $ac_executable_extensions; do
20168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20169     ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20171     break 2
20172   fi
20173 done
20174   done
20175 IFS=$as_save_IFS
20176 
20177   ;;
20178 esac
20179 fi
20180 CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20181 if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20183 $as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20184 else
20185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20186 $as_echo "no" >&6; }
20187 fi
20188 
20189 
20190   test -n "$CHECK_TOOLSDIR_GMAKE" && break
20191 done
20192 
20193 
20194   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20195   DESCRIPTION="gmake in tools-dir"
20196 
20197   # On Cygwin, we require a newer version of make than on other platforms
20198   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20199     MAKE_VERSION_EXPR="-e 4\."
20200     MAKE_REQUIRED_VERSION="4.0"
20201    else
20202     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20203     MAKE_REQUIRED_VERSION="3.81"
20204   fi
20205 
20206   if test "x$MAKE_CANDIDATE" != x; then
20207     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20208 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20209     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20210     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20211     if test "x$IS_GNU_MAKE" = x; then
20212       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20213 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20214     else
20215       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20216       if test "x$IS_MODERN_MAKE" = x; then
20217         { $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
20218 $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;}
20219       else
20220         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20221           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20222             MAKE_EXPECTED_ENV='cygwin'
20223           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20224             MAKE_EXPECTED_ENV='msys'
20225           else
20226             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20227           fi
20228           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20229           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20230         else
20231           # Not relevant for non-Windows
20232           IS_MAKE_CORRECT_ENV=true
20233         fi
20234         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20235           { $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
20236 $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;}
20237         else
20238           FOUND_MAKE=$MAKE_CANDIDATE
20239 
20240   # Only process if variable expands to non-empty
20241 
20242   if test "x$FOUND_MAKE" != x; then
20243     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20244 
20245   # First separate the path from the arguments. This will split at the first
20246   # space.
20247   complete="$FOUND_MAKE"
20248   path="${complete%% *}"
20249   tmp="$complete EOL"
20250   arguments="${tmp#* }"
20251 
20252   # Input might be given as Windows format, start by converting to
20253   # unix format.
20254   new_path=`$CYGPATH -u "$path"`
20255 
20256   # Now try to locate executable using which
20257   new_path=`$WHICH "$new_path" 2> /dev/null`
20258   # bat and cmd files are not always considered executable in cygwin causing which
20259   # to not find them
20260   if test "x$new_path" = x \
20261       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20262       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20263     new_path=`$CYGPATH -u "$path"`
20264   fi
20265   if test "x$new_path" = x; then
20266     # Oops. Which didn't find the executable.
20267     # The splitting of arguments from the executable at a space might have been incorrect,
20268     # since paths with space are more likely in Windows. Give it another try with the whole
20269     # argument.
20270     path="$complete"
20271     arguments="EOL"
20272     new_path=`$CYGPATH -u "$path"`
20273     new_path=`$WHICH "$new_path" 2> /dev/null`
20274     # bat and cmd files are not always considered executable in cygwin causing which
20275     # to not find them
20276     if test "x$new_path" = x \
20277         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20278         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20279       new_path=`$CYGPATH -u "$path"`
20280     fi
20281     if test "x$new_path" = x; then
20282       # It's still not found. Now this is an unrecoverable error.
20283       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20284 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20285       has_space=`$ECHO "$complete" | $GREP " "`
20286       if test "x$has_space" != x; then
20287         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20288 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20289       fi
20290       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20291     fi
20292   fi
20293 
20294   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20295   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20296   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20297   # "foo.exe" is OK but "foo" is an error.
20298   #
20299   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20300   # It is also a way to make sure we got the proper file name for the real test later on.
20301   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20302   if test "x$test_shortpath" = x; then
20303     # Short path failed, file does not exist as specified.
20304     # Try adding .exe or .cmd
20305     if test -f "${new_path}.exe"; then
20306       input_to_shortpath="${new_path}.exe"
20307     elif test -f "${new_path}.cmd"; then
20308       input_to_shortpath="${new_path}.cmd"
20309     else
20310       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20311 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20312       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20313 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20314       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20315     fi
20316   else
20317     input_to_shortpath="$new_path"
20318   fi
20319 
20320   # Call helper function which possibly converts this using DOS-style short mode.
20321   # If so, the updated path is stored in $new_path.
20322   new_path="$input_to_shortpath"
20323 
20324   input_path="$input_to_shortpath"
20325   # Check if we need to convert this using DOS-style short mode. If the path
20326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20327   # take no chances and rewrite it.
20328   # Note: m4 eats our [], so we need to use [ and ] instead.
20329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20330   if test "x$has_forbidden_chars" != x; then
20331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20332     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20333     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20334     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20335       # Going to short mode and back again did indeed matter. Since short mode is
20336       # case insensitive, let's make it lowercase to improve readability.
20337       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20338       # Now convert it back to Unix-style (cygpath)
20339       input_path=`$CYGPATH -u "$shortmode_path"`
20340       new_path="$input_path"
20341     fi
20342   fi
20343 
20344   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20345   if test "x$test_cygdrive_prefix" = x; then
20346     # As a simple fix, exclude /usr/bin since it's not a real path.
20347     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20348       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20349       # a path prefixed by /cygdrive for fixpath to work.
20350       new_path="$CYGWIN_ROOT_PATH$input_path"
20351     fi
20352   fi
20353 
20354   # remove trailing .exe if any
20355   new_path="${new_path/%.exe/}"
20356 
20357     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20358 
20359   # First separate the path from the arguments. This will split at the first
20360   # space.
20361   complete="$FOUND_MAKE"
20362   path="${complete%% *}"
20363   tmp="$complete EOL"
20364   arguments="${tmp#* }"
20365 
20366   # Input might be given as Windows format, start by converting to
20367   # unix format.
20368   new_path="$path"
20369 
20370   windows_path="$new_path"
20371   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20372     unix_path=`$CYGPATH -u "$windows_path"`
20373     new_path="$unix_path"
20374   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20375     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20376     new_path="$unix_path"
20377   fi
20378 
20379 
20380   # Now try to locate executable using which
20381   new_path=`$WHICH "$new_path" 2> /dev/null`
20382 
20383   if test "x$new_path" = x; then
20384     # Oops. Which didn't find the executable.
20385     # The splitting of arguments from the executable at a space might have been incorrect,
20386     # since paths with space are more likely in Windows. Give it another try with the whole
20387     # argument.
20388     path="$complete"
20389     arguments="EOL"
20390     new_path="$path"
20391 
20392   windows_path="$new_path"
20393   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20394     unix_path=`$CYGPATH -u "$windows_path"`
20395     new_path="$unix_path"
20396   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20397     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20398     new_path="$unix_path"
20399   fi
20400 
20401 
20402     new_path=`$WHICH "$new_path" 2> /dev/null`
20403     # bat and cmd files are not always considered executable in MSYS causing which
20404     # to not find them
20405     if test "x$new_path" = x \
20406         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20407         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20408       new_path="$path"
20409 
20410   windows_path="$new_path"
20411   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20412     unix_path=`$CYGPATH -u "$windows_path"`
20413     new_path="$unix_path"
20414   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20415     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20416     new_path="$unix_path"
20417   fi
20418 
20419     fi
20420 
20421     if test "x$new_path" = x; then
20422       # It's still not found. Now this is an unrecoverable error.
20423       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20424 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20425       has_space=`$ECHO "$complete" | $GREP " "`
20426       if test "x$has_space" != x; then
20427         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20428 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20429       fi
20430       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20431     fi
20432   fi
20433 
20434   # Now new_path has a complete unix path to the binary
20435   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20436     # Keep paths in /bin as-is, but remove trailing .exe if any
20437     new_path="${new_path/%.exe/}"
20438     # Do not save /bin paths to all_fixpath_prefixes!
20439   else
20440     # Not in mixed or Windows style, start by that.
20441     new_path=`cmd //c echo $new_path`
20442 
20443   input_path="$new_path"
20444   # Check if we need to convert this using DOS-style short mode. If the path
20445   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20446   # take no chances and rewrite it.
20447   # Note: m4 eats our [], so we need to use [ and ] instead.
20448   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20449   if test "x$has_forbidden_chars" != x; then
20450     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20451     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20452   fi
20453 
20454     # Output is in $new_path
20455 
20456   windows_path="$new_path"
20457   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20458     unix_path=`$CYGPATH -u "$windows_path"`
20459     new_path="$unix_path"
20460   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20461     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20462     new_path="$unix_path"
20463   fi
20464 
20465     # remove trailing .exe if any
20466     new_path="${new_path/%.exe/}"
20467 
20468     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20469     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20470   fi
20471 
20472     else
20473       # We're on a unix platform. Hooray! :)
20474       # First separate the path from the arguments. This will split at the first
20475       # space.
20476       complete="$FOUND_MAKE"
20477       path="${complete%% *}"
20478       tmp="$complete EOL"
20479       arguments="${tmp#* }"
20480 
20481       # Cannot rely on the command "which" here since it doesn't always work.
20482       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20483       if test -z "$is_absolute_path"; then
20484         # Path to executable is not absolute. Find it.
20485         IFS_save="$IFS"
20486         IFS=:
20487         for p in $PATH; do
20488           if test -f "$p/$path" && test -x "$p/$path"; then
20489             new_path="$p/$path"
20490             break
20491           fi
20492         done
20493         IFS="$IFS_save"
20494       else
20495         # This is an absolute path, we can use it without further modifications.
20496         new_path="$path"
20497       fi
20498 
20499       if test "x$new_path" = x; then
20500         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20501 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20502         has_space=`$ECHO "$complete" | $GREP " "`
20503         if test "x$has_space" != x; then
20504           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20505 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20506         fi
20507         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20508       fi
20509     fi
20510 
20511     # Now join together the path and the arguments once again
20512     if test "x$arguments" != xEOL; then
20513       new_complete="$new_path ${arguments% *}"
20514     else
20515       new_complete="$new_path"
20516     fi
20517 
20518     if test "x$complete" != "x$new_complete"; then
20519       FOUND_MAKE="$new_complete"
20520       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20521 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20522     fi
20523   fi
20524 
20525         fi
20526       fi
20527     fi
20528   fi
20529 
20530         if test "x$FOUND_MAKE" = x; then
20531           for ac_prog in make
20532 do
20533   # Extract the first word of "$ac_prog", so it can be a program name with args.
20534 set dummy $ac_prog; ac_word=$2
20535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20536 $as_echo_n "checking for $ac_word... " >&6; }
20537 if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20538   $as_echo_n "(cached) " >&6
20539 else
20540   case $CHECK_TOOLSDIR_MAKE in
20541   [\\/]* | ?:[\\/]*)
20542   ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20543   ;;
20544   *)
20545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20546 for as_dir in $PATH
20547 do
20548   IFS=$as_save_IFS
20549   test -z "$as_dir" && as_dir=.
20550     for ac_exec_ext in '' $ac_executable_extensions; do
20551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20552     ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20554     break 2
20555   fi
20556 done
20557   done
20558 IFS=$as_save_IFS
20559 
20560   ;;
20561 esac
20562 fi
20563 CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20564 if test -n "$CHECK_TOOLSDIR_MAKE"; then
20565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20566 $as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20567 else
20568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20569 $as_echo "no" >&6; }
20570 fi
20571 
20572 
20573   test -n "$CHECK_TOOLSDIR_MAKE" && break
20574 done
20575 
20576 
20577   MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20578   DESCRIPTION="make in tools-dir"
20579 
20580   # On Cygwin, we require a newer version of make than on other platforms
20581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20582     MAKE_VERSION_EXPR="-e 4\."
20583     MAKE_REQUIRED_VERSION="4.0"
20584    else
20585     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20586     MAKE_REQUIRED_VERSION="3.81"
20587   fi
20588 
20589   if test "x$MAKE_CANDIDATE" != x; then
20590     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20591 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20592     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20593     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20594     if test "x$IS_GNU_MAKE" = x; then
20595       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20596 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20597     else
20598       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20599       if test "x$IS_MODERN_MAKE" = x; then
20600         { $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
20601 $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;}
20602       else
20603         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20604           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20605             MAKE_EXPECTED_ENV='cygwin'
20606           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20607             MAKE_EXPECTED_ENV='msys'
20608           else
20609             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20610           fi
20611           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20612           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20613         else
20614           # Not relevant for non-Windows
20615           IS_MAKE_CORRECT_ENV=true
20616         fi
20617         if test "x$IS_MAKE_CORRECT_ENV" = x; then
20618           { $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
20619 $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;}
20620         else
20621           FOUND_MAKE=$MAKE_CANDIDATE
20622 
20623   # Only process if variable expands to non-empty
20624 
20625   if test "x$FOUND_MAKE" != x; then
20626     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20627 
20628   # First separate the path from the arguments. This will split at the first
20629   # space.
20630   complete="$FOUND_MAKE"
20631   path="${complete%% *}"
20632   tmp="$complete EOL"
20633   arguments="${tmp#* }"
20634 
20635   # Input might be given as Windows format, start by converting to
20636   # unix format.
20637   new_path=`$CYGPATH -u "$path"`
20638 
20639   # Now try to locate executable using which
20640   new_path=`$WHICH "$new_path" 2> /dev/null`
20641   # bat and cmd files are not always considered executable in cygwin causing which
20642   # to not find them
20643   if test "x$new_path" = x \
20644       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20645       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20646     new_path=`$CYGPATH -u "$path"`
20647   fi
20648   if test "x$new_path" = x; then
20649     # Oops. Which didn't find the executable.
20650     # The splitting of arguments from the executable at a space might have been incorrect,
20651     # since paths with space are more likely in Windows. Give it another try with the whole
20652     # argument.
20653     path="$complete"
20654     arguments="EOL"
20655     new_path=`$CYGPATH -u "$path"`
20656     new_path=`$WHICH "$new_path" 2> /dev/null`
20657     # bat and cmd files are not always considered executable in cygwin causing which
20658     # to not find them
20659     if test "x$new_path" = x \
20660         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20661         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20662       new_path=`$CYGPATH -u "$path"`
20663     fi
20664     if test "x$new_path" = x; then
20665       # It's still not found. Now this is an unrecoverable error.
20666       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20667 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20668       has_space=`$ECHO "$complete" | $GREP " "`
20669       if test "x$has_space" != x; then
20670         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20671 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20672       fi
20673       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20674     fi
20675   fi
20676 
20677   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20678   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20679   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20680   # "foo.exe" is OK but "foo" is an error.
20681   #
20682   # This test is therefore slightly more accurate than "test -f" to check for file presence.
20683   # It is also a way to make sure we got the proper file name for the real test later on.
20684   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20685   if test "x$test_shortpath" = x; then
20686     # Short path failed, file does not exist as specified.
20687     # Try adding .exe or .cmd
20688     if test -f "${new_path}.exe"; then
20689       input_to_shortpath="${new_path}.exe"
20690     elif test -f "${new_path}.cmd"; then
20691       input_to_shortpath="${new_path}.cmd"
20692     else
20693       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20694 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20695       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20696 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20697       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20698     fi
20699   else
20700     input_to_shortpath="$new_path"
20701   fi
20702 
20703   # Call helper function which possibly converts this using DOS-style short mode.
20704   # If so, the updated path is stored in $new_path.
20705   new_path="$input_to_shortpath"
20706 
20707   input_path="$input_to_shortpath"
20708   # Check if we need to convert this using DOS-style short mode. If the path
20709   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20710   # take no chances and rewrite it.
20711   # Note: m4 eats our [], so we need to use [ and ] instead.
20712   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20713   if test "x$has_forbidden_chars" != x; then
20714     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20715     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20716     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20717     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20718       # Going to short mode and back again did indeed matter. Since short mode is
20719       # case insensitive, let's make it lowercase to improve readability.
20720       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20721       # Now convert it back to Unix-style (cygpath)
20722       input_path=`$CYGPATH -u "$shortmode_path"`
20723       new_path="$input_path"
20724     fi
20725   fi
20726 
20727   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20728   if test "x$test_cygdrive_prefix" = x; then
20729     # As a simple fix, exclude /usr/bin since it's not a real path.
20730     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20731       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20732       # a path prefixed by /cygdrive for fixpath to work.
20733       new_path="$CYGWIN_ROOT_PATH$input_path"
20734     fi
20735   fi
20736 
20737   # remove trailing .exe if any
20738   new_path="${new_path/%.exe/}"
20739 
20740     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20741 
20742   # First separate the path from the arguments. This will split at the first
20743   # space.
20744   complete="$FOUND_MAKE"
20745   path="${complete%% *}"
20746   tmp="$complete EOL"
20747   arguments="${tmp#* }"
20748 
20749   # Input might be given as Windows format, start by converting to
20750   # unix format.
20751   new_path="$path"
20752 
20753   windows_path="$new_path"
20754   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20755     unix_path=`$CYGPATH -u "$windows_path"`
20756     new_path="$unix_path"
20757   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20759     new_path="$unix_path"
20760   fi
20761 
20762 
20763   # Now try to locate executable using which
20764   new_path=`$WHICH "$new_path" 2> /dev/null`
20765 
20766   if test "x$new_path" = x; then
20767     # Oops. Which didn't find the executable.
20768     # The splitting of arguments from the executable at a space might have been incorrect,
20769     # since paths with space are more likely in Windows. Give it another try with the whole
20770     # argument.
20771     path="$complete"
20772     arguments="EOL"
20773     new_path="$path"
20774 
20775   windows_path="$new_path"
20776   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20777     unix_path=`$CYGPATH -u "$windows_path"`
20778     new_path="$unix_path"
20779   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20780     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20781     new_path="$unix_path"
20782   fi
20783 
20784 
20785     new_path=`$WHICH "$new_path" 2> /dev/null`
20786     # bat and cmd files are not always considered executable in MSYS causing which
20787     # to not find them
20788     if test "x$new_path" = x \
20789         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20790         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20791       new_path="$path"
20792 
20793   windows_path="$new_path"
20794   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20795     unix_path=`$CYGPATH -u "$windows_path"`
20796     new_path="$unix_path"
20797   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20798     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20799     new_path="$unix_path"
20800   fi
20801 
20802     fi
20803 
20804     if test "x$new_path" = x; then
20805       # It's still not found. Now this is an unrecoverable error.
20806       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20807 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20808       has_space=`$ECHO "$complete" | $GREP " "`
20809       if test "x$has_space" != x; then
20810         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20811 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20812       fi
20813       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20814     fi
20815   fi
20816 
20817   # Now new_path has a complete unix path to the binary
20818   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20819     # Keep paths in /bin as-is, but remove trailing .exe if any
20820     new_path="${new_path/%.exe/}"
20821     # Do not save /bin paths to all_fixpath_prefixes!
20822   else
20823     # Not in mixed or Windows style, start by that.
20824     new_path=`cmd //c echo $new_path`
20825 
20826   input_path="$new_path"
20827   # Check if we need to convert this using DOS-style short mode. If the path
20828   # contains just simple characters, use it. Otherwise (spaces, weird characters),
20829   # take no chances and rewrite it.
20830   # Note: m4 eats our [], so we need to use [ and ] instead.
20831   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20832   if test "x$has_forbidden_chars" != x; then
20833     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20834     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20835   fi
20836 
20837     # Output is in $new_path
20838 
20839   windows_path="$new_path"
20840   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20841     unix_path=`$CYGPATH -u "$windows_path"`
20842     new_path="$unix_path"
20843   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20844     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20845     new_path="$unix_path"
20846   fi
20847 
20848     # remove trailing .exe if any
20849     new_path="${new_path/%.exe/}"
20850 
20851     # Save the first 10 bytes of this path to the storage, so fixpath can work.
20852     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20853   fi
20854 
20855     else
20856       # We're on a unix platform. Hooray! :)
20857       # First separate the path from the arguments. This will split at the first
20858       # space.
20859       complete="$FOUND_MAKE"
20860       path="${complete%% *}"
20861       tmp="$complete EOL"
20862       arguments="${tmp#* }"
20863 
20864       # Cannot rely on the command "which" here since it doesn't always work.
20865       is_absolute_path=`$ECHO "$path" | $GREP ^/`
20866       if test -z "$is_absolute_path"; then
20867         # Path to executable is not absolute. Find it.
20868         IFS_save="$IFS"
20869         IFS=:
20870         for p in $PATH; do
20871           if test -f "$p/$path" && test -x "$p/$path"; then
20872             new_path="$p/$path"
20873             break
20874           fi
20875         done
20876         IFS="$IFS_save"
20877       else
20878         # This is an absolute path, we can use it without further modifications.
20879         new_path="$path"
20880       fi
20881 
20882       if test "x$new_path" = x; then
20883         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20884 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20885         has_space=`$ECHO "$complete" | $GREP " "`
20886         if test "x$has_space" != x; then
20887           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20888 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20889         fi
20890         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20891       fi
20892     fi
20893 
20894     # Now join together the path and the arguments once again
20895     if test "x$arguments" != xEOL; then
20896       new_complete="$new_path ${arguments% *}"
20897     else
20898       new_complete="$new_path"
20899     fi
20900 
20901     if test "x$complete" != "x$new_complete"; then
20902       FOUND_MAKE="$new_complete"
20903       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20904 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20905     fi
20906   fi
20907 
20908         fi
20909       fi
20910     fi
20911   fi
20912 
20913         fi
20914         PATH=$OLD_PATH
20915       fi
20916     fi
20917 
20918     if test "x$FOUND_MAKE" = x; then
20919       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
20920     fi
20921 
20922     else
20923       # If it succeeded, then it was overridden by the user. We will use it
20924       # for the tool.
20925 
20926       # First remove it from the list of overridden variables, so we can test
20927       # for unknown variables in the end.
20928       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20929 
20930       # Check if we try to supply an empty value
20931       if test "x$MAKE" = x; then
20932         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20933 $as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20934         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20935 $as_echo_n "checking for MAKE... " >&6; }
20936         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20937 $as_echo "disabled" >&6; }
20938       else
20939         # Check if the provided tool contains a complete path.
20940         tool_specified="$MAKE"
20941         tool_basename="${tool_specified##*/}"
20942         if test "x$tool_basename" = "x$tool_specified"; then
20943           # A command without a complete path is provided, search $PATH.
20944           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20945 $as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20946           # Extract the first word of "$tool_basename", so it can be a program name with args.
20947 set dummy $tool_basename; ac_word=$2
20948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20949 $as_echo_n "checking for $ac_word... " >&6; }
20950 if ${ac_cv_path_MAKE+:} false; then :
20951   $as_echo_n "(cached) " >&6
20952 else
20953   case $MAKE in
20954   [\\/]* | ?:[\\/]*)
20955   ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20956   ;;
20957   *)
20958   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20959 for as_dir in $PATH
20960 do
20961   IFS=$as_save_IFS
20962   test -z "$as_dir" && as_dir=.
20963     for ac_exec_ext in '' $ac_executable_extensions; do
20964   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20965     ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20966     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20967     break 2
20968   fi
20969 done
20970   done
20971 IFS=$as_save_IFS
20972 
20973   ;;
20974 esac
20975 fi
20976 MAKE=$ac_cv_path_MAKE
20977 if test -n "$MAKE"; then
20978   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20979 $as_echo "$MAKE" >&6; }
20980 else
20981   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20982 $as_echo "no" >&6; }
20983 fi
20984 
20985 
20986           if test "x$MAKE" = x; then
20987             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20988           fi
20989         else
20990           # Otherwise we believe it is a complete path. Use it as it is.
20991           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20992 $as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20993           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20994 $as_echo_n "checking for MAKE... " >&6; }
20995           if test ! -x "$tool_specified"; then
20996             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20997 $as_echo "not found" >&6; }
20998             as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20999           fi
21000           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21001 $as_echo "$tool_specified" >&6; }
21002         fi
21003       fi
21004     fi
21005 
21006     # If MAKE was set by user, verify the version
21007 
21008   MAKE_CANDIDATE=""$MAKE""
21009   DESCRIPTION="user supplied MAKE=$MAKE"
21010 
21011   # On Cygwin, we require a newer version of make than on other platforms
21012   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21013     MAKE_VERSION_EXPR="-e 4\."
21014     MAKE_REQUIRED_VERSION="4.0"
21015    else
21016     MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
21017     MAKE_REQUIRED_VERSION="3.81"
21018   fi
21019 
21020   if test "x$MAKE_CANDIDATE" != x; then
21021     { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
21022 $as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
21023     MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
21024     IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
21025     if test "x$IS_GNU_MAKE" = x; then
21026       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
21027 $as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
21028     else
21029       IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
21030       if test "x$IS_MODERN_MAKE" = x; then
21031         { $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
21032 $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;}
21033       else
21034         if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
21035           if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21036             MAKE_EXPECTED_ENV='cygwin'
21037           elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21038             MAKE_EXPECTED_ENV='msys'
21039           else
21040             as_fn_error $? "Unknown Windows environment" "$LINENO" 5
21041           fi
21042           MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
21043           IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
21044         else
21045           # Not relevant for non-Windows
21046           IS_MAKE_CORRECT_ENV=true
21047         fi
21048         if test "x$IS_MAKE_CORRECT_ENV" = x; then
21049           { $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
21050 $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;}
21051         else
21052           FOUND_MAKE=$MAKE_CANDIDATE
21053 
21054   # Only process if variable expands to non-empty
21055 
21056   if test "x$FOUND_MAKE" != x; then
21057     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21058 
21059   # First separate the path from the arguments. This will split at the first
21060   # space.
21061   complete="$FOUND_MAKE"
21062   path="${complete%% *}"
21063   tmp="$complete EOL"
21064   arguments="${tmp#* }"
21065 
21066   # Input might be given as Windows format, start by converting to
21067   # unix format.
21068   new_path=`$CYGPATH -u "$path"`
21069 
21070   # Now try to locate executable using which
21071   new_path=`$WHICH "$new_path" 2> /dev/null`
21072   # bat and cmd files are not always considered executable in cygwin causing which
21073   # to not find them
21074   if test "x$new_path" = x \
21075       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21076       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21077     new_path=`$CYGPATH -u "$path"`
21078   fi
21079   if test "x$new_path" = x; then
21080     # Oops. Which didn't find the executable.
21081     # The splitting of arguments from the executable at a space might have been incorrect,
21082     # since paths with space are more likely in Windows. Give it another try with the whole
21083     # argument.
21084     path="$complete"
21085     arguments="EOL"
21086     new_path=`$CYGPATH -u "$path"`
21087     new_path=`$WHICH "$new_path" 2> /dev/null`
21088     # bat and cmd files are not always considered executable in cygwin causing which
21089     # to not find them
21090     if test "x$new_path" = x \
21091         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21092         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21093       new_path=`$CYGPATH -u "$path"`
21094     fi
21095     if test "x$new_path" = x; then
21096       # It's still not found. Now this is an unrecoverable error.
21097       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21098 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21099       has_space=`$ECHO "$complete" | $GREP " "`
21100       if test "x$has_space" != x; then
21101         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21102 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21103       fi
21104       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21105     fi
21106   fi
21107 
21108   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21109   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21110   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21111   # "foo.exe" is OK but "foo" is an error.
21112   #
21113   # This test is therefore slightly more accurate than "test -f" to check for file presence.
21114   # It is also a way to make sure we got the proper file name for the real test later on.
21115   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21116   if test "x$test_shortpath" = x; then
21117     # Short path failed, file does not exist as specified.
21118     # Try adding .exe or .cmd
21119     if test -f "${new_path}.exe"; then
21120       input_to_shortpath="${new_path}.exe"
21121     elif test -f "${new_path}.cmd"; then
21122       input_to_shortpath="${new_path}.cmd"
21123     else
21124       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21125 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21126       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21127 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21128       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21129     fi
21130   else
21131     input_to_shortpath="$new_path"
21132   fi
21133 
21134   # Call helper function which possibly converts this using DOS-style short mode.
21135   # If so, the updated path is stored in $new_path.
21136   new_path="$input_to_shortpath"
21137 
21138   input_path="$input_to_shortpath"
21139   # Check if we need to convert this using DOS-style short mode. If the path
21140   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21141   # take no chances and rewrite it.
21142   # Note: m4 eats our [], so we need to use [ and ] instead.
21143   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21144   if test "x$has_forbidden_chars" != x; then
21145     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21146     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21147     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21148     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21149       # Going to short mode and back again did indeed matter. Since short mode is
21150       # case insensitive, let's make it lowercase to improve readability.
21151       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21152       # Now convert it back to Unix-style (cygpath)
21153       input_path=`$CYGPATH -u "$shortmode_path"`
21154       new_path="$input_path"
21155     fi
21156   fi
21157 
21158   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21159   if test "x$test_cygdrive_prefix" = x; then
21160     # As a simple fix, exclude /usr/bin since it's not a real path.
21161     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21162       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21163       # a path prefixed by /cygdrive for fixpath to work.
21164       new_path="$CYGWIN_ROOT_PATH$input_path"
21165     fi
21166   fi
21167 
21168   # remove trailing .exe if any
21169   new_path="${new_path/%.exe/}"
21170 
21171     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21172 
21173   # First separate the path from the arguments. This will split at the first
21174   # space.
21175   complete="$FOUND_MAKE"
21176   path="${complete%% *}"
21177   tmp="$complete EOL"
21178   arguments="${tmp#* }"
21179 
21180   # Input might be given as Windows format, start by converting to
21181   # unix format.
21182   new_path="$path"
21183 
21184   windows_path="$new_path"
21185   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21186     unix_path=`$CYGPATH -u "$windows_path"`
21187     new_path="$unix_path"
21188   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21189     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21190     new_path="$unix_path"
21191   fi
21192 
21193 
21194   # Now try to locate executable using which
21195   new_path=`$WHICH "$new_path" 2> /dev/null`
21196 
21197   if test "x$new_path" = x; then
21198     # Oops. Which didn't find the executable.
21199     # The splitting of arguments from the executable at a space might have been incorrect,
21200     # since paths with space are more likely in Windows. Give it another try with the whole
21201     # argument.
21202     path="$complete"
21203     arguments="EOL"
21204     new_path="$path"
21205 
21206   windows_path="$new_path"
21207   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21208     unix_path=`$CYGPATH -u "$windows_path"`
21209     new_path="$unix_path"
21210   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21211     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21212     new_path="$unix_path"
21213   fi
21214 
21215 
21216     new_path=`$WHICH "$new_path" 2> /dev/null`
21217     # bat and cmd files are not always considered executable in MSYS causing which
21218     # to not find them
21219     if test "x$new_path" = x \
21220         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21221         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21222       new_path="$path"
21223 
21224   windows_path="$new_path"
21225   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21226     unix_path=`$CYGPATH -u "$windows_path"`
21227     new_path="$unix_path"
21228   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21229     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21230     new_path="$unix_path"
21231   fi
21232 
21233     fi
21234 
21235     if test "x$new_path" = x; then
21236       # It's still not found. Now this is an unrecoverable error.
21237       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21238 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21239       has_space=`$ECHO "$complete" | $GREP " "`
21240       if test "x$has_space" != x; then
21241         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21242 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21243       fi
21244       as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21245     fi
21246   fi
21247 
21248   # Now new_path has a complete unix path to the binary
21249   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21250     # Keep paths in /bin as-is, but remove trailing .exe if any
21251     new_path="${new_path/%.exe/}"
21252     # Do not save /bin paths to all_fixpath_prefixes!
21253   else
21254     # Not in mixed or Windows style, start by that.
21255     new_path=`cmd //c echo $new_path`
21256 
21257   input_path="$new_path"
21258   # Check if we need to convert this using DOS-style short mode. If the path
21259   # contains just simple characters, use it. Otherwise (spaces, weird characters),
21260   # take no chances and rewrite it.
21261   # Note: m4 eats our [], so we need to use [ and ] instead.
21262   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21263   if test "x$has_forbidden_chars" != x; then
21264     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21265     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21266   fi
21267 
21268     # Output is in $new_path
21269 
21270   windows_path="$new_path"
21271   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21272     unix_path=`$CYGPATH -u "$windows_path"`
21273     new_path="$unix_path"
21274   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21275     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21276     new_path="$unix_path"
21277   fi
21278 
21279     # remove trailing .exe if any
21280     new_path="${new_path/%.exe/}"
21281 
21282     # Save the first 10 bytes of this path to the storage, so fixpath can work.
21283     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21284   fi
21285 
21286     else
21287       # We're on a unix platform. Hooray! :)
21288       # First separate the path from the arguments. This will split at the first
21289       # space.
21290       complete="$FOUND_MAKE"
21291       path="${complete%% *}"
21292       tmp="$complete EOL"
21293       arguments="${tmp#* }"
21294 
21295       # Cannot rely on the command "which" here since it doesn't always work.
21296       is_absolute_path=`$ECHO "$path" | $GREP ^/`
21297       if test -z "$is_absolute_path"; then
21298         # Path to executable is not absolute. Find it.
21299         IFS_save="$IFS"
21300         IFS=:
21301         for p in $PATH; do
21302           if test -f "$p/$path" && test -x "$p/$path"; then
21303             new_path="$p/$path"
21304             break
21305           fi
21306         done
21307         IFS="$IFS_save"
21308       else
21309         # This is an absolute path, we can use it without further modifications.
21310         new_path="$path"
21311       fi
21312 
21313       if test "x$new_path" = x; then
21314         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21315 $as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21316         has_space=`$ECHO "$complete" | $GREP " "`
21317         if test "x$has_space" != x; then
21318           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21319 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21320         fi
21321         as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21322       fi
21323     fi
21324 
21325     # Now join together the path and the arguments once again
21326     if test "x$arguments" != xEOL; then
21327       new_complete="$new_path ${arguments% *}"
21328     else
21329       new_complete="$new_path"
21330     fi
21331 
21332     if test "x$complete" != "x$new_complete"; then
21333       FOUND_MAKE="$new_complete"
21334       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21335 $as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21336     fi
21337   fi
21338 
21339         fi
21340       fi
21341     fi
21342   fi
21343 
21344     if test "x$FOUND_MAKE" = x; then
21345       as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21346     fi
21347 
21348   fi
21349 
21350 
21351   MAKE=$FOUND_MAKE
21352 
21353   { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21354 $as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21355 
21356 
21357   # Check if make supports the output sync option and if so, setup using it.
21358   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21359 $as_echo_n "checking if make --output-sync is supported... " >&6; }
21360   if $MAKE --version -O > /dev/null 2>&1; then
21361     OUTPUT_SYNC_SUPPORTED=true
21362     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21363 $as_echo "yes" >&6; }
21364     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21365 $as_echo_n "checking for output-sync value... " >&6; }
21366 
21367 # Check whether --with-output-sync was given.
21368 if test "${with_output_sync+set}" = set; then :
21369   withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21370 fi
21371 
21372     if test "x$OUTPUT_SYNC" = "x"; then
21373       OUTPUT_SYNC=none
21374     fi
21375     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21376 $as_echo "$OUTPUT_SYNC" >&6; }
21377     if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21378       as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21379     fi
21380   else
21381     OUTPUT_SYNC_SUPPORTED=false
21382     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21383 $as_echo "no" >&6; }
21384   fi
21385 
21386 
21387 
21388 
21389 
21390 
21391   # Test if find supports -delete
21392   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21393 $as_echo_n "checking if find supports -delete... " >&6; }
21394   FIND_DELETE="-delete"
21395 
21396   DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21397 
21398   echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21399 
21400   TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21401   if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21402     # No, it does not.
21403     $RM $DELETEDIR/TestIfFindSupportsDelete
21404     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21405       # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21406       FIND_DELETE="-print | $XARGS $RM"
21407     else
21408       FIND_DELETE="-exec $RM \{\} \+"
21409     fi
21410     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21411 $as_echo "no" >&6; }
21412   else
21413     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21414 $as_echo "yes" >&6; }
21415   fi
21416   $RMDIR $DELETEDIR
21417 
21418 
21419 
21420   # Test which kind of tar was found
21421   if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21422     TAR_TYPE="gnu"
21423   elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21424     TAR_TYPE="bsd"
21425   elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21426     TAR_TYPE="bsd"
21427   elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21428     TAR_TYPE="solaris"
21429   fi
21430   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21431 $as_echo_n "checking what type of tar was found... " >&6; }
21432   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21433 $as_echo "$TAR_TYPE" >&6; }
21434 
21435   TAR_CREATE_FILE_PARAM=""
21436 
21437   if test "x$TAR_TYPE" = "xgnu"; then
21438     TAR_INCLUDE_PARAM="T"
21439     TAR_SUPPORTS_TRANSFORM="true"
21440     if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21441       # When using gnu tar for Solaris targets, need to use compatibility mode
21442       TAR_CREATE_EXTRA_PARAM="--format=ustar"
21443     fi
21444   else
21445     TAR_INCLUDE_PARAM="I"
21446     TAR_SUPPORTS_TRANSFORM="false"
21447   fi
21448 
21449 
21450 
21451 
21452 
21453 
21454   # Test that grep supports -Fx with a list of pattern which includes null pattern.
21455   # This is a problem for the grep resident on AIX.
21456   { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21457 $as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21458   # Multiple subsequent spaces..
21459   STACK_SPACES='aaa   bbb   ccc'
21460   # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21461   # patterns in it.
21462   STACK_LIST=${STACK_SPACES// /$'\n'}
21463   NEEDLE_SPACES='ccc bbb aaa'
21464   NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21465   RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21466   if test "x$RESULT" == "x"; then
21467     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21468 $as_echo "yes" >&6; }
21469   else
21470     if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21471       ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21472     fi
21473     as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21474   fi
21475 
21476 
21477   # These tools might not be installed by default,
21478   # need hint on how to install them.
21479 
21480 
21481 
21482   # Publish this variable in the help.
21483 
21484 
21485   if [ -z "${UNZIP+x}" ]; then
21486     # The variable is not set by user, try to locate tool using the code snippet
21487     for ac_prog in unzip
21488 do
21489   # Extract the first word of "$ac_prog", so it can be a program name with args.
21490 set dummy $ac_prog; ac_word=$2
21491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21492 $as_echo_n "checking for $ac_word... " >&6; }
21493 if ${ac_cv_path_UNZIP+:} false; then :
21494   $as_echo_n "(cached) " >&6
21495 else
21496   case $UNZIP in
21497   [\\/]* | ?:[\\/]*)
21498   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21499   ;;
21500   *)
21501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21502 for as_dir in $PATH
21503 do
21504   IFS=$as_save_IFS
21505   test -z "$as_dir" && as_dir=.
21506     for ac_exec_ext in '' $ac_executable_extensions; do
21507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21508     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21510     break 2
21511   fi
21512 done
21513   done
21514 IFS=$as_save_IFS
21515 
21516   ;;
21517 esac
21518 fi
21519 UNZIP=$ac_cv_path_UNZIP
21520 if test -n "$UNZIP"; then
21521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21522 $as_echo "$UNZIP" >&6; }
21523 else
21524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21525 $as_echo "no" >&6; }
21526 fi
21527 
21528 
21529   test -n "$UNZIP" && break
21530 done
21531 
21532   else
21533     # The variable is set, but is it from the command line or the environment?
21534 
21535     # Try to remove the string !UNZIP! from our list.
21536     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21537     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21538       # If it failed, the variable was not from the command line. Ignore it,
21539       # but warn the user (except for BASH, which is always set by the calling BASH).
21540       if test "xUNZIP" != xBASH; then
21541         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21542 $as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21543       fi
21544       # Try to locate tool using the code snippet
21545       for ac_prog in unzip
21546 do
21547   # Extract the first word of "$ac_prog", so it can be a program name with args.
21548 set dummy $ac_prog; ac_word=$2
21549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21550 $as_echo_n "checking for $ac_word... " >&6; }
21551 if ${ac_cv_path_UNZIP+:} false; then :
21552   $as_echo_n "(cached) " >&6
21553 else
21554   case $UNZIP in
21555   [\\/]* | ?:[\\/]*)
21556   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21557   ;;
21558   *)
21559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21560 for as_dir in $PATH
21561 do
21562   IFS=$as_save_IFS
21563   test -z "$as_dir" && as_dir=.
21564     for ac_exec_ext in '' $ac_executable_extensions; do
21565   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21566     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21567     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21568     break 2
21569   fi
21570 done
21571   done
21572 IFS=$as_save_IFS
21573 
21574   ;;
21575 esac
21576 fi
21577 UNZIP=$ac_cv_path_UNZIP
21578 if test -n "$UNZIP"; then
21579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21580 $as_echo "$UNZIP" >&6; }
21581 else
21582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21583 $as_echo "no" >&6; }
21584 fi
21585 
21586 
21587   test -n "$UNZIP" && break
21588 done
21589 
21590     else
21591       # If it succeeded, then it was overridden by the user. We will use it
21592       # for the tool.
21593 
21594       # First remove it from the list of overridden variables, so we can test
21595       # for unknown variables in the end.
21596       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21597 
21598       # Check if we try to supply an empty value
21599       if test "x$UNZIP" = x; then
21600         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21601 $as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21602         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21603 $as_echo_n "checking for UNZIP... " >&6; }
21604         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21605 $as_echo "disabled" >&6; }
21606       else
21607         # Check if the provided tool contains a complete path.
21608         tool_specified="$UNZIP"
21609         tool_basename="${tool_specified##*/}"
21610         if test "x$tool_basename" = "x$tool_specified"; then
21611           # A command without a complete path is provided, search $PATH.
21612           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21613 $as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21614           # Extract the first word of "$tool_basename", so it can be a program name with args.
21615 set dummy $tool_basename; ac_word=$2
21616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21617 $as_echo_n "checking for $ac_word... " >&6; }
21618 if ${ac_cv_path_UNZIP+:} false; then :
21619   $as_echo_n "(cached) " >&6
21620 else
21621   case $UNZIP in
21622   [\\/]* | ?:[\\/]*)
21623   ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21624   ;;
21625   *)
21626   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21627 for as_dir in $PATH
21628 do
21629   IFS=$as_save_IFS
21630   test -z "$as_dir" && as_dir=.
21631     for ac_exec_ext in '' $ac_executable_extensions; do
21632   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21633     ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21634     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21635     break 2
21636   fi
21637 done
21638   done
21639 IFS=$as_save_IFS
21640 
21641   ;;
21642 esac
21643 fi
21644 UNZIP=$ac_cv_path_UNZIP
21645 if test -n "$UNZIP"; then
21646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21647 $as_echo "$UNZIP" >&6; }
21648 else
21649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21650 $as_echo "no" >&6; }
21651 fi
21652 
21653 
21654           if test "x$UNZIP" = x; then
21655             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21656           fi
21657         else
21658           # Otherwise we believe it is a complete path. Use it as it is.
21659           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21660 $as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21661           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21662 $as_echo_n "checking for UNZIP... " >&6; }
21663           if test ! -x "$tool_specified"; then
21664             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21665 $as_echo "not found" >&6; }
21666             as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21667           fi
21668           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21669 $as_echo "$tool_specified" >&6; }
21670         fi
21671       fi
21672     fi
21673 
21674   fi
21675 
21676 
21677 
21678   if test "x$UNZIP" = x; then
21679     as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21680   fi
21681 
21682 
21683   # Since zip uses "ZIP" as a environment variable for passing options, we need
21684   # to name our variable differently, hence ZIPEXE.
21685 
21686 
21687 
21688   # Publish this variable in the help.
21689 
21690 
21691   if [ -z "${ZIPEXE+x}" ]; then
21692     # The variable is not set by user, try to locate tool using the code snippet
21693     for ac_prog in zip
21694 do
21695   # Extract the first word of "$ac_prog", so it can be a program name with args.
21696 set dummy $ac_prog; ac_word=$2
21697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21698 $as_echo_n "checking for $ac_word... " >&6; }
21699 if ${ac_cv_path_ZIPEXE+:} false; then :
21700   $as_echo_n "(cached) " >&6
21701 else
21702   case $ZIPEXE in
21703   [\\/]* | ?:[\\/]*)
21704   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21705   ;;
21706   *)
21707   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21708 for as_dir in $PATH
21709 do
21710   IFS=$as_save_IFS
21711   test -z "$as_dir" && as_dir=.
21712     for ac_exec_ext in '' $ac_executable_extensions; do
21713   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21714     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21715     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21716     break 2
21717   fi
21718 done
21719   done
21720 IFS=$as_save_IFS
21721 
21722   ;;
21723 esac
21724 fi
21725 ZIPEXE=$ac_cv_path_ZIPEXE
21726 if test -n "$ZIPEXE"; then
21727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21728 $as_echo "$ZIPEXE" >&6; }
21729 else
21730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21731 $as_echo "no" >&6; }
21732 fi
21733 
21734 
21735   test -n "$ZIPEXE" && break
21736 done
21737 
21738   else
21739     # The variable is set, but is it from the command line or the environment?
21740 
21741     # Try to remove the string !ZIPEXE! from our list.
21742     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21743     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21744       # If it failed, the variable was not from the command line. Ignore it,
21745       # but warn the user (except for BASH, which is always set by the calling BASH).
21746       if test "xZIPEXE" != xBASH; then
21747         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21748 $as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21749       fi
21750       # Try to locate tool using the code snippet
21751       for ac_prog in zip
21752 do
21753   # Extract the first word of "$ac_prog", so it can be a program name with args.
21754 set dummy $ac_prog; ac_word=$2
21755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21756 $as_echo_n "checking for $ac_word... " >&6; }
21757 if ${ac_cv_path_ZIPEXE+:} false; then :
21758   $as_echo_n "(cached) " >&6
21759 else
21760   case $ZIPEXE in
21761   [\\/]* | ?:[\\/]*)
21762   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21763   ;;
21764   *)
21765   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21766 for as_dir in $PATH
21767 do
21768   IFS=$as_save_IFS
21769   test -z "$as_dir" && as_dir=.
21770     for ac_exec_ext in '' $ac_executable_extensions; do
21771   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21772     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21774     break 2
21775   fi
21776 done
21777   done
21778 IFS=$as_save_IFS
21779 
21780   ;;
21781 esac
21782 fi
21783 ZIPEXE=$ac_cv_path_ZIPEXE
21784 if test -n "$ZIPEXE"; then
21785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21786 $as_echo "$ZIPEXE" >&6; }
21787 else
21788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21789 $as_echo "no" >&6; }
21790 fi
21791 
21792 
21793   test -n "$ZIPEXE" && break
21794 done
21795 
21796     else
21797       # If it succeeded, then it was overridden by the user. We will use it
21798       # for the tool.
21799 
21800       # First remove it from the list of overridden variables, so we can test
21801       # for unknown variables in the end.
21802       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21803 
21804       # Check if we try to supply an empty value
21805       if test "x$ZIPEXE" = x; then
21806         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21807 $as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21808         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21809 $as_echo_n "checking for ZIPEXE... " >&6; }
21810         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21811 $as_echo "disabled" >&6; }
21812       else
21813         # Check if the provided tool contains a complete path.
21814         tool_specified="$ZIPEXE"
21815         tool_basename="${tool_specified##*/}"
21816         if test "x$tool_basename" = "x$tool_specified"; then
21817           # A command without a complete path is provided, search $PATH.
21818           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21819 $as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21820           # Extract the first word of "$tool_basename", so it can be a program name with args.
21821 set dummy $tool_basename; ac_word=$2
21822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21823 $as_echo_n "checking for $ac_word... " >&6; }
21824 if ${ac_cv_path_ZIPEXE+:} false; then :
21825   $as_echo_n "(cached) " >&6
21826 else
21827   case $ZIPEXE in
21828   [\\/]* | ?:[\\/]*)
21829   ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21830   ;;
21831   *)
21832   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21833 for as_dir in $PATH
21834 do
21835   IFS=$as_save_IFS
21836   test -z "$as_dir" && as_dir=.
21837     for ac_exec_ext in '' $ac_executable_extensions; do
21838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21839     ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21841     break 2
21842   fi
21843 done
21844   done
21845 IFS=$as_save_IFS
21846 
21847   ;;
21848 esac
21849 fi
21850 ZIPEXE=$ac_cv_path_ZIPEXE
21851 if test -n "$ZIPEXE"; then
21852   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21853 $as_echo "$ZIPEXE" >&6; }
21854 else
21855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21856 $as_echo "no" >&6; }
21857 fi
21858 
21859 
21860           if test "x$ZIPEXE" = x; then
21861             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21862           fi
21863         else
21864           # Otherwise we believe it is a complete path. Use it as it is.
21865           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21866 $as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21867           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21868 $as_echo_n "checking for ZIPEXE... " >&6; }
21869           if test ! -x "$tool_specified"; then
21870             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21871 $as_echo "not found" >&6; }
21872             as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21873           fi
21874           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21875 $as_echo "$tool_specified" >&6; }
21876         fi
21877       fi
21878     fi
21879 
21880   fi
21881 
21882 
21883 
21884   if test "x$ZIPEXE" = x; then
21885     as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21886   fi
21887 
21888 
21889 
21890   # Non-required basic tools
21891 
21892 
21893 
21894   # Publish this variable in the help.
21895 
21896 
21897   if [ -z "${LDD+x}" ]; then
21898     # The variable is not set by user, try to locate tool using the code snippet
21899     for ac_prog in ldd
21900 do
21901   # Extract the first word of "$ac_prog", so it can be a program name with args.
21902 set dummy $ac_prog; ac_word=$2
21903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21904 $as_echo_n "checking for $ac_word... " >&6; }
21905 if ${ac_cv_path_LDD+:} false; then :
21906   $as_echo_n "(cached) " >&6
21907 else
21908   case $LDD in
21909   [\\/]* | ?:[\\/]*)
21910   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21911   ;;
21912   *)
21913   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21914 for as_dir in $PATH
21915 do
21916   IFS=$as_save_IFS
21917   test -z "$as_dir" && as_dir=.
21918     for ac_exec_ext in '' $ac_executable_extensions; do
21919   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21920     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21921     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21922     break 2
21923   fi
21924 done
21925   done
21926 IFS=$as_save_IFS
21927 
21928   ;;
21929 esac
21930 fi
21931 LDD=$ac_cv_path_LDD
21932 if test -n "$LDD"; then
21933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21934 $as_echo "$LDD" >&6; }
21935 else
21936   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21937 $as_echo "no" >&6; }
21938 fi
21939 
21940 
21941   test -n "$LDD" && break
21942 done
21943 
21944   else
21945     # The variable is set, but is it from the command line or the environment?
21946 
21947     # Try to remove the string !LDD! from our list.
21948     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21949     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21950       # If it failed, the variable was not from the command line. Ignore it,
21951       # but warn the user (except for BASH, which is always set by the calling BASH).
21952       if test "xLDD" != xBASH; then
21953         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21954 $as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21955       fi
21956       # Try to locate tool using the code snippet
21957       for ac_prog in ldd
21958 do
21959   # Extract the first word of "$ac_prog", so it can be a program name with args.
21960 set dummy $ac_prog; ac_word=$2
21961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21962 $as_echo_n "checking for $ac_word... " >&6; }
21963 if ${ac_cv_path_LDD+:} false; then :
21964   $as_echo_n "(cached) " >&6
21965 else
21966   case $LDD in
21967   [\\/]* | ?:[\\/]*)
21968   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21969   ;;
21970   *)
21971   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21972 for as_dir in $PATH
21973 do
21974   IFS=$as_save_IFS
21975   test -z "$as_dir" && as_dir=.
21976     for ac_exec_ext in '' $ac_executable_extensions; do
21977   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21978     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21979     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21980     break 2
21981   fi
21982 done
21983   done
21984 IFS=$as_save_IFS
21985 
21986   ;;
21987 esac
21988 fi
21989 LDD=$ac_cv_path_LDD
21990 if test -n "$LDD"; then
21991   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21992 $as_echo "$LDD" >&6; }
21993 else
21994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21995 $as_echo "no" >&6; }
21996 fi
21997 
21998 
21999   test -n "$LDD" && break
22000 done
22001 
22002     else
22003       # If it succeeded, then it was overridden by the user. We will use it
22004       # for the tool.
22005 
22006       # First remove it from the list of overridden variables, so we can test
22007       # for unknown variables in the end.
22008       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22009 
22010       # Check if we try to supply an empty value
22011       if test "x$LDD" = x; then
22012         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
22013 $as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
22014         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22015 $as_echo_n "checking for LDD... " >&6; }
22016         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22017 $as_echo "disabled" >&6; }
22018       else
22019         # Check if the provided tool contains a complete path.
22020         tool_specified="$LDD"
22021         tool_basename="${tool_specified##*/}"
22022         if test "x$tool_basename" = "x$tool_specified"; then
22023           # A command without a complete path is provided, search $PATH.
22024           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
22025 $as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
22026           # Extract the first word of "$tool_basename", so it can be a program name with args.
22027 set dummy $tool_basename; ac_word=$2
22028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22029 $as_echo_n "checking for $ac_word... " >&6; }
22030 if ${ac_cv_path_LDD+:} false; then :
22031   $as_echo_n "(cached) " >&6
22032 else
22033   case $LDD in
22034   [\\/]* | ?:[\\/]*)
22035   ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
22036   ;;
22037   *)
22038   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22039 for as_dir in $PATH
22040 do
22041   IFS=$as_save_IFS
22042   test -z "$as_dir" && as_dir=.
22043     for ac_exec_ext in '' $ac_executable_extensions; do
22044   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22045     ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
22046     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22047     break 2
22048   fi
22049 done
22050   done
22051 IFS=$as_save_IFS
22052 
22053   ;;
22054 esac
22055 fi
22056 LDD=$ac_cv_path_LDD
22057 if test -n "$LDD"; then
22058   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
22059 $as_echo "$LDD" >&6; }
22060 else
22061   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22062 $as_echo "no" >&6; }
22063 fi
22064 
22065 
22066           if test "x$LDD" = x; then
22067             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22068           fi
22069         else
22070           # Otherwise we believe it is a complete path. Use it as it is.
22071           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22072 $as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22073           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22074 $as_echo_n "checking for LDD... " >&6; }
22075           if test ! -x "$tool_specified"; then
22076             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22077 $as_echo "not found" >&6; }
22078             as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22079           fi
22080           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22081 $as_echo "$tool_specified" >&6; }
22082         fi
22083       fi
22084     fi
22085 
22086   fi
22087 
22088 
22089   if test "x$LDD" = "x"; then
22090     # List shared lib dependencies is used for
22091     # debug output and checking for forbidden dependencies.
22092     # We can build without it.
22093     LDD="true"
22094   fi
22095 
22096 
22097   # Publish this variable in the help.
22098 
22099 
22100   if [ -z "${OTOOL+x}" ]; then
22101     # The variable is not set by user, try to locate tool using the code snippet
22102     for ac_prog in otool
22103 do
22104   # Extract the first word of "$ac_prog", so it can be a program name with args.
22105 set dummy $ac_prog; ac_word=$2
22106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22107 $as_echo_n "checking for $ac_word... " >&6; }
22108 if ${ac_cv_path_OTOOL+:} false; then :
22109   $as_echo_n "(cached) " >&6
22110 else
22111   case $OTOOL in
22112   [\\/]* | ?:[\\/]*)
22113   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22114   ;;
22115   *)
22116   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22117 for as_dir in $PATH
22118 do
22119   IFS=$as_save_IFS
22120   test -z "$as_dir" && as_dir=.
22121     for ac_exec_ext in '' $ac_executable_extensions; do
22122   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22123     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22124     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22125     break 2
22126   fi
22127 done
22128   done
22129 IFS=$as_save_IFS
22130 
22131   ;;
22132 esac
22133 fi
22134 OTOOL=$ac_cv_path_OTOOL
22135 if test -n "$OTOOL"; then
22136   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22137 $as_echo "$OTOOL" >&6; }
22138 else
22139   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22140 $as_echo "no" >&6; }
22141 fi
22142 
22143 
22144   test -n "$OTOOL" && break
22145 done
22146 
22147   else
22148     # The variable is set, but is it from the command line or the environment?
22149 
22150     # Try to remove the string !OTOOL! from our list.
22151     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22152     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22153       # If it failed, the variable was not from the command line. Ignore it,
22154       # but warn the user (except for BASH, which is always set by the calling BASH).
22155       if test "xOTOOL" != xBASH; then
22156         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22157 $as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22158       fi
22159       # Try to locate tool using the code snippet
22160       for ac_prog in otool
22161 do
22162   # Extract the first word of "$ac_prog", so it can be a program name with args.
22163 set dummy $ac_prog; ac_word=$2
22164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22165 $as_echo_n "checking for $ac_word... " >&6; }
22166 if ${ac_cv_path_OTOOL+:} false; then :
22167   $as_echo_n "(cached) " >&6
22168 else
22169   case $OTOOL in
22170   [\\/]* | ?:[\\/]*)
22171   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22172   ;;
22173   *)
22174   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22175 for as_dir in $PATH
22176 do
22177   IFS=$as_save_IFS
22178   test -z "$as_dir" && as_dir=.
22179     for ac_exec_ext in '' $ac_executable_extensions; do
22180   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22181     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22182     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22183     break 2
22184   fi
22185 done
22186   done
22187 IFS=$as_save_IFS
22188 
22189   ;;
22190 esac
22191 fi
22192 OTOOL=$ac_cv_path_OTOOL
22193 if test -n "$OTOOL"; then
22194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22195 $as_echo "$OTOOL" >&6; }
22196 else
22197   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22198 $as_echo "no" >&6; }
22199 fi
22200 
22201 
22202   test -n "$OTOOL" && break
22203 done
22204 
22205     else
22206       # If it succeeded, then it was overridden by the user. We will use it
22207       # for the tool.
22208 
22209       # First remove it from the list of overridden variables, so we can test
22210       # for unknown variables in the end.
22211       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22212 
22213       # Check if we try to supply an empty value
22214       if test "x$OTOOL" = x; then
22215         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22216 $as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22217         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22218 $as_echo_n "checking for OTOOL... " >&6; }
22219         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22220 $as_echo "disabled" >&6; }
22221       else
22222         # Check if the provided tool contains a complete path.
22223         tool_specified="$OTOOL"
22224         tool_basename="${tool_specified##*/}"
22225         if test "x$tool_basename" = "x$tool_specified"; then
22226           # A command without a complete path is provided, search $PATH.
22227           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22228 $as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22229           # Extract the first word of "$tool_basename", so it can be a program name with args.
22230 set dummy $tool_basename; ac_word=$2
22231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22232 $as_echo_n "checking for $ac_word... " >&6; }
22233 if ${ac_cv_path_OTOOL+:} false; then :
22234   $as_echo_n "(cached) " >&6
22235 else
22236   case $OTOOL in
22237   [\\/]* | ?:[\\/]*)
22238   ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22239   ;;
22240   *)
22241   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22242 for as_dir in $PATH
22243 do
22244   IFS=$as_save_IFS
22245   test -z "$as_dir" && as_dir=.
22246     for ac_exec_ext in '' $ac_executable_extensions; do
22247   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22248     ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22249     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22250     break 2
22251   fi
22252 done
22253   done
22254 IFS=$as_save_IFS
22255 
22256   ;;
22257 esac
22258 fi
22259 OTOOL=$ac_cv_path_OTOOL
22260 if test -n "$OTOOL"; then
22261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22262 $as_echo "$OTOOL" >&6; }
22263 else
22264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22265 $as_echo "no" >&6; }
22266 fi
22267 
22268 
22269           if test "x$OTOOL" = x; then
22270             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22271           fi
22272         else
22273           # Otherwise we believe it is a complete path. Use it as it is.
22274           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22275 $as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22276           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22277 $as_echo_n "checking for OTOOL... " >&6; }
22278           if test ! -x "$tool_specified"; then
22279             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22280 $as_echo "not found" >&6; }
22281             as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22282           fi
22283           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22284 $as_echo "$tool_specified" >&6; }
22285         fi
22286       fi
22287     fi
22288 
22289   fi
22290 
22291 
22292   if test "x$OTOOL" = "x"; then
22293     OTOOL="true"
22294   fi
22295 
22296 
22297   # Publish this variable in the help.
22298 
22299 
22300   if [ -z "${READELF+x}" ]; then
22301     # The variable is not set by user, try to locate tool using the code snippet
22302     for ac_prog in greadelf readelf
22303 do
22304   # Extract the first word of "$ac_prog", so it can be a program name with args.
22305 set dummy $ac_prog; ac_word=$2
22306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22307 $as_echo_n "checking for $ac_word... " >&6; }
22308 if ${ac_cv_path_READELF+:} false; then :
22309   $as_echo_n "(cached) " >&6
22310 else
22311   case $READELF in
22312   [\\/]* | ?:[\\/]*)
22313   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22314   ;;
22315   *)
22316   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22317 for as_dir in $PATH
22318 do
22319   IFS=$as_save_IFS
22320   test -z "$as_dir" && as_dir=.
22321     for ac_exec_ext in '' $ac_executable_extensions; do
22322   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22323     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22324     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22325     break 2
22326   fi
22327 done
22328   done
22329 IFS=$as_save_IFS
22330 
22331   ;;
22332 esac
22333 fi
22334 READELF=$ac_cv_path_READELF
22335 if test -n "$READELF"; then
22336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22337 $as_echo "$READELF" >&6; }
22338 else
22339   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22340 $as_echo "no" >&6; }
22341 fi
22342 
22343 
22344   test -n "$READELF" && break
22345 done
22346 
22347   else
22348     # The variable is set, but is it from the command line or the environment?
22349 
22350     # Try to remove the string !READELF! from our list.
22351     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22352     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22353       # If it failed, the variable was not from the command line. Ignore it,
22354       # but warn the user (except for BASH, which is always set by the calling BASH).
22355       if test "xREADELF" != xBASH; then
22356         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22357 $as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22358       fi
22359       # Try to locate tool using the code snippet
22360       for ac_prog in greadelf readelf
22361 do
22362   # Extract the first word of "$ac_prog", so it can be a program name with args.
22363 set dummy $ac_prog; ac_word=$2
22364 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22365 $as_echo_n "checking for $ac_word... " >&6; }
22366 if ${ac_cv_path_READELF+:} false; then :
22367   $as_echo_n "(cached) " >&6
22368 else
22369   case $READELF in
22370   [\\/]* | ?:[\\/]*)
22371   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22372   ;;
22373   *)
22374   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22375 for as_dir in $PATH
22376 do
22377   IFS=$as_save_IFS
22378   test -z "$as_dir" && as_dir=.
22379     for ac_exec_ext in '' $ac_executable_extensions; do
22380   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22381     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22382     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22383     break 2
22384   fi
22385 done
22386   done
22387 IFS=$as_save_IFS
22388 
22389   ;;
22390 esac
22391 fi
22392 READELF=$ac_cv_path_READELF
22393 if test -n "$READELF"; then
22394   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22395 $as_echo "$READELF" >&6; }
22396 else
22397   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22398 $as_echo "no" >&6; }
22399 fi
22400 
22401 
22402   test -n "$READELF" && break
22403 done
22404 
22405     else
22406       # If it succeeded, then it was overridden by the user. We will use it
22407       # for the tool.
22408 
22409       # First remove it from the list of overridden variables, so we can test
22410       # for unknown variables in the end.
22411       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22412 
22413       # Check if we try to supply an empty value
22414       if test "x$READELF" = x; then
22415         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22416 $as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22417         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22418 $as_echo_n "checking for READELF... " >&6; }
22419         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22420 $as_echo "disabled" >&6; }
22421       else
22422         # Check if the provided tool contains a complete path.
22423         tool_specified="$READELF"
22424         tool_basename="${tool_specified##*/}"
22425         if test "x$tool_basename" = "x$tool_specified"; then
22426           # A command without a complete path is provided, search $PATH.
22427           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22428 $as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22429           # Extract the first word of "$tool_basename", so it can be a program name with args.
22430 set dummy $tool_basename; ac_word=$2
22431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22432 $as_echo_n "checking for $ac_word... " >&6; }
22433 if ${ac_cv_path_READELF+:} false; then :
22434   $as_echo_n "(cached) " >&6
22435 else
22436   case $READELF in
22437   [\\/]* | ?:[\\/]*)
22438   ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22439   ;;
22440   *)
22441   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22442 for as_dir in $PATH
22443 do
22444   IFS=$as_save_IFS
22445   test -z "$as_dir" && as_dir=.
22446     for ac_exec_ext in '' $ac_executable_extensions; do
22447   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22448     ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22449     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22450     break 2
22451   fi
22452 done
22453   done
22454 IFS=$as_save_IFS
22455 
22456   ;;
22457 esac
22458 fi
22459 READELF=$ac_cv_path_READELF
22460 if test -n "$READELF"; then
22461   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22462 $as_echo "$READELF" >&6; }
22463 else
22464   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22465 $as_echo "no" >&6; }
22466 fi
22467 
22468 
22469           if test "x$READELF" = x; then
22470             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22471           fi
22472         else
22473           # Otherwise we believe it is a complete path. Use it as it is.
22474           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22475 $as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22476           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22477 $as_echo_n "checking for READELF... " >&6; }
22478           if test ! -x "$tool_specified"; then
22479             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22480 $as_echo "not found" >&6; }
22481             as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22482           fi
22483           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22484 $as_echo "$tool_specified" >&6; }
22485         fi
22486       fi
22487     fi
22488 
22489   fi
22490 
22491 
22492 
22493 
22494   # Publish this variable in the help.
22495 
22496 
22497   if [ -z "${DOT+x}" ]; then
22498     # The variable is not set by user, try to locate tool using the code snippet
22499     for ac_prog in dot
22500 do
22501   # Extract the first word of "$ac_prog", so it can be a program name with args.
22502 set dummy $ac_prog; ac_word=$2
22503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22504 $as_echo_n "checking for $ac_word... " >&6; }
22505 if ${ac_cv_path_DOT+:} false; then :
22506   $as_echo_n "(cached) " >&6
22507 else
22508   case $DOT in
22509   [\\/]* | ?:[\\/]*)
22510   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22511   ;;
22512   *)
22513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22514 for as_dir in $PATH
22515 do
22516   IFS=$as_save_IFS
22517   test -z "$as_dir" && as_dir=.
22518     for ac_exec_ext in '' $ac_executable_extensions; do
22519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22520     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22522     break 2
22523   fi
22524 done
22525   done
22526 IFS=$as_save_IFS
22527 
22528   ;;
22529 esac
22530 fi
22531 DOT=$ac_cv_path_DOT
22532 if test -n "$DOT"; then
22533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22534 $as_echo "$DOT" >&6; }
22535 else
22536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22537 $as_echo "no" >&6; }
22538 fi
22539 
22540 
22541   test -n "$DOT" && break
22542 done
22543 
22544   else
22545     # The variable is set, but is it from the command line or the environment?
22546 
22547     # Try to remove the string !DOT! from our list.
22548     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DOT!/}
22549     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22550       # If it failed, the variable was not from the command line. Ignore it,
22551       # but warn the user (except for BASH, which is always set by the calling BASH).
22552       if test "xDOT" != xBASH; then
22553         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&5
22554 $as_echo "$as_me: WARNING: Ignoring value of DOT from the environment. Use command line variables instead." >&2;}
22555       fi
22556       # Try to locate tool using the code snippet
22557       for ac_prog in dot
22558 do
22559   # Extract the first word of "$ac_prog", so it can be a program name with args.
22560 set dummy $ac_prog; ac_word=$2
22561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22562 $as_echo_n "checking for $ac_word... " >&6; }
22563 if ${ac_cv_path_DOT+:} false; then :
22564   $as_echo_n "(cached) " >&6
22565 else
22566   case $DOT in
22567   [\\/]* | ?:[\\/]*)
22568   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22569   ;;
22570   *)
22571   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22572 for as_dir in $PATH
22573 do
22574   IFS=$as_save_IFS
22575   test -z "$as_dir" && as_dir=.
22576     for ac_exec_ext in '' $ac_executable_extensions; do
22577   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22578     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22579     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22580     break 2
22581   fi
22582 done
22583   done
22584 IFS=$as_save_IFS
22585 
22586   ;;
22587 esac
22588 fi
22589 DOT=$ac_cv_path_DOT
22590 if test -n "$DOT"; then
22591   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22592 $as_echo "$DOT" >&6; }
22593 else
22594   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22595 $as_echo "no" >&6; }
22596 fi
22597 
22598 
22599   test -n "$DOT" && break
22600 done
22601 
22602     else
22603       # If it succeeded, then it was overridden by the user. We will use it
22604       # for the tool.
22605 
22606       # First remove it from the list of overridden variables, so we can test
22607       # for unknown variables in the end.
22608       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22609 
22610       # Check if we try to supply an empty value
22611       if test "x$DOT" = x; then
22612         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DOT= (no value)" >&5
22613 $as_echo "$as_me: Setting user supplied tool DOT= (no value)" >&6;}
22614         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22615 $as_echo_n "checking for DOT... " >&6; }
22616         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22617 $as_echo "disabled" >&6; }
22618       else
22619         # Check if the provided tool contains a complete path.
22620         tool_specified="$DOT"
22621         tool_basename="${tool_specified##*/}"
22622         if test "x$tool_basename" = "x$tool_specified"; then
22623           # A command without a complete path is provided, search $PATH.
22624           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DOT=$tool_basename" >&5
22625 $as_echo "$as_me: Will search for user supplied tool DOT=$tool_basename" >&6;}
22626           # Extract the first word of "$tool_basename", so it can be a program name with args.
22627 set dummy $tool_basename; ac_word=$2
22628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22629 $as_echo_n "checking for $ac_word... " >&6; }
22630 if ${ac_cv_path_DOT+:} false; then :
22631   $as_echo_n "(cached) " >&6
22632 else
22633   case $DOT in
22634   [\\/]* | ?:[\\/]*)
22635   ac_cv_path_DOT="$DOT" # Let the user override the test with a path.
22636   ;;
22637   *)
22638   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22639 for as_dir in $PATH
22640 do
22641   IFS=$as_save_IFS
22642   test -z "$as_dir" && as_dir=.
22643     for ac_exec_ext in '' $ac_executable_extensions; do
22644   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22645     ac_cv_path_DOT="$as_dir/$ac_word$ac_exec_ext"
22646     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22647     break 2
22648   fi
22649 done
22650   done
22651 IFS=$as_save_IFS
22652 
22653   ;;
22654 esac
22655 fi
22656 DOT=$ac_cv_path_DOT
22657 if test -n "$DOT"; then
22658   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DOT" >&5
22659 $as_echo "$DOT" >&6; }
22660 else
22661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22662 $as_echo "no" >&6; }
22663 fi
22664 
22665 
22666           if test "x$DOT" = x; then
22667             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22668           fi
22669         else
22670           # Otherwise we believe it is a complete path. Use it as it is.
22671           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DOT=$tool_specified" >&5
22672 $as_echo "$as_me: Will use user supplied tool DOT=$tool_specified" >&6;}
22673           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOT" >&5
22674 $as_echo_n "checking for DOT... " >&6; }
22675           if test ! -x "$tool_specified"; then
22676             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22677 $as_echo "not found" >&6; }
22678             as_fn_error $? "User supplied tool DOT=$tool_specified does not exist or is not executable" "$LINENO" 5
22679           fi
22680           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22681 $as_echo "$tool_specified" >&6; }
22682         fi
22683       fi
22684     fi
22685 
22686   fi
22687 
22688 
22689 
22690 
22691   # Publish this variable in the help.
22692 
22693 
22694   if [ -z "${HG+x}" ]; then
22695     # The variable is not set by user, try to locate tool using the code snippet
22696     for ac_prog in hg
22697 do
22698   # Extract the first word of "$ac_prog", so it can be a program name with args.
22699 set dummy $ac_prog; ac_word=$2
22700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22701 $as_echo_n "checking for $ac_word... " >&6; }
22702 if ${ac_cv_path_HG+:} false; then :
22703   $as_echo_n "(cached) " >&6
22704 else
22705   case $HG in
22706   [\\/]* | ?:[\\/]*)
22707   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22708   ;;
22709   *)
22710   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22711 for as_dir in $PATH
22712 do
22713   IFS=$as_save_IFS
22714   test -z "$as_dir" && as_dir=.
22715     for ac_exec_ext in '' $ac_executable_extensions; do
22716   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22717     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22718     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22719     break 2
22720   fi
22721 done
22722   done
22723 IFS=$as_save_IFS
22724 
22725   ;;
22726 esac
22727 fi
22728 HG=$ac_cv_path_HG
22729 if test -n "$HG"; then
22730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22731 $as_echo "$HG" >&6; }
22732 else
22733   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22734 $as_echo "no" >&6; }
22735 fi
22736 
22737 
22738   test -n "$HG" && break
22739 done
22740 
22741   else
22742     # The variable is set, but is it from the command line or the environment?
22743 
22744     # Try to remove the string !HG! from our list.
22745     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22746     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22747       # If it failed, the variable was not from the command line. Ignore it,
22748       # but warn the user (except for BASH, which is always set by the calling BASH).
22749       if test "xHG" != xBASH; then
22750         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22751 $as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22752       fi
22753       # Try to locate tool using the code snippet
22754       for ac_prog in hg
22755 do
22756   # Extract the first word of "$ac_prog", so it can be a program name with args.
22757 set dummy $ac_prog; ac_word=$2
22758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22759 $as_echo_n "checking for $ac_word... " >&6; }
22760 if ${ac_cv_path_HG+:} false; then :
22761   $as_echo_n "(cached) " >&6
22762 else
22763   case $HG in
22764   [\\/]* | ?:[\\/]*)
22765   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22766   ;;
22767   *)
22768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22769 for as_dir in $PATH
22770 do
22771   IFS=$as_save_IFS
22772   test -z "$as_dir" && as_dir=.
22773     for ac_exec_ext in '' $ac_executable_extensions; do
22774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22775     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22777     break 2
22778   fi
22779 done
22780   done
22781 IFS=$as_save_IFS
22782 
22783   ;;
22784 esac
22785 fi
22786 HG=$ac_cv_path_HG
22787 if test -n "$HG"; then
22788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22789 $as_echo "$HG" >&6; }
22790 else
22791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22792 $as_echo "no" >&6; }
22793 fi
22794 
22795 
22796   test -n "$HG" && break
22797 done
22798 
22799     else
22800       # If it succeeded, then it was overridden by the user. We will use it
22801       # for the tool.
22802 
22803       # First remove it from the list of overridden variables, so we can test
22804       # for unknown variables in the end.
22805       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22806 
22807       # Check if we try to supply an empty value
22808       if test "x$HG" = x; then
22809         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22810 $as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22811         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22812 $as_echo_n "checking for HG... " >&6; }
22813         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22814 $as_echo "disabled" >&6; }
22815       else
22816         # Check if the provided tool contains a complete path.
22817         tool_specified="$HG"
22818         tool_basename="${tool_specified##*/}"
22819         if test "x$tool_basename" = "x$tool_specified"; then
22820           # A command without a complete path is provided, search $PATH.
22821           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22822 $as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22823           # Extract the first word of "$tool_basename", so it can be a program name with args.
22824 set dummy $tool_basename; ac_word=$2
22825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22826 $as_echo_n "checking for $ac_word... " >&6; }
22827 if ${ac_cv_path_HG+:} false; then :
22828   $as_echo_n "(cached) " >&6
22829 else
22830   case $HG in
22831   [\\/]* | ?:[\\/]*)
22832   ac_cv_path_HG="$HG" # Let the user override the test with a path.
22833   ;;
22834   *)
22835   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22836 for as_dir in $PATH
22837 do
22838   IFS=$as_save_IFS
22839   test -z "$as_dir" && as_dir=.
22840     for ac_exec_ext in '' $ac_executable_extensions; do
22841   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22842     ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22843     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22844     break 2
22845   fi
22846 done
22847   done
22848 IFS=$as_save_IFS
22849 
22850   ;;
22851 esac
22852 fi
22853 HG=$ac_cv_path_HG
22854 if test -n "$HG"; then
22855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22856 $as_echo "$HG" >&6; }
22857 else
22858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22859 $as_echo "no" >&6; }
22860 fi
22861 
22862 
22863           if test "x$HG" = x; then
22864             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22865           fi
22866         else
22867           # Otherwise we believe it is a complete path. Use it as it is.
22868           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22869 $as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22870           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22871 $as_echo_n "checking for HG... " >&6; }
22872           if test ! -x "$tool_specified"; then
22873             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22874 $as_echo "not found" >&6; }
22875             as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22876           fi
22877           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22878 $as_echo "$tool_specified" >&6; }
22879         fi
22880       fi
22881     fi
22882 
22883   fi
22884 
22885 
22886 
22887 
22888   # Publish this variable in the help.
22889 
22890 
22891   if [ -z "${STAT+x}" ]; then
22892     # The variable is not set by user, try to locate tool using the code snippet
22893     for ac_prog in stat
22894 do
22895   # Extract the first word of "$ac_prog", so it can be a program name with args.
22896 set dummy $ac_prog; ac_word=$2
22897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22898 $as_echo_n "checking for $ac_word... " >&6; }
22899 if ${ac_cv_path_STAT+:} false; then :
22900   $as_echo_n "(cached) " >&6
22901 else
22902   case $STAT in
22903   [\\/]* | ?:[\\/]*)
22904   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22905   ;;
22906   *)
22907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22908 for as_dir in $PATH
22909 do
22910   IFS=$as_save_IFS
22911   test -z "$as_dir" && as_dir=.
22912     for ac_exec_ext in '' $ac_executable_extensions; do
22913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22914     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22916     break 2
22917   fi
22918 done
22919   done
22920 IFS=$as_save_IFS
22921 
22922   ;;
22923 esac
22924 fi
22925 STAT=$ac_cv_path_STAT
22926 if test -n "$STAT"; then
22927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22928 $as_echo "$STAT" >&6; }
22929 else
22930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22931 $as_echo "no" >&6; }
22932 fi
22933 
22934 
22935   test -n "$STAT" && break
22936 done
22937 
22938   else
22939     # The variable is set, but is it from the command line or the environment?
22940 
22941     # Try to remove the string !STAT! from our list.
22942     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22943     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22944       # If it failed, the variable was not from the command line. Ignore it,
22945       # but warn the user (except for BASH, which is always set by the calling BASH).
22946       if test "xSTAT" != xBASH; then
22947         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22948 $as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22949       fi
22950       # Try to locate tool using the code snippet
22951       for ac_prog in stat
22952 do
22953   # Extract the first word of "$ac_prog", so it can be a program name with args.
22954 set dummy $ac_prog; ac_word=$2
22955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22956 $as_echo_n "checking for $ac_word... " >&6; }
22957 if ${ac_cv_path_STAT+:} false; then :
22958   $as_echo_n "(cached) " >&6
22959 else
22960   case $STAT in
22961   [\\/]* | ?:[\\/]*)
22962   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22963   ;;
22964   *)
22965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22966 for as_dir in $PATH
22967 do
22968   IFS=$as_save_IFS
22969   test -z "$as_dir" && as_dir=.
22970     for ac_exec_ext in '' $ac_executable_extensions; do
22971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22972     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22974     break 2
22975   fi
22976 done
22977   done
22978 IFS=$as_save_IFS
22979 
22980   ;;
22981 esac
22982 fi
22983 STAT=$ac_cv_path_STAT
22984 if test -n "$STAT"; then
22985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22986 $as_echo "$STAT" >&6; }
22987 else
22988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22989 $as_echo "no" >&6; }
22990 fi
22991 
22992 
22993   test -n "$STAT" && break
22994 done
22995 
22996     else
22997       # If it succeeded, then it was overridden by the user. We will use it
22998       # for the tool.
22999 
23000       # First remove it from the list of overridden variables, so we can test
23001       # for unknown variables in the end.
23002       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23003 
23004       # Check if we try to supply an empty value
23005       if test "x$STAT" = x; then
23006         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
23007 $as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
23008         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23009 $as_echo_n "checking for STAT... " >&6; }
23010         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23011 $as_echo "disabled" >&6; }
23012       else
23013         # Check if the provided tool contains a complete path.
23014         tool_specified="$STAT"
23015         tool_basename="${tool_specified##*/}"
23016         if test "x$tool_basename" = "x$tool_specified"; then
23017           # A command without a complete path is provided, search $PATH.
23018           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
23019 $as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
23020           # Extract the first word of "$tool_basename", so it can be a program name with args.
23021 set dummy $tool_basename; ac_word=$2
23022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23023 $as_echo_n "checking for $ac_word... " >&6; }
23024 if ${ac_cv_path_STAT+:} false; then :
23025   $as_echo_n "(cached) " >&6
23026 else
23027   case $STAT in
23028   [\\/]* | ?:[\\/]*)
23029   ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
23030   ;;
23031   *)
23032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23033 for as_dir in $PATH
23034 do
23035   IFS=$as_save_IFS
23036   test -z "$as_dir" && as_dir=.
23037     for ac_exec_ext in '' $ac_executable_extensions; do
23038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23039     ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
23040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23041     break 2
23042   fi
23043 done
23044   done
23045 IFS=$as_save_IFS
23046 
23047   ;;
23048 esac
23049 fi
23050 STAT=$ac_cv_path_STAT
23051 if test -n "$STAT"; then
23052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
23053 $as_echo "$STAT" >&6; }
23054 else
23055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23056 $as_echo "no" >&6; }
23057 fi
23058 
23059 
23060           if test "x$STAT" = x; then
23061             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23062           fi
23063         else
23064           # Otherwise we believe it is a complete path. Use it as it is.
23065           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
23066 $as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
23067           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
23068 $as_echo_n "checking for STAT... " >&6; }
23069           if test ! -x "$tool_specified"; then
23070             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23071 $as_echo "not found" >&6; }
23072             as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
23073           fi
23074           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23075 $as_echo "$tool_specified" >&6; }
23076         fi
23077       fi
23078     fi
23079 
23080   fi
23081 
23082 
23083 
23084 
23085   # Publish this variable in the help.
23086 
23087 
23088   if [ -z "${TIME+x}" ]; then
23089     # The variable is not set by user, try to locate tool using the code snippet
23090     for ac_prog in time
23091 do
23092   # Extract the first word of "$ac_prog", so it can be a program name with args.
23093 set dummy $ac_prog; ac_word=$2
23094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23095 $as_echo_n "checking for $ac_word... " >&6; }
23096 if ${ac_cv_path_TIME+:} false; then :
23097   $as_echo_n "(cached) " >&6
23098 else
23099   case $TIME in
23100   [\\/]* | ?:[\\/]*)
23101   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23102   ;;
23103   *)
23104   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23105 for as_dir in $PATH
23106 do
23107   IFS=$as_save_IFS
23108   test -z "$as_dir" && as_dir=.
23109     for ac_exec_ext in '' $ac_executable_extensions; do
23110   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23111     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23112     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23113     break 2
23114   fi
23115 done
23116   done
23117 IFS=$as_save_IFS
23118 
23119   ;;
23120 esac
23121 fi
23122 TIME=$ac_cv_path_TIME
23123 if test -n "$TIME"; then
23124   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23125 $as_echo "$TIME" >&6; }
23126 else
23127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23128 $as_echo "no" >&6; }
23129 fi
23130 
23131 
23132   test -n "$TIME" && break
23133 done
23134 
23135   else
23136     # The variable is set, but is it from the command line or the environment?
23137 
23138     # Try to remove the string !TIME! from our list.
23139     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
23140     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23141       # If it failed, the variable was not from the command line. Ignore it,
23142       # but warn the user (except for BASH, which is always set by the calling BASH).
23143       if test "xTIME" != xBASH; then
23144         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
23145 $as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
23146       fi
23147       # Try to locate tool using the code snippet
23148       for ac_prog in time
23149 do
23150   # Extract the first word of "$ac_prog", so it can be a program name with args.
23151 set dummy $ac_prog; ac_word=$2
23152 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23153 $as_echo_n "checking for $ac_word... " >&6; }
23154 if ${ac_cv_path_TIME+:} false; then :
23155   $as_echo_n "(cached) " >&6
23156 else
23157   case $TIME in
23158   [\\/]* | ?:[\\/]*)
23159   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23160   ;;
23161   *)
23162   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23163 for as_dir in $PATH
23164 do
23165   IFS=$as_save_IFS
23166   test -z "$as_dir" && as_dir=.
23167     for ac_exec_ext in '' $ac_executable_extensions; do
23168   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23169     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23170     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23171     break 2
23172   fi
23173 done
23174   done
23175 IFS=$as_save_IFS
23176 
23177   ;;
23178 esac
23179 fi
23180 TIME=$ac_cv_path_TIME
23181 if test -n "$TIME"; then
23182   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23183 $as_echo "$TIME" >&6; }
23184 else
23185   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23186 $as_echo "no" >&6; }
23187 fi
23188 
23189 
23190   test -n "$TIME" && break
23191 done
23192 
23193     else
23194       # If it succeeded, then it was overridden by the user. We will use it
23195       # for the tool.
23196 
23197       # First remove it from the list of overridden variables, so we can test
23198       # for unknown variables in the end.
23199       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23200 
23201       # Check if we try to supply an empty value
23202       if test "x$TIME" = x; then
23203         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
23204 $as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
23205         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23206 $as_echo_n "checking for TIME... " >&6; }
23207         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23208 $as_echo "disabled" >&6; }
23209       else
23210         # Check if the provided tool contains a complete path.
23211         tool_specified="$TIME"
23212         tool_basename="${tool_specified##*/}"
23213         if test "x$tool_basename" = "x$tool_specified"; then
23214           # A command without a complete path is provided, search $PATH.
23215           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
23216 $as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
23217           # Extract the first word of "$tool_basename", so it can be a program name with args.
23218 set dummy $tool_basename; ac_word=$2
23219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23220 $as_echo_n "checking for $ac_word... " >&6; }
23221 if ${ac_cv_path_TIME+:} false; then :
23222   $as_echo_n "(cached) " >&6
23223 else
23224   case $TIME in
23225   [\\/]* | ?:[\\/]*)
23226   ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
23227   ;;
23228   *)
23229   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23230 for as_dir in $PATH
23231 do
23232   IFS=$as_save_IFS
23233   test -z "$as_dir" && as_dir=.
23234     for ac_exec_ext in '' $ac_executable_extensions; do
23235   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23236     ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
23237     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23238     break 2
23239   fi
23240 done
23241   done
23242 IFS=$as_save_IFS
23243 
23244   ;;
23245 esac
23246 fi
23247 TIME=$ac_cv_path_TIME
23248 if test -n "$TIME"; then
23249   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
23250 $as_echo "$TIME" >&6; }
23251 else
23252   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23253 $as_echo "no" >&6; }
23254 fi
23255 
23256 
23257           if test "x$TIME" = x; then
23258             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23259           fi
23260         else
23261           # Otherwise we believe it is a complete path. Use it as it is.
23262           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23263 $as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23264           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23265 $as_echo_n "checking for TIME... " >&6; }
23266           if test ! -x "$tool_specified"; then
23267             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23268 $as_echo "not found" >&6; }
23269             as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23270           fi
23271           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23272 $as_echo "$tool_specified" >&6; }
23273         fi
23274       fi
23275     fi
23276 
23277   fi
23278 
23279 
23280 
23281 
23282   # Publish this variable in the help.
23283 
23284 
23285   if [ -z "${FLOCK+x}" ]; then
23286     # The variable is not set by user, try to locate tool using the code snippet
23287     for ac_prog in flock
23288 do
23289   # Extract the first word of "$ac_prog", so it can be a program name with args.
23290 set dummy $ac_prog; ac_word=$2
23291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23292 $as_echo_n "checking for $ac_word... " >&6; }
23293 if ${ac_cv_path_FLOCK+:} false; then :
23294   $as_echo_n "(cached) " >&6
23295 else
23296   case $FLOCK in
23297   [\\/]* | ?:[\\/]*)
23298   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23299   ;;
23300   *)
23301   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23302 for as_dir in $PATH
23303 do
23304   IFS=$as_save_IFS
23305   test -z "$as_dir" && as_dir=.
23306     for ac_exec_ext in '' $ac_executable_extensions; do
23307   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23308     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23309     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23310     break 2
23311   fi
23312 done
23313   done
23314 IFS=$as_save_IFS
23315 
23316   ;;
23317 esac
23318 fi
23319 FLOCK=$ac_cv_path_FLOCK
23320 if test -n "$FLOCK"; then
23321   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23322 $as_echo "$FLOCK" >&6; }
23323 else
23324   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23325 $as_echo "no" >&6; }
23326 fi
23327 
23328 
23329   test -n "$FLOCK" && break
23330 done
23331 
23332   else
23333     # The variable is set, but is it from the command line or the environment?
23334 
23335     # Try to remove the string !FLOCK! from our list.
23336     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FLOCK!/}
23337     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23338       # If it failed, the variable was not from the command line. Ignore it,
23339       # but warn the user (except for BASH, which is always set by the calling BASH).
23340       if test "xFLOCK" != xBASH; then
23341         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&5
23342 $as_echo "$as_me: WARNING: Ignoring value of FLOCK from the environment. Use command line variables instead." >&2;}
23343       fi
23344       # Try to locate tool using the code snippet
23345       for ac_prog in flock
23346 do
23347   # Extract the first word of "$ac_prog", so it can be a program name with args.
23348 set dummy $ac_prog; ac_word=$2
23349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23350 $as_echo_n "checking for $ac_word... " >&6; }
23351 if ${ac_cv_path_FLOCK+:} false; then :
23352   $as_echo_n "(cached) " >&6
23353 else
23354   case $FLOCK in
23355   [\\/]* | ?:[\\/]*)
23356   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23357   ;;
23358   *)
23359   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23360 for as_dir in $PATH
23361 do
23362   IFS=$as_save_IFS
23363   test -z "$as_dir" && as_dir=.
23364     for ac_exec_ext in '' $ac_executable_extensions; do
23365   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23366     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23367     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23368     break 2
23369   fi
23370 done
23371   done
23372 IFS=$as_save_IFS
23373 
23374   ;;
23375 esac
23376 fi
23377 FLOCK=$ac_cv_path_FLOCK
23378 if test -n "$FLOCK"; then
23379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23380 $as_echo "$FLOCK" >&6; }
23381 else
23382   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23383 $as_echo "no" >&6; }
23384 fi
23385 
23386 
23387   test -n "$FLOCK" && break
23388 done
23389 
23390     else
23391       # If it succeeded, then it was overridden by the user. We will use it
23392       # for the tool.
23393 
23394       # First remove it from the list of overridden variables, so we can test
23395       # for unknown variables in the end.
23396       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23397 
23398       # Check if we try to supply an empty value
23399       if test "x$FLOCK" = x; then
23400         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FLOCK= (no value)" >&5
23401 $as_echo "$as_me: Setting user supplied tool FLOCK= (no value)" >&6;}
23402         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23403 $as_echo_n "checking for FLOCK... " >&6; }
23404         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23405 $as_echo "disabled" >&6; }
23406       else
23407         # Check if the provided tool contains a complete path.
23408         tool_specified="$FLOCK"
23409         tool_basename="${tool_specified##*/}"
23410         if test "x$tool_basename" = "x$tool_specified"; then
23411           # A command without a complete path is provided, search $PATH.
23412           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FLOCK=$tool_basename" >&5
23413 $as_echo "$as_me: Will search for user supplied tool FLOCK=$tool_basename" >&6;}
23414           # Extract the first word of "$tool_basename", so it can be a program name with args.
23415 set dummy $tool_basename; ac_word=$2
23416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23417 $as_echo_n "checking for $ac_word... " >&6; }
23418 if ${ac_cv_path_FLOCK+:} false; then :
23419   $as_echo_n "(cached) " >&6
23420 else
23421   case $FLOCK in
23422   [\\/]* | ?:[\\/]*)
23423   ac_cv_path_FLOCK="$FLOCK" # Let the user override the test with a path.
23424   ;;
23425   *)
23426   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23427 for as_dir in $PATH
23428 do
23429   IFS=$as_save_IFS
23430   test -z "$as_dir" && as_dir=.
23431     for ac_exec_ext in '' $ac_executable_extensions; do
23432   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23433     ac_cv_path_FLOCK="$as_dir/$ac_word$ac_exec_ext"
23434     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23435     break 2
23436   fi
23437 done
23438   done
23439 IFS=$as_save_IFS
23440 
23441   ;;
23442 esac
23443 fi
23444 FLOCK=$ac_cv_path_FLOCK
23445 if test -n "$FLOCK"; then
23446   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLOCK" >&5
23447 $as_echo "$FLOCK" >&6; }
23448 else
23449   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23450 $as_echo "no" >&6; }
23451 fi
23452 
23453 
23454           if test "x$FLOCK" = x; then
23455             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23456           fi
23457         else
23458           # Otherwise we believe it is a complete path. Use it as it is.
23459           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FLOCK=$tool_specified" >&5
23460 $as_echo "$as_me: Will use user supplied tool FLOCK=$tool_specified" >&6;}
23461           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLOCK" >&5
23462 $as_echo_n "checking for FLOCK... " >&6; }
23463           if test ! -x "$tool_specified"; then
23464             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23465 $as_echo "not found" >&6; }
23466             as_fn_error $? "User supplied tool FLOCK=$tool_specified does not exist or is not executable" "$LINENO" 5
23467           fi
23468           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23469 $as_echo "$tool_specified" >&6; }
23470         fi
23471       fi
23472     fi
23473 
23474   fi
23475 
23476 
23477   # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23478   # be in the user path.
23479 
23480 
23481   # Publish this variable in the help.
23482 
23483 
23484   if [ -z "${DTRACE+x}" ]; then
23485     # The variable is not set by user, try to locate tool using the code snippet
23486     for ac_prog in dtrace
23487 do
23488   # Extract the first word of "$ac_prog", so it can be a program name with args.
23489 set dummy $ac_prog; ac_word=$2
23490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23491 $as_echo_n "checking for $ac_word... " >&6; }
23492 if ${ac_cv_path_DTRACE+:} false; then :
23493   $as_echo_n "(cached) " >&6
23494 else
23495   case $DTRACE in
23496   [\\/]* | ?:[\\/]*)
23497   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23498   ;;
23499   *)
23500   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23501 as_dummy="$PATH:/usr/sbin"
23502 for as_dir in $as_dummy
23503 do
23504   IFS=$as_save_IFS
23505   test -z "$as_dir" && as_dir=.
23506     for ac_exec_ext in '' $ac_executable_extensions; do
23507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23508     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23510     break 2
23511   fi
23512 done
23513   done
23514 IFS=$as_save_IFS
23515 
23516   ;;
23517 esac
23518 fi
23519 DTRACE=$ac_cv_path_DTRACE
23520 if test -n "$DTRACE"; then
23521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23522 $as_echo "$DTRACE" >&6; }
23523 else
23524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23525 $as_echo "no" >&6; }
23526 fi
23527 
23528 
23529   test -n "$DTRACE" && break
23530 done
23531 
23532   else
23533     # The variable is set, but is it from the command line or the environment?
23534 
23535     # Try to remove the string !DTRACE! from our list.
23536     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23537     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23538       # If it failed, the variable was not from the command line. Ignore it,
23539       # but warn the user (except for BASH, which is always set by the calling BASH).
23540       if test "xDTRACE" != xBASH; then
23541         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23542 $as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23543       fi
23544       # Try to locate tool using the code snippet
23545       for ac_prog in dtrace
23546 do
23547   # Extract the first word of "$ac_prog", so it can be a program name with args.
23548 set dummy $ac_prog; ac_word=$2
23549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23550 $as_echo_n "checking for $ac_word... " >&6; }
23551 if ${ac_cv_path_DTRACE+:} false; then :
23552   $as_echo_n "(cached) " >&6
23553 else
23554   case $DTRACE in
23555   [\\/]* | ?:[\\/]*)
23556   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23557   ;;
23558   *)
23559   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23560 as_dummy="$PATH:/usr/sbin"
23561 for as_dir in $as_dummy
23562 do
23563   IFS=$as_save_IFS
23564   test -z "$as_dir" && as_dir=.
23565     for ac_exec_ext in '' $ac_executable_extensions; do
23566   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23567     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23568     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23569     break 2
23570   fi
23571 done
23572   done
23573 IFS=$as_save_IFS
23574 
23575   ;;
23576 esac
23577 fi
23578 DTRACE=$ac_cv_path_DTRACE
23579 if test -n "$DTRACE"; then
23580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23581 $as_echo "$DTRACE" >&6; }
23582 else
23583   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23584 $as_echo "no" >&6; }
23585 fi
23586 
23587 
23588   test -n "$DTRACE" && break
23589 done
23590 
23591     else
23592       # If it succeeded, then it was overridden by the user. We will use it
23593       # for the tool.
23594 
23595       # First remove it from the list of overridden variables, so we can test
23596       # for unknown variables in the end.
23597       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23598 
23599       # Check if we try to supply an empty value
23600       if test "x$DTRACE" = x; then
23601         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23602 $as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23603         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23604 $as_echo_n "checking for DTRACE... " >&6; }
23605         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23606 $as_echo "disabled" >&6; }
23607       else
23608         # Check if the provided tool contains a complete path.
23609         tool_specified="$DTRACE"
23610         tool_basename="${tool_specified##*/}"
23611         if test "x$tool_basename" = "x$tool_specified"; then
23612           # A command without a complete path is provided, search $PATH.
23613           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23614 $as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23615           # Extract the first word of "$tool_basename", so it can be a program name with args.
23616 set dummy $tool_basename; ac_word=$2
23617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23618 $as_echo_n "checking for $ac_word... " >&6; }
23619 if ${ac_cv_path_DTRACE+:} false; then :
23620   $as_echo_n "(cached) " >&6
23621 else
23622   case $DTRACE in
23623   [\\/]* | ?:[\\/]*)
23624   ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23625   ;;
23626   *)
23627   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23628 for as_dir in $PATH
23629 do
23630   IFS=$as_save_IFS
23631   test -z "$as_dir" && as_dir=.
23632     for ac_exec_ext in '' $ac_executable_extensions; do
23633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23634     ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23636     break 2
23637   fi
23638 done
23639   done
23640 IFS=$as_save_IFS
23641 
23642   ;;
23643 esac
23644 fi
23645 DTRACE=$ac_cv_path_DTRACE
23646 if test -n "$DTRACE"; then
23647   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23648 $as_echo "$DTRACE" >&6; }
23649 else
23650   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23651 $as_echo "no" >&6; }
23652 fi
23653 
23654 
23655           if test "x$DTRACE" = x; then
23656             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23657           fi
23658         else
23659           # Otherwise we believe it is a complete path. Use it as it is.
23660           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23661 $as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23662           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23663 $as_echo_n "checking for DTRACE... " >&6; }
23664           if test ! -x "$tool_specified"; then
23665             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23666 $as_echo "not found" >&6; }
23667             as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23668           fi
23669           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23670 $as_echo "$tool_specified" >&6; }
23671         fi
23672       fi
23673     fi
23674 
23675   fi
23676 
23677 
23678 
23679 
23680   # Publish this variable in the help.
23681 
23682 
23683   if [ -z "${PATCH+x}" ]; then
23684     # The variable is not set by user, try to locate tool using the code snippet
23685     for ac_prog in gpatch patch
23686 do
23687   # Extract the first word of "$ac_prog", so it can be a program name with args.
23688 set dummy $ac_prog; ac_word=$2
23689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23690 $as_echo_n "checking for $ac_word... " >&6; }
23691 if ${ac_cv_path_PATCH+:} false; then :
23692   $as_echo_n "(cached) " >&6
23693 else
23694   case $PATCH in
23695   [\\/]* | ?:[\\/]*)
23696   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23697   ;;
23698   *)
23699   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23700 for as_dir in $PATH
23701 do
23702   IFS=$as_save_IFS
23703   test -z "$as_dir" && as_dir=.
23704     for ac_exec_ext in '' $ac_executable_extensions; do
23705   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23706     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23707     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23708     break 2
23709   fi
23710 done
23711   done
23712 IFS=$as_save_IFS
23713 
23714   ;;
23715 esac
23716 fi
23717 PATCH=$ac_cv_path_PATCH
23718 if test -n "$PATCH"; then
23719   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23720 $as_echo "$PATCH" >&6; }
23721 else
23722   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23723 $as_echo "no" >&6; }
23724 fi
23725 
23726 
23727   test -n "$PATCH" && break
23728 done
23729 
23730   else
23731     # The variable is set, but is it from the command line or the environment?
23732 
23733     # Try to remove the string !PATCH! from our list.
23734     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23735     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23736       # If it failed, the variable was not from the command line. Ignore it,
23737       # but warn the user (except for BASH, which is always set by the calling BASH).
23738       if test "xPATCH" != xBASH; then
23739         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23740 $as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23741       fi
23742       # Try to locate tool using the code snippet
23743       for ac_prog in gpatch patch
23744 do
23745   # Extract the first word of "$ac_prog", so it can be a program name with args.
23746 set dummy $ac_prog; ac_word=$2
23747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23748 $as_echo_n "checking for $ac_word... " >&6; }
23749 if ${ac_cv_path_PATCH+:} false; then :
23750   $as_echo_n "(cached) " >&6
23751 else
23752   case $PATCH in
23753   [\\/]* | ?:[\\/]*)
23754   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23755   ;;
23756   *)
23757   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23758 for as_dir in $PATH
23759 do
23760   IFS=$as_save_IFS
23761   test -z "$as_dir" && as_dir=.
23762     for ac_exec_ext in '' $ac_executable_extensions; do
23763   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23764     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23765     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23766     break 2
23767   fi
23768 done
23769   done
23770 IFS=$as_save_IFS
23771 
23772   ;;
23773 esac
23774 fi
23775 PATCH=$ac_cv_path_PATCH
23776 if test -n "$PATCH"; then
23777   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23778 $as_echo "$PATCH" >&6; }
23779 else
23780   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23781 $as_echo "no" >&6; }
23782 fi
23783 
23784 
23785   test -n "$PATCH" && break
23786 done
23787 
23788     else
23789       # If it succeeded, then it was overridden by the user. We will use it
23790       # for the tool.
23791 
23792       # First remove it from the list of overridden variables, so we can test
23793       # for unknown variables in the end.
23794       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23795 
23796       # Check if we try to supply an empty value
23797       if test "x$PATCH" = x; then
23798         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23799 $as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23800         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23801 $as_echo_n "checking for PATCH... " >&6; }
23802         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23803 $as_echo "disabled" >&6; }
23804       else
23805         # Check if the provided tool contains a complete path.
23806         tool_specified="$PATCH"
23807         tool_basename="${tool_specified##*/}"
23808         if test "x$tool_basename" = "x$tool_specified"; then
23809           # A command without a complete path is provided, search $PATH.
23810           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23811 $as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23812           # Extract the first word of "$tool_basename", so it can be a program name with args.
23813 set dummy $tool_basename; ac_word=$2
23814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23815 $as_echo_n "checking for $ac_word... " >&6; }
23816 if ${ac_cv_path_PATCH+:} false; then :
23817   $as_echo_n "(cached) " >&6
23818 else
23819   case $PATCH in
23820   [\\/]* | ?:[\\/]*)
23821   ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23822   ;;
23823   *)
23824   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23825 for as_dir in $PATH
23826 do
23827   IFS=$as_save_IFS
23828   test -z "$as_dir" && as_dir=.
23829     for ac_exec_ext in '' $ac_executable_extensions; do
23830   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23831     ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23832     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23833     break 2
23834   fi
23835 done
23836   done
23837 IFS=$as_save_IFS
23838 
23839   ;;
23840 esac
23841 fi
23842 PATCH=$ac_cv_path_PATCH
23843 if test -n "$PATCH"; then
23844   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23845 $as_echo "$PATCH" >&6; }
23846 else
23847   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23848 $as_echo "no" >&6; }
23849 fi
23850 
23851 
23852           if test "x$PATCH" = x; then
23853             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23854           fi
23855         else
23856           # Otherwise we believe it is a complete path. Use it as it is.
23857           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23858 $as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23859           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23860 $as_echo_n "checking for PATCH... " >&6; }
23861           if test ! -x "$tool_specified"; then
23862             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23863 $as_echo "not found" >&6; }
23864             as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23865           fi
23866           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23867 $as_echo "$tool_specified" >&6; }
23868         fi
23869       fi
23870     fi
23871 
23872   fi
23873 
23874 
23875   # Check if it's GNU time
23876   IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23877   if test "x$IS_GNU_TIME" != x; then
23878     IS_GNU_TIME=yes
23879   else
23880     IS_GNU_TIME=no
23881   fi
23882 
23883 
23884   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23885 
23886 
23887 
23888   # Publish this variable in the help.
23889 
23890 
23891   if [ -z "${DSYMUTIL+x}" ]; then
23892     # The variable is not set by user, try to locate tool using the code snippet
23893     for ac_prog in dsymutil
23894 do
23895   # Extract the first word of "$ac_prog", so it can be a program name with args.
23896 set dummy $ac_prog; ac_word=$2
23897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23898 $as_echo_n "checking for $ac_word... " >&6; }
23899 if ${ac_cv_path_DSYMUTIL+:} false; then :
23900   $as_echo_n "(cached) " >&6
23901 else
23902   case $DSYMUTIL in
23903   [\\/]* | ?:[\\/]*)
23904   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23905   ;;
23906   *)
23907   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23908 for as_dir in $PATH
23909 do
23910   IFS=$as_save_IFS
23911   test -z "$as_dir" && as_dir=.
23912     for ac_exec_ext in '' $ac_executable_extensions; do
23913   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23914     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23915     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23916     break 2
23917   fi
23918 done
23919   done
23920 IFS=$as_save_IFS
23921 
23922   ;;
23923 esac
23924 fi
23925 DSYMUTIL=$ac_cv_path_DSYMUTIL
23926 if test -n "$DSYMUTIL"; then
23927   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23928 $as_echo "$DSYMUTIL" >&6; }
23929 else
23930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23931 $as_echo "no" >&6; }
23932 fi
23933 
23934 
23935   test -n "$DSYMUTIL" && break
23936 done
23937 
23938   else
23939     # The variable is set, but is it from the command line or the environment?
23940 
23941     # Try to remove the string !DSYMUTIL! from our list.
23942     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23943     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23944       # If it failed, the variable was not from the command line. Ignore it,
23945       # but warn the user (except for BASH, which is always set by the calling BASH).
23946       if test "xDSYMUTIL" != xBASH; then
23947         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23948 $as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23949       fi
23950       # Try to locate tool using the code snippet
23951       for ac_prog in dsymutil
23952 do
23953   # Extract the first word of "$ac_prog", so it can be a program name with args.
23954 set dummy $ac_prog; ac_word=$2
23955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23956 $as_echo_n "checking for $ac_word... " >&6; }
23957 if ${ac_cv_path_DSYMUTIL+:} false; then :
23958   $as_echo_n "(cached) " >&6
23959 else
23960   case $DSYMUTIL in
23961   [\\/]* | ?:[\\/]*)
23962   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23963   ;;
23964   *)
23965   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23966 for as_dir in $PATH
23967 do
23968   IFS=$as_save_IFS
23969   test -z "$as_dir" && as_dir=.
23970     for ac_exec_ext in '' $ac_executable_extensions; do
23971   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23972     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23973     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23974     break 2
23975   fi
23976 done
23977   done
23978 IFS=$as_save_IFS
23979 
23980   ;;
23981 esac
23982 fi
23983 DSYMUTIL=$ac_cv_path_DSYMUTIL
23984 if test -n "$DSYMUTIL"; then
23985   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23986 $as_echo "$DSYMUTIL" >&6; }
23987 else
23988   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23989 $as_echo "no" >&6; }
23990 fi
23991 
23992 
23993   test -n "$DSYMUTIL" && break
23994 done
23995 
23996     else
23997       # If it succeeded, then it was overridden by the user. We will use it
23998       # for the tool.
23999 
24000       # First remove it from the list of overridden variables, so we can test
24001       # for unknown variables in the end.
24002       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24003 
24004       # Check if we try to supply an empty value
24005       if test "x$DSYMUTIL" = x; then
24006         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
24007 $as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
24008         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24009 $as_echo_n "checking for DSYMUTIL... " >&6; }
24010         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24011 $as_echo "disabled" >&6; }
24012       else
24013         # Check if the provided tool contains a complete path.
24014         tool_specified="$DSYMUTIL"
24015         tool_basename="${tool_specified##*/}"
24016         if test "x$tool_basename" = "x$tool_specified"; then
24017           # A command without a complete path is provided, search $PATH.
24018           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
24019 $as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
24020           # Extract the first word of "$tool_basename", so it can be a program name with args.
24021 set dummy $tool_basename; ac_word=$2
24022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24023 $as_echo_n "checking for $ac_word... " >&6; }
24024 if ${ac_cv_path_DSYMUTIL+:} false; then :
24025   $as_echo_n "(cached) " >&6
24026 else
24027   case $DSYMUTIL in
24028   [\\/]* | ?:[\\/]*)
24029   ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
24030   ;;
24031   *)
24032   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24033 for as_dir in $PATH
24034 do
24035   IFS=$as_save_IFS
24036   test -z "$as_dir" && as_dir=.
24037     for ac_exec_ext in '' $ac_executable_extensions; do
24038   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24039     ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
24040     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24041     break 2
24042   fi
24043 done
24044   done
24045 IFS=$as_save_IFS
24046 
24047   ;;
24048 esac
24049 fi
24050 DSYMUTIL=$ac_cv_path_DSYMUTIL
24051 if test -n "$DSYMUTIL"; then
24052   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
24053 $as_echo "$DSYMUTIL" >&6; }
24054 else
24055   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24056 $as_echo "no" >&6; }
24057 fi
24058 
24059 
24060           if test "x$DSYMUTIL" = x; then
24061             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24062           fi
24063         else
24064           # Otherwise we believe it is a complete path. Use it as it is.
24065           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
24066 $as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
24067           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
24068 $as_echo_n "checking for DSYMUTIL... " >&6; }
24069           if test ! -x "$tool_specified"; then
24070             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24071 $as_echo "not found" >&6; }
24072             as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
24073           fi
24074           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24075 $as_echo "$tool_specified" >&6; }
24076         fi
24077       fi
24078     fi
24079 
24080   fi
24081 
24082 
24083 
24084   if test "x$DSYMUTIL" = x; then
24085     as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
24086   fi
24087 
24088 
24089 
24090 
24091 
24092   # Publish this variable in the help.
24093 
24094 
24095   if [ -z "${XATTR+x}" ]; then
24096     # The variable is not set by user, try to locate tool using the code snippet
24097     for ac_prog in xattr
24098 do
24099   # Extract the first word of "$ac_prog", so it can be a program name with args.
24100 set dummy $ac_prog; ac_word=$2
24101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24102 $as_echo_n "checking for $ac_word... " >&6; }
24103 if ${ac_cv_path_XATTR+:} false; then :
24104   $as_echo_n "(cached) " >&6
24105 else
24106   case $XATTR in
24107   [\\/]* | ?:[\\/]*)
24108   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24109   ;;
24110   *)
24111   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24112 for as_dir in $PATH
24113 do
24114   IFS=$as_save_IFS
24115   test -z "$as_dir" && as_dir=.
24116     for ac_exec_ext in '' $ac_executable_extensions; do
24117   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24118     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24119     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24120     break 2
24121   fi
24122 done
24123   done
24124 IFS=$as_save_IFS
24125 
24126   ;;
24127 esac
24128 fi
24129 XATTR=$ac_cv_path_XATTR
24130 if test -n "$XATTR"; then
24131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24132 $as_echo "$XATTR" >&6; }
24133 else
24134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24135 $as_echo "no" >&6; }
24136 fi
24137 
24138 
24139   test -n "$XATTR" && break
24140 done
24141 
24142   else
24143     # The variable is set, but is it from the command line or the environment?
24144 
24145     # Try to remove the string !XATTR! from our list.
24146     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
24147     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24148       # If it failed, the variable was not from the command line. Ignore it,
24149       # but warn the user (except for BASH, which is always set by the calling BASH).
24150       if test "xXATTR" != xBASH; then
24151         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
24152 $as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
24153       fi
24154       # Try to locate tool using the code snippet
24155       for ac_prog in xattr
24156 do
24157   # Extract the first word of "$ac_prog", so it can be a program name with args.
24158 set dummy $ac_prog; ac_word=$2
24159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24160 $as_echo_n "checking for $ac_word... " >&6; }
24161 if ${ac_cv_path_XATTR+:} false; then :
24162   $as_echo_n "(cached) " >&6
24163 else
24164   case $XATTR in
24165   [\\/]* | ?:[\\/]*)
24166   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24167   ;;
24168   *)
24169   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24170 for as_dir in $PATH
24171 do
24172   IFS=$as_save_IFS
24173   test -z "$as_dir" && as_dir=.
24174     for ac_exec_ext in '' $ac_executable_extensions; do
24175   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24176     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24177     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24178     break 2
24179   fi
24180 done
24181   done
24182 IFS=$as_save_IFS
24183 
24184   ;;
24185 esac
24186 fi
24187 XATTR=$ac_cv_path_XATTR
24188 if test -n "$XATTR"; then
24189   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24190 $as_echo "$XATTR" >&6; }
24191 else
24192   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24193 $as_echo "no" >&6; }
24194 fi
24195 
24196 
24197   test -n "$XATTR" && break
24198 done
24199 
24200     else
24201       # If it succeeded, then it was overridden by the user. We will use it
24202       # for the tool.
24203 
24204       # First remove it from the list of overridden variables, so we can test
24205       # for unknown variables in the end.
24206       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24207 
24208       # Check if we try to supply an empty value
24209       if test "x$XATTR" = x; then
24210         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
24211 $as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
24212         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24213 $as_echo_n "checking for XATTR... " >&6; }
24214         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24215 $as_echo "disabled" >&6; }
24216       else
24217         # Check if the provided tool contains a complete path.
24218         tool_specified="$XATTR"
24219         tool_basename="${tool_specified##*/}"
24220         if test "x$tool_basename" = "x$tool_specified"; then
24221           # A command without a complete path is provided, search $PATH.
24222           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
24223 $as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
24224           # Extract the first word of "$tool_basename", so it can be a program name with args.
24225 set dummy $tool_basename; ac_word=$2
24226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24227 $as_echo_n "checking for $ac_word... " >&6; }
24228 if ${ac_cv_path_XATTR+:} false; then :
24229   $as_echo_n "(cached) " >&6
24230 else
24231   case $XATTR in
24232   [\\/]* | ?:[\\/]*)
24233   ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
24234   ;;
24235   *)
24236   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24237 for as_dir in $PATH
24238 do
24239   IFS=$as_save_IFS
24240   test -z "$as_dir" && as_dir=.
24241     for ac_exec_ext in '' $ac_executable_extensions; do
24242   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24243     ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
24244     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24245     break 2
24246   fi
24247 done
24248   done
24249 IFS=$as_save_IFS
24250 
24251   ;;
24252 esac
24253 fi
24254 XATTR=$ac_cv_path_XATTR
24255 if test -n "$XATTR"; then
24256   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
24257 $as_echo "$XATTR" >&6; }
24258 else
24259   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24260 $as_echo "no" >&6; }
24261 fi
24262 
24263 
24264           if test "x$XATTR" = x; then
24265             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24266           fi
24267         else
24268           # Otherwise we believe it is a complete path. Use it as it is.
24269           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
24270 $as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
24271           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
24272 $as_echo_n "checking for XATTR... " >&6; }
24273           if test ! -x "$tool_specified"; then
24274             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24275 $as_echo "not found" >&6; }
24276             as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
24277           fi
24278           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24279 $as_echo "$tool_specified" >&6; }
24280         fi
24281       fi
24282     fi
24283 
24284   fi
24285 
24286 
24287 
24288   if test "x$XATTR" = x; then
24289     as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
24290   fi
24291 
24292 
24293 
24294 
24295   # Publish this variable in the help.
24296 
24297 
24298   if [ -z "${CODESIGN+x}" ]; then
24299     # The variable is not set by user, try to locate tool using the code snippet
24300     for ac_prog in codesign
24301 do
24302   # Extract the first word of "$ac_prog", so it can be a program name with args.
24303 set dummy $ac_prog; ac_word=$2
24304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24305 $as_echo_n "checking for $ac_word... " >&6; }
24306 if ${ac_cv_path_CODESIGN+:} false; then :
24307   $as_echo_n "(cached) " >&6
24308 else
24309   case $CODESIGN in
24310   [\\/]* | ?:[\\/]*)
24311   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24312   ;;
24313   *)
24314   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24315 for as_dir in $PATH
24316 do
24317   IFS=$as_save_IFS
24318   test -z "$as_dir" && as_dir=.
24319     for ac_exec_ext in '' $ac_executable_extensions; do
24320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24321     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24323     break 2
24324   fi
24325 done
24326   done
24327 IFS=$as_save_IFS
24328 
24329   ;;
24330 esac
24331 fi
24332 CODESIGN=$ac_cv_path_CODESIGN
24333 if test -n "$CODESIGN"; then
24334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24335 $as_echo "$CODESIGN" >&6; }
24336 else
24337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24338 $as_echo "no" >&6; }
24339 fi
24340 
24341 
24342   test -n "$CODESIGN" && break
24343 done
24344 
24345   else
24346     # The variable is set, but is it from the command line or the environment?
24347 
24348     # Try to remove the string !CODESIGN! from our list.
24349     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
24350     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24351       # If it failed, the variable was not from the command line. Ignore it,
24352       # but warn the user (except for BASH, which is always set by the calling BASH).
24353       if test "xCODESIGN" != xBASH; then
24354         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
24355 $as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
24356       fi
24357       # Try to locate tool using the code snippet
24358       for ac_prog in codesign
24359 do
24360   # Extract the first word of "$ac_prog", so it can be a program name with args.
24361 set dummy $ac_prog; ac_word=$2
24362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24363 $as_echo_n "checking for $ac_word... " >&6; }
24364 if ${ac_cv_path_CODESIGN+:} false; then :
24365   $as_echo_n "(cached) " >&6
24366 else
24367   case $CODESIGN in
24368   [\\/]* | ?:[\\/]*)
24369   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24370   ;;
24371   *)
24372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24373 for as_dir in $PATH
24374 do
24375   IFS=$as_save_IFS
24376   test -z "$as_dir" && as_dir=.
24377     for ac_exec_ext in '' $ac_executable_extensions; do
24378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24379     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24381     break 2
24382   fi
24383 done
24384   done
24385 IFS=$as_save_IFS
24386 
24387   ;;
24388 esac
24389 fi
24390 CODESIGN=$ac_cv_path_CODESIGN
24391 if test -n "$CODESIGN"; then
24392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24393 $as_echo "$CODESIGN" >&6; }
24394 else
24395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24396 $as_echo "no" >&6; }
24397 fi
24398 
24399 
24400   test -n "$CODESIGN" && break
24401 done
24402 
24403     else
24404       # If it succeeded, then it was overridden by the user. We will use it
24405       # for the tool.
24406 
24407       # First remove it from the list of overridden variables, so we can test
24408       # for unknown variables in the end.
24409       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24410 
24411       # Check if we try to supply an empty value
24412       if test "x$CODESIGN" = x; then
24413         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
24414 $as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
24415         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24416 $as_echo_n "checking for CODESIGN... " >&6; }
24417         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24418 $as_echo "disabled" >&6; }
24419       else
24420         # Check if the provided tool contains a complete path.
24421         tool_specified="$CODESIGN"
24422         tool_basename="${tool_specified##*/}"
24423         if test "x$tool_basename" = "x$tool_specified"; then
24424           # A command without a complete path is provided, search $PATH.
24425           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
24426 $as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
24427           # Extract the first word of "$tool_basename", so it can be a program name with args.
24428 set dummy $tool_basename; ac_word=$2
24429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24430 $as_echo_n "checking for $ac_word... " >&6; }
24431 if ${ac_cv_path_CODESIGN+:} false; then :
24432   $as_echo_n "(cached) " >&6
24433 else
24434   case $CODESIGN in
24435   [\\/]* | ?:[\\/]*)
24436   ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
24437   ;;
24438   *)
24439   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24440 for as_dir in $PATH
24441 do
24442   IFS=$as_save_IFS
24443   test -z "$as_dir" && as_dir=.
24444     for ac_exec_ext in '' $ac_executable_extensions; do
24445   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24446     ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
24447     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24448     break 2
24449   fi
24450 done
24451   done
24452 IFS=$as_save_IFS
24453 
24454   ;;
24455 esac
24456 fi
24457 CODESIGN=$ac_cv_path_CODESIGN
24458 if test -n "$CODESIGN"; then
24459   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24460 $as_echo "$CODESIGN" >&6; }
24461 else
24462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24463 $as_echo "no" >&6; }
24464 fi
24465 
24466 
24467           if test "x$CODESIGN" = x; then
24468             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24469           fi
24470         else
24471           # Otherwise we believe it is a complete path. Use it as it is.
24472           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24473 $as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24474           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24475 $as_echo_n "checking for CODESIGN... " >&6; }
24476           if test ! -x "$tool_specified"; then
24477             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24478 $as_echo "not found" >&6; }
24479             as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24480           fi
24481           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24482 $as_echo "$tool_specified" >&6; }
24483         fi
24484       fi
24485     fi
24486 
24487   fi
24488 
24489 
24490     if test "x$CODESIGN" != "x"; then
24491       # Verify that the openjdk_codesign certificate is present
24492       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24493 $as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24494       $RM codesign-testfile
24495       $TOUCH codesign-testfile
24496       $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24497       $RM codesign-testfile
24498       if test "x$CODESIGN" = x; then
24499         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24500 $as_echo "no" >&6; }
24501       else
24502         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24503 $as_echo "yes" >&6; }
24504       fi
24505     fi
24506 
24507 
24508 
24509   # Publish this variable in the help.
24510 
24511 
24512   if [ -z "${SETFILE+x}" ]; then
24513     # The variable is not set by user, try to locate tool using the code snippet
24514     for ac_prog in SetFile
24515 do
24516   # Extract the first word of "$ac_prog", so it can be a program name with args.
24517 set dummy $ac_prog; ac_word=$2
24518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24519 $as_echo_n "checking for $ac_word... " >&6; }
24520 if ${ac_cv_path_SETFILE+:} false; then :
24521   $as_echo_n "(cached) " >&6
24522 else
24523   case $SETFILE in
24524   [\\/]* | ?:[\\/]*)
24525   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24526   ;;
24527   *)
24528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24529 for as_dir in $PATH
24530 do
24531   IFS=$as_save_IFS
24532   test -z "$as_dir" && as_dir=.
24533     for ac_exec_ext in '' $ac_executable_extensions; do
24534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24535     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24537     break 2
24538   fi
24539 done
24540   done
24541 IFS=$as_save_IFS
24542 
24543   ;;
24544 esac
24545 fi
24546 SETFILE=$ac_cv_path_SETFILE
24547 if test -n "$SETFILE"; then
24548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24549 $as_echo "$SETFILE" >&6; }
24550 else
24551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24552 $as_echo "no" >&6; }
24553 fi
24554 
24555 
24556   test -n "$SETFILE" && break
24557 done
24558 
24559   else
24560     # The variable is set, but is it from the command line or the environment?
24561 
24562     # Try to remove the string !SETFILE! from our list.
24563     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24564     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24565       # If it failed, the variable was not from the command line. Ignore it,
24566       # but warn the user (except for BASH, which is always set by the calling BASH).
24567       if test "xSETFILE" != xBASH; then
24568         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24569 $as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24570       fi
24571       # Try to locate tool using the code snippet
24572       for ac_prog in SetFile
24573 do
24574   # Extract the first word of "$ac_prog", so it can be a program name with args.
24575 set dummy $ac_prog; ac_word=$2
24576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24577 $as_echo_n "checking for $ac_word... " >&6; }
24578 if ${ac_cv_path_SETFILE+:} false; then :
24579   $as_echo_n "(cached) " >&6
24580 else
24581   case $SETFILE in
24582   [\\/]* | ?:[\\/]*)
24583   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24584   ;;
24585   *)
24586   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24587 for as_dir in $PATH
24588 do
24589   IFS=$as_save_IFS
24590   test -z "$as_dir" && as_dir=.
24591     for ac_exec_ext in '' $ac_executable_extensions; do
24592   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24593     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24594     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24595     break 2
24596   fi
24597 done
24598   done
24599 IFS=$as_save_IFS
24600 
24601   ;;
24602 esac
24603 fi
24604 SETFILE=$ac_cv_path_SETFILE
24605 if test -n "$SETFILE"; then
24606   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24607 $as_echo "$SETFILE" >&6; }
24608 else
24609   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24610 $as_echo "no" >&6; }
24611 fi
24612 
24613 
24614   test -n "$SETFILE" && break
24615 done
24616 
24617     else
24618       # If it succeeded, then it was overridden by the user. We will use it
24619       # for the tool.
24620 
24621       # First remove it from the list of overridden variables, so we can test
24622       # for unknown variables in the end.
24623       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24624 
24625       # Check if we try to supply an empty value
24626       if test "x$SETFILE" = x; then
24627         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24628 $as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24629         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24630 $as_echo_n "checking for SETFILE... " >&6; }
24631         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24632 $as_echo "disabled" >&6; }
24633       else
24634         # Check if the provided tool contains a complete path.
24635         tool_specified="$SETFILE"
24636         tool_basename="${tool_specified##*/}"
24637         if test "x$tool_basename" = "x$tool_specified"; then
24638           # A command without a complete path is provided, search $PATH.
24639           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24640 $as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24641           # Extract the first word of "$tool_basename", so it can be a program name with args.
24642 set dummy $tool_basename; ac_word=$2
24643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24644 $as_echo_n "checking for $ac_word... " >&6; }
24645 if ${ac_cv_path_SETFILE+:} false; then :
24646   $as_echo_n "(cached) " >&6
24647 else
24648   case $SETFILE in
24649   [\\/]* | ?:[\\/]*)
24650   ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24651   ;;
24652   *)
24653   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24654 for as_dir in $PATH
24655 do
24656   IFS=$as_save_IFS
24657   test -z "$as_dir" && as_dir=.
24658     for ac_exec_ext in '' $ac_executable_extensions; do
24659   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24660     ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24661     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24662     break 2
24663   fi
24664 done
24665   done
24666 IFS=$as_save_IFS
24667 
24668   ;;
24669 esac
24670 fi
24671 SETFILE=$ac_cv_path_SETFILE
24672 if test -n "$SETFILE"; then
24673   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24674 $as_echo "$SETFILE" >&6; }
24675 else
24676   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24677 $as_echo "no" >&6; }
24678 fi
24679 
24680 
24681           if test "x$SETFILE" = x; then
24682             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24683           fi
24684         else
24685           # Otherwise we believe it is a complete path. Use it as it is.
24686           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24687 $as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24688           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24689 $as_echo_n "checking for SETFILE... " >&6; }
24690           if test ! -x "$tool_specified"; then
24691             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24692 $as_echo "not found" >&6; }
24693             as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24694           fi
24695           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24696 $as_echo "$tool_specified" >&6; }
24697         fi
24698       fi
24699     fi
24700 
24701   fi
24702 
24703 
24704 
24705   if test "x$SETFILE" = x; then
24706     as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24707   fi
24708 
24709 
24710   fi
24711 
24712 
24713   # Check bash version
24714   # Extra [ ] to stop m4 mangling
24715    BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24716   { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24717 $as_echo_n "checking bash version... " >&6; }
24718   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24719 $as_echo "$BASH_VER" >&6; }
24720 
24721   BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24722   BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24723   if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24724     as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24725   fi
24726 
24727   # Test if bash supports pipefail.
24728   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24729 $as_echo_n "checking if bash supports pipefail... " >&6; }
24730   if ${BASH} -c 'set -o pipefail'; then
24731     BASH_ARGS="$BASH_ARGS -o pipefail"
24732     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24733 $as_echo "yes" >&6; }
24734   else
24735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24736 $as_echo "no" >&6; }
24737   fi
24738 
24739   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24740 $as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24741   if ${BASH} -e -c 'true'; then
24742     BASH_ARGS="$BASH_ARGS -e"
24743     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24744 $as_echo "yes" >&6; }
24745   else
24746     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24747 $as_echo "no" >&6; }
24748   fi
24749 
24750 
24751 
24752 
24753 # Check if pkg-config is available.
24754 
24755 
24756 if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24757         if test -n "$ac_tool_prefix"; then
24758   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24759 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24761 $as_echo_n "checking for $ac_word... " >&6; }
24762 if ${ac_cv_path_PKG_CONFIG+:} false; then :
24763   $as_echo_n "(cached) " >&6
24764 else
24765   case $PKG_CONFIG in
24766   [\\/]* | ?:[\\/]*)
24767   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24768   ;;
24769   *)
24770   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24771 for as_dir in $PATH
24772 do
24773   IFS=$as_save_IFS
24774   test -z "$as_dir" && as_dir=.
24775     for ac_exec_ext in '' $ac_executable_extensions; do
24776   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24777     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24778     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24779     break 2
24780   fi
24781 done
24782   done
24783 IFS=$as_save_IFS
24784 
24785   ;;
24786 esac
24787 fi
24788 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24789 if test -n "$PKG_CONFIG"; then
24790   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24791 $as_echo "$PKG_CONFIG" >&6; }
24792 else
24793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24794 $as_echo "no" >&6; }
24795 fi
24796 
24797 
24798 fi
24799 if test -z "$ac_cv_path_PKG_CONFIG"; then
24800   ac_pt_PKG_CONFIG=$PKG_CONFIG
24801   # Extract the first word of "pkg-config", so it can be a program name with args.
24802 set dummy pkg-config; ac_word=$2
24803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24804 $as_echo_n "checking for $ac_word... " >&6; }
24805 if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24806   $as_echo_n "(cached) " >&6
24807 else
24808   case $ac_pt_PKG_CONFIG in
24809   [\\/]* | ?:[\\/]*)
24810   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24811   ;;
24812   *)
24813   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24814 for as_dir in $PATH
24815 do
24816   IFS=$as_save_IFS
24817   test -z "$as_dir" && as_dir=.
24818     for ac_exec_ext in '' $ac_executable_extensions; do
24819   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24820     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24821     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24822     break 2
24823   fi
24824 done
24825   done
24826 IFS=$as_save_IFS
24827 
24828   ;;
24829 esac
24830 fi
24831 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24832 if test -n "$ac_pt_PKG_CONFIG"; then
24833   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24834 $as_echo "$ac_pt_PKG_CONFIG" >&6; }
24835 else
24836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24837 $as_echo "no" >&6; }
24838 fi
24839 
24840   if test "x$ac_pt_PKG_CONFIG" = x; then
24841     PKG_CONFIG=""
24842   else
24843     case $cross_compiling:$ac_tool_warned in
24844 yes:)
24845 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24846 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24847 ac_tool_warned=yes ;;
24848 esac
24849     PKG_CONFIG=$ac_pt_PKG_CONFIG
24850   fi
24851 else
24852   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24853 fi
24854 
24855 fi
24856 if test -n "$PKG_CONFIG"; then
24857         _pkg_min_version=0.9.0
24858         { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24859 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24860         if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24861                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24862 $as_echo "yes" >&6; }
24863         else
24864                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24865 $as_echo "no" >&6; }
24866                 PKG_CONFIG=""
24867         fi
24868 
24869 fi
24870 
24871 # After basic tools have been setup, we can check build os specific details.
24872 
24873   ###############################################################################
24874 
24875   # Note that this is the build platform OS version!
24876 
24877   OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24878   OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24879   OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24880   OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24881 
24882 
24883 
24884 
24885 
24886 # Misc basic settings
24887 
24888 
24889 # Check whether --with-default-make-target was given.
24890 if test "${with_default_make_target+set}" = set; then :
24891   withval=$with_default_make_target;
24892 fi
24893 
24894   if test "x$with_default_make_target" = "x" \
24895       || test "x$with_default_make_target" = "xyes"; then
24896     DEFAULT_MAKE_TARGET="exploded-image"
24897   elif test "x$with_default_make_target" = "xno"; then
24898     as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24899   else
24900     DEFAULT_MAKE_TARGET="$with_default_make_target"
24901   fi
24902 
24903 
24904 
24905 
24906 ###############################################################################
24907 #
24908 # Determine OpenJDK variants, options and version numbers.
24909 #
24910 ###############################################################################
24911 
24912 # We need build & target for this.
24913 
24914   # Should we build a JDK without a graphical UI?
24915   { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24916 $as_echo_n "checking headless only... " >&6; }
24917   # Check whether --enable-headless-only was given.
24918 if test "${enable_headless_only+set}" = set; then :
24919   enableval=$enable_headless_only;
24920 fi
24921 
24922 
24923   if test "x$enable_headless_only" = "xyes"; then
24924     ENABLE_HEADLESS_ONLY="true"
24925     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24926 $as_echo "yes" >&6; }
24927   elif test "x$enable_headless_only" = "xno"; then
24928     ENABLE_HEADLESS_ONLY="false"
24929     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24930 $as_echo "no" >&6; }
24931   elif test "x$enable_headless_only" = "x"; then
24932     ENABLE_HEADLESS_ONLY="false"
24933     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24934 $as_echo "no" >&6; }
24935   else
24936     as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24937   fi
24938 
24939 
24940 
24941   # Should we build the complete docs, or just a lightweight version?
24942   # Check whether --enable-full-docs was given.
24943 if test "${enable_full_docs+set}" = set; then :
24944   enableval=$enable_full_docs;
24945 fi
24946 
24947 
24948   # Verify dependencies
24949   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for graphviz dot" >&5
24950 $as_echo_n "checking for graphviz dot... " >&6; }
24951   if test "x$DOT" != "x"; then
24952     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24953 $as_echo "yes" >&6; }
24954   else
24955     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24956 $as_echo "no, cannot generate full docs" >&6; }
24957     FULL_DOCS_DEP_MISSING=true
24958   fi
24959 
24960   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pandoc" >&5
24961 $as_echo_n "checking for pandoc... " >&6; }
24962   if test "x$PANDOC" != "x"; then
24963     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24964 $as_echo "yes" >&6; }
24965   else
24966     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, cannot generate full docs" >&5
24967 $as_echo "no, cannot generate full docs" >&6; }
24968     FULL_DOCS_DEP_MISSING=true
24969   fi
24970 
24971   { $as_echo "$as_me:${as_lineno-$LINENO}: checking full docs" >&5
24972 $as_echo_n "checking full docs... " >&6; }
24973   if test "x$enable_full_docs" = xyes; then
24974     if test "x$FULL_DOCS_DEP_MISSING" = "xtrue"; then
24975       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
24976 $as_echo "no, missing dependencies" >&6; }
24977 
24978   # Print a helpful message on how to acquire the necessary build dependency.
24979   # dot is the help tag: freetype, cups, alsa etc
24980   MISSING_DEPENDENCY=dot
24981 
24982   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24983     cygwin_help $MISSING_DEPENDENCY
24984   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24985     msys_help $MISSING_DEPENDENCY
24986   else
24987     PKGHANDLER_COMMAND=
24988 
24989     case $PKGHANDLER in
24990       apt-get)
24991         apt_help     $MISSING_DEPENDENCY ;;
24992       yum)
24993         yum_help     $MISSING_DEPENDENCY ;;
24994       brew)
24995         brew_help    $MISSING_DEPENDENCY ;;
24996       port)
24997         port_help    $MISSING_DEPENDENCY ;;
24998       pkgutil)
24999         pkgutil_help $MISSING_DEPENDENCY ;;
25000       pkgadd)
25001         pkgadd_help  $MISSING_DEPENDENCY ;;
25002     esac
25003 
25004     if test "x$PKGHANDLER_COMMAND" != x; then
25005       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25006     fi
25007   fi
25008 
25009       as_fn_error $? "Cannot enable full docs with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
25010     else
25011       ENABLE_FULL_DOCS=true
25012       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
25013 $as_echo "yes, forced" >&6; }
25014     fi
25015   elif test "x$enable_full_docs" = xno; then
25016     ENABLE_FULL_DOCS=false
25017     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
25018 $as_echo "no, forced" >&6; }
25019   elif test "x$enable_full_docs" = x; then
25020     # Check for prerequisites
25021     if test "x$FULL_DOCS_DEP_MISSING" = xtrue; then
25022       ENABLE_FULL_DOCS=false
25023       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
25024 $as_echo "no, missing dependencies" >&6; }
25025     else
25026       ENABLE_FULL_DOCS=true
25027       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
25028 $as_echo "yes, dependencies present" >&6; }
25029     fi
25030   else
25031     as_fn_error $? "--enable-full-docs can only take yes or no" "$LINENO" 5
25032   fi
25033 
25034 
25035 
25036   # Choose cacerts source file
25037 
25038 # Check whether --with-cacerts-file was given.
25039 if test "${with_cacerts_file+set}" = set; then :
25040   withval=$with_cacerts_file;
25041 fi
25042 
25043   if test "x$with_cacerts_file" != x; then
25044     CACERTS_FILE=$with_cacerts_file
25045   fi
25046 
25047 
25048   # Enable or disable unlimited crypto
25049   # Check whether --enable-unlimited-crypto was given.
25050 if test "${enable_unlimited_crypto+set}" = set; then :
25051   enableval=$enable_unlimited_crypto;
25052 else
25053   enable_unlimited_crypto=yes
25054 fi
25055 
25056   if test "x$enable_unlimited_crypto" = "xyes"; then
25057     UNLIMITED_CRYPTO=true
25058   else
25059     UNLIMITED_CRYPTO=false
25060   fi
25061 
25062 
25063   # Should we build the serviceability agent (SA)?
25064   INCLUDE_SA=true
25065   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
25066     INCLUDE_SA=false
25067   fi
25068   if test "x$OPENJDK_TARGET_OS" = xaix ; then
25069     INCLUDE_SA=false
25070   fi
25071 
25072 
25073   # Compress jars
25074   COMPRESS_JARS=false
25075 
25076 
25077 
25078   # Setup default copyright year. Mostly overridden when building close to a new year.
25079 
25080 # Check whether --with-copyright-year was given.
25081 if test "${with_copyright_year+set}" = set; then :
25082   withval=$with_copyright_year;
25083 fi
25084 
25085   if test "x$with_copyright_year" = xyes; then
25086     as_fn_error $? "Copyright year must have a value" "$LINENO" 5
25087   elif test "x$with_copyright_year" != x; then
25088     COPYRIGHT_YEAR="$with_copyright_year"
25089   else
25090     COPYRIGHT_YEAR=`$DATE +'%Y'`
25091   fi
25092 
25093 
25094 
25095   # Check whether --enable-keep-packaged-modules was given.
25096 if test "${enable_keep_packaged_modules+set}" = set; then :
25097   enableval=$enable_keep_packaged_modules;
25098 fi
25099 
25100 
25101   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
25102 $as_echo_n "checking if packaged modules are kept... " >&6; }
25103   if test "x$enable_keep_packaged_modules" = "xyes"; then
25104     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
25105 $as_echo "yes" >&6; }
25106     JLINK_KEEP_PACKAGED_MODULES=true
25107   elif test "x$enable_keep_packaged_modules" = "xno"; then
25108     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25109 $as_echo "no" >&6; }
25110     JLINK_KEEP_PACKAGED_MODULES=false
25111   elif test "x$enable_keep_packaged_modules" = "x"; then
25112     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
25113 $as_echo "yes (default)" >&6; }
25114     JLINK_KEEP_PACKAGED_MODULES=true
25115   else
25116     { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
25117 $as_echo "error" >&6; }
25118     as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
25119   fi
25120 
25121 
25122 
25123 
25124   # Warn user that old version arguments are deprecated.
25125 
25126 
25127 # Check whether --with-milestone was given.
25128 if test "${with_milestone+set}" = set; then :
25129   withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
25130 $as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
25131 fi
25132 
25133 
25134 
25135 
25136 # Check whether --with-update-version was given.
25137 if test "${with_update_version+set}" = set; then :
25138   withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
25139 $as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
25140 fi
25141 
25142 
25143 
25144 
25145 # Check whether --with-user-release-suffix was given.
25146 if test "${with_user_release_suffix+set}" = set; then :
25147   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
25148 $as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
25149 fi
25150 
25151 
25152 
25153 
25154 # Check whether --with-build-number was given.
25155 if test "${with_build_number+set}" = set; then :
25156   withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
25157 $as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
25158 fi
25159 
25160 
25161 
25162   # Source the version numbers file
25163   . $AUTOCONF_DIR/version-numbers
25164 
25165   # Some non-version number information is set in that file
25166 
25167 
25168 
25169 
25170 
25171 
25172 
25173 
25174 
25175   # Override version from arguments
25176 
25177   # If --with-version-string is set, process it first. It is possible to
25178   # override parts with more specific flags, since these are processed later.
25179 
25180 # Check whether --with-version-string was given.
25181 if test "${with_version_string+set}" = set; then :
25182   withval=$with_version_string;
25183 fi
25184 
25185   if test "x$with_version_string" = xyes; then
25186     as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
25187   elif test "x$with_version_string" != x; then
25188     # Additional [] needed to keep m4 from mangling shell constructs.
25189     if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
25190       VERSION_MAJOR=${BASH_REMATCH[1]}
25191       VERSION_MINOR=${BASH_REMATCH[3]}
25192       VERSION_SECURITY=${BASH_REMATCH[5]}
25193       VERSION_PATCH=${BASH_REMATCH[7]}
25194       VERSION_PRE=${BASH_REMATCH[9]}
25195       version_plus_separator=${BASH_REMATCH[11]}
25196       VERSION_BUILD=${BASH_REMATCH[12]}
25197       VERSION_OPT=${BASH_REMATCH[14]}
25198       # Unspecified numerical fields are interpreted as 0.
25199       if test "x$VERSION_MINOR" = x; then
25200         VERSION_MINOR=0
25201       fi
25202       if test "x$VERSION_SECURITY" = x; then
25203         VERSION_SECURITY=0
25204       fi
25205       if test "x$VERSION_PATCH" = x; then
25206         VERSION_PATCH=0
25207       fi
25208       if test "x$version_plus_separator" != x \
25209           && test "x$VERSION_BUILD$VERSION_OPT" = x; then
25210         as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
25211       fi
25212       # Stop the version part process from setting default values.
25213       # We still allow them to explicitly override though.
25214       NO_DEFAULT_VERSION_PARTS=true
25215     else
25216       as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
25217     fi
25218   fi
25219 
25220 
25221 # Check whether --with-version-pre was given.
25222 if test "${with_version_pre+set}" = set; then :
25223   withval=$with_version_pre; with_version_pre_present=true
25224 else
25225   with_version_pre_present=false
25226 fi
25227 
25228 
25229   if test "x$with_version_pre_present" = xtrue; then
25230     if test "x$with_version_pre" = xyes; then
25231       as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
25232     elif test "x$with_version_pre" = xno; then
25233       # Interpret --without-* as empty string instead of the literal "no"
25234       VERSION_PRE=
25235     else
25236       # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
25237        VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
25238       if test "x$VERSION_PRE" != "x$with_version_pre"; then
25239         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
25240 $as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
25241       fi
25242     fi
25243   else
25244     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25245       # Default is to use "internal" as pre
25246       VERSION_PRE="internal"
25247     fi
25248   fi
25249 
25250 
25251 # Check whether --with-version-opt was given.
25252 if test "${with_version_opt+set}" = set; then :
25253   withval=$with_version_opt; with_version_opt_present=true
25254 else
25255   with_version_opt_present=false
25256 fi
25257 
25258 
25259   if test "x$with_version_opt_present" = xtrue; then
25260     if test "x$with_version_opt" = xyes; then
25261       as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
25262     elif test "x$with_version_opt" = xno; then
25263       # Interpret --without-* as empty string instead of the literal "no"
25264       VERSION_OPT=
25265     else
25266       # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
25267        VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
25268       if test "x$VERSION_OPT" != "x$with_version_opt"; then
25269         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
25270 $as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
25271       fi
25272     fi
25273   else
25274     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25275       # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
25276       # Outer [ ] to quote m4.
25277        basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
25278       VERSION_OPT="adhoc.$USERNAME.$basedirname"
25279     fi
25280   fi
25281 
25282 
25283 # Check whether --with-version-build was given.
25284 if test "${with_version_build+set}" = set; then :
25285   withval=$with_version_build; with_version_build_present=true
25286 else
25287   with_version_build_present=false
25288 fi
25289 
25290 
25291   if test "x$with_version_build_present" = xtrue; then
25292     if test "x$with_version_build" = xyes; then
25293       as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
25294     elif test "x$with_version_build" = xno; then
25295       # Interpret --without-* as empty string instead of the literal "no"
25296       VERSION_BUILD=
25297     elif test "x$with_version_build" = x; then
25298       VERSION_BUILD=
25299     else
25300 
25301   # Additional [] needed to keep m4 from mangling shell constructs.
25302   if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25303     as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
25304   fi
25305   # Extract the version number without leading zeros.
25306   cleaned_value=${BASH_REMATCH[1]}
25307   if test "x$cleaned_value" = x; then
25308     # Special case for zero
25309     cleaned_value=${BASH_REMATCH[2]}
25310   fi
25311 
25312   if test $cleaned_value -gt 255; then
25313     as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
25314   fi
25315   if test "x$cleaned_value" != "x$with_version_build"; then
25316     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
25317 $as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
25318   fi
25319   VERSION_BUILD=$cleaned_value
25320 
25321     fi
25322   else
25323     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25324       # Default is to not have a build number.
25325       VERSION_BUILD=""
25326       # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
25327       VERSION_BUILD=0
25328     fi
25329   fi
25330 
25331 
25332 # Check whether --with-version-major was given.
25333 if test "${with_version_major+set}" = set; then :
25334   withval=$with_version_major; with_version_major_present=true
25335 else
25336   with_version_major_present=false
25337 fi
25338 
25339 
25340   if test "x$with_version_major_present" = xtrue; then
25341     if test "x$with_version_major" = xyes; then
25342       as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
25343     else
25344 
25345   # Additional [] needed to keep m4 from mangling shell constructs.
25346   if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25347     as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
25348   fi
25349   # Extract the version number without leading zeros.
25350   cleaned_value=${BASH_REMATCH[1]}
25351   if test "x$cleaned_value" = x; then
25352     # Special case for zero
25353     cleaned_value=${BASH_REMATCH[2]}
25354   fi
25355 
25356   if test $cleaned_value -gt 255; then
25357     as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
25358   fi
25359   if test "x$cleaned_value" != "x$with_version_major"; then
25360     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
25361 $as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
25362   fi
25363   VERSION_MAJOR=$cleaned_value
25364 
25365     fi
25366   else
25367     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25368       # Default is to get value from version-numbers
25369       VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
25370     fi
25371   fi
25372 
25373 
25374 # Check whether --with-version-minor was given.
25375 if test "${with_version_minor+set}" = set; then :
25376   withval=$with_version_minor; with_version_minor_present=true
25377 else
25378   with_version_minor_present=false
25379 fi
25380 
25381 
25382   if test "x$with_version_minor_present" = xtrue; then
25383     if test "x$with_version_minor" = xyes; then
25384       as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
25385     elif test "x$with_version_minor" = xno; then
25386       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25387       VERSION_MINOR=0
25388     elif test "x$with_version_minor" = x; then
25389       VERSION_MINOR=0
25390     else
25391 
25392   # Additional [] needed to keep m4 from mangling shell constructs.
25393   if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25394     as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
25395   fi
25396   # Extract the version number without leading zeros.
25397   cleaned_value=${BASH_REMATCH[1]}
25398   if test "x$cleaned_value" = x; then
25399     # Special case for zero
25400     cleaned_value=${BASH_REMATCH[2]}
25401   fi
25402 
25403   if test $cleaned_value -gt 255; then
25404     as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
25405   fi
25406   if test "x$cleaned_value" != "x$with_version_minor"; then
25407     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
25408 $as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
25409   fi
25410   VERSION_MINOR=$cleaned_value
25411 
25412     fi
25413   else
25414     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25415       # Default is 0, if unspecified
25416       VERSION_MINOR=$DEFAULT_VERSION_MINOR
25417     fi
25418   fi
25419 
25420 
25421 # Check whether --with-version-security was given.
25422 if test "${with_version_security+set}" = set; then :
25423   withval=$with_version_security; with_version_security_present=true
25424 else
25425   with_version_security_present=false
25426 fi
25427 
25428 
25429   if test "x$with_version_security_present" = xtrue; then
25430     if test "x$with_version_security" = xyes; then
25431       as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
25432     elif test "x$with_version_security" = xno; then
25433       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25434       VERSION_SECURITY=0
25435     elif test "x$with_version_security" = x; then
25436       VERSION_SECURITY=0
25437     else
25438 
25439   # Additional [] needed to keep m4 from mangling shell constructs.
25440   if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25441     as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
25442   fi
25443   # Extract the version number without leading zeros.
25444   cleaned_value=${BASH_REMATCH[1]}
25445   if test "x$cleaned_value" = x; then
25446     # Special case for zero
25447     cleaned_value=${BASH_REMATCH[2]}
25448   fi
25449 
25450   if test $cleaned_value -gt 255; then
25451     as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
25452   fi
25453   if test "x$cleaned_value" != "x$with_version_security"; then
25454     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
25455 $as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
25456   fi
25457   VERSION_SECURITY=$cleaned_value
25458 
25459     fi
25460   else
25461     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25462       # Default is 0, if unspecified
25463       VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
25464     fi
25465   fi
25466 
25467 
25468 # Check whether --with-version-patch was given.
25469 if test "${with_version_patch+set}" = set; then :
25470   withval=$with_version_patch; with_version_patch_present=true
25471 else
25472   with_version_patch_present=false
25473 fi
25474 
25475 
25476   if test "x$with_version_patch_present" = xtrue; then
25477     if test "x$with_version_patch" = xyes; then
25478       as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
25479     elif test "x$with_version_patch" = xno; then
25480       # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
25481       VERSION_PATCH=0
25482     elif test "x$with_version_patch" = x; then
25483       VERSION_PATCH=0
25484     else
25485 
25486   # Additional [] needed to keep m4 from mangling shell constructs.
25487   if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
25488     as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
25489   fi
25490   # Extract the version number without leading zeros.
25491   cleaned_value=${BASH_REMATCH[1]}
25492   if test "x$cleaned_value" = x; then
25493     # Special case for zero
25494     cleaned_value=${BASH_REMATCH[2]}
25495   fi
25496 
25497   if test $cleaned_value -gt 255; then
25498     as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
25499   fi
25500   if test "x$cleaned_value" != "x$with_version_patch"; then
25501     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
25502 $as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
25503   fi
25504   VERSION_PATCH=$cleaned_value
25505 
25506     fi
25507   else
25508     if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
25509       # Default is 0, if unspecified
25510       VERSION_PATCH=$DEFAULT_VERSION_PATCH
25511     fi
25512   fi
25513 
25514   # Calculate derived version properties
25515 
25516   # Set VERSION_IS_GA based on if VERSION_PRE has a value
25517   if test "x$VERSION_PRE" = x; then
25518     VERSION_IS_GA=true
25519   else
25520     VERSION_IS_GA=false
25521   fi
25522 
25523   # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
25524   VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
25525 
25526   stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
25527   # Strip trailing zeroes from stripped_version_number
25528   for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
25529   VERSION_NUMBER=$stripped_version_number
25530 
25531   # The complete version string, with additional build information
25532   if test "x$VERSION_BUILD$VERSION_OPT" = x; then
25533     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25534   else
25535     # If either build or opt is set, we need a + separator
25536     VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
25537   fi
25538 
25539   # The short version string, just VERSION_NUMBER and PRE, if present.
25540   VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
25541 
25542   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
25543 $as_echo_n "checking for version string... " >&6; }
25544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
25545 $as_echo "$VERSION_STRING" >&6; }
25546 
25547 
25548 
25549 
25550 
25551 
25552 
25553 
25554 
25555 
25556 
25557 
25558 
25559 
25560 
25561 ###############################################################################
25562 #
25563 # Setup BootJDK, used to bootstrap the build.
25564 #
25565 ###############################################################################
25566 
25567 
25568   BOOT_JDK_FOUND=no
25569 
25570 # Check whether --with-boot-jdk was given.
25571 if test "${with_boot_jdk+set}" = set; then :
25572   withval=$with_boot_jdk;
25573 fi
25574 
25575 
25576   # We look for the Boot JDK through various means, going from more certain to
25577   # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25578   # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25579   # must check if this is indeed valid; otherwise we'll continue looking.
25580 
25581   # Test: Is bootjdk explicitly set by command line arguments?
25582 
25583   if test "x$BOOT_JDK_FOUND" = xno; then
25584     # Now execute the test
25585 
25586   if test "x$with_boot_jdk" != x; then
25587     BOOT_JDK=$with_boot_jdk
25588     BOOT_JDK_FOUND=maybe
25589     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25590 $as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25591   fi
25592 
25593 
25594     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25595     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25596       # Do we have a bin/java?
25597       if test ! -x "$BOOT_JDK/bin/java"; then
25598         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25599 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25600         BOOT_JDK_FOUND=no
25601       else
25602         # Do we have a bin/javac?
25603         if test ! -x "$BOOT_JDK/bin/javac"; then
25604           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25605 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25606           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25607 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25608           BOOT_JDK_FOUND=no
25609         else
25610           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25611           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25612 
25613           # Extra M4 quote needed to protect [] in grep expression.
25614           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25615           if test "x$FOUND_CORRECT_VERSION" = x; then
25616             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25617 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25618             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25619 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25620             BOOT_JDK_FOUND=no
25621           else
25622             # We're done! :-)
25623             BOOT_JDK_FOUND=yes
25624 
25625   # Only process if variable expands to non-empty
25626 
25627   if test "x$BOOT_JDK" != x; then
25628     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25629 
25630   # Input might be given as Windows format, start by converting to
25631   # unix format.
25632   path="$BOOT_JDK"
25633   new_path=`$CYGPATH -u "$path"`
25634 
25635   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25636   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25637   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25638   # "foo.exe" is OK but "foo" is an error.
25639   #
25640   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25641   # It is also a way to make sure we got the proper file name for the real test later on.
25642   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25643   if test "x$test_shortpath" = x; then
25644     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25645 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25646     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25647   fi
25648 
25649   # Call helper function which possibly converts this using DOS-style short mode.
25650   # If so, the updated path is stored in $new_path.
25651 
25652   input_path="$new_path"
25653   # Check if we need to convert this using DOS-style short mode. If the path
25654   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25655   # take no chances and rewrite it.
25656   # Note: m4 eats our [], so we need to use [ and ] instead.
25657   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25658   if test "x$has_forbidden_chars" != x; then
25659     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25660     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25661     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25662     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25663       # Going to short mode and back again did indeed matter. Since short mode is
25664       # case insensitive, let's make it lowercase to improve readability.
25665       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25666       # Now convert it back to Unix-style (cygpath)
25667       input_path=`$CYGPATH -u "$shortmode_path"`
25668       new_path="$input_path"
25669     fi
25670   fi
25671 
25672   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25673   if test "x$test_cygdrive_prefix" = x; then
25674     # As a simple fix, exclude /usr/bin since it's not a real path.
25675     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25676       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25677       # a path prefixed by /cygdrive for fixpath to work.
25678       new_path="$CYGWIN_ROOT_PATH$input_path"
25679     fi
25680   fi
25681 
25682 
25683   if test "x$path" != "x$new_path"; then
25684     BOOT_JDK="$new_path"
25685     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25686 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25687   fi
25688 
25689     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25690 
25691   path="$BOOT_JDK"
25692   has_colon=`$ECHO $path | $GREP ^.:`
25693   new_path="$path"
25694   if test "x$has_colon" = x; then
25695     # Not in mixed or Windows style, start by that.
25696     new_path=`cmd //c echo $path`
25697   fi
25698 
25699 
25700   input_path="$new_path"
25701   # Check if we need to convert this using DOS-style short mode. If the path
25702   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25703   # take no chances and rewrite it.
25704   # Note: m4 eats our [], so we need to use [ and ] instead.
25705   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25706   if test "x$has_forbidden_chars" != x; then
25707     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25708     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25709   fi
25710 
25711 
25712   windows_path="$new_path"
25713   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25714     unix_path=`$CYGPATH -u "$windows_path"`
25715     new_path="$unix_path"
25716   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25717     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25718     new_path="$unix_path"
25719   fi
25720 
25721   if test "x$path" != "x$new_path"; then
25722     BOOT_JDK="$new_path"
25723     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25724 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25725   fi
25726 
25727   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25728   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25729 
25730     else
25731       # We're on a unix platform. Hooray! :)
25732       path="$BOOT_JDK"
25733       has_space=`$ECHO "$path" | $GREP " "`
25734       if test "x$has_space" != x; then
25735         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25736 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25737         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25738       fi
25739 
25740       # Use eval to expand a potential ~
25741       eval path="$path"
25742       if test ! -f "$path" && test ! -d "$path"; then
25743         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25744       fi
25745 
25746       if test -d "$path"; then
25747         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25748       else
25749         dir="`$DIRNAME "$path"`"
25750         base="`$BASENAME "$path"`"
25751         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25752       fi
25753     fi
25754   fi
25755 
25756             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25757 $as_echo_n "checking for Boot JDK... " >&6; }
25758             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25759 $as_echo "$BOOT_JDK" >&6; }
25760             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25761 $as_echo_n "checking Boot JDK version... " >&6; }
25762             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25763             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25764 $as_echo "$BOOT_JDK_VERSION" >&6; }
25765           fi # end check jdk version
25766         fi # end check javac
25767       fi # end check java
25768     fi # end check boot jdk found
25769   fi
25770 
25771   if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25772     # Having specified an argument which is incorrect will produce an instant failure;
25773     # we should not go on looking
25774     as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25775   fi
25776 
25777   # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25778 
25779   if test "x$BOOT_JDK_FOUND" = xno; then
25780     # Now execute the test
25781 
25782   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25783     # First check at user selected default
25784 
25785   if test "x$BOOT_JDK_FOUND" = xno; then
25786     # Now execute the test
25787 
25788   if test -x /usr/libexec/java_home; then
25789     BOOT_JDK=`/usr/libexec/java_home `
25790     BOOT_JDK_FOUND=maybe
25791     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25792 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25793   fi
25794 
25795 
25796     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25797     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25798       # Do we have a bin/java?
25799       if test ! -x "$BOOT_JDK/bin/java"; then
25800         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25801 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25802         BOOT_JDK_FOUND=no
25803       else
25804         # Do we have a bin/javac?
25805         if test ! -x "$BOOT_JDK/bin/javac"; then
25806           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25807 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25808           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25809 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25810           BOOT_JDK_FOUND=no
25811         else
25812           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25813           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25814 
25815           # Extra M4 quote needed to protect [] in grep expression.
25816           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25817           if test "x$FOUND_CORRECT_VERSION" = x; then
25818             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25819 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25820             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25821 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25822             BOOT_JDK_FOUND=no
25823           else
25824             # We're done! :-)
25825             BOOT_JDK_FOUND=yes
25826 
25827   # Only process if variable expands to non-empty
25828 
25829   if test "x$BOOT_JDK" != x; then
25830     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25831 
25832   # Input might be given as Windows format, start by converting to
25833   # unix format.
25834   path="$BOOT_JDK"
25835   new_path=`$CYGPATH -u "$path"`
25836 
25837   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25838   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25839   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25840   # "foo.exe" is OK but "foo" is an error.
25841   #
25842   # This test is therefore slightly more accurate than "test -f" to check for file precense.
25843   # It is also a way to make sure we got the proper file name for the real test later on.
25844   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25845   if test "x$test_shortpath" = x; then
25846     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25847 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25848     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25849   fi
25850 
25851   # Call helper function which possibly converts this using DOS-style short mode.
25852   # If so, the updated path is stored in $new_path.
25853 
25854   input_path="$new_path"
25855   # Check if we need to convert this using DOS-style short mode. If the path
25856   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25857   # take no chances and rewrite it.
25858   # Note: m4 eats our [], so we need to use [ and ] instead.
25859   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25860   if test "x$has_forbidden_chars" != x; then
25861     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25862     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25863     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25864     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25865       # Going to short mode and back again did indeed matter. Since short mode is
25866       # case insensitive, let's make it lowercase to improve readability.
25867       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25868       # Now convert it back to Unix-style (cygpath)
25869       input_path=`$CYGPATH -u "$shortmode_path"`
25870       new_path="$input_path"
25871     fi
25872   fi
25873 
25874   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25875   if test "x$test_cygdrive_prefix" = x; then
25876     # As a simple fix, exclude /usr/bin since it's not a real path.
25877     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25878       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25879       # a path prefixed by /cygdrive for fixpath to work.
25880       new_path="$CYGWIN_ROOT_PATH$input_path"
25881     fi
25882   fi
25883 
25884 
25885   if test "x$path" != "x$new_path"; then
25886     BOOT_JDK="$new_path"
25887     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25888 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25889   fi
25890 
25891     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25892 
25893   path="$BOOT_JDK"
25894   has_colon=`$ECHO $path | $GREP ^.:`
25895   new_path="$path"
25896   if test "x$has_colon" = x; then
25897     # Not in mixed or Windows style, start by that.
25898     new_path=`cmd //c echo $path`
25899   fi
25900 
25901 
25902   input_path="$new_path"
25903   # Check if we need to convert this using DOS-style short mode. If the path
25904   # contains just simple characters, use it. Otherwise (spaces, weird characters),
25905   # take no chances and rewrite it.
25906   # Note: m4 eats our [], so we need to use [ and ] instead.
25907   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25908   if test "x$has_forbidden_chars" != x; then
25909     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25910     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25911   fi
25912 
25913 
25914   windows_path="$new_path"
25915   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25916     unix_path=`$CYGPATH -u "$windows_path"`
25917     new_path="$unix_path"
25918   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25919     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25920     new_path="$unix_path"
25921   fi
25922 
25923   if test "x$path" != "x$new_path"; then
25924     BOOT_JDK="$new_path"
25925     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25926 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25927   fi
25928 
25929   # Save the first 10 bytes of this path to the storage, so fixpath can work.
25930   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25931 
25932     else
25933       # We're on a unix platform. Hooray! :)
25934       path="$BOOT_JDK"
25935       has_space=`$ECHO "$path" | $GREP " "`
25936       if test "x$has_space" != x; then
25937         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25938 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25939         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25940       fi
25941 
25942       # Use eval to expand a potential ~
25943       eval path="$path"
25944       if test ! -f "$path" && test ! -d "$path"; then
25945         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25946       fi
25947 
25948       if test -d "$path"; then
25949         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25950       else
25951         dir="`$DIRNAME "$path"`"
25952         base="`$BASENAME "$path"`"
25953         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25954       fi
25955     fi
25956   fi
25957 
25958             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25959 $as_echo_n "checking for Boot JDK... " >&6; }
25960             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25961 $as_echo "$BOOT_JDK" >&6; }
25962             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25963 $as_echo_n "checking Boot JDK version... " >&6; }
25964             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25965             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25966 $as_echo "$BOOT_JDK_VERSION" >&6; }
25967           fi # end check jdk version
25968         fi # end check javac
25969       fi # end check java
25970     fi # end check boot jdk found
25971   fi
25972 
25973     # If that did not work out (e.g. too old), try explicit versions instead
25974 
25975   if test "x$BOOT_JDK_FOUND" = xno; then
25976     # Now execute the test
25977 
25978   if test -x /usr/libexec/java_home; then
25979     BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25980     BOOT_JDK_FOUND=maybe
25981     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25982 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25983   fi
25984 
25985 
25986     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25987     if test "x$BOOT_JDK_FOUND" = xmaybe; then
25988       # Do we have a bin/java?
25989       if test ! -x "$BOOT_JDK/bin/java"; then
25990         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25991 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25992         BOOT_JDK_FOUND=no
25993       else
25994         # Do we have a bin/javac?
25995         if test ! -x "$BOOT_JDK/bin/javac"; then
25996           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25997 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25998           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25999 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26000           BOOT_JDK_FOUND=no
26001         else
26002           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26003           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26004 
26005           # Extra M4 quote needed to protect [] in grep expression.
26006           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26007           if test "x$FOUND_CORRECT_VERSION" = x; then
26008             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26009 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26010             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26011 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26012             BOOT_JDK_FOUND=no
26013           else
26014             # We're done! :-)
26015             BOOT_JDK_FOUND=yes
26016 
26017   # Only process if variable expands to non-empty
26018 
26019   if test "x$BOOT_JDK" != x; then
26020     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26021 
26022   # Input might be given as Windows format, start by converting to
26023   # unix format.
26024   path="$BOOT_JDK"
26025   new_path=`$CYGPATH -u "$path"`
26026 
26027   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26028   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26029   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26030   # "foo.exe" is OK but "foo" is an error.
26031   #
26032   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26033   # It is also a way to make sure we got the proper file name for the real test later on.
26034   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26035   if test "x$test_shortpath" = x; then
26036     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26037 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26038     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26039   fi
26040 
26041   # Call helper function which possibly converts this using DOS-style short mode.
26042   # If so, the updated path is stored in $new_path.
26043 
26044   input_path="$new_path"
26045   # Check if we need to convert this using DOS-style short mode. If the path
26046   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26047   # take no chances and rewrite it.
26048   # Note: m4 eats our [], so we need to use [ and ] instead.
26049   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26050   if test "x$has_forbidden_chars" != x; then
26051     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26052     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26053     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26054     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26055       # Going to short mode and back again did indeed matter. Since short mode is
26056       # case insensitive, let's make it lowercase to improve readability.
26057       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26058       # Now convert it back to Unix-style (cygpath)
26059       input_path=`$CYGPATH -u "$shortmode_path"`
26060       new_path="$input_path"
26061     fi
26062   fi
26063 
26064   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26065   if test "x$test_cygdrive_prefix" = x; then
26066     # As a simple fix, exclude /usr/bin since it's not a real path.
26067     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26068       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26069       # a path prefixed by /cygdrive for fixpath to work.
26070       new_path="$CYGWIN_ROOT_PATH$input_path"
26071     fi
26072   fi
26073 
26074 
26075   if test "x$path" != "x$new_path"; then
26076     BOOT_JDK="$new_path"
26077     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26078 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26079   fi
26080 
26081     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26082 
26083   path="$BOOT_JDK"
26084   has_colon=`$ECHO $path | $GREP ^.:`
26085   new_path="$path"
26086   if test "x$has_colon" = x; then
26087     # Not in mixed or Windows style, start by that.
26088     new_path=`cmd //c echo $path`
26089   fi
26090 
26091 
26092   input_path="$new_path"
26093   # Check if we need to convert this using DOS-style short mode. If the path
26094   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26095   # take no chances and rewrite it.
26096   # Note: m4 eats our [], so we need to use [ and ] instead.
26097   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26098   if test "x$has_forbidden_chars" != x; then
26099     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26100     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26101   fi
26102 
26103 
26104   windows_path="$new_path"
26105   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26106     unix_path=`$CYGPATH -u "$windows_path"`
26107     new_path="$unix_path"
26108   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26109     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26110     new_path="$unix_path"
26111   fi
26112 
26113   if test "x$path" != "x$new_path"; then
26114     BOOT_JDK="$new_path"
26115     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26116 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26117   fi
26118 
26119   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26120   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26121 
26122     else
26123       # We're on a unix platform. Hooray! :)
26124       path="$BOOT_JDK"
26125       has_space=`$ECHO "$path" | $GREP " "`
26126       if test "x$has_space" != x; then
26127         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26128 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26129         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26130       fi
26131 
26132       # Use eval to expand a potential ~
26133       eval path="$path"
26134       if test ! -f "$path" && test ! -d "$path"; then
26135         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26136       fi
26137 
26138       if test -d "$path"; then
26139         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26140       else
26141         dir="`$DIRNAME "$path"`"
26142         base="`$BASENAME "$path"`"
26143         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26144       fi
26145     fi
26146   fi
26147 
26148             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26149 $as_echo_n "checking for Boot JDK... " >&6; }
26150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26151 $as_echo "$BOOT_JDK" >&6; }
26152             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26153 $as_echo_n "checking Boot JDK version... " >&6; }
26154             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26155             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26156 $as_echo "$BOOT_JDK_VERSION" >&6; }
26157           fi # end check jdk version
26158         fi # end check javac
26159       fi # end check java
26160     fi # end check boot jdk found
26161   fi
26162 
26163 
26164   if test "x$BOOT_JDK_FOUND" = xno; then
26165     # Now execute the test
26166 
26167   if test -x /usr/libexec/java_home; then
26168     BOOT_JDK=`/usr/libexec/java_home -v 1.8`
26169     BOOT_JDK_FOUND=maybe
26170     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
26171 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
26172   fi
26173 
26174 
26175     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26176     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26177       # Do we have a bin/java?
26178       if test ! -x "$BOOT_JDK/bin/java"; then
26179         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26180 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26181         BOOT_JDK_FOUND=no
26182       else
26183         # Do we have a bin/javac?
26184         if test ! -x "$BOOT_JDK/bin/javac"; then
26185           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26186 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26187           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26188 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26189           BOOT_JDK_FOUND=no
26190         else
26191           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26192           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26193 
26194           # Extra M4 quote needed to protect [] in grep expression.
26195           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26196           if test "x$FOUND_CORRECT_VERSION" = x; then
26197             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26198 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26199             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26200 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26201             BOOT_JDK_FOUND=no
26202           else
26203             # We're done! :-)
26204             BOOT_JDK_FOUND=yes
26205 
26206   # Only process if variable expands to non-empty
26207 
26208   if test "x$BOOT_JDK" != x; then
26209     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26210 
26211   # Input might be given as Windows format, start by converting to
26212   # unix format.
26213   path="$BOOT_JDK"
26214   new_path=`$CYGPATH -u "$path"`
26215 
26216   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26217   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26218   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26219   # "foo.exe" is OK but "foo" is an error.
26220   #
26221   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26222   # It is also a way to make sure we got the proper file name for the real test later on.
26223   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26224   if test "x$test_shortpath" = x; then
26225     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26226 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26227     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26228   fi
26229 
26230   # Call helper function which possibly converts this using DOS-style short mode.
26231   # If so, the updated path is stored in $new_path.
26232 
26233   input_path="$new_path"
26234   # Check if we need to convert this using DOS-style short mode. If the path
26235   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26236   # take no chances and rewrite it.
26237   # Note: m4 eats our [], so we need to use [ and ] instead.
26238   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26239   if test "x$has_forbidden_chars" != x; then
26240     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26241     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26242     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26243     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26244       # Going to short mode and back again did indeed matter. Since short mode is
26245       # case insensitive, let's make it lowercase to improve readability.
26246       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26247       # Now convert it back to Unix-style (cygpath)
26248       input_path=`$CYGPATH -u "$shortmode_path"`
26249       new_path="$input_path"
26250     fi
26251   fi
26252 
26253   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26254   if test "x$test_cygdrive_prefix" = x; then
26255     # As a simple fix, exclude /usr/bin since it's not a real path.
26256     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26257       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26258       # a path prefixed by /cygdrive for fixpath to work.
26259       new_path="$CYGWIN_ROOT_PATH$input_path"
26260     fi
26261   fi
26262 
26263 
26264   if test "x$path" != "x$new_path"; then
26265     BOOT_JDK="$new_path"
26266     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26267 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26268   fi
26269 
26270     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26271 
26272   path="$BOOT_JDK"
26273   has_colon=`$ECHO $path | $GREP ^.:`
26274   new_path="$path"
26275   if test "x$has_colon" = x; then
26276     # Not in mixed or Windows style, start by that.
26277     new_path=`cmd //c echo $path`
26278   fi
26279 
26280 
26281   input_path="$new_path"
26282   # Check if we need to convert this using DOS-style short mode. If the path
26283   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26284   # take no chances and rewrite it.
26285   # Note: m4 eats our [], so we need to use [ and ] instead.
26286   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26287   if test "x$has_forbidden_chars" != x; then
26288     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26289     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26290   fi
26291 
26292 
26293   windows_path="$new_path"
26294   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26295     unix_path=`$CYGPATH -u "$windows_path"`
26296     new_path="$unix_path"
26297   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26298     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26299     new_path="$unix_path"
26300   fi
26301 
26302   if test "x$path" != "x$new_path"; then
26303     BOOT_JDK="$new_path"
26304     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26305 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26306   fi
26307 
26308   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26309   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26310 
26311     else
26312       # We're on a unix platform. Hooray! :)
26313       path="$BOOT_JDK"
26314       has_space=`$ECHO "$path" | $GREP " "`
26315       if test "x$has_space" != x; then
26316         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26317 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26318         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26319       fi
26320 
26321       # Use eval to expand a potential ~
26322       eval path="$path"
26323       if test ! -f "$path" && test ! -d "$path"; then
26324         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26325       fi
26326 
26327       if test -d "$path"; then
26328         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26329       else
26330         dir="`$DIRNAME "$path"`"
26331         base="`$BASENAME "$path"`"
26332         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26333       fi
26334     fi
26335   fi
26336 
26337             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26338 $as_echo_n "checking for Boot JDK... " >&6; }
26339             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26340 $as_echo "$BOOT_JDK" >&6; }
26341             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26342 $as_echo_n "checking Boot JDK version... " >&6; }
26343             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26344             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26345 $as_echo "$BOOT_JDK_VERSION" >&6; }
26346           fi # end check jdk version
26347         fi # end check javac
26348       fi # end check java
26349     fi # end check boot jdk found
26350   fi
26351 
26352 
26353   if test "x$BOOT_JDK_FOUND" = xno; then
26354     # Now execute the test
26355 
26356   if test -x /usr/libexec/java_home; then
26357     BOOT_JDK=`/usr/libexec/java_home -v 1.7`
26358     BOOT_JDK_FOUND=maybe
26359     { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
26360 $as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
26361   fi
26362 
26363 
26364     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26365     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26366       # Do we have a bin/java?
26367       if test ! -x "$BOOT_JDK/bin/java"; then
26368         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26369 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26370         BOOT_JDK_FOUND=no
26371       else
26372         # Do we have a bin/javac?
26373         if test ! -x "$BOOT_JDK/bin/javac"; then
26374           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26375 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26376           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26377 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26378           BOOT_JDK_FOUND=no
26379         else
26380           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26381           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26382 
26383           # Extra M4 quote needed to protect [] in grep expression.
26384           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26385           if test "x$FOUND_CORRECT_VERSION" = x; then
26386             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26387 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26388             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26389 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26390             BOOT_JDK_FOUND=no
26391           else
26392             # We're done! :-)
26393             BOOT_JDK_FOUND=yes
26394 
26395   # Only process if variable expands to non-empty
26396 
26397   if test "x$BOOT_JDK" != x; then
26398     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26399 
26400   # Input might be given as Windows format, start by converting to
26401   # unix format.
26402   path="$BOOT_JDK"
26403   new_path=`$CYGPATH -u "$path"`
26404 
26405   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26406   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26407   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26408   # "foo.exe" is OK but "foo" is an error.
26409   #
26410   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26411   # It is also a way to make sure we got the proper file name for the real test later on.
26412   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26413   if test "x$test_shortpath" = x; then
26414     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26415 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26416     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26417   fi
26418 
26419   # Call helper function which possibly converts this using DOS-style short mode.
26420   # If so, the updated path is stored in $new_path.
26421 
26422   input_path="$new_path"
26423   # Check if we need to convert this using DOS-style short mode. If the path
26424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26425   # take no chances and rewrite it.
26426   # Note: m4 eats our [], so we need to use [ and ] instead.
26427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26428   if test "x$has_forbidden_chars" != x; then
26429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26430     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26431     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26432     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26433       # Going to short mode and back again did indeed matter. Since short mode is
26434       # case insensitive, let's make it lowercase to improve readability.
26435       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26436       # Now convert it back to Unix-style (cygpath)
26437       input_path=`$CYGPATH -u "$shortmode_path"`
26438       new_path="$input_path"
26439     fi
26440   fi
26441 
26442   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26443   if test "x$test_cygdrive_prefix" = x; then
26444     # As a simple fix, exclude /usr/bin since it's not a real path.
26445     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26446       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26447       # a path prefixed by /cygdrive for fixpath to work.
26448       new_path="$CYGWIN_ROOT_PATH$input_path"
26449     fi
26450   fi
26451 
26452 
26453   if test "x$path" != "x$new_path"; then
26454     BOOT_JDK="$new_path"
26455     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26456 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26457   fi
26458 
26459     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26460 
26461   path="$BOOT_JDK"
26462   has_colon=`$ECHO $path | $GREP ^.:`
26463   new_path="$path"
26464   if test "x$has_colon" = x; then
26465     # Not in mixed or Windows style, start by that.
26466     new_path=`cmd //c echo $path`
26467   fi
26468 
26469 
26470   input_path="$new_path"
26471   # Check if we need to convert this using DOS-style short mode. If the path
26472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26473   # take no chances and rewrite it.
26474   # Note: m4 eats our [], so we need to use [ and ] instead.
26475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26476   if test "x$has_forbidden_chars" != x; then
26477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26478     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26479   fi
26480 
26481 
26482   windows_path="$new_path"
26483   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26484     unix_path=`$CYGPATH -u "$windows_path"`
26485     new_path="$unix_path"
26486   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26487     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26488     new_path="$unix_path"
26489   fi
26490 
26491   if test "x$path" != "x$new_path"; then
26492     BOOT_JDK="$new_path"
26493     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26494 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26495   fi
26496 
26497   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26498   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26499 
26500     else
26501       # We're on a unix platform. Hooray! :)
26502       path="$BOOT_JDK"
26503       has_space=`$ECHO "$path" | $GREP " "`
26504       if test "x$has_space" != x; then
26505         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26506 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26507         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26508       fi
26509 
26510       # Use eval to expand a potential ~
26511       eval path="$path"
26512       if test ! -f "$path" && test ! -d "$path"; then
26513         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26514       fi
26515 
26516       if test -d "$path"; then
26517         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26518       else
26519         dir="`$DIRNAME "$path"`"
26520         base="`$BASENAME "$path"`"
26521         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26522       fi
26523     fi
26524   fi
26525 
26526             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26527 $as_echo_n "checking for Boot JDK... " >&6; }
26528             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26529 $as_echo "$BOOT_JDK" >&6; }
26530             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26531 $as_echo_n "checking Boot JDK version... " >&6; }
26532             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26533             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26534 $as_echo "$BOOT_JDK_VERSION" >&6; }
26535           fi # end check jdk version
26536         fi # end check javac
26537       fi # end check java
26538     fi # end check boot jdk found
26539   fi
26540 
26541   fi
26542 
26543 
26544     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26545     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26546       # Do we have a bin/java?
26547       if test ! -x "$BOOT_JDK/bin/java"; then
26548         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26549 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26550         BOOT_JDK_FOUND=no
26551       else
26552         # Do we have a bin/javac?
26553         if test ! -x "$BOOT_JDK/bin/javac"; then
26554           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26555 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26556           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26557 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26558           BOOT_JDK_FOUND=no
26559         else
26560           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26561           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26562 
26563           # Extra M4 quote needed to protect [] in grep expression.
26564           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26565           if test "x$FOUND_CORRECT_VERSION" = x; then
26566             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26567 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26568             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26569 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26570             BOOT_JDK_FOUND=no
26571           else
26572             # We're done! :-)
26573             BOOT_JDK_FOUND=yes
26574 
26575   # Only process if variable expands to non-empty
26576 
26577   if test "x$BOOT_JDK" != x; then
26578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26579 
26580   # Input might be given as Windows format, start by converting to
26581   # unix format.
26582   path="$BOOT_JDK"
26583   new_path=`$CYGPATH -u "$path"`
26584 
26585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26588   # "foo.exe" is OK but "foo" is an error.
26589   #
26590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26591   # It is also a way to make sure we got the proper file name for the real test later on.
26592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26593   if test "x$test_shortpath" = x; then
26594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26595 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26596     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26597   fi
26598 
26599   # Call helper function which possibly converts this using DOS-style short mode.
26600   # If so, the updated path is stored in $new_path.
26601 
26602   input_path="$new_path"
26603   # Check if we need to convert this using DOS-style short mode. If the path
26604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26605   # take no chances and rewrite it.
26606   # Note: m4 eats our [], so we need to use [ and ] instead.
26607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26608   if test "x$has_forbidden_chars" != x; then
26609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26613       # Going to short mode and back again did indeed matter. Since short mode is
26614       # case insensitive, let's make it lowercase to improve readability.
26615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26616       # Now convert it back to Unix-style (cygpath)
26617       input_path=`$CYGPATH -u "$shortmode_path"`
26618       new_path="$input_path"
26619     fi
26620   fi
26621 
26622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26623   if test "x$test_cygdrive_prefix" = x; then
26624     # As a simple fix, exclude /usr/bin since it's not a real path.
26625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26627       # a path prefixed by /cygdrive for fixpath to work.
26628       new_path="$CYGWIN_ROOT_PATH$input_path"
26629     fi
26630   fi
26631 
26632 
26633   if test "x$path" != "x$new_path"; then
26634     BOOT_JDK="$new_path"
26635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26636 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26637   fi
26638 
26639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26640 
26641   path="$BOOT_JDK"
26642   has_colon=`$ECHO $path | $GREP ^.:`
26643   new_path="$path"
26644   if test "x$has_colon" = x; then
26645     # Not in mixed or Windows style, start by that.
26646     new_path=`cmd //c echo $path`
26647   fi
26648 
26649 
26650   input_path="$new_path"
26651   # Check if we need to convert this using DOS-style short mode. If the path
26652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26653   # take no chances and rewrite it.
26654   # Note: m4 eats our [], so we need to use [ and ] instead.
26655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26656   if test "x$has_forbidden_chars" != x; then
26657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26659   fi
26660 
26661 
26662   windows_path="$new_path"
26663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26664     unix_path=`$CYGPATH -u "$windows_path"`
26665     new_path="$unix_path"
26666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26668     new_path="$unix_path"
26669   fi
26670 
26671   if test "x$path" != "x$new_path"; then
26672     BOOT_JDK="$new_path"
26673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26674 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26675   fi
26676 
26677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26679 
26680     else
26681       # We're on a unix platform. Hooray! :)
26682       path="$BOOT_JDK"
26683       has_space=`$ECHO "$path" | $GREP " "`
26684       if test "x$has_space" != x; then
26685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26686 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26688       fi
26689 
26690       # Use eval to expand a potential ~
26691       eval path="$path"
26692       if test ! -f "$path" && test ! -d "$path"; then
26693         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26694       fi
26695 
26696       if test -d "$path"; then
26697         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26698       else
26699         dir="`$DIRNAME "$path"`"
26700         base="`$BASENAME "$path"`"
26701         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26702       fi
26703     fi
26704   fi
26705 
26706             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26707 $as_echo_n "checking for Boot JDK... " >&6; }
26708             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26709 $as_echo "$BOOT_JDK" >&6; }
26710             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26711 $as_echo_n "checking Boot JDK version... " >&6; }
26712             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26713             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26714 $as_echo "$BOOT_JDK_VERSION" >&6; }
26715           fi # end check jdk version
26716         fi # end check javac
26717       fi # end check java
26718     fi # end check boot jdk found
26719   fi
26720 
26721 
26722   # Test: Is $JAVA_HOME set?
26723 
26724   if test "x$BOOT_JDK_FOUND" = xno; then
26725     # Now execute the test
26726 
26727   if test "x$JAVA_HOME" != x; then
26728     JAVA_HOME_PROCESSED="$JAVA_HOME"
26729 
26730   # Only process if variable expands to non-empty
26731 
26732   if test "x$JAVA_HOME_PROCESSED" != x; then
26733     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26734 
26735   # Input might be given as Windows format, start by converting to
26736   # unix format.
26737   path="$JAVA_HOME_PROCESSED"
26738   new_path=`$CYGPATH -u "$path"`
26739 
26740   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26741   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26742   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26743   # "foo.exe" is OK but "foo" is an error.
26744   #
26745   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26746   # It is also a way to make sure we got the proper file name for the real test later on.
26747   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26748   if test "x$test_shortpath" = x; then
26749     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26750 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26751     as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26752   fi
26753 
26754   # Call helper function which possibly converts this using DOS-style short mode.
26755   # If so, the updated path is stored in $new_path.
26756 
26757   input_path="$new_path"
26758   # Check if we need to convert this using DOS-style short mode. If the path
26759   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26760   # take no chances and rewrite it.
26761   # Note: m4 eats our [], so we need to use [ and ] instead.
26762   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26763   if test "x$has_forbidden_chars" != x; then
26764     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26765     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26766     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26767     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26768       # Going to short mode and back again did indeed matter. Since short mode is
26769       # case insensitive, let's make it lowercase to improve readability.
26770       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26771       # Now convert it back to Unix-style (cygpath)
26772       input_path=`$CYGPATH -u "$shortmode_path"`
26773       new_path="$input_path"
26774     fi
26775   fi
26776 
26777   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26778   if test "x$test_cygdrive_prefix" = x; then
26779     # As a simple fix, exclude /usr/bin since it's not a real path.
26780     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26781       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26782       # a path prefixed by /cygdrive for fixpath to work.
26783       new_path="$CYGWIN_ROOT_PATH$input_path"
26784     fi
26785   fi
26786 
26787 
26788   if test "x$path" != "x$new_path"; then
26789     JAVA_HOME_PROCESSED="$new_path"
26790     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26791 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26792   fi
26793 
26794     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26795 
26796   path="$JAVA_HOME_PROCESSED"
26797   has_colon=`$ECHO $path | $GREP ^.:`
26798   new_path="$path"
26799   if test "x$has_colon" = x; then
26800     # Not in mixed or Windows style, start by that.
26801     new_path=`cmd //c echo $path`
26802   fi
26803 
26804 
26805   input_path="$new_path"
26806   # Check if we need to convert this using DOS-style short mode. If the path
26807   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26808   # take no chances and rewrite it.
26809   # Note: m4 eats our [], so we need to use [ and ] instead.
26810   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26811   if test "x$has_forbidden_chars" != x; then
26812     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26813     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26814   fi
26815 
26816 
26817   windows_path="$new_path"
26818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26819     unix_path=`$CYGPATH -u "$windows_path"`
26820     new_path="$unix_path"
26821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26823     new_path="$unix_path"
26824   fi
26825 
26826   if test "x$path" != "x$new_path"; then
26827     JAVA_HOME_PROCESSED="$new_path"
26828     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26829 $as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26830   fi
26831 
26832   # Save the first 10 bytes of this path to the storage, so fixpath can work.
26833   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26834 
26835     else
26836       # We're on a unix platform. Hooray! :)
26837       path="$JAVA_HOME_PROCESSED"
26838       has_space=`$ECHO "$path" | $GREP " "`
26839       if test "x$has_space" != x; then
26840         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26841 $as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26842         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26843       fi
26844 
26845       # Use eval to expand a potential ~
26846       eval path="$path"
26847       if test ! -f "$path" && test ! -d "$path"; then
26848         as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26849       fi
26850 
26851       if test -d "$path"; then
26852         JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26853       else
26854         dir="`$DIRNAME "$path"`"
26855         base="`$BASENAME "$path"`"
26856         JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26857       fi
26858     fi
26859   fi
26860 
26861     if test ! -d "$JAVA_HOME_PROCESSED"; then
26862       { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26863 $as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26864     else
26865       # Aha, the user has set a JAVA_HOME
26866       # let us use that as the Boot JDK.
26867       BOOT_JDK="$JAVA_HOME_PROCESSED"
26868       BOOT_JDK_FOUND=maybe
26869       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26870 $as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26871     fi
26872   fi
26873 
26874 
26875     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26876     if test "x$BOOT_JDK_FOUND" = xmaybe; then
26877       # Do we have a bin/java?
26878       if test ! -x "$BOOT_JDK/bin/java"; then
26879         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26880 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26881         BOOT_JDK_FOUND=no
26882       else
26883         # Do we have a bin/javac?
26884         if test ! -x "$BOOT_JDK/bin/javac"; then
26885           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26886 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26887           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26888 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26889           BOOT_JDK_FOUND=no
26890         else
26891           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26892           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26893 
26894           # Extra M4 quote needed to protect [] in grep expression.
26895           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26896           if test "x$FOUND_CORRECT_VERSION" = x; then
26897             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26898 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26899             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26900 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26901             BOOT_JDK_FOUND=no
26902           else
26903             # We're done! :-)
26904             BOOT_JDK_FOUND=yes
26905 
26906   # Only process if variable expands to non-empty
26907 
26908   if test "x$BOOT_JDK" != x; then
26909     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26910 
26911   # Input might be given as Windows format, start by converting to
26912   # unix format.
26913   path="$BOOT_JDK"
26914   new_path=`$CYGPATH -u "$path"`
26915 
26916   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26917   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26918   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26919   # "foo.exe" is OK but "foo" is an error.
26920   #
26921   # This test is therefore slightly more accurate than "test -f" to check for file precense.
26922   # It is also a way to make sure we got the proper file name for the real test later on.
26923   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26924   if test "x$test_shortpath" = x; then
26925     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26926 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26927     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26928   fi
26929 
26930   # Call helper function which possibly converts this using DOS-style short mode.
26931   # If so, the updated path is stored in $new_path.
26932 
26933   input_path="$new_path"
26934   # Check if we need to convert this using DOS-style short mode. If the path
26935   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26936   # take no chances and rewrite it.
26937   # Note: m4 eats our [], so we need to use [ and ] instead.
26938   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26939   if test "x$has_forbidden_chars" != x; then
26940     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26941     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26942     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26943     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26944       # Going to short mode and back again did indeed matter. Since short mode is
26945       # case insensitive, let's make it lowercase to improve readability.
26946       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26947       # Now convert it back to Unix-style (cygpath)
26948       input_path=`$CYGPATH -u "$shortmode_path"`
26949       new_path="$input_path"
26950     fi
26951   fi
26952 
26953   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26954   if test "x$test_cygdrive_prefix" = x; then
26955     # As a simple fix, exclude /usr/bin since it's not a real path.
26956     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26957       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26958       # a path prefixed by /cygdrive for fixpath to work.
26959       new_path="$CYGWIN_ROOT_PATH$input_path"
26960     fi
26961   fi
26962 
26963 
26964   if test "x$path" != "x$new_path"; then
26965     BOOT_JDK="$new_path"
26966     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26967 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26968   fi
26969 
26970     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26971 
26972   path="$BOOT_JDK"
26973   has_colon=`$ECHO $path | $GREP ^.:`
26974   new_path="$path"
26975   if test "x$has_colon" = x; then
26976     # Not in mixed or Windows style, start by that.
26977     new_path=`cmd //c echo $path`
26978   fi
26979 
26980 
26981   input_path="$new_path"
26982   # Check if we need to convert this using DOS-style short mode. If the path
26983   # contains just simple characters, use it. Otherwise (spaces, weird characters),
26984   # take no chances and rewrite it.
26985   # Note: m4 eats our [], so we need to use [ and ] instead.
26986   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26987   if test "x$has_forbidden_chars" != x; then
26988     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26989     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26990   fi
26991 
26992 
26993   windows_path="$new_path"
26994   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26995     unix_path=`$CYGPATH -u "$windows_path"`
26996     new_path="$unix_path"
26997   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26998     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26999     new_path="$unix_path"
27000   fi
27001 
27002   if test "x$path" != "x$new_path"; then
27003     BOOT_JDK="$new_path"
27004     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27005 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27006   fi
27007 
27008   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27009   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27010 
27011     else
27012       # We're on a unix platform. Hooray! :)
27013       path="$BOOT_JDK"
27014       has_space=`$ECHO "$path" | $GREP " "`
27015       if test "x$has_space" != x; then
27016         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27017 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27018         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27019       fi
27020 
27021       # Use eval to expand a potential ~
27022       eval path="$path"
27023       if test ! -f "$path" && test ! -d "$path"; then
27024         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27025       fi
27026 
27027       if test -d "$path"; then
27028         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27029       else
27030         dir="`$DIRNAME "$path"`"
27031         base="`$BASENAME "$path"`"
27032         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27033       fi
27034     fi
27035   fi
27036 
27037             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27038 $as_echo_n "checking for Boot JDK... " >&6; }
27039             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27040 $as_echo "$BOOT_JDK" >&6; }
27041             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27042 $as_echo_n "checking Boot JDK version... " >&6; }
27043             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27044             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27045 $as_echo "$BOOT_JDK_VERSION" >&6; }
27046           fi # end check jdk version
27047         fi # end check javac
27048       fi # end check java
27049     fi # end check boot jdk found
27050   fi
27051 
27052 
27053   # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
27054 
27055   if test "x$BOOT_JDK_FOUND" = xno; then
27056     # Now execute the test
27057 
27058   # Extract the first word of "javac", so it can be a program name with args.
27059 set dummy javac; ac_word=$2
27060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27061 $as_echo_n "checking for $ac_word... " >&6; }
27062 if ${ac_cv_path_JAVAC_CHECK+:} false; then :
27063   $as_echo_n "(cached) " >&6
27064 else
27065   case $JAVAC_CHECK in
27066   [\\/]* | ?:[\\/]*)
27067   ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
27068   ;;
27069   *)
27070   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27071 for as_dir in $PATH
27072 do
27073   IFS=$as_save_IFS
27074   test -z "$as_dir" && as_dir=.
27075     for ac_exec_ext in '' $ac_executable_extensions; do
27076   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27077     ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
27078     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27079     break 2
27080   fi
27081 done
27082   done
27083 IFS=$as_save_IFS
27084 
27085   ;;
27086 esac
27087 fi
27088 JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
27089 if test -n "$JAVAC_CHECK"; then
27090   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
27091 $as_echo "$JAVAC_CHECK" >&6; }
27092 else
27093   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27094 $as_echo "no" >&6; }
27095 fi
27096 
27097 
27098   # Extract the first word of "java", so it can be a program name with args.
27099 set dummy java; ac_word=$2
27100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27101 $as_echo_n "checking for $ac_word... " >&6; }
27102 if ${ac_cv_path_JAVA_CHECK+:} false; then :
27103   $as_echo_n "(cached) " >&6
27104 else
27105   case $JAVA_CHECK in
27106   [\\/]* | ?:[\\/]*)
27107   ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
27108   ;;
27109   *)
27110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27111 for as_dir in $PATH
27112 do
27113   IFS=$as_save_IFS
27114   test -z "$as_dir" && as_dir=.
27115     for ac_exec_ext in '' $ac_executable_extensions; do
27116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27117     ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
27118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27119     break 2
27120   fi
27121 done
27122   done
27123 IFS=$as_save_IFS
27124 
27125   ;;
27126 esac
27127 fi
27128 JAVA_CHECK=$ac_cv_path_JAVA_CHECK
27129 if test -n "$JAVA_CHECK"; then
27130   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
27131 $as_echo "$JAVA_CHECK" >&6; }
27132 else
27133   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27134 $as_echo "no" >&6; }
27135 fi
27136 
27137 
27138   BINARY="$JAVAC_CHECK"
27139   if test "x$JAVAC_CHECK" = x; then
27140     BINARY="$JAVA_CHECK"
27141   fi
27142   if test "x$BINARY" != x; then
27143     # So there is a java(c) binary, it might be part of a JDK.
27144     # Lets find the JDK/JRE directory by following symbolic links.
27145     # Linux/GNU systems often have links from /usr/bin/java to
27146     # /etc/alternatives/java to the real JDK binary.
27147 
27148   if test "x$OPENJDK_BUILD_OS" != xwindows; then
27149     # Follow a chain of symbolic links. Use readlink
27150     # where it exists, else fall back to horribly
27151     # complicated shell code.
27152     if test "x$READLINK_TESTED" != yes; then
27153       # On MacOSX there is a readlink tool with a different
27154       # purpose than the GNU readlink tool. Check the found readlink.
27155       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27156       if test "x$ISGNU" = x; then
27157         # A readlink that we do not know how to use.
27158         # Are there other non-GNU readlinks out there?
27159         READLINK_TESTED=yes
27160         READLINK=
27161       fi
27162     fi
27163 
27164     if test "x$READLINK" != x; then
27165       BINARY=`$READLINK -f $BINARY`
27166     else
27167       # Save the current directory for restoring afterwards
27168       STARTDIR=$PWD
27169       COUNTER=0
27170       sym_link_dir=`$DIRNAME $BINARY`
27171       sym_link_file=`$BASENAME $BINARY`
27172       cd $sym_link_dir
27173       # Use -P flag to resolve symlinks in directories.
27174       cd `$THEPWDCMD -P`
27175       sym_link_dir=`$THEPWDCMD -P`
27176       # Resolve file symlinks
27177       while test $COUNTER -lt 20; do
27178         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27179         if test "x$ISLINK" == x; then
27180           # This is not a symbolic link! We are done!
27181           break
27182         fi
27183         # Again resolve directory symlinks since the target of the just found
27184         # link could be in a different directory
27185         cd `$DIRNAME $ISLINK`
27186         sym_link_dir=`$THEPWDCMD -P`
27187         sym_link_file=`$BASENAME $ISLINK`
27188         let COUNTER=COUNTER+1
27189       done
27190       cd $STARTDIR
27191       BINARY=$sym_link_dir/$sym_link_file
27192     fi
27193   fi
27194 
27195     BOOT_JDK=`dirname "$BINARY"`
27196     BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
27197     if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
27198       # Looks like we found ourselves an JDK
27199       BOOT_JDK_FOUND=maybe
27200       { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
27201 $as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
27202     fi
27203   fi
27204 
27205 
27206     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27207     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27208       # Do we have a bin/java?
27209       if test ! -x "$BOOT_JDK/bin/java"; then
27210         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27211 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27212         BOOT_JDK_FOUND=no
27213       else
27214         # Do we have a bin/javac?
27215         if test ! -x "$BOOT_JDK/bin/javac"; then
27216           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27217 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27218           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27219 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27220           BOOT_JDK_FOUND=no
27221         else
27222           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27223           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27224 
27225           # Extra M4 quote needed to protect [] in grep expression.
27226           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27227           if test "x$FOUND_CORRECT_VERSION" = x; then
27228             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27229 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27230             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27231 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27232             BOOT_JDK_FOUND=no
27233           else
27234             # We're done! :-)
27235             BOOT_JDK_FOUND=yes
27236 
27237   # Only process if variable expands to non-empty
27238 
27239   if test "x$BOOT_JDK" != x; then
27240     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27241 
27242   # Input might be given as Windows format, start by converting to
27243   # unix format.
27244   path="$BOOT_JDK"
27245   new_path=`$CYGPATH -u "$path"`
27246 
27247   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27248   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27249   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27250   # "foo.exe" is OK but "foo" is an error.
27251   #
27252   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27253   # It is also a way to make sure we got the proper file name for the real test later on.
27254   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27255   if test "x$test_shortpath" = x; then
27256     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27257 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27258     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27259   fi
27260 
27261   # Call helper function which possibly converts this using DOS-style short mode.
27262   # If so, the updated path is stored in $new_path.
27263 
27264   input_path="$new_path"
27265   # Check if we need to convert this using DOS-style short mode. If the path
27266   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27267   # take no chances and rewrite it.
27268   # Note: m4 eats our [], so we need to use [ and ] instead.
27269   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27270   if test "x$has_forbidden_chars" != x; then
27271     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27272     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27273     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27274     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27275       # Going to short mode and back again did indeed matter. Since short mode is
27276       # case insensitive, let's make it lowercase to improve readability.
27277       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27278       # Now convert it back to Unix-style (cygpath)
27279       input_path=`$CYGPATH -u "$shortmode_path"`
27280       new_path="$input_path"
27281     fi
27282   fi
27283 
27284   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27285   if test "x$test_cygdrive_prefix" = x; then
27286     # As a simple fix, exclude /usr/bin since it's not a real path.
27287     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27288       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27289       # a path prefixed by /cygdrive for fixpath to work.
27290       new_path="$CYGWIN_ROOT_PATH$input_path"
27291     fi
27292   fi
27293 
27294 
27295   if test "x$path" != "x$new_path"; then
27296     BOOT_JDK="$new_path"
27297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27298 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27299   fi
27300 
27301     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27302 
27303   path="$BOOT_JDK"
27304   has_colon=`$ECHO $path | $GREP ^.:`
27305   new_path="$path"
27306   if test "x$has_colon" = x; then
27307     # Not in mixed or Windows style, start by that.
27308     new_path=`cmd //c echo $path`
27309   fi
27310 
27311 
27312   input_path="$new_path"
27313   # Check if we need to convert this using DOS-style short mode. If the path
27314   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27315   # take no chances and rewrite it.
27316   # Note: m4 eats our [], so we need to use [ and ] instead.
27317   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27318   if test "x$has_forbidden_chars" != x; then
27319     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27320     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27321   fi
27322 
27323 
27324   windows_path="$new_path"
27325   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27326     unix_path=`$CYGPATH -u "$windows_path"`
27327     new_path="$unix_path"
27328   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27329     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27330     new_path="$unix_path"
27331   fi
27332 
27333   if test "x$path" != "x$new_path"; then
27334     BOOT_JDK="$new_path"
27335     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27336 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27337   fi
27338 
27339   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27340   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27341 
27342     else
27343       # We're on a unix platform. Hooray! :)
27344       path="$BOOT_JDK"
27345       has_space=`$ECHO "$path" | $GREP " "`
27346       if test "x$has_space" != x; then
27347         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27348 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27349         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27350       fi
27351 
27352       # Use eval to expand a potential ~
27353       eval path="$path"
27354       if test ! -f "$path" && test ! -d "$path"; then
27355         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27356       fi
27357 
27358       if test -d "$path"; then
27359         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27360       else
27361         dir="`$DIRNAME "$path"`"
27362         base="`$BASENAME "$path"`"
27363         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27364       fi
27365     fi
27366   fi
27367 
27368             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27369 $as_echo_n "checking for Boot JDK... " >&6; }
27370             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27371 $as_echo "$BOOT_JDK" >&6; }
27372             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27373 $as_echo_n "checking Boot JDK version... " >&6; }
27374             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27375             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27376 $as_echo "$BOOT_JDK_VERSION" >&6; }
27377           fi # end check jdk version
27378         fi # end check javac
27379       fi # end check java
27380     fi # end check boot jdk found
27381   fi
27382 
27383 
27384   # Test: Is there a JDK installed in default, well-known locations?
27385 
27386   if test "x$BOOT_JDK_FOUND" = xno; then
27387     # Now execute the test
27388 
27389   if test "x$OPENJDK_TARGET_OS" = xwindows; then
27390 
27391   if test "x$BOOT_JDK_FOUND" = xno; then
27392     # Now execute the test
27393 
27394   if test "x$ProgramW6432" != x; then
27395     VIRTUAL_DIR="$ProgramW6432/Java"
27396 
27397   windows_path="$VIRTUAL_DIR"
27398   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27399     unix_path=`$CYGPATH -u "$windows_path"`
27400     VIRTUAL_DIR="$unix_path"
27401   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27402     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27403     VIRTUAL_DIR="$unix_path"
27404   fi
27405 
27406 
27407   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27408   BOOT_JDK_SUFFIX=""
27409   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27410   if test "x$ALL_JDKS_FOUND" != x; then
27411     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27412 
27413   if test "x$BOOT_JDK_FOUND" = xno; then
27414     # Now execute the test
27415 
27416         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27417         if test -d "$BOOT_JDK"; then
27418           BOOT_JDK_FOUND=maybe
27419           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27420 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27421         fi
27422 
27423 
27424     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27425     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27426       # Do we have a bin/java?
27427       if test ! -x "$BOOT_JDK/bin/java"; then
27428         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27429 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27430         BOOT_JDK_FOUND=no
27431       else
27432         # Do we have a bin/javac?
27433         if test ! -x "$BOOT_JDK/bin/javac"; then
27434           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27435 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27436           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27437 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27438           BOOT_JDK_FOUND=no
27439         else
27440           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27441           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27442 
27443           # Extra M4 quote needed to protect [] in grep expression.
27444           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27445           if test "x$FOUND_CORRECT_VERSION" = x; then
27446             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27447 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27448             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27449 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27450             BOOT_JDK_FOUND=no
27451           else
27452             # We're done! :-)
27453             BOOT_JDK_FOUND=yes
27454 
27455   # Only process if variable expands to non-empty
27456 
27457   if test "x$BOOT_JDK" != x; then
27458     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27459 
27460   # Input might be given as Windows format, start by converting to
27461   # unix format.
27462   path="$BOOT_JDK"
27463   new_path=`$CYGPATH -u "$path"`
27464 
27465   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27466   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27467   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27468   # "foo.exe" is OK but "foo" is an error.
27469   #
27470   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27471   # It is also a way to make sure we got the proper file name for the real test later on.
27472   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27473   if test "x$test_shortpath" = x; then
27474     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27475 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27476     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27477   fi
27478 
27479   # Call helper function which possibly converts this using DOS-style short mode.
27480   # If so, the updated path is stored in $new_path.
27481 
27482   input_path="$new_path"
27483   # Check if we need to convert this using DOS-style short mode. If the path
27484   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27485   # take no chances and rewrite it.
27486   # Note: m4 eats our [], so we need to use [ and ] instead.
27487   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27488   if test "x$has_forbidden_chars" != x; then
27489     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27490     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27491     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27492     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27493       # Going to short mode and back again did indeed matter. Since short mode is
27494       # case insensitive, let's make it lowercase to improve readability.
27495       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27496       # Now convert it back to Unix-style (cygpath)
27497       input_path=`$CYGPATH -u "$shortmode_path"`
27498       new_path="$input_path"
27499     fi
27500   fi
27501 
27502   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27503   if test "x$test_cygdrive_prefix" = x; then
27504     # As a simple fix, exclude /usr/bin since it's not a real path.
27505     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27506       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27507       # a path prefixed by /cygdrive for fixpath to work.
27508       new_path="$CYGWIN_ROOT_PATH$input_path"
27509     fi
27510   fi
27511 
27512 
27513   if test "x$path" != "x$new_path"; then
27514     BOOT_JDK="$new_path"
27515     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27516 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27517   fi
27518 
27519     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27520 
27521   path="$BOOT_JDK"
27522   has_colon=`$ECHO $path | $GREP ^.:`
27523   new_path="$path"
27524   if test "x$has_colon" = x; then
27525     # Not in mixed or Windows style, start by that.
27526     new_path=`cmd //c echo $path`
27527   fi
27528 
27529 
27530   input_path="$new_path"
27531   # Check if we need to convert this using DOS-style short mode. If the path
27532   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27533   # take no chances and rewrite it.
27534   # Note: m4 eats our [], so we need to use [ and ] instead.
27535   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27536   if test "x$has_forbidden_chars" != x; then
27537     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27538     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27539   fi
27540 
27541 
27542   windows_path="$new_path"
27543   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27544     unix_path=`$CYGPATH -u "$windows_path"`
27545     new_path="$unix_path"
27546   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27547     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27548     new_path="$unix_path"
27549   fi
27550 
27551   if test "x$path" != "x$new_path"; then
27552     BOOT_JDK="$new_path"
27553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27554 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27555   fi
27556 
27557   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27558   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27559 
27560     else
27561       # We're on a unix platform. Hooray! :)
27562       path="$BOOT_JDK"
27563       has_space=`$ECHO "$path" | $GREP " "`
27564       if test "x$has_space" != x; then
27565         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27566 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27567         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27568       fi
27569 
27570       # Use eval to expand a potential ~
27571       eval path="$path"
27572       if test ! -f "$path" && test ! -d "$path"; then
27573         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27574       fi
27575 
27576       if test -d "$path"; then
27577         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27578       else
27579         dir="`$DIRNAME "$path"`"
27580         base="`$BASENAME "$path"`"
27581         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27582       fi
27583     fi
27584   fi
27585 
27586             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27587 $as_echo_n "checking for Boot JDK... " >&6; }
27588             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27589 $as_echo "$BOOT_JDK" >&6; }
27590             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27591 $as_echo_n "checking Boot JDK version... " >&6; }
27592             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27593             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27594 $as_echo "$BOOT_JDK_VERSION" >&6; }
27595           fi # end check jdk version
27596         fi # end check javac
27597       fi # end check java
27598     fi # end check boot jdk found
27599   fi
27600 
27601     done
27602   fi
27603 
27604   fi
27605 
27606 
27607     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27608     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27609       # Do we have a bin/java?
27610       if test ! -x "$BOOT_JDK/bin/java"; then
27611         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27612 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27613         BOOT_JDK_FOUND=no
27614       else
27615         # Do we have a bin/javac?
27616         if test ! -x "$BOOT_JDK/bin/javac"; then
27617           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27618 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27619           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27620 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27621           BOOT_JDK_FOUND=no
27622         else
27623           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27624           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27625 
27626           # Extra M4 quote needed to protect [] in grep expression.
27627           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27628           if test "x$FOUND_CORRECT_VERSION" = x; then
27629             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27630 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27631             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27632 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27633             BOOT_JDK_FOUND=no
27634           else
27635             # We're done! :-)
27636             BOOT_JDK_FOUND=yes
27637 
27638   # Only process if variable expands to non-empty
27639 
27640   if test "x$BOOT_JDK" != x; then
27641     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27642 
27643   # Input might be given as Windows format, start by converting to
27644   # unix format.
27645   path="$BOOT_JDK"
27646   new_path=`$CYGPATH -u "$path"`
27647 
27648   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27649   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27650   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27651   # "foo.exe" is OK but "foo" is an error.
27652   #
27653   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27654   # It is also a way to make sure we got the proper file name for the real test later on.
27655   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27656   if test "x$test_shortpath" = x; then
27657     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27658 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27659     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27660   fi
27661 
27662   # Call helper function which possibly converts this using DOS-style short mode.
27663   # If so, the updated path is stored in $new_path.
27664 
27665   input_path="$new_path"
27666   # Check if we need to convert this using DOS-style short mode. If the path
27667   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27668   # take no chances and rewrite it.
27669   # Note: m4 eats our [], so we need to use [ and ] instead.
27670   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27671   if test "x$has_forbidden_chars" != x; then
27672     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27673     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27674     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27675     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27676       # Going to short mode and back again did indeed matter. Since short mode is
27677       # case insensitive, let's make it lowercase to improve readability.
27678       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27679       # Now convert it back to Unix-style (cygpath)
27680       input_path=`$CYGPATH -u "$shortmode_path"`
27681       new_path="$input_path"
27682     fi
27683   fi
27684 
27685   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27686   if test "x$test_cygdrive_prefix" = x; then
27687     # As a simple fix, exclude /usr/bin since it's not a real path.
27688     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27689       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27690       # a path prefixed by /cygdrive for fixpath to work.
27691       new_path="$CYGWIN_ROOT_PATH$input_path"
27692     fi
27693   fi
27694 
27695 
27696   if test "x$path" != "x$new_path"; then
27697     BOOT_JDK="$new_path"
27698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27699 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27700   fi
27701 
27702     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27703 
27704   path="$BOOT_JDK"
27705   has_colon=`$ECHO $path | $GREP ^.:`
27706   new_path="$path"
27707   if test "x$has_colon" = x; then
27708     # Not in mixed or Windows style, start by that.
27709     new_path=`cmd //c echo $path`
27710   fi
27711 
27712 
27713   input_path="$new_path"
27714   # Check if we need to convert this using DOS-style short mode. If the path
27715   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27716   # take no chances and rewrite it.
27717   # Note: m4 eats our [], so we need to use [ and ] instead.
27718   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27719   if test "x$has_forbidden_chars" != x; then
27720     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27721     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27722   fi
27723 
27724 
27725   windows_path="$new_path"
27726   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27727     unix_path=`$CYGPATH -u "$windows_path"`
27728     new_path="$unix_path"
27729   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27730     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27731     new_path="$unix_path"
27732   fi
27733 
27734   if test "x$path" != "x$new_path"; then
27735     BOOT_JDK="$new_path"
27736     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27737 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27738   fi
27739 
27740   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27741   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27742 
27743     else
27744       # We're on a unix platform. Hooray! :)
27745       path="$BOOT_JDK"
27746       has_space=`$ECHO "$path" | $GREP " "`
27747       if test "x$has_space" != x; then
27748         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27749 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27750         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27751       fi
27752 
27753       # Use eval to expand a potential ~
27754       eval path="$path"
27755       if test ! -f "$path" && test ! -d "$path"; then
27756         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27757       fi
27758 
27759       if test -d "$path"; then
27760         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27761       else
27762         dir="`$DIRNAME "$path"`"
27763         base="`$BASENAME "$path"`"
27764         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27765       fi
27766     fi
27767   fi
27768 
27769             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27770 $as_echo_n "checking for Boot JDK... " >&6; }
27771             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27772 $as_echo "$BOOT_JDK" >&6; }
27773             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27774 $as_echo_n "checking Boot JDK version... " >&6; }
27775             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27776             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27777 $as_echo "$BOOT_JDK_VERSION" >&6; }
27778           fi # end check jdk version
27779         fi # end check javac
27780       fi # end check java
27781     fi # end check boot jdk found
27782   fi
27783 
27784 
27785   if test "x$BOOT_JDK_FOUND" = xno; then
27786     # Now execute the test
27787 
27788   if test "x$PROGRAMW6432" != x; then
27789     VIRTUAL_DIR="$PROGRAMW6432/Java"
27790 
27791   windows_path="$VIRTUAL_DIR"
27792   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27793     unix_path=`$CYGPATH -u "$windows_path"`
27794     VIRTUAL_DIR="$unix_path"
27795   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27796     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27797     VIRTUAL_DIR="$unix_path"
27798   fi
27799 
27800 
27801   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27802   BOOT_JDK_SUFFIX=""
27803   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27804   if test "x$ALL_JDKS_FOUND" != x; then
27805     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27806 
27807   if test "x$BOOT_JDK_FOUND" = xno; then
27808     # Now execute the test
27809 
27810         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27811         if test -d "$BOOT_JDK"; then
27812           BOOT_JDK_FOUND=maybe
27813           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27814 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27815         fi
27816 
27817 
27818     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27819     if test "x$BOOT_JDK_FOUND" = xmaybe; then
27820       # Do we have a bin/java?
27821       if test ! -x "$BOOT_JDK/bin/java"; then
27822         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27823 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27824         BOOT_JDK_FOUND=no
27825       else
27826         # Do we have a bin/javac?
27827         if test ! -x "$BOOT_JDK/bin/javac"; then
27828           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27829 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27830           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27831 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27832           BOOT_JDK_FOUND=no
27833         else
27834           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27835           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27836 
27837           # Extra M4 quote needed to protect [] in grep expression.
27838           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27839           if test "x$FOUND_CORRECT_VERSION" = x; then
27840             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27841 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27842             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27843 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27844             BOOT_JDK_FOUND=no
27845           else
27846             # We're done! :-)
27847             BOOT_JDK_FOUND=yes
27848 
27849   # Only process if variable expands to non-empty
27850 
27851   if test "x$BOOT_JDK" != x; then
27852     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27853 
27854   # Input might be given as Windows format, start by converting to
27855   # unix format.
27856   path="$BOOT_JDK"
27857   new_path=`$CYGPATH -u "$path"`
27858 
27859   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27860   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27861   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27862   # "foo.exe" is OK but "foo" is an error.
27863   #
27864   # This test is therefore slightly more accurate than "test -f" to check for file precense.
27865   # It is also a way to make sure we got the proper file name for the real test later on.
27866   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27867   if test "x$test_shortpath" = x; then
27868     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27869 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27870     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27871   fi
27872 
27873   # Call helper function which possibly converts this using DOS-style short mode.
27874   # If so, the updated path is stored in $new_path.
27875 
27876   input_path="$new_path"
27877   # Check if we need to convert this using DOS-style short mode. If the path
27878   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27879   # take no chances and rewrite it.
27880   # Note: m4 eats our [], so we need to use [ and ] instead.
27881   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27882   if test "x$has_forbidden_chars" != x; then
27883     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27884     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27885     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27886     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27887       # Going to short mode and back again did indeed matter. Since short mode is
27888       # case insensitive, let's make it lowercase to improve readability.
27889       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27890       # Now convert it back to Unix-style (cygpath)
27891       input_path=`$CYGPATH -u "$shortmode_path"`
27892       new_path="$input_path"
27893     fi
27894   fi
27895 
27896   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27897   if test "x$test_cygdrive_prefix" = x; then
27898     # As a simple fix, exclude /usr/bin since it's not a real path.
27899     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27900       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27901       # a path prefixed by /cygdrive for fixpath to work.
27902       new_path="$CYGWIN_ROOT_PATH$input_path"
27903     fi
27904   fi
27905 
27906 
27907   if test "x$path" != "x$new_path"; then
27908     BOOT_JDK="$new_path"
27909     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27910 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27911   fi
27912 
27913     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27914 
27915   path="$BOOT_JDK"
27916   has_colon=`$ECHO $path | $GREP ^.:`
27917   new_path="$path"
27918   if test "x$has_colon" = x; then
27919     # Not in mixed or Windows style, start by that.
27920     new_path=`cmd //c echo $path`
27921   fi
27922 
27923 
27924   input_path="$new_path"
27925   # Check if we need to convert this using DOS-style short mode. If the path
27926   # contains just simple characters, use it. Otherwise (spaces, weird characters),
27927   # take no chances and rewrite it.
27928   # Note: m4 eats our [], so we need to use [ and ] instead.
27929   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27930   if test "x$has_forbidden_chars" != x; then
27931     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27932     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27933   fi
27934 
27935 
27936   windows_path="$new_path"
27937   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27938     unix_path=`$CYGPATH -u "$windows_path"`
27939     new_path="$unix_path"
27940   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27941     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27942     new_path="$unix_path"
27943   fi
27944 
27945   if test "x$path" != "x$new_path"; then
27946     BOOT_JDK="$new_path"
27947     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27948 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27949   fi
27950 
27951   # Save the first 10 bytes of this path to the storage, so fixpath can work.
27952   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27953 
27954     else
27955       # We're on a unix platform. Hooray! :)
27956       path="$BOOT_JDK"
27957       has_space=`$ECHO "$path" | $GREP " "`
27958       if test "x$has_space" != x; then
27959         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27960 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27961         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27962       fi
27963 
27964       # Use eval to expand a potential ~
27965       eval path="$path"
27966       if test ! -f "$path" && test ! -d "$path"; then
27967         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27968       fi
27969 
27970       if test -d "$path"; then
27971         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27972       else
27973         dir="`$DIRNAME "$path"`"
27974         base="`$BASENAME "$path"`"
27975         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27976       fi
27977     fi
27978   fi
27979 
27980             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27981 $as_echo_n "checking for Boot JDK... " >&6; }
27982             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27983 $as_echo "$BOOT_JDK" >&6; }
27984             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27985 $as_echo_n "checking Boot JDK version... " >&6; }
27986             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27987             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27988 $as_echo "$BOOT_JDK_VERSION" >&6; }
27989           fi # end check jdk version
27990         fi # end check javac
27991       fi # end check java
27992     fi # end check boot jdk found
27993   fi
27994 
27995     done
27996   fi
27997 
27998   fi
27999 
28000 
28001     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28002     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28003       # Do we have a bin/java?
28004       if test ! -x "$BOOT_JDK/bin/java"; then
28005         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28006 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28007         BOOT_JDK_FOUND=no
28008       else
28009         # Do we have a bin/javac?
28010         if test ! -x "$BOOT_JDK/bin/javac"; then
28011           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28012 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28013           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28014 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28015           BOOT_JDK_FOUND=no
28016         else
28017           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28018           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28019 
28020           # Extra M4 quote needed to protect [] in grep expression.
28021           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28022           if test "x$FOUND_CORRECT_VERSION" = x; then
28023             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28024 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28025             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28026 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28027             BOOT_JDK_FOUND=no
28028           else
28029             # We're done! :-)
28030             BOOT_JDK_FOUND=yes
28031 
28032   # Only process if variable expands to non-empty
28033 
28034   if test "x$BOOT_JDK" != x; then
28035     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28036 
28037   # Input might be given as Windows format, start by converting to
28038   # unix format.
28039   path="$BOOT_JDK"
28040   new_path=`$CYGPATH -u "$path"`
28041 
28042   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28043   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28044   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28045   # "foo.exe" is OK but "foo" is an error.
28046   #
28047   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28048   # It is also a way to make sure we got the proper file name for the real test later on.
28049   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28050   if test "x$test_shortpath" = x; then
28051     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28052 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28053     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28054   fi
28055 
28056   # Call helper function which possibly converts this using DOS-style short mode.
28057   # If so, the updated path is stored in $new_path.
28058 
28059   input_path="$new_path"
28060   # Check if we need to convert this using DOS-style short mode. If the path
28061   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28062   # take no chances and rewrite it.
28063   # Note: m4 eats our [], so we need to use [ and ] instead.
28064   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28065   if test "x$has_forbidden_chars" != x; then
28066     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28067     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28068     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28069     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28070       # Going to short mode and back again did indeed matter. Since short mode is
28071       # case insensitive, let's make it lowercase to improve readability.
28072       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28073       # Now convert it back to Unix-style (cygpath)
28074       input_path=`$CYGPATH -u "$shortmode_path"`
28075       new_path="$input_path"
28076     fi
28077   fi
28078 
28079   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28080   if test "x$test_cygdrive_prefix" = x; then
28081     # As a simple fix, exclude /usr/bin since it's not a real path.
28082     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28083       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28084       # a path prefixed by /cygdrive for fixpath to work.
28085       new_path="$CYGWIN_ROOT_PATH$input_path"
28086     fi
28087   fi
28088 
28089 
28090   if test "x$path" != "x$new_path"; then
28091     BOOT_JDK="$new_path"
28092     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28093 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28094   fi
28095 
28096     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28097 
28098   path="$BOOT_JDK"
28099   has_colon=`$ECHO $path | $GREP ^.:`
28100   new_path="$path"
28101   if test "x$has_colon" = x; then
28102     # Not in mixed or Windows style, start by that.
28103     new_path=`cmd //c echo $path`
28104   fi
28105 
28106 
28107   input_path="$new_path"
28108   # Check if we need to convert this using DOS-style short mode. If the path
28109   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28110   # take no chances and rewrite it.
28111   # Note: m4 eats our [], so we need to use [ and ] instead.
28112   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28113   if test "x$has_forbidden_chars" != x; then
28114     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28115     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28116   fi
28117 
28118 
28119   windows_path="$new_path"
28120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28121     unix_path=`$CYGPATH -u "$windows_path"`
28122     new_path="$unix_path"
28123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28125     new_path="$unix_path"
28126   fi
28127 
28128   if test "x$path" != "x$new_path"; then
28129     BOOT_JDK="$new_path"
28130     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28131 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28132   fi
28133 
28134   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28135   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28136 
28137     else
28138       # We're on a unix platform. Hooray! :)
28139       path="$BOOT_JDK"
28140       has_space=`$ECHO "$path" | $GREP " "`
28141       if test "x$has_space" != x; then
28142         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28143 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28144         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28145       fi
28146 
28147       # Use eval to expand a potential ~
28148       eval path="$path"
28149       if test ! -f "$path" && test ! -d "$path"; then
28150         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28151       fi
28152 
28153       if test -d "$path"; then
28154         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28155       else
28156         dir="`$DIRNAME "$path"`"
28157         base="`$BASENAME "$path"`"
28158         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28159       fi
28160     fi
28161   fi
28162 
28163             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28164 $as_echo_n "checking for Boot JDK... " >&6; }
28165             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28166 $as_echo "$BOOT_JDK" >&6; }
28167             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28168 $as_echo_n "checking Boot JDK version... " >&6; }
28169             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28170             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28171 $as_echo "$BOOT_JDK_VERSION" >&6; }
28172           fi # end check jdk version
28173         fi # end check javac
28174       fi # end check java
28175     fi # end check boot jdk found
28176   fi
28177 
28178 
28179   if test "x$BOOT_JDK_FOUND" = xno; then
28180     # Now execute the test
28181 
28182   if test "x$PROGRAMFILES" != x; then
28183     VIRTUAL_DIR="$PROGRAMFILES/Java"
28184 
28185   windows_path="$VIRTUAL_DIR"
28186   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28187     unix_path=`$CYGPATH -u "$windows_path"`
28188     VIRTUAL_DIR="$unix_path"
28189   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28190     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28191     VIRTUAL_DIR="$unix_path"
28192   fi
28193 
28194 
28195   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28196   BOOT_JDK_SUFFIX=""
28197   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28198   if test "x$ALL_JDKS_FOUND" != x; then
28199     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28200 
28201   if test "x$BOOT_JDK_FOUND" = xno; then
28202     # Now execute the test
28203 
28204         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28205         if test -d "$BOOT_JDK"; then
28206           BOOT_JDK_FOUND=maybe
28207           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28208 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28209         fi
28210 
28211 
28212     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28213     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28214       # Do we have a bin/java?
28215       if test ! -x "$BOOT_JDK/bin/java"; then
28216         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28217 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28218         BOOT_JDK_FOUND=no
28219       else
28220         # Do we have a bin/javac?
28221         if test ! -x "$BOOT_JDK/bin/javac"; then
28222           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28223 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28224           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28225 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28226           BOOT_JDK_FOUND=no
28227         else
28228           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28229           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28230 
28231           # Extra M4 quote needed to protect [] in grep expression.
28232           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28233           if test "x$FOUND_CORRECT_VERSION" = x; then
28234             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28235 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28236             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28237 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28238             BOOT_JDK_FOUND=no
28239           else
28240             # We're done! :-)
28241             BOOT_JDK_FOUND=yes
28242 
28243   # Only process if variable expands to non-empty
28244 
28245   if test "x$BOOT_JDK" != x; then
28246     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28247 
28248   # Input might be given as Windows format, start by converting to
28249   # unix format.
28250   path="$BOOT_JDK"
28251   new_path=`$CYGPATH -u "$path"`
28252 
28253   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28254   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28255   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28256   # "foo.exe" is OK but "foo" is an error.
28257   #
28258   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28259   # It is also a way to make sure we got the proper file name for the real test later on.
28260   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28261   if test "x$test_shortpath" = x; then
28262     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28263 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28264     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28265   fi
28266 
28267   # Call helper function which possibly converts this using DOS-style short mode.
28268   # If so, the updated path is stored in $new_path.
28269 
28270   input_path="$new_path"
28271   # Check if we need to convert this using DOS-style short mode. If the path
28272   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28273   # take no chances and rewrite it.
28274   # Note: m4 eats our [], so we need to use [ and ] instead.
28275   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28276   if test "x$has_forbidden_chars" != x; then
28277     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28278     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28279     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28280     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28281       # Going to short mode and back again did indeed matter. Since short mode is
28282       # case insensitive, let's make it lowercase to improve readability.
28283       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28284       # Now convert it back to Unix-style (cygpath)
28285       input_path=`$CYGPATH -u "$shortmode_path"`
28286       new_path="$input_path"
28287     fi
28288   fi
28289 
28290   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28291   if test "x$test_cygdrive_prefix" = x; then
28292     # As a simple fix, exclude /usr/bin since it's not a real path.
28293     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28294       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28295       # a path prefixed by /cygdrive for fixpath to work.
28296       new_path="$CYGWIN_ROOT_PATH$input_path"
28297     fi
28298   fi
28299 
28300 
28301   if test "x$path" != "x$new_path"; then
28302     BOOT_JDK="$new_path"
28303     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28304 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28305   fi
28306 
28307     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28308 
28309   path="$BOOT_JDK"
28310   has_colon=`$ECHO $path | $GREP ^.:`
28311   new_path="$path"
28312   if test "x$has_colon" = x; then
28313     # Not in mixed or Windows style, start by that.
28314     new_path=`cmd //c echo $path`
28315   fi
28316 
28317 
28318   input_path="$new_path"
28319   # Check if we need to convert this using DOS-style short mode. If the path
28320   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28321   # take no chances and rewrite it.
28322   # Note: m4 eats our [], so we need to use [ and ] instead.
28323   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28324   if test "x$has_forbidden_chars" != x; then
28325     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28326     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28327   fi
28328 
28329 
28330   windows_path="$new_path"
28331   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28332     unix_path=`$CYGPATH -u "$windows_path"`
28333     new_path="$unix_path"
28334   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28335     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28336     new_path="$unix_path"
28337   fi
28338 
28339   if test "x$path" != "x$new_path"; then
28340     BOOT_JDK="$new_path"
28341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28342 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28343   fi
28344 
28345   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28346   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28347 
28348     else
28349       # We're on a unix platform. Hooray! :)
28350       path="$BOOT_JDK"
28351       has_space=`$ECHO "$path" | $GREP " "`
28352       if test "x$has_space" != x; then
28353         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28354 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28355         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28356       fi
28357 
28358       # Use eval to expand a potential ~
28359       eval path="$path"
28360       if test ! -f "$path" && test ! -d "$path"; then
28361         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28362       fi
28363 
28364       if test -d "$path"; then
28365         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28366       else
28367         dir="`$DIRNAME "$path"`"
28368         base="`$BASENAME "$path"`"
28369         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28370       fi
28371     fi
28372   fi
28373 
28374             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28375 $as_echo_n "checking for Boot JDK... " >&6; }
28376             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28377 $as_echo "$BOOT_JDK" >&6; }
28378             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28379 $as_echo_n "checking Boot JDK version... " >&6; }
28380             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28381             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28382 $as_echo "$BOOT_JDK_VERSION" >&6; }
28383           fi # end check jdk version
28384         fi # end check javac
28385       fi # end check java
28386     fi # end check boot jdk found
28387   fi
28388 
28389     done
28390   fi
28391 
28392   fi
28393 
28394 
28395     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28396     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28397       # Do we have a bin/java?
28398       if test ! -x "$BOOT_JDK/bin/java"; then
28399         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28400 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28401         BOOT_JDK_FOUND=no
28402       else
28403         # Do we have a bin/javac?
28404         if test ! -x "$BOOT_JDK/bin/javac"; then
28405           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28406 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28407           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28408 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28409           BOOT_JDK_FOUND=no
28410         else
28411           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28412           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28413 
28414           # Extra M4 quote needed to protect [] in grep expression.
28415           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28416           if test "x$FOUND_CORRECT_VERSION" = x; then
28417             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28418 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28419             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28420 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28421             BOOT_JDK_FOUND=no
28422           else
28423             # We're done! :-)
28424             BOOT_JDK_FOUND=yes
28425 
28426   # Only process if variable expands to non-empty
28427 
28428   if test "x$BOOT_JDK" != x; then
28429     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28430 
28431   # Input might be given as Windows format, start by converting to
28432   # unix format.
28433   path="$BOOT_JDK"
28434   new_path=`$CYGPATH -u "$path"`
28435 
28436   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28437   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28438   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28439   # "foo.exe" is OK but "foo" is an error.
28440   #
28441   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28442   # It is also a way to make sure we got the proper file name for the real test later on.
28443   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28444   if test "x$test_shortpath" = x; then
28445     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28446 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28447     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28448   fi
28449 
28450   # Call helper function which possibly converts this using DOS-style short mode.
28451   # If so, the updated path is stored in $new_path.
28452 
28453   input_path="$new_path"
28454   # Check if we need to convert this using DOS-style short mode. If the path
28455   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28456   # take no chances and rewrite it.
28457   # Note: m4 eats our [], so we need to use [ and ] instead.
28458   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28459   if test "x$has_forbidden_chars" != x; then
28460     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28461     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28462     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28463     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28464       # Going to short mode and back again did indeed matter. Since short mode is
28465       # case insensitive, let's make it lowercase to improve readability.
28466       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28467       # Now convert it back to Unix-style (cygpath)
28468       input_path=`$CYGPATH -u "$shortmode_path"`
28469       new_path="$input_path"
28470     fi
28471   fi
28472 
28473   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28474   if test "x$test_cygdrive_prefix" = x; then
28475     # As a simple fix, exclude /usr/bin since it's not a real path.
28476     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28477       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28478       # a path prefixed by /cygdrive for fixpath to work.
28479       new_path="$CYGWIN_ROOT_PATH$input_path"
28480     fi
28481   fi
28482 
28483 
28484   if test "x$path" != "x$new_path"; then
28485     BOOT_JDK="$new_path"
28486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28487 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28488   fi
28489 
28490     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28491 
28492   path="$BOOT_JDK"
28493   has_colon=`$ECHO $path | $GREP ^.:`
28494   new_path="$path"
28495   if test "x$has_colon" = x; then
28496     # Not in mixed or Windows style, start by that.
28497     new_path=`cmd //c echo $path`
28498   fi
28499 
28500 
28501   input_path="$new_path"
28502   # Check if we need to convert this using DOS-style short mode. If the path
28503   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28504   # take no chances and rewrite it.
28505   # Note: m4 eats our [], so we need to use [ and ] instead.
28506   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28507   if test "x$has_forbidden_chars" != x; then
28508     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28509     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28510   fi
28511 
28512 
28513   windows_path="$new_path"
28514   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28515     unix_path=`$CYGPATH -u "$windows_path"`
28516     new_path="$unix_path"
28517   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28518     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28519     new_path="$unix_path"
28520   fi
28521 
28522   if test "x$path" != "x$new_path"; then
28523     BOOT_JDK="$new_path"
28524     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28525 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28526   fi
28527 
28528   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28529   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28530 
28531     else
28532       # We're on a unix platform. Hooray! :)
28533       path="$BOOT_JDK"
28534       has_space=`$ECHO "$path" | $GREP " "`
28535       if test "x$has_space" != x; then
28536         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28537 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28538         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28539       fi
28540 
28541       # Use eval to expand a potential ~
28542       eval path="$path"
28543       if test ! -f "$path" && test ! -d "$path"; then
28544         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28545       fi
28546 
28547       if test -d "$path"; then
28548         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28549       else
28550         dir="`$DIRNAME "$path"`"
28551         base="`$BASENAME "$path"`"
28552         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28553       fi
28554     fi
28555   fi
28556 
28557             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28558 $as_echo_n "checking for Boot JDK... " >&6; }
28559             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28560 $as_echo "$BOOT_JDK" >&6; }
28561             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28562 $as_echo_n "checking Boot JDK version... " >&6; }
28563             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28564             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28565 $as_echo "$BOOT_JDK_VERSION" >&6; }
28566           fi # end check jdk version
28567         fi # end check javac
28568       fi # end check java
28569     fi # end check boot jdk found
28570   fi
28571 
28572 
28573   if test "x$BOOT_JDK_FOUND" = xno; then
28574     # Now execute the test
28575 
28576   if test "x$ProgramFiles" != x; then
28577     VIRTUAL_DIR="$ProgramFiles/Java"
28578 
28579   windows_path="$VIRTUAL_DIR"
28580   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28581     unix_path=`$CYGPATH -u "$windows_path"`
28582     VIRTUAL_DIR="$unix_path"
28583   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28584     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28585     VIRTUAL_DIR="$unix_path"
28586   fi
28587 
28588 
28589   BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28590   BOOT_JDK_SUFFIX=""
28591   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28592   if test "x$ALL_JDKS_FOUND" != x; then
28593     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28594 
28595   if test "x$BOOT_JDK_FOUND" = xno; then
28596     # Now execute the test
28597 
28598         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28599         if test -d "$BOOT_JDK"; then
28600           BOOT_JDK_FOUND=maybe
28601           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28602 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28603         fi
28604 
28605 
28606     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28607     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28608       # Do we have a bin/java?
28609       if test ! -x "$BOOT_JDK/bin/java"; then
28610         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28611 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28612         BOOT_JDK_FOUND=no
28613       else
28614         # Do we have a bin/javac?
28615         if test ! -x "$BOOT_JDK/bin/javac"; then
28616           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28617 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28618           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28619 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28620           BOOT_JDK_FOUND=no
28621         else
28622           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28623           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28624 
28625           # Extra M4 quote needed to protect [] in grep expression.
28626           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28627           if test "x$FOUND_CORRECT_VERSION" = x; then
28628             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28629 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28630             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28631 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28632             BOOT_JDK_FOUND=no
28633           else
28634             # We're done! :-)
28635             BOOT_JDK_FOUND=yes
28636 
28637   # Only process if variable expands to non-empty
28638 
28639   if test "x$BOOT_JDK" != x; then
28640     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28641 
28642   # Input might be given as Windows format, start by converting to
28643   # unix format.
28644   path="$BOOT_JDK"
28645   new_path=`$CYGPATH -u "$path"`
28646 
28647   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28648   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28649   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28650   # "foo.exe" is OK but "foo" is an error.
28651   #
28652   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28653   # It is also a way to make sure we got the proper file name for the real test later on.
28654   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28655   if test "x$test_shortpath" = x; then
28656     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28657 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28658     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28659   fi
28660 
28661   # Call helper function which possibly converts this using DOS-style short mode.
28662   # If so, the updated path is stored in $new_path.
28663 
28664   input_path="$new_path"
28665   # Check if we need to convert this using DOS-style short mode. If the path
28666   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28667   # take no chances and rewrite it.
28668   # Note: m4 eats our [], so we need to use [ and ] instead.
28669   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28670   if test "x$has_forbidden_chars" != x; then
28671     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28672     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28673     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28674     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28675       # Going to short mode and back again did indeed matter. Since short mode is
28676       # case insensitive, let's make it lowercase to improve readability.
28677       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28678       # Now convert it back to Unix-style (cygpath)
28679       input_path=`$CYGPATH -u "$shortmode_path"`
28680       new_path="$input_path"
28681     fi
28682   fi
28683 
28684   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28685   if test "x$test_cygdrive_prefix" = x; then
28686     # As a simple fix, exclude /usr/bin since it's not a real path.
28687     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28688       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28689       # a path prefixed by /cygdrive for fixpath to work.
28690       new_path="$CYGWIN_ROOT_PATH$input_path"
28691     fi
28692   fi
28693 
28694 
28695   if test "x$path" != "x$new_path"; then
28696     BOOT_JDK="$new_path"
28697     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28698 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28699   fi
28700 
28701     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28702 
28703   path="$BOOT_JDK"
28704   has_colon=`$ECHO $path | $GREP ^.:`
28705   new_path="$path"
28706   if test "x$has_colon" = x; then
28707     # Not in mixed or Windows style, start by that.
28708     new_path=`cmd //c echo $path`
28709   fi
28710 
28711 
28712   input_path="$new_path"
28713   # Check if we need to convert this using DOS-style short mode. If the path
28714   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28715   # take no chances and rewrite it.
28716   # Note: m4 eats our [], so we need to use [ and ] instead.
28717   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28718   if test "x$has_forbidden_chars" != x; then
28719     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28720     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28721   fi
28722 
28723 
28724   windows_path="$new_path"
28725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28726     unix_path=`$CYGPATH -u "$windows_path"`
28727     new_path="$unix_path"
28728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28730     new_path="$unix_path"
28731   fi
28732 
28733   if test "x$path" != "x$new_path"; then
28734     BOOT_JDK="$new_path"
28735     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28736 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28737   fi
28738 
28739   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28740   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28741 
28742     else
28743       # We're on a unix platform. Hooray! :)
28744       path="$BOOT_JDK"
28745       has_space=`$ECHO "$path" | $GREP " "`
28746       if test "x$has_space" != x; then
28747         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28748 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28749         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28750       fi
28751 
28752       # Use eval to expand a potential ~
28753       eval path="$path"
28754       if test ! -f "$path" && test ! -d "$path"; then
28755         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28756       fi
28757 
28758       if test -d "$path"; then
28759         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28760       else
28761         dir="`$DIRNAME "$path"`"
28762         base="`$BASENAME "$path"`"
28763         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28764       fi
28765     fi
28766   fi
28767 
28768             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28769 $as_echo_n "checking for Boot JDK... " >&6; }
28770             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28771 $as_echo "$BOOT_JDK" >&6; }
28772             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28773 $as_echo_n "checking Boot JDK version... " >&6; }
28774             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28775             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28776 $as_echo "$BOOT_JDK_VERSION" >&6; }
28777           fi # end check jdk version
28778         fi # end check javac
28779       fi # end check java
28780     fi # end check boot jdk found
28781   fi
28782 
28783     done
28784   fi
28785 
28786   fi
28787 
28788 
28789     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28790     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28791       # Do we have a bin/java?
28792       if test ! -x "$BOOT_JDK/bin/java"; then
28793         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28794 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28795         BOOT_JDK_FOUND=no
28796       else
28797         # Do we have a bin/javac?
28798         if test ! -x "$BOOT_JDK/bin/javac"; then
28799           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28800 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28801           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28802 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28803           BOOT_JDK_FOUND=no
28804         else
28805           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28806           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28807 
28808           # Extra M4 quote needed to protect [] in grep expression.
28809           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28810           if test "x$FOUND_CORRECT_VERSION" = x; then
28811             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28812 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28813             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28814 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28815             BOOT_JDK_FOUND=no
28816           else
28817             # We're done! :-)
28818             BOOT_JDK_FOUND=yes
28819 
28820   # Only process if variable expands to non-empty
28821 
28822   if test "x$BOOT_JDK" != x; then
28823     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28824 
28825   # Input might be given as Windows format, start by converting to
28826   # unix format.
28827   path="$BOOT_JDK"
28828   new_path=`$CYGPATH -u "$path"`
28829 
28830   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28831   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28832   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28833   # "foo.exe" is OK but "foo" is an error.
28834   #
28835   # This test is therefore slightly more accurate than "test -f" to check for file precense.
28836   # It is also a way to make sure we got the proper file name for the real test later on.
28837   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28838   if test "x$test_shortpath" = x; then
28839     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28840 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28841     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28842   fi
28843 
28844   # Call helper function which possibly converts this using DOS-style short mode.
28845   # If so, the updated path is stored in $new_path.
28846 
28847   input_path="$new_path"
28848   # Check if we need to convert this using DOS-style short mode. If the path
28849   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28850   # take no chances and rewrite it.
28851   # Note: m4 eats our [], so we need to use [ and ] instead.
28852   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28853   if test "x$has_forbidden_chars" != x; then
28854     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28855     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28856     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28857     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28858       # Going to short mode and back again did indeed matter. Since short mode is
28859       # case insensitive, let's make it lowercase to improve readability.
28860       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28861       # Now convert it back to Unix-style (cygpath)
28862       input_path=`$CYGPATH -u "$shortmode_path"`
28863       new_path="$input_path"
28864     fi
28865   fi
28866 
28867   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28868   if test "x$test_cygdrive_prefix" = x; then
28869     # As a simple fix, exclude /usr/bin since it's not a real path.
28870     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28871       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28872       # a path prefixed by /cygdrive for fixpath to work.
28873       new_path="$CYGWIN_ROOT_PATH$input_path"
28874     fi
28875   fi
28876 
28877 
28878   if test "x$path" != "x$new_path"; then
28879     BOOT_JDK="$new_path"
28880     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28881 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28882   fi
28883 
28884     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28885 
28886   path="$BOOT_JDK"
28887   has_colon=`$ECHO $path | $GREP ^.:`
28888   new_path="$path"
28889   if test "x$has_colon" = x; then
28890     # Not in mixed or Windows style, start by that.
28891     new_path=`cmd //c echo $path`
28892   fi
28893 
28894 
28895   input_path="$new_path"
28896   # Check if we need to convert this using DOS-style short mode. If the path
28897   # contains just simple characters, use it. Otherwise (spaces, weird characters),
28898   # take no chances and rewrite it.
28899   # Note: m4 eats our [], so we need to use [ and ] instead.
28900   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28901   if test "x$has_forbidden_chars" != x; then
28902     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28903     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28904   fi
28905 
28906 
28907   windows_path="$new_path"
28908   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28909     unix_path=`$CYGPATH -u "$windows_path"`
28910     new_path="$unix_path"
28911   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28912     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28913     new_path="$unix_path"
28914   fi
28915 
28916   if test "x$path" != "x$new_path"; then
28917     BOOT_JDK="$new_path"
28918     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28919 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28920   fi
28921 
28922   # Save the first 10 bytes of this path to the storage, so fixpath can work.
28923   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28924 
28925     else
28926       # We're on a unix platform. Hooray! :)
28927       path="$BOOT_JDK"
28928       has_space=`$ECHO "$path" | $GREP " "`
28929       if test "x$has_space" != x; then
28930         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28931 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28932         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28933       fi
28934 
28935       # Use eval to expand a potential ~
28936       eval path="$path"
28937       if test ! -f "$path" && test ! -d "$path"; then
28938         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28939       fi
28940 
28941       if test -d "$path"; then
28942         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28943       else
28944         dir="`$DIRNAME "$path"`"
28945         base="`$BASENAME "$path"`"
28946         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28947       fi
28948     fi
28949   fi
28950 
28951             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28952 $as_echo_n "checking for Boot JDK... " >&6; }
28953             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28954 $as_echo "$BOOT_JDK" >&6; }
28955             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28956 $as_echo_n "checking Boot JDK version... " >&6; }
28957             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28958             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28959 $as_echo "$BOOT_JDK_VERSION" >&6; }
28960           fi # end check jdk version
28961         fi # end check javac
28962       fi # end check java
28963     fi # end check boot jdk found
28964   fi
28965 
28966 
28967   if test "x$BOOT_JDK_FOUND" = xno; then
28968     # Now execute the test
28969 
28970   BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28971   BOOT_JDK_SUFFIX=""
28972   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28973   if test "x$ALL_JDKS_FOUND" != x; then
28974     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28975 
28976   if test "x$BOOT_JDK_FOUND" = xno; then
28977     # Now execute the test
28978 
28979         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28980         if test -d "$BOOT_JDK"; then
28981           BOOT_JDK_FOUND=maybe
28982           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28983 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28984         fi
28985 
28986 
28987     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28988     if test "x$BOOT_JDK_FOUND" = xmaybe; then
28989       # Do we have a bin/java?
28990       if test ! -x "$BOOT_JDK/bin/java"; then
28991         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28992 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28993         BOOT_JDK_FOUND=no
28994       else
28995         # Do we have a bin/javac?
28996         if test ! -x "$BOOT_JDK/bin/javac"; then
28997           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28998 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28999           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29000 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29001           BOOT_JDK_FOUND=no
29002         else
29003           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29004           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29005 
29006           # Extra M4 quote needed to protect [] in grep expression.
29007           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29008           if test "x$FOUND_CORRECT_VERSION" = x; then
29009             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29010 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29011             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29012 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29013             BOOT_JDK_FOUND=no
29014           else
29015             # We're done! :-)
29016             BOOT_JDK_FOUND=yes
29017 
29018   # Only process if variable expands to non-empty
29019 
29020   if test "x$BOOT_JDK" != x; then
29021     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29022 
29023   # Input might be given as Windows format, start by converting to
29024   # unix format.
29025   path="$BOOT_JDK"
29026   new_path=`$CYGPATH -u "$path"`
29027 
29028   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29029   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29030   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29031   # "foo.exe" is OK but "foo" is an error.
29032   #
29033   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29034   # It is also a way to make sure we got the proper file name for the real test later on.
29035   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29036   if test "x$test_shortpath" = x; then
29037     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29038 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29039     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29040   fi
29041 
29042   # Call helper function which possibly converts this using DOS-style short mode.
29043   # If so, the updated path is stored in $new_path.
29044 
29045   input_path="$new_path"
29046   # Check if we need to convert this using DOS-style short mode. If the path
29047   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29048   # take no chances and rewrite it.
29049   # Note: m4 eats our [], so we need to use [ and ] instead.
29050   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29051   if test "x$has_forbidden_chars" != x; then
29052     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29053     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29054     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29055     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29056       # Going to short mode and back again did indeed matter. Since short mode is
29057       # case insensitive, let's make it lowercase to improve readability.
29058       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29059       # Now convert it back to Unix-style (cygpath)
29060       input_path=`$CYGPATH -u "$shortmode_path"`
29061       new_path="$input_path"
29062     fi
29063   fi
29064 
29065   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29066   if test "x$test_cygdrive_prefix" = x; then
29067     # As a simple fix, exclude /usr/bin since it's not a real path.
29068     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29069       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29070       # a path prefixed by /cygdrive for fixpath to work.
29071       new_path="$CYGWIN_ROOT_PATH$input_path"
29072     fi
29073   fi
29074 
29075 
29076   if test "x$path" != "x$new_path"; then
29077     BOOT_JDK="$new_path"
29078     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29079 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29080   fi
29081 
29082     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29083 
29084   path="$BOOT_JDK"
29085   has_colon=`$ECHO $path | $GREP ^.:`
29086   new_path="$path"
29087   if test "x$has_colon" = x; then
29088     # Not in mixed or Windows style, start by that.
29089     new_path=`cmd //c echo $path`
29090   fi
29091 
29092 
29093   input_path="$new_path"
29094   # Check if we need to convert this using DOS-style short mode. If the path
29095   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29096   # take no chances and rewrite it.
29097   # Note: m4 eats our [], so we need to use [ and ] instead.
29098   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29099   if test "x$has_forbidden_chars" != x; then
29100     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29101     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29102   fi
29103 
29104 
29105   windows_path="$new_path"
29106   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29107     unix_path=`$CYGPATH -u "$windows_path"`
29108     new_path="$unix_path"
29109   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29110     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29111     new_path="$unix_path"
29112   fi
29113 
29114   if test "x$path" != "x$new_path"; then
29115     BOOT_JDK="$new_path"
29116     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29117 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29118   fi
29119 
29120   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29121   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29122 
29123     else
29124       # We're on a unix platform. Hooray! :)
29125       path="$BOOT_JDK"
29126       has_space=`$ECHO "$path" | $GREP " "`
29127       if test "x$has_space" != x; then
29128         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29129 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29130         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29131       fi
29132 
29133       # Use eval to expand a potential ~
29134       eval path="$path"
29135       if test ! -f "$path" && test ! -d "$path"; then
29136         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29137       fi
29138 
29139       if test -d "$path"; then
29140         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29141       else
29142         dir="`$DIRNAME "$path"`"
29143         base="`$BASENAME "$path"`"
29144         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29145       fi
29146     fi
29147   fi
29148 
29149             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29150 $as_echo_n "checking for Boot JDK... " >&6; }
29151             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29152 $as_echo "$BOOT_JDK" >&6; }
29153             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29154 $as_echo_n "checking Boot JDK version... " >&6; }
29155             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29156             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29157 $as_echo "$BOOT_JDK_VERSION" >&6; }
29158           fi # end check jdk version
29159         fi # end check javac
29160       fi # end check java
29161     fi # end check boot jdk found
29162   fi
29163 
29164     done
29165   fi
29166 
29167 
29168     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29169     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29170       # Do we have a bin/java?
29171       if test ! -x "$BOOT_JDK/bin/java"; then
29172         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29173 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29174         BOOT_JDK_FOUND=no
29175       else
29176         # Do we have a bin/javac?
29177         if test ! -x "$BOOT_JDK/bin/javac"; then
29178           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29179 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29180           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29181 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29182           BOOT_JDK_FOUND=no
29183         else
29184           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29185           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29186 
29187           # Extra M4 quote needed to protect [] in grep expression.
29188           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29189           if test "x$FOUND_CORRECT_VERSION" = x; then
29190             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29191 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29192             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29193 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29194             BOOT_JDK_FOUND=no
29195           else
29196             # We're done! :-)
29197             BOOT_JDK_FOUND=yes
29198 
29199   # Only process if variable expands to non-empty
29200 
29201   if test "x$BOOT_JDK" != x; then
29202     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29203 
29204   # Input might be given as Windows format, start by converting to
29205   # unix format.
29206   path="$BOOT_JDK"
29207   new_path=`$CYGPATH -u "$path"`
29208 
29209   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29210   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29211   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29212   # "foo.exe" is OK but "foo" is an error.
29213   #
29214   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29215   # It is also a way to make sure we got the proper file name for the real test later on.
29216   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29217   if test "x$test_shortpath" = x; then
29218     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29219 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29220     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29221   fi
29222 
29223   # Call helper function which possibly converts this using DOS-style short mode.
29224   # If so, the updated path is stored in $new_path.
29225 
29226   input_path="$new_path"
29227   # Check if we need to convert this using DOS-style short mode. If the path
29228   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29229   # take no chances and rewrite it.
29230   # Note: m4 eats our [], so we need to use [ and ] instead.
29231   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29232   if test "x$has_forbidden_chars" != x; then
29233     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29234     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29235     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29236     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29237       # Going to short mode and back again did indeed matter. Since short mode is
29238       # case insensitive, let's make it lowercase to improve readability.
29239       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29240       # Now convert it back to Unix-style (cygpath)
29241       input_path=`$CYGPATH -u "$shortmode_path"`
29242       new_path="$input_path"
29243     fi
29244   fi
29245 
29246   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29247   if test "x$test_cygdrive_prefix" = x; then
29248     # As a simple fix, exclude /usr/bin since it's not a real path.
29249     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29250       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29251       # a path prefixed by /cygdrive for fixpath to work.
29252       new_path="$CYGWIN_ROOT_PATH$input_path"
29253     fi
29254   fi
29255 
29256 
29257   if test "x$path" != "x$new_path"; then
29258     BOOT_JDK="$new_path"
29259     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29260 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29261   fi
29262 
29263     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29264 
29265   path="$BOOT_JDK"
29266   has_colon=`$ECHO $path | $GREP ^.:`
29267   new_path="$path"
29268   if test "x$has_colon" = x; then
29269     # Not in mixed or Windows style, start by that.
29270     new_path=`cmd //c echo $path`
29271   fi
29272 
29273 
29274   input_path="$new_path"
29275   # Check if we need to convert this using DOS-style short mode. If the path
29276   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29277   # take no chances and rewrite it.
29278   # Note: m4 eats our [], so we need to use [ and ] instead.
29279   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29280   if test "x$has_forbidden_chars" != x; then
29281     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29282     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29283   fi
29284 
29285 
29286   windows_path="$new_path"
29287   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29288     unix_path=`$CYGPATH -u "$windows_path"`
29289     new_path="$unix_path"
29290   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29291     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29292     new_path="$unix_path"
29293   fi
29294 
29295   if test "x$path" != "x$new_path"; then
29296     BOOT_JDK="$new_path"
29297     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29298 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29299   fi
29300 
29301   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29302   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29303 
29304     else
29305       # We're on a unix platform. Hooray! :)
29306       path="$BOOT_JDK"
29307       has_space=`$ECHO "$path" | $GREP " "`
29308       if test "x$has_space" != x; then
29309         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29310 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29311         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29312       fi
29313 
29314       # Use eval to expand a potential ~
29315       eval path="$path"
29316       if test ! -f "$path" && test ! -d "$path"; then
29317         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29318       fi
29319 
29320       if test -d "$path"; then
29321         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29322       else
29323         dir="`$DIRNAME "$path"`"
29324         base="`$BASENAME "$path"`"
29325         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29326       fi
29327     fi
29328   fi
29329 
29330             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29331 $as_echo_n "checking for Boot JDK... " >&6; }
29332             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29333 $as_echo "$BOOT_JDK" >&6; }
29334             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29335 $as_echo_n "checking Boot JDK version... " >&6; }
29336             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29337             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29338 $as_echo "$BOOT_JDK_VERSION" >&6; }
29339           fi # end check jdk version
29340         fi # end check javac
29341       fi # end check java
29342     fi # end check boot jdk found
29343   fi
29344 
29345   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
29346 
29347   if test "x$BOOT_JDK_FOUND" = xno; then
29348     # Now execute the test
29349 
29350   BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
29351   BOOT_JDK_SUFFIX="/Contents/Home"
29352   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29353   if test "x$ALL_JDKS_FOUND" != x; then
29354     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29355 
29356   if test "x$BOOT_JDK_FOUND" = xno; then
29357     # Now execute the test
29358 
29359         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29360         if test -d "$BOOT_JDK"; then
29361           BOOT_JDK_FOUND=maybe
29362           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29363 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29364         fi
29365 
29366 
29367     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29368     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29369       # Do we have a bin/java?
29370       if test ! -x "$BOOT_JDK/bin/java"; then
29371         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29372 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29373         BOOT_JDK_FOUND=no
29374       else
29375         # Do we have a bin/javac?
29376         if test ! -x "$BOOT_JDK/bin/javac"; then
29377           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29378 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29379           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29380 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29381           BOOT_JDK_FOUND=no
29382         else
29383           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29384           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29385 
29386           # Extra M4 quote needed to protect [] in grep expression.
29387           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29388           if test "x$FOUND_CORRECT_VERSION" = x; then
29389             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29390 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29391             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29392 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29393             BOOT_JDK_FOUND=no
29394           else
29395             # We're done! :-)
29396             BOOT_JDK_FOUND=yes
29397 
29398   # Only process if variable expands to non-empty
29399 
29400   if test "x$BOOT_JDK" != x; then
29401     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29402 
29403   # Input might be given as Windows format, start by converting to
29404   # unix format.
29405   path="$BOOT_JDK"
29406   new_path=`$CYGPATH -u "$path"`
29407 
29408   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29409   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29410   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29411   # "foo.exe" is OK but "foo" is an error.
29412   #
29413   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29414   # It is also a way to make sure we got the proper file name for the real test later on.
29415   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29416   if test "x$test_shortpath" = x; then
29417     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29418 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29419     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29420   fi
29421 
29422   # Call helper function which possibly converts this using DOS-style short mode.
29423   # If so, the updated path is stored in $new_path.
29424 
29425   input_path="$new_path"
29426   # Check if we need to convert this using DOS-style short mode. If the path
29427   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29428   # take no chances and rewrite it.
29429   # Note: m4 eats our [], so we need to use [ and ] instead.
29430   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29431   if test "x$has_forbidden_chars" != x; then
29432     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29433     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29434     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29435     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29436       # Going to short mode and back again did indeed matter. Since short mode is
29437       # case insensitive, let's make it lowercase to improve readability.
29438       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29439       # Now convert it back to Unix-style (cygpath)
29440       input_path=`$CYGPATH -u "$shortmode_path"`
29441       new_path="$input_path"
29442     fi
29443   fi
29444 
29445   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29446   if test "x$test_cygdrive_prefix" = x; then
29447     # As a simple fix, exclude /usr/bin since it's not a real path.
29448     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29449       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29450       # a path prefixed by /cygdrive for fixpath to work.
29451       new_path="$CYGWIN_ROOT_PATH$input_path"
29452     fi
29453   fi
29454 
29455 
29456   if test "x$path" != "x$new_path"; then
29457     BOOT_JDK="$new_path"
29458     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29459 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29460   fi
29461 
29462     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29463 
29464   path="$BOOT_JDK"
29465   has_colon=`$ECHO $path | $GREP ^.:`
29466   new_path="$path"
29467   if test "x$has_colon" = x; then
29468     # Not in mixed or Windows style, start by that.
29469     new_path=`cmd //c echo $path`
29470   fi
29471 
29472 
29473   input_path="$new_path"
29474   # Check if we need to convert this using DOS-style short mode. If the path
29475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29476   # take no chances and rewrite it.
29477   # Note: m4 eats our [], so we need to use [ and ] instead.
29478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29479   if test "x$has_forbidden_chars" != x; then
29480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29482   fi
29483 
29484 
29485   windows_path="$new_path"
29486   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29487     unix_path=`$CYGPATH -u "$windows_path"`
29488     new_path="$unix_path"
29489   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29490     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29491     new_path="$unix_path"
29492   fi
29493 
29494   if test "x$path" != "x$new_path"; then
29495     BOOT_JDK="$new_path"
29496     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29497 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29498   fi
29499 
29500   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29501   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29502 
29503     else
29504       # We're on a unix platform. Hooray! :)
29505       path="$BOOT_JDK"
29506       has_space=`$ECHO "$path" | $GREP " "`
29507       if test "x$has_space" != x; then
29508         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29509 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29510         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29511       fi
29512 
29513       # Use eval to expand a potential ~
29514       eval path="$path"
29515       if test ! -f "$path" && test ! -d "$path"; then
29516         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29517       fi
29518 
29519       if test -d "$path"; then
29520         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29521       else
29522         dir="`$DIRNAME "$path"`"
29523         base="`$BASENAME "$path"`"
29524         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29525       fi
29526     fi
29527   fi
29528 
29529             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29530 $as_echo_n "checking for Boot JDK... " >&6; }
29531             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29532 $as_echo "$BOOT_JDK" >&6; }
29533             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29534 $as_echo_n "checking Boot JDK version... " >&6; }
29535             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29536             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29537 $as_echo "$BOOT_JDK_VERSION" >&6; }
29538           fi # end check jdk version
29539         fi # end check javac
29540       fi # end check java
29541     fi # end check boot jdk found
29542   fi
29543 
29544     done
29545   fi
29546 
29547 
29548     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29549     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29550       # Do we have a bin/java?
29551       if test ! -x "$BOOT_JDK/bin/java"; then
29552         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29553 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29554         BOOT_JDK_FOUND=no
29555       else
29556         # Do we have a bin/javac?
29557         if test ! -x "$BOOT_JDK/bin/javac"; then
29558           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29559 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29560           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29561 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29562           BOOT_JDK_FOUND=no
29563         else
29564           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29565           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29566 
29567           # Extra M4 quote needed to protect [] in grep expression.
29568           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29569           if test "x$FOUND_CORRECT_VERSION" = x; then
29570             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29571 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29572             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29573 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29574             BOOT_JDK_FOUND=no
29575           else
29576             # We're done! :-)
29577             BOOT_JDK_FOUND=yes
29578 
29579   # Only process if variable expands to non-empty
29580 
29581   if test "x$BOOT_JDK" != x; then
29582     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29583 
29584   # Input might be given as Windows format, start by converting to
29585   # unix format.
29586   path="$BOOT_JDK"
29587   new_path=`$CYGPATH -u "$path"`
29588 
29589   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29590   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29591   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29592   # "foo.exe" is OK but "foo" is an error.
29593   #
29594   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29595   # It is also a way to make sure we got the proper file name for the real test later on.
29596   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29597   if test "x$test_shortpath" = x; then
29598     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29599 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29600     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29601   fi
29602 
29603   # Call helper function which possibly converts this using DOS-style short mode.
29604   # If so, the updated path is stored in $new_path.
29605 
29606   input_path="$new_path"
29607   # Check if we need to convert this using DOS-style short mode. If the path
29608   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29609   # take no chances and rewrite it.
29610   # Note: m4 eats our [], so we need to use [ and ] instead.
29611   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29612   if test "x$has_forbidden_chars" != x; then
29613     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29614     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29615     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29616     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29617       # Going to short mode and back again did indeed matter. Since short mode is
29618       # case insensitive, let's make it lowercase to improve readability.
29619       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29620       # Now convert it back to Unix-style (cygpath)
29621       input_path=`$CYGPATH -u "$shortmode_path"`
29622       new_path="$input_path"
29623     fi
29624   fi
29625 
29626   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29627   if test "x$test_cygdrive_prefix" = x; then
29628     # As a simple fix, exclude /usr/bin since it's not a real path.
29629     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29630       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29631       # a path prefixed by /cygdrive for fixpath to work.
29632       new_path="$CYGWIN_ROOT_PATH$input_path"
29633     fi
29634   fi
29635 
29636 
29637   if test "x$path" != "x$new_path"; then
29638     BOOT_JDK="$new_path"
29639     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29640 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29641   fi
29642 
29643     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29644 
29645   path="$BOOT_JDK"
29646   has_colon=`$ECHO $path | $GREP ^.:`
29647   new_path="$path"
29648   if test "x$has_colon" = x; then
29649     # Not in mixed or Windows style, start by that.
29650     new_path=`cmd //c echo $path`
29651   fi
29652 
29653 
29654   input_path="$new_path"
29655   # Check if we need to convert this using DOS-style short mode. If the path
29656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29657   # take no chances and rewrite it.
29658   # Note: m4 eats our [], so we need to use [ and ] instead.
29659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29660   if test "x$has_forbidden_chars" != x; then
29661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29662     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29663   fi
29664 
29665 
29666   windows_path="$new_path"
29667   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29668     unix_path=`$CYGPATH -u "$windows_path"`
29669     new_path="$unix_path"
29670   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29671     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29672     new_path="$unix_path"
29673   fi
29674 
29675   if test "x$path" != "x$new_path"; then
29676     BOOT_JDK="$new_path"
29677     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29678 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29679   fi
29680 
29681   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29682   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29683 
29684     else
29685       # We're on a unix platform. Hooray! :)
29686       path="$BOOT_JDK"
29687       has_space=`$ECHO "$path" | $GREP " "`
29688       if test "x$has_space" != x; then
29689         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29690 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29691         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29692       fi
29693 
29694       # Use eval to expand a potential ~
29695       eval path="$path"
29696       if test ! -f "$path" && test ! -d "$path"; then
29697         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29698       fi
29699 
29700       if test -d "$path"; then
29701         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29702       else
29703         dir="`$DIRNAME "$path"`"
29704         base="`$BASENAME "$path"`"
29705         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29706       fi
29707     fi
29708   fi
29709 
29710             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29711 $as_echo_n "checking for Boot JDK... " >&6; }
29712             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29713 $as_echo "$BOOT_JDK" >&6; }
29714             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29715 $as_echo_n "checking Boot JDK version... " >&6; }
29716             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29717             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29718 $as_echo "$BOOT_JDK_VERSION" >&6; }
29719           fi # end check jdk version
29720         fi # end check javac
29721       fi # end check java
29722     fi # end check boot jdk found
29723   fi
29724 
29725 
29726   if test "x$BOOT_JDK_FOUND" = xno; then
29727     # Now execute the test
29728 
29729   BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29730   BOOT_JDK_SUFFIX="/Contents/Home"
29731   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29732   if test "x$ALL_JDKS_FOUND" != x; then
29733     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29734 
29735   if test "x$BOOT_JDK_FOUND" = xno; then
29736     # Now execute the test
29737 
29738         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29739         if test -d "$BOOT_JDK"; then
29740           BOOT_JDK_FOUND=maybe
29741           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29742 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29743         fi
29744 
29745 
29746     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29747     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29748       # Do we have a bin/java?
29749       if test ! -x "$BOOT_JDK/bin/java"; then
29750         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29751 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29752         BOOT_JDK_FOUND=no
29753       else
29754         # Do we have a bin/javac?
29755         if test ! -x "$BOOT_JDK/bin/javac"; then
29756           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29757 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29758           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29759 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29760           BOOT_JDK_FOUND=no
29761         else
29762           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29763           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29764 
29765           # Extra M4 quote needed to protect [] in grep expression.
29766           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29767           if test "x$FOUND_CORRECT_VERSION" = x; then
29768             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29769 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29770             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29771 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29772             BOOT_JDK_FOUND=no
29773           else
29774             # We're done! :-)
29775             BOOT_JDK_FOUND=yes
29776 
29777   # Only process if variable expands to non-empty
29778 
29779   if test "x$BOOT_JDK" != x; then
29780     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29781 
29782   # Input might be given as Windows format, start by converting to
29783   # unix format.
29784   path="$BOOT_JDK"
29785   new_path=`$CYGPATH -u "$path"`
29786 
29787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29790   # "foo.exe" is OK but "foo" is an error.
29791   #
29792   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29793   # It is also a way to make sure we got the proper file name for the real test later on.
29794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29795   if test "x$test_shortpath" = x; then
29796     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29797 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29798     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29799   fi
29800 
29801   # Call helper function which possibly converts this using DOS-style short mode.
29802   # If so, the updated path is stored in $new_path.
29803 
29804   input_path="$new_path"
29805   # Check if we need to convert this using DOS-style short mode. If the path
29806   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29807   # take no chances and rewrite it.
29808   # Note: m4 eats our [], so we need to use [ and ] instead.
29809   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29810   if test "x$has_forbidden_chars" != x; then
29811     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29812     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29813     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29814     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29815       # Going to short mode and back again did indeed matter. Since short mode is
29816       # case insensitive, let's make it lowercase to improve readability.
29817       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29818       # Now convert it back to Unix-style (cygpath)
29819       input_path=`$CYGPATH -u "$shortmode_path"`
29820       new_path="$input_path"
29821     fi
29822   fi
29823 
29824   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29825   if test "x$test_cygdrive_prefix" = x; then
29826     # As a simple fix, exclude /usr/bin since it's not a real path.
29827     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29828       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29829       # a path prefixed by /cygdrive for fixpath to work.
29830       new_path="$CYGWIN_ROOT_PATH$input_path"
29831     fi
29832   fi
29833 
29834 
29835   if test "x$path" != "x$new_path"; then
29836     BOOT_JDK="$new_path"
29837     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29838 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29839   fi
29840 
29841     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29842 
29843   path="$BOOT_JDK"
29844   has_colon=`$ECHO $path | $GREP ^.:`
29845   new_path="$path"
29846   if test "x$has_colon" = x; then
29847     # Not in mixed or Windows style, start by that.
29848     new_path=`cmd //c echo $path`
29849   fi
29850 
29851 
29852   input_path="$new_path"
29853   # Check if we need to convert this using DOS-style short mode. If the path
29854   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29855   # take no chances and rewrite it.
29856   # Note: m4 eats our [], so we need to use [ and ] instead.
29857   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29858   if test "x$has_forbidden_chars" != x; then
29859     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29860     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29861   fi
29862 
29863 
29864   windows_path="$new_path"
29865   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29866     unix_path=`$CYGPATH -u "$windows_path"`
29867     new_path="$unix_path"
29868   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29869     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29870     new_path="$unix_path"
29871   fi
29872 
29873   if test "x$path" != "x$new_path"; then
29874     BOOT_JDK="$new_path"
29875     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29876 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29877   fi
29878 
29879   # Save the first 10 bytes of this path to the storage, so fixpath can work.
29880   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29881 
29882     else
29883       # We're on a unix platform. Hooray! :)
29884       path="$BOOT_JDK"
29885       has_space=`$ECHO "$path" | $GREP " "`
29886       if test "x$has_space" != x; then
29887         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29888 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29889         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29890       fi
29891 
29892       # Use eval to expand a potential ~
29893       eval path="$path"
29894       if test ! -f "$path" && test ! -d "$path"; then
29895         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29896       fi
29897 
29898       if test -d "$path"; then
29899         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29900       else
29901         dir="`$DIRNAME "$path"`"
29902         base="`$BASENAME "$path"`"
29903         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29904       fi
29905     fi
29906   fi
29907 
29908             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29909 $as_echo_n "checking for Boot JDK... " >&6; }
29910             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29911 $as_echo "$BOOT_JDK" >&6; }
29912             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29913 $as_echo_n "checking Boot JDK version... " >&6; }
29914             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29915             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29916 $as_echo "$BOOT_JDK_VERSION" >&6; }
29917           fi # end check jdk version
29918         fi # end check javac
29919       fi # end check java
29920     fi # end check boot jdk found
29921   fi
29922 
29923     done
29924   fi
29925 
29926 
29927     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29928     if test "x$BOOT_JDK_FOUND" = xmaybe; then
29929       # Do we have a bin/java?
29930       if test ! -x "$BOOT_JDK/bin/java"; then
29931         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29932 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29933         BOOT_JDK_FOUND=no
29934       else
29935         # Do we have a bin/javac?
29936         if test ! -x "$BOOT_JDK/bin/javac"; then
29937           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29938 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29939           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29940 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29941           BOOT_JDK_FOUND=no
29942         else
29943           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29944           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29945 
29946           # Extra M4 quote needed to protect [] in grep expression.
29947           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29948           if test "x$FOUND_CORRECT_VERSION" = x; then
29949             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29950 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29951             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29952 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29953             BOOT_JDK_FOUND=no
29954           else
29955             # We're done! :-)
29956             BOOT_JDK_FOUND=yes
29957 
29958   # Only process if variable expands to non-empty
29959 
29960   if test "x$BOOT_JDK" != x; then
29961     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29962 
29963   # Input might be given as Windows format, start by converting to
29964   # unix format.
29965   path="$BOOT_JDK"
29966   new_path=`$CYGPATH -u "$path"`
29967 
29968   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29969   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29970   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29971   # "foo.exe" is OK but "foo" is an error.
29972   #
29973   # This test is therefore slightly more accurate than "test -f" to check for file precense.
29974   # It is also a way to make sure we got the proper file name for the real test later on.
29975   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29976   if test "x$test_shortpath" = x; then
29977     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29978 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29979     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29980   fi
29981 
29982   # Call helper function which possibly converts this using DOS-style short mode.
29983   # If so, the updated path is stored in $new_path.
29984 
29985   input_path="$new_path"
29986   # Check if we need to convert this using DOS-style short mode. If the path
29987   # contains just simple characters, use it. Otherwise (spaces, weird characters),
29988   # take no chances and rewrite it.
29989   # Note: m4 eats our [], so we need to use [ and ] instead.
29990   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29991   if test "x$has_forbidden_chars" != x; then
29992     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29993     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29994     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29995     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29996       # Going to short mode and back again did indeed matter. Since short mode is
29997       # case insensitive, let's make it lowercase to improve readability.
29998       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29999       # Now convert it back to Unix-style (cygpath)
30000       input_path=`$CYGPATH -u "$shortmode_path"`
30001       new_path="$input_path"
30002     fi
30003   fi
30004 
30005   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30006   if test "x$test_cygdrive_prefix" = x; then
30007     # As a simple fix, exclude /usr/bin since it's not a real path.
30008     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30009       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30010       # a path prefixed by /cygdrive for fixpath to work.
30011       new_path="$CYGWIN_ROOT_PATH$input_path"
30012     fi
30013   fi
30014 
30015 
30016   if test "x$path" != "x$new_path"; then
30017     BOOT_JDK="$new_path"
30018     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30019 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30020   fi
30021 
30022     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30023 
30024   path="$BOOT_JDK"
30025   has_colon=`$ECHO $path | $GREP ^.:`
30026   new_path="$path"
30027   if test "x$has_colon" = x; then
30028     # Not in mixed or Windows style, start by that.
30029     new_path=`cmd //c echo $path`
30030   fi
30031 
30032 
30033   input_path="$new_path"
30034   # Check if we need to convert this using DOS-style short mode. If the path
30035   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30036   # take no chances and rewrite it.
30037   # Note: m4 eats our [], so we need to use [ and ] instead.
30038   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30039   if test "x$has_forbidden_chars" != x; then
30040     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30041     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30042   fi
30043 
30044 
30045   windows_path="$new_path"
30046   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30047     unix_path=`$CYGPATH -u "$windows_path"`
30048     new_path="$unix_path"
30049   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30050     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30051     new_path="$unix_path"
30052   fi
30053 
30054   if test "x$path" != "x$new_path"; then
30055     BOOT_JDK="$new_path"
30056     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30057 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30058   fi
30059 
30060   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30061   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30062 
30063     else
30064       # We're on a unix platform. Hooray! :)
30065       path="$BOOT_JDK"
30066       has_space=`$ECHO "$path" | $GREP " "`
30067       if test "x$has_space" != x; then
30068         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30069 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30070         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30071       fi
30072 
30073       # Use eval to expand a potential ~
30074       eval path="$path"
30075       if test ! -f "$path" && test ! -d "$path"; then
30076         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30077       fi
30078 
30079       if test -d "$path"; then
30080         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30081       else
30082         dir="`$DIRNAME "$path"`"
30083         base="`$BASENAME "$path"`"
30084         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30085       fi
30086     fi
30087   fi
30088 
30089             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30090 $as_echo_n "checking for Boot JDK... " >&6; }
30091             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30092 $as_echo "$BOOT_JDK" >&6; }
30093             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30094 $as_echo_n "checking Boot JDK version... " >&6; }
30095             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30096             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30097 $as_echo "$BOOT_JDK_VERSION" >&6; }
30098           fi # end check jdk version
30099         fi # end check javac
30100       fi # end check java
30101     fi # end check boot jdk found
30102   fi
30103 
30104   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
30105 
30106   if test "x$BOOT_JDK_FOUND" = xno; then
30107     # Now execute the test
30108 
30109   BOOT_JDK_PREFIX="/usr/lib/jvm"
30110   BOOT_JDK_SUFFIX=""
30111   ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
30112   if test "x$ALL_JDKS_FOUND" != x; then
30113     for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
30114 
30115   if test "x$BOOT_JDK_FOUND" = xno; then
30116     # Now execute the test
30117 
30118         BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
30119         if test -d "$BOOT_JDK"; then
30120           BOOT_JDK_FOUND=maybe
30121           { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
30122 $as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
30123         fi
30124 
30125 
30126     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30127     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30128       # Do we have a bin/java?
30129       if test ! -x "$BOOT_JDK/bin/java"; then
30130         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30131 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30132         BOOT_JDK_FOUND=no
30133       else
30134         # Do we have a bin/javac?
30135         if test ! -x "$BOOT_JDK/bin/javac"; then
30136           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30137 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30138           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30139 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30140           BOOT_JDK_FOUND=no
30141         else
30142           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30143           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30144 
30145           # Extra M4 quote needed to protect [] in grep expression.
30146           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30147           if test "x$FOUND_CORRECT_VERSION" = x; then
30148             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30149 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30150             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30151 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30152             BOOT_JDK_FOUND=no
30153           else
30154             # We're done! :-)
30155             BOOT_JDK_FOUND=yes
30156 
30157   # Only process if variable expands to non-empty
30158 
30159   if test "x$BOOT_JDK" != x; then
30160     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30161 
30162   # Input might be given as Windows format, start by converting to
30163   # unix format.
30164   path="$BOOT_JDK"
30165   new_path=`$CYGPATH -u "$path"`
30166 
30167   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30168   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30169   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30170   # "foo.exe" is OK but "foo" is an error.
30171   #
30172   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30173   # It is also a way to make sure we got the proper file name for the real test later on.
30174   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30175   if test "x$test_shortpath" = x; then
30176     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30177 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30178     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30179   fi
30180 
30181   # Call helper function which possibly converts this using DOS-style short mode.
30182   # If so, the updated path is stored in $new_path.
30183 
30184   input_path="$new_path"
30185   # Check if we need to convert this using DOS-style short mode. If the path
30186   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30187   # take no chances and rewrite it.
30188   # Note: m4 eats our [], so we need to use [ and ] instead.
30189   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30190   if test "x$has_forbidden_chars" != x; then
30191     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30192     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30193     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30194     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30195       # Going to short mode and back again did indeed matter. Since short mode is
30196       # case insensitive, let's make it lowercase to improve readability.
30197       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30198       # Now convert it back to Unix-style (cygpath)
30199       input_path=`$CYGPATH -u "$shortmode_path"`
30200       new_path="$input_path"
30201     fi
30202   fi
30203 
30204   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30205   if test "x$test_cygdrive_prefix" = x; then
30206     # As a simple fix, exclude /usr/bin since it's not a real path.
30207     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30208       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30209       # a path prefixed by /cygdrive for fixpath to work.
30210       new_path="$CYGWIN_ROOT_PATH$input_path"
30211     fi
30212   fi
30213 
30214 
30215   if test "x$path" != "x$new_path"; then
30216     BOOT_JDK="$new_path"
30217     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30218 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30219   fi
30220 
30221     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30222 
30223   path="$BOOT_JDK"
30224   has_colon=`$ECHO $path | $GREP ^.:`
30225   new_path="$path"
30226   if test "x$has_colon" = x; then
30227     # Not in mixed or Windows style, start by that.
30228     new_path=`cmd //c echo $path`
30229   fi
30230 
30231 
30232   input_path="$new_path"
30233   # Check if we need to convert this using DOS-style short mode. If the path
30234   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30235   # take no chances and rewrite it.
30236   # Note: m4 eats our [], so we need to use [ and ] instead.
30237   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30238   if test "x$has_forbidden_chars" != x; then
30239     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30240     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30241   fi
30242 
30243 
30244   windows_path="$new_path"
30245   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30246     unix_path=`$CYGPATH -u "$windows_path"`
30247     new_path="$unix_path"
30248   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30249     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30250     new_path="$unix_path"
30251   fi
30252 
30253   if test "x$path" != "x$new_path"; then
30254     BOOT_JDK="$new_path"
30255     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30256 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30257   fi
30258 
30259   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30260   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30261 
30262     else
30263       # We're on a unix platform. Hooray! :)
30264       path="$BOOT_JDK"
30265       has_space=`$ECHO "$path" | $GREP " "`
30266       if test "x$has_space" != x; then
30267         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30268 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30269         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30270       fi
30271 
30272       # Use eval to expand a potential ~
30273       eval path="$path"
30274       if test ! -f "$path" && test ! -d "$path"; then
30275         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30276       fi
30277 
30278       if test -d "$path"; then
30279         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30280       else
30281         dir="`$DIRNAME "$path"`"
30282         base="`$BASENAME "$path"`"
30283         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30284       fi
30285     fi
30286   fi
30287 
30288             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30289 $as_echo_n "checking for Boot JDK... " >&6; }
30290             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30291 $as_echo "$BOOT_JDK" >&6; }
30292             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30293 $as_echo_n "checking Boot JDK version... " >&6; }
30294             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30295             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30296 $as_echo "$BOOT_JDK_VERSION" >&6; }
30297           fi # end check jdk version
30298         fi # end check javac
30299       fi # end check java
30300     fi # end check boot jdk found
30301   fi
30302 
30303     done
30304   fi
30305 
30306 
30307     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30308     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30309       # Do we have a bin/java?
30310       if test ! -x "$BOOT_JDK/bin/java"; then
30311         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30312 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30313         BOOT_JDK_FOUND=no
30314       else
30315         # Do we have a bin/javac?
30316         if test ! -x "$BOOT_JDK/bin/javac"; then
30317           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30318 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30319           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30320 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30321           BOOT_JDK_FOUND=no
30322         else
30323           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30324           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30325 
30326           # Extra M4 quote needed to protect [] in grep expression.
30327           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30328           if test "x$FOUND_CORRECT_VERSION" = x; then
30329             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30330 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30331             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30332 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30333             BOOT_JDK_FOUND=no
30334           else
30335             # We're done! :-)
30336             BOOT_JDK_FOUND=yes
30337 
30338   # Only process if variable expands to non-empty
30339 
30340   if test "x$BOOT_JDK" != x; then
30341     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30342 
30343   # Input might be given as Windows format, start by converting to
30344   # unix format.
30345   path="$BOOT_JDK"
30346   new_path=`$CYGPATH -u "$path"`
30347 
30348   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30349   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30350   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30351   # "foo.exe" is OK but "foo" is an error.
30352   #
30353   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30354   # It is also a way to make sure we got the proper file name for the real test later on.
30355   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30356   if test "x$test_shortpath" = x; then
30357     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30358 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30359     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30360   fi
30361 
30362   # Call helper function which possibly converts this using DOS-style short mode.
30363   # If so, the updated path is stored in $new_path.
30364 
30365   input_path="$new_path"
30366   # Check if we need to convert this using DOS-style short mode. If the path
30367   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30368   # take no chances and rewrite it.
30369   # Note: m4 eats our [], so we need to use [ and ] instead.
30370   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30371   if test "x$has_forbidden_chars" != x; then
30372     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30373     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30374     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30375     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30376       # Going to short mode and back again did indeed matter. Since short mode is
30377       # case insensitive, let's make it lowercase to improve readability.
30378       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30379       # Now convert it back to Unix-style (cygpath)
30380       input_path=`$CYGPATH -u "$shortmode_path"`
30381       new_path="$input_path"
30382     fi
30383   fi
30384 
30385   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30386   if test "x$test_cygdrive_prefix" = x; then
30387     # As a simple fix, exclude /usr/bin since it's not a real path.
30388     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30389       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30390       # a path prefixed by /cygdrive for fixpath to work.
30391       new_path="$CYGWIN_ROOT_PATH$input_path"
30392     fi
30393   fi
30394 
30395 
30396   if test "x$path" != "x$new_path"; then
30397     BOOT_JDK="$new_path"
30398     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30399 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30400   fi
30401 
30402     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30403 
30404   path="$BOOT_JDK"
30405   has_colon=`$ECHO $path | $GREP ^.:`
30406   new_path="$path"
30407   if test "x$has_colon" = x; then
30408     # Not in mixed or Windows style, start by that.
30409     new_path=`cmd //c echo $path`
30410   fi
30411 
30412 
30413   input_path="$new_path"
30414   # Check if we need to convert this using DOS-style short mode. If the path
30415   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30416   # take no chances and rewrite it.
30417   # Note: m4 eats our [], so we need to use [ and ] instead.
30418   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30419   if test "x$has_forbidden_chars" != x; then
30420     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30421     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30422   fi
30423 
30424 
30425   windows_path="$new_path"
30426   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30427     unix_path=`$CYGPATH -u "$windows_path"`
30428     new_path="$unix_path"
30429   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30430     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30431     new_path="$unix_path"
30432   fi
30433 
30434   if test "x$path" != "x$new_path"; then
30435     BOOT_JDK="$new_path"
30436     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30437 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30438   fi
30439 
30440   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30441   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30442 
30443     else
30444       # We're on a unix platform. Hooray! :)
30445       path="$BOOT_JDK"
30446       has_space=`$ECHO "$path" | $GREP " "`
30447       if test "x$has_space" != x; then
30448         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30449 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30450         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30451       fi
30452 
30453       # Use eval to expand a potential ~
30454       eval path="$path"
30455       if test ! -f "$path" && test ! -d "$path"; then
30456         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30457       fi
30458 
30459       if test -d "$path"; then
30460         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30461       else
30462         dir="`$DIRNAME "$path"`"
30463         base="`$BASENAME "$path"`"
30464         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30465       fi
30466     fi
30467   fi
30468 
30469             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30470 $as_echo_n "checking for Boot JDK... " >&6; }
30471             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30472 $as_echo "$BOOT_JDK" >&6; }
30473             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30474 $as_echo_n "checking Boot JDK version... " >&6; }
30475             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30476             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30477 $as_echo "$BOOT_JDK_VERSION" >&6; }
30478           fi # end check jdk version
30479         fi # end check javac
30480       fi # end check java
30481     fi # end check boot jdk found
30482   fi
30483 
30484   fi
30485 
30486 
30487     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30488     if test "x$BOOT_JDK_FOUND" = xmaybe; then
30489       # Do we have a bin/java?
30490       if test ! -x "$BOOT_JDK/bin/java"; then
30491         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
30492 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
30493         BOOT_JDK_FOUND=no
30494       else
30495         # Do we have a bin/javac?
30496         if test ! -x "$BOOT_JDK/bin/javac"; then
30497           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
30498 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
30499           { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
30500 $as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
30501           BOOT_JDK_FOUND=no
30502         else
30503           # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30504           BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30505 
30506           # Extra M4 quote needed to protect [] in grep expression.
30507           FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
30508           if test "x$FOUND_CORRECT_VERSION" = x; then
30509             { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
30510 $as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
30511             { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
30512 $as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
30513             BOOT_JDK_FOUND=no
30514           else
30515             # We're done! :-)
30516             BOOT_JDK_FOUND=yes
30517 
30518   # Only process if variable expands to non-empty
30519 
30520   if test "x$BOOT_JDK" != x; then
30521     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30522 
30523   # Input might be given as Windows format, start by converting to
30524   # unix format.
30525   path="$BOOT_JDK"
30526   new_path=`$CYGPATH -u "$path"`
30527 
30528   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30529   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30530   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30531   # "foo.exe" is OK but "foo" is an error.
30532   #
30533   # This test is therefore slightly more accurate than "test -f" to check for file precense.
30534   # It is also a way to make sure we got the proper file name for the real test later on.
30535   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30536   if test "x$test_shortpath" = x; then
30537     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30538 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30539     as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
30540   fi
30541 
30542   # Call helper function which possibly converts this using DOS-style short mode.
30543   # If so, the updated path is stored in $new_path.
30544 
30545   input_path="$new_path"
30546   # Check if we need to convert this using DOS-style short mode. If the path
30547   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30548   # take no chances and rewrite it.
30549   # Note: m4 eats our [], so we need to use [ and ] instead.
30550   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30551   if test "x$has_forbidden_chars" != x; then
30552     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30553     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30554     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30555     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30556       # Going to short mode and back again did indeed matter. Since short mode is
30557       # case insensitive, let's make it lowercase to improve readability.
30558       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30559       # Now convert it back to Unix-style (cygpath)
30560       input_path=`$CYGPATH -u "$shortmode_path"`
30561       new_path="$input_path"
30562     fi
30563   fi
30564 
30565   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30566   if test "x$test_cygdrive_prefix" = x; then
30567     # As a simple fix, exclude /usr/bin since it's not a real path.
30568     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30569       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30570       # a path prefixed by /cygdrive for fixpath to work.
30571       new_path="$CYGWIN_ROOT_PATH$input_path"
30572     fi
30573   fi
30574 
30575 
30576   if test "x$path" != "x$new_path"; then
30577     BOOT_JDK="$new_path"
30578     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30579 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30580   fi
30581 
30582     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30583 
30584   path="$BOOT_JDK"
30585   has_colon=`$ECHO $path | $GREP ^.:`
30586   new_path="$path"
30587   if test "x$has_colon" = x; then
30588     # Not in mixed or Windows style, start by that.
30589     new_path=`cmd //c echo $path`
30590   fi
30591 
30592 
30593   input_path="$new_path"
30594   # Check if we need to convert this using DOS-style short mode. If the path
30595   # contains just simple characters, use it. Otherwise (spaces, weird characters),
30596   # take no chances and rewrite it.
30597   # Note: m4 eats our [], so we need to use [ and ] instead.
30598   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30599   if test "x$has_forbidden_chars" != x; then
30600     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30601     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30602   fi
30603 
30604 
30605   windows_path="$new_path"
30606   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30607     unix_path=`$CYGPATH -u "$windows_path"`
30608     new_path="$unix_path"
30609   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30610     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30611     new_path="$unix_path"
30612   fi
30613 
30614   if test "x$path" != "x$new_path"; then
30615     BOOT_JDK="$new_path"
30616     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30617 $as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30618   fi
30619 
30620   # Save the first 10 bytes of this path to the storage, so fixpath can work.
30621   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30622 
30623     else
30624       # We're on a unix platform. Hooray! :)
30625       path="$BOOT_JDK"
30626       has_space=`$ECHO "$path" | $GREP " "`
30627       if test "x$has_space" != x; then
30628         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30629 $as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30630         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30631       fi
30632 
30633       # Use eval to expand a potential ~
30634       eval path="$path"
30635       if test ! -f "$path" && test ! -d "$path"; then
30636         as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30637       fi
30638 
30639       if test -d "$path"; then
30640         BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30641       else
30642         dir="`$DIRNAME "$path"`"
30643         base="`$BASENAME "$path"`"
30644         BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30645       fi
30646     fi
30647   fi
30648 
30649             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30650 $as_echo_n "checking for Boot JDK... " >&6; }
30651             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30652 $as_echo "$BOOT_JDK" >&6; }
30653             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30654 $as_echo_n "checking Boot JDK version... " >&6; }
30655             BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30656             { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30657 $as_echo "$BOOT_JDK_VERSION" >&6; }
30658           fi # end check jdk version
30659         fi # end check javac
30660       fi # end check java
30661     fi # end check boot jdk found
30662   fi
30663 
30664 
30665   # If we haven't found anything yet, we've truly lost. Give up.
30666   if test "x$BOOT_JDK_FOUND" = xno; then
30667 
30668   # Print a helpful message on how to acquire the necessary build dependency.
30669   # openjdk is the help tag: freetype, cups, alsa etc
30670   MISSING_DEPENDENCY=openjdk
30671 
30672   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30673     cygwin_help $MISSING_DEPENDENCY
30674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30675     msys_help $MISSING_DEPENDENCY
30676   else
30677     PKGHANDLER_COMMAND=
30678 
30679     case $PKGHANDLER in
30680       apt-get)
30681         apt_help     $MISSING_DEPENDENCY ;;
30682       yum)
30683         yum_help     $MISSING_DEPENDENCY ;;
30684       brew)
30685         brew_help    $MISSING_DEPENDENCY ;;
30686       port)
30687         port_help    $MISSING_DEPENDENCY ;;
30688       pkgutil)
30689         pkgutil_help $MISSING_DEPENDENCY ;;
30690       pkgadd)
30691         pkgadd_help  $MISSING_DEPENDENCY ;;
30692     esac
30693 
30694     if test "x$PKGHANDLER_COMMAND" != x; then
30695       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30696     fi
30697   fi
30698 
30699     { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30700 $as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30701     { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30702 $as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30703     as_fn_error $? "Cannot continue" "$LINENO" 5
30704   fi
30705 
30706 
30707 
30708   # Setup tools from the Boot JDK.
30709 
30710   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30711 
30712   # Publish this variable in the help.
30713 
30714 
30715   if [ -z "${JAVA+x}" ]; then
30716     # The variable is not set by user, try to locate tool using the code snippet
30717 
30718       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30719 $as_echo_n "checking for java in Boot JDK... " >&6; }
30720       JAVA=$BOOT_JDK/bin/java
30721       if test ! -x $JAVA; then
30722         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30723 $as_echo "not found" >&6; }
30724         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30725 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30726         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30727       fi
30728       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30729 $as_echo "ok" >&6; }
30730 
30731 
30732   else
30733     # The variable is set, but is it from the command line or the environment?
30734 
30735     # Try to remove the string !JAVA! from our list.
30736     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30737     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30738       # If it failed, the variable was not from the command line. Ignore it,
30739       # but warn the user (except for BASH, which is always set by the calling BASH).
30740       if test "xJAVA" != xBASH; then
30741         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30742 $as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30743       fi
30744       # Try to locate tool using the code snippet
30745 
30746       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30747 $as_echo_n "checking for java in Boot JDK... " >&6; }
30748       JAVA=$BOOT_JDK/bin/java
30749       if test ! -x $JAVA; then
30750         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30751 $as_echo "not found" >&6; }
30752         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30753 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30754         as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30755       fi
30756       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30757 $as_echo "ok" >&6; }
30758 
30759 
30760     else
30761       # If it succeeded, then it was overridden by the user. We will use it
30762       # for the tool.
30763 
30764       # First remove it from the list of overridden variables, so we can test
30765       # for unknown variables in the end.
30766       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30767 
30768       # Check if we try to supply an empty value
30769       if test "x$JAVA" = x; then
30770         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30771 $as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30772         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30773 $as_echo_n "checking for JAVA... " >&6; }
30774         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30775 $as_echo "disabled" >&6; }
30776       else
30777         # Check if the provided tool contains a complete path.
30778         tool_specified="$JAVA"
30779         tool_basename="${tool_specified##*/}"
30780         if test "x$tool_basename" = "x$tool_specified"; then
30781           # A command without a complete path is provided, search $PATH.
30782           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30783 $as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30784           # Extract the first word of "$tool_basename", so it can be a program name with args.
30785 set dummy $tool_basename; ac_word=$2
30786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30787 $as_echo_n "checking for $ac_word... " >&6; }
30788 if ${ac_cv_path_JAVA+:} false; then :
30789   $as_echo_n "(cached) " >&6
30790 else
30791   case $JAVA in
30792   [\\/]* | ?:[\\/]*)
30793   ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30794   ;;
30795   *)
30796   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30797 for as_dir in $PATH
30798 do
30799   IFS=$as_save_IFS
30800   test -z "$as_dir" && as_dir=.
30801     for ac_exec_ext in '' $ac_executable_extensions; do
30802   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30803     ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30804     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30805     break 2
30806   fi
30807 done
30808   done
30809 IFS=$as_save_IFS
30810 
30811   ;;
30812 esac
30813 fi
30814 JAVA=$ac_cv_path_JAVA
30815 if test -n "$JAVA"; then
30816   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30817 $as_echo "$JAVA" >&6; }
30818 else
30819   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30820 $as_echo "no" >&6; }
30821 fi
30822 
30823 
30824           if test "x$JAVA" = x; then
30825             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30826           fi
30827         else
30828           # Otherwise we believe it is a complete path. Use it as it is.
30829           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30830 $as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30831           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30832 $as_echo_n "checking for JAVA... " >&6; }
30833           if test ! -x "$tool_specified"; then
30834             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30835 $as_echo "not found" >&6; }
30836             as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30837           fi
30838           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30839 $as_echo "$tool_specified" >&6; }
30840         fi
30841       fi
30842     fi
30843 
30844   fi
30845 
30846 
30847 
30848   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30849 
30850   # Publish this variable in the help.
30851 
30852 
30853   if [ -z "${JAVAC+x}" ]; then
30854     # The variable is not set by user, try to locate tool using the code snippet
30855 
30856       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30857 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30858       JAVAC=$BOOT_JDK/bin/javac
30859       if test ! -x $JAVAC; then
30860         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30861 $as_echo "not found" >&6; }
30862         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30863 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30864         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30865       fi
30866       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30867 $as_echo "ok" >&6; }
30868 
30869 
30870   else
30871     # The variable is set, but is it from the command line or the environment?
30872 
30873     # Try to remove the string !JAVAC! from our list.
30874     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30875     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30876       # If it failed, the variable was not from the command line. Ignore it,
30877       # but warn the user (except for BASH, which is always set by the calling BASH).
30878       if test "xJAVAC" != xBASH; then
30879         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30880 $as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30881       fi
30882       # Try to locate tool using the code snippet
30883 
30884       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30885 $as_echo_n "checking for javac in Boot JDK... " >&6; }
30886       JAVAC=$BOOT_JDK/bin/javac
30887       if test ! -x $JAVAC; then
30888         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30889 $as_echo "not found" >&6; }
30890         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30891 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30892         as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30893       fi
30894       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30895 $as_echo "ok" >&6; }
30896 
30897 
30898     else
30899       # If it succeeded, then it was overridden by the user. We will use it
30900       # for the tool.
30901 
30902       # First remove it from the list of overridden variables, so we can test
30903       # for unknown variables in the end.
30904       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30905 
30906       # Check if we try to supply an empty value
30907       if test "x$JAVAC" = x; then
30908         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30909 $as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30910         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30911 $as_echo_n "checking for JAVAC... " >&6; }
30912         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30913 $as_echo "disabled" >&6; }
30914       else
30915         # Check if the provided tool contains a complete path.
30916         tool_specified="$JAVAC"
30917         tool_basename="${tool_specified##*/}"
30918         if test "x$tool_basename" = "x$tool_specified"; then
30919           # A command without a complete path is provided, search $PATH.
30920           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30921 $as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30922           # Extract the first word of "$tool_basename", so it can be a program name with args.
30923 set dummy $tool_basename; ac_word=$2
30924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30925 $as_echo_n "checking for $ac_word... " >&6; }
30926 if ${ac_cv_path_JAVAC+:} false; then :
30927   $as_echo_n "(cached) " >&6
30928 else
30929   case $JAVAC in
30930   [\\/]* | ?:[\\/]*)
30931   ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30932   ;;
30933   *)
30934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30935 for as_dir in $PATH
30936 do
30937   IFS=$as_save_IFS
30938   test -z "$as_dir" && as_dir=.
30939     for ac_exec_ext in '' $ac_executable_extensions; do
30940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30941     ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30943     break 2
30944   fi
30945 done
30946   done
30947 IFS=$as_save_IFS
30948 
30949   ;;
30950 esac
30951 fi
30952 JAVAC=$ac_cv_path_JAVAC
30953 if test -n "$JAVAC"; then
30954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30955 $as_echo "$JAVAC" >&6; }
30956 else
30957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30958 $as_echo "no" >&6; }
30959 fi
30960 
30961 
30962           if test "x$JAVAC" = x; then
30963             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30964           fi
30965         else
30966           # Otherwise we believe it is a complete path. Use it as it is.
30967           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30968 $as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30969           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30970 $as_echo_n "checking for JAVAC... " >&6; }
30971           if test ! -x "$tool_specified"; then
30972             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30973 $as_echo "not found" >&6; }
30974             as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30975           fi
30976           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30977 $as_echo "$tool_specified" >&6; }
30978         fi
30979       fi
30980     fi
30981 
30982   fi
30983 
30984 
30985 
30986   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30987 
30988   # Publish this variable in the help.
30989 
30990 
30991   if [ -z "${JAVAH+x}" ]; then
30992     # The variable is not set by user, try to locate tool using the code snippet
30993 
30994       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30995 $as_echo_n "checking for javah in Boot JDK... " >&6; }
30996       JAVAH=$BOOT_JDK/bin/javah
30997       if test ! -x $JAVAH; then
30998         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30999 $as_echo "not found" >&6; }
31000         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31001 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31002         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31003       fi
31004       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31005 $as_echo "ok" >&6; }
31006 
31007 
31008   else
31009     # The variable is set, but is it from the command line or the environment?
31010 
31011     # Try to remove the string !JAVAH! from our list.
31012     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
31013     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31014       # If it failed, the variable was not from the command line. Ignore it,
31015       # but warn the user (except for BASH, which is always set by the calling BASH).
31016       if test "xJAVAH" != xBASH; then
31017         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
31018 $as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
31019       fi
31020       # Try to locate tool using the code snippet
31021 
31022       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
31023 $as_echo_n "checking for javah in Boot JDK... " >&6; }
31024       JAVAH=$BOOT_JDK/bin/javah
31025       if test ! -x $JAVAH; then
31026         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31027 $as_echo "not found" >&6; }
31028         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31029 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31030         as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
31031       fi
31032       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31033 $as_echo "ok" >&6; }
31034 
31035 
31036     else
31037       # If it succeeded, then it was overridden by the user. We will use it
31038       # for the tool.
31039 
31040       # First remove it from the list of overridden variables, so we can test
31041       # for unknown variables in the end.
31042       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31043 
31044       # Check if we try to supply an empty value
31045       if test "x$JAVAH" = x; then
31046         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
31047 $as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
31048         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31049 $as_echo_n "checking for JAVAH... " >&6; }
31050         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31051 $as_echo "disabled" >&6; }
31052       else
31053         # Check if the provided tool contains a complete path.
31054         tool_specified="$JAVAH"
31055         tool_basename="${tool_specified##*/}"
31056         if test "x$tool_basename" = "x$tool_specified"; then
31057           # A command without a complete path is provided, search $PATH.
31058           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
31059 $as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
31060           # Extract the first word of "$tool_basename", so it can be a program name with args.
31061 set dummy $tool_basename; ac_word=$2
31062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31063 $as_echo_n "checking for $ac_word... " >&6; }
31064 if ${ac_cv_path_JAVAH+:} false; then :
31065   $as_echo_n "(cached) " >&6
31066 else
31067   case $JAVAH in
31068   [\\/]* | ?:[\\/]*)
31069   ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
31070   ;;
31071   *)
31072   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31073 for as_dir in $PATH
31074 do
31075   IFS=$as_save_IFS
31076   test -z "$as_dir" && as_dir=.
31077     for ac_exec_ext in '' $ac_executable_extensions; do
31078   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31079     ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
31080     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31081     break 2
31082   fi
31083 done
31084   done
31085 IFS=$as_save_IFS
31086 
31087   ;;
31088 esac
31089 fi
31090 JAVAH=$ac_cv_path_JAVAH
31091 if test -n "$JAVAH"; then
31092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
31093 $as_echo "$JAVAH" >&6; }
31094 else
31095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31096 $as_echo "no" >&6; }
31097 fi
31098 
31099 
31100           if test "x$JAVAH" = x; then
31101             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31102           fi
31103         else
31104           # Otherwise we believe it is a complete path. Use it as it is.
31105           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
31106 $as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
31107           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
31108 $as_echo_n "checking for JAVAH... " >&6; }
31109           if test ! -x "$tool_specified"; then
31110             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31111 $as_echo "not found" >&6; }
31112             as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
31113           fi
31114           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31115 $as_echo "$tool_specified" >&6; }
31116         fi
31117       fi
31118     fi
31119 
31120   fi
31121 
31122 
31123 
31124   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31125 
31126   # Publish this variable in the help.
31127 
31128 
31129   if [ -z "${JAR+x}" ]; then
31130     # The variable is not set by user, try to locate tool using the code snippet
31131 
31132       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31133 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31134       JAR=$BOOT_JDK/bin/jar
31135       if test ! -x $JAR; then
31136         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31137 $as_echo "not found" >&6; }
31138         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31139 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31140         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31141       fi
31142       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31143 $as_echo "ok" >&6; }
31144 
31145 
31146   else
31147     # The variable is set, but is it from the command line or the environment?
31148 
31149     # Try to remove the string !JAR! from our list.
31150     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
31151     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31152       # If it failed, the variable was not from the command line. Ignore it,
31153       # but warn the user (except for BASH, which is always set by the calling BASH).
31154       if test "xJAR" != xBASH; then
31155         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
31156 $as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
31157       fi
31158       # Try to locate tool using the code snippet
31159 
31160       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
31161 $as_echo_n "checking for jar in Boot JDK... " >&6; }
31162       JAR=$BOOT_JDK/bin/jar
31163       if test ! -x $JAR; then
31164         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31165 $as_echo "not found" >&6; }
31166         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31167 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31168         as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
31169       fi
31170       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31171 $as_echo "ok" >&6; }
31172 
31173 
31174     else
31175       # If it succeeded, then it was overridden by the user. We will use it
31176       # for the tool.
31177 
31178       # First remove it from the list of overridden variables, so we can test
31179       # for unknown variables in the end.
31180       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31181 
31182       # Check if we try to supply an empty value
31183       if test "x$JAR" = x; then
31184         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
31185 $as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
31186         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31187 $as_echo_n "checking for JAR... " >&6; }
31188         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31189 $as_echo "disabled" >&6; }
31190       else
31191         # Check if the provided tool contains a complete path.
31192         tool_specified="$JAR"
31193         tool_basename="${tool_specified##*/}"
31194         if test "x$tool_basename" = "x$tool_specified"; then
31195           # A command without a complete path is provided, search $PATH.
31196           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
31197 $as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
31198           # Extract the first word of "$tool_basename", so it can be a program name with args.
31199 set dummy $tool_basename; ac_word=$2
31200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31201 $as_echo_n "checking for $ac_word... " >&6; }
31202 if ${ac_cv_path_JAR+:} false; then :
31203   $as_echo_n "(cached) " >&6
31204 else
31205   case $JAR in
31206   [\\/]* | ?:[\\/]*)
31207   ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
31208   ;;
31209   *)
31210   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31211 for as_dir in $PATH
31212 do
31213   IFS=$as_save_IFS
31214   test -z "$as_dir" && as_dir=.
31215     for ac_exec_ext in '' $ac_executable_extensions; do
31216   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31217     ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
31218     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31219     break 2
31220   fi
31221 done
31222   done
31223 IFS=$as_save_IFS
31224 
31225   ;;
31226 esac
31227 fi
31228 JAR=$ac_cv_path_JAR
31229 if test -n "$JAR"; then
31230   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
31231 $as_echo "$JAR" >&6; }
31232 else
31233   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31234 $as_echo "no" >&6; }
31235 fi
31236 
31237 
31238           if test "x$JAR" = x; then
31239             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31240           fi
31241         else
31242           # Otherwise we believe it is a complete path. Use it as it is.
31243           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
31244 $as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
31245           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
31246 $as_echo_n "checking for JAR... " >&6; }
31247           if test ! -x "$tool_specified"; then
31248             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31249 $as_echo "not found" >&6; }
31250             as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
31251           fi
31252           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31253 $as_echo "$tool_specified" >&6; }
31254         fi
31255       fi
31256     fi
31257 
31258   fi
31259 
31260 
31261 
31262   # Use user overridden value if available, otherwise locate tool in the Boot JDK.
31263 
31264   # Publish this variable in the help.
31265 
31266 
31267   if [ -z "${JARSIGNER+x}" ]; then
31268     # The variable is not set by user, try to locate tool using the code snippet
31269 
31270       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31271 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31272       JARSIGNER=$BOOT_JDK/bin/jarsigner
31273       if test ! -x $JARSIGNER; then
31274         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31275 $as_echo "not found" >&6; }
31276         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31277 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31278         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31279       fi
31280       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31281 $as_echo "ok" >&6; }
31282 
31283 
31284   else
31285     # The variable is set, but is it from the command line or the environment?
31286 
31287     # Try to remove the string !JARSIGNER! from our list.
31288     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
31289     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31290       # If it failed, the variable was not from the command line. Ignore it,
31291       # but warn the user (except for BASH, which is always set by the calling BASH).
31292       if test "xJARSIGNER" != xBASH; then
31293         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
31294 $as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
31295       fi
31296       # Try to locate tool using the code snippet
31297 
31298       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
31299 $as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
31300       JARSIGNER=$BOOT_JDK/bin/jarsigner
31301       if test ! -x $JARSIGNER; then
31302         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31303 $as_echo "not found" >&6; }
31304         { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
31305 $as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
31306         as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
31307       fi
31308       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
31309 $as_echo "ok" >&6; }
31310 
31311 
31312     else
31313       # If it succeeded, then it was overridden by the user. We will use it
31314       # for the tool.
31315 
31316       # First remove it from the list of overridden variables, so we can test
31317       # for unknown variables in the end.
31318       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31319 
31320       # Check if we try to supply an empty value
31321       if test "x$JARSIGNER" = x; then
31322         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
31323 $as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
31324         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31325 $as_echo_n "checking for JARSIGNER... " >&6; }
31326         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
31327 $as_echo "disabled" >&6; }
31328       else
31329         # Check if the provided tool contains a complete path.
31330         tool_specified="$JARSIGNER"
31331         tool_basename="${tool_specified##*/}"
31332         if test "x$tool_basename" = "x$tool_specified"; then
31333           # A command without a complete path is provided, search $PATH.
31334           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
31335 $as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
31336           # Extract the first word of "$tool_basename", so it can be a program name with args.
31337 set dummy $tool_basename; ac_word=$2
31338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31339 $as_echo_n "checking for $ac_word... " >&6; }
31340 if ${ac_cv_path_JARSIGNER+:} false; then :
31341   $as_echo_n "(cached) " >&6
31342 else
31343   case $JARSIGNER in
31344   [\\/]* | ?:[\\/]*)
31345   ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
31346   ;;
31347   *)
31348   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31349 for as_dir in $PATH
31350 do
31351   IFS=$as_save_IFS
31352   test -z "$as_dir" && as_dir=.
31353     for ac_exec_ext in '' $ac_executable_extensions; do
31354   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31355     ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
31356     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31357     break 2
31358   fi
31359 done
31360   done
31361 IFS=$as_save_IFS
31362 
31363   ;;
31364 esac
31365 fi
31366 JARSIGNER=$ac_cv_path_JARSIGNER
31367 if test -n "$JARSIGNER"; then
31368   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
31369 $as_echo "$JARSIGNER" >&6; }
31370 else
31371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31372 $as_echo "no" >&6; }
31373 fi
31374 
31375 
31376           if test "x$JARSIGNER" = x; then
31377             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31378           fi
31379         else
31380           # Otherwise we believe it is a complete path. Use it as it is.
31381           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
31382 $as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
31383           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
31384 $as_echo_n "checking for JARSIGNER... " >&6; }
31385           if test ! -x "$tool_specified"; then
31386             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31387 $as_echo "not found" >&6; }
31388             as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
31389           fi
31390           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31391 $as_echo "$tool_specified" >&6; }
31392         fi
31393       fi
31394     fi
31395 
31396   fi
31397 
31398 
31399 
31400   # Finally, set some other options...
31401 
31402   # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
31403   BOOT_JDK_SOURCETARGET="-source 8 -target 8"
31404 
31405 
31406   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
31407 $as_echo_n "checking if Boot JDK supports modules... " >&6; }
31408   if "$JAVA" --list-modules > /dev/null 2>&1; then
31409     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31410 $as_echo "yes" >&6; }
31411     BOOT_JDK_MODULAR="true"
31412   else
31413     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31414 $as_echo "no" >&6; }
31415     BOOT_JDK_MODULAR="false"
31416   fi
31417 
31418 
31419 
31420 
31421   # Check if the boot jdk is 32 or 64 bit
31422   if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
31423     BOOT_JDK_BITS="64"
31424   else
31425     BOOT_JDK_BITS="32"
31426   fi
31427   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
31428 $as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
31429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
31430 $as_echo "$BOOT_JDK_BITS" >&6; }
31431 
31432 
31433 
31434 # Check whether --with-build-jdk was given.
31435 if test "${with_build_jdk+set}" = set; then :
31436   withval=$with_build_jdk;
31437 fi
31438 
31439 
31440   CREATE_BUILDJDK=false
31441   EXTERNAL_BUILDJDK=false
31442   BUILD_JDK_FOUND="no"
31443   if test "x$with_build_jdk" != "x"; then
31444 
31445   if test "x$BUILD_JDK_FOUND" = xno; then
31446     # Execute the test
31447 
31448        if test "x$with_build_jdk" != x; then
31449          BUILD_JDK=$with_build_jdk
31450          BUILD_JDK_FOUND=maybe
31451          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
31452 $as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
31453        fi
31454 
31455     # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
31456     if test "x$BUILD_JDK_FOUND" = xmaybe; then
31457       # Do we have a bin/java?
31458       if test ! -x "$BUILD_JDK/bin/java"; then
31459         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
31460 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
31461         BUILD_JDK_FOUND=no
31462       elif test ! -x "$BUILD_JDK/bin/jlink"; then
31463         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
31464 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
31465         BUILD_JDK_FOUND=no
31466       elif test ! -x "$BUILD_JDK/bin/jmod"; then
31467         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
31468 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
31469         BUILD_JDK_FOUND=no
31470       elif test ! -x "$BUILD_JDK/bin/javac"; then
31471         # Do we have a bin/javac?
31472         { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
31473 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
31474         { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
31475 $as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
31476         BUILD_JDK_FOUND=no
31477       else
31478         # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
31479         BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
31480 
31481         # Extra M4 quote needed to protect [] in grep expression.
31482         FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
31483         if test "x$FOUND_CORRECT_VERSION" = x; then
31484           { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
31485 $as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
31486           { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
31487 $as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
31488           BUILD_JDK_FOUND=no
31489         else
31490           # We're done!
31491           BUILD_JDK_FOUND=yes
31492 
31493   # Only process if variable expands to non-empty
31494 
31495   if test "x$BUILD_JDK" != x; then
31496     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31497 
31498   # Input might be given as Windows format, start by converting to
31499   # unix format.
31500   path="$BUILD_JDK"
31501   new_path=`$CYGPATH -u "$path"`
31502 
31503   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31504   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31505   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31506   # "foo.exe" is OK but "foo" is an error.
31507   #
31508   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31509   # It is also a way to make sure we got the proper file name for the real test later on.
31510   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31511   if test "x$test_shortpath" = x; then
31512     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31513 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31514     as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
31515   fi
31516 
31517   # Call helper function which possibly converts this using DOS-style short mode.
31518   # If so, the updated path is stored in $new_path.
31519 
31520   input_path="$new_path"
31521   # Check if we need to convert this using DOS-style short mode. If the path
31522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31523   # take no chances and rewrite it.
31524   # Note: m4 eats our [], so we need to use [ and ] instead.
31525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31526   if test "x$has_forbidden_chars" != x; then
31527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31528     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31529     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31530     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31531       # Going to short mode and back again did indeed matter. Since short mode is
31532       # case insensitive, let's make it lowercase to improve readability.
31533       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31534       # Now convert it back to Unix-style (cygpath)
31535       input_path=`$CYGPATH -u "$shortmode_path"`
31536       new_path="$input_path"
31537     fi
31538   fi
31539 
31540   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31541   if test "x$test_cygdrive_prefix" = x; then
31542     # As a simple fix, exclude /usr/bin since it's not a real path.
31543     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31544       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31545       # a path prefixed by /cygdrive for fixpath to work.
31546       new_path="$CYGWIN_ROOT_PATH$input_path"
31547     fi
31548   fi
31549 
31550 
31551   if test "x$path" != "x$new_path"; then
31552     BUILD_JDK="$new_path"
31553     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31554 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31555   fi
31556 
31557     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31558 
31559   path="$BUILD_JDK"
31560   has_colon=`$ECHO $path | $GREP ^.:`
31561   new_path="$path"
31562   if test "x$has_colon" = x; then
31563     # Not in mixed or Windows style, start by that.
31564     new_path=`cmd //c echo $path`
31565   fi
31566 
31567 
31568   input_path="$new_path"
31569   # Check if we need to convert this using DOS-style short mode. If the path
31570   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31571   # take no chances and rewrite it.
31572   # Note: m4 eats our [], so we need to use [ and ] instead.
31573   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31574   if test "x$has_forbidden_chars" != x; then
31575     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31576     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31577   fi
31578 
31579 
31580   windows_path="$new_path"
31581   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31582     unix_path=`$CYGPATH -u "$windows_path"`
31583     new_path="$unix_path"
31584   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31585     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31586     new_path="$unix_path"
31587   fi
31588 
31589   if test "x$path" != "x$new_path"; then
31590     BUILD_JDK="$new_path"
31591     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31592 $as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31593   fi
31594 
31595   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31596   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31597 
31598     else
31599       # We're on a unix platform. Hooray! :)
31600       path="$BUILD_JDK"
31601       has_space=`$ECHO "$path" | $GREP " "`
31602       if test "x$has_space" != x; then
31603         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31604 $as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31605         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31606       fi
31607 
31608       # Use eval to expand a potential ~
31609       eval path="$path"
31610       if test ! -f "$path" && test ! -d "$path"; then
31611         as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31612       fi
31613 
31614       if test -d "$path"; then
31615         BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31616       else
31617         dir="`$DIRNAME "$path"`"
31618         base="`$BASENAME "$path"`"
31619         BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31620       fi
31621     fi
31622   fi
31623 
31624           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31625 $as_echo_n "checking for Build JDK... " >&6; }
31626           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31627 $as_echo "$BUILD_JDK" >&6; }
31628           { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31629 $as_echo_n "checking Build JDK version... " >&6; }
31630           BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31631           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31632 $as_echo "$BUILD_JDK_VERSION" >&6; }
31633         fi # end check jdk version
31634       fi # end check java
31635     fi # end check build jdk found
31636   fi
31637 
31638     EXTERNAL_BUILDJDK=true
31639   else
31640     if test "x$COMPILE_TYPE" = "xcross"; then
31641       BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31642       BUILD_JDK_FOUND=yes
31643       CREATE_BUILDJDK=true
31644       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31645 $as_echo_n "checking for Build JDK... " >&6; }
31646       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31647 $as_echo "yes, will build it for the host platform" >&6; }
31648     else
31649       BUILD_JDK="\$(JDK_OUTPUTDIR)"
31650       BUILD_JDK_FOUND=yes
31651       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31652 $as_echo_n "checking for Build JDK... " >&6; }
31653       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31654 $as_echo "yes, will use output dir" >&6; }
31655     fi
31656   fi
31657 
31658   JMOD="$BUILD_JDK/bin/jmod"
31659   JLINK="$BUILD_JDK/bin/jlink"
31660 
31661 
31662 
31663   if test "x$BUILD_JDK_FOUND" != "xyes"; then
31664     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31665 $as_echo_n "checking for Build JDK... " >&6; }
31666     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31667 $as_echo "no" >&6; }
31668     as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31669   fi
31670 
31671 
31672 
31673 
31674 
31675 
31676 ###############################################################################
31677 #
31678 # Configure the sources to use. We can add or override individual directories.
31679 #
31680 ###############################################################################
31681 
31682 
31683   # Where are the sources.
31684   LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31685   CORBA_TOPDIR="$SRC_ROOT/corba"
31686   JAXP_TOPDIR="$SRC_ROOT/jaxp"
31687   JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31688   HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31689   NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31690   JDK_TOPDIR="$SRC_ROOT/jdk"
31691 
31692 
31693 
31694 
31695 
31696 
31697 
31698 
31699 
31700   # This feature is no longer supported.
31701 
31702 
31703 
31704 # Check whether --with-add-source-root was given.
31705 if test "${with_add_source_root+set}" = set; then :
31706   withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
31707 $as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31708 fi
31709 
31710 
31711 
31712 
31713 # Check whether --with-override-source-root was given.
31714 if test "${with_override_source_root+set}" = set; then :
31715   withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
31716 $as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31717 fi
31718 
31719 
31720 
31721 
31722 # Check whether --with-adds-and-overrides was given.
31723 if test "${with_adds_and_overrides+set}" = set; then :
31724   withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
31725 $as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31726 fi
31727 
31728 
31729 
31730 
31731 # Check whether --with-override-langtools was given.
31732 if test "${with_override_langtools+set}" = set; then :
31733   withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31734 $as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31735 fi
31736 
31737 
31738 
31739 
31740 # Check whether --with-override-corba was given.
31741 if test "${with_override_corba+set}" = set; then :
31742   withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31743 $as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31744 fi
31745 
31746 
31747 
31748 
31749 # Check whether --with-override-jaxp was given.
31750 if test "${with_override_jaxp+set}" = set; then :
31751   withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31752 $as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31753 fi
31754 
31755 
31756 
31757 
31758 # Check whether --with-override-jaxws was given.
31759 if test "${with_override_jaxws+set}" = set; then :
31760   withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31761 $as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31762 fi
31763 
31764 
31765 
31766 
31767 # Check whether --with-override-hotspot was given.
31768 if test "${with_override_hotspot+set}" = set; then :
31769   withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31770 $as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31771 fi
31772 
31773 
31774 
31775 
31776 # Check whether --with-override-nashorn was given.
31777 if test "${with_override_nashorn+set}" = set; then :
31778   withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31779 $as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31780 fi
31781 
31782 
31783 
31784 
31785 # Check whether --with-override-jdk was given.
31786 if test "${with_override_jdk+set}" = set; then :
31787   withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31788 $as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31789 fi
31790 
31791 
31792 
31793 
31794   BUILD_OUTPUT="$OUTPUT_ROOT"
31795 
31796   JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31797 
31798 
31799 
31800 # Check whether --with-import_hotspot was given.
31801 if test "${with_import_hotspot+set}" = set; then :
31802   withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31803 $as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31804 fi
31805 
31806 
31807 
31808 
31809 
31810 
31811 # Check whether --with-import-modules was given.
31812 if test "${with_import_modules+set}" = set; then :
31813   withval=$with_import_modules;
31814 fi
31815 
31816 
31817   if test "x$with_import_modules" != x \
31818       && test "x$with_import_modules" != "xno"; then
31819     if test -d "$with_import_modules"; then
31820       IMPORT_MODULES_TOPDIR="$with_import_modules"
31821 
31822   # Only process if variable expands to non-empty
31823 
31824   if test "x$IMPORT_MODULES_TOPDIR" != x; then
31825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31826 
31827   # Input might be given as Windows format, start by converting to
31828   # unix format.
31829   path="$IMPORT_MODULES_TOPDIR"
31830   new_path=`$CYGPATH -u "$path"`
31831 
31832   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31833   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31834   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31835   # "foo.exe" is OK but "foo" is an error.
31836   #
31837   # This test is therefore slightly more accurate than "test -f" to check for file precense.
31838   # It is also a way to make sure we got the proper file name for the real test later on.
31839   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31840   if test "x$test_shortpath" = x; then
31841     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31842 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31843     as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31844   fi
31845 
31846   # Call helper function which possibly converts this using DOS-style short mode.
31847   # If so, the updated path is stored in $new_path.
31848 
31849   input_path="$new_path"
31850   # Check if we need to convert this using DOS-style short mode. If the path
31851   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31852   # take no chances and rewrite it.
31853   # Note: m4 eats our [], so we need to use [ and ] instead.
31854   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31855   if test "x$has_forbidden_chars" != x; then
31856     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31857     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31858     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31859     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31860       # Going to short mode and back again did indeed matter. Since short mode is
31861       # case insensitive, let's make it lowercase to improve readability.
31862       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31863       # Now convert it back to Unix-style (cygpath)
31864       input_path=`$CYGPATH -u "$shortmode_path"`
31865       new_path="$input_path"
31866     fi
31867   fi
31868 
31869   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31870   if test "x$test_cygdrive_prefix" = x; then
31871     # As a simple fix, exclude /usr/bin since it's not a real path.
31872     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31873       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31874       # a path prefixed by /cygdrive for fixpath to work.
31875       new_path="$CYGWIN_ROOT_PATH$input_path"
31876     fi
31877   fi
31878 
31879 
31880   if test "x$path" != "x$new_path"; then
31881     IMPORT_MODULES_TOPDIR="$new_path"
31882     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31883 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31884   fi
31885 
31886     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31887 
31888   path="$IMPORT_MODULES_TOPDIR"
31889   has_colon=`$ECHO $path | $GREP ^.:`
31890   new_path="$path"
31891   if test "x$has_colon" = x; then
31892     # Not in mixed or Windows style, start by that.
31893     new_path=`cmd //c echo $path`
31894   fi
31895 
31896 
31897   input_path="$new_path"
31898   # Check if we need to convert this using DOS-style short mode. If the path
31899   # contains just simple characters, use it. Otherwise (spaces, weird characters),
31900   # take no chances and rewrite it.
31901   # Note: m4 eats our [], so we need to use [ and ] instead.
31902   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31903   if test "x$has_forbidden_chars" != x; then
31904     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31905     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31906   fi
31907 
31908 
31909   windows_path="$new_path"
31910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31911     unix_path=`$CYGPATH -u "$windows_path"`
31912     new_path="$unix_path"
31913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31915     new_path="$unix_path"
31916   fi
31917 
31918   if test "x$path" != "x$new_path"; then
31919     IMPORT_MODULES_TOPDIR="$new_path"
31920     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31921 $as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31922   fi
31923 
31924   # Save the first 10 bytes of this path to the storage, so fixpath can work.
31925   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31926 
31927     else
31928       # We're on a unix platform. Hooray! :)
31929       path="$IMPORT_MODULES_TOPDIR"
31930       has_space=`$ECHO "$path" | $GREP " "`
31931       if test "x$has_space" != x; then
31932         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31933 $as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31934         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31935       fi
31936 
31937       # Use eval to expand a potential ~
31938       eval path="$path"
31939       if test ! -f "$path" && test ! -d "$path"; then
31940         as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31941       fi
31942 
31943       if test -d "$path"; then
31944         IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31945       else
31946         dir="`$DIRNAME "$path"`"
31947         base="`$BASENAME "$path"`"
31948         IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31949       fi
31950     fi
31951   fi
31952 
31953     elif test -e "$with_import_modules"; then
31954       IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31955       $RM -rf "$IMPORT_MODULES_TOPDIR"
31956       $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31957       if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31958         as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31959       fi
31960     else
31961       as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31962     fi
31963   fi
31964 
31965   if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31966     IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31967   fi
31968   if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31969     IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31970   fi
31971   if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31972     IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31973   fi
31974   if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31975     IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31976   fi
31977   if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31978     IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31979   fi
31980   if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31981     IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31982   fi
31983   if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31984     IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31985   fi
31986   if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31987     IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31988   fi
31989 
31990 
31991 
31992 
31993 
31994 
31995 
31996 
31997 
31998 
31999 
32000 ###############################################################################
32001 #
32002 # Setup the toolchain (compilers etc), i.e. tools used to compile and process
32003 # native code.
32004 #
32005 ###############################################################################
32006 
32007 # See if we are doing a complete static build or not
32008 
32009   # Check whether --enable-static-build was given.
32010 if test "${enable_static_build+set}" = set; then :
32011   enableval=$enable_static_build;
32012 fi
32013 
32014   STATIC_BUILD=false
32015   if test "x$enable_static_build" = "xyes"; then
32016     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32017 $as_echo_n "checking if static build is enabled... " >&6; }
32018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32019 $as_echo "yes" >&6; }
32020     if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
32021       as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
32022     fi
32023     STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
32024     CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32025     CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
32026     STATIC_BUILD=true
32027   elif test "x$enable_static_build" = "xno"; then
32028     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
32029 $as_echo_n "checking if static build is enabled... " >&6; }
32030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32031 $as_echo "no" >&6; }
32032   elif test "x$enable_static_build" != "x"; then
32033     as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
32034   fi
32035 
32036 
32037 
32038 
32039 # First determine the toolchain type (compiler family)
32040 
32041 
32042 # Check whether --with-toolchain-type was given.
32043 if test "${with_toolchain_type+set}" = set; then :
32044   withval=$with_toolchain_type;
32045 fi
32046 
32047 
32048   # Use indirect variable referencing
32049   toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
32050   VALID_TOOLCHAINS=${!toolchain_var_name}
32051 
32052   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32053     if test -n "$XCODEBUILD"; then
32054       # On Mac OS X, default toolchain to clang after Xcode 5
32055       XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
32056       $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
32057       if test $? -ne 0; then
32058         as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
32059       fi
32060       XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
32061           $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
32062           $CUT -f 1 -d .`
32063       { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
32064 $as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
32065       if test $XCODE_MAJOR_VERSION -ge 5; then
32066           DEFAULT_TOOLCHAIN="clang"
32067       else
32068           DEFAULT_TOOLCHAIN="gcc"
32069       fi
32070     else
32071       # If Xcode is not installed, but the command line tools are
32072       # then we can't run xcodebuild. On these systems we should
32073       # default to clang
32074       DEFAULT_TOOLCHAIN="clang"
32075     fi
32076   else
32077     # First toolchain type in the list is the default
32078     DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
32079   fi
32080 
32081   if test "x$with_toolchain_type" = xlist; then
32082     # List all toolchains
32083     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
32084 $as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
32085     for toolchain in $VALID_TOOLCHAINS; do
32086       toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
32087       TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32088       $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
32089     done
32090 
32091     exit 0
32092   elif test "x$with_toolchain_type" != x; then
32093     # User override; check that it is valid
32094     if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
32095       { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
32096 $as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
32097       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
32098 $as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
32099       as_fn_error $? "Cannot continue." "$LINENO" 5
32100     fi
32101     TOOLCHAIN_TYPE=$with_toolchain_type
32102   else
32103     # No flag given, use default
32104     TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
32105   fi
32106 
32107 
32108   TOOLCHAIN_CC_BINARY_clang="clang"
32109   TOOLCHAIN_CC_BINARY_gcc="gcc"
32110   TOOLCHAIN_CC_BINARY_microsoft="cl"
32111   TOOLCHAIN_CC_BINARY_solstudio="cc"
32112   TOOLCHAIN_CC_BINARY_xlc="xlc_r"
32113 
32114   TOOLCHAIN_CXX_BINARY_clang="clang++"
32115   TOOLCHAIN_CXX_BINARY_gcc="g++"
32116   TOOLCHAIN_CXX_BINARY_microsoft="cl"
32117   TOOLCHAIN_CXX_BINARY_solstudio="CC"
32118   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
32119 
32120   # Use indirect variable referencing
32121   toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
32122   TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
32123   toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
32124   TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
32125   toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
32126   TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
32127   toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
32128   TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
32129 
32130 
32131   # Define filename patterns
32132   if test "x$OPENJDK_TARGET_OS" = xwindows; then
32133     LIBRARY_PREFIX=
32134     SHARED_LIBRARY_SUFFIX='.dll'
32135     STATIC_LIBRARY_SUFFIX='.lib'
32136     SHARED_LIBRARY='$1.dll'
32137     STATIC_LIBRARY='$1.lib'
32138     OBJ_SUFFIX='.obj'
32139     EXE_SUFFIX='.exe'
32140   else
32141     LIBRARY_PREFIX=lib
32142     SHARED_LIBRARY_SUFFIX='.so'
32143     STATIC_LIBRARY_SUFFIX='.a'
32144     SHARED_LIBRARY='lib$1.so'
32145     STATIC_LIBRARY='lib$1.a'
32146     OBJ_SUFFIX='.o'
32147     EXE_SUFFIX=''
32148     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32149       # For full static builds, we're overloading the SHARED_LIBRARY
32150       # variables in order to limit the amount of changes required.
32151       # It would be better to remove SHARED and just use LIBRARY and
32152       # LIBRARY_SUFFIX for libraries that can be built either
32153       # shared or static and use STATIC_* for libraries that are
32154       # always built statically.
32155       if test "x$STATIC_BUILD" = xtrue; then
32156         SHARED_LIBRARY='lib$1.a'
32157         SHARED_LIBRARY_SUFFIX='.a'
32158       else
32159         SHARED_LIBRARY='lib$1.dylib'
32160         SHARED_LIBRARY_SUFFIX='.dylib'
32161       fi
32162     fi
32163   fi
32164 
32165 
32166 
32167 
32168 
32169 
32170 
32171 
32172 
32173 
32174   if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
32175     { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
32176 $as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
32177   else
32178     { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
32179 $as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
32180   fi
32181 
32182 
32183 # User supplied flags should be used when configure detects compilers
32184 
32185   if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
32186     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
32187 $as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
32188   fi
32189 
32190   if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
32191     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
32192 $as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
32193   fi
32194 
32195   if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
32196     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
32197 $as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
32198   fi
32199 
32200 
32201 # Check whether --with-extra-cflags was given.
32202 if test "${with_extra_cflags+set}" = set; then :
32203   withval=$with_extra_cflags;
32204 fi
32205 
32206 
32207 
32208 # Check whether --with-extra-cxxflags was given.
32209 if test "${with_extra_cxxflags+set}" = set; then :
32210   withval=$with_extra_cxxflags;
32211 fi
32212 
32213 
32214 
32215 # Check whether --with-extra-ldflags was given.
32216 if test "${with_extra_ldflags+set}" = set; then :
32217   withval=$with_extra_ldflags;
32218 fi
32219 
32220 
32221   EXTRA_CFLAGS="$with_extra_cflags"
32222   EXTRA_CXXFLAGS="$with_extra_cxxflags"
32223   EXTRA_LDFLAGS="$with_extra_ldflags"
32224 
32225 
32226 
32227 
32228 
32229   # The global CFLAGS and LDLAGS variables are used by configure tests and
32230   # should include the extra parameters
32231   CFLAGS="$EXTRA_CFLAGS"
32232   CXXFLAGS="$EXTRA_CXXFLAGS"
32233   LDFLAGS="$EXTRA_LDFLAGS"
32234   CPPFLAGS=""
32235 
32236 # The sysroot cflags are needed for configure to be able to run the compilers
32237 
32238   if test "x$SYSROOT" != "x"; then
32239     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
32240       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32241         # Solaris Studio does not have a concept of sysroot. Instead we must
32242         # make sure the default include and lib dirs are appended to each
32243         # compile and link command line. Must also add -I-xbuiltin to enable
32244         # inlining of system functions and intrinsics.
32245         SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
32246         SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
32247             -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
32248       fi
32249     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
32250       SYSROOT_CFLAGS="--sysroot=$SYSROOT"
32251       SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
32252     elif test "x$TOOLCHAIN_TYPE" = xclang; then
32253       SYSROOT_CFLAGS="-isysroot $SYSROOT"
32254       SYSROOT_LDFLAGS="-isysroot $SYSROOT"
32255     fi
32256     # The global CFLAGS and LDFLAGS variables need these for configure to function
32257     CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
32258     CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
32259     CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
32260     LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
32261   fi
32262 
32263   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
32264     # We also need -iframework<path>/System/Library/Frameworks
32265     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32266     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
32267     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
32268     # set this here so it doesn't have to be peppered throughout the forest
32269     SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32270     SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
32271   fi
32272 
32273 
32274 
32275 
32276 
32277 # Then detect the actual binaries needed
32278 
32279   # FIXME: Is this needed?
32280   ac_ext=cpp
32281 ac_cpp='$CXXCPP $CPPFLAGS'
32282 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32283 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32284 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32285 
32286 
32287   # Store the CFLAGS etc passed to the configure script.
32288   ORG_CFLAGS="$CFLAGS"
32289   ORG_CXXFLAGS="$CXXFLAGS"
32290 
32291   # autoconf magic only relies on PATH, so update it if tools dir is specified
32292   OLD_PATH="$PATH"
32293 
32294   # On Windows, we need to detect the visual studio installation first.
32295   # This will change the PATH, but we need to keep that new PATH even
32296   # after toolchain detection is done, since the compiler (on x86) uses
32297   # it for DLL resolution in runtime.
32298   if test "x$OPENJDK_BUILD_OS" = "xwindows" \
32299       && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
32300 
32301   # Store path to cygwin link.exe to help excluding it when searching for
32302   # VS linker. This must be done before changing the PATH when looking for VS.
32303   # Extract the first word of "link", so it can be a program name with args.
32304 set dummy link; ac_word=$2
32305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32306 $as_echo_n "checking for $ac_word... " >&6; }
32307 if ${ac_cv_path_CYGWIN_LINK+:} false; then :
32308   $as_echo_n "(cached) " >&6
32309 else
32310   case $CYGWIN_LINK in
32311   [\\/]* | ?:[\\/]*)
32312   ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
32313   ;;
32314   *)
32315   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32316 for as_dir in $PATH
32317 do
32318   IFS=$as_save_IFS
32319   test -z "$as_dir" && as_dir=.
32320     for ac_exec_ext in '' $ac_executable_extensions; do
32321   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32322     ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
32323     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32324     break 2
32325   fi
32326 done
32327   done
32328 IFS=$as_save_IFS
32329 
32330   ;;
32331 esac
32332 fi
32333 CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
32334 if test -n "$CYGWIN_LINK"; then
32335   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
32336 $as_echo "$CYGWIN_LINK" >&6; }
32337 else
32338   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32339 $as_echo "no" >&6; }
32340 fi
32341 
32342 
32343   if test "x$CYGWIN_LINK" != x; then
32344     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
32345 $as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
32346     "$CYGWIN_LINK" --version > /dev/null
32347     if test $? -eq 0 ; then
32348       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32349 $as_echo "yes" >&6; }
32350     else
32351       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32352 $as_echo "no" >&6; }
32353       # This might be the VS linker. Don't exclude it later on.
32354       CYGWIN_LINK=""
32355     fi
32356   fi
32357 
32358   # First-hand choice is to locate and run the vsvars bat file.
32359 
32360 
32361 # Check whether --with-toolchain-version was given.
32362 if test "${with_toolchain_version+set}" = set; then :
32363   withval=$with_toolchain_version;
32364 fi
32365 
32366 
32367   if test "x$with_toolchain_version" = xlist; then
32368     # List all toolchains
32369     { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
32370 $as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
32371     for version in $VALID_VS_VERSIONS; do
32372       eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
32373       $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
32374     done
32375 
32376     exit 0
32377   elif test "x$DEVKIT_VS_VERSION" != x; then
32378     VS_VERSION=$DEVKIT_VS_VERSION
32379     TOOLCHAIN_VERSION=$VS_VERSION
32380     eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32381     eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32382     eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32383     eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32384     eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32385     VS_PATH="$TOOLCHAIN_PATH:$PATH"
32386 
32387     # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
32388     # can still be exported as INCLUDE for compiler invocations without
32389     # SYSROOT_CFLAGS
32390     OLDIFS="$IFS"
32391     IFS=";"
32392     for i in $DEVKIT_VS_INCLUDE; do
32393       ipath=$i
32394 
32395   unix_path="$ipath"
32396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32397     windows_path=`$CYGPATH -m "$unix_path"`
32398     ipath="$windows_path"
32399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32400     windows_path=`cmd //c echo $unix_path`
32401     ipath="$windows_path"
32402   fi
32403 
32404       VS_INCLUDE="$VS_INCLUDE;$ipath"
32405     done
32406     # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
32407     # as LIB for compiler invocations without SYSROOT_LDFLAGS
32408     for i in $DEVKIT_VS_LIB; do
32409       libpath=$i
32410 
32411   unix_path="$libpath"
32412   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32413     windows_path=`$CYGPATH -m "$unix_path"`
32414     libpath="$windows_path"
32415   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32416     windows_path=`cmd //c echo $unix_path`
32417     libpath="$windows_path"
32418   fi
32419 
32420       VS_LIB="$VS_LIB;$libpath"
32421     done
32422     IFS="$OLDIFS"
32423 
32424     { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
32425 $as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
32426 
32427   elif test "x$with_toolchain_version" != x; then
32428     # User override; check that it is valid
32429     if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
32430       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
32431 $as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
32432       { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
32433 $as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
32434       as_fn_error $? "Cannot continue." "$LINENO" 5
32435     fi
32436     VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
32437   else
32438     # No flag given, use default
32439     VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
32440   fi
32441 
32442   for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
32443 
32444   VS_VERSION="$VS_VERSION"
32445   eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
32446   eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
32447   eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
32448   eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
32449 
32450   # When using --with-tools-dir, assume it points to the correct and default
32451   # version of Visual Studio or that --with-toolchain-version was also set.
32452   if test "x$with_tools_dir" != x; then
32453 
32454   if test "x$VS_ENV_CMD" = x; then
32455     VS_VERSION="${VS_VERSION}"
32456     VS_BASE="$with_tools_dir/../.."
32457     METHOD="--with-tools-dir"
32458 
32459     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32460       VCVARSFILE="vc/bin/vcvars32.bat"
32461     else
32462       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32463     fi
32464 
32465 
32466   windows_path="$VS_BASE"
32467   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32468     unix_path=`$CYGPATH -u "$windows_path"`
32469     VS_BASE="$unix_path"
32470   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32471     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32472     VS_BASE="$unix_path"
32473   fi
32474 
32475     if test -d "$VS_BASE"; then
32476       if test -f "$VS_BASE/$VCVARSFILE"; then
32477         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32478 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32479         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32480         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32481         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32482         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32483       else
32484         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32485 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32486         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32487 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32488       fi
32489     fi
32490   fi
32491 
32492 
32493   if test "x$VS_ENV_CMD" = x; then
32494     VS_VERSION="${VS_VERSION}"
32495     VS_BASE="$with_tools_dir/../../.."
32496     METHOD="--with-tools-dir"
32497 
32498     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32499       VCVARSFILE="vc/bin/vcvars32.bat"
32500     else
32501       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32502     fi
32503 
32504 
32505   windows_path="$VS_BASE"
32506   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32507     unix_path=`$CYGPATH -u "$windows_path"`
32508     VS_BASE="$unix_path"
32509   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32510     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32511     VS_BASE="$unix_path"
32512   fi
32513 
32514     if test -d "$VS_BASE"; then
32515       if test -f "$VS_BASE/$VCVARSFILE"; then
32516         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32517 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32518         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32519         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32520         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32521         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32522       else
32523         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32524 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32525         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32526 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32527       fi
32528     fi
32529   fi
32530 
32531     if test "x$VS_ENV_CMD" = x; then
32532       # Having specified an argument which is incorrect will produce an instant failure;
32533       # we should not go on looking
32534       { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
32535 $as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
32536       { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
32537 $as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
32538       { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
32539 $as_echo "$as_me: directory within the Visual Studio installation" >&6;}
32540       as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
32541     fi
32542   fi
32543 
32544   VS_ENV_CMD=""
32545   VS_ENV_ARGS=""
32546 
32547   if test "x$VS_COMNTOOLS" != x; then
32548 
32549   if test "x$VS_ENV_CMD" = x; then
32550     VS_VERSION="${VS_VERSION}"
32551     VS_BASE="$VS_COMNTOOLS/../.."
32552     METHOD="$VS_COMNTOOLS_VAR variable"
32553 
32554     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32555       VCVARSFILE="vc/bin/vcvars32.bat"
32556     else
32557       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32558     fi
32559 
32560 
32561   windows_path="$VS_BASE"
32562   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32563     unix_path=`$CYGPATH -u "$windows_path"`
32564     VS_BASE="$unix_path"
32565   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32566     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32567     VS_BASE="$unix_path"
32568   fi
32569 
32570     if test -d "$VS_BASE"; then
32571       if test -f "$VS_BASE/$VCVARSFILE"; then
32572         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32573 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32574         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32575         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32576         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32577         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32578       else
32579         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32580 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32581         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32582 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32583       fi
32584     fi
32585   fi
32586 
32587   fi
32588   if test "x$PROGRAMFILES" != x; then
32589 
32590   if test "x$VS_ENV_CMD" = x; then
32591     VS_VERSION="${VS_VERSION}"
32592     VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32593     METHOD="well-known name"
32594 
32595     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32596       VCVARSFILE="vc/bin/vcvars32.bat"
32597     else
32598       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32599     fi
32600 
32601 
32602   windows_path="$VS_BASE"
32603   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32604     unix_path=`$CYGPATH -u "$windows_path"`
32605     VS_BASE="$unix_path"
32606   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32607     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32608     VS_BASE="$unix_path"
32609   fi
32610 
32611     if test -d "$VS_BASE"; then
32612       if test -f "$VS_BASE/$VCVARSFILE"; then
32613         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32614 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32615         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32616         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32617         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32618         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32619       else
32620         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32621 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32622         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32623 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32624       fi
32625     fi
32626   fi
32627 
32628   fi
32629   # Work around the insanely named ProgramFiles(x86) env variable
32630   PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32631   if test "x$PROGRAMFILES_X86" != x; then
32632 
32633   if test "x$VS_ENV_CMD" = x; then
32634     VS_VERSION="${VS_VERSION}"
32635     VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32636     METHOD="well-known name"
32637 
32638     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32639       VCVARSFILE="vc/bin/vcvars32.bat"
32640     else
32641       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32642     fi
32643 
32644 
32645   windows_path="$VS_BASE"
32646   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32647     unix_path=`$CYGPATH -u "$windows_path"`
32648     VS_BASE="$unix_path"
32649   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32650     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32651     VS_BASE="$unix_path"
32652   fi
32653 
32654     if test -d "$VS_BASE"; then
32655       if test -f "$VS_BASE/$VCVARSFILE"; then
32656         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32657 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32658         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32659         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32660         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32661         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32662       else
32663         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32664 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32665         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32666 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32667       fi
32668     fi
32669   fi
32670 
32671   fi
32672 
32673   if test "x$VS_ENV_CMD" = x; then
32674     VS_VERSION="${VS_VERSION}"
32675     VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32676     METHOD="well-known name"
32677 
32678     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32679       VCVARSFILE="vc/bin/vcvars32.bat"
32680     else
32681       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32682     fi
32683 
32684 
32685   windows_path="$VS_BASE"
32686   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32687     unix_path=`$CYGPATH -u "$windows_path"`
32688     VS_BASE="$unix_path"
32689   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32690     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32691     VS_BASE="$unix_path"
32692   fi
32693 
32694     if test -d "$VS_BASE"; then
32695       if test -f "$VS_BASE/$VCVARSFILE"; then
32696         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32697 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32698         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32699         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32700         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32701         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32702       else
32703         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32704 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32705         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32706 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32707       fi
32708     fi
32709   fi
32710 
32711 
32712   if test "x$VS_ENV_CMD" = x; then
32713     VS_VERSION="${VS_VERSION}"
32714     VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32715     METHOD="well-known name"
32716 
32717     if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32718       VCVARSFILE="vc/bin/vcvars32.bat"
32719     else
32720       VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32721     fi
32722 
32723 
32724   windows_path="$VS_BASE"
32725   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32726     unix_path=`$CYGPATH -u "$windows_path"`
32727     VS_BASE="$unix_path"
32728   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32729     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32730     VS_BASE="$unix_path"
32731   fi
32732 
32733     if test -d "$VS_BASE"; then
32734       if test -f "$VS_BASE/$VCVARSFILE"; then
32735         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32736 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32737         VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32738         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32739         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32740         eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32741       else
32742         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32743 $as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32744         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32745 $as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32746       fi
32747     fi
32748   fi
32749 
32750 
32751   if test "x$SDK_INSTALL_DIR" != x; then
32752     if test "x$ProgramW6432" != x; then
32753 
32754   if test "x$VS_ENV_CMD" = x; then
32755     VS_VERSION="${VS_VERSION}"
32756     WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32757     METHOD="well-known name"
32758 
32759   windows_path="$WIN_SDK_BASE"
32760   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32761     unix_path=`$CYGPATH -u "$windows_path"`
32762     WIN_SDK_BASE="$unix_path"
32763   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32764     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32765     WIN_SDK_BASE="$unix_path"
32766   fi
32767 
32768     if test -d "$WIN_SDK_BASE"; then
32769       # There have been cases of partial or broken SDK installations. A missing
32770       # lib dir is not going to work.
32771       if test ! -d "$WIN_SDK_BASE/lib"; then
32772         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32773 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32774         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32775 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32776       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32777         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32778 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32779         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32780         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32781           VS_ENV_ARGS="/x86"
32782         else
32783           VS_ENV_ARGS="/x64"
32784         fi
32785         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32786         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32787         # TODO: improve detection for other versions of SDK
32788         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32789       else
32790         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32791 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32792         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32793 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32794       fi
32795     fi
32796   fi
32797 
32798     fi
32799     if test "x$PROGRAMW6432" != x; then
32800 
32801   if test "x$VS_ENV_CMD" = x; then
32802     VS_VERSION="${VS_VERSION}"
32803     WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32804     METHOD="well-known name"
32805 
32806   windows_path="$WIN_SDK_BASE"
32807   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32808     unix_path=`$CYGPATH -u "$windows_path"`
32809     WIN_SDK_BASE="$unix_path"
32810   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32811     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32812     WIN_SDK_BASE="$unix_path"
32813   fi
32814 
32815     if test -d "$WIN_SDK_BASE"; then
32816       # There have been cases of partial or broken SDK installations. A missing
32817       # lib dir is not going to work.
32818       if test ! -d "$WIN_SDK_BASE/lib"; then
32819         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32820 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32821         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32822 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32823       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32824         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32825 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32826         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32827         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32828           VS_ENV_ARGS="/x86"
32829         else
32830           VS_ENV_ARGS="/x64"
32831         fi
32832         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32833         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32834         # TODO: improve detection for other versions of SDK
32835         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32836       else
32837         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32838 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32839         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32840 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32841       fi
32842     fi
32843   fi
32844 
32845     fi
32846     if test "x$PROGRAMFILES" != x; then
32847 
32848   if test "x$VS_ENV_CMD" = x; then
32849     VS_VERSION="${VS_VERSION}"
32850     WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32851     METHOD="well-known name"
32852 
32853   windows_path="$WIN_SDK_BASE"
32854   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32855     unix_path=`$CYGPATH -u "$windows_path"`
32856     WIN_SDK_BASE="$unix_path"
32857   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32858     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32859     WIN_SDK_BASE="$unix_path"
32860   fi
32861 
32862     if test -d "$WIN_SDK_BASE"; then
32863       # There have been cases of partial or broken SDK installations. A missing
32864       # lib dir is not going to work.
32865       if test ! -d "$WIN_SDK_BASE/lib"; then
32866         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32867 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32868         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32869 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32870       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32871         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32872 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32873         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32874         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32875           VS_ENV_ARGS="/x86"
32876         else
32877           VS_ENV_ARGS="/x64"
32878         fi
32879         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32880         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32881         # TODO: improve detection for other versions of SDK
32882         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32883       else
32884         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32885 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32886         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32887 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32888       fi
32889     fi
32890   fi
32891 
32892     fi
32893 
32894   if test "x$VS_ENV_CMD" = x; then
32895     VS_VERSION="${VS_VERSION}"
32896     WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32897     METHOD="well-known name"
32898 
32899   windows_path="$WIN_SDK_BASE"
32900   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32901     unix_path=`$CYGPATH -u "$windows_path"`
32902     WIN_SDK_BASE="$unix_path"
32903   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32904     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32905     WIN_SDK_BASE="$unix_path"
32906   fi
32907 
32908     if test -d "$WIN_SDK_BASE"; then
32909       # There have been cases of partial or broken SDK installations. A missing
32910       # lib dir is not going to work.
32911       if test ! -d "$WIN_SDK_BASE/lib"; then
32912         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32913 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32914         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32915 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32916       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32917         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32918 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32919         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32920         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32921           VS_ENV_ARGS="/x86"
32922         else
32923           VS_ENV_ARGS="/x64"
32924         fi
32925         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32926         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32927         # TODO: improve detection for other versions of SDK
32928         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32929       else
32930         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32931 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32932         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32933 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32934       fi
32935     fi
32936   fi
32937 
32938 
32939   if test "x$VS_ENV_CMD" = x; then
32940     VS_VERSION="${VS_VERSION}"
32941     WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32942     METHOD="well-known name"
32943 
32944   windows_path="$WIN_SDK_BASE"
32945   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32946     unix_path=`$CYGPATH -u "$windows_path"`
32947     WIN_SDK_BASE="$unix_path"
32948   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32949     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32950     WIN_SDK_BASE="$unix_path"
32951   fi
32952 
32953     if test -d "$WIN_SDK_BASE"; then
32954       # There have been cases of partial or broken SDK installations. A missing
32955       # lib dir is not going to work.
32956       if test ! -d "$WIN_SDK_BASE/lib"; then
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, lib dir is missing. Ignoring" >&5
32960 $as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32961       elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32962         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32963 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32964         VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32965         if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32966           VS_ENV_ARGS="/x86"
32967         else
32968           VS_ENV_ARGS="/x64"
32969         fi
32970         # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32971         # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32972         # TODO: improve detection for other versions of SDK
32973         eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32974       else
32975         { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32976 $as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32977         { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32978 $as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32979       fi
32980     fi
32981   fi
32982 
32983   fi
32984 
32985     if test "x$VS_ENV_CMD" != x; then
32986       TOOLCHAIN_VERSION=$VS_VERSION
32987       eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32988       eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32989       eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32990       eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32991       # The rest of the variables are already evaled while probing
32992       { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32993 $as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32994       break
32995     fi
32996   done
32997 
32998 
32999   # If we have a devkit, skip all of the below.
33000   if test "x$DEVKIT_VS_VERSION" = x; then
33001     if test "x$VS_ENV_CMD" != x; then
33002       # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
33003 
33004   # Only process if variable expands to non-empty
33005 
33006   if test "x$VS_ENV_CMD" != x; then
33007     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33008 
33009   # First separate the path from the arguments. This will split at the first
33010   # space.
33011   complete="$VS_ENV_CMD"
33012   path="${complete%% *}"
33013   tmp="$complete EOL"
33014   arguments="${tmp#* }"
33015 
33016   # Input might be given as Windows format, start by converting to
33017   # unix format.
33018   new_path=`$CYGPATH -u "$path"`
33019 
33020   # Now try to locate executable using which
33021   new_path=`$WHICH "$new_path" 2> /dev/null`
33022   # bat and cmd files are not always considered executable in cygwin causing which
33023   # to not find them
33024   if test "x$new_path" = x \
33025       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33026       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33027     new_path=`$CYGPATH -u "$path"`
33028   fi
33029   if test "x$new_path" = x; then
33030     # Oops. Which didn't find the executable.
33031     # The splitting of arguments from the executable at a space might have been incorrect,
33032     # since paths with space are more likely in Windows. Give it another try with the whole
33033     # argument.
33034     path="$complete"
33035     arguments="EOL"
33036     new_path=`$CYGPATH -u "$path"`
33037     new_path=`$WHICH "$new_path" 2> /dev/null`
33038     # bat and cmd files are not always considered executable in cygwin causing which
33039     # to not find them
33040     if test "x$new_path" = x \
33041         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33042         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33043       new_path=`$CYGPATH -u "$path"`
33044     fi
33045     if test "x$new_path" = x; then
33046       # It's still not found. Now this is an unrecoverable error.
33047       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33048 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33049       has_space=`$ECHO "$complete" | $GREP " "`
33050       if test "x$has_space" != x; then
33051         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33052 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33053       fi
33054       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33055     fi
33056   fi
33057 
33058   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33059   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33060   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33061   # "foo.exe" is OK but "foo" is an error.
33062   #
33063   # This test is therefore slightly more accurate than "test -f" to check for file presence.
33064   # It is also a way to make sure we got the proper file name for the real test later on.
33065   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33066   if test "x$test_shortpath" = x; then
33067     # Short path failed, file does not exist as specified.
33068     # Try adding .exe or .cmd
33069     if test -f "${new_path}.exe"; then
33070       input_to_shortpath="${new_path}.exe"
33071     elif test -f "${new_path}.cmd"; then
33072       input_to_shortpath="${new_path}.cmd"
33073     else
33074       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
33075 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
33076       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33077 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33078       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33079     fi
33080   else
33081     input_to_shortpath="$new_path"
33082   fi
33083 
33084   # Call helper function which possibly converts this using DOS-style short mode.
33085   # If so, the updated path is stored in $new_path.
33086   new_path="$input_to_shortpath"
33087 
33088   input_path="$input_to_shortpath"
33089   # Check if we need to convert this using DOS-style short mode. If the path
33090   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33091   # take no chances and rewrite it.
33092   # Note: m4 eats our [], so we need to use [ and ] instead.
33093   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33094   if test "x$has_forbidden_chars" != x; then
33095     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33096     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33097     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33098     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33099       # Going to short mode and back again did indeed matter. Since short mode is
33100       # case insensitive, let's make it lowercase to improve readability.
33101       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33102       # Now convert it back to Unix-style (cygpath)
33103       input_path=`$CYGPATH -u "$shortmode_path"`
33104       new_path="$input_path"
33105     fi
33106   fi
33107 
33108   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33109   if test "x$test_cygdrive_prefix" = x; then
33110     # As a simple fix, exclude /usr/bin since it's not a real path.
33111     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33112       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33113       # a path prefixed by /cygdrive for fixpath to work.
33114       new_path="$CYGWIN_ROOT_PATH$input_path"
33115     fi
33116   fi
33117 
33118   # remove trailing .exe if any
33119   new_path="${new_path/%.exe/}"
33120 
33121     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33122 
33123   # First separate the path from the arguments. This will split at the first
33124   # space.
33125   complete="$VS_ENV_CMD"
33126   path="${complete%% *}"
33127   tmp="$complete EOL"
33128   arguments="${tmp#* }"
33129 
33130   # Input might be given as Windows format, start by converting to
33131   # unix format.
33132   new_path="$path"
33133 
33134   windows_path="$new_path"
33135   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33136     unix_path=`$CYGPATH -u "$windows_path"`
33137     new_path="$unix_path"
33138   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33139     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33140     new_path="$unix_path"
33141   fi
33142 
33143 
33144   # Now try to locate executable using which
33145   new_path=`$WHICH "$new_path" 2> /dev/null`
33146 
33147   if test "x$new_path" = x; then
33148     # Oops. Which didn't find the executable.
33149     # The splitting of arguments from the executable at a space might have been incorrect,
33150     # since paths with space are more likely in Windows. Give it another try with the whole
33151     # argument.
33152     path="$complete"
33153     arguments="EOL"
33154     new_path="$path"
33155 
33156   windows_path="$new_path"
33157   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33158     unix_path=`$CYGPATH -u "$windows_path"`
33159     new_path="$unix_path"
33160   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33161     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33162     new_path="$unix_path"
33163   fi
33164 
33165 
33166     new_path=`$WHICH "$new_path" 2> /dev/null`
33167     # bat and cmd files are not always considered executable in MSYS causing which
33168     # to not find them
33169     if test "x$new_path" = x \
33170         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33171         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33172       new_path="$path"
33173 
33174   windows_path="$new_path"
33175   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33176     unix_path=`$CYGPATH -u "$windows_path"`
33177     new_path="$unix_path"
33178   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33179     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33180     new_path="$unix_path"
33181   fi
33182 
33183     fi
33184 
33185     if test "x$new_path" = x; then
33186       # It's still not found. Now this is an unrecoverable error.
33187       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33188 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33189       has_space=`$ECHO "$complete" | $GREP " "`
33190       if test "x$has_space" != x; then
33191         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33192 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33193       fi
33194       as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33195     fi
33196   fi
33197 
33198   # Now new_path has a complete unix path to the binary
33199   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33200     # Keep paths in /bin as-is, but remove trailing .exe if any
33201     new_path="${new_path/%.exe/}"
33202     # Do not save /bin paths to all_fixpath_prefixes!
33203   else
33204     # Not in mixed or Windows style, start by that.
33205     new_path=`cmd //c echo $new_path`
33206 
33207   input_path="$new_path"
33208   # Check if we need to convert this using DOS-style short mode. If the path
33209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33210   # take no chances and rewrite it.
33211   # Note: m4 eats our [], so we need to use [ and ] instead.
33212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33213   if test "x$has_forbidden_chars" != x; then
33214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33215     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33216   fi
33217 
33218     # Output is in $new_path
33219 
33220   windows_path="$new_path"
33221   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33222     unix_path=`$CYGPATH -u "$windows_path"`
33223     new_path="$unix_path"
33224   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33225     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33226     new_path="$unix_path"
33227   fi
33228 
33229     # remove trailing .exe if any
33230     new_path="${new_path/%.exe/}"
33231 
33232     # Save the first 10 bytes of this path to the storage, so fixpath can work.
33233     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33234   fi
33235 
33236     else
33237       # We're on a unix platform. Hooray! :)
33238       # First separate the path from the arguments. This will split at the first
33239       # space.
33240       complete="$VS_ENV_CMD"
33241       path="${complete%% *}"
33242       tmp="$complete EOL"
33243       arguments="${tmp#* }"
33244 
33245       # Cannot rely on the command "which" here since it doesn't always work.
33246       is_absolute_path=`$ECHO "$path" | $GREP ^/`
33247       if test -z "$is_absolute_path"; then
33248         # Path to executable is not absolute. Find it.
33249         IFS_save="$IFS"
33250         IFS=:
33251         for p in $PATH; do
33252           if test -f "$p/$path" && test -x "$p/$path"; then
33253             new_path="$p/$path"
33254             break
33255           fi
33256         done
33257         IFS="$IFS_save"
33258       else
33259         # This is an absolute path, we can use it without further modifications.
33260         new_path="$path"
33261       fi
33262 
33263       if test "x$new_path" = x; then
33264         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
33265 $as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
33266         has_space=`$ECHO "$complete" | $GREP " "`
33267         if test "x$has_space" != x; then
33268           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33269 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33270         fi
33271         as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
33272       fi
33273     fi
33274 
33275     # Now join together the path and the arguments once again
33276     if test "x$arguments" != xEOL; then
33277       new_complete="$new_path ${arguments% *}"
33278     else
33279       new_complete="$new_path"
33280     fi
33281 
33282     if test "x$complete" != "x$new_complete"; then
33283       VS_ENV_CMD="$new_complete"
33284       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
33285 $as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
33286     fi
33287   fi
33288 
33289 
33290       # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
33291       { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
33292 $as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
33293 
33294       # We need to create a couple of temporary files.
33295       VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
33296       $MKDIR -p $VS_ENV_TMP_DIR
33297 
33298       # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
33299       # Instead create a shell script which will set the relevant variables when run.
33300       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
33301 
33302   unix_path="$WINPATH_VS_ENV_CMD"
33303   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33304     windows_path=`$CYGPATH -m "$unix_path"`
33305     WINPATH_VS_ENV_CMD="$windows_path"
33306   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33307     windows_path=`cmd //c echo $unix_path`
33308     WINPATH_VS_ENV_CMD="$windows_path"
33309   fi
33310 
33311       WINPATH_BASH="$BASH"
33312 
33313   unix_path="$WINPATH_BASH"
33314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33315     windows_path=`$CYGPATH -m "$unix_path"`
33316     WINPATH_BASH="$windows_path"
33317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33318     windows_path=`cmd //c echo $unix_path`
33319     WINPATH_BASH="$windows_path"
33320   fi
33321 
33322 
33323       # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
33324       # script (executable by bash) that will setup the important variables.
33325       EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
33326       $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
33327       # This will end up something like:
33328       # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
33329       $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
33330       # These will end up something like:
33331       # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
33332       # The trailing space for everyone except PATH is no typo, but is needed due
33333       # to trailing \ in the Windows paths. These will be stripped later.
33334       $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
33335           >> $EXTRACT_VC_ENV_BAT_FILE
33336       $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
33337           >> $EXTRACT_VC_ENV_BAT_FILE
33338       $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
33339           >> $EXTRACT_VC_ENV_BAT_FILE
33340       $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
33341           >> $EXTRACT_VC_ENV_BAT_FILE
33342       $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
33343           >> $EXTRACT_VC_ENV_BAT_FILE
33344       $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
33345           >> $EXTRACT_VC_ENV_BAT_FILE
33346 
33347       # Now execute the newly created bat file.
33348       # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
33349       # Change directory so we don't need to mess with Windows paths in redirects.
33350       cd $VS_ENV_TMP_DIR
33351       cmd /c extract-vs-env.bat | $CAT
33352       cd $CURDIR
33353 
33354       if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
33355         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
33356 $as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
33357         { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33358 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33359         { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33360 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33361         as_fn_error $? "Cannot continue" "$LINENO" 5
33362       fi
33363 
33364       # Now set all paths and other env variables. This will allow the rest of
33365       # the configure script to find and run the compiler in the proper way.
33366       { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
33367 $as_echo "$as_me: Setting extracted environment variables" >&6;}
33368       . $VS_ENV_TMP_DIR/set-vs-env.sh
33369       # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
33370       # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
33371     else
33372       # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
33373       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
33374 $as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
33375     fi
33376   fi
33377 
33378   # At this point, we should have correct variables in the environment, or we can't continue.
33379   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
33380 $as_echo_n "checking for Visual Studio variables... " >&6; }
33381 
33382   if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
33383       || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
33384     if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
33385       { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
33386 $as_echo "present but broken" >&6; }
33387       as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
33388     else
33389       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
33390 $as_echo "ok" >&6; }
33391       # Remove any trailing "\" ";" and " " from the variables.
33392       VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
33393       VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
33394       VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
33395       WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
33396       WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
33397       # Remove any paths containing # (typically F#) as that messes up make. This
33398       # is needed if visual studio was installed with F# support.
33399       VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
33400 
33401 
33402 
33403 
33404 
33405       # Convert VS_INCLUDE into SYSROOT_CFLAGS
33406       OLDIFS="$IFS"
33407       IFS=";"
33408       for i in $VS_INCLUDE; do
33409         ipath=$i
33410         # Only process non-empty elements
33411         if test "x$ipath" != x; then
33412           IFS="$OLDIFS"
33413           # Check that directory exists before calling fixup_path
33414           testpath=$ipath
33415 
33416   windows_path="$testpath"
33417   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33418     unix_path=`$CYGPATH -u "$windows_path"`
33419     testpath="$unix_path"
33420   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33421     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33422     testpath="$unix_path"
33423   fi
33424 
33425           if test -d "$testpath"; then
33426 
33427   # Only process if variable expands to non-empty
33428 
33429   if test "x$ipath" != x; then
33430     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33431 
33432   # Input might be given as Windows format, start by converting to
33433   # unix format.
33434   path="$ipath"
33435   new_path=`$CYGPATH -u "$path"`
33436 
33437   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33438   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33439   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33440   # "foo.exe" is OK but "foo" is an error.
33441   #
33442   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33443   # It is also a way to make sure we got the proper file name for the real test later on.
33444   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33445   if test "x$test_shortpath" = x; then
33446     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33447 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33448     as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
33449   fi
33450 
33451   # Call helper function which possibly converts this using DOS-style short mode.
33452   # If so, the updated path is stored in $new_path.
33453 
33454   input_path="$new_path"
33455   # Check if we need to convert this using DOS-style short mode. If the path
33456   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33457   # take no chances and rewrite it.
33458   # Note: m4 eats our [], so we need to use [ and ] instead.
33459   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33460   if test "x$has_forbidden_chars" != x; then
33461     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33462     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33463     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33464     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33465       # Going to short mode and back again did indeed matter. Since short mode is
33466       # case insensitive, let's make it lowercase to improve readability.
33467       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33468       # Now convert it back to Unix-style (cygpath)
33469       input_path=`$CYGPATH -u "$shortmode_path"`
33470       new_path="$input_path"
33471     fi
33472   fi
33473 
33474   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33475   if test "x$test_cygdrive_prefix" = x; then
33476     # As a simple fix, exclude /usr/bin since it's not a real path.
33477     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33478       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33479       # a path prefixed by /cygdrive for fixpath to work.
33480       new_path="$CYGWIN_ROOT_PATH$input_path"
33481     fi
33482   fi
33483 
33484 
33485   if test "x$path" != "x$new_path"; then
33486     ipath="$new_path"
33487     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33488 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33489   fi
33490 
33491     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33492 
33493   path="$ipath"
33494   has_colon=`$ECHO $path | $GREP ^.:`
33495   new_path="$path"
33496   if test "x$has_colon" = x; then
33497     # Not in mixed or Windows style, start by that.
33498     new_path=`cmd //c echo $path`
33499   fi
33500 
33501 
33502   input_path="$new_path"
33503   # Check if we need to convert this using DOS-style short mode. If the path
33504   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33505   # take no chances and rewrite it.
33506   # Note: m4 eats our [], so we need to use [ and ] instead.
33507   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33508   if test "x$has_forbidden_chars" != x; then
33509     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33510     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33511   fi
33512 
33513 
33514   windows_path="$new_path"
33515   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33516     unix_path=`$CYGPATH -u "$windows_path"`
33517     new_path="$unix_path"
33518   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33519     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33520     new_path="$unix_path"
33521   fi
33522 
33523   if test "x$path" != "x$new_path"; then
33524     ipath="$new_path"
33525     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
33526 $as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
33527   fi
33528 
33529   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33530   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33531 
33532     else
33533       # We're on a unix platform. Hooray! :)
33534       path="$ipath"
33535       has_space=`$ECHO "$path" | $GREP " "`
33536       if test "x$has_space" != x; then
33537         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
33538 $as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
33539         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33540       fi
33541 
33542       # Use eval to expand a potential ~
33543       eval path="$path"
33544       if test ! -f "$path" && test ! -d "$path"; then
33545         as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
33546       fi
33547 
33548       if test -d "$path"; then
33549         ipath="`cd "$path"; $THEPWDCMD -L`"
33550       else
33551         dir="`$DIRNAME "$path"`"
33552         base="`$BASENAME "$path"`"
33553         ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33554       fi
33555     fi
33556   fi
33557 
33558             SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33559           fi
33560           IFS=";"
33561         fi
33562       done
33563       # Convert VS_LIB into SYSROOT_LDFLAGS
33564       for i in $VS_LIB; do
33565         libpath=$i
33566         # Only process non-empty elements
33567         if test "x$libpath" != x; then
33568           IFS="$OLDIFS"
33569           # Check that directory exists before calling fixup_path
33570           testpath=$libpath
33571 
33572   windows_path="$testpath"
33573   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33574     unix_path=`$CYGPATH -u "$windows_path"`
33575     testpath="$unix_path"
33576   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33577     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33578     testpath="$unix_path"
33579   fi
33580 
33581           if test -d "$testpath"; then
33582 
33583   # Only process if variable expands to non-empty
33584 
33585   if test "x$libpath" != x; then
33586     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33587 
33588   # Input might be given as Windows format, start by converting to
33589   # unix format.
33590   path="$libpath"
33591   new_path=`$CYGPATH -u "$path"`
33592 
33593   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33594   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33595   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33596   # "foo.exe" is OK but "foo" is an error.
33597   #
33598   # This test is therefore slightly more accurate than "test -f" to check for file precense.
33599   # It is also a way to make sure we got the proper file name for the real test later on.
33600   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33601   if test "x$test_shortpath" = x; then
33602     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33603 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33604     as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33605   fi
33606 
33607   # Call helper function which possibly converts this using DOS-style short mode.
33608   # If so, the updated path is stored in $new_path.
33609 
33610   input_path="$new_path"
33611   # Check if we need to convert this using DOS-style short mode. If the path
33612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33613   # take no chances and rewrite it.
33614   # Note: m4 eats our [], so we need to use [ and ] instead.
33615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33616   if test "x$has_forbidden_chars" != x; then
33617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33618     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33619     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33620     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33621       # Going to short mode and back again did indeed matter. Since short mode is
33622       # case insensitive, let's make it lowercase to improve readability.
33623       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33624       # Now convert it back to Unix-style (cygpath)
33625       input_path=`$CYGPATH -u "$shortmode_path"`
33626       new_path="$input_path"
33627     fi
33628   fi
33629 
33630   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33631   if test "x$test_cygdrive_prefix" = x; then
33632     # As a simple fix, exclude /usr/bin since it's not a real path.
33633     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33634       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33635       # a path prefixed by /cygdrive for fixpath to work.
33636       new_path="$CYGWIN_ROOT_PATH$input_path"
33637     fi
33638   fi
33639 
33640 
33641   if test "x$path" != "x$new_path"; then
33642     libpath="$new_path"
33643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33644 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33645   fi
33646 
33647     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33648 
33649   path="$libpath"
33650   has_colon=`$ECHO $path | $GREP ^.:`
33651   new_path="$path"
33652   if test "x$has_colon" = x; then
33653     # Not in mixed or Windows style, start by that.
33654     new_path=`cmd //c echo $path`
33655   fi
33656 
33657 
33658   input_path="$new_path"
33659   # Check if we need to convert this using DOS-style short mode. If the path
33660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
33661   # take no chances and rewrite it.
33662   # Note: m4 eats our [], so we need to use [ and ] instead.
33663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33664   if test "x$has_forbidden_chars" != x; then
33665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33667   fi
33668 
33669 
33670   windows_path="$new_path"
33671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33672     unix_path=`$CYGPATH -u "$windows_path"`
33673     new_path="$unix_path"
33674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33676     new_path="$unix_path"
33677   fi
33678 
33679   if test "x$path" != "x$new_path"; then
33680     libpath="$new_path"
33681     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33682 $as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33683   fi
33684 
33685   # Save the first 10 bytes of this path to the storage, so fixpath can work.
33686   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33687 
33688     else
33689       # We're on a unix platform. Hooray! :)
33690       path="$libpath"
33691       has_space=`$ECHO "$path" | $GREP " "`
33692       if test "x$has_space" != x; then
33693         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33694 $as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33695         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33696       fi
33697 
33698       # Use eval to expand a potential ~
33699       eval path="$path"
33700       if test ! -f "$path" && test ! -d "$path"; then
33701         as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33702       fi
33703 
33704       if test -d "$path"; then
33705         libpath="`cd "$path"; $THEPWDCMD -L`"
33706       else
33707         dir="`$DIRNAME "$path"`"
33708         base="`$BASENAME "$path"`"
33709         libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33710       fi
33711     fi
33712   fi
33713 
33714             SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33715           fi
33716           IFS=";"
33717         fi
33718       done
33719       IFS="$OLDIFS"
33720     fi
33721   else
33722     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33723 $as_echo "not found" >&6; }
33724 
33725     if test "x$VS_ENV_CMD" = x; then
33726       { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33727 $as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33728       { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33729 $as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33730     else
33731       { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33732 $as_echo "$as_me: Running the extraction script failed." >&6;}
33733     fi
33734     { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33735 $as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33736     { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33737 $as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33738     as_fn_error $? "Cannot continue" "$LINENO" 5
33739   fi
33740 
33741     # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33742     # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33743     PATH="$VS_PATH"
33744     # The microsoft toolchain also requires INCLUDE and LIB to be set.
33745     export INCLUDE="$VS_INCLUDE"
33746     export LIB="$VS_LIB"
33747   else
33748     if test "x$XCODE_VERSION_OUTPUT" != x; then
33749       # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33750       TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33751       TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33752     else
33753       # Currently we do not define this for other toolchains. This might change as the need arise.
33754       TOOLCHAIN_VERSION=
33755     fi
33756   fi
33757 
33758 
33759   # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33760   # override all other locations.
33761   if test "x$TOOLCHAIN_PATH" != x; then
33762     PATH=$TOOLCHAIN_PATH:$PATH
33763   fi
33764 
33765 
33766   #
33767   # Setup the compilers (CC and CXX)
33768   #
33769 
33770   COMPILER_NAME=C
33771   SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33772 
33773   if test "x$CC" != x; then
33774     # User has supplied compiler name already, always let that override.
33775     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33776 $as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33777     if test "x`basename $CC`" = "x$CC"; then
33778       # A command without a complete path is provided, search $PATH.
33779 
33780       for ac_prog in $CC
33781 do
33782   # Extract the first word of "$ac_prog", so it can be a program name with args.
33783 set dummy $ac_prog; ac_word=$2
33784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33785 $as_echo_n "checking for $ac_word... " >&6; }
33786 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33787   $as_echo_n "(cached) " >&6
33788 else
33789   case $POTENTIAL_CC in
33790   [\\/]* | ?:[\\/]*)
33791   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33792   ;;
33793   *)
33794   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33795 for as_dir in $PATH
33796 do
33797   IFS=$as_save_IFS
33798   test -z "$as_dir" && as_dir=.
33799     for ac_exec_ext in '' $ac_executable_extensions; do
33800   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33801     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33802     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33803     break 2
33804   fi
33805 done
33806   done
33807 IFS=$as_save_IFS
33808 
33809   ;;
33810 esac
33811 fi
33812 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33813 if test -n "$POTENTIAL_CC"; then
33814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33815 $as_echo "$POTENTIAL_CC" >&6; }
33816 else
33817   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33818 $as_echo "no" >&6; }
33819 fi
33820 
33821 
33822   test -n "$POTENTIAL_CC" && break
33823 done
33824 
33825       if test "x$POTENTIAL_CC" != x; then
33826         CC=$POTENTIAL_CC
33827       else
33828         as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33829       fi
33830     else
33831       # Otherwise it might already be a complete path
33832       if test ! -x "$CC"; then
33833         as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33834       fi
33835     fi
33836   else
33837     # No user supplied value. Locate compiler ourselves.
33838 
33839     # If we are cross compiling, assume cross compilation tools follows the
33840     # cross compilation standard where they are prefixed with the autoconf
33841     # standard name for the target. For example the binary
33842     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33843     # If we are not cross compiling, then the default compiler name will be
33844     # used.
33845 
33846     CC=
33847     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33848     # before checking the rest of the PATH.
33849     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33850     # step, this should not be necessary.
33851     if test -n "$TOOLCHAIN_PATH"; then
33852       PATH_save="$PATH"
33853       PATH="$TOOLCHAIN_PATH"
33854       if test -n "$ac_tool_prefix"; then
33855   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33856 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33858 $as_echo_n "checking for $ac_word... " >&6; }
33859 if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33860   $as_echo_n "(cached) " >&6
33861 else
33862   case $TOOLCHAIN_PATH_CC in
33863   [\\/]* | ?:[\\/]*)
33864   ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33865   ;;
33866   *)
33867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33868 for as_dir in $PATH
33869 do
33870   IFS=$as_save_IFS
33871   test -z "$as_dir" && as_dir=.
33872     for ac_exec_ext in '' $ac_executable_extensions; do
33873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33874     ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33876     break 2
33877   fi
33878 done
33879   done
33880 IFS=$as_save_IFS
33881 
33882   ;;
33883 esac
33884 fi
33885 TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33886 if test -n "$TOOLCHAIN_PATH_CC"; then
33887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33888 $as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33889 else
33890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33891 $as_echo "no" >&6; }
33892 fi
33893 
33894 
33895 fi
33896 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33897   ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33898   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33899 set dummy $SEARCH_LIST; ac_word=$2
33900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33901 $as_echo_n "checking for $ac_word... " >&6; }
33902 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33903   $as_echo_n "(cached) " >&6
33904 else
33905   case $ac_pt_TOOLCHAIN_PATH_CC in
33906   [\\/]* | ?:[\\/]*)
33907   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33908   ;;
33909   *)
33910   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33911 for as_dir in $PATH
33912 do
33913   IFS=$as_save_IFS
33914   test -z "$as_dir" && as_dir=.
33915     for ac_exec_ext in '' $ac_executable_extensions; do
33916   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33917     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33918     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33919     break 2
33920   fi
33921 done
33922   done
33923 IFS=$as_save_IFS
33924 
33925   ;;
33926 esac
33927 fi
33928 ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33929 if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33930   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33931 $as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33932 else
33933   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33934 $as_echo "no" >&6; }
33935 fi
33936 
33937   if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33938     TOOLCHAIN_PATH_CC=""
33939   else
33940     case $cross_compiling:$ac_tool_warned in
33941 yes:)
33942 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33943 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33944 ac_tool_warned=yes ;;
33945 esac
33946     TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33947   fi
33948 else
33949   TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33950 fi
33951 
33952       CC=$TOOLCHAIN_PATH_CC
33953       PATH="$PATH_save"
33954     fi
33955 
33956     # AC_PATH_TOOL can't be run multiple times with the same variable,
33957     # so create a new name for this run.
33958     if test "x$CC" = x; then
33959       if test -n "$ac_tool_prefix"; then
33960   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33961 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33963 $as_echo_n "checking for $ac_word... " >&6; }
33964 if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33965   $as_echo_n "(cached) " >&6
33966 else
33967   case $POTENTIAL_CC in
33968   [\\/]* | ?:[\\/]*)
33969   ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33970   ;;
33971   *)
33972   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33973 for as_dir in $PATH
33974 do
33975   IFS=$as_save_IFS
33976   test -z "$as_dir" && as_dir=.
33977     for ac_exec_ext in '' $ac_executable_extensions; do
33978   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33979     ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33980     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33981     break 2
33982   fi
33983 done
33984   done
33985 IFS=$as_save_IFS
33986 
33987   ;;
33988 esac
33989 fi
33990 POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33991 if test -n "$POTENTIAL_CC"; then
33992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33993 $as_echo "$POTENTIAL_CC" >&6; }
33994 else
33995   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33996 $as_echo "no" >&6; }
33997 fi
33998 
33999 
34000 fi
34001 if test -z "$ac_cv_path_POTENTIAL_CC"; then
34002   ac_pt_POTENTIAL_CC=$POTENTIAL_CC
34003   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34004 set dummy $SEARCH_LIST; ac_word=$2
34005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34006 $as_echo_n "checking for $ac_word... " >&6; }
34007 if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
34008   $as_echo_n "(cached) " >&6
34009 else
34010   case $ac_pt_POTENTIAL_CC in
34011   [\\/]* | ?:[\\/]*)
34012   ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
34013   ;;
34014   *)
34015   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34016 for as_dir in $PATH
34017 do
34018   IFS=$as_save_IFS
34019   test -z "$as_dir" && as_dir=.
34020     for ac_exec_ext in '' $ac_executable_extensions; do
34021   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34022     ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
34023     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34024     break 2
34025   fi
34026 done
34027   done
34028 IFS=$as_save_IFS
34029 
34030   ;;
34031 esac
34032 fi
34033 ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
34034 if test -n "$ac_pt_POTENTIAL_CC"; then
34035   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
34036 $as_echo "$ac_pt_POTENTIAL_CC" >&6; }
34037 else
34038   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34039 $as_echo "no" >&6; }
34040 fi
34041 
34042   if test "x$ac_pt_POTENTIAL_CC" = x; then
34043     POTENTIAL_CC=""
34044   else
34045     case $cross_compiling:$ac_tool_warned in
34046 yes:)
34047 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34048 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34049 ac_tool_warned=yes ;;
34050 esac
34051     POTENTIAL_CC=$ac_pt_POTENTIAL_CC
34052   fi
34053 else
34054   POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
34055 fi
34056 
34057       CC=$POTENTIAL_CC
34058     fi
34059 
34060     if test "x$CC" = x; then
34061 
34062   # Print a helpful message on how to acquire the necessary build dependency.
34063   # devkit is the help tag: freetype, cups, alsa etc
34064   MISSING_DEPENDENCY=devkit
34065 
34066   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34067     cygwin_help $MISSING_DEPENDENCY
34068   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34069     msys_help $MISSING_DEPENDENCY
34070   else
34071     PKGHANDLER_COMMAND=
34072 
34073     case $PKGHANDLER in
34074       apt-get)
34075         apt_help     $MISSING_DEPENDENCY ;;
34076       yum)
34077         yum_help     $MISSING_DEPENDENCY ;;
34078       brew)
34079         brew_help    $MISSING_DEPENDENCY ;;
34080       port)
34081         port_help    $MISSING_DEPENDENCY ;;
34082       pkgutil)
34083         pkgutil_help $MISSING_DEPENDENCY ;;
34084       pkgadd)
34085         pkgadd_help  $MISSING_DEPENDENCY ;;
34086     esac
34087 
34088     if test "x$PKGHANDLER_COMMAND" != x; then
34089       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34090     fi
34091   fi
34092 
34093       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34094     fi
34095   fi
34096 
34097   # Now we have a compiler binary in CC. Make sure it's okay.
34098 
34099   # Only process if variable expands to non-empty
34100 
34101   if test "x$CC" != x; then
34102     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34103 
34104   # First separate the path from the arguments. This will split at the first
34105   # space.
34106   complete="$CC"
34107   path="${complete%% *}"
34108   tmp="$complete EOL"
34109   arguments="${tmp#* }"
34110 
34111   # Input might be given as Windows format, start by converting to
34112   # unix format.
34113   new_path=`$CYGPATH -u "$path"`
34114 
34115   # Now try to locate executable using which
34116   new_path=`$WHICH "$new_path" 2> /dev/null`
34117   # bat and cmd files are not always considered executable in cygwin causing which
34118   # to not find them
34119   if test "x$new_path" = x \
34120       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34121       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34122     new_path=`$CYGPATH -u "$path"`
34123   fi
34124   if test "x$new_path" = x; then
34125     # Oops. Which didn't find the executable.
34126     # The splitting of arguments from the executable at a space might have been incorrect,
34127     # since paths with space are more likely in Windows. Give it another try with the whole
34128     # argument.
34129     path="$complete"
34130     arguments="EOL"
34131     new_path=`$CYGPATH -u "$path"`
34132     new_path=`$WHICH "$new_path" 2> /dev/null`
34133     # bat and cmd files are not always considered executable in cygwin causing which
34134     # to not find them
34135     if test "x$new_path" = x \
34136         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34137         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34138       new_path=`$CYGPATH -u "$path"`
34139     fi
34140     if test "x$new_path" = x; then
34141       # It's still not found. Now this is an unrecoverable error.
34142       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34143 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34144       has_space=`$ECHO "$complete" | $GREP " "`
34145       if test "x$has_space" != x; then
34146         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34147 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34148       fi
34149       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34150     fi
34151   fi
34152 
34153   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34154   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34155   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34156   # "foo.exe" is OK but "foo" is an error.
34157   #
34158   # This test is therefore slightly more accurate than "test -f" to check for file presence.
34159   # It is also a way to make sure we got the proper file name for the real test later on.
34160   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34161   if test "x$test_shortpath" = x; then
34162     # Short path failed, file does not exist as specified.
34163     # Try adding .exe or .cmd
34164     if test -f "${new_path}.exe"; then
34165       input_to_shortpath="${new_path}.exe"
34166     elif test -f "${new_path}.cmd"; then
34167       input_to_shortpath="${new_path}.cmd"
34168     else
34169       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
34170 $as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
34171       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34172 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34173       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34174     fi
34175   else
34176     input_to_shortpath="$new_path"
34177   fi
34178 
34179   # Call helper function which possibly converts this using DOS-style short mode.
34180   # If so, the updated path is stored in $new_path.
34181   new_path="$input_to_shortpath"
34182 
34183   input_path="$input_to_shortpath"
34184   # Check if we need to convert this using DOS-style short mode. If the path
34185   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34186   # take no chances and rewrite it.
34187   # Note: m4 eats our [], so we need to use [ and ] instead.
34188   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34189   if test "x$has_forbidden_chars" != x; then
34190     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34191     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34192     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34193     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34194       # Going to short mode and back again did indeed matter. Since short mode is
34195       # case insensitive, let's make it lowercase to improve readability.
34196       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34197       # Now convert it back to Unix-style (cygpath)
34198       input_path=`$CYGPATH -u "$shortmode_path"`
34199       new_path="$input_path"
34200     fi
34201   fi
34202 
34203   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34204   if test "x$test_cygdrive_prefix" = x; then
34205     # As a simple fix, exclude /usr/bin since it's not a real path.
34206     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34207       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34208       # a path prefixed by /cygdrive for fixpath to work.
34209       new_path="$CYGWIN_ROOT_PATH$input_path"
34210     fi
34211   fi
34212 
34213   # remove trailing .exe if any
34214   new_path="${new_path/%.exe/}"
34215 
34216     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34217 
34218   # First separate the path from the arguments. This will split at the first
34219   # space.
34220   complete="$CC"
34221   path="${complete%% *}"
34222   tmp="$complete EOL"
34223   arguments="${tmp#* }"
34224 
34225   # Input might be given as Windows format, start by converting to
34226   # unix format.
34227   new_path="$path"
34228 
34229   windows_path="$new_path"
34230   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34231     unix_path=`$CYGPATH -u "$windows_path"`
34232     new_path="$unix_path"
34233   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34234     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34235     new_path="$unix_path"
34236   fi
34237 
34238 
34239   # Now try to locate executable using which
34240   new_path=`$WHICH "$new_path" 2> /dev/null`
34241 
34242   if test "x$new_path" = x; then
34243     # Oops. Which didn't find the executable.
34244     # The splitting of arguments from the executable at a space might have been incorrect,
34245     # since paths with space are more likely in Windows. Give it another try with the whole
34246     # argument.
34247     path="$complete"
34248     arguments="EOL"
34249     new_path="$path"
34250 
34251   windows_path="$new_path"
34252   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34253     unix_path=`$CYGPATH -u "$windows_path"`
34254     new_path="$unix_path"
34255   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34256     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34257     new_path="$unix_path"
34258   fi
34259 
34260 
34261     new_path=`$WHICH "$new_path" 2> /dev/null`
34262     # bat and cmd files are not always considered executable in MSYS causing which
34263     # to not find them
34264     if test "x$new_path" = x \
34265         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34266         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34267       new_path="$path"
34268 
34269   windows_path="$new_path"
34270   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34271     unix_path=`$CYGPATH -u "$windows_path"`
34272     new_path="$unix_path"
34273   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34274     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34275     new_path="$unix_path"
34276   fi
34277 
34278     fi
34279 
34280     if test "x$new_path" = x; then
34281       # It's still not found. Now this is an unrecoverable error.
34282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34283 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34284       has_space=`$ECHO "$complete" | $GREP " "`
34285       if test "x$has_space" != x; then
34286         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34287 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34288       fi
34289       as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34290     fi
34291   fi
34292 
34293   # Now new_path has a complete unix path to the binary
34294   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34295     # Keep paths in /bin as-is, but remove trailing .exe if any
34296     new_path="${new_path/%.exe/}"
34297     # Do not save /bin paths to all_fixpath_prefixes!
34298   else
34299     # Not in mixed or Windows style, start by that.
34300     new_path=`cmd //c echo $new_path`
34301 
34302   input_path="$new_path"
34303   # Check if we need to convert this using DOS-style short mode. If the path
34304   # contains just simple characters, use it. Otherwise (spaces, weird characters),
34305   # take no chances and rewrite it.
34306   # Note: m4 eats our [], so we need to use [ and ] instead.
34307   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34308   if test "x$has_forbidden_chars" != x; then
34309     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34310     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34311   fi
34312 
34313     # Output is in $new_path
34314 
34315   windows_path="$new_path"
34316   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34317     unix_path=`$CYGPATH -u "$windows_path"`
34318     new_path="$unix_path"
34319   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34320     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34321     new_path="$unix_path"
34322   fi
34323 
34324     # remove trailing .exe if any
34325     new_path="${new_path/%.exe/}"
34326 
34327     # Save the first 10 bytes of this path to the storage, so fixpath can work.
34328     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34329   fi
34330 
34331     else
34332       # We're on a unix platform. Hooray! :)
34333       # First separate the path from the arguments. This will split at the first
34334       # space.
34335       complete="$CC"
34336       path="${complete%% *}"
34337       tmp="$complete EOL"
34338       arguments="${tmp#* }"
34339 
34340       # Cannot rely on the command "which" here since it doesn't always work.
34341       is_absolute_path=`$ECHO "$path" | $GREP ^/`
34342       if test -z "$is_absolute_path"; then
34343         # Path to executable is not absolute. Find it.
34344         IFS_save="$IFS"
34345         IFS=:
34346         for p in $PATH; do
34347           if test -f "$p/$path" && test -x "$p/$path"; then
34348             new_path="$p/$path"
34349             break
34350           fi
34351         done
34352         IFS="$IFS_save"
34353       else
34354         # This is an absolute path, we can use it without further modifications.
34355         new_path="$path"
34356       fi
34357 
34358       if test "x$new_path" = x; then
34359         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
34360 $as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
34361         has_space=`$ECHO "$complete" | $GREP " "`
34362         if test "x$has_space" != x; then
34363           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34364 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34365         fi
34366         as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
34367       fi
34368     fi
34369 
34370     # Now join together the path and the arguments once again
34371     if test "x$arguments" != xEOL; then
34372       new_complete="$new_path ${arguments% *}"
34373     else
34374       new_complete="$new_path"
34375     fi
34376 
34377     if test "x$complete" != "x$new_complete"; then
34378       CC="$new_complete"
34379       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
34380 $as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
34381     fi
34382   fi
34383 
34384   TEST_COMPILER="$CC"
34385 
34386   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
34387 $as_echo_n "checking resolved symbolic links for CC... " >&6; }
34388   SYMLINK_ORIGINAL="$TEST_COMPILER"
34389 
34390   if test "x$OPENJDK_BUILD_OS" != xwindows; then
34391     # Follow a chain of symbolic links. Use readlink
34392     # where it exists, else fall back to horribly
34393     # complicated shell code.
34394     if test "x$READLINK_TESTED" != yes; then
34395       # On MacOSX there is a readlink tool with a different
34396       # purpose than the GNU readlink tool. Check the found readlink.
34397       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34398       if test "x$ISGNU" = x; then
34399         # A readlink that we do not know how to use.
34400         # Are there other non-GNU readlinks out there?
34401         READLINK_TESTED=yes
34402         READLINK=
34403       fi
34404     fi
34405 
34406     if test "x$READLINK" != x; then
34407       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34408     else
34409       # Save the current directory for restoring afterwards
34410       STARTDIR=$PWD
34411       COUNTER=0
34412       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34413       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34414       cd $sym_link_dir
34415       # Use -P flag to resolve symlinks in directories.
34416       cd `$THEPWDCMD -P`
34417       sym_link_dir=`$THEPWDCMD -P`
34418       # Resolve file symlinks
34419       while test $COUNTER -lt 20; do
34420         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34421         if test "x$ISLINK" == x; then
34422           # This is not a symbolic link! We are done!
34423           break
34424         fi
34425         # Again resolve directory symlinks since the target of the just found
34426         # link could be in a different directory
34427         cd `$DIRNAME $ISLINK`
34428         sym_link_dir=`$THEPWDCMD -P`
34429         sym_link_file=`$BASENAME $ISLINK`
34430         let COUNTER=COUNTER+1
34431       done
34432       cd $STARTDIR
34433       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34434     fi
34435   fi
34436 
34437   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34438     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34439 $as_echo "no symlink" >&6; }
34440   else
34441     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34442 $as_echo "$SYMLINK_ORIGINAL" >&6; }
34443 
34444     # We can't handle ccache by gcc wrappers, since we need to know if we're
34445     # using ccache. Instead ccache usage must be controlled by a configure option.
34446     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34447     if test "x$COMPILER_BASENAME" = "xccache"; then
34448       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34449 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34450       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34451     fi
34452   fi
34453 
34454 
34455   COMPILER=$CC
34456   COMPILER_NAME=$COMPILER_NAME
34457 
34458   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34459     # cc -V output typically looks like
34460     #     cc: Sun C 5.12 Linux_i386 2011/11/16
34461     # or
34462     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
34463     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34464     # Check that this is likely to be the Solaris Studio cc.
34465     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
34466     if test $? -ne 0; then
34467       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34468       { $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
34469 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34470       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34471 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34472       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34473 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34474       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34475     fi
34476     # Remove usage instructions (if present), and
34477     # collapse compiler output into a single line
34478     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34479         $SED -e 's/ *[Uu]sage:.*//'`
34480     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34481         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34482   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34483     # xlc -qversion output typically looks like
34484     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34485     #     Version: 11.01.0000.0015
34486     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34487     # Check that this is likely to be the IBM XL C compiler.
34488     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34489     if test $? -ne 0; then
34490       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34491       { $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
34492 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34493       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34494 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34495       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34496 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34497       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34498     fi
34499     # Collapse compiler output into a single line
34500     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34501     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34502         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34503   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34504     # There is no specific version flag, but all output starts with a version string.
34505     # First line typically looks something like:
34506     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34507     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34508     # Check that this is likely to be Microsoft CL.EXE.
34509     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34510     if test $? -ne 0; then
34511       { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34512 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34513       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34514 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34515       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34516     fi
34517     # Collapse compiler output into a single line
34518     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34519     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34520         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34521   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34522     # gcc --version output typically looks like
34523     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34524     #     Copyright (C) 2013 Free Software Foundation, Inc.
34525     #     This is free software; see the source for copying conditions.  There is NO
34526     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34527     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34528     # Check that this is likely to be GCC.
34529     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34530     if test $? -ne 0; then
34531       { $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
34532 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34533       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34534 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34535       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34536     fi
34537     # Remove Copyright and legalese from version string, and
34538     # collapse into a single line
34539     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34540         $SED -e 's/ *Copyright .*//'`
34541     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34542         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34543   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34544     # clang --version output typically looks like
34545     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34546     #    clang version 3.3 (tags/RELEASE_33/final)
34547     # or
34548     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34549     #    Target: x86_64-pc-linux-gnu
34550     #    Thread model: posix
34551     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34552     # Check that this is likely to be clang
34553     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34554     if test $? -ne 0; then
34555       { $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
34556 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34557       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34558 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34559       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34560     fi
34561     # Collapse compiler output into a single line
34562     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34563     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34564         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34565   else
34566       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34567   fi
34568   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34569   CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34570   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34571   CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34572 
34573   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34574 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34575 
34576 
34577   # Now that we have resolved CC ourself, let autoconf have its go at it
34578   ac_ext=c
34579 ac_cpp='$CPP $CPPFLAGS'
34580 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34581 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34582 ac_compiler_gnu=$ac_cv_c_compiler_gnu
34583 if test -n "$ac_tool_prefix"; then
34584   for ac_prog in $CC
34585   do
34586     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34587 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34589 $as_echo_n "checking for $ac_word... " >&6; }
34590 if ${ac_cv_prog_CC+:} false; then :
34591   $as_echo_n "(cached) " >&6
34592 else
34593   if test -n "$CC"; then
34594   ac_cv_prog_CC="$CC" # Let the user override the test.
34595 else
34596 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34597 for as_dir in $PATH
34598 do
34599   IFS=$as_save_IFS
34600   test -z "$as_dir" && as_dir=.
34601     for ac_exec_ext in '' $ac_executable_extensions; do
34602   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34603     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34604     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34605     break 2
34606   fi
34607 done
34608   done
34609 IFS=$as_save_IFS
34610 
34611 fi
34612 fi
34613 CC=$ac_cv_prog_CC
34614 if test -n "$CC"; then
34615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34616 $as_echo "$CC" >&6; }
34617 else
34618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34619 $as_echo "no" >&6; }
34620 fi
34621 
34622 
34623     test -n "$CC" && break
34624   done
34625 fi
34626 if test -z "$CC"; then
34627   ac_ct_CC=$CC
34628   for ac_prog in $CC
34629 do
34630   # Extract the first word of "$ac_prog", so it can be a program name with args.
34631 set dummy $ac_prog; ac_word=$2
34632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34633 $as_echo_n "checking for $ac_word... " >&6; }
34634 if ${ac_cv_prog_ac_ct_CC+:} false; then :
34635   $as_echo_n "(cached) " >&6
34636 else
34637   if test -n "$ac_ct_CC"; then
34638   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34639 else
34640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34641 for as_dir in $PATH
34642 do
34643   IFS=$as_save_IFS
34644   test -z "$as_dir" && as_dir=.
34645     for ac_exec_ext in '' $ac_executable_extensions; do
34646   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34647     ac_cv_prog_ac_ct_CC="$ac_prog"
34648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34649     break 2
34650   fi
34651 done
34652   done
34653 IFS=$as_save_IFS
34654 
34655 fi
34656 fi
34657 ac_ct_CC=$ac_cv_prog_ac_ct_CC
34658 if test -n "$ac_ct_CC"; then
34659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34660 $as_echo "$ac_ct_CC" >&6; }
34661 else
34662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34663 $as_echo "no" >&6; }
34664 fi
34665 
34666 
34667   test -n "$ac_ct_CC" && break
34668 done
34669 
34670   if test "x$ac_ct_CC" = x; then
34671     CC=""
34672   else
34673     case $cross_compiling:$ac_tool_warned in
34674 yes:)
34675 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34676 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34677 ac_tool_warned=yes ;;
34678 esac
34679     CC=$ac_ct_CC
34680   fi
34681 fi
34682 
34683 
34684 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34685 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34686 as_fn_error $? "no acceptable C compiler found in \$PATH
34687 See \`config.log' for more details" "$LINENO" 5; }
34688 
34689 # Provide some information about the compiler.
34690 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34691 set X $ac_compile
34692 ac_compiler=$2
34693 for ac_option in --version -v -V -qversion; do
34694   { { ac_try="$ac_compiler $ac_option >&5"
34695 case "(($ac_try" in
34696   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34697   *) ac_try_echo=$ac_try;;
34698 esac
34699 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34700 $as_echo "$ac_try_echo"; } >&5
34701   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34702   ac_status=$?
34703   if test -s conftest.err; then
34704     sed '10a\
34705 ... rest of stderr output deleted ...
34706          10q' conftest.err >conftest.er1
34707     cat conftest.er1 >&5
34708   fi
34709   rm -f conftest.er1 conftest.err
34710   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34711   test $ac_status = 0; }
34712 done
34713 
34714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34715 /* end confdefs.h.  */
34716 
34717 int
34718 main ()
34719 {
34720 
34721   ;
34722   return 0;
34723 }
34724 _ACEOF
34725 ac_clean_files_save=$ac_clean_files
34726 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34727 # Try to create an executable without -o first, disregard a.out.
34728 # It will help us diagnose broken compilers, and finding out an intuition
34729 # of exeext.
34730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34731 $as_echo_n "checking whether the C compiler works... " >&6; }
34732 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34733 
34734 # The possible output files:
34735 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34736 
34737 ac_rmfiles=
34738 for ac_file in $ac_files
34739 do
34740   case $ac_file in
34741     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34742     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34743   esac
34744 done
34745 rm -f $ac_rmfiles
34746 
34747 if { { ac_try="$ac_link_default"
34748 case "(($ac_try" in
34749   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34750   *) ac_try_echo=$ac_try;;
34751 esac
34752 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34753 $as_echo "$ac_try_echo"; } >&5
34754   (eval "$ac_link_default") 2>&5
34755   ac_status=$?
34756   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34757   test $ac_status = 0; }; then :
34758   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34759 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34760 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
34761 # so that the user can short-circuit this test for compilers unknown to
34762 # Autoconf.
34763 for ac_file in $ac_files ''
34764 do
34765   test -f "$ac_file" || continue
34766   case $ac_file in
34767     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34768         ;;
34769     [ab].out )
34770         # We found the default executable, but exeext='' is most
34771         # certainly right.
34772         break;;
34773     *.* )
34774         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34775         then :; else
34776            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34777         fi
34778         # We set ac_cv_exeext here because the later test for it is not
34779         # safe: cross compilers may not add the suffix if given an `-o'
34780         # argument, so we may need to know it at that point already.
34781         # Even if this section looks crufty: it has the advantage of
34782         # actually working.
34783         break;;
34784     * )
34785         break;;
34786   esac
34787 done
34788 test "$ac_cv_exeext" = no && ac_cv_exeext=
34789 
34790 else
34791   ac_file=''
34792 fi
34793 if test -z "$ac_file"; then :
34794   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34795 $as_echo "no" >&6; }
34796 $as_echo "$as_me: failed program was:" >&5
34797 sed 's/^/| /' conftest.$ac_ext >&5
34798 
34799 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34800 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34801 as_fn_error 77 "C compiler cannot create executables
34802 See \`config.log' for more details" "$LINENO" 5; }
34803 else
34804   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34805 $as_echo "yes" >&6; }
34806 fi
34807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34808 $as_echo_n "checking for C compiler default output file name... " >&6; }
34809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34810 $as_echo "$ac_file" >&6; }
34811 ac_exeext=$ac_cv_exeext
34812 
34813 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34814 ac_clean_files=$ac_clean_files_save
34815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34816 $as_echo_n "checking for suffix of executables... " >&6; }
34817 if { { ac_try="$ac_link"
34818 case "(($ac_try" in
34819   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34820   *) ac_try_echo=$ac_try;;
34821 esac
34822 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34823 $as_echo "$ac_try_echo"; } >&5
34824   (eval "$ac_link") 2>&5
34825   ac_status=$?
34826   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34827   test $ac_status = 0; }; then :
34828   # If both `conftest.exe' and `conftest' are `present' (well, observable)
34829 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34830 # work properly (i.e., refer to `conftest.exe'), while it won't with
34831 # `rm'.
34832 for ac_file in conftest.exe conftest conftest.*; do
34833   test -f "$ac_file" || continue
34834   case $ac_file in
34835     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34836     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34837           break;;
34838     * ) break;;
34839   esac
34840 done
34841 else
34842   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34843 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34844 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34845 See \`config.log' for more details" "$LINENO" 5; }
34846 fi
34847 rm -f conftest conftest$ac_cv_exeext
34848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34849 $as_echo "$ac_cv_exeext" >&6; }
34850 
34851 rm -f conftest.$ac_ext
34852 EXEEXT=$ac_cv_exeext
34853 ac_exeext=$EXEEXT
34854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34855 /* end confdefs.h.  */
34856 #include <stdio.h>
34857 int
34858 main ()
34859 {
34860 FILE *f = fopen ("conftest.out", "w");
34861  return ferror (f) || fclose (f) != 0;
34862 
34863   ;
34864   return 0;
34865 }
34866 _ACEOF
34867 ac_clean_files="$ac_clean_files conftest.out"
34868 # Check that the compiler produces executables we can run.  If not, either
34869 # the compiler is broken, or we cross compile.
34870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34871 $as_echo_n "checking whether we are cross compiling... " >&6; }
34872 if test "$cross_compiling" != yes; then
34873   { { ac_try="$ac_link"
34874 case "(($ac_try" in
34875   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34876   *) ac_try_echo=$ac_try;;
34877 esac
34878 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34879 $as_echo "$ac_try_echo"; } >&5
34880   (eval "$ac_link") 2>&5
34881   ac_status=$?
34882   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34883   test $ac_status = 0; }
34884   if { ac_try='./conftest$ac_cv_exeext'
34885   { { case "(($ac_try" in
34886   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34887   *) ac_try_echo=$ac_try;;
34888 esac
34889 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34890 $as_echo "$ac_try_echo"; } >&5
34891   (eval "$ac_try") 2>&5
34892   ac_status=$?
34893   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34894   test $ac_status = 0; }; }; then
34895     cross_compiling=no
34896   else
34897     if test "$cross_compiling" = maybe; then
34898         cross_compiling=yes
34899     else
34900         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34901 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34902 as_fn_error $? "cannot run C compiled programs.
34903 If you meant to cross compile, use \`--host'.
34904 See \`config.log' for more details" "$LINENO" 5; }
34905     fi
34906   fi
34907 fi
34908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34909 $as_echo "$cross_compiling" >&6; }
34910 
34911 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34912 ac_clean_files=$ac_clean_files_save
34913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34914 $as_echo_n "checking for suffix of object files... " >&6; }
34915 if ${ac_cv_objext+:} false; then :
34916   $as_echo_n "(cached) " >&6
34917 else
34918   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34919 /* end confdefs.h.  */
34920 
34921 int
34922 main ()
34923 {
34924 
34925   ;
34926   return 0;
34927 }
34928 _ACEOF
34929 rm -f conftest.o conftest.obj
34930 if { { ac_try="$ac_compile"
34931 case "(($ac_try" in
34932   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34933   *) ac_try_echo=$ac_try;;
34934 esac
34935 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34936 $as_echo "$ac_try_echo"; } >&5
34937   (eval "$ac_compile") 2>&5
34938   ac_status=$?
34939   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34940   test $ac_status = 0; }; then :
34941   for ac_file in conftest.o conftest.obj conftest.*; do
34942   test -f "$ac_file" || continue;
34943   case $ac_file in
34944     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34945     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34946        break;;
34947   esac
34948 done
34949 else
34950   $as_echo "$as_me: failed program was:" >&5
34951 sed 's/^/| /' conftest.$ac_ext >&5
34952 
34953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34954 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34955 as_fn_error $? "cannot compute suffix of object files: cannot compile
34956 See \`config.log' for more details" "$LINENO" 5; }
34957 fi
34958 rm -f conftest.$ac_cv_objext conftest.$ac_ext
34959 fi
34960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34961 $as_echo "$ac_cv_objext" >&6; }
34962 OBJEXT=$ac_cv_objext
34963 ac_objext=$OBJEXT
34964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34965 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34966 if ${ac_cv_c_compiler_gnu+:} false; then :
34967   $as_echo_n "(cached) " >&6
34968 else
34969   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34970 /* end confdefs.h.  */
34971 
34972 int
34973 main ()
34974 {
34975 #ifndef __GNUC__
34976        choke me
34977 #endif
34978 
34979   ;
34980   return 0;
34981 }
34982 _ACEOF
34983 if ac_fn_c_try_compile "$LINENO"; then :
34984   ac_compiler_gnu=yes
34985 else
34986   ac_compiler_gnu=no
34987 fi
34988 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34989 ac_cv_c_compiler_gnu=$ac_compiler_gnu
34990 
34991 fi
34992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34993 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
34994 if test $ac_compiler_gnu = yes; then
34995   GCC=yes
34996 else
34997   GCC=
34998 fi
34999 ac_test_CFLAGS=${CFLAGS+set}
35000 ac_save_CFLAGS=$CFLAGS
35001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
35002 $as_echo_n "checking whether $CC accepts -g... " >&6; }
35003 if ${ac_cv_prog_cc_g+:} false; then :
35004   $as_echo_n "(cached) " >&6
35005 else
35006   ac_save_c_werror_flag=$ac_c_werror_flag
35007    ac_c_werror_flag=yes
35008    ac_cv_prog_cc_g=no
35009    CFLAGS="-g"
35010    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35011 /* end confdefs.h.  */
35012 
35013 int
35014 main ()
35015 {
35016 
35017   ;
35018   return 0;
35019 }
35020 _ACEOF
35021 if ac_fn_c_try_compile "$LINENO"; then :
35022   ac_cv_prog_cc_g=yes
35023 else
35024   CFLAGS=""
35025       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35026 /* end confdefs.h.  */
35027 
35028 int
35029 main ()
35030 {
35031 
35032   ;
35033   return 0;
35034 }
35035 _ACEOF
35036 if ac_fn_c_try_compile "$LINENO"; then :
35037 
35038 else
35039   ac_c_werror_flag=$ac_save_c_werror_flag
35040          CFLAGS="-g"
35041          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35042 /* end confdefs.h.  */
35043 
35044 int
35045 main ()
35046 {
35047 
35048   ;
35049   return 0;
35050 }
35051 _ACEOF
35052 if ac_fn_c_try_compile "$LINENO"; then :
35053   ac_cv_prog_cc_g=yes
35054 fi
35055 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35056 fi
35057 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35058 fi
35059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35060    ac_c_werror_flag=$ac_save_c_werror_flag
35061 fi
35062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
35063 $as_echo "$ac_cv_prog_cc_g" >&6; }
35064 if test "$ac_test_CFLAGS" = set; then
35065   CFLAGS=$ac_save_CFLAGS
35066 elif test $ac_cv_prog_cc_g = yes; then
35067   if test "$GCC" = yes; then
35068     CFLAGS="-g -O2"
35069   else
35070     CFLAGS="-g"
35071   fi
35072 else
35073   if test "$GCC" = yes; then
35074     CFLAGS="-O2"
35075   else
35076     CFLAGS=
35077   fi
35078 fi
35079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
35080 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
35081 if ${ac_cv_prog_cc_c89+:} false; then :
35082   $as_echo_n "(cached) " >&6
35083 else
35084   ac_cv_prog_cc_c89=no
35085 ac_save_CC=$CC
35086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35087 /* end confdefs.h.  */
35088 #include <stdarg.h>
35089 #include <stdio.h>
35090 struct stat;
35091 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
35092 struct buf { int x; };
35093 FILE * (*rcsopen) (struct buf *, struct stat *, int);
35094 static char *e (p, i)
35095      char **p;
35096      int i;
35097 {
35098   return p[i];
35099 }
35100 static char *f (char * (*g) (char **, int), char **p, ...)
35101 {
35102   char *s;
35103   va_list v;
35104   va_start (v,p);
35105   s = g (p, va_arg (v,int));
35106   va_end (v);
35107   return s;
35108 }
35109 
35110 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
35111    function prototypes and stuff, but not '\xHH' hex character constants.
35112    These don't provoke an error unfortunately, instead are silently treated
35113    as 'x'.  The following induces an error, until -std is added to get
35114    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
35115    array size at least.  It's necessary to write '\x00'==0 to get something
35116    that's true only with -std.  */
35117 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
35118 
35119 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
35120    inside strings and character constants.  */
35121 #define FOO(x) 'x'
35122 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
35123 
35124 int test (int i, double x);
35125 struct s1 {int (*f) (int a);};
35126 struct s2 {int (*f) (double a);};
35127 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
35128 int argc;
35129 char **argv;
35130 int
35131 main ()
35132 {
35133 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
35134   ;
35135   return 0;
35136 }
35137 _ACEOF
35138 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
35139         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
35140 do
35141   CC="$ac_save_CC $ac_arg"
35142   if ac_fn_c_try_compile "$LINENO"; then :
35143   ac_cv_prog_cc_c89=$ac_arg
35144 fi
35145 rm -f core conftest.err conftest.$ac_objext
35146   test "x$ac_cv_prog_cc_c89" != "xno" && break
35147 done
35148 rm -f conftest.$ac_ext
35149 CC=$ac_save_CC
35150 
35151 fi
35152 # AC_CACHE_VAL
35153 case "x$ac_cv_prog_cc_c89" in
35154   x)
35155     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
35156 $as_echo "none needed" >&6; } ;;
35157   xno)
35158     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
35159 $as_echo "unsupported" >&6; } ;;
35160   *)
35161     CC="$CC $ac_cv_prog_cc_c89"
35162     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
35163 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
35164 esac
35165 if test "x$ac_cv_prog_cc_c89" != xno; then :
35166 
35167 fi
35168 
35169 ac_ext=cpp
35170 ac_cpp='$CXXCPP $CPPFLAGS'
35171 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35172 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35173 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35174 
35175 
35176 
35177   COMPILER_NAME=C++
35178   SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
35179 
35180   if test "x$CXX" != x; then
35181     # User has supplied compiler name already, always let that override.
35182     { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
35183 $as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
35184     if test "x`basename $CXX`" = "x$CXX"; then
35185       # A command without a complete path is provided, search $PATH.
35186 
35187       for ac_prog in $CXX
35188 do
35189   # Extract the first word of "$ac_prog", so it can be a program name with args.
35190 set dummy $ac_prog; ac_word=$2
35191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35192 $as_echo_n "checking for $ac_word... " >&6; }
35193 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35194   $as_echo_n "(cached) " >&6
35195 else
35196   case $POTENTIAL_CXX in
35197   [\\/]* | ?:[\\/]*)
35198   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35199   ;;
35200   *)
35201   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35202 for as_dir in $PATH
35203 do
35204   IFS=$as_save_IFS
35205   test -z "$as_dir" && as_dir=.
35206     for ac_exec_ext in '' $ac_executable_extensions; do
35207   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35208     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35209     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35210     break 2
35211   fi
35212 done
35213   done
35214 IFS=$as_save_IFS
35215 
35216   ;;
35217 esac
35218 fi
35219 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35220 if test -n "$POTENTIAL_CXX"; then
35221   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35222 $as_echo "$POTENTIAL_CXX" >&6; }
35223 else
35224   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35225 $as_echo "no" >&6; }
35226 fi
35227 
35228 
35229   test -n "$POTENTIAL_CXX" && break
35230 done
35231 
35232       if test "x$POTENTIAL_CXX" != x; then
35233         CXX=$POTENTIAL_CXX
35234       else
35235         as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
35236       fi
35237     else
35238       # Otherwise it might already be a complete path
35239       if test ! -x "$CXX"; then
35240         as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
35241       fi
35242     fi
35243   else
35244     # No user supplied value. Locate compiler ourselves.
35245 
35246     # If we are cross compiling, assume cross compilation tools follows the
35247     # cross compilation standard where they are prefixed with the autoconf
35248     # standard name for the target. For example the binary
35249     # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
35250     # If we are not cross compiling, then the default compiler name will be
35251     # used.
35252 
35253     CXX=
35254     # If TOOLCHAIN_PATH is set, check for all compiler names in there first
35255     # before checking the rest of the PATH.
35256     # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
35257     # step, this should not be necessary.
35258     if test -n "$TOOLCHAIN_PATH"; then
35259       PATH_save="$PATH"
35260       PATH="$TOOLCHAIN_PATH"
35261       if test -n "$ac_tool_prefix"; then
35262   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35263 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35265 $as_echo_n "checking for $ac_word... " >&6; }
35266 if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
35267   $as_echo_n "(cached) " >&6
35268 else
35269   case $TOOLCHAIN_PATH_CXX in
35270   [\\/]* | ?:[\\/]*)
35271   ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35272   ;;
35273   *)
35274   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35275 for as_dir in $PATH
35276 do
35277   IFS=$as_save_IFS
35278   test -z "$as_dir" && as_dir=.
35279     for ac_exec_ext in '' $ac_executable_extensions; do
35280   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35281     ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35282     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35283     break 2
35284   fi
35285 done
35286   done
35287 IFS=$as_save_IFS
35288 
35289   ;;
35290 esac
35291 fi
35292 TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
35293 if test -n "$TOOLCHAIN_PATH_CXX"; then
35294   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
35295 $as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
35296 else
35297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35298 $as_echo "no" >&6; }
35299 fi
35300 
35301 
35302 fi
35303 if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
35304   ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
35305   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35306 set dummy $SEARCH_LIST; ac_word=$2
35307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35308 $as_echo_n "checking for $ac_word... " >&6; }
35309 if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
35310   $as_echo_n "(cached) " >&6
35311 else
35312   case $ac_pt_TOOLCHAIN_PATH_CXX in
35313   [\\/]* | ?:[\\/]*)
35314   ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
35315   ;;
35316   *)
35317   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35318 for as_dir in $PATH
35319 do
35320   IFS=$as_save_IFS
35321   test -z "$as_dir" && as_dir=.
35322     for ac_exec_ext in '' $ac_executable_extensions; do
35323   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35324     ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
35325     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35326     break 2
35327   fi
35328 done
35329   done
35330 IFS=$as_save_IFS
35331 
35332   ;;
35333 esac
35334 fi
35335 ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
35336 if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
35337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
35338 $as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
35339 else
35340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35341 $as_echo "no" >&6; }
35342 fi
35343 
35344   if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
35345     TOOLCHAIN_PATH_CXX=""
35346   else
35347     case $cross_compiling:$ac_tool_warned in
35348 yes:)
35349 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35350 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35351 ac_tool_warned=yes ;;
35352 esac
35353     TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
35354   fi
35355 else
35356   TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
35357 fi
35358 
35359       CXX=$TOOLCHAIN_PATH_CXX
35360       PATH="$PATH_save"
35361     fi
35362 
35363     # AC_PATH_TOOL can't be run multiple times with the same variable,
35364     # so create a new name for this run.
35365     if test "x$CXX" = x; then
35366       if test -n "$ac_tool_prefix"; then
35367   # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
35368 set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
35369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35370 $as_echo_n "checking for $ac_word... " >&6; }
35371 if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
35372   $as_echo_n "(cached) " >&6
35373 else
35374   case $POTENTIAL_CXX in
35375   [\\/]* | ?:[\\/]*)
35376   ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
35377   ;;
35378   *)
35379   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35380 for as_dir in $PATH
35381 do
35382   IFS=$as_save_IFS
35383   test -z "$as_dir" && as_dir=.
35384     for ac_exec_ext in '' $ac_executable_extensions; do
35385   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35386     ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35387     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35388     break 2
35389   fi
35390 done
35391   done
35392 IFS=$as_save_IFS
35393 
35394   ;;
35395 esac
35396 fi
35397 POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
35398 if test -n "$POTENTIAL_CXX"; then
35399   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
35400 $as_echo "$POTENTIAL_CXX" >&6; }
35401 else
35402   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35403 $as_echo "no" >&6; }
35404 fi
35405 
35406 
35407 fi
35408 if test -z "$ac_cv_path_POTENTIAL_CXX"; then
35409   ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
35410   # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
35411 set dummy $SEARCH_LIST; ac_word=$2
35412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35413 $as_echo_n "checking for $ac_word... " >&6; }
35414 if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
35415   $as_echo_n "(cached) " >&6
35416 else
35417   case $ac_pt_POTENTIAL_CXX in
35418   [\\/]* | ?:[\\/]*)
35419   ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
35420   ;;
35421   *)
35422   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35423 for as_dir in $PATH
35424 do
35425   IFS=$as_save_IFS
35426   test -z "$as_dir" && as_dir=.
35427     for ac_exec_ext in '' $ac_executable_extensions; do
35428   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35429     ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
35430     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35431     break 2
35432   fi
35433 done
35434   done
35435 IFS=$as_save_IFS
35436 
35437   ;;
35438 esac
35439 fi
35440 ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
35441 if test -n "$ac_pt_POTENTIAL_CXX"; then
35442   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
35443 $as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
35444 else
35445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35446 $as_echo "no" >&6; }
35447 fi
35448 
35449   if test "x$ac_pt_POTENTIAL_CXX" = x; then
35450     POTENTIAL_CXX=""
35451   else
35452     case $cross_compiling:$ac_tool_warned in
35453 yes:)
35454 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35455 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35456 ac_tool_warned=yes ;;
35457 esac
35458     POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
35459   fi
35460 else
35461   POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
35462 fi
35463 
35464       CXX=$POTENTIAL_CXX
35465     fi
35466 
35467     if test "x$CXX" = x; then
35468 
35469   # Print a helpful message on how to acquire the necessary build dependency.
35470   # devkit is the help tag: freetype, cups, alsa etc
35471   MISSING_DEPENDENCY=devkit
35472 
35473   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35474     cygwin_help $MISSING_DEPENDENCY
35475   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35476     msys_help $MISSING_DEPENDENCY
35477   else
35478     PKGHANDLER_COMMAND=
35479 
35480     case $PKGHANDLER in
35481       apt-get)
35482         apt_help     $MISSING_DEPENDENCY ;;
35483       yum)
35484         yum_help     $MISSING_DEPENDENCY ;;
35485       brew)
35486         brew_help    $MISSING_DEPENDENCY ;;
35487       port)
35488         port_help    $MISSING_DEPENDENCY ;;
35489       pkgutil)
35490         pkgutil_help $MISSING_DEPENDENCY ;;
35491       pkgadd)
35492         pkgadd_help  $MISSING_DEPENDENCY ;;
35493     esac
35494 
35495     if test "x$PKGHANDLER_COMMAND" != x; then
35496       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
35497     fi
35498   fi
35499 
35500       as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
35501     fi
35502   fi
35503 
35504   # Now we have a compiler binary in CXX. Make sure it's okay.
35505 
35506   # Only process if variable expands to non-empty
35507 
35508   if test "x$CXX" != x; then
35509     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35510 
35511   # First separate the path from the arguments. This will split at the first
35512   # space.
35513   complete="$CXX"
35514   path="${complete%% *}"
35515   tmp="$complete EOL"
35516   arguments="${tmp#* }"
35517 
35518   # Input might be given as Windows format, start by converting to
35519   # unix format.
35520   new_path=`$CYGPATH -u "$path"`
35521 
35522   # Now try to locate executable using which
35523   new_path=`$WHICH "$new_path" 2> /dev/null`
35524   # bat and cmd files are not always considered executable in cygwin causing which
35525   # to not find them
35526   if test "x$new_path" = x \
35527       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35528       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35529     new_path=`$CYGPATH -u "$path"`
35530   fi
35531   if test "x$new_path" = x; then
35532     # Oops. Which didn't find the executable.
35533     # The splitting of arguments from the executable at a space might have been incorrect,
35534     # since paths with space are more likely in Windows. Give it another try with the whole
35535     # argument.
35536     path="$complete"
35537     arguments="EOL"
35538     new_path=`$CYGPATH -u "$path"`
35539     new_path=`$WHICH "$new_path" 2> /dev/null`
35540     # bat and cmd files are not always considered executable in cygwin causing which
35541     # to not find them
35542     if test "x$new_path" = x \
35543         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35544         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35545       new_path=`$CYGPATH -u "$path"`
35546     fi
35547     if test "x$new_path" = x; then
35548       # It's still not found. Now this is an unrecoverable error.
35549       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35550 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35551       has_space=`$ECHO "$complete" | $GREP " "`
35552       if test "x$has_space" != x; then
35553         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35554 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35555       fi
35556       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35557     fi
35558   fi
35559 
35560   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35561   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35562   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35563   # "foo.exe" is OK but "foo" is an error.
35564   #
35565   # This test is therefore slightly more accurate than "test -f" to check for file presence.
35566   # It is also a way to make sure we got the proper file name for the real test later on.
35567   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35568   if test "x$test_shortpath" = x; then
35569     # Short path failed, file does not exist as specified.
35570     # Try adding .exe or .cmd
35571     if test -f "${new_path}.exe"; then
35572       input_to_shortpath="${new_path}.exe"
35573     elif test -f "${new_path}.cmd"; then
35574       input_to_shortpath="${new_path}.cmd"
35575     else
35576       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35577 $as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35578       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35579 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35580       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35581     fi
35582   else
35583     input_to_shortpath="$new_path"
35584   fi
35585 
35586   # Call helper function which possibly converts this using DOS-style short mode.
35587   # If so, the updated path is stored in $new_path.
35588   new_path="$input_to_shortpath"
35589 
35590   input_path="$input_to_shortpath"
35591   # Check if we need to convert this using DOS-style short mode. If the path
35592   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35593   # take no chances and rewrite it.
35594   # Note: m4 eats our [], so we need to use [ and ] instead.
35595   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35596   if test "x$has_forbidden_chars" != x; then
35597     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35598     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35599     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35600     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35601       # Going to short mode and back again did indeed matter. Since short mode is
35602       # case insensitive, let's make it lowercase to improve readability.
35603       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35604       # Now convert it back to Unix-style (cygpath)
35605       input_path=`$CYGPATH -u "$shortmode_path"`
35606       new_path="$input_path"
35607     fi
35608   fi
35609 
35610   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35611   if test "x$test_cygdrive_prefix" = x; then
35612     # As a simple fix, exclude /usr/bin since it's not a real path.
35613     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35614       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35615       # a path prefixed by /cygdrive for fixpath to work.
35616       new_path="$CYGWIN_ROOT_PATH$input_path"
35617     fi
35618   fi
35619 
35620   # remove trailing .exe if any
35621   new_path="${new_path/%.exe/}"
35622 
35623     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35624 
35625   # First separate the path from the arguments. This will split at the first
35626   # space.
35627   complete="$CXX"
35628   path="${complete%% *}"
35629   tmp="$complete EOL"
35630   arguments="${tmp#* }"
35631 
35632   # Input might be given as Windows format, start by converting to
35633   # unix format.
35634   new_path="$path"
35635 
35636   windows_path="$new_path"
35637   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35638     unix_path=`$CYGPATH -u "$windows_path"`
35639     new_path="$unix_path"
35640   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35641     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35642     new_path="$unix_path"
35643   fi
35644 
35645 
35646   # Now try to locate executable using which
35647   new_path=`$WHICH "$new_path" 2> /dev/null`
35648 
35649   if test "x$new_path" = x; then
35650     # Oops. Which didn't find the executable.
35651     # The splitting of arguments from the executable at a space might have been incorrect,
35652     # since paths with space are more likely in Windows. Give it another try with the whole
35653     # argument.
35654     path="$complete"
35655     arguments="EOL"
35656     new_path="$path"
35657 
35658   windows_path="$new_path"
35659   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35660     unix_path=`$CYGPATH -u "$windows_path"`
35661     new_path="$unix_path"
35662   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35663     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35664     new_path="$unix_path"
35665   fi
35666 
35667 
35668     new_path=`$WHICH "$new_path" 2> /dev/null`
35669     # bat and cmd files are not always considered executable in MSYS causing which
35670     # to not find them
35671     if test "x$new_path" = x \
35672         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35673         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35674       new_path="$path"
35675 
35676   windows_path="$new_path"
35677   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35678     unix_path=`$CYGPATH -u "$windows_path"`
35679     new_path="$unix_path"
35680   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35681     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35682     new_path="$unix_path"
35683   fi
35684 
35685     fi
35686 
35687     if test "x$new_path" = x; then
35688       # It's still not found. Now this is an unrecoverable error.
35689       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35690 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35691       has_space=`$ECHO "$complete" | $GREP " "`
35692       if test "x$has_space" != x; then
35693         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35694 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35695       fi
35696       as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35697     fi
35698   fi
35699 
35700   # Now new_path has a complete unix path to the binary
35701   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35702     # Keep paths in /bin as-is, but remove trailing .exe if any
35703     new_path="${new_path/%.exe/}"
35704     # Do not save /bin paths to all_fixpath_prefixes!
35705   else
35706     # Not in mixed or Windows style, start by that.
35707     new_path=`cmd //c echo $new_path`
35708 
35709   input_path="$new_path"
35710   # Check if we need to convert this using DOS-style short mode. If the path
35711   # contains just simple characters, use it. Otherwise (spaces, weird characters),
35712   # take no chances and rewrite it.
35713   # Note: m4 eats our [], so we need to use [ and ] instead.
35714   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35715   if test "x$has_forbidden_chars" != x; then
35716     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35717     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35718   fi
35719 
35720     # Output is in $new_path
35721 
35722   windows_path="$new_path"
35723   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35724     unix_path=`$CYGPATH -u "$windows_path"`
35725     new_path="$unix_path"
35726   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35727     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35728     new_path="$unix_path"
35729   fi
35730 
35731     # remove trailing .exe if any
35732     new_path="${new_path/%.exe/}"
35733 
35734     # Save the first 10 bytes of this path to the storage, so fixpath can work.
35735     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35736   fi
35737 
35738     else
35739       # We're on a unix platform. Hooray! :)
35740       # First separate the path from the arguments. This will split at the first
35741       # space.
35742       complete="$CXX"
35743       path="${complete%% *}"
35744       tmp="$complete EOL"
35745       arguments="${tmp#* }"
35746 
35747       # Cannot rely on the command "which" here since it doesn't always work.
35748       is_absolute_path=`$ECHO "$path" | $GREP ^/`
35749       if test -z "$is_absolute_path"; then
35750         # Path to executable is not absolute. Find it.
35751         IFS_save="$IFS"
35752         IFS=:
35753         for p in $PATH; do
35754           if test -f "$p/$path" && test -x "$p/$path"; then
35755             new_path="$p/$path"
35756             break
35757           fi
35758         done
35759         IFS="$IFS_save"
35760       else
35761         # This is an absolute path, we can use it without further modifications.
35762         new_path="$path"
35763       fi
35764 
35765       if test "x$new_path" = x; then
35766         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35767 $as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35768         has_space=`$ECHO "$complete" | $GREP " "`
35769         if test "x$has_space" != x; then
35770           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35771 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35772         fi
35773         as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35774       fi
35775     fi
35776 
35777     # Now join together the path and the arguments once again
35778     if test "x$arguments" != xEOL; then
35779       new_complete="$new_path ${arguments% *}"
35780     else
35781       new_complete="$new_path"
35782     fi
35783 
35784     if test "x$complete" != "x$new_complete"; then
35785       CXX="$new_complete"
35786       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35787 $as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35788     fi
35789   fi
35790 
35791   TEST_COMPILER="$CXX"
35792 
35793   { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35794 $as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35795   SYMLINK_ORIGINAL="$TEST_COMPILER"
35796 
35797   if test "x$OPENJDK_BUILD_OS" != xwindows; then
35798     # Follow a chain of symbolic links. Use readlink
35799     # where it exists, else fall back to horribly
35800     # complicated shell code.
35801     if test "x$READLINK_TESTED" != yes; then
35802       # On MacOSX there is a readlink tool with a different
35803       # purpose than the GNU readlink tool. Check the found readlink.
35804       ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35805       if test "x$ISGNU" = x; then
35806         # A readlink that we do not know how to use.
35807         # Are there other non-GNU readlinks out there?
35808         READLINK_TESTED=yes
35809         READLINK=
35810       fi
35811     fi
35812 
35813     if test "x$READLINK" != x; then
35814       SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35815     else
35816       # Save the current directory for restoring afterwards
35817       STARTDIR=$PWD
35818       COUNTER=0
35819       sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35820       sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35821       cd $sym_link_dir
35822       # Use -P flag to resolve symlinks in directories.
35823       cd `$THEPWDCMD -P`
35824       sym_link_dir=`$THEPWDCMD -P`
35825       # Resolve file symlinks
35826       while test $COUNTER -lt 20; do
35827         ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35828         if test "x$ISLINK" == x; then
35829           # This is not a symbolic link! We are done!
35830           break
35831         fi
35832         # Again resolve directory symlinks since the target of the just found
35833         # link could be in a different directory
35834         cd `$DIRNAME $ISLINK`
35835         sym_link_dir=`$THEPWDCMD -P`
35836         sym_link_file=`$BASENAME $ISLINK`
35837         let COUNTER=COUNTER+1
35838       done
35839       cd $STARTDIR
35840       SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35841     fi
35842   fi
35843 
35844   if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35845     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35846 $as_echo "no symlink" >&6; }
35847   else
35848     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35849 $as_echo "$SYMLINK_ORIGINAL" >&6; }
35850 
35851     # We can't handle ccache by gcc wrappers, since we need to know if we're
35852     # using ccache. Instead ccache usage must be controlled by a configure option.
35853     COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35854     if test "x$COMPILER_BASENAME" = "xccache"; then
35855       { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35856 $as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35857       as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35858     fi
35859   fi
35860 
35861 
35862   COMPILER=$CXX
35863   COMPILER_NAME=$COMPILER_NAME
35864 
35865   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35866     # cc -V output typically looks like
35867     #     cc: Sun C 5.12 Linux_i386 2011/11/16
35868     # or
35869     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35870     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35871     # Check that this is likely to be the Solaris Studio cc.
35872     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35873     if test $? -ne 0; then
35874       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35875       { $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
35876 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35877       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35878 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35879       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35880 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35881       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35882     fi
35883     # Remove usage instructions (if present), and
35884     # collapse compiler output into a single line
35885     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35886         $SED -e 's/ *[Uu]sage:.*//'`
35887     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35888         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35889   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35890     # xlc -qversion output typically looks like
35891     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35892     #     Version: 11.01.0000.0015
35893     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35894     # Check that this is likely to be the IBM XL C compiler.
35895     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35896     if test $? -ne 0; then
35897       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35898       { $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
35899 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35900       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35901 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35902       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35903 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35904       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35905     fi
35906     # Collapse compiler output into a single line
35907     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35908     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35909         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35910   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35911     # There is no specific version flag, but all output starts with a version string.
35912     # First line typically looks something like:
35913     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35914     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35915     # Check that this is likely to be Microsoft CL.EXE.
35916     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35917     if test $? -ne 0; then
35918       { $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
35919 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35920       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35921 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35922       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35923     fi
35924     # Collapse compiler output into a single line
35925     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35926     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35927         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35928   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35929     # gcc --version output typically looks like
35930     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35931     #     Copyright (C) 2013 Free Software Foundation, Inc.
35932     #     This is free software; see the source for copying conditions.  There is NO
35933     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35934     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35935     # Check that this is likely to be GCC.
35936     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35937     if test $? -ne 0; then
35938       { $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
35939 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35940       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35941 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35942       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35943     fi
35944     # Remove Copyright and legalese from version string, and
35945     # collapse into a single line
35946     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35947         $SED -e 's/ *Copyright .*//'`
35948     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35949         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35950   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35951     # clang --version output typically looks like
35952     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35953     #    clang version 3.3 (tags/RELEASE_33/final)
35954     # or
35955     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35956     #    Target: x86_64-pc-linux-gnu
35957     #    Thread model: posix
35958     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35959     # Check that this is likely to be clang
35960     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35961     if test $? -ne 0; then
35962       { $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
35963 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35964       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35965 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35966       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35967     fi
35968     # Collapse compiler output into a single line
35969     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35970     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35971         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35972   else
35973       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35974   fi
35975   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35976   CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35977   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35978   CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35979 
35980   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35981 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35982 
35983 
35984   # Now that we have resolved CXX ourself, let autoconf have its go at it
35985   ac_ext=cpp
35986 ac_cpp='$CXXCPP $CPPFLAGS'
35987 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35988 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35989 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35990 if test -z "$CXX"; then
35991   if test -n "$CCC"; then
35992     CXX=$CCC
35993   else
35994     if test -n "$ac_tool_prefix"; then
35995   for ac_prog in $CXX
35996   do
35997     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35998 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35999 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36000 $as_echo_n "checking for $ac_word... " >&6; }
36001 if ${ac_cv_prog_CXX+:} false; then :
36002   $as_echo_n "(cached) " >&6
36003 else
36004   if test -n "$CXX"; then
36005   ac_cv_prog_CXX="$CXX" # Let the user override the test.
36006 else
36007 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36008 for as_dir in $PATH
36009 do
36010   IFS=$as_save_IFS
36011   test -z "$as_dir" && as_dir=.
36012     for ac_exec_ext in '' $ac_executable_extensions; do
36013   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36014     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
36015     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36016     break 2
36017   fi
36018 done
36019   done
36020 IFS=$as_save_IFS
36021 
36022 fi
36023 fi
36024 CXX=$ac_cv_prog_CXX
36025 if test -n "$CXX"; then
36026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
36027 $as_echo "$CXX" >&6; }
36028 else
36029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36030 $as_echo "no" >&6; }
36031 fi
36032 
36033 
36034     test -n "$CXX" && break
36035   done
36036 fi
36037 if test -z "$CXX"; then
36038   ac_ct_CXX=$CXX
36039   for ac_prog in $CXX
36040 do
36041   # Extract the first word of "$ac_prog", so it can be a program name with args.
36042 set dummy $ac_prog; ac_word=$2
36043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36044 $as_echo_n "checking for $ac_word... " >&6; }
36045 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
36046   $as_echo_n "(cached) " >&6
36047 else
36048   if test -n "$ac_ct_CXX"; then
36049   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
36050 else
36051 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36052 for as_dir in $PATH
36053 do
36054   IFS=$as_save_IFS
36055   test -z "$as_dir" && as_dir=.
36056     for ac_exec_ext in '' $ac_executable_extensions; do
36057   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36058     ac_cv_prog_ac_ct_CXX="$ac_prog"
36059     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36060     break 2
36061   fi
36062 done
36063   done
36064 IFS=$as_save_IFS
36065 
36066 fi
36067 fi
36068 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
36069 if test -n "$ac_ct_CXX"; then
36070   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
36071 $as_echo "$ac_ct_CXX" >&6; }
36072 else
36073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36074 $as_echo "no" >&6; }
36075 fi
36076 
36077 
36078   test -n "$ac_ct_CXX" && break
36079 done
36080 
36081   if test "x$ac_ct_CXX" = x; then
36082     CXX="g++"
36083   else
36084     case $cross_compiling:$ac_tool_warned in
36085 yes:)
36086 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36087 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36088 ac_tool_warned=yes ;;
36089 esac
36090     CXX=$ac_ct_CXX
36091   fi
36092 fi
36093 
36094   fi
36095 fi
36096 # Provide some information about the compiler.
36097 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
36098 set X $ac_compile
36099 ac_compiler=$2
36100 for ac_option in --version -v -V -qversion; do
36101   { { ac_try="$ac_compiler $ac_option >&5"
36102 case "(($ac_try" in
36103   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
36104   *) ac_try_echo=$ac_try;;
36105 esac
36106 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
36107 $as_echo "$ac_try_echo"; } >&5
36108   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
36109   ac_status=$?
36110   if test -s conftest.err; then
36111     sed '10a\
36112 ... rest of stderr output deleted ...
36113          10q' conftest.err >conftest.er1
36114     cat conftest.er1 >&5
36115   fi
36116   rm -f conftest.er1 conftest.err
36117   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
36118   test $ac_status = 0; }
36119 done
36120 
36121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
36122 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
36123 if ${ac_cv_cxx_compiler_gnu+:} false; then :
36124   $as_echo_n "(cached) " >&6
36125 else
36126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36127 /* end confdefs.h.  */
36128 
36129 int
36130 main ()
36131 {
36132 #ifndef __GNUC__
36133        choke me
36134 #endif
36135 
36136   ;
36137   return 0;
36138 }
36139 _ACEOF
36140 if ac_fn_cxx_try_compile "$LINENO"; then :
36141   ac_compiler_gnu=yes
36142 else
36143   ac_compiler_gnu=no
36144 fi
36145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36146 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
36147 
36148 fi
36149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
36150 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
36151 if test $ac_compiler_gnu = yes; then
36152   GXX=yes
36153 else
36154   GXX=
36155 fi
36156 ac_test_CXXFLAGS=${CXXFLAGS+set}
36157 ac_save_CXXFLAGS=$CXXFLAGS
36158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
36159 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
36160 if ${ac_cv_prog_cxx_g+:} false; then :
36161   $as_echo_n "(cached) " >&6
36162 else
36163   ac_save_cxx_werror_flag=$ac_cxx_werror_flag
36164    ac_cxx_werror_flag=yes
36165    ac_cv_prog_cxx_g=no
36166    CXXFLAGS="-g"
36167    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36168 /* end confdefs.h.  */
36169 
36170 int
36171 main ()
36172 {
36173 
36174   ;
36175   return 0;
36176 }
36177 _ACEOF
36178 if ac_fn_cxx_try_compile "$LINENO"; then :
36179   ac_cv_prog_cxx_g=yes
36180 else
36181   CXXFLAGS=""
36182       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36183 /* end confdefs.h.  */
36184 
36185 int
36186 main ()
36187 {
36188 
36189   ;
36190   return 0;
36191 }
36192 _ACEOF
36193 if ac_fn_cxx_try_compile "$LINENO"; then :
36194 
36195 else
36196   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36197          CXXFLAGS="-g"
36198          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36199 /* end confdefs.h.  */
36200 
36201 int
36202 main ()
36203 {
36204 
36205   ;
36206   return 0;
36207 }
36208 _ACEOF
36209 if ac_fn_cxx_try_compile "$LINENO"; then :
36210   ac_cv_prog_cxx_g=yes
36211 fi
36212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36213 fi
36214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36215 fi
36216 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
36217    ac_cxx_werror_flag=$ac_save_cxx_werror_flag
36218 fi
36219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
36220 $as_echo "$ac_cv_prog_cxx_g" >&6; }
36221 if test "$ac_test_CXXFLAGS" = set; then
36222   CXXFLAGS=$ac_save_CXXFLAGS
36223 elif test $ac_cv_prog_cxx_g = yes; then
36224   if test "$GXX" = yes; then
36225     CXXFLAGS="-g -O2"
36226   else
36227     CXXFLAGS="-g"
36228   fi
36229 else
36230   if test "$GXX" = yes; then
36231     CXXFLAGS="-O2"
36232   else
36233     CXXFLAGS=
36234   fi
36235 fi
36236 ac_ext=cpp
36237 ac_cpp='$CXXCPP $CPPFLAGS'
36238 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36239 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36240 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36241 
36242 
36243   # This is the compiler version number on the form X.Y[.Z]
36244 
36245 
36246 
36247 
36248   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
36249     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
36250 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
36251     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
36252 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
36253   fi
36254 
36255   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
36256   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
36257     { $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
36258 $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;}
36259   fi
36260 
36261   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
36262     { $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
36263 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
36264   fi
36265 
36266   COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
36267 
36268 
36269   if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
36270 
36271 
36272 
36273 
36274 
36275 
36276 
36277 
36278 
36279 
36280 
36281 
36282 
36283 
36284 
36285 
36286 
36287 
36288 
36289 
36290 
36291 
36292 
36293 
36294 
36295 
36296 
36297 
36298 
36299 
36300 
36301 
36302 
36303 
36304 
36305 
36306 
36307 
36308 
36309 
36310 
36311 
36312 
36313 
36314 
36315 
36316 
36317 
36318 
36319     # Execute function body
36320 
36321   # Need to assign to a variable since m4 is blocked from modifying parts in [].
36322   REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
36323 
36324   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
36325     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
36326   fi
36327 
36328   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
36329     as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
36330   fi
36331 
36332   # Version comparison method inspired by http://stackoverflow.com/a/24067243
36333   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
36334 
36335   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
36336     :
36337 
36338   else
36339     :
36340 
36341           { $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
36342 $as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
36343 
36344 
36345   fi
36346 
36347 
36348 
36349 
36350 
36351 
36352 
36353 
36354 
36355 
36356 
36357 
36358 
36359 
36360   fi
36361 
36362   #
36363   # Setup the preprocessor (CPP and CXXCPP)
36364   #
36365   ac_ext=c
36366 ac_cpp='$CPP $CPPFLAGS'
36367 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36368 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36369 ac_compiler_gnu=$ac_cv_c_compiler_gnu
36370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
36371 $as_echo_n "checking how to run the C preprocessor... " >&6; }
36372 # On Suns, sometimes $CPP names a directory.
36373 if test -n "$CPP" && test -d "$CPP"; then
36374   CPP=
36375 fi
36376 if test -z "$CPP"; then
36377   if ${ac_cv_prog_CPP+:} false; then :
36378   $as_echo_n "(cached) " >&6
36379 else
36380       # Double quotes because CPP needs to be expanded
36381     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
36382     do
36383       ac_preproc_ok=false
36384 for ac_c_preproc_warn_flag in '' yes
36385 do
36386   # Use a header file that comes with gcc, so configuring glibc
36387   # with a fresh cross-compiler works.
36388   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36389   # <limits.h> exists even on freestanding compilers.
36390   # On the NeXT, cc -E runs the code through the compiler's parser,
36391   # not just through cpp. "Syntax error" is here to catch this case.
36392   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36393 /* end confdefs.h.  */
36394 #ifdef __STDC__
36395 # include <limits.h>
36396 #else
36397 # include <assert.h>
36398 #endif
36399                      Syntax error
36400 _ACEOF
36401 if ac_fn_c_try_cpp "$LINENO"; then :
36402 
36403 else
36404   # Broken: fails on valid input.
36405 continue
36406 fi
36407 rm -f conftest.err conftest.i conftest.$ac_ext
36408 
36409   # OK, works on sane cases.  Now check whether nonexistent headers
36410   # can be detected and how.
36411   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36412 /* end confdefs.h.  */
36413 #include <ac_nonexistent.h>
36414 _ACEOF
36415 if ac_fn_c_try_cpp "$LINENO"; then :
36416   # Broken: success on invalid input.
36417 continue
36418 else
36419   # Passes both tests.
36420 ac_preproc_ok=:
36421 break
36422 fi
36423 rm -f conftest.err conftest.i conftest.$ac_ext
36424 
36425 done
36426 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36427 rm -f conftest.i conftest.err conftest.$ac_ext
36428 if $ac_preproc_ok; then :
36429   break
36430 fi
36431 
36432     done
36433     ac_cv_prog_CPP=$CPP
36434 
36435 fi
36436   CPP=$ac_cv_prog_CPP
36437 else
36438   ac_cv_prog_CPP=$CPP
36439 fi
36440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
36441 $as_echo "$CPP" >&6; }
36442 ac_preproc_ok=false
36443 for ac_c_preproc_warn_flag in '' yes
36444 do
36445   # Use a header file that comes with gcc, so configuring glibc
36446   # with a fresh cross-compiler works.
36447   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36448   # <limits.h> exists even on freestanding compilers.
36449   # On the NeXT, cc -E runs the code through the compiler's parser,
36450   # not just through cpp. "Syntax error" is here to catch this case.
36451   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36452 /* end confdefs.h.  */
36453 #ifdef __STDC__
36454 # include <limits.h>
36455 #else
36456 # include <assert.h>
36457 #endif
36458                      Syntax error
36459 _ACEOF
36460 if ac_fn_c_try_cpp "$LINENO"; then :
36461 
36462 else
36463   # Broken: fails on valid input.
36464 continue
36465 fi
36466 rm -f conftest.err conftest.i conftest.$ac_ext
36467 
36468   # OK, works on sane cases.  Now check whether nonexistent headers
36469   # can be detected and how.
36470   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36471 /* end confdefs.h.  */
36472 #include <ac_nonexistent.h>
36473 _ACEOF
36474 if ac_fn_c_try_cpp "$LINENO"; then :
36475   # Broken: success on invalid input.
36476 continue
36477 else
36478   # Passes both tests.
36479 ac_preproc_ok=:
36480 break
36481 fi
36482 rm -f conftest.err conftest.i conftest.$ac_ext
36483 
36484 done
36485 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36486 rm -f conftest.i conftest.err conftest.$ac_ext
36487 if $ac_preproc_ok; then :
36488 
36489 else
36490   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36491 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36492 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
36493 See \`config.log' for more details" "$LINENO" 5; }
36494 fi
36495 
36496 ac_ext=cpp
36497 ac_cpp='$CXXCPP $CPPFLAGS'
36498 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36499 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36500 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36501 
36502 
36503   # Only process if variable expands to non-empty
36504 
36505   if test "x$CPP" != x; then
36506     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36507 
36508   # First separate the path from the arguments. This will split at the first
36509   # space.
36510   complete="$CPP"
36511   path="${complete%% *}"
36512   tmp="$complete EOL"
36513   arguments="${tmp#* }"
36514 
36515   # Input might be given as Windows format, start by converting to
36516   # unix format.
36517   new_path=`$CYGPATH -u "$path"`
36518 
36519   # Now try to locate executable using which
36520   new_path=`$WHICH "$new_path" 2> /dev/null`
36521   # bat and cmd files are not always considered executable in cygwin causing which
36522   # to not find them
36523   if test "x$new_path" = x \
36524       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36525       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36526     new_path=`$CYGPATH -u "$path"`
36527   fi
36528   if test "x$new_path" = x; then
36529     # Oops. Which didn't find the executable.
36530     # The splitting of arguments from the executable at a space might have been incorrect,
36531     # since paths with space are more likely in Windows. Give it another try with the whole
36532     # argument.
36533     path="$complete"
36534     arguments="EOL"
36535     new_path=`$CYGPATH -u "$path"`
36536     new_path=`$WHICH "$new_path" 2> /dev/null`
36537     # bat and cmd files are not always considered executable in cygwin causing which
36538     # to not find them
36539     if test "x$new_path" = x \
36540         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36541         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36542       new_path=`$CYGPATH -u "$path"`
36543     fi
36544     if test "x$new_path" = x; then
36545       # It's still not found. Now this is an unrecoverable error.
36546       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36547 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36548       has_space=`$ECHO "$complete" | $GREP " "`
36549       if test "x$has_space" != x; then
36550         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36551 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36552       fi
36553       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36554     fi
36555   fi
36556 
36557   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36558   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36559   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36560   # "foo.exe" is OK but "foo" is an error.
36561   #
36562   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36563   # It is also a way to make sure we got the proper file name for the real test later on.
36564   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36565   if test "x$test_shortpath" = x; then
36566     # Short path failed, file does not exist as specified.
36567     # Try adding .exe or .cmd
36568     if test -f "${new_path}.exe"; then
36569       input_to_shortpath="${new_path}.exe"
36570     elif test -f "${new_path}.cmd"; then
36571       input_to_shortpath="${new_path}.cmd"
36572     else
36573       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36574 $as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36575       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36576 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36577       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36578     fi
36579   else
36580     input_to_shortpath="$new_path"
36581   fi
36582 
36583   # Call helper function which possibly converts this using DOS-style short mode.
36584   # If so, the updated path is stored in $new_path.
36585   new_path="$input_to_shortpath"
36586 
36587   input_path="$input_to_shortpath"
36588   # Check if we need to convert this using DOS-style short mode. If the path
36589   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36590   # take no chances and rewrite it.
36591   # Note: m4 eats our [], so we need to use [ and ] instead.
36592   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36593   if test "x$has_forbidden_chars" != x; then
36594     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36595     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36596     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36597     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36598       # Going to short mode and back again did indeed matter. Since short mode is
36599       # case insensitive, let's make it lowercase to improve readability.
36600       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36601       # Now convert it back to Unix-style (cygpath)
36602       input_path=`$CYGPATH -u "$shortmode_path"`
36603       new_path="$input_path"
36604     fi
36605   fi
36606 
36607   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36608   if test "x$test_cygdrive_prefix" = x; then
36609     # As a simple fix, exclude /usr/bin since it's not a real path.
36610     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36611       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36612       # a path prefixed by /cygdrive for fixpath to work.
36613       new_path="$CYGWIN_ROOT_PATH$input_path"
36614     fi
36615   fi
36616 
36617   # remove trailing .exe if any
36618   new_path="${new_path/%.exe/}"
36619 
36620     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36621 
36622   # First separate the path from the arguments. This will split at the first
36623   # space.
36624   complete="$CPP"
36625   path="${complete%% *}"
36626   tmp="$complete EOL"
36627   arguments="${tmp#* }"
36628 
36629   # Input might be given as Windows format, start by converting to
36630   # unix format.
36631   new_path="$path"
36632 
36633   windows_path="$new_path"
36634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36635     unix_path=`$CYGPATH -u "$windows_path"`
36636     new_path="$unix_path"
36637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36639     new_path="$unix_path"
36640   fi
36641 
36642 
36643   # Now try to locate executable using which
36644   new_path=`$WHICH "$new_path" 2> /dev/null`
36645 
36646   if test "x$new_path" = x; then
36647     # Oops. Which didn't find the executable.
36648     # The splitting of arguments from the executable at a space might have been incorrect,
36649     # since paths with space are more likely in Windows. Give it another try with the whole
36650     # argument.
36651     path="$complete"
36652     arguments="EOL"
36653     new_path="$path"
36654 
36655   windows_path="$new_path"
36656   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36657     unix_path=`$CYGPATH -u "$windows_path"`
36658     new_path="$unix_path"
36659   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36660     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36661     new_path="$unix_path"
36662   fi
36663 
36664 
36665     new_path=`$WHICH "$new_path" 2> /dev/null`
36666     # bat and cmd files are not always considered executable in MSYS causing which
36667     # to not find them
36668     if test "x$new_path" = x \
36669         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36670         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36671       new_path="$path"
36672 
36673   windows_path="$new_path"
36674   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36675     unix_path=`$CYGPATH -u "$windows_path"`
36676     new_path="$unix_path"
36677   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36678     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36679     new_path="$unix_path"
36680   fi
36681 
36682     fi
36683 
36684     if test "x$new_path" = x; then
36685       # It's still not found. Now this is an unrecoverable error.
36686       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36687 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36688       has_space=`$ECHO "$complete" | $GREP " "`
36689       if test "x$has_space" != x; then
36690         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36691 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36692       fi
36693       as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36694     fi
36695   fi
36696 
36697   # Now new_path has a complete unix path to the binary
36698   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36699     # Keep paths in /bin as-is, but remove trailing .exe if any
36700     new_path="${new_path/%.exe/}"
36701     # Do not save /bin paths to all_fixpath_prefixes!
36702   else
36703     # Not in mixed or Windows style, start by that.
36704     new_path=`cmd //c echo $new_path`
36705 
36706   input_path="$new_path"
36707   # Check if we need to convert this using DOS-style short mode. If the path
36708   # contains just simple characters, use it. Otherwise (spaces, weird characters),
36709   # take no chances and rewrite it.
36710   # Note: m4 eats our [], so we need to use [ and ] instead.
36711   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36712   if test "x$has_forbidden_chars" != x; then
36713     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36714     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36715   fi
36716 
36717     # Output is in $new_path
36718 
36719   windows_path="$new_path"
36720   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36721     unix_path=`$CYGPATH -u "$windows_path"`
36722     new_path="$unix_path"
36723   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36724     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36725     new_path="$unix_path"
36726   fi
36727 
36728     # remove trailing .exe if any
36729     new_path="${new_path/%.exe/}"
36730 
36731     # Save the first 10 bytes of this path to the storage, so fixpath can work.
36732     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36733   fi
36734 
36735     else
36736       # We're on a unix platform. Hooray! :)
36737       # First separate the path from the arguments. This will split at the first
36738       # space.
36739       complete="$CPP"
36740       path="${complete%% *}"
36741       tmp="$complete EOL"
36742       arguments="${tmp#* }"
36743 
36744       # Cannot rely on the command "which" here since it doesn't always work.
36745       is_absolute_path=`$ECHO "$path" | $GREP ^/`
36746       if test -z "$is_absolute_path"; then
36747         # Path to executable is not absolute. Find it.
36748         IFS_save="$IFS"
36749         IFS=:
36750         for p in $PATH; do
36751           if test -f "$p/$path" && test -x "$p/$path"; then
36752             new_path="$p/$path"
36753             break
36754           fi
36755         done
36756         IFS="$IFS_save"
36757       else
36758         # This is an absolute path, we can use it without further modifications.
36759         new_path="$path"
36760       fi
36761 
36762       if test "x$new_path" = x; then
36763         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36764 $as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36765         has_space=`$ECHO "$complete" | $GREP " "`
36766         if test "x$has_space" != x; then
36767           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36768 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36769         fi
36770         as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36771       fi
36772     fi
36773 
36774     # Now join together the path and the arguments once again
36775     if test "x$arguments" != xEOL; then
36776       new_complete="$new_path ${arguments% *}"
36777     else
36778       new_complete="$new_path"
36779     fi
36780 
36781     if test "x$complete" != "x$new_complete"; then
36782       CPP="$new_complete"
36783       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36784 $as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36785     fi
36786   fi
36787 
36788   ac_ext=cpp
36789 ac_cpp='$CXXCPP $CPPFLAGS'
36790 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36791 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36792 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36794 $as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36795 if test -z "$CXXCPP"; then
36796   if ${ac_cv_prog_CXXCPP+:} false; then :
36797   $as_echo_n "(cached) " >&6
36798 else
36799       # Double quotes because CXXCPP needs to be expanded
36800     for CXXCPP in "$CXX -E" "/lib/cpp"
36801     do
36802       ac_preproc_ok=false
36803 for ac_cxx_preproc_warn_flag in '' yes
36804 do
36805   # Use a header file that comes with gcc, so configuring glibc
36806   # with a fresh cross-compiler works.
36807   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36808   # <limits.h> exists even on freestanding compilers.
36809   # On the NeXT, cc -E runs the code through the compiler's parser,
36810   # not just through cpp. "Syntax error" is here to catch this case.
36811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36812 /* end confdefs.h.  */
36813 #ifdef __STDC__
36814 # include <limits.h>
36815 #else
36816 # include <assert.h>
36817 #endif
36818                      Syntax error
36819 _ACEOF
36820 if ac_fn_cxx_try_cpp "$LINENO"; then :
36821 
36822 else
36823   # Broken: fails on valid input.
36824 continue
36825 fi
36826 rm -f conftest.err conftest.i conftest.$ac_ext
36827 
36828   # OK, works on sane cases.  Now check whether nonexistent headers
36829   # can be detected and how.
36830   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36831 /* end confdefs.h.  */
36832 #include <ac_nonexistent.h>
36833 _ACEOF
36834 if ac_fn_cxx_try_cpp "$LINENO"; then :
36835   # Broken: success on invalid input.
36836 continue
36837 else
36838   # Passes both tests.
36839 ac_preproc_ok=:
36840 break
36841 fi
36842 rm -f conftest.err conftest.i conftest.$ac_ext
36843 
36844 done
36845 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36846 rm -f conftest.i conftest.err conftest.$ac_ext
36847 if $ac_preproc_ok; then :
36848   break
36849 fi
36850 
36851     done
36852     ac_cv_prog_CXXCPP=$CXXCPP
36853 
36854 fi
36855   CXXCPP=$ac_cv_prog_CXXCPP
36856 else
36857   ac_cv_prog_CXXCPP=$CXXCPP
36858 fi
36859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36860 $as_echo "$CXXCPP" >&6; }
36861 ac_preproc_ok=false
36862 for ac_cxx_preproc_warn_flag in '' yes
36863 do
36864   # Use a header file that comes with gcc, so configuring glibc
36865   # with a fresh cross-compiler works.
36866   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36867   # <limits.h> exists even on freestanding compilers.
36868   # On the NeXT, cc -E runs the code through the compiler's parser,
36869   # not just through cpp. "Syntax error" is here to catch this case.
36870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36871 /* end confdefs.h.  */
36872 #ifdef __STDC__
36873 # include <limits.h>
36874 #else
36875 # include <assert.h>
36876 #endif
36877                      Syntax error
36878 _ACEOF
36879 if ac_fn_cxx_try_cpp "$LINENO"; then :
36880 
36881 else
36882   # Broken: fails on valid input.
36883 continue
36884 fi
36885 rm -f conftest.err conftest.i conftest.$ac_ext
36886 
36887   # OK, works on sane cases.  Now check whether nonexistent headers
36888   # can be detected and how.
36889   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36890 /* end confdefs.h.  */
36891 #include <ac_nonexistent.h>
36892 _ACEOF
36893 if ac_fn_cxx_try_cpp "$LINENO"; then :
36894   # Broken: success on invalid input.
36895 continue
36896 else
36897   # Passes both tests.
36898 ac_preproc_ok=:
36899 break
36900 fi
36901 rm -f conftest.err conftest.i conftest.$ac_ext
36902 
36903 done
36904 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36905 rm -f conftest.i conftest.err conftest.$ac_ext
36906 if $ac_preproc_ok; then :
36907 
36908 else
36909   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36910 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36911 as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36912 See \`config.log' for more details" "$LINENO" 5; }
36913 fi
36914 
36915 ac_ext=cpp
36916 ac_cpp='$CXXCPP $CPPFLAGS'
36917 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36918 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36919 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36920 
36921 
36922   # Only process if variable expands to non-empty
36923 
36924   if test "x$CXXCPP" != x; then
36925     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36926 
36927   # First separate the path from the arguments. This will split at the first
36928   # space.
36929   complete="$CXXCPP"
36930   path="${complete%% *}"
36931   tmp="$complete EOL"
36932   arguments="${tmp#* }"
36933 
36934   # Input might be given as Windows format, start by converting to
36935   # unix format.
36936   new_path=`$CYGPATH -u "$path"`
36937 
36938   # Now try to locate executable using which
36939   new_path=`$WHICH "$new_path" 2> /dev/null`
36940   # bat and cmd files are not always considered executable in cygwin causing which
36941   # to not find them
36942   if test "x$new_path" = x \
36943       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36944       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36945     new_path=`$CYGPATH -u "$path"`
36946   fi
36947   if test "x$new_path" = x; then
36948     # Oops. Which didn't find the executable.
36949     # The splitting of arguments from the executable at a space might have been incorrect,
36950     # since paths with space are more likely in Windows. Give it another try with the whole
36951     # argument.
36952     path="$complete"
36953     arguments="EOL"
36954     new_path=`$CYGPATH -u "$path"`
36955     new_path=`$WHICH "$new_path" 2> /dev/null`
36956     # bat and cmd files are not always considered executable in cygwin causing which
36957     # to not find them
36958     if test "x$new_path" = x \
36959         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36960         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36961       new_path=`$CYGPATH -u "$path"`
36962     fi
36963     if test "x$new_path" = x; then
36964       # It's still not found. Now this is an unrecoverable error.
36965       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36966 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36967       has_space=`$ECHO "$complete" | $GREP " "`
36968       if test "x$has_space" != x; then
36969         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36970 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36971       fi
36972       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36973     fi
36974   fi
36975 
36976   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36977   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36978   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36979   # "foo.exe" is OK but "foo" is an error.
36980   #
36981   # This test is therefore slightly more accurate than "test -f" to check for file presence.
36982   # It is also a way to make sure we got the proper file name for the real test later on.
36983   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36984   if test "x$test_shortpath" = x; then
36985     # Short path failed, file does not exist as specified.
36986     # Try adding .exe or .cmd
36987     if test -f "${new_path}.exe"; then
36988       input_to_shortpath="${new_path}.exe"
36989     elif test -f "${new_path}.cmd"; then
36990       input_to_shortpath="${new_path}.cmd"
36991     else
36992       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36993 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36994       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36995 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36996       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36997     fi
36998   else
36999     input_to_shortpath="$new_path"
37000   fi
37001 
37002   # Call helper function which possibly converts this using DOS-style short mode.
37003   # If so, the updated path is stored in $new_path.
37004   new_path="$input_to_shortpath"
37005 
37006   input_path="$input_to_shortpath"
37007   # Check if we need to convert this using DOS-style short mode. If the path
37008   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37009   # take no chances and rewrite it.
37010   # Note: m4 eats our [], so we need to use [ and ] instead.
37011   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37012   if test "x$has_forbidden_chars" != x; then
37013     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37014     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37015     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37016     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37017       # Going to short mode and back again did indeed matter. Since short mode is
37018       # case insensitive, let's make it lowercase to improve readability.
37019       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37020       # Now convert it back to Unix-style (cygpath)
37021       input_path=`$CYGPATH -u "$shortmode_path"`
37022       new_path="$input_path"
37023     fi
37024   fi
37025 
37026   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37027   if test "x$test_cygdrive_prefix" = x; then
37028     # As a simple fix, exclude /usr/bin since it's not a real path.
37029     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37030       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37031       # a path prefixed by /cygdrive for fixpath to work.
37032       new_path="$CYGWIN_ROOT_PATH$input_path"
37033     fi
37034   fi
37035 
37036   # remove trailing .exe if any
37037   new_path="${new_path/%.exe/}"
37038 
37039     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37040 
37041   # First separate the path from the arguments. This will split at the first
37042   # space.
37043   complete="$CXXCPP"
37044   path="${complete%% *}"
37045   tmp="$complete EOL"
37046   arguments="${tmp#* }"
37047 
37048   # Input might be given as Windows format, start by converting to
37049   # unix format.
37050   new_path="$path"
37051 
37052   windows_path="$new_path"
37053   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37054     unix_path=`$CYGPATH -u "$windows_path"`
37055     new_path="$unix_path"
37056   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37057     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37058     new_path="$unix_path"
37059   fi
37060 
37061 
37062   # Now try to locate executable using which
37063   new_path=`$WHICH "$new_path" 2> /dev/null`
37064 
37065   if test "x$new_path" = x; then
37066     # Oops. Which didn't find the executable.
37067     # The splitting of arguments from the executable at a space might have been incorrect,
37068     # since paths with space are more likely in Windows. Give it another try with the whole
37069     # argument.
37070     path="$complete"
37071     arguments="EOL"
37072     new_path="$path"
37073 
37074   windows_path="$new_path"
37075   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37076     unix_path=`$CYGPATH -u "$windows_path"`
37077     new_path="$unix_path"
37078   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37079     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37080     new_path="$unix_path"
37081   fi
37082 
37083 
37084     new_path=`$WHICH "$new_path" 2> /dev/null`
37085     # bat and cmd files are not always considered executable in MSYS causing which
37086     # to not find them
37087     if test "x$new_path" = x \
37088         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37089         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37090       new_path="$path"
37091 
37092   windows_path="$new_path"
37093   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37094     unix_path=`$CYGPATH -u "$windows_path"`
37095     new_path="$unix_path"
37096   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37097     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37098     new_path="$unix_path"
37099   fi
37100 
37101     fi
37102 
37103     if test "x$new_path" = x; then
37104       # It's still not found. Now this is an unrecoverable error.
37105       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37106 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37107       has_space=`$ECHO "$complete" | $GREP " "`
37108       if test "x$has_space" != x; then
37109         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37110 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37111       fi
37112       as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37113     fi
37114   fi
37115 
37116   # Now new_path has a complete unix path to the binary
37117   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37118     # Keep paths in /bin as-is, but remove trailing .exe if any
37119     new_path="${new_path/%.exe/}"
37120     # Do not save /bin paths to all_fixpath_prefixes!
37121   else
37122     # Not in mixed or Windows style, start by that.
37123     new_path=`cmd //c echo $new_path`
37124 
37125   input_path="$new_path"
37126   # Check if we need to convert this using DOS-style short mode. If the path
37127   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37128   # take no chances and rewrite it.
37129   # Note: m4 eats our [], so we need to use [ and ] instead.
37130   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37131   if test "x$has_forbidden_chars" != x; then
37132     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37133     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37134   fi
37135 
37136     # Output is in $new_path
37137 
37138   windows_path="$new_path"
37139   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37140     unix_path=`$CYGPATH -u "$windows_path"`
37141     new_path="$unix_path"
37142   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37143     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37144     new_path="$unix_path"
37145   fi
37146 
37147     # remove trailing .exe if any
37148     new_path="${new_path/%.exe/}"
37149 
37150     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37151     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37152   fi
37153 
37154     else
37155       # We're on a unix platform. Hooray! :)
37156       # First separate the path from the arguments. This will split at the first
37157       # space.
37158       complete="$CXXCPP"
37159       path="${complete%% *}"
37160       tmp="$complete EOL"
37161       arguments="${tmp#* }"
37162 
37163       # Cannot rely on the command "which" here since it doesn't always work.
37164       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37165       if test -z "$is_absolute_path"; then
37166         # Path to executable is not absolute. Find it.
37167         IFS_save="$IFS"
37168         IFS=:
37169         for p in $PATH; do
37170           if test -f "$p/$path" && test -x "$p/$path"; then
37171             new_path="$p/$path"
37172             break
37173           fi
37174         done
37175         IFS="$IFS_save"
37176       else
37177         # This is an absolute path, we can use it without further modifications.
37178         new_path="$path"
37179       fi
37180 
37181       if test "x$new_path" = x; then
37182         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
37183 $as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
37184         has_space=`$ECHO "$complete" | $GREP " "`
37185         if test "x$has_space" != x; then
37186           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37187 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37188         fi
37189         as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
37190       fi
37191     fi
37192 
37193     # Now join together the path and the arguments once again
37194     if test "x$arguments" != xEOL; then
37195       new_complete="$new_path ${arguments% *}"
37196     else
37197       new_complete="$new_path"
37198     fi
37199 
37200     if test "x$complete" != "x$new_complete"; then
37201       CXXCPP="$new_complete"
37202       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
37203 $as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
37204     fi
37205   fi
37206 
37207 
37208   #
37209   # Setup the linker (LD)
37210   #
37211   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37212     # In the Microsoft toolchain we have a separate LD command "link".
37213     # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
37214     # a cygwin program for something completely different.
37215     # Extract the first word of "link", so it can be a program name with args.
37216 set dummy link; ac_word=$2
37217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37218 $as_echo_n "checking for $ac_word... " >&6; }
37219 if ${ac_cv_prog_LD+:} false; then :
37220   $as_echo_n "(cached) " >&6
37221 else
37222   if test -n "$LD"; then
37223   ac_cv_prog_LD="$LD" # Let the user override the test.
37224 else
37225   ac_prog_rejected=no
37226 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37227 for as_dir in $PATH
37228 do
37229   IFS=$as_save_IFS
37230   test -z "$as_dir" && as_dir=.
37231     for ac_exec_ext in '' $ac_executable_extensions; do
37232   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37233     if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
37234        ac_prog_rejected=yes
37235        continue
37236      fi
37237     ac_cv_prog_LD="link"
37238     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239     break 2
37240   fi
37241 done
37242   done
37243 IFS=$as_save_IFS
37244 
37245 if test $ac_prog_rejected = yes; then
37246   # We found a bogon in the path, so make sure we never use it.
37247   set dummy $ac_cv_prog_LD
37248   shift
37249   if test $# != 0; then
37250     # We chose a different compiler from the bogus one.
37251     # However, it has the same basename, so the bogon will be chosen
37252     # first if we set LD to just the basename; use the full file name.
37253     shift
37254     ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
37255   fi
37256 fi
37257 fi
37258 fi
37259 LD=$ac_cv_prog_LD
37260 if test -n "$LD"; then
37261   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
37262 $as_echo "$LD" >&6; }
37263 else
37264   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37265 $as_echo "no" >&6; }
37266 fi
37267 
37268 
37269 
37270   # Only process if variable expands to non-empty
37271 
37272   if test "x$LD" != x; then
37273     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37274 
37275   # First separate the path from the arguments. This will split at the first
37276   # space.
37277   complete="$LD"
37278   path="${complete%% *}"
37279   tmp="$complete EOL"
37280   arguments="${tmp#* }"
37281 
37282   # Input might be given as Windows format, start by converting to
37283   # unix format.
37284   new_path=`$CYGPATH -u "$path"`
37285 
37286   # Now try to locate executable using which
37287   new_path=`$WHICH "$new_path" 2> /dev/null`
37288   # bat and cmd files are not always considered executable in cygwin causing which
37289   # to not find them
37290   if test "x$new_path" = x \
37291       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37292       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37293     new_path=`$CYGPATH -u "$path"`
37294   fi
37295   if test "x$new_path" = x; then
37296     # Oops. Which didn't find the executable.
37297     # The splitting of arguments from the executable at a space might have been incorrect,
37298     # since paths with space are more likely in Windows. Give it another try with the whole
37299     # argument.
37300     path="$complete"
37301     arguments="EOL"
37302     new_path=`$CYGPATH -u "$path"`
37303     new_path=`$WHICH "$new_path" 2> /dev/null`
37304     # bat and cmd files are not always considered executable in cygwin causing which
37305     # to not find them
37306     if test "x$new_path" = x \
37307         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37308         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37309       new_path=`$CYGPATH -u "$path"`
37310     fi
37311     if test "x$new_path" = x; then
37312       # It's still not found. Now this is an unrecoverable error.
37313       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37314 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37315       has_space=`$ECHO "$complete" | $GREP " "`
37316       if test "x$has_space" != x; then
37317         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37318 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37319       fi
37320       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37321     fi
37322   fi
37323 
37324   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37325   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37326   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37327   # "foo.exe" is OK but "foo" is an error.
37328   #
37329   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37330   # It is also a way to make sure we got the proper file name for the real test later on.
37331   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37332   if test "x$test_shortpath" = x; then
37333     # Short path failed, file does not exist as specified.
37334     # Try adding .exe or .cmd
37335     if test -f "${new_path}.exe"; then
37336       input_to_shortpath="${new_path}.exe"
37337     elif test -f "${new_path}.cmd"; then
37338       input_to_shortpath="${new_path}.cmd"
37339     else
37340       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
37341 $as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
37342       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37343 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37344       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37345     fi
37346   else
37347     input_to_shortpath="$new_path"
37348   fi
37349 
37350   # Call helper function which possibly converts this using DOS-style short mode.
37351   # If so, the updated path is stored in $new_path.
37352   new_path="$input_to_shortpath"
37353 
37354   input_path="$input_to_shortpath"
37355   # Check if we need to convert this using DOS-style short mode. If the path
37356   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37357   # take no chances and rewrite it.
37358   # Note: m4 eats our [], so we need to use [ and ] instead.
37359   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37360   if test "x$has_forbidden_chars" != x; then
37361     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37362     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37363     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37364     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37365       # Going to short mode and back again did indeed matter. Since short mode is
37366       # case insensitive, let's make it lowercase to improve readability.
37367       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37368       # Now convert it back to Unix-style (cygpath)
37369       input_path=`$CYGPATH -u "$shortmode_path"`
37370       new_path="$input_path"
37371     fi
37372   fi
37373 
37374   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37375   if test "x$test_cygdrive_prefix" = x; then
37376     # As a simple fix, exclude /usr/bin since it's not a real path.
37377     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37378       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37379       # a path prefixed by /cygdrive for fixpath to work.
37380       new_path="$CYGWIN_ROOT_PATH$input_path"
37381     fi
37382   fi
37383 
37384   # remove trailing .exe if any
37385   new_path="${new_path/%.exe/}"
37386 
37387     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37388 
37389   # First separate the path from the arguments. This will split at the first
37390   # space.
37391   complete="$LD"
37392   path="${complete%% *}"
37393   tmp="$complete EOL"
37394   arguments="${tmp#* }"
37395 
37396   # Input might be given as Windows format, start by converting to
37397   # unix format.
37398   new_path="$path"
37399 
37400   windows_path="$new_path"
37401   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37402     unix_path=`$CYGPATH -u "$windows_path"`
37403     new_path="$unix_path"
37404   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37405     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37406     new_path="$unix_path"
37407   fi
37408 
37409 
37410   # Now try to locate executable using which
37411   new_path=`$WHICH "$new_path" 2> /dev/null`
37412 
37413   if test "x$new_path" = x; then
37414     # Oops. Which didn't find the executable.
37415     # The splitting of arguments from the executable at a space might have been incorrect,
37416     # since paths with space are more likely in Windows. Give it another try with the whole
37417     # argument.
37418     path="$complete"
37419     arguments="EOL"
37420     new_path="$path"
37421 
37422   windows_path="$new_path"
37423   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37424     unix_path=`$CYGPATH -u "$windows_path"`
37425     new_path="$unix_path"
37426   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37427     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37428     new_path="$unix_path"
37429   fi
37430 
37431 
37432     new_path=`$WHICH "$new_path" 2> /dev/null`
37433     # bat and cmd files are not always considered executable in MSYS causing which
37434     # to not find them
37435     if test "x$new_path" = x \
37436         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37437         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37438       new_path="$path"
37439 
37440   windows_path="$new_path"
37441   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37442     unix_path=`$CYGPATH -u "$windows_path"`
37443     new_path="$unix_path"
37444   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37445     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37446     new_path="$unix_path"
37447   fi
37448 
37449     fi
37450 
37451     if test "x$new_path" = x; then
37452       # It's still not found. Now this is an unrecoverable error.
37453       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37454 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37455       has_space=`$ECHO "$complete" | $GREP " "`
37456       if test "x$has_space" != x; then
37457         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37458 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37459       fi
37460       as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37461     fi
37462   fi
37463 
37464   # Now new_path has a complete unix path to the binary
37465   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37466     # Keep paths in /bin as-is, but remove trailing .exe if any
37467     new_path="${new_path/%.exe/}"
37468     # Do not save /bin paths to all_fixpath_prefixes!
37469   else
37470     # Not in mixed or Windows style, start by that.
37471     new_path=`cmd //c echo $new_path`
37472 
37473   input_path="$new_path"
37474   # Check if we need to convert this using DOS-style short mode. If the path
37475   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37476   # take no chances and rewrite it.
37477   # Note: m4 eats our [], so we need to use [ and ] instead.
37478   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37479   if test "x$has_forbidden_chars" != x; then
37480     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37481     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37482   fi
37483 
37484     # Output is in $new_path
37485 
37486   windows_path="$new_path"
37487   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37488     unix_path=`$CYGPATH -u "$windows_path"`
37489     new_path="$unix_path"
37490   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37491     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37492     new_path="$unix_path"
37493   fi
37494 
37495     # remove trailing .exe if any
37496     new_path="${new_path/%.exe/}"
37497 
37498     # Save the first 10 bytes of this path to the storage, so fixpath can work.
37499     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37500   fi
37501 
37502     else
37503       # We're on a unix platform. Hooray! :)
37504       # First separate the path from the arguments. This will split at the first
37505       # space.
37506       complete="$LD"
37507       path="${complete%% *}"
37508       tmp="$complete EOL"
37509       arguments="${tmp#* }"
37510 
37511       # Cannot rely on the command "which" here since it doesn't always work.
37512       is_absolute_path=`$ECHO "$path" | $GREP ^/`
37513       if test -z "$is_absolute_path"; then
37514         # Path to executable is not absolute. Find it.
37515         IFS_save="$IFS"
37516         IFS=:
37517         for p in $PATH; do
37518           if test -f "$p/$path" && test -x "$p/$path"; then
37519             new_path="$p/$path"
37520             break
37521           fi
37522         done
37523         IFS="$IFS_save"
37524       else
37525         # This is an absolute path, we can use it without further modifications.
37526         new_path="$path"
37527       fi
37528 
37529       if test "x$new_path" = x; then
37530         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
37531 $as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
37532         has_space=`$ECHO "$complete" | $GREP " "`
37533         if test "x$has_space" != x; then
37534           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37535 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37536         fi
37537         as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
37538       fi
37539     fi
37540 
37541     # Now join together the path and the arguments once again
37542     if test "x$arguments" != xEOL; then
37543       new_complete="$new_path ${arguments% *}"
37544     else
37545       new_complete="$new_path"
37546     fi
37547 
37548     if test "x$complete" != "x$new_complete"; then
37549       LD="$new_complete"
37550       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37551 $as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37552     fi
37553   fi
37554 
37555     # Verify that we indeed succeeded with this trick.
37556     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37557 $as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37558     "$LD" --version > /dev/null
37559     if test $? -eq 0 ; then
37560       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561 $as_echo "no" >&6; }
37562       as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37563     else
37564       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37565 $as_echo "yes" >&6; }
37566     fi
37567     LDCXX="$LD"
37568   else
37569     # All other toolchains use the compiler to link.
37570     LD="$CC"
37571     LDCXX="$CXX"
37572   fi
37573 
37574   # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37575 
37576 
37577   #
37578   # Setup the assembler (AS)
37579   #
37580   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37581 
37582 
37583   # Publish this variable in the help.
37584 
37585 
37586   if [ -z "${AS+x}" ]; then
37587     # The variable is not set by user, try to locate tool using the code snippet
37588     for ac_prog in as
37589 do
37590   # Extract the first word of "$ac_prog", so it can be a program name with args.
37591 set dummy $ac_prog; ac_word=$2
37592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37593 $as_echo_n "checking for $ac_word... " >&6; }
37594 if ${ac_cv_path_AS+:} false; then :
37595   $as_echo_n "(cached) " >&6
37596 else
37597   case $AS in
37598   [\\/]* | ?:[\\/]*)
37599   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37600   ;;
37601   *)
37602   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37603 for as_dir in $PATH
37604 do
37605   IFS=$as_save_IFS
37606   test -z "$as_dir" && as_dir=.
37607     for ac_exec_ext in '' $ac_executable_extensions; do
37608   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37609     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37610     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37611     break 2
37612   fi
37613 done
37614   done
37615 IFS=$as_save_IFS
37616 
37617   ;;
37618 esac
37619 fi
37620 AS=$ac_cv_path_AS
37621 if test -n "$AS"; then
37622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37623 $as_echo "$AS" >&6; }
37624 else
37625   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37626 $as_echo "no" >&6; }
37627 fi
37628 
37629 
37630   test -n "$AS" && break
37631 done
37632 
37633   else
37634     # The variable is set, but is it from the command line or the environment?
37635 
37636     # Try to remove the string !AS! from our list.
37637     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37638     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37639       # If it failed, the variable was not from the command line. Ignore it,
37640       # but warn the user (except for BASH, which is always set by the calling BASH).
37641       if test "xAS" != xBASH; then
37642         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37643 $as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37644       fi
37645       # Try to locate tool using the code snippet
37646       for ac_prog in as
37647 do
37648   # Extract the first word of "$ac_prog", so it can be a program name with args.
37649 set dummy $ac_prog; ac_word=$2
37650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37651 $as_echo_n "checking for $ac_word... " >&6; }
37652 if ${ac_cv_path_AS+:} false; then :
37653   $as_echo_n "(cached) " >&6
37654 else
37655   case $AS in
37656   [\\/]* | ?:[\\/]*)
37657   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37658   ;;
37659   *)
37660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37661 for as_dir in $PATH
37662 do
37663   IFS=$as_save_IFS
37664   test -z "$as_dir" && as_dir=.
37665     for ac_exec_ext in '' $ac_executable_extensions; do
37666   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37667     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37668     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37669     break 2
37670   fi
37671 done
37672   done
37673 IFS=$as_save_IFS
37674 
37675   ;;
37676 esac
37677 fi
37678 AS=$ac_cv_path_AS
37679 if test -n "$AS"; then
37680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37681 $as_echo "$AS" >&6; }
37682 else
37683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37684 $as_echo "no" >&6; }
37685 fi
37686 
37687 
37688   test -n "$AS" && break
37689 done
37690 
37691     else
37692       # If it succeeded, then it was overridden by the user. We will use it
37693       # for the tool.
37694 
37695       # First remove it from the list of overridden variables, so we can test
37696       # for unknown variables in the end.
37697       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37698 
37699       # Check if we try to supply an empty value
37700       if test "x$AS" = x; then
37701         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37702 $as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37703         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37704 $as_echo_n "checking for AS... " >&6; }
37705         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37706 $as_echo "disabled" >&6; }
37707       else
37708         # Check if the provided tool contains a complete path.
37709         tool_specified="$AS"
37710         tool_basename="${tool_specified##*/}"
37711         if test "x$tool_basename" = "x$tool_specified"; then
37712           # A command without a complete path is provided, search $PATH.
37713           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37714 $as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37715           # Extract the first word of "$tool_basename", so it can be a program name with args.
37716 set dummy $tool_basename; ac_word=$2
37717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37718 $as_echo_n "checking for $ac_word... " >&6; }
37719 if ${ac_cv_path_AS+:} false; then :
37720   $as_echo_n "(cached) " >&6
37721 else
37722   case $AS in
37723   [\\/]* | ?:[\\/]*)
37724   ac_cv_path_AS="$AS" # Let the user override the test with a path.
37725   ;;
37726   *)
37727   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37728 for as_dir in $PATH
37729 do
37730   IFS=$as_save_IFS
37731   test -z "$as_dir" && as_dir=.
37732     for ac_exec_ext in '' $ac_executable_extensions; do
37733   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37734     ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37735     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37736     break 2
37737   fi
37738 done
37739   done
37740 IFS=$as_save_IFS
37741 
37742   ;;
37743 esac
37744 fi
37745 AS=$ac_cv_path_AS
37746 if test -n "$AS"; then
37747   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37748 $as_echo "$AS" >&6; }
37749 else
37750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37751 $as_echo "no" >&6; }
37752 fi
37753 
37754 
37755           if test "x$AS" = x; then
37756             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37757           fi
37758         else
37759           # Otherwise we believe it is a complete path. Use it as it is.
37760           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37761 $as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37762           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37763 $as_echo_n "checking for AS... " >&6; }
37764           if test ! -x "$tool_specified"; then
37765             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37766 $as_echo "not found" >&6; }
37767             as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37768           fi
37769           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37770 $as_echo "$tool_specified" >&6; }
37771         fi
37772       fi
37773     fi
37774 
37775   fi
37776 
37777 
37778 
37779   # Only process if variable expands to non-empty
37780 
37781   if test "x$AS" != x; then
37782     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37783 
37784   # First separate the path from the arguments. This will split at the first
37785   # space.
37786   complete="$AS"
37787   path="${complete%% *}"
37788   tmp="$complete EOL"
37789   arguments="${tmp#* }"
37790 
37791   # Input might be given as Windows format, start by converting to
37792   # unix format.
37793   new_path=`$CYGPATH -u "$path"`
37794 
37795   # Now try to locate executable using which
37796   new_path=`$WHICH "$new_path" 2> /dev/null`
37797   # bat and cmd files are not always considered executable in cygwin causing which
37798   # to not find them
37799   if test "x$new_path" = x \
37800       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37801       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37802     new_path=`$CYGPATH -u "$path"`
37803   fi
37804   if test "x$new_path" = x; then
37805     # Oops. Which didn't find the executable.
37806     # The splitting of arguments from the executable at a space might have been incorrect,
37807     # since paths with space are more likely in Windows. Give it another try with the whole
37808     # argument.
37809     path="$complete"
37810     arguments="EOL"
37811     new_path=`$CYGPATH -u "$path"`
37812     new_path=`$WHICH "$new_path" 2> /dev/null`
37813     # bat and cmd files are not always considered executable in cygwin causing which
37814     # to not find them
37815     if test "x$new_path" = x \
37816         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37817         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37818       new_path=`$CYGPATH -u "$path"`
37819     fi
37820     if test "x$new_path" = x; then
37821       # It's still not found. Now this is an unrecoverable error.
37822       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37823 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37824       has_space=`$ECHO "$complete" | $GREP " "`
37825       if test "x$has_space" != x; then
37826         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37827 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37828       fi
37829       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37830     fi
37831   fi
37832 
37833   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37834   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37835   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37836   # "foo.exe" is OK but "foo" is an error.
37837   #
37838   # This test is therefore slightly more accurate than "test -f" to check for file presence.
37839   # It is also a way to make sure we got the proper file name for the real test later on.
37840   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37841   if test "x$test_shortpath" = x; then
37842     # Short path failed, file does not exist as specified.
37843     # Try adding .exe or .cmd
37844     if test -f "${new_path}.exe"; then
37845       input_to_shortpath="${new_path}.exe"
37846     elif test -f "${new_path}.cmd"; then
37847       input_to_shortpath="${new_path}.cmd"
37848     else
37849       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37850 $as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37851       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37852 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37853       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37854     fi
37855   else
37856     input_to_shortpath="$new_path"
37857   fi
37858 
37859   # Call helper function which possibly converts this using DOS-style short mode.
37860   # If so, the updated path is stored in $new_path.
37861   new_path="$input_to_shortpath"
37862 
37863   input_path="$input_to_shortpath"
37864   # Check if we need to convert this using DOS-style short mode. If the path
37865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37866   # take no chances and rewrite it.
37867   # Note: m4 eats our [], so we need to use [ and ] instead.
37868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37869   if test "x$has_forbidden_chars" != x; then
37870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37871     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37872     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37873     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37874       # Going to short mode and back again did indeed matter. Since short mode is
37875       # case insensitive, let's make it lowercase to improve readability.
37876       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37877       # Now convert it back to Unix-style (cygpath)
37878       input_path=`$CYGPATH -u "$shortmode_path"`
37879       new_path="$input_path"
37880     fi
37881   fi
37882 
37883   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37884   if test "x$test_cygdrive_prefix" = x; then
37885     # As a simple fix, exclude /usr/bin since it's not a real path.
37886     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37887       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37888       # a path prefixed by /cygdrive for fixpath to work.
37889       new_path="$CYGWIN_ROOT_PATH$input_path"
37890     fi
37891   fi
37892 
37893   # remove trailing .exe if any
37894   new_path="${new_path/%.exe/}"
37895 
37896     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37897 
37898   # First separate the path from the arguments. This will split at the first
37899   # space.
37900   complete="$AS"
37901   path="${complete%% *}"
37902   tmp="$complete EOL"
37903   arguments="${tmp#* }"
37904 
37905   # Input might be given as Windows format, start by converting to
37906   # unix format.
37907   new_path="$path"
37908 
37909   windows_path="$new_path"
37910   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37911     unix_path=`$CYGPATH -u "$windows_path"`
37912     new_path="$unix_path"
37913   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37914     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37915     new_path="$unix_path"
37916   fi
37917 
37918 
37919   # Now try to locate executable using which
37920   new_path=`$WHICH "$new_path" 2> /dev/null`
37921 
37922   if test "x$new_path" = x; then
37923     # Oops. Which didn't find the executable.
37924     # The splitting of arguments from the executable at a space might have been incorrect,
37925     # since paths with space are more likely in Windows. Give it another try with the whole
37926     # argument.
37927     path="$complete"
37928     arguments="EOL"
37929     new_path="$path"
37930 
37931   windows_path="$new_path"
37932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37933     unix_path=`$CYGPATH -u "$windows_path"`
37934     new_path="$unix_path"
37935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37937     new_path="$unix_path"
37938   fi
37939 
37940 
37941     new_path=`$WHICH "$new_path" 2> /dev/null`
37942     # bat and cmd files are not always considered executable in MSYS causing which
37943     # to not find them
37944     if test "x$new_path" = x \
37945         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37946         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37947       new_path="$path"
37948 
37949   windows_path="$new_path"
37950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37951     unix_path=`$CYGPATH -u "$windows_path"`
37952     new_path="$unix_path"
37953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37955     new_path="$unix_path"
37956   fi
37957 
37958     fi
37959 
37960     if test "x$new_path" = x; then
37961       # It's still not found. Now this is an unrecoverable error.
37962       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37963 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37964       has_space=`$ECHO "$complete" | $GREP " "`
37965       if test "x$has_space" != x; then
37966         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37967 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37968       fi
37969       as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37970     fi
37971   fi
37972 
37973   # Now new_path has a complete unix path to the binary
37974   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37975     # Keep paths in /bin as-is, but remove trailing .exe if any
37976     new_path="${new_path/%.exe/}"
37977     # Do not save /bin paths to all_fixpath_prefixes!
37978   else
37979     # Not in mixed or Windows style, start by that.
37980     new_path=`cmd //c echo $new_path`
37981 
37982   input_path="$new_path"
37983   # Check if we need to convert this using DOS-style short mode. If the path
37984   # contains just simple characters, use it. Otherwise (spaces, weird characters),
37985   # take no chances and rewrite it.
37986   # Note: m4 eats our [], so we need to use [ and ] instead.
37987   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37988   if test "x$has_forbidden_chars" != x; then
37989     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37990     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37991   fi
37992 
37993     # Output is in $new_path
37994 
37995   windows_path="$new_path"
37996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37997     unix_path=`$CYGPATH -u "$windows_path"`
37998     new_path="$unix_path"
37999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38000     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38001     new_path="$unix_path"
38002   fi
38003 
38004     # remove trailing .exe if any
38005     new_path="${new_path/%.exe/}"
38006 
38007     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38008     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38009   fi
38010 
38011     else
38012       # We're on a unix platform. Hooray! :)
38013       # First separate the path from the arguments. This will split at the first
38014       # space.
38015       complete="$AS"
38016       path="${complete%% *}"
38017       tmp="$complete EOL"
38018       arguments="${tmp#* }"
38019 
38020       # Cannot rely on the command "which" here since it doesn't always work.
38021       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38022       if test -z "$is_absolute_path"; then
38023         # Path to executable is not absolute. Find it.
38024         IFS_save="$IFS"
38025         IFS=:
38026         for p in $PATH; do
38027           if test -f "$p/$path" && test -x "$p/$path"; then
38028             new_path="$p/$path"
38029             break
38030           fi
38031         done
38032         IFS="$IFS_save"
38033       else
38034         # This is an absolute path, we can use it without further modifications.
38035         new_path="$path"
38036       fi
38037 
38038       if test "x$new_path" = x; then
38039         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
38040 $as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
38041         has_space=`$ECHO "$complete" | $GREP " "`
38042         if test "x$has_space" != x; then
38043           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38044 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38045         fi
38046         as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
38047       fi
38048     fi
38049 
38050     # Now join together the path and the arguments once again
38051     if test "x$arguments" != xEOL; then
38052       new_complete="$new_path ${arguments% *}"
38053     else
38054       new_complete="$new_path"
38055     fi
38056 
38057     if test "x$complete" != "x$new_complete"; then
38058       AS="$new_complete"
38059       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
38060 $as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
38061     fi
38062   fi
38063 
38064     if test "x$AS" = x; then
38065       as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
38066     fi
38067   else
38068     # FIXME: is this correct for microsoft?
38069     AS="$CC -c"
38070   fi
38071 
38072 
38073   #
38074   # Setup the archiver (AR)
38075   #
38076   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38077     # The corresponding ar tool is lib.exe (used to create static libraries)
38078     # Extract the first word of "lib", so it can be a program name with args.
38079 set dummy lib; ac_word=$2
38080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38081 $as_echo_n "checking for $ac_word... " >&6; }
38082 if ${ac_cv_prog_AR+:} false; then :
38083   $as_echo_n "(cached) " >&6
38084 else
38085   if test -n "$AR"; then
38086   ac_cv_prog_AR="$AR" # Let the user override the test.
38087 else
38088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38089 for as_dir in $PATH
38090 do
38091   IFS=$as_save_IFS
38092   test -z "$as_dir" && as_dir=.
38093     for ac_exec_ext in '' $ac_executable_extensions; do
38094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38095     ac_cv_prog_AR="lib"
38096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38097     break 2
38098   fi
38099 done
38100   done
38101 IFS=$as_save_IFS
38102 
38103 fi
38104 fi
38105 AR=$ac_cv_prog_AR
38106 if test -n "$AR"; then
38107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38108 $as_echo "$AR" >&6; }
38109 else
38110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38111 $as_echo "no" >&6; }
38112 fi
38113 
38114 
38115   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
38116 
38117 
38118   # Publish this variable in the help.
38119 
38120 
38121   if [ -z "${AR+x}" ]; then
38122     # The variable is not set by user, try to locate tool using the code snippet
38123     if test -n "$ac_tool_prefix"; then
38124   for ac_prog in ar gcc-ar
38125   do
38126     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38127 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38129 $as_echo_n "checking for $ac_word... " >&6; }
38130 if ${ac_cv_prog_AR+:} false; then :
38131   $as_echo_n "(cached) " >&6
38132 else
38133   if test -n "$AR"; then
38134   ac_cv_prog_AR="$AR" # Let the user override the test.
38135 else
38136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38137 for as_dir in $PATH
38138 do
38139   IFS=$as_save_IFS
38140   test -z "$as_dir" && as_dir=.
38141     for ac_exec_ext in '' $ac_executable_extensions; do
38142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38143     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38145     break 2
38146   fi
38147 done
38148   done
38149 IFS=$as_save_IFS
38150 
38151 fi
38152 fi
38153 AR=$ac_cv_prog_AR
38154 if test -n "$AR"; then
38155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38156 $as_echo "$AR" >&6; }
38157 else
38158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38159 $as_echo "no" >&6; }
38160 fi
38161 
38162 
38163     test -n "$AR" && break
38164   done
38165 fi
38166 if test -z "$AR"; then
38167   ac_ct_AR=$AR
38168   for ac_prog in ar gcc-ar
38169 do
38170   # Extract the first word of "$ac_prog", so it can be a program name with args.
38171 set dummy $ac_prog; ac_word=$2
38172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38173 $as_echo_n "checking for $ac_word... " >&6; }
38174 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38175   $as_echo_n "(cached) " >&6
38176 else
38177   if test -n "$ac_ct_AR"; then
38178   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38179 else
38180 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38181 for as_dir in $PATH
38182 do
38183   IFS=$as_save_IFS
38184   test -z "$as_dir" && as_dir=.
38185     for ac_exec_ext in '' $ac_executable_extensions; do
38186   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38187     ac_cv_prog_ac_ct_AR="$ac_prog"
38188     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38189     break 2
38190   fi
38191 done
38192   done
38193 IFS=$as_save_IFS
38194 
38195 fi
38196 fi
38197 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38198 if test -n "$ac_ct_AR"; then
38199   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38200 $as_echo "$ac_ct_AR" >&6; }
38201 else
38202   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38203 $as_echo "no" >&6; }
38204 fi
38205 
38206 
38207   test -n "$ac_ct_AR" && break
38208 done
38209 
38210   if test "x$ac_ct_AR" = x; then
38211     AR=""
38212   else
38213     case $cross_compiling:$ac_tool_warned in
38214 yes:)
38215 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38216 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38217 ac_tool_warned=yes ;;
38218 esac
38219     AR=$ac_ct_AR
38220   fi
38221 fi
38222 
38223   else
38224     # The variable is set, but is it from the command line or the environment?
38225 
38226     # Try to remove the string !AR! from our list.
38227     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38228     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38229       # If it failed, the variable was not from the command line. Ignore it,
38230       # but warn the user (except for BASH, which is always set by the calling BASH).
38231       if test "xAR" != xBASH; then
38232         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38233 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38234       fi
38235       # Try to locate tool using the code snippet
38236       if test -n "$ac_tool_prefix"; then
38237   for ac_prog in ar gcc-ar
38238   do
38239     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38240 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38242 $as_echo_n "checking for $ac_word... " >&6; }
38243 if ${ac_cv_prog_AR+:} false; then :
38244   $as_echo_n "(cached) " >&6
38245 else
38246   if test -n "$AR"; then
38247   ac_cv_prog_AR="$AR" # Let the user override the test.
38248 else
38249 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38250 for as_dir in $PATH
38251 do
38252   IFS=$as_save_IFS
38253   test -z "$as_dir" && as_dir=.
38254     for ac_exec_ext in '' $ac_executable_extensions; do
38255   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38256     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38257     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38258     break 2
38259   fi
38260 done
38261   done
38262 IFS=$as_save_IFS
38263 
38264 fi
38265 fi
38266 AR=$ac_cv_prog_AR
38267 if test -n "$AR"; then
38268   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38269 $as_echo "$AR" >&6; }
38270 else
38271   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38272 $as_echo "no" >&6; }
38273 fi
38274 
38275 
38276     test -n "$AR" && break
38277   done
38278 fi
38279 if test -z "$AR"; then
38280   ac_ct_AR=$AR
38281   for ac_prog in ar gcc-ar
38282 do
38283   # Extract the first word of "$ac_prog", so it can be a program name with args.
38284 set dummy $ac_prog; ac_word=$2
38285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38286 $as_echo_n "checking for $ac_word... " >&6; }
38287 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38288   $as_echo_n "(cached) " >&6
38289 else
38290   if test -n "$ac_ct_AR"; then
38291   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38292 else
38293 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38294 for as_dir in $PATH
38295 do
38296   IFS=$as_save_IFS
38297   test -z "$as_dir" && as_dir=.
38298     for ac_exec_ext in '' $ac_executable_extensions; do
38299   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38300     ac_cv_prog_ac_ct_AR="$ac_prog"
38301     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38302     break 2
38303   fi
38304 done
38305   done
38306 IFS=$as_save_IFS
38307 
38308 fi
38309 fi
38310 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38311 if test -n "$ac_ct_AR"; then
38312   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38313 $as_echo "$ac_ct_AR" >&6; }
38314 else
38315   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38316 $as_echo "no" >&6; }
38317 fi
38318 
38319 
38320   test -n "$ac_ct_AR" && break
38321 done
38322 
38323   if test "x$ac_ct_AR" = x; then
38324     AR=""
38325   else
38326     case $cross_compiling:$ac_tool_warned in
38327 yes:)
38328 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38329 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38330 ac_tool_warned=yes ;;
38331 esac
38332     AR=$ac_ct_AR
38333   fi
38334 fi
38335 
38336     else
38337       # If it succeeded, then it was overridden by the user. We will use it
38338       # for the tool.
38339 
38340       # First remove it from the list of overridden variables, so we can test
38341       # for unknown variables in the end.
38342       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38343 
38344       # Check if we try to supply an empty value
38345       if test "x$AR" = x; then
38346         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38347 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38348         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38349 $as_echo_n "checking for AR... " >&6; }
38350         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38351 $as_echo "disabled" >&6; }
38352       else
38353         # Check if the provided tool contains a complete path.
38354         tool_specified="$AR"
38355         tool_basename="${tool_specified##*/}"
38356         if test "x$tool_basename" = "x$tool_specified"; then
38357           # A command without a complete path is provided, search $PATH.
38358           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38359 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38360           # Extract the first word of "$tool_basename", so it can be a program name with args.
38361 set dummy $tool_basename; ac_word=$2
38362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38363 $as_echo_n "checking for $ac_word... " >&6; }
38364 if ${ac_cv_path_AR+:} false; then :
38365   $as_echo_n "(cached) " >&6
38366 else
38367   case $AR in
38368   [\\/]* | ?:[\\/]*)
38369   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38370   ;;
38371   *)
38372   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38373 for as_dir in $PATH
38374 do
38375   IFS=$as_save_IFS
38376   test -z "$as_dir" && as_dir=.
38377     for ac_exec_ext in '' $ac_executable_extensions; do
38378   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38379     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38380     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38381     break 2
38382   fi
38383 done
38384   done
38385 IFS=$as_save_IFS
38386 
38387   ;;
38388 esac
38389 fi
38390 AR=$ac_cv_path_AR
38391 if test -n "$AR"; then
38392   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38393 $as_echo "$AR" >&6; }
38394 else
38395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38396 $as_echo "no" >&6; }
38397 fi
38398 
38399 
38400           if test "x$AR" = x; then
38401             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38402           fi
38403         else
38404           # Otherwise we believe it is a complete path. Use it as it is.
38405           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38406 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38407           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38408 $as_echo_n "checking for AR... " >&6; }
38409           if test ! -x "$tool_specified"; then
38410             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38411 $as_echo "not found" >&6; }
38412             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38413           fi
38414           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38415 $as_echo "$tool_specified" >&6; }
38416         fi
38417       fi
38418     fi
38419 
38420   fi
38421 
38422 
38423   else
38424 
38425 
38426   # Publish this variable in the help.
38427 
38428 
38429   if [ -z "${AR+x}" ]; then
38430     # The variable is not set by user, try to locate tool using the code snippet
38431     if test -n "$ac_tool_prefix"; then
38432   for ac_prog in ar
38433   do
38434     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38435 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38437 $as_echo_n "checking for $ac_word... " >&6; }
38438 if ${ac_cv_prog_AR+:} false; then :
38439   $as_echo_n "(cached) " >&6
38440 else
38441   if test -n "$AR"; then
38442   ac_cv_prog_AR="$AR" # Let the user override the test.
38443 else
38444 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38445 for as_dir in $PATH
38446 do
38447   IFS=$as_save_IFS
38448   test -z "$as_dir" && as_dir=.
38449     for ac_exec_ext in '' $ac_executable_extensions; do
38450   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38451     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38452     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38453     break 2
38454   fi
38455 done
38456   done
38457 IFS=$as_save_IFS
38458 
38459 fi
38460 fi
38461 AR=$ac_cv_prog_AR
38462 if test -n "$AR"; then
38463   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38464 $as_echo "$AR" >&6; }
38465 else
38466   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38467 $as_echo "no" >&6; }
38468 fi
38469 
38470 
38471     test -n "$AR" && break
38472   done
38473 fi
38474 if test -z "$AR"; then
38475   ac_ct_AR=$AR
38476   for ac_prog in ar
38477 do
38478   # Extract the first word of "$ac_prog", so it can be a program name with args.
38479 set dummy $ac_prog; ac_word=$2
38480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38481 $as_echo_n "checking for $ac_word... " >&6; }
38482 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38483   $as_echo_n "(cached) " >&6
38484 else
38485   if test -n "$ac_ct_AR"; then
38486   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38487 else
38488 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38489 for as_dir in $PATH
38490 do
38491   IFS=$as_save_IFS
38492   test -z "$as_dir" && as_dir=.
38493     for ac_exec_ext in '' $ac_executable_extensions; do
38494   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38495     ac_cv_prog_ac_ct_AR="$ac_prog"
38496     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38497     break 2
38498   fi
38499 done
38500   done
38501 IFS=$as_save_IFS
38502 
38503 fi
38504 fi
38505 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38506 if test -n "$ac_ct_AR"; then
38507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38508 $as_echo "$ac_ct_AR" >&6; }
38509 else
38510   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38511 $as_echo "no" >&6; }
38512 fi
38513 
38514 
38515   test -n "$ac_ct_AR" && break
38516 done
38517 
38518   if test "x$ac_ct_AR" = x; then
38519     AR=""
38520   else
38521     case $cross_compiling:$ac_tool_warned in
38522 yes:)
38523 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38524 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38525 ac_tool_warned=yes ;;
38526 esac
38527     AR=$ac_ct_AR
38528   fi
38529 fi
38530 
38531   else
38532     # The variable is set, but is it from the command line or the environment?
38533 
38534     # Try to remove the string !AR! from our list.
38535     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
38536     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38537       # If it failed, the variable was not from the command line. Ignore it,
38538       # but warn the user (except for BASH, which is always set by the calling BASH).
38539       if test "xAR" != xBASH; then
38540         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
38541 $as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
38542       fi
38543       # Try to locate tool using the code snippet
38544       if test -n "$ac_tool_prefix"; then
38545   for ac_prog in ar
38546   do
38547     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38548 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38550 $as_echo_n "checking for $ac_word... " >&6; }
38551 if ${ac_cv_prog_AR+:} false; then :
38552   $as_echo_n "(cached) " >&6
38553 else
38554   if test -n "$AR"; then
38555   ac_cv_prog_AR="$AR" # Let the user override the test.
38556 else
38557 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38558 for as_dir in $PATH
38559 do
38560   IFS=$as_save_IFS
38561   test -z "$as_dir" && as_dir=.
38562     for ac_exec_ext in '' $ac_executable_extensions; do
38563   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38564     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38565     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38566     break 2
38567   fi
38568 done
38569   done
38570 IFS=$as_save_IFS
38571 
38572 fi
38573 fi
38574 AR=$ac_cv_prog_AR
38575 if test -n "$AR"; then
38576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38577 $as_echo "$AR" >&6; }
38578 else
38579   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38580 $as_echo "no" >&6; }
38581 fi
38582 
38583 
38584     test -n "$AR" && break
38585   done
38586 fi
38587 if test -z "$AR"; then
38588   ac_ct_AR=$AR
38589   for ac_prog in ar
38590 do
38591   # Extract the first word of "$ac_prog", so it can be a program name with args.
38592 set dummy $ac_prog; ac_word=$2
38593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38594 $as_echo_n "checking for $ac_word... " >&6; }
38595 if ${ac_cv_prog_ac_ct_AR+:} false; then :
38596   $as_echo_n "(cached) " >&6
38597 else
38598   if test -n "$ac_ct_AR"; then
38599   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38600 else
38601 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38602 for as_dir in $PATH
38603 do
38604   IFS=$as_save_IFS
38605   test -z "$as_dir" && as_dir=.
38606     for ac_exec_ext in '' $ac_executable_extensions; do
38607   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38608     ac_cv_prog_ac_ct_AR="$ac_prog"
38609     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38610     break 2
38611   fi
38612 done
38613   done
38614 IFS=$as_save_IFS
38615 
38616 fi
38617 fi
38618 ac_ct_AR=$ac_cv_prog_ac_ct_AR
38619 if test -n "$ac_ct_AR"; then
38620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38621 $as_echo "$ac_ct_AR" >&6; }
38622 else
38623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38624 $as_echo "no" >&6; }
38625 fi
38626 
38627 
38628   test -n "$ac_ct_AR" && break
38629 done
38630 
38631   if test "x$ac_ct_AR" = x; then
38632     AR=""
38633   else
38634     case $cross_compiling:$ac_tool_warned in
38635 yes:)
38636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38637 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38638 ac_tool_warned=yes ;;
38639 esac
38640     AR=$ac_ct_AR
38641   fi
38642 fi
38643 
38644     else
38645       # If it succeeded, then it was overridden by the user. We will use it
38646       # for the tool.
38647 
38648       # First remove it from the list of overridden variables, so we can test
38649       # for unknown variables in the end.
38650       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38651 
38652       # Check if we try to supply an empty value
38653       if test "x$AR" = x; then
38654         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38655 $as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38656         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38657 $as_echo_n "checking for AR... " >&6; }
38658         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38659 $as_echo "disabled" >&6; }
38660       else
38661         # Check if the provided tool contains a complete path.
38662         tool_specified="$AR"
38663         tool_basename="${tool_specified##*/}"
38664         if test "x$tool_basename" = "x$tool_specified"; then
38665           # A command without a complete path is provided, search $PATH.
38666           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38667 $as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38668           # Extract the first word of "$tool_basename", so it can be a program name with args.
38669 set dummy $tool_basename; ac_word=$2
38670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38671 $as_echo_n "checking for $ac_word... " >&6; }
38672 if ${ac_cv_path_AR+:} false; then :
38673   $as_echo_n "(cached) " >&6
38674 else
38675   case $AR in
38676   [\\/]* | ?:[\\/]*)
38677   ac_cv_path_AR="$AR" # Let the user override the test with a path.
38678   ;;
38679   *)
38680   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38681 for as_dir in $PATH
38682 do
38683   IFS=$as_save_IFS
38684   test -z "$as_dir" && as_dir=.
38685     for ac_exec_ext in '' $ac_executable_extensions; do
38686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38687     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38689     break 2
38690   fi
38691 done
38692   done
38693 IFS=$as_save_IFS
38694 
38695   ;;
38696 esac
38697 fi
38698 AR=$ac_cv_path_AR
38699 if test -n "$AR"; then
38700   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38701 $as_echo "$AR" >&6; }
38702 else
38703   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38704 $as_echo "no" >&6; }
38705 fi
38706 
38707 
38708           if test "x$AR" = x; then
38709             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38710           fi
38711         else
38712           # Otherwise we believe it is a complete path. Use it as it is.
38713           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38714 $as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38715           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38716 $as_echo_n "checking for AR... " >&6; }
38717           if test ! -x "$tool_specified"; then
38718             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38719 $as_echo "not found" >&6; }
38720             as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38721           fi
38722           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38723 $as_echo "$tool_specified" >&6; }
38724         fi
38725       fi
38726     fi
38727 
38728   fi
38729 
38730 
38731   fi
38732 
38733   # Only process if variable expands to non-empty
38734 
38735   if test "x$AR" != x; then
38736     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38737 
38738   # First separate the path from the arguments. This will split at the first
38739   # space.
38740   complete="$AR"
38741   path="${complete%% *}"
38742   tmp="$complete EOL"
38743   arguments="${tmp#* }"
38744 
38745   # Input might be given as Windows format, start by converting to
38746   # unix format.
38747   new_path=`$CYGPATH -u "$path"`
38748 
38749   # Now try to locate executable using which
38750   new_path=`$WHICH "$new_path" 2> /dev/null`
38751   # bat and cmd files are not always considered executable in cygwin causing which
38752   # to not find them
38753   if test "x$new_path" = x \
38754       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38755       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38756     new_path=`$CYGPATH -u "$path"`
38757   fi
38758   if test "x$new_path" = x; then
38759     # Oops. Which didn't find the executable.
38760     # The splitting of arguments from the executable at a space might have been incorrect,
38761     # since paths with space are more likely in Windows. Give it another try with the whole
38762     # argument.
38763     path="$complete"
38764     arguments="EOL"
38765     new_path=`$CYGPATH -u "$path"`
38766     new_path=`$WHICH "$new_path" 2> /dev/null`
38767     # bat and cmd files are not always considered executable in cygwin causing which
38768     # to not find them
38769     if test "x$new_path" = x \
38770         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38771         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38772       new_path=`$CYGPATH -u "$path"`
38773     fi
38774     if test "x$new_path" = x; then
38775       # It's still not found. Now this is an unrecoverable error.
38776       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38777 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38778       has_space=`$ECHO "$complete" | $GREP " "`
38779       if test "x$has_space" != x; then
38780         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38781 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38782       fi
38783       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38784     fi
38785   fi
38786 
38787   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38788   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38789   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38790   # "foo.exe" is OK but "foo" is an error.
38791   #
38792   # This test is therefore slightly more accurate than "test -f" to check for file presence.
38793   # It is also a way to make sure we got the proper file name for the real test later on.
38794   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38795   if test "x$test_shortpath" = x; then
38796     # Short path failed, file does not exist as specified.
38797     # Try adding .exe or .cmd
38798     if test -f "${new_path}.exe"; then
38799       input_to_shortpath="${new_path}.exe"
38800     elif test -f "${new_path}.cmd"; then
38801       input_to_shortpath="${new_path}.cmd"
38802     else
38803       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38804 $as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38805       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38806 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38807       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38808     fi
38809   else
38810     input_to_shortpath="$new_path"
38811   fi
38812 
38813   # Call helper function which possibly converts this using DOS-style short mode.
38814   # If so, the updated path is stored in $new_path.
38815   new_path="$input_to_shortpath"
38816 
38817   input_path="$input_to_shortpath"
38818   # Check if we need to convert this using DOS-style short mode. If the path
38819   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38820   # take no chances and rewrite it.
38821   # Note: m4 eats our [], so we need to use [ and ] instead.
38822   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38823   if test "x$has_forbidden_chars" != x; then
38824     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38825     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38826     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38827     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38828       # Going to short mode and back again did indeed matter. Since short mode is
38829       # case insensitive, let's make it lowercase to improve readability.
38830       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38831       # Now convert it back to Unix-style (cygpath)
38832       input_path=`$CYGPATH -u "$shortmode_path"`
38833       new_path="$input_path"
38834     fi
38835   fi
38836 
38837   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38838   if test "x$test_cygdrive_prefix" = x; then
38839     # As a simple fix, exclude /usr/bin since it's not a real path.
38840     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38841       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38842       # a path prefixed by /cygdrive for fixpath to work.
38843       new_path="$CYGWIN_ROOT_PATH$input_path"
38844     fi
38845   fi
38846 
38847   # remove trailing .exe if any
38848   new_path="${new_path/%.exe/}"
38849 
38850     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38851 
38852   # First separate the path from the arguments. This will split at the first
38853   # space.
38854   complete="$AR"
38855   path="${complete%% *}"
38856   tmp="$complete EOL"
38857   arguments="${tmp#* }"
38858 
38859   # Input might be given as Windows format, start by converting to
38860   # unix format.
38861   new_path="$path"
38862 
38863   windows_path="$new_path"
38864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38865     unix_path=`$CYGPATH -u "$windows_path"`
38866     new_path="$unix_path"
38867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38869     new_path="$unix_path"
38870   fi
38871 
38872 
38873   # Now try to locate executable using which
38874   new_path=`$WHICH "$new_path" 2> /dev/null`
38875 
38876   if test "x$new_path" = x; then
38877     # Oops. Which didn't find the executable.
38878     # The splitting of arguments from the executable at a space might have been incorrect,
38879     # since paths with space are more likely in Windows. Give it another try with the whole
38880     # argument.
38881     path="$complete"
38882     arguments="EOL"
38883     new_path="$path"
38884 
38885   windows_path="$new_path"
38886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38887     unix_path=`$CYGPATH -u "$windows_path"`
38888     new_path="$unix_path"
38889   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38890     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38891     new_path="$unix_path"
38892   fi
38893 
38894 
38895     new_path=`$WHICH "$new_path" 2> /dev/null`
38896     # bat and cmd files are not always considered executable in MSYS causing which
38897     # to not find them
38898     if test "x$new_path" = x \
38899         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38900         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38901       new_path="$path"
38902 
38903   windows_path="$new_path"
38904   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38905     unix_path=`$CYGPATH -u "$windows_path"`
38906     new_path="$unix_path"
38907   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38908     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38909     new_path="$unix_path"
38910   fi
38911 
38912     fi
38913 
38914     if test "x$new_path" = x; then
38915       # It's still not found. Now this is an unrecoverable error.
38916       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38917 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38918       has_space=`$ECHO "$complete" | $GREP " "`
38919       if test "x$has_space" != x; then
38920         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38921 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38922       fi
38923       as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38924     fi
38925   fi
38926 
38927   # Now new_path has a complete unix path to the binary
38928   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38929     # Keep paths in /bin as-is, but remove trailing .exe if any
38930     new_path="${new_path/%.exe/}"
38931     # Do not save /bin paths to all_fixpath_prefixes!
38932   else
38933     # Not in mixed or Windows style, start by that.
38934     new_path=`cmd //c echo $new_path`
38935 
38936   input_path="$new_path"
38937   # Check if we need to convert this using DOS-style short mode. If the path
38938   # contains just simple characters, use it. Otherwise (spaces, weird characters),
38939   # take no chances and rewrite it.
38940   # Note: m4 eats our [], so we need to use [ and ] instead.
38941   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38942   if test "x$has_forbidden_chars" != x; then
38943     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38944     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38945   fi
38946 
38947     # Output is in $new_path
38948 
38949   windows_path="$new_path"
38950   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38951     unix_path=`$CYGPATH -u "$windows_path"`
38952     new_path="$unix_path"
38953   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38954     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38955     new_path="$unix_path"
38956   fi
38957 
38958     # remove trailing .exe if any
38959     new_path="${new_path/%.exe/}"
38960 
38961     # Save the first 10 bytes of this path to the storage, so fixpath can work.
38962     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38963   fi
38964 
38965     else
38966       # We're on a unix platform. Hooray! :)
38967       # First separate the path from the arguments. This will split at the first
38968       # space.
38969       complete="$AR"
38970       path="${complete%% *}"
38971       tmp="$complete EOL"
38972       arguments="${tmp#* }"
38973 
38974       # Cannot rely on the command "which" here since it doesn't always work.
38975       is_absolute_path=`$ECHO "$path" | $GREP ^/`
38976       if test -z "$is_absolute_path"; then
38977         # Path to executable is not absolute. Find it.
38978         IFS_save="$IFS"
38979         IFS=:
38980         for p in $PATH; do
38981           if test -f "$p/$path" && test -x "$p/$path"; then
38982             new_path="$p/$path"
38983             break
38984           fi
38985         done
38986         IFS="$IFS_save"
38987       else
38988         # This is an absolute path, we can use it without further modifications.
38989         new_path="$path"
38990       fi
38991 
38992       if test "x$new_path" = x; then
38993         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38994 $as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38995         has_space=`$ECHO "$complete" | $GREP " "`
38996         if test "x$has_space" != x; then
38997           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38998 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38999         fi
39000         as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
39001       fi
39002     fi
39003 
39004     # Now join together the path and the arguments once again
39005     if test "x$arguments" != xEOL; then
39006       new_complete="$new_path ${arguments% *}"
39007     else
39008       new_complete="$new_path"
39009     fi
39010 
39011     if test "x$complete" != "x$new_complete"; then
39012       AR="$new_complete"
39013       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
39014 $as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
39015     fi
39016   fi
39017 
39018 
39019 
39020   if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
39021 
39022 
39023   # Publish this variable in the help.
39024 
39025 
39026   if [ -z "${LIPO+x}" ]; then
39027     # The variable is not set by user, try to locate tool using the code snippet
39028     for ac_prog in lipo
39029 do
39030   # Extract the first word of "$ac_prog", so it can be a program name with args.
39031 set dummy $ac_prog; ac_word=$2
39032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39033 $as_echo_n "checking for $ac_word... " >&6; }
39034 if ${ac_cv_path_LIPO+:} false; then :
39035   $as_echo_n "(cached) " >&6
39036 else
39037   case $LIPO in
39038   [\\/]* | ?:[\\/]*)
39039   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39040   ;;
39041   *)
39042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39043 for as_dir in $PATH
39044 do
39045   IFS=$as_save_IFS
39046   test -z "$as_dir" && as_dir=.
39047     for ac_exec_ext in '' $ac_executable_extensions; do
39048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39049     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39051     break 2
39052   fi
39053 done
39054   done
39055 IFS=$as_save_IFS
39056 
39057   ;;
39058 esac
39059 fi
39060 LIPO=$ac_cv_path_LIPO
39061 if test -n "$LIPO"; then
39062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39063 $as_echo "$LIPO" >&6; }
39064 else
39065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39066 $as_echo "no" >&6; }
39067 fi
39068 
39069 
39070   test -n "$LIPO" && break
39071 done
39072 
39073   else
39074     # The variable is set, but is it from the command line or the environment?
39075 
39076     # Try to remove the string !LIPO! from our list.
39077     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
39078     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39079       # If it failed, the variable was not from the command line. Ignore it,
39080       # but warn the user (except for BASH, which is always set by the calling BASH).
39081       if test "xLIPO" != xBASH; then
39082         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
39083 $as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
39084       fi
39085       # Try to locate tool using the code snippet
39086       for ac_prog in lipo
39087 do
39088   # Extract the first word of "$ac_prog", so it can be a program name with args.
39089 set dummy $ac_prog; ac_word=$2
39090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39091 $as_echo_n "checking for $ac_word... " >&6; }
39092 if ${ac_cv_path_LIPO+:} false; then :
39093   $as_echo_n "(cached) " >&6
39094 else
39095   case $LIPO in
39096   [\\/]* | ?:[\\/]*)
39097   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39098   ;;
39099   *)
39100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39101 for as_dir in $PATH
39102 do
39103   IFS=$as_save_IFS
39104   test -z "$as_dir" && as_dir=.
39105     for ac_exec_ext in '' $ac_executable_extensions; do
39106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39107     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39109     break 2
39110   fi
39111 done
39112   done
39113 IFS=$as_save_IFS
39114 
39115   ;;
39116 esac
39117 fi
39118 LIPO=$ac_cv_path_LIPO
39119 if test -n "$LIPO"; then
39120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39121 $as_echo "$LIPO" >&6; }
39122 else
39123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39124 $as_echo "no" >&6; }
39125 fi
39126 
39127 
39128   test -n "$LIPO" && break
39129 done
39130 
39131     else
39132       # If it succeeded, then it was overridden by the user. We will use it
39133       # for the tool.
39134 
39135       # First remove it from the list of overridden variables, so we can test
39136       # for unknown variables in the end.
39137       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39138 
39139       # Check if we try to supply an empty value
39140       if test "x$LIPO" = x; then
39141         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
39142 $as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
39143         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39144 $as_echo_n "checking for LIPO... " >&6; }
39145         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39146 $as_echo "disabled" >&6; }
39147       else
39148         # Check if the provided tool contains a complete path.
39149         tool_specified="$LIPO"
39150         tool_basename="${tool_specified##*/}"
39151         if test "x$tool_basename" = "x$tool_specified"; then
39152           # A command without a complete path is provided, search $PATH.
39153           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
39154 $as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
39155           # Extract the first word of "$tool_basename", so it can be a program name with args.
39156 set dummy $tool_basename; ac_word=$2
39157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39158 $as_echo_n "checking for $ac_word... " >&6; }
39159 if ${ac_cv_path_LIPO+:} false; then :
39160   $as_echo_n "(cached) " >&6
39161 else
39162   case $LIPO in
39163   [\\/]* | ?:[\\/]*)
39164   ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
39165   ;;
39166   *)
39167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39168 for as_dir in $PATH
39169 do
39170   IFS=$as_save_IFS
39171   test -z "$as_dir" && as_dir=.
39172     for ac_exec_ext in '' $ac_executable_extensions; do
39173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39174     ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
39175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39176     break 2
39177   fi
39178 done
39179   done
39180 IFS=$as_save_IFS
39181 
39182   ;;
39183 esac
39184 fi
39185 LIPO=$ac_cv_path_LIPO
39186 if test -n "$LIPO"; then
39187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
39188 $as_echo "$LIPO" >&6; }
39189 else
39190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39191 $as_echo "no" >&6; }
39192 fi
39193 
39194 
39195           if test "x$LIPO" = x; then
39196             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39197           fi
39198         else
39199           # Otherwise we believe it is a complete path. Use it as it is.
39200           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
39201 $as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
39202           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
39203 $as_echo_n "checking for LIPO... " >&6; }
39204           if test ! -x "$tool_specified"; then
39205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39206 $as_echo "not found" >&6; }
39207             as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
39208           fi
39209           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39210 $as_echo "$tool_specified" >&6; }
39211         fi
39212       fi
39213     fi
39214 
39215   fi
39216 
39217 
39218 
39219   # Only process if variable expands to non-empty
39220 
39221   if test "x$LIPO" != x; then
39222     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39223 
39224   # First separate the path from the arguments. This will split at the first
39225   # space.
39226   complete="$LIPO"
39227   path="${complete%% *}"
39228   tmp="$complete EOL"
39229   arguments="${tmp#* }"
39230 
39231   # Input might be given as Windows format, start by converting to
39232   # unix format.
39233   new_path=`$CYGPATH -u "$path"`
39234 
39235   # Now try to locate executable using which
39236   new_path=`$WHICH "$new_path" 2> /dev/null`
39237   # bat and cmd files are not always considered executable in cygwin causing which
39238   # to not find them
39239   if test "x$new_path" = x \
39240       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39241       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39242     new_path=`$CYGPATH -u "$path"`
39243   fi
39244   if test "x$new_path" = x; then
39245     # Oops. Which didn't find the executable.
39246     # The splitting of arguments from the executable at a space might have been incorrect,
39247     # since paths with space are more likely in Windows. Give it another try with the whole
39248     # argument.
39249     path="$complete"
39250     arguments="EOL"
39251     new_path=`$CYGPATH -u "$path"`
39252     new_path=`$WHICH "$new_path" 2> /dev/null`
39253     # bat and cmd files are not always considered executable in cygwin causing which
39254     # to not find them
39255     if test "x$new_path" = x \
39256         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39257         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39258       new_path=`$CYGPATH -u "$path"`
39259     fi
39260     if test "x$new_path" = x; then
39261       # It's still not found. Now this is an unrecoverable error.
39262       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39263 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39264       has_space=`$ECHO "$complete" | $GREP " "`
39265       if test "x$has_space" != x; then
39266         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39267 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39268       fi
39269       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39270     fi
39271   fi
39272 
39273   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39274   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39275   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39276   # "foo.exe" is OK but "foo" is an error.
39277   #
39278   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39279   # It is also a way to make sure we got the proper file name for the real test later on.
39280   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39281   if test "x$test_shortpath" = x; then
39282     # Short path failed, file does not exist as specified.
39283     # Try adding .exe or .cmd
39284     if test -f "${new_path}.exe"; then
39285       input_to_shortpath="${new_path}.exe"
39286     elif test -f "${new_path}.cmd"; then
39287       input_to_shortpath="${new_path}.cmd"
39288     else
39289       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
39290 $as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
39291       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39292 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39293       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39294     fi
39295   else
39296     input_to_shortpath="$new_path"
39297   fi
39298 
39299   # Call helper function which possibly converts this using DOS-style short mode.
39300   # If so, the updated path is stored in $new_path.
39301   new_path="$input_to_shortpath"
39302 
39303   input_path="$input_to_shortpath"
39304   # Check if we need to convert this using DOS-style short mode. If the path
39305   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39306   # take no chances and rewrite it.
39307   # Note: m4 eats our [], so we need to use [ and ] instead.
39308   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39309   if test "x$has_forbidden_chars" != x; then
39310     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39311     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39312     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39313     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39314       # Going to short mode and back again did indeed matter. Since short mode is
39315       # case insensitive, let's make it lowercase to improve readability.
39316       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39317       # Now convert it back to Unix-style (cygpath)
39318       input_path=`$CYGPATH -u "$shortmode_path"`
39319       new_path="$input_path"
39320     fi
39321   fi
39322 
39323   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39324   if test "x$test_cygdrive_prefix" = x; then
39325     # As a simple fix, exclude /usr/bin since it's not a real path.
39326     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39327       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39328       # a path prefixed by /cygdrive for fixpath to work.
39329       new_path="$CYGWIN_ROOT_PATH$input_path"
39330     fi
39331   fi
39332 
39333   # remove trailing .exe if any
39334   new_path="${new_path/%.exe/}"
39335 
39336     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39337 
39338   # First separate the path from the arguments. This will split at the first
39339   # space.
39340   complete="$LIPO"
39341   path="${complete%% *}"
39342   tmp="$complete EOL"
39343   arguments="${tmp#* }"
39344 
39345   # Input might be given as Windows format, start by converting to
39346   # unix format.
39347   new_path="$path"
39348 
39349   windows_path="$new_path"
39350   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39351     unix_path=`$CYGPATH -u "$windows_path"`
39352     new_path="$unix_path"
39353   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39354     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39355     new_path="$unix_path"
39356   fi
39357 
39358 
39359   # Now try to locate executable using which
39360   new_path=`$WHICH "$new_path" 2> /dev/null`
39361 
39362   if test "x$new_path" = x; then
39363     # Oops. Which didn't find the executable.
39364     # The splitting of arguments from the executable at a space might have been incorrect,
39365     # since paths with space are more likely in Windows. Give it another try with the whole
39366     # argument.
39367     path="$complete"
39368     arguments="EOL"
39369     new_path="$path"
39370 
39371   windows_path="$new_path"
39372   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39373     unix_path=`$CYGPATH -u "$windows_path"`
39374     new_path="$unix_path"
39375   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39376     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39377     new_path="$unix_path"
39378   fi
39379 
39380 
39381     new_path=`$WHICH "$new_path" 2> /dev/null`
39382     # bat and cmd files are not always considered executable in MSYS causing which
39383     # to not find them
39384     if test "x$new_path" = x \
39385         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39386         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39387       new_path="$path"
39388 
39389   windows_path="$new_path"
39390   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39391     unix_path=`$CYGPATH -u "$windows_path"`
39392     new_path="$unix_path"
39393   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39394     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39395     new_path="$unix_path"
39396   fi
39397 
39398     fi
39399 
39400     if test "x$new_path" = x; then
39401       # It's still not found. Now this is an unrecoverable error.
39402       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39403 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39404       has_space=`$ECHO "$complete" | $GREP " "`
39405       if test "x$has_space" != x; then
39406         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39407 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39408       fi
39409       as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39410     fi
39411   fi
39412 
39413   # Now new_path has a complete unix path to the binary
39414   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39415     # Keep paths in /bin as-is, but remove trailing .exe if any
39416     new_path="${new_path/%.exe/}"
39417     # Do not save /bin paths to all_fixpath_prefixes!
39418   else
39419     # Not in mixed or Windows style, start by that.
39420     new_path=`cmd //c echo $new_path`
39421 
39422   input_path="$new_path"
39423   # Check if we need to convert this using DOS-style short mode. If the path
39424   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39425   # take no chances and rewrite it.
39426   # Note: m4 eats our [], so we need to use [ and ] instead.
39427   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39428   if test "x$has_forbidden_chars" != x; then
39429     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39430     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39431   fi
39432 
39433     # Output is in $new_path
39434 
39435   windows_path="$new_path"
39436   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39437     unix_path=`$CYGPATH -u "$windows_path"`
39438     new_path="$unix_path"
39439   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39440     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39441     new_path="$unix_path"
39442   fi
39443 
39444     # remove trailing .exe if any
39445     new_path="${new_path/%.exe/}"
39446 
39447     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39448     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39449   fi
39450 
39451     else
39452       # We're on a unix platform. Hooray! :)
39453       # First separate the path from the arguments. This will split at the first
39454       # space.
39455       complete="$LIPO"
39456       path="${complete%% *}"
39457       tmp="$complete EOL"
39458       arguments="${tmp#* }"
39459 
39460       # Cannot rely on the command "which" here since it doesn't always work.
39461       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39462       if test -z "$is_absolute_path"; then
39463         # Path to executable is not absolute. Find it.
39464         IFS_save="$IFS"
39465         IFS=:
39466         for p in $PATH; do
39467           if test -f "$p/$path" && test -x "$p/$path"; then
39468             new_path="$p/$path"
39469             break
39470           fi
39471         done
39472         IFS="$IFS_save"
39473       else
39474         # This is an absolute path, we can use it without further modifications.
39475         new_path="$path"
39476       fi
39477 
39478       if test "x$new_path" = x; then
39479         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
39480 $as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
39481         has_space=`$ECHO "$complete" | $GREP " "`
39482         if test "x$has_space" != x; then
39483           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39484 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39485         fi
39486         as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
39487       fi
39488     fi
39489 
39490     # Now join together the path and the arguments once again
39491     if test "x$arguments" != xEOL; then
39492       new_complete="$new_path ${arguments% *}"
39493     else
39494       new_complete="$new_path"
39495     fi
39496 
39497     if test "x$complete" != "x$new_complete"; then
39498       LIPO="$new_complete"
39499       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
39500 $as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
39501     fi
39502   fi
39503 
39504   fi
39505 
39506   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
39507     # Extract the first word of "mt", so it can be a program name with args.
39508 set dummy mt; ac_word=$2
39509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39510 $as_echo_n "checking for $ac_word... " >&6; }
39511 if ${ac_cv_prog_MT+:} false; then :
39512   $as_echo_n "(cached) " >&6
39513 else
39514   if test -n "$MT"; then
39515   ac_cv_prog_MT="$MT" # Let the user override the test.
39516 else
39517   ac_prog_rejected=no
39518 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39519 for as_dir in $PATH
39520 do
39521   IFS=$as_save_IFS
39522   test -z "$as_dir" && as_dir=.
39523     for ac_exec_ext in '' $ac_executable_extensions; do
39524   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39525     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
39526        ac_prog_rejected=yes
39527        continue
39528      fi
39529     ac_cv_prog_MT="mt"
39530     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39531     break 2
39532   fi
39533 done
39534   done
39535 IFS=$as_save_IFS
39536 
39537 if test $ac_prog_rejected = yes; then
39538   # We found a bogon in the path, so make sure we never use it.
39539   set dummy $ac_cv_prog_MT
39540   shift
39541   if test $# != 0; then
39542     # We chose a different compiler from the bogus one.
39543     # However, it has the same basename, so the bogon will be chosen
39544     # first if we set MT to just the basename; use the full file name.
39545     shift
39546     ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
39547   fi
39548 fi
39549 fi
39550 fi
39551 MT=$ac_cv_prog_MT
39552 if test -n "$MT"; then
39553   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39554 $as_echo "$MT" >&6; }
39555 else
39556   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39557 $as_echo "no" >&6; }
39558 fi
39559 
39560 
39561 
39562   # Only process if variable expands to non-empty
39563 
39564   if test "x$MT" != x; then
39565     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39566 
39567   # First separate the path from the arguments. This will split at the first
39568   # space.
39569   complete="$MT"
39570   path="${complete%% *}"
39571   tmp="$complete EOL"
39572   arguments="${tmp#* }"
39573 
39574   # Input might be given as Windows format, start by converting to
39575   # unix format.
39576   new_path=`$CYGPATH -u "$path"`
39577 
39578   # Now try to locate executable using which
39579   new_path=`$WHICH "$new_path" 2> /dev/null`
39580   # bat and cmd files are not always considered executable in cygwin causing which
39581   # to not find them
39582   if test "x$new_path" = x \
39583       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39584       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39585     new_path=`$CYGPATH -u "$path"`
39586   fi
39587   if test "x$new_path" = x; then
39588     # Oops. Which didn't find the executable.
39589     # The splitting of arguments from the executable at a space might have been incorrect,
39590     # since paths with space are more likely in Windows. Give it another try with the whole
39591     # argument.
39592     path="$complete"
39593     arguments="EOL"
39594     new_path=`$CYGPATH -u "$path"`
39595     new_path=`$WHICH "$new_path" 2> /dev/null`
39596     # bat and cmd files are not always considered executable in cygwin causing which
39597     # to not find them
39598     if test "x$new_path" = x \
39599         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39600         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39601       new_path=`$CYGPATH -u "$path"`
39602     fi
39603     if test "x$new_path" = x; then
39604       # It's still not found. Now this is an unrecoverable error.
39605       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39606 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39607       has_space=`$ECHO "$complete" | $GREP " "`
39608       if test "x$has_space" != x; then
39609         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39610 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39611       fi
39612       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39613     fi
39614   fi
39615 
39616   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39617   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39618   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39619   # "foo.exe" is OK but "foo" is an error.
39620   #
39621   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39622   # It is also a way to make sure we got the proper file name for the real test later on.
39623   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39624   if test "x$test_shortpath" = x; then
39625     # Short path failed, file does not exist as specified.
39626     # Try adding .exe or .cmd
39627     if test -f "${new_path}.exe"; then
39628       input_to_shortpath="${new_path}.exe"
39629     elif test -f "${new_path}.cmd"; then
39630       input_to_shortpath="${new_path}.cmd"
39631     else
39632       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39633 $as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39634       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39635 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39636       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39637     fi
39638   else
39639     input_to_shortpath="$new_path"
39640   fi
39641 
39642   # Call helper function which possibly converts this using DOS-style short mode.
39643   # If so, the updated path is stored in $new_path.
39644   new_path="$input_to_shortpath"
39645 
39646   input_path="$input_to_shortpath"
39647   # Check if we need to convert this using DOS-style short mode. If the path
39648   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39649   # take no chances and rewrite it.
39650   # Note: m4 eats our [], so we need to use [ and ] instead.
39651   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39652   if test "x$has_forbidden_chars" != x; then
39653     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39654     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39655     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39656     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39657       # Going to short mode and back again did indeed matter. Since short mode is
39658       # case insensitive, let's make it lowercase to improve readability.
39659       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39660       # Now convert it back to Unix-style (cygpath)
39661       input_path=`$CYGPATH -u "$shortmode_path"`
39662       new_path="$input_path"
39663     fi
39664   fi
39665 
39666   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39667   if test "x$test_cygdrive_prefix" = x; then
39668     # As a simple fix, exclude /usr/bin since it's not a real path.
39669     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39670       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39671       # a path prefixed by /cygdrive for fixpath to work.
39672       new_path="$CYGWIN_ROOT_PATH$input_path"
39673     fi
39674   fi
39675 
39676   # remove trailing .exe if any
39677   new_path="${new_path/%.exe/}"
39678 
39679     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39680 
39681   # First separate the path from the arguments. This will split at the first
39682   # space.
39683   complete="$MT"
39684   path="${complete%% *}"
39685   tmp="$complete EOL"
39686   arguments="${tmp#* }"
39687 
39688   # Input might be given as Windows format, start by converting to
39689   # unix format.
39690   new_path="$path"
39691 
39692   windows_path="$new_path"
39693   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39694     unix_path=`$CYGPATH -u "$windows_path"`
39695     new_path="$unix_path"
39696   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39697     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39698     new_path="$unix_path"
39699   fi
39700 
39701 
39702   # Now try to locate executable using which
39703   new_path=`$WHICH "$new_path" 2> /dev/null`
39704 
39705   if test "x$new_path" = x; then
39706     # Oops. Which didn't find the executable.
39707     # The splitting of arguments from the executable at a space might have been incorrect,
39708     # since paths with space are more likely in Windows. Give it another try with the whole
39709     # argument.
39710     path="$complete"
39711     arguments="EOL"
39712     new_path="$path"
39713 
39714   windows_path="$new_path"
39715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39716     unix_path=`$CYGPATH -u "$windows_path"`
39717     new_path="$unix_path"
39718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39720     new_path="$unix_path"
39721   fi
39722 
39723 
39724     new_path=`$WHICH "$new_path" 2> /dev/null`
39725     # bat and cmd files are not always considered executable in MSYS causing which
39726     # to not find them
39727     if test "x$new_path" = x \
39728         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39729         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39730       new_path="$path"
39731 
39732   windows_path="$new_path"
39733   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39734     unix_path=`$CYGPATH -u "$windows_path"`
39735     new_path="$unix_path"
39736   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39737     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39738     new_path="$unix_path"
39739   fi
39740 
39741     fi
39742 
39743     if test "x$new_path" = x; then
39744       # It's still not found. Now this is an unrecoverable error.
39745       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39746 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39747       has_space=`$ECHO "$complete" | $GREP " "`
39748       if test "x$has_space" != x; then
39749         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39750 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39751       fi
39752       as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39753     fi
39754   fi
39755 
39756   # Now new_path has a complete unix path to the binary
39757   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39758     # Keep paths in /bin as-is, but remove trailing .exe if any
39759     new_path="${new_path/%.exe/}"
39760     # Do not save /bin paths to all_fixpath_prefixes!
39761   else
39762     # Not in mixed or Windows style, start by that.
39763     new_path=`cmd //c echo $new_path`
39764 
39765   input_path="$new_path"
39766   # Check if we need to convert this using DOS-style short mode. If the path
39767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39768   # take no chances and rewrite it.
39769   # Note: m4 eats our [], so we need to use [ and ] instead.
39770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39771   if test "x$has_forbidden_chars" != x; then
39772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39773     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39774   fi
39775 
39776     # Output is in $new_path
39777 
39778   windows_path="$new_path"
39779   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39780     unix_path=`$CYGPATH -u "$windows_path"`
39781     new_path="$unix_path"
39782   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39783     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39784     new_path="$unix_path"
39785   fi
39786 
39787     # remove trailing .exe if any
39788     new_path="${new_path/%.exe/}"
39789 
39790     # Save the first 10 bytes of this path to the storage, so fixpath can work.
39791     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39792   fi
39793 
39794     else
39795       # We're on a unix platform. Hooray! :)
39796       # First separate the path from the arguments. This will split at the first
39797       # space.
39798       complete="$MT"
39799       path="${complete%% *}"
39800       tmp="$complete EOL"
39801       arguments="${tmp#* }"
39802 
39803       # Cannot rely on the command "which" here since it doesn't always work.
39804       is_absolute_path=`$ECHO "$path" | $GREP ^/`
39805       if test -z "$is_absolute_path"; then
39806         # Path to executable is not absolute. Find it.
39807         IFS_save="$IFS"
39808         IFS=:
39809         for p in $PATH; do
39810           if test -f "$p/$path" && test -x "$p/$path"; then
39811             new_path="$p/$path"
39812             break
39813           fi
39814         done
39815         IFS="$IFS_save"
39816       else
39817         # This is an absolute path, we can use it without further modifications.
39818         new_path="$path"
39819       fi
39820 
39821       if test "x$new_path" = x; then
39822         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39823 $as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39824         has_space=`$ECHO "$complete" | $GREP " "`
39825         if test "x$has_space" != x; then
39826           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39827 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39828         fi
39829         as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39830       fi
39831     fi
39832 
39833     # Now join together the path and the arguments once again
39834     if test "x$arguments" != xEOL; then
39835       new_complete="$new_path ${arguments% *}"
39836     else
39837       new_complete="$new_path"
39838     fi
39839 
39840     if test "x$complete" != "x$new_complete"; then
39841       MT="$new_complete"
39842       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39843 $as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39844     fi
39845   fi
39846 
39847     # Setup the resource compiler (RC)
39848     # Extract the first word of "rc", so it can be a program name with args.
39849 set dummy rc; ac_word=$2
39850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39851 $as_echo_n "checking for $ac_word... " >&6; }
39852 if ${ac_cv_prog_RC+:} false; then :
39853   $as_echo_n "(cached) " >&6
39854 else
39855   if test -n "$RC"; then
39856   ac_cv_prog_RC="$RC" # Let the user override the test.
39857 else
39858   ac_prog_rejected=no
39859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39860 for as_dir in $PATH
39861 do
39862   IFS=$as_save_IFS
39863   test -z "$as_dir" && as_dir=.
39864     for ac_exec_ext in '' $ac_executable_extensions; do
39865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39866     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39867        ac_prog_rejected=yes
39868        continue
39869      fi
39870     ac_cv_prog_RC="rc"
39871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39872     break 2
39873   fi
39874 done
39875   done
39876 IFS=$as_save_IFS
39877 
39878 if test $ac_prog_rejected = yes; then
39879   # We found a bogon in the path, so make sure we never use it.
39880   set dummy $ac_cv_prog_RC
39881   shift
39882   if test $# != 0; then
39883     # We chose a different compiler from the bogus one.
39884     # However, it has the same basename, so the bogon will be chosen
39885     # first if we set RC to just the basename; use the full file name.
39886     shift
39887     ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39888   fi
39889 fi
39890 fi
39891 fi
39892 RC=$ac_cv_prog_RC
39893 if test -n "$RC"; then
39894   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39895 $as_echo "$RC" >&6; }
39896 else
39897   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39898 $as_echo "no" >&6; }
39899 fi
39900 
39901 
39902 
39903   # Only process if variable expands to non-empty
39904 
39905   if test "x$RC" != x; then
39906     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39907 
39908   # First separate the path from the arguments. This will split at the first
39909   # space.
39910   complete="$RC"
39911   path="${complete%% *}"
39912   tmp="$complete EOL"
39913   arguments="${tmp#* }"
39914 
39915   # Input might be given as Windows format, start by converting to
39916   # unix format.
39917   new_path=`$CYGPATH -u "$path"`
39918 
39919   # Now try to locate executable using which
39920   new_path=`$WHICH "$new_path" 2> /dev/null`
39921   # bat and cmd files are not always considered executable in cygwin causing which
39922   # to not find them
39923   if test "x$new_path" = x \
39924       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39925       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39926     new_path=`$CYGPATH -u "$path"`
39927   fi
39928   if test "x$new_path" = x; then
39929     # Oops. Which didn't find the executable.
39930     # The splitting of arguments from the executable at a space might have been incorrect,
39931     # since paths with space are more likely in Windows. Give it another try with the whole
39932     # argument.
39933     path="$complete"
39934     arguments="EOL"
39935     new_path=`$CYGPATH -u "$path"`
39936     new_path=`$WHICH "$new_path" 2> /dev/null`
39937     # bat and cmd files are not always considered executable in cygwin causing which
39938     # to not find them
39939     if test "x$new_path" = x \
39940         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39941         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39942       new_path=`$CYGPATH -u "$path"`
39943     fi
39944     if test "x$new_path" = x; then
39945       # It's still not found. Now this is an unrecoverable error.
39946       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39947 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39948       has_space=`$ECHO "$complete" | $GREP " "`
39949       if test "x$has_space" != x; then
39950         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39951 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39952       fi
39953       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39954     fi
39955   fi
39956 
39957   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39958   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39959   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39960   # "foo.exe" is OK but "foo" is an error.
39961   #
39962   # This test is therefore slightly more accurate than "test -f" to check for file presence.
39963   # It is also a way to make sure we got the proper file name for the real test later on.
39964   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39965   if test "x$test_shortpath" = x; then
39966     # Short path failed, file does not exist as specified.
39967     # Try adding .exe or .cmd
39968     if test -f "${new_path}.exe"; then
39969       input_to_shortpath="${new_path}.exe"
39970     elif test -f "${new_path}.cmd"; then
39971       input_to_shortpath="${new_path}.cmd"
39972     else
39973       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39974 $as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39975       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39976 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39977       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39978     fi
39979   else
39980     input_to_shortpath="$new_path"
39981   fi
39982 
39983   # Call helper function which possibly converts this using DOS-style short mode.
39984   # If so, the updated path is stored in $new_path.
39985   new_path="$input_to_shortpath"
39986 
39987   input_path="$input_to_shortpath"
39988   # Check if we need to convert this using DOS-style short mode. If the path
39989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
39990   # take no chances and rewrite it.
39991   # Note: m4 eats our [], so we need to use [ and ] instead.
39992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39993   if test "x$has_forbidden_chars" != x; then
39994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39998       # Going to short mode and back again did indeed matter. Since short mode is
39999       # case insensitive, let's make it lowercase to improve readability.
40000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40001       # Now convert it back to Unix-style (cygpath)
40002       input_path=`$CYGPATH -u "$shortmode_path"`
40003       new_path="$input_path"
40004     fi
40005   fi
40006 
40007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40008   if test "x$test_cygdrive_prefix" = x; then
40009     # As a simple fix, exclude /usr/bin since it's not a real path.
40010     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40012       # a path prefixed by /cygdrive for fixpath to work.
40013       new_path="$CYGWIN_ROOT_PATH$input_path"
40014     fi
40015   fi
40016 
40017   # remove trailing .exe if any
40018   new_path="${new_path/%.exe/}"
40019 
40020     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40021 
40022   # First separate the path from the arguments. This will split at the first
40023   # space.
40024   complete="$RC"
40025   path="${complete%% *}"
40026   tmp="$complete EOL"
40027   arguments="${tmp#* }"
40028 
40029   # Input might be given as Windows format, start by converting to
40030   # unix format.
40031   new_path="$path"
40032 
40033   windows_path="$new_path"
40034   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40035     unix_path=`$CYGPATH -u "$windows_path"`
40036     new_path="$unix_path"
40037   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40038     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40039     new_path="$unix_path"
40040   fi
40041 
40042 
40043   # Now try to locate executable using which
40044   new_path=`$WHICH "$new_path" 2> /dev/null`
40045 
40046   if test "x$new_path" = x; then
40047     # Oops. Which didn't find the executable.
40048     # The splitting of arguments from the executable at a space might have been incorrect,
40049     # since paths with space are more likely in Windows. Give it another try with the whole
40050     # argument.
40051     path="$complete"
40052     arguments="EOL"
40053     new_path="$path"
40054 
40055   windows_path="$new_path"
40056   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40057     unix_path=`$CYGPATH -u "$windows_path"`
40058     new_path="$unix_path"
40059   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40060     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40061     new_path="$unix_path"
40062   fi
40063 
40064 
40065     new_path=`$WHICH "$new_path" 2> /dev/null`
40066     # bat and cmd files are not always considered executable in MSYS causing which
40067     # to not find them
40068     if test "x$new_path" = x \
40069         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40070         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40071       new_path="$path"
40072 
40073   windows_path="$new_path"
40074   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40075     unix_path=`$CYGPATH -u "$windows_path"`
40076     new_path="$unix_path"
40077   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40078     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40079     new_path="$unix_path"
40080   fi
40081 
40082     fi
40083 
40084     if test "x$new_path" = x; then
40085       # It's still not found. Now this is an unrecoverable error.
40086       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40087 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40088       has_space=`$ECHO "$complete" | $GREP " "`
40089       if test "x$has_space" != x; then
40090         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40091 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40092       fi
40093       as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40094     fi
40095   fi
40096 
40097   # Now new_path has a complete unix path to the binary
40098   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40099     # Keep paths in /bin as-is, but remove trailing .exe if any
40100     new_path="${new_path/%.exe/}"
40101     # Do not save /bin paths to all_fixpath_prefixes!
40102   else
40103     # Not in mixed or Windows style, start by that.
40104     new_path=`cmd //c echo $new_path`
40105 
40106   input_path="$new_path"
40107   # Check if we need to convert this using DOS-style short mode. If the path
40108   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40109   # take no chances and rewrite it.
40110   # Note: m4 eats our [], so we need to use [ and ] instead.
40111   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40112   if test "x$has_forbidden_chars" != x; then
40113     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40114     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40115   fi
40116 
40117     # Output is in $new_path
40118 
40119   windows_path="$new_path"
40120   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40121     unix_path=`$CYGPATH -u "$windows_path"`
40122     new_path="$unix_path"
40123   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40124     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40125     new_path="$unix_path"
40126   fi
40127 
40128     # remove trailing .exe if any
40129     new_path="${new_path/%.exe/}"
40130 
40131     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40132     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40133   fi
40134 
40135     else
40136       # We're on a unix platform. Hooray! :)
40137       # First separate the path from the arguments. This will split at the first
40138       # space.
40139       complete="$RC"
40140       path="${complete%% *}"
40141       tmp="$complete EOL"
40142       arguments="${tmp#* }"
40143 
40144       # Cannot rely on the command "which" here since it doesn't always work.
40145       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40146       if test -z "$is_absolute_path"; then
40147         # Path to executable is not absolute. Find it.
40148         IFS_save="$IFS"
40149         IFS=:
40150         for p in $PATH; do
40151           if test -f "$p/$path" && test -x "$p/$path"; then
40152             new_path="$p/$path"
40153             break
40154           fi
40155         done
40156         IFS="$IFS_save"
40157       else
40158         # This is an absolute path, we can use it without further modifications.
40159         new_path="$path"
40160       fi
40161 
40162       if test "x$new_path" = x; then
40163         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
40164 $as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
40165         has_space=`$ECHO "$complete" | $GREP " "`
40166         if test "x$has_space" != x; then
40167           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40168 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40169         fi
40170         as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
40171       fi
40172     fi
40173 
40174     # Now join together the path and the arguments once again
40175     if test "x$arguments" != xEOL; then
40176       new_complete="$new_path ${arguments% *}"
40177     else
40178       new_complete="$new_path"
40179     fi
40180 
40181     if test "x$complete" != "x$new_complete"; then
40182       RC="$new_complete"
40183       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
40184 $as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
40185     fi
40186   fi
40187 
40188     # Extract the first word of "dumpbin", so it can be a program name with args.
40189 set dummy dumpbin; ac_word=$2
40190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40191 $as_echo_n "checking for $ac_word... " >&6; }
40192 if ${ac_cv_prog_DUMPBIN+:} false; then :
40193   $as_echo_n "(cached) " >&6
40194 else
40195   if test -n "$DUMPBIN"; then
40196   ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
40197 else
40198 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40199 for as_dir in $PATH
40200 do
40201   IFS=$as_save_IFS
40202   test -z "$as_dir" && as_dir=.
40203     for ac_exec_ext in '' $ac_executable_extensions; do
40204   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40205     ac_cv_prog_DUMPBIN="dumpbin"
40206     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40207     break 2
40208   fi
40209 done
40210   done
40211 IFS=$as_save_IFS
40212 
40213 fi
40214 fi
40215 DUMPBIN=$ac_cv_prog_DUMPBIN
40216 if test -n "$DUMPBIN"; then
40217   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
40218 $as_echo "$DUMPBIN" >&6; }
40219 else
40220   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40221 $as_echo "no" >&6; }
40222 fi
40223 
40224 
40225 
40226   # Only process if variable expands to non-empty
40227 
40228   if test "x$DUMPBIN" != x; then
40229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40230 
40231   # First separate the path from the arguments. This will split at the first
40232   # space.
40233   complete="$DUMPBIN"
40234   path="${complete%% *}"
40235   tmp="$complete EOL"
40236   arguments="${tmp#* }"
40237 
40238   # Input might be given as Windows format, start by converting to
40239   # unix format.
40240   new_path=`$CYGPATH -u "$path"`
40241 
40242   # Now try to locate executable using which
40243   new_path=`$WHICH "$new_path" 2> /dev/null`
40244   # bat and cmd files are not always considered executable in cygwin causing which
40245   # to not find them
40246   if test "x$new_path" = x \
40247       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40248       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40249     new_path=`$CYGPATH -u "$path"`
40250   fi
40251   if test "x$new_path" = x; then
40252     # Oops. Which didn't find the executable.
40253     # The splitting of arguments from the executable at a space might have been incorrect,
40254     # since paths with space are more likely in Windows. Give it another try with the whole
40255     # argument.
40256     path="$complete"
40257     arguments="EOL"
40258     new_path=`$CYGPATH -u "$path"`
40259     new_path=`$WHICH "$new_path" 2> /dev/null`
40260     # bat and cmd files are not always considered executable in cygwin causing which
40261     # to not find them
40262     if test "x$new_path" = x \
40263         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40264         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40265       new_path=`$CYGPATH -u "$path"`
40266     fi
40267     if test "x$new_path" = x; then
40268       # It's still not found. Now this is an unrecoverable error.
40269       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40270 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40271       has_space=`$ECHO "$complete" | $GREP " "`
40272       if test "x$has_space" != x; then
40273         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40274 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40275       fi
40276       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40277     fi
40278   fi
40279 
40280   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40281   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40282   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40283   # "foo.exe" is OK but "foo" is an error.
40284   #
40285   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40286   # It is also a way to make sure we got the proper file name for the real test later on.
40287   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40288   if test "x$test_shortpath" = x; then
40289     # Short path failed, file does not exist as specified.
40290     # Try adding .exe or .cmd
40291     if test -f "${new_path}.exe"; then
40292       input_to_shortpath="${new_path}.exe"
40293     elif test -f "${new_path}.cmd"; then
40294       input_to_shortpath="${new_path}.cmd"
40295     else
40296       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
40297 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
40298       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40299 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40300       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40301     fi
40302   else
40303     input_to_shortpath="$new_path"
40304   fi
40305 
40306   # Call helper function which possibly converts this using DOS-style short mode.
40307   # If so, the updated path is stored in $new_path.
40308   new_path="$input_to_shortpath"
40309 
40310   input_path="$input_to_shortpath"
40311   # Check if we need to convert this using DOS-style short mode. If the path
40312   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40313   # take no chances and rewrite it.
40314   # Note: m4 eats our [], so we need to use [ and ] instead.
40315   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40316   if test "x$has_forbidden_chars" != x; then
40317     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40318     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40319     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40320     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40321       # Going to short mode and back again did indeed matter. Since short mode is
40322       # case insensitive, let's make it lowercase to improve readability.
40323       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40324       # Now convert it back to Unix-style (cygpath)
40325       input_path=`$CYGPATH -u "$shortmode_path"`
40326       new_path="$input_path"
40327     fi
40328   fi
40329 
40330   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40331   if test "x$test_cygdrive_prefix" = x; then
40332     # As a simple fix, exclude /usr/bin since it's not a real path.
40333     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40334       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40335       # a path prefixed by /cygdrive for fixpath to work.
40336       new_path="$CYGWIN_ROOT_PATH$input_path"
40337     fi
40338   fi
40339 
40340   # remove trailing .exe if any
40341   new_path="${new_path/%.exe/}"
40342 
40343     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40344 
40345   # First separate the path from the arguments. This will split at the first
40346   # space.
40347   complete="$DUMPBIN"
40348   path="${complete%% *}"
40349   tmp="$complete EOL"
40350   arguments="${tmp#* }"
40351 
40352   # Input might be given as Windows format, start by converting to
40353   # unix format.
40354   new_path="$path"
40355 
40356   windows_path="$new_path"
40357   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40358     unix_path=`$CYGPATH -u "$windows_path"`
40359     new_path="$unix_path"
40360   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40361     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40362     new_path="$unix_path"
40363   fi
40364 
40365 
40366   # Now try to locate executable using which
40367   new_path=`$WHICH "$new_path" 2> /dev/null`
40368 
40369   if test "x$new_path" = x; then
40370     # Oops. Which didn't find the executable.
40371     # The splitting of arguments from the executable at a space might have been incorrect,
40372     # since paths with space are more likely in Windows. Give it another try with the whole
40373     # argument.
40374     path="$complete"
40375     arguments="EOL"
40376     new_path="$path"
40377 
40378   windows_path="$new_path"
40379   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40380     unix_path=`$CYGPATH -u "$windows_path"`
40381     new_path="$unix_path"
40382   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40383     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40384     new_path="$unix_path"
40385   fi
40386 
40387 
40388     new_path=`$WHICH "$new_path" 2> /dev/null`
40389     # bat and cmd files are not always considered executable in MSYS causing which
40390     # to not find them
40391     if test "x$new_path" = x \
40392         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40393         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40394       new_path="$path"
40395 
40396   windows_path="$new_path"
40397   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40398     unix_path=`$CYGPATH -u "$windows_path"`
40399     new_path="$unix_path"
40400   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40401     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40402     new_path="$unix_path"
40403   fi
40404 
40405     fi
40406 
40407     if test "x$new_path" = x; then
40408       # It's still not found. Now this is an unrecoverable error.
40409       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40410 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40411       has_space=`$ECHO "$complete" | $GREP " "`
40412       if test "x$has_space" != x; then
40413         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40414 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40415       fi
40416       as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40417     fi
40418   fi
40419 
40420   # Now new_path has a complete unix path to the binary
40421   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40422     # Keep paths in /bin as-is, but remove trailing .exe if any
40423     new_path="${new_path/%.exe/}"
40424     # Do not save /bin paths to all_fixpath_prefixes!
40425   else
40426     # Not in mixed or Windows style, start by that.
40427     new_path=`cmd //c echo $new_path`
40428 
40429   input_path="$new_path"
40430   # Check if we need to convert this using DOS-style short mode. If the path
40431   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40432   # take no chances and rewrite it.
40433   # Note: m4 eats our [], so we need to use [ and ] instead.
40434   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40435   if test "x$has_forbidden_chars" != x; then
40436     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40437     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40438   fi
40439 
40440     # Output is in $new_path
40441 
40442   windows_path="$new_path"
40443   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40444     unix_path=`$CYGPATH -u "$windows_path"`
40445     new_path="$unix_path"
40446   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40447     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40448     new_path="$unix_path"
40449   fi
40450 
40451     # remove trailing .exe if any
40452     new_path="${new_path/%.exe/}"
40453 
40454     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40455     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40456   fi
40457 
40458     else
40459       # We're on a unix platform. Hooray! :)
40460       # First separate the path from the arguments. This will split at the first
40461       # space.
40462       complete="$DUMPBIN"
40463       path="${complete%% *}"
40464       tmp="$complete EOL"
40465       arguments="${tmp#* }"
40466 
40467       # Cannot rely on the command "which" here since it doesn't always work.
40468       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40469       if test -z "$is_absolute_path"; then
40470         # Path to executable is not absolute. Find it.
40471         IFS_save="$IFS"
40472         IFS=:
40473         for p in $PATH; do
40474           if test -f "$p/$path" && test -x "$p/$path"; then
40475             new_path="$p/$path"
40476             break
40477           fi
40478         done
40479         IFS="$IFS_save"
40480       else
40481         # This is an absolute path, we can use it without further modifications.
40482         new_path="$path"
40483       fi
40484 
40485       if test "x$new_path" = x; then
40486         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
40487 $as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
40488         has_space=`$ECHO "$complete" | $GREP " "`
40489         if test "x$has_space" != x; then
40490           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40491 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40492         fi
40493         as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
40494       fi
40495     fi
40496 
40497     # Now join together the path and the arguments once again
40498     if test "x$arguments" != xEOL; then
40499       new_complete="$new_path ${arguments% *}"
40500     else
40501       new_complete="$new_path"
40502     fi
40503 
40504     if test "x$complete" != "x$new_complete"; then
40505       DUMPBIN="$new_complete"
40506       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
40507 $as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
40508     fi
40509   fi
40510 
40511     # We need to check for 'msbuild.exe' because at the place where we expect to
40512     # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
40513     # won't find the 'msbuild.exe' executable in that case (and the
40514     # 'ac_executable_extensions' is unusable due to performance reasons).
40515     # Notice that we intentionally don't fix up the path to MSBUILD because we
40516     # will call it in a DOS shell during freetype detection on Windows (see
40517     # 'LIB_SETUP_FREETYPE' in "libraries.m4"
40518     # Extract the first word of "msbuild.exe", so it can be a program name with args.
40519 set dummy msbuild.exe; ac_word=$2
40520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40521 $as_echo_n "checking for $ac_word... " >&6; }
40522 if ${ac_cv_prog_MSBUILD+:} false; then :
40523   $as_echo_n "(cached) " >&6
40524 else
40525   if test -n "$MSBUILD"; then
40526   ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
40527 else
40528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40529 for as_dir in $PATH
40530 do
40531   IFS=$as_save_IFS
40532   test -z "$as_dir" && as_dir=.
40533     for ac_exec_ext in '' $ac_executable_extensions; do
40534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40535     ac_cv_prog_MSBUILD="msbuild.exe"
40536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40537     break 2
40538   fi
40539 done
40540   done
40541 IFS=$as_save_IFS
40542 
40543 fi
40544 fi
40545 MSBUILD=$ac_cv_prog_MSBUILD
40546 if test -n "$MSBUILD"; then
40547   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
40548 $as_echo "$MSBUILD" >&6; }
40549 else
40550   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40551 $as_echo "no" >&6; }
40552 fi
40553 
40554 
40555   fi
40556 
40557   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40558 
40559 
40560   # Publish this variable in the help.
40561 
40562 
40563   if [ -z "${STRIP+x}" ]; then
40564     # The variable is not set by user, try to locate tool using the code snippet
40565     for ac_prog in strip
40566 do
40567   # Extract the first word of "$ac_prog", so it can be a program name with args.
40568 set dummy $ac_prog; ac_word=$2
40569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40570 $as_echo_n "checking for $ac_word... " >&6; }
40571 if ${ac_cv_path_STRIP+:} false; then :
40572   $as_echo_n "(cached) " >&6
40573 else
40574   case $STRIP in
40575   [\\/]* | ?:[\\/]*)
40576   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40577   ;;
40578   *)
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     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40587     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40588     break 2
40589   fi
40590 done
40591   done
40592 IFS=$as_save_IFS
40593 
40594   ;;
40595 esac
40596 fi
40597 STRIP=$ac_cv_path_STRIP
40598 if test -n "$STRIP"; then
40599   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40600 $as_echo "$STRIP" >&6; }
40601 else
40602   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40603 $as_echo "no" >&6; }
40604 fi
40605 
40606 
40607   test -n "$STRIP" && break
40608 done
40609 
40610   else
40611     # The variable is set, but is it from the command line or the environment?
40612 
40613     # Try to remove the string !STRIP! from our list.
40614     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40615     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40616       # If it failed, the variable was not from the command line. Ignore it,
40617       # but warn the user (except for BASH, which is always set by the calling BASH).
40618       if test "xSTRIP" != xBASH; then
40619         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40620 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40621       fi
40622       # Try to locate tool using the code snippet
40623       for ac_prog in strip
40624 do
40625   # Extract the first word of "$ac_prog", so it can be a program name with args.
40626 set dummy $ac_prog; ac_word=$2
40627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40628 $as_echo_n "checking for $ac_word... " >&6; }
40629 if ${ac_cv_path_STRIP+:} false; then :
40630   $as_echo_n "(cached) " >&6
40631 else
40632   case $STRIP in
40633   [\\/]* | ?:[\\/]*)
40634   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40635   ;;
40636   *)
40637   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40638 for as_dir in $PATH
40639 do
40640   IFS=$as_save_IFS
40641   test -z "$as_dir" && as_dir=.
40642     for ac_exec_ext in '' $ac_executable_extensions; do
40643   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40644     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40645     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40646     break 2
40647   fi
40648 done
40649   done
40650 IFS=$as_save_IFS
40651 
40652   ;;
40653 esac
40654 fi
40655 STRIP=$ac_cv_path_STRIP
40656 if test -n "$STRIP"; then
40657   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40658 $as_echo "$STRIP" >&6; }
40659 else
40660   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40661 $as_echo "no" >&6; }
40662 fi
40663 
40664 
40665   test -n "$STRIP" && break
40666 done
40667 
40668     else
40669       # If it succeeded, then it was overridden by the user. We will use it
40670       # for the tool.
40671 
40672       # First remove it from the list of overridden variables, so we can test
40673       # for unknown variables in the end.
40674       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40675 
40676       # Check if we try to supply an empty value
40677       if test "x$STRIP" = x; then
40678         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40679 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40680         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40681 $as_echo_n "checking for STRIP... " >&6; }
40682         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40683 $as_echo "disabled" >&6; }
40684       else
40685         # Check if the provided tool contains a complete path.
40686         tool_specified="$STRIP"
40687         tool_basename="${tool_specified##*/}"
40688         if test "x$tool_basename" = "x$tool_specified"; then
40689           # A command without a complete path is provided, search $PATH.
40690           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40691 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40692           # Extract the first word of "$tool_basename", so it can be a program name with args.
40693 set dummy $tool_basename; ac_word=$2
40694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40695 $as_echo_n "checking for $ac_word... " >&6; }
40696 if ${ac_cv_path_STRIP+:} false; then :
40697   $as_echo_n "(cached) " >&6
40698 else
40699   case $STRIP in
40700   [\\/]* | ?:[\\/]*)
40701   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40702   ;;
40703   *)
40704   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40705 for as_dir in $PATH
40706 do
40707   IFS=$as_save_IFS
40708   test -z "$as_dir" && as_dir=.
40709     for ac_exec_ext in '' $ac_executable_extensions; do
40710   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40711     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40712     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40713     break 2
40714   fi
40715 done
40716   done
40717 IFS=$as_save_IFS
40718 
40719   ;;
40720 esac
40721 fi
40722 STRIP=$ac_cv_path_STRIP
40723 if test -n "$STRIP"; then
40724   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40725 $as_echo "$STRIP" >&6; }
40726 else
40727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40728 $as_echo "no" >&6; }
40729 fi
40730 
40731 
40732           if test "x$STRIP" = x; then
40733             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40734           fi
40735         else
40736           # Otherwise we believe it is a complete path. Use it as it is.
40737           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40738 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40739           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40740 $as_echo_n "checking for STRIP... " >&6; }
40741           if test ! -x "$tool_specified"; then
40742             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40743 $as_echo "not found" >&6; }
40744             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40745           fi
40746           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40747 $as_echo "$tool_specified" >&6; }
40748         fi
40749       fi
40750     fi
40751 
40752   fi
40753 
40754 
40755 
40756   # Only process if variable expands to non-empty
40757 
40758   if test "x$STRIP" != x; then
40759     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40760 
40761   # First separate the path from the arguments. This will split at the first
40762   # space.
40763   complete="$STRIP"
40764   path="${complete%% *}"
40765   tmp="$complete EOL"
40766   arguments="${tmp#* }"
40767 
40768   # Input might be given as Windows format, start by converting to
40769   # unix format.
40770   new_path=`$CYGPATH -u "$path"`
40771 
40772   # Now try to locate executable using which
40773   new_path=`$WHICH "$new_path" 2> /dev/null`
40774   # bat and cmd files are not always considered executable in cygwin causing which
40775   # to not find them
40776   if test "x$new_path" = x \
40777       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40778       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40779     new_path=`$CYGPATH -u "$path"`
40780   fi
40781   if test "x$new_path" = x; then
40782     # Oops. Which didn't find the executable.
40783     # The splitting of arguments from the executable at a space might have been incorrect,
40784     # since paths with space are more likely in Windows. Give it another try with the whole
40785     # argument.
40786     path="$complete"
40787     arguments="EOL"
40788     new_path=`$CYGPATH -u "$path"`
40789     new_path=`$WHICH "$new_path" 2> /dev/null`
40790     # bat and cmd files are not always considered executable in cygwin causing which
40791     # to not find them
40792     if test "x$new_path" = x \
40793         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40794         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40795       new_path=`$CYGPATH -u "$path"`
40796     fi
40797     if test "x$new_path" = x; then
40798       # It's still not found. Now this is an unrecoverable error.
40799       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40800 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40801       has_space=`$ECHO "$complete" | $GREP " "`
40802       if test "x$has_space" != x; then
40803         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40804 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40805       fi
40806       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40807     fi
40808   fi
40809 
40810   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40811   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40812   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40813   # "foo.exe" is OK but "foo" is an error.
40814   #
40815   # This test is therefore slightly more accurate than "test -f" to check for file presence.
40816   # It is also a way to make sure we got the proper file name for the real test later on.
40817   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40818   if test "x$test_shortpath" = x; then
40819     # Short path failed, file does not exist as specified.
40820     # Try adding .exe or .cmd
40821     if test -f "${new_path}.exe"; then
40822       input_to_shortpath="${new_path}.exe"
40823     elif test -f "${new_path}.cmd"; then
40824       input_to_shortpath="${new_path}.cmd"
40825     else
40826       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40827 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40828       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40829 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40830       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40831     fi
40832   else
40833     input_to_shortpath="$new_path"
40834   fi
40835 
40836   # Call helper function which possibly converts this using DOS-style short mode.
40837   # If so, the updated path is stored in $new_path.
40838   new_path="$input_to_shortpath"
40839 
40840   input_path="$input_to_shortpath"
40841   # Check if we need to convert this using DOS-style short mode. If the path
40842   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40843   # take no chances and rewrite it.
40844   # Note: m4 eats our [], so we need to use [ and ] instead.
40845   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40846   if test "x$has_forbidden_chars" != x; then
40847     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40848     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40849     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40850     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40851       # Going to short mode and back again did indeed matter. Since short mode is
40852       # case insensitive, let's make it lowercase to improve readability.
40853       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40854       # Now convert it back to Unix-style (cygpath)
40855       input_path=`$CYGPATH -u "$shortmode_path"`
40856       new_path="$input_path"
40857     fi
40858   fi
40859 
40860   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40861   if test "x$test_cygdrive_prefix" = x; then
40862     # As a simple fix, exclude /usr/bin since it's not a real path.
40863     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40864       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40865       # a path prefixed by /cygdrive for fixpath to work.
40866       new_path="$CYGWIN_ROOT_PATH$input_path"
40867     fi
40868   fi
40869 
40870   # remove trailing .exe if any
40871   new_path="${new_path/%.exe/}"
40872 
40873     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40874 
40875   # First separate the path from the arguments. This will split at the first
40876   # space.
40877   complete="$STRIP"
40878   path="${complete%% *}"
40879   tmp="$complete EOL"
40880   arguments="${tmp#* }"
40881 
40882   # Input might be given as Windows format, start by converting to
40883   # unix format.
40884   new_path="$path"
40885 
40886   windows_path="$new_path"
40887   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40888     unix_path=`$CYGPATH -u "$windows_path"`
40889     new_path="$unix_path"
40890   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40891     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40892     new_path="$unix_path"
40893   fi
40894 
40895 
40896   # Now try to locate executable using which
40897   new_path=`$WHICH "$new_path" 2> /dev/null`
40898 
40899   if test "x$new_path" = x; then
40900     # Oops. Which didn't find the executable.
40901     # The splitting of arguments from the executable at a space might have been incorrect,
40902     # since paths with space are more likely in Windows. Give it another try with the whole
40903     # argument.
40904     path="$complete"
40905     arguments="EOL"
40906     new_path="$path"
40907 
40908   windows_path="$new_path"
40909   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40910     unix_path=`$CYGPATH -u "$windows_path"`
40911     new_path="$unix_path"
40912   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40913     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40914     new_path="$unix_path"
40915   fi
40916 
40917 
40918     new_path=`$WHICH "$new_path" 2> /dev/null`
40919     # bat and cmd files are not always considered executable in MSYS causing which
40920     # to not find them
40921     if test "x$new_path" = x \
40922         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40923         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40924       new_path="$path"
40925 
40926   windows_path="$new_path"
40927   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40928     unix_path=`$CYGPATH -u "$windows_path"`
40929     new_path="$unix_path"
40930   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40931     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40932     new_path="$unix_path"
40933   fi
40934 
40935     fi
40936 
40937     if test "x$new_path" = x; then
40938       # It's still not found. Now this is an unrecoverable error.
40939       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40940 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40941       has_space=`$ECHO "$complete" | $GREP " "`
40942       if test "x$has_space" != x; then
40943         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40944 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40945       fi
40946       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40947     fi
40948   fi
40949 
40950   # Now new_path has a complete unix path to the binary
40951   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40952     # Keep paths in /bin as-is, but remove trailing .exe if any
40953     new_path="${new_path/%.exe/}"
40954     # Do not save /bin paths to all_fixpath_prefixes!
40955   else
40956     # Not in mixed or Windows style, start by that.
40957     new_path=`cmd //c echo $new_path`
40958 
40959   input_path="$new_path"
40960   # Check if we need to convert this using DOS-style short mode. If the path
40961   # contains just simple characters, use it. Otherwise (spaces, weird characters),
40962   # take no chances and rewrite it.
40963   # Note: m4 eats our [], so we need to use [ and ] instead.
40964   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40965   if test "x$has_forbidden_chars" != x; then
40966     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40967     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40968   fi
40969 
40970     # Output is in $new_path
40971 
40972   windows_path="$new_path"
40973   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40974     unix_path=`$CYGPATH -u "$windows_path"`
40975     new_path="$unix_path"
40976   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40977     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40978     new_path="$unix_path"
40979   fi
40980 
40981     # remove trailing .exe if any
40982     new_path="${new_path/%.exe/}"
40983 
40984     # Save the first 10 bytes of this path to the storage, so fixpath can work.
40985     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40986   fi
40987 
40988     else
40989       # We're on a unix platform. Hooray! :)
40990       # First separate the path from the arguments. This will split at the first
40991       # space.
40992       complete="$STRIP"
40993       path="${complete%% *}"
40994       tmp="$complete EOL"
40995       arguments="${tmp#* }"
40996 
40997       # Cannot rely on the command "which" here since it doesn't always work.
40998       is_absolute_path=`$ECHO "$path" | $GREP ^/`
40999       if test -z "$is_absolute_path"; then
41000         # Path to executable is not absolute. Find it.
41001         IFS_save="$IFS"
41002         IFS=:
41003         for p in $PATH; do
41004           if test -f "$p/$path" && test -x "$p/$path"; then
41005             new_path="$p/$path"
41006             break
41007           fi
41008         done
41009         IFS="$IFS_save"
41010       else
41011         # This is an absolute path, we can use it without further modifications.
41012         new_path="$path"
41013       fi
41014 
41015       if test "x$new_path" = x; then
41016         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41017 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41018         has_space=`$ECHO "$complete" | $GREP " "`
41019         if test "x$has_space" != x; then
41020           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41021 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41022         fi
41023         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41024       fi
41025     fi
41026 
41027     # Now join together the path and the arguments once again
41028     if test "x$arguments" != xEOL; then
41029       new_complete="$new_path ${arguments% *}"
41030     else
41031       new_complete="$new_path"
41032     fi
41033 
41034     if test "x$complete" != "x$new_complete"; then
41035       STRIP="$new_complete"
41036       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41037 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41038     fi
41039   fi
41040 
41041 
41042 
41043   # Publish this variable in the help.
41044 
41045 
41046   if [ -z "${NM+x}" ]; then
41047     # The variable is not set by user, try to locate tool using the code snippet
41048     for ac_prog in nm
41049 do
41050   # Extract the first word of "$ac_prog", so it can be a program name with args.
41051 set dummy $ac_prog; ac_word=$2
41052 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41053 $as_echo_n "checking for $ac_word... " >&6; }
41054 if ${ac_cv_path_NM+:} false; then :
41055   $as_echo_n "(cached) " >&6
41056 else
41057   case $NM in
41058   [\\/]* | ?:[\\/]*)
41059   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41060   ;;
41061   *)
41062   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41063 for as_dir in $PATH
41064 do
41065   IFS=$as_save_IFS
41066   test -z "$as_dir" && as_dir=.
41067     for ac_exec_ext in '' $ac_executable_extensions; do
41068   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41069     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41070     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41071     break 2
41072   fi
41073 done
41074   done
41075 IFS=$as_save_IFS
41076 
41077   ;;
41078 esac
41079 fi
41080 NM=$ac_cv_path_NM
41081 if test -n "$NM"; then
41082   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41083 $as_echo "$NM" >&6; }
41084 else
41085   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41086 $as_echo "no" >&6; }
41087 fi
41088 
41089 
41090   test -n "$NM" && break
41091 done
41092 
41093   else
41094     # The variable is set, but is it from the command line or the environment?
41095 
41096     # Try to remove the string !NM! from our list.
41097     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41098     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41099       # If it failed, the variable was not from the command line. Ignore it,
41100       # but warn the user (except for BASH, which is always set by the calling BASH).
41101       if test "xNM" != xBASH; then
41102         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41103 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41104       fi
41105       # Try to locate tool using the code snippet
41106       for ac_prog in nm
41107 do
41108   # Extract the first word of "$ac_prog", so it can be a program name with args.
41109 set dummy $ac_prog; ac_word=$2
41110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41111 $as_echo_n "checking for $ac_word... " >&6; }
41112 if ${ac_cv_path_NM+:} false; then :
41113   $as_echo_n "(cached) " >&6
41114 else
41115   case $NM in
41116   [\\/]* | ?:[\\/]*)
41117   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41118   ;;
41119   *)
41120   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41121 for as_dir in $PATH
41122 do
41123   IFS=$as_save_IFS
41124   test -z "$as_dir" && as_dir=.
41125     for ac_exec_ext in '' $ac_executable_extensions; do
41126   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41127     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41128     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41129     break 2
41130   fi
41131 done
41132   done
41133 IFS=$as_save_IFS
41134 
41135   ;;
41136 esac
41137 fi
41138 NM=$ac_cv_path_NM
41139 if test -n "$NM"; then
41140   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41141 $as_echo "$NM" >&6; }
41142 else
41143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41144 $as_echo "no" >&6; }
41145 fi
41146 
41147 
41148   test -n "$NM" && break
41149 done
41150 
41151     else
41152       # If it succeeded, then it was overridden by the user. We will use it
41153       # for the tool.
41154 
41155       # First remove it from the list of overridden variables, so we can test
41156       # for unknown variables in the end.
41157       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41158 
41159       # Check if we try to supply an empty value
41160       if test "x$NM" = x; then
41161         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41162 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41163         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41164 $as_echo_n "checking for NM... " >&6; }
41165         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41166 $as_echo "disabled" >&6; }
41167       else
41168         # Check if the provided tool contains a complete path.
41169         tool_specified="$NM"
41170         tool_basename="${tool_specified##*/}"
41171         if test "x$tool_basename" = "x$tool_specified"; then
41172           # A command without a complete path is provided, search $PATH.
41173           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41174 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41175           # Extract the first word of "$tool_basename", so it can be a program name with args.
41176 set dummy $tool_basename; ac_word=$2
41177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41178 $as_echo_n "checking for $ac_word... " >&6; }
41179 if ${ac_cv_path_NM+:} false; then :
41180   $as_echo_n "(cached) " >&6
41181 else
41182   case $NM in
41183   [\\/]* | ?:[\\/]*)
41184   ac_cv_path_NM="$NM" # Let the user override the test with a path.
41185   ;;
41186   *)
41187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41188 for as_dir in $PATH
41189 do
41190   IFS=$as_save_IFS
41191   test -z "$as_dir" && as_dir=.
41192     for ac_exec_ext in '' $ac_executable_extensions; do
41193   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41194     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41195     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41196     break 2
41197   fi
41198 done
41199   done
41200 IFS=$as_save_IFS
41201 
41202   ;;
41203 esac
41204 fi
41205 NM=$ac_cv_path_NM
41206 if test -n "$NM"; then
41207   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41208 $as_echo "$NM" >&6; }
41209 else
41210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41211 $as_echo "no" >&6; }
41212 fi
41213 
41214 
41215           if test "x$NM" = x; then
41216             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41217           fi
41218         else
41219           # Otherwise we believe it is a complete path. Use it as it is.
41220           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41221 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41222           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41223 $as_echo_n "checking for NM... " >&6; }
41224           if test ! -x "$tool_specified"; then
41225             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41226 $as_echo "not found" >&6; }
41227             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41228           fi
41229           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41230 $as_echo "$tool_specified" >&6; }
41231         fi
41232       fi
41233     fi
41234 
41235   fi
41236 
41237 
41238 
41239   # Only process if variable expands to non-empty
41240 
41241   if test "x$NM" != x; then
41242     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41243 
41244   # First separate the path from the arguments. This will split at the first
41245   # space.
41246   complete="$NM"
41247   path="${complete%% *}"
41248   tmp="$complete EOL"
41249   arguments="${tmp#* }"
41250 
41251   # Input might be given as Windows format, start by converting to
41252   # unix format.
41253   new_path=`$CYGPATH -u "$path"`
41254 
41255   # Now try to locate executable using which
41256   new_path=`$WHICH "$new_path" 2> /dev/null`
41257   # bat and cmd files are not always considered executable in cygwin causing which
41258   # to not find them
41259   if test "x$new_path" = x \
41260       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41261       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41262     new_path=`$CYGPATH -u "$path"`
41263   fi
41264   if test "x$new_path" = x; then
41265     # Oops. Which didn't find the executable.
41266     # The splitting of arguments from the executable at a space might have been incorrect,
41267     # since paths with space are more likely in Windows. Give it another try with the whole
41268     # argument.
41269     path="$complete"
41270     arguments="EOL"
41271     new_path=`$CYGPATH -u "$path"`
41272     new_path=`$WHICH "$new_path" 2> /dev/null`
41273     # bat and cmd files are not always considered executable in cygwin causing which
41274     # to not find them
41275     if test "x$new_path" = x \
41276         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41277         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41278       new_path=`$CYGPATH -u "$path"`
41279     fi
41280     if test "x$new_path" = x; then
41281       # It's still not found. Now this is an unrecoverable error.
41282       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41283 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41284       has_space=`$ECHO "$complete" | $GREP " "`
41285       if test "x$has_space" != x; then
41286         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41287 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41288       fi
41289       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41290     fi
41291   fi
41292 
41293   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41294   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41295   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41296   # "foo.exe" is OK but "foo" is an error.
41297   #
41298   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41299   # It is also a way to make sure we got the proper file name for the real test later on.
41300   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41301   if test "x$test_shortpath" = x; then
41302     # Short path failed, file does not exist as specified.
41303     # Try adding .exe or .cmd
41304     if test -f "${new_path}.exe"; then
41305       input_to_shortpath="${new_path}.exe"
41306     elif test -f "${new_path}.cmd"; then
41307       input_to_shortpath="${new_path}.cmd"
41308     else
41309       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41310 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41311       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41312 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41313       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41314     fi
41315   else
41316     input_to_shortpath="$new_path"
41317   fi
41318 
41319   # Call helper function which possibly converts this using DOS-style short mode.
41320   # If so, the updated path is stored in $new_path.
41321   new_path="$input_to_shortpath"
41322 
41323   input_path="$input_to_shortpath"
41324   # Check if we need to convert this using DOS-style short mode. If the path
41325   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41326   # take no chances and rewrite it.
41327   # Note: m4 eats our [], so we need to use [ and ] instead.
41328   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41329   if test "x$has_forbidden_chars" != x; then
41330     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41331     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41332     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41333     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41334       # Going to short mode and back again did indeed matter. Since short mode is
41335       # case insensitive, let's make it lowercase to improve readability.
41336       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41337       # Now convert it back to Unix-style (cygpath)
41338       input_path=`$CYGPATH -u "$shortmode_path"`
41339       new_path="$input_path"
41340     fi
41341   fi
41342 
41343   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41344   if test "x$test_cygdrive_prefix" = x; then
41345     # As a simple fix, exclude /usr/bin since it's not a real path.
41346     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41347       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41348       # a path prefixed by /cygdrive for fixpath to work.
41349       new_path="$CYGWIN_ROOT_PATH$input_path"
41350     fi
41351   fi
41352 
41353   # remove trailing .exe if any
41354   new_path="${new_path/%.exe/}"
41355 
41356     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41357 
41358   # First separate the path from the arguments. This will split at the first
41359   # space.
41360   complete="$NM"
41361   path="${complete%% *}"
41362   tmp="$complete EOL"
41363   arguments="${tmp#* }"
41364 
41365   # Input might be given as Windows format, start by converting to
41366   # unix format.
41367   new_path="$path"
41368 
41369   windows_path="$new_path"
41370   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41371     unix_path=`$CYGPATH -u "$windows_path"`
41372     new_path="$unix_path"
41373   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41374     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41375     new_path="$unix_path"
41376   fi
41377 
41378 
41379   # Now try to locate executable using which
41380   new_path=`$WHICH "$new_path" 2> /dev/null`
41381 
41382   if test "x$new_path" = x; then
41383     # Oops. Which didn't find the executable.
41384     # The splitting of arguments from the executable at a space might have been incorrect,
41385     # since paths with space are more likely in Windows. Give it another try with the whole
41386     # argument.
41387     path="$complete"
41388     arguments="EOL"
41389     new_path="$path"
41390 
41391   windows_path="$new_path"
41392   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41393     unix_path=`$CYGPATH -u "$windows_path"`
41394     new_path="$unix_path"
41395   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41396     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41397     new_path="$unix_path"
41398   fi
41399 
41400 
41401     new_path=`$WHICH "$new_path" 2> /dev/null`
41402     # bat and cmd files are not always considered executable in MSYS causing which
41403     # to not find them
41404     if test "x$new_path" = x \
41405         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41406         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41407       new_path="$path"
41408 
41409   windows_path="$new_path"
41410   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41411     unix_path=`$CYGPATH -u "$windows_path"`
41412     new_path="$unix_path"
41413   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41414     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41415     new_path="$unix_path"
41416   fi
41417 
41418     fi
41419 
41420     if test "x$new_path" = x; then
41421       # It's still not found. Now this is an unrecoverable error.
41422       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41423 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41424       has_space=`$ECHO "$complete" | $GREP " "`
41425       if test "x$has_space" != x; then
41426         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41427 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41428       fi
41429       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41430     fi
41431   fi
41432 
41433   # Now new_path has a complete unix path to the binary
41434   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41435     # Keep paths in /bin as-is, but remove trailing .exe if any
41436     new_path="${new_path/%.exe/}"
41437     # Do not save /bin paths to all_fixpath_prefixes!
41438   else
41439     # Not in mixed or Windows style, start by that.
41440     new_path=`cmd //c echo $new_path`
41441 
41442   input_path="$new_path"
41443   # Check if we need to convert this using DOS-style short mode. If the path
41444   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41445   # take no chances and rewrite it.
41446   # Note: m4 eats our [], so we need to use [ and ] instead.
41447   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41448   if test "x$has_forbidden_chars" != x; then
41449     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41450     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41451   fi
41452 
41453     # Output is in $new_path
41454 
41455   windows_path="$new_path"
41456   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41457     unix_path=`$CYGPATH -u "$windows_path"`
41458     new_path="$unix_path"
41459   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41460     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41461     new_path="$unix_path"
41462   fi
41463 
41464     # remove trailing .exe if any
41465     new_path="${new_path/%.exe/}"
41466 
41467     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41468     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41469   fi
41470 
41471     else
41472       # We're on a unix platform. Hooray! :)
41473       # First separate the path from the arguments. This will split at the first
41474       # space.
41475       complete="$NM"
41476       path="${complete%% *}"
41477       tmp="$complete EOL"
41478       arguments="${tmp#* }"
41479 
41480       # Cannot rely on the command "which" here since it doesn't always work.
41481       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41482       if test -z "$is_absolute_path"; then
41483         # Path to executable is not absolute. Find it.
41484         IFS_save="$IFS"
41485         IFS=:
41486         for p in $PATH; do
41487           if test -f "$p/$path" && test -x "$p/$path"; then
41488             new_path="$p/$path"
41489             break
41490           fi
41491         done
41492         IFS="$IFS_save"
41493       else
41494         # This is an absolute path, we can use it without further modifications.
41495         new_path="$path"
41496       fi
41497 
41498       if test "x$new_path" = x; then
41499         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41500 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41501         has_space=`$ECHO "$complete" | $GREP " "`
41502         if test "x$has_space" != x; then
41503           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41504 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41505         fi
41506         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41507       fi
41508     fi
41509 
41510     # Now join together the path and the arguments once again
41511     if test "x$arguments" != xEOL; then
41512       new_complete="$new_path ${arguments% *}"
41513     else
41514       new_complete="$new_path"
41515     fi
41516 
41517     if test "x$complete" != "x$new_complete"; then
41518       NM="$new_complete"
41519       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
41520 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
41521     fi
41522   fi
41523 
41524 
41525 
41526   # Publish this variable in the help.
41527 
41528 
41529   if [ -z "${GNM+x}" ]; then
41530     # The variable is not set by user, try to locate tool using the code snippet
41531     for ac_prog in gnm
41532 do
41533   # Extract the first word of "$ac_prog", so it can be a program name with args.
41534 set dummy $ac_prog; ac_word=$2
41535 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41536 $as_echo_n "checking for $ac_word... " >&6; }
41537 if ${ac_cv_path_GNM+:} false; then :
41538   $as_echo_n "(cached) " >&6
41539 else
41540   case $GNM in
41541   [\\/]* | ?:[\\/]*)
41542   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41543   ;;
41544   *)
41545   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41546 for as_dir in $PATH
41547 do
41548   IFS=$as_save_IFS
41549   test -z "$as_dir" && as_dir=.
41550     for ac_exec_ext in '' $ac_executable_extensions; do
41551   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41552     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41553     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41554     break 2
41555   fi
41556 done
41557   done
41558 IFS=$as_save_IFS
41559 
41560   ;;
41561 esac
41562 fi
41563 GNM=$ac_cv_path_GNM
41564 if test -n "$GNM"; then
41565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41566 $as_echo "$GNM" >&6; }
41567 else
41568   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41569 $as_echo "no" >&6; }
41570 fi
41571 
41572 
41573   test -n "$GNM" && break
41574 done
41575 
41576   else
41577     # The variable is set, but is it from the command line or the environment?
41578 
41579     # Try to remove the string !GNM! from our list.
41580     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41581     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41582       # If it failed, the variable was not from the command line. Ignore it,
41583       # but warn the user (except for BASH, which is always set by the calling BASH).
41584       if test "xGNM" != xBASH; then
41585         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41586 $as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41587       fi
41588       # Try to locate tool using the code snippet
41589       for ac_prog in gnm
41590 do
41591   # Extract the first word of "$ac_prog", so it can be a program name with args.
41592 set dummy $ac_prog; ac_word=$2
41593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41594 $as_echo_n "checking for $ac_word... " >&6; }
41595 if ${ac_cv_path_GNM+:} false; then :
41596   $as_echo_n "(cached) " >&6
41597 else
41598   case $GNM in
41599   [\\/]* | ?:[\\/]*)
41600   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41601   ;;
41602   *)
41603   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41604 for as_dir in $PATH
41605 do
41606   IFS=$as_save_IFS
41607   test -z "$as_dir" && as_dir=.
41608     for ac_exec_ext in '' $ac_executable_extensions; do
41609   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41610     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41611     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41612     break 2
41613   fi
41614 done
41615   done
41616 IFS=$as_save_IFS
41617 
41618   ;;
41619 esac
41620 fi
41621 GNM=$ac_cv_path_GNM
41622 if test -n "$GNM"; then
41623   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41624 $as_echo "$GNM" >&6; }
41625 else
41626   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41627 $as_echo "no" >&6; }
41628 fi
41629 
41630 
41631   test -n "$GNM" && break
41632 done
41633 
41634     else
41635       # If it succeeded, then it was overridden by the user. We will use it
41636       # for the tool.
41637 
41638       # First remove it from the list of overridden variables, so we can test
41639       # for unknown variables in the end.
41640       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41641 
41642       # Check if we try to supply an empty value
41643       if test "x$GNM" = x; then
41644         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41645 $as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41646         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41647 $as_echo_n "checking for GNM... " >&6; }
41648         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41649 $as_echo "disabled" >&6; }
41650       else
41651         # Check if the provided tool contains a complete path.
41652         tool_specified="$GNM"
41653         tool_basename="${tool_specified##*/}"
41654         if test "x$tool_basename" = "x$tool_specified"; then
41655           # A command without a complete path is provided, search $PATH.
41656           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41657 $as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41658           # Extract the first word of "$tool_basename", so it can be a program name with args.
41659 set dummy $tool_basename; ac_word=$2
41660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41661 $as_echo_n "checking for $ac_word... " >&6; }
41662 if ${ac_cv_path_GNM+:} false; then :
41663   $as_echo_n "(cached) " >&6
41664 else
41665   case $GNM in
41666   [\\/]* | ?:[\\/]*)
41667   ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41668   ;;
41669   *)
41670   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41671 for as_dir in $PATH
41672 do
41673   IFS=$as_save_IFS
41674   test -z "$as_dir" && as_dir=.
41675     for ac_exec_ext in '' $ac_executable_extensions; do
41676   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41677     ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41678     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41679     break 2
41680   fi
41681 done
41682   done
41683 IFS=$as_save_IFS
41684 
41685   ;;
41686 esac
41687 fi
41688 GNM=$ac_cv_path_GNM
41689 if test -n "$GNM"; then
41690   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41691 $as_echo "$GNM" >&6; }
41692 else
41693   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41694 $as_echo "no" >&6; }
41695 fi
41696 
41697 
41698           if test "x$GNM" = x; then
41699             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41700           fi
41701         else
41702           # Otherwise we believe it is a complete path. Use it as it is.
41703           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41704 $as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41705           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41706 $as_echo_n "checking for GNM... " >&6; }
41707           if test ! -x "$tool_specified"; then
41708             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41709 $as_echo "not found" >&6; }
41710             as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41711           fi
41712           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41713 $as_echo "$tool_specified" >&6; }
41714         fi
41715       fi
41716     fi
41717 
41718   fi
41719 
41720 
41721 
41722   # Only process if variable expands to non-empty
41723 
41724   if test "x$GNM" != x; then
41725     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41726 
41727   # First separate the path from the arguments. This will split at the first
41728   # space.
41729   complete="$GNM"
41730   path="${complete%% *}"
41731   tmp="$complete EOL"
41732   arguments="${tmp#* }"
41733 
41734   # Input might be given as Windows format, start by converting to
41735   # unix format.
41736   new_path=`$CYGPATH -u "$path"`
41737 
41738   # Now try to locate executable using which
41739   new_path=`$WHICH "$new_path" 2> /dev/null`
41740   # bat and cmd files are not always considered executable in cygwin causing which
41741   # to not find them
41742   if test "x$new_path" = x \
41743       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41744       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41745     new_path=`$CYGPATH -u "$path"`
41746   fi
41747   if test "x$new_path" = x; then
41748     # Oops. Which didn't find the executable.
41749     # The splitting of arguments from the executable at a space might have been incorrect,
41750     # since paths with space are more likely in Windows. Give it another try with the whole
41751     # argument.
41752     path="$complete"
41753     arguments="EOL"
41754     new_path=`$CYGPATH -u "$path"`
41755     new_path=`$WHICH "$new_path" 2> /dev/null`
41756     # bat and cmd files are not always considered executable in cygwin causing which
41757     # to not find them
41758     if test "x$new_path" = x \
41759         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41760         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41761       new_path=`$CYGPATH -u "$path"`
41762     fi
41763     if test "x$new_path" = x; then
41764       # It's still not found. Now this is an unrecoverable error.
41765       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41766 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41767       has_space=`$ECHO "$complete" | $GREP " "`
41768       if test "x$has_space" != x; then
41769         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41770 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41771       fi
41772       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41773     fi
41774   fi
41775 
41776   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41777   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41778   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41779   # "foo.exe" is OK but "foo" is an error.
41780   #
41781   # This test is therefore slightly more accurate than "test -f" to check for file presence.
41782   # It is also a way to make sure we got the proper file name for the real test later on.
41783   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41784   if test "x$test_shortpath" = x; then
41785     # Short path failed, file does not exist as specified.
41786     # Try adding .exe or .cmd
41787     if test -f "${new_path}.exe"; then
41788       input_to_shortpath="${new_path}.exe"
41789     elif test -f "${new_path}.cmd"; then
41790       input_to_shortpath="${new_path}.cmd"
41791     else
41792       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41793 $as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41794       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41795 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41796       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41797     fi
41798   else
41799     input_to_shortpath="$new_path"
41800   fi
41801 
41802   # Call helper function which possibly converts this using DOS-style short mode.
41803   # If so, the updated path is stored in $new_path.
41804   new_path="$input_to_shortpath"
41805 
41806   input_path="$input_to_shortpath"
41807   # Check if we need to convert this using DOS-style short mode. If the path
41808   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41809   # take no chances and rewrite it.
41810   # Note: m4 eats our [], so we need to use [ and ] instead.
41811   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41812   if test "x$has_forbidden_chars" != x; then
41813     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41814     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41815     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41816     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41817       # Going to short mode and back again did indeed matter. Since short mode is
41818       # case insensitive, let's make it lowercase to improve readability.
41819       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41820       # Now convert it back to Unix-style (cygpath)
41821       input_path=`$CYGPATH -u "$shortmode_path"`
41822       new_path="$input_path"
41823     fi
41824   fi
41825 
41826   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41827   if test "x$test_cygdrive_prefix" = x; then
41828     # As a simple fix, exclude /usr/bin since it's not a real path.
41829     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41830       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41831       # a path prefixed by /cygdrive for fixpath to work.
41832       new_path="$CYGWIN_ROOT_PATH$input_path"
41833     fi
41834   fi
41835 
41836   # remove trailing .exe if any
41837   new_path="${new_path/%.exe/}"
41838 
41839     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41840 
41841   # First separate the path from the arguments. This will split at the first
41842   # space.
41843   complete="$GNM"
41844   path="${complete%% *}"
41845   tmp="$complete EOL"
41846   arguments="${tmp#* }"
41847 
41848   # Input might be given as Windows format, start by converting to
41849   # unix format.
41850   new_path="$path"
41851 
41852   windows_path="$new_path"
41853   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41854     unix_path=`$CYGPATH -u "$windows_path"`
41855     new_path="$unix_path"
41856   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41857     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41858     new_path="$unix_path"
41859   fi
41860 
41861 
41862   # Now try to locate executable using which
41863   new_path=`$WHICH "$new_path" 2> /dev/null`
41864 
41865   if test "x$new_path" = x; then
41866     # Oops. Which didn't find the executable.
41867     # The splitting of arguments from the executable at a space might have been incorrect,
41868     # since paths with space are more likely in Windows. Give it another try with the whole
41869     # argument.
41870     path="$complete"
41871     arguments="EOL"
41872     new_path="$path"
41873 
41874   windows_path="$new_path"
41875   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41876     unix_path=`$CYGPATH -u "$windows_path"`
41877     new_path="$unix_path"
41878   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41879     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41880     new_path="$unix_path"
41881   fi
41882 
41883 
41884     new_path=`$WHICH "$new_path" 2> /dev/null`
41885     # bat and cmd files are not always considered executable in MSYS causing which
41886     # to not find them
41887     if test "x$new_path" = x \
41888         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41889         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41890       new_path="$path"
41891 
41892   windows_path="$new_path"
41893   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41894     unix_path=`$CYGPATH -u "$windows_path"`
41895     new_path="$unix_path"
41896   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41897     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41898     new_path="$unix_path"
41899   fi
41900 
41901     fi
41902 
41903     if test "x$new_path" = x; then
41904       # It's still not found. Now this is an unrecoverable error.
41905       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41906 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41907       has_space=`$ECHO "$complete" | $GREP " "`
41908       if test "x$has_space" != x; then
41909         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41910 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41911       fi
41912       as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41913     fi
41914   fi
41915 
41916   # Now new_path has a complete unix path to the binary
41917   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41918     # Keep paths in /bin as-is, but remove trailing .exe if any
41919     new_path="${new_path/%.exe/}"
41920     # Do not save /bin paths to all_fixpath_prefixes!
41921   else
41922     # Not in mixed or Windows style, start by that.
41923     new_path=`cmd //c echo $new_path`
41924 
41925   input_path="$new_path"
41926   # Check if we need to convert this using DOS-style short mode. If the path
41927   # contains just simple characters, use it. Otherwise (spaces, weird characters),
41928   # take no chances and rewrite it.
41929   # Note: m4 eats our [], so we need to use [ and ] instead.
41930   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41931   if test "x$has_forbidden_chars" != x; then
41932     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41933     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41934   fi
41935 
41936     # Output is in $new_path
41937 
41938   windows_path="$new_path"
41939   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41940     unix_path=`$CYGPATH -u "$windows_path"`
41941     new_path="$unix_path"
41942   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41943     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41944     new_path="$unix_path"
41945   fi
41946 
41947     # remove trailing .exe if any
41948     new_path="${new_path/%.exe/}"
41949 
41950     # Save the first 10 bytes of this path to the storage, so fixpath can work.
41951     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41952   fi
41953 
41954     else
41955       # We're on a unix platform. Hooray! :)
41956       # First separate the path from the arguments. This will split at the first
41957       # space.
41958       complete="$GNM"
41959       path="${complete%% *}"
41960       tmp="$complete EOL"
41961       arguments="${tmp#* }"
41962 
41963       # Cannot rely on the command "which" here since it doesn't always work.
41964       is_absolute_path=`$ECHO "$path" | $GREP ^/`
41965       if test -z "$is_absolute_path"; then
41966         # Path to executable is not absolute. Find it.
41967         IFS_save="$IFS"
41968         IFS=:
41969         for p in $PATH; do
41970           if test -f "$p/$path" && test -x "$p/$path"; then
41971             new_path="$p/$path"
41972             break
41973           fi
41974         done
41975         IFS="$IFS_save"
41976       else
41977         # This is an absolute path, we can use it without further modifications.
41978         new_path="$path"
41979       fi
41980 
41981       if test "x$new_path" = x; then
41982         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41983 $as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41984         has_space=`$ECHO "$complete" | $GREP " "`
41985         if test "x$has_space" != x; then
41986           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41987 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41988         fi
41989         as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41990       fi
41991     fi
41992 
41993     # Now join together the path and the arguments once again
41994     if test "x$arguments" != xEOL; then
41995       new_complete="$new_path ${arguments% *}"
41996     else
41997       new_complete="$new_path"
41998     fi
41999 
42000     if test "x$complete" != "x$new_complete"; then
42001       GNM="$new_complete"
42002       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
42003 $as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
42004     fi
42005   fi
42006 
42007   elif test "x$OPENJDK_TARGET_OS" != xwindows; then
42008     # FIXME: we should unify this with the solaris case above.
42009 
42010 
42011   # Publish this variable in the help.
42012 
42013 
42014   if [ -z "${STRIP+x}" ]; then
42015     # The variable is not set by user, try to locate tool using the code snippet
42016     if test -n "$ac_tool_prefix"; then
42017   for ac_prog in strip
42018   do
42019     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42020 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42022 $as_echo_n "checking for $ac_word... " >&6; }
42023 if ${ac_cv_prog_STRIP+:} false; then :
42024   $as_echo_n "(cached) " >&6
42025 else
42026   if test -n "$STRIP"; then
42027   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42028 else
42029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42030 for as_dir in $PATH
42031 do
42032   IFS=$as_save_IFS
42033   test -z "$as_dir" && as_dir=.
42034     for ac_exec_ext in '' $ac_executable_extensions; do
42035   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42036     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42037     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42038     break 2
42039   fi
42040 done
42041   done
42042 IFS=$as_save_IFS
42043 
42044 fi
42045 fi
42046 STRIP=$ac_cv_prog_STRIP
42047 if test -n "$STRIP"; then
42048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42049 $as_echo "$STRIP" >&6; }
42050 else
42051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42052 $as_echo "no" >&6; }
42053 fi
42054 
42055 
42056     test -n "$STRIP" && break
42057   done
42058 fi
42059 if test -z "$STRIP"; then
42060   ac_ct_STRIP=$STRIP
42061   for ac_prog in strip
42062 do
42063   # Extract the first word of "$ac_prog", so it can be a program name with args.
42064 set dummy $ac_prog; ac_word=$2
42065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42066 $as_echo_n "checking for $ac_word... " >&6; }
42067 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42068   $as_echo_n "(cached) " >&6
42069 else
42070   if test -n "$ac_ct_STRIP"; then
42071   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42072 else
42073 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42074 for as_dir in $PATH
42075 do
42076   IFS=$as_save_IFS
42077   test -z "$as_dir" && as_dir=.
42078     for ac_exec_ext in '' $ac_executable_extensions; do
42079   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42080     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42081     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42082     break 2
42083   fi
42084 done
42085   done
42086 IFS=$as_save_IFS
42087 
42088 fi
42089 fi
42090 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42091 if test -n "$ac_ct_STRIP"; then
42092   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42093 $as_echo "$ac_ct_STRIP" >&6; }
42094 else
42095   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42096 $as_echo "no" >&6; }
42097 fi
42098 
42099 
42100   test -n "$ac_ct_STRIP" && break
42101 done
42102 
42103   if test "x$ac_ct_STRIP" = x; then
42104     STRIP=""
42105   else
42106     case $cross_compiling:$ac_tool_warned in
42107 yes:)
42108 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42109 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42110 ac_tool_warned=yes ;;
42111 esac
42112     STRIP=$ac_ct_STRIP
42113   fi
42114 fi
42115 
42116   else
42117     # The variable is set, but is it from the command line or the environment?
42118 
42119     # Try to remove the string !STRIP! from our list.
42120     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
42121     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42122       # If it failed, the variable was not from the command line. Ignore it,
42123       # but warn the user (except for BASH, which is always set by the calling BASH).
42124       if test "xSTRIP" != xBASH; then
42125         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
42126 $as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
42127       fi
42128       # Try to locate tool using the code snippet
42129       if test -n "$ac_tool_prefix"; then
42130   for ac_prog in strip
42131   do
42132     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42133 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42135 $as_echo_n "checking for $ac_word... " >&6; }
42136 if ${ac_cv_prog_STRIP+:} false; then :
42137   $as_echo_n "(cached) " >&6
42138 else
42139   if test -n "$STRIP"; then
42140   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
42141 else
42142 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42143 for as_dir in $PATH
42144 do
42145   IFS=$as_save_IFS
42146   test -z "$as_dir" && as_dir=.
42147     for ac_exec_ext in '' $ac_executable_extensions; do
42148   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42149     ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
42150     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42151     break 2
42152   fi
42153 done
42154   done
42155 IFS=$as_save_IFS
42156 
42157 fi
42158 fi
42159 STRIP=$ac_cv_prog_STRIP
42160 if test -n "$STRIP"; then
42161   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42162 $as_echo "$STRIP" >&6; }
42163 else
42164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42165 $as_echo "no" >&6; }
42166 fi
42167 
42168 
42169     test -n "$STRIP" && break
42170   done
42171 fi
42172 if test -z "$STRIP"; then
42173   ac_ct_STRIP=$STRIP
42174   for ac_prog in strip
42175 do
42176   # Extract the first word of "$ac_prog", so it can be a program name with args.
42177 set dummy $ac_prog; ac_word=$2
42178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42179 $as_echo_n "checking for $ac_word... " >&6; }
42180 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
42181   $as_echo_n "(cached) " >&6
42182 else
42183   if test -n "$ac_ct_STRIP"; then
42184   ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
42185 else
42186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42187 for as_dir in $PATH
42188 do
42189   IFS=$as_save_IFS
42190   test -z "$as_dir" && as_dir=.
42191     for ac_exec_ext in '' $ac_executable_extensions; do
42192   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42193     ac_cv_prog_ac_ct_STRIP="$ac_prog"
42194     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42195     break 2
42196   fi
42197 done
42198   done
42199 IFS=$as_save_IFS
42200 
42201 fi
42202 fi
42203 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
42204 if test -n "$ac_ct_STRIP"; then
42205   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
42206 $as_echo "$ac_ct_STRIP" >&6; }
42207 else
42208   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42209 $as_echo "no" >&6; }
42210 fi
42211 
42212 
42213   test -n "$ac_ct_STRIP" && break
42214 done
42215 
42216   if test "x$ac_ct_STRIP" = x; then
42217     STRIP=""
42218   else
42219     case $cross_compiling:$ac_tool_warned in
42220 yes:)
42221 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42222 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42223 ac_tool_warned=yes ;;
42224 esac
42225     STRIP=$ac_ct_STRIP
42226   fi
42227 fi
42228 
42229     else
42230       # If it succeeded, then it was overridden by the user. We will use it
42231       # for the tool.
42232 
42233       # First remove it from the list of overridden variables, so we can test
42234       # for unknown variables in the end.
42235       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42236 
42237       # Check if we try to supply an empty value
42238       if test "x$STRIP" = x; then
42239         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
42240 $as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
42241         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42242 $as_echo_n "checking for STRIP... " >&6; }
42243         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42244 $as_echo "disabled" >&6; }
42245       else
42246         # Check if the provided tool contains a complete path.
42247         tool_specified="$STRIP"
42248         tool_basename="${tool_specified##*/}"
42249         if test "x$tool_basename" = "x$tool_specified"; then
42250           # A command without a complete path is provided, search $PATH.
42251           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
42252 $as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
42253           # Extract the first word of "$tool_basename", so it can be a program name with args.
42254 set dummy $tool_basename; ac_word=$2
42255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42256 $as_echo_n "checking for $ac_word... " >&6; }
42257 if ${ac_cv_path_STRIP+:} false; then :
42258   $as_echo_n "(cached) " >&6
42259 else
42260   case $STRIP in
42261   [\\/]* | ?:[\\/]*)
42262   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
42263   ;;
42264   *)
42265   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42266 for as_dir in $PATH
42267 do
42268   IFS=$as_save_IFS
42269   test -z "$as_dir" && as_dir=.
42270     for ac_exec_ext in '' $ac_executable_extensions; do
42271   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42272     ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
42273     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42274     break 2
42275   fi
42276 done
42277   done
42278 IFS=$as_save_IFS
42279 
42280   ;;
42281 esac
42282 fi
42283 STRIP=$ac_cv_path_STRIP
42284 if test -n "$STRIP"; then
42285   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
42286 $as_echo "$STRIP" >&6; }
42287 else
42288   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42289 $as_echo "no" >&6; }
42290 fi
42291 
42292 
42293           if test "x$STRIP" = x; then
42294             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42295           fi
42296         else
42297           # Otherwise we believe it is a complete path. Use it as it is.
42298           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
42299 $as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
42300           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
42301 $as_echo_n "checking for STRIP... " >&6; }
42302           if test ! -x "$tool_specified"; then
42303             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42304 $as_echo "not found" >&6; }
42305             as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
42306           fi
42307           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42308 $as_echo "$tool_specified" >&6; }
42309         fi
42310       fi
42311     fi
42312 
42313   fi
42314 
42315 
42316 
42317   # Only process if variable expands to non-empty
42318 
42319   if test "x$STRIP" != x; then
42320     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42321 
42322   # First separate the path from the arguments. This will split at the first
42323   # space.
42324   complete="$STRIP"
42325   path="${complete%% *}"
42326   tmp="$complete EOL"
42327   arguments="${tmp#* }"
42328 
42329   # Input might be given as Windows format, start by converting to
42330   # unix format.
42331   new_path=`$CYGPATH -u "$path"`
42332 
42333   # Now try to locate executable using which
42334   new_path=`$WHICH "$new_path" 2> /dev/null`
42335   # bat and cmd files are not always considered executable in cygwin causing which
42336   # to not find them
42337   if test "x$new_path" = x \
42338       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42339       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42340     new_path=`$CYGPATH -u "$path"`
42341   fi
42342   if test "x$new_path" = x; then
42343     # Oops. Which didn't find the executable.
42344     # The splitting of arguments from the executable at a space might have been incorrect,
42345     # since paths with space are more likely in Windows. Give it another try with the whole
42346     # argument.
42347     path="$complete"
42348     arguments="EOL"
42349     new_path=`$CYGPATH -u "$path"`
42350     new_path=`$WHICH "$new_path" 2> /dev/null`
42351     # bat and cmd files are not always considered executable in cygwin causing which
42352     # to not find them
42353     if test "x$new_path" = x \
42354         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42355         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42356       new_path=`$CYGPATH -u "$path"`
42357     fi
42358     if test "x$new_path" = x; then
42359       # It's still not found. Now this is an unrecoverable error.
42360       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42361 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42362       has_space=`$ECHO "$complete" | $GREP " "`
42363       if test "x$has_space" != x; then
42364         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42365 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42366       fi
42367       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42368     fi
42369   fi
42370 
42371   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42372   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42373   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42374   # "foo.exe" is OK but "foo" is an error.
42375   #
42376   # This test is therefore slightly more accurate than "test -f" to check for file presence.
42377   # It is also a way to make sure we got the proper file name for the real test later on.
42378   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42379   if test "x$test_shortpath" = x; then
42380     # Short path failed, file does not exist as specified.
42381     # Try adding .exe or .cmd
42382     if test -f "${new_path}.exe"; then
42383       input_to_shortpath="${new_path}.exe"
42384     elif test -f "${new_path}.cmd"; then
42385       input_to_shortpath="${new_path}.cmd"
42386     else
42387       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
42388 $as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
42389       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42390 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42391       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42392     fi
42393   else
42394     input_to_shortpath="$new_path"
42395   fi
42396 
42397   # Call helper function which possibly converts this using DOS-style short mode.
42398   # If so, the updated path is stored in $new_path.
42399   new_path="$input_to_shortpath"
42400 
42401   input_path="$input_to_shortpath"
42402   # Check if we need to convert this using DOS-style short mode. If the path
42403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42404   # take no chances and rewrite it.
42405   # Note: m4 eats our [], so we need to use [ and ] instead.
42406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42407   if test "x$has_forbidden_chars" != x; then
42408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42409     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42410     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42411     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42412       # Going to short mode and back again did indeed matter. Since short mode is
42413       # case insensitive, let's make it lowercase to improve readability.
42414       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42415       # Now convert it back to Unix-style (cygpath)
42416       input_path=`$CYGPATH -u "$shortmode_path"`
42417       new_path="$input_path"
42418     fi
42419   fi
42420 
42421   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42422   if test "x$test_cygdrive_prefix" = x; then
42423     # As a simple fix, exclude /usr/bin since it's not a real path.
42424     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42425       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42426       # a path prefixed by /cygdrive for fixpath to work.
42427       new_path="$CYGWIN_ROOT_PATH$input_path"
42428     fi
42429   fi
42430 
42431   # remove trailing .exe if any
42432   new_path="${new_path/%.exe/}"
42433 
42434     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42435 
42436   # First separate the path from the arguments. This will split at the first
42437   # space.
42438   complete="$STRIP"
42439   path="${complete%% *}"
42440   tmp="$complete EOL"
42441   arguments="${tmp#* }"
42442 
42443   # Input might be given as Windows format, start by converting to
42444   # unix format.
42445   new_path="$path"
42446 
42447   windows_path="$new_path"
42448   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42449     unix_path=`$CYGPATH -u "$windows_path"`
42450     new_path="$unix_path"
42451   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42452     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42453     new_path="$unix_path"
42454   fi
42455 
42456 
42457   # Now try to locate executable using which
42458   new_path=`$WHICH "$new_path" 2> /dev/null`
42459 
42460   if test "x$new_path" = x; then
42461     # Oops. Which didn't find the executable.
42462     # The splitting of arguments from the executable at a space might have been incorrect,
42463     # since paths with space are more likely in Windows. Give it another try with the whole
42464     # argument.
42465     path="$complete"
42466     arguments="EOL"
42467     new_path="$path"
42468 
42469   windows_path="$new_path"
42470   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42471     unix_path=`$CYGPATH -u "$windows_path"`
42472     new_path="$unix_path"
42473   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42474     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42475     new_path="$unix_path"
42476   fi
42477 
42478 
42479     new_path=`$WHICH "$new_path" 2> /dev/null`
42480     # bat and cmd files are not always considered executable in MSYS causing which
42481     # to not find them
42482     if test "x$new_path" = x \
42483         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42484         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42485       new_path="$path"
42486 
42487   windows_path="$new_path"
42488   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42489     unix_path=`$CYGPATH -u "$windows_path"`
42490     new_path="$unix_path"
42491   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42492     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42493     new_path="$unix_path"
42494   fi
42495 
42496     fi
42497 
42498     if test "x$new_path" = x; then
42499       # It's still not found. Now this is an unrecoverable error.
42500       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42501 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42502       has_space=`$ECHO "$complete" | $GREP " "`
42503       if test "x$has_space" != x; then
42504         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42505 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42506       fi
42507       as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42508     fi
42509   fi
42510 
42511   # Now new_path has a complete unix path to the binary
42512   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42513     # Keep paths in /bin as-is, but remove trailing .exe if any
42514     new_path="${new_path/%.exe/}"
42515     # Do not save /bin paths to all_fixpath_prefixes!
42516   else
42517     # Not in mixed or Windows style, start by that.
42518     new_path=`cmd //c echo $new_path`
42519 
42520   input_path="$new_path"
42521   # Check if we need to convert this using DOS-style short mode. If the path
42522   # contains just simple characters, use it. Otherwise (spaces, weird characters),
42523   # take no chances and rewrite it.
42524   # Note: m4 eats our [], so we need to use [ and ] instead.
42525   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42526   if test "x$has_forbidden_chars" != x; then
42527     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42528     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42529   fi
42530 
42531     # Output is in $new_path
42532 
42533   windows_path="$new_path"
42534   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42535     unix_path=`$CYGPATH -u "$windows_path"`
42536     new_path="$unix_path"
42537   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42538     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42539     new_path="$unix_path"
42540   fi
42541 
42542     # remove trailing .exe if any
42543     new_path="${new_path/%.exe/}"
42544 
42545     # Save the first 10 bytes of this path to the storage, so fixpath can work.
42546     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42547   fi
42548 
42549     else
42550       # We're on a unix platform. Hooray! :)
42551       # First separate the path from the arguments. This will split at the first
42552       # space.
42553       complete="$STRIP"
42554       path="${complete%% *}"
42555       tmp="$complete EOL"
42556       arguments="${tmp#* }"
42557 
42558       # Cannot rely on the command "which" here since it doesn't always work.
42559       is_absolute_path=`$ECHO "$path" | $GREP ^/`
42560       if test -z "$is_absolute_path"; then
42561         # Path to executable is not absolute. Find it.
42562         IFS_save="$IFS"
42563         IFS=:
42564         for p in $PATH; do
42565           if test -f "$p/$path" && test -x "$p/$path"; then
42566             new_path="$p/$path"
42567             break
42568           fi
42569         done
42570         IFS="$IFS_save"
42571       else
42572         # This is an absolute path, we can use it without further modifications.
42573         new_path="$path"
42574       fi
42575 
42576       if test "x$new_path" = x; then
42577         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42578 $as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42579         has_space=`$ECHO "$complete" | $GREP " "`
42580         if test "x$has_space" != x; then
42581           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42582 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42583         fi
42584         as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42585       fi
42586     fi
42587 
42588     # Now join together the path and the arguments once again
42589     if test "x$arguments" != xEOL; then
42590       new_complete="$new_path ${arguments% *}"
42591     else
42592       new_complete="$new_path"
42593     fi
42594 
42595     if test "x$complete" != "x$new_complete"; then
42596       STRIP="$new_complete"
42597       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42598 $as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42599     fi
42600   fi
42601 
42602     if test "x$TOOLCHAIN_TYPE" = xgcc; then
42603 
42604 
42605   # Publish this variable in the help.
42606 
42607 
42608   if [ -z "${NM+x}" ]; then
42609     # The variable is not set by user, try to locate tool using the code snippet
42610     if test -n "$ac_tool_prefix"; then
42611   for ac_prog in nm gcc-nm
42612   do
42613     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42614 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42616 $as_echo_n "checking for $ac_word... " >&6; }
42617 if ${ac_cv_prog_NM+:} false; then :
42618   $as_echo_n "(cached) " >&6
42619 else
42620   if test -n "$NM"; then
42621   ac_cv_prog_NM="$NM" # Let the user override the test.
42622 else
42623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42624 for as_dir in $PATH
42625 do
42626   IFS=$as_save_IFS
42627   test -z "$as_dir" && as_dir=.
42628     for ac_exec_ext in '' $ac_executable_extensions; do
42629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42630     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42632     break 2
42633   fi
42634 done
42635   done
42636 IFS=$as_save_IFS
42637 
42638 fi
42639 fi
42640 NM=$ac_cv_prog_NM
42641 if test -n "$NM"; then
42642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42643 $as_echo "$NM" >&6; }
42644 else
42645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42646 $as_echo "no" >&6; }
42647 fi
42648 
42649 
42650     test -n "$NM" && break
42651   done
42652 fi
42653 if test -z "$NM"; then
42654   ac_ct_NM=$NM
42655   for ac_prog in nm gcc-nm
42656 do
42657   # Extract the first word of "$ac_prog", so it can be a program name with args.
42658 set dummy $ac_prog; ac_word=$2
42659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42660 $as_echo_n "checking for $ac_word... " >&6; }
42661 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42662   $as_echo_n "(cached) " >&6
42663 else
42664   if test -n "$ac_ct_NM"; then
42665   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42666 else
42667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42668 for as_dir in $PATH
42669 do
42670   IFS=$as_save_IFS
42671   test -z "$as_dir" && as_dir=.
42672     for ac_exec_ext in '' $ac_executable_extensions; do
42673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42674     ac_cv_prog_ac_ct_NM="$ac_prog"
42675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42676     break 2
42677   fi
42678 done
42679   done
42680 IFS=$as_save_IFS
42681 
42682 fi
42683 fi
42684 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42685 if test -n "$ac_ct_NM"; then
42686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42687 $as_echo "$ac_ct_NM" >&6; }
42688 else
42689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42690 $as_echo "no" >&6; }
42691 fi
42692 
42693 
42694   test -n "$ac_ct_NM" && break
42695 done
42696 
42697   if test "x$ac_ct_NM" = x; then
42698     NM=""
42699   else
42700     case $cross_compiling:$ac_tool_warned in
42701 yes:)
42702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42703 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42704 ac_tool_warned=yes ;;
42705 esac
42706     NM=$ac_ct_NM
42707   fi
42708 fi
42709 
42710   else
42711     # The variable is set, but is it from the command line or the environment?
42712 
42713     # Try to remove the string !NM! from our list.
42714     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42715     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42716       # If it failed, the variable was not from the command line. Ignore it,
42717       # but warn the user (except for BASH, which is always set by the calling BASH).
42718       if test "xNM" != xBASH; then
42719         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42720 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42721       fi
42722       # Try to locate tool using the code snippet
42723       if test -n "$ac_tool_prefix"; then
42724   for ac_prog in nm gcc-nm
42725   do
42726     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42727 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42729 $as_echo_n "checking for $ac_word... " >&6; }
42730 if ${ac_cv_prog_NM+:} false; then :
42731   $as_echo_n "(cached) " >&6
42732 else
42733   if test -n "$NM"; then
42734   ac_cv_prog_NM="$NM" # Let the user override the test.
42735 else
42736 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42737 for as_dir in $PATH
42738 do
42739   IFS=$as_save_IFS
42740   test -z "$as_dir" && as_dir=.
42741     for ac_exec_ext in '' $ac_executable_extensions; do
42742   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42743     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42744     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42745     break 2
42746   fi
42747 done
42748   done
42749 IFS=$as_save_IFS
42750 
42751 fi
42752 fi
42753 NM=$ac_cv_prog_NM
42754 if test -n "$NM"; then
42755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42756 $as_echo "$NM" >&6; }
42757 else
42758   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42759 $as_echo "no" >&6; }
42760 fi
42761 
42762 
42763     test -n "$NM" && break
42764   done
42765 fi
42766 if test -z "$NM"; then
42767   ac_ct_NM=$NM
42768   for ac_prog in nm gcc-nm
42769 do
42770   # Extract the first word of "$ac_prog", so it can be a program name with args.
42771 set dummy $ac_prog; ac_word=$2
42772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42773 $as_echo_n "checking for $ac_word... " >&6; }
42774 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42775   $as_echo_n "(cached) " >&6
42776 else
42777   if test -n "$ac_ct_NM"; then
42778   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42779 else
42780 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42781 for as_dir in $PATH
42782 do
42783   IFS=$as_save_IFS
42784   test -z "$as_dir" && as_dir=.
42785     for ac_exec_ext in '' $ac_executable_extensions; do
42786   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42787     ac_cv_prog_ac_ct_NM="$ac_prog"
42788     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42789     break 2
42790   fi
42791 done
42792   done
42793 IFS=$as_save_IFS
42794 
42795 fi
42796 fi
42797 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42798 if test -n "$ac_ct_NM"; then
42799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42800 $as_echo "$ac_ct_NM" >&6; }
42801 else
42802   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42803 $as_echo "no" >&6; }
42804 fi
42805 
42806 
42807   test -n "$ac_ct_NM" && break
42808 done
42809 
42810   if test "x$ac_ct_NM" = x; then
42811     NM=""
42812   else
42813     case $cross_compiling:$ac_tool_warned in
42814 yes:)
42815 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42816 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42817 ac_tool_warned=yes ;;
42818 esac
42819     NM=$ac_ct_NM
42820   fi
42821 fi
42822 
42823     else
42824       # If it succeeded, then it was overridden by the user. We will use it
42825       # for the tool.
42826 
42827       # First remove it from the list of overridden variables, so we can test
42828       # for unknown variables in the end.
42829       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42830 
42831       # Check if we try to supply an empty value
42832       if test "x$NM" = x; then
42833         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42834 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42835         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42836 $as_echo_n "checking for NM... " >&6; }
42837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42838 $as_echo "disabled" >&6; }
42839       else
42840         # Check if the provided tool contains a complete path.
42841         tool_specified="$NM"
42842         tool_basename="${tool_specified##*/}"
42843         if test "x$tool_basename" = "x$tool_specified"; then
42844           # A command without a complete path is provided, search $PATH.
42845           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42846 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42847           # Extract the first word of "$tool_basename", so it can be a program name with args.
42848 set dummy $tool_basename; ac_word=$2
42849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42850 $as_echo_n "checking for $ac_word... " >&6; }
42851 if ${ac_cv_path_NM+:} false; then :
42852   $as_echo_n "(cached) " >&6
42853 else
42854   case $NM in
42855   [\\/]* | ?:[\\/]*)
42856   ac_cv_path_NM="$NM" # Let the user override the test with a path.
42857   ;;
42858   *)
42859   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42860 for as_dir in $PATH
42861 do
42862   IFS=$as_save_IFS
42863   test -z "$as_dir" && as_dir=.
42864     for ac_exec_ext in '' $ac_executable_extensions; do
42865   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42866     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42867     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42868     break 2
42869   fi
42870 done
42871   done
42872 IFS=$as_save_IFS
42873 
42874   ;;
42875 esac
42876 fi
42877 NM=$ac_cv_path_NM
42878 if test -n "$NM"; then
42879   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42880 $as_echo "$NM" >&6; }
42881 else
42882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42883 $as_echo "no" >&6; }
42884 fi
42885 
42886 
42887           if test "x$NM" = x; then
42888             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42889           fi
42890         else
42891           # Otherwise we believe it is a complete path. Use it as it is.
42892           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42893 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42894           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42895 $as_echo_n "checking for NM... " >&6; }
42896           if test ! -x "$tool_specified"; then
42897             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42898 $as_echo "not found" >&6; }
42899             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42900           fi
42901           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42902 $as_echo "$tool_specified" >&6; }
42903         fi
42904       fi
42905     fi
42906 
42907   fi
42908 
42909 
42910     else
42911 
42912 
42913   # Publish this variable in the help.
42914 
42915 
42916   if [ -z "${NM+x}" ]; then
42917     # The variable is not set by user, try to locate tool using the code snippet
42918     if test -n "$ac_tool_prefix"; then
42919   for ac_prog in nm
42920   do
42921     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42922 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42924 $as_echo_n "checking for $ac_word... " >&6; }
42925 if ${ac_cv_prog_NM+:} false; then :
42926   $as_echo_n "(cached) " >&6
42927 else
42928   if test -n "$NM"; then
42929   ac_cv_prog_NM="$NM" # Let the user override the test.
42930 else
42931 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42932 for as_dir in $PATH
42933 do
42934   IFS=$as_save_IFS
42935   test -z "$as_dir" && as_dir=.
42936     for ac_exec_ext in '' $ac_executable_extensions; do
42937   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42938     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42939     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42940     break 2
42941   fi
42942 done
42943   done
42944 IFS=$as_save_IFS
42945 
42946 fi
42947 fi
42948 NM=$ac_cv_prog_NM
42949 if test -n "$NM"; then
42950   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42951 $as_echo "$NM" >&6; }
42952 else
42953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42954 $as_echo "no" >&6; }
42955 fi
42956 
42957 
42958     test -n "$NM" && break
42959   done
42960 fi
42961 if test -z "$NM"; then
42962   ac_ct_NM=$NM
42963   for ac_prog in nm
42964 do
42965   # Extract the first word of "$ac_prog", so it can be a program name with args.
42966 set dummy $ac_prog; ac_word=$2
42967 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42968 $as_echo_n "checking for $ac_word... " >&6; }
42969 if ${ac_cv_prog_ac_ct_NM+:} false; then :
42970   $as_echo_n "(cached) " >&6
42971 else
42972   if test -n "$ac_ct_NM"; then
42973   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42974 else
42975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42976 for as_dir in $PATH
42977 do
42978   IFS=$as_save_IFS
42979   test -z "$as_dir" && as_dir=.
42980     for ac_exec_ext in '' $ac_executable_extensions; do
42981   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42982     ac_cv_prog_ac_ct_NM="$ac_prog"
42983     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42984     break 2
42985   fi
42986 done
42987   done
42988 IFS=$as_save_IFS
42989 
42990 fi
42991 fi
42992 ac_ct_NM=$ac_cv_prog_ac_ct_NM
42993 if test -n "$ac_ct_NM"; then
42994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42995 $as_echo "$ac_ct_NM" >&6; }
42996 else
42997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42998 $as_echo "no" >&6; }
42999 fi
43000 
43001 
43002   test -n "$ac_ct_NM" && break
43003 done
43004 
43005   if test "x$ac_ct_NM" = x; then
43006     NM=""
43007   else
43008     case $cross_compiling:$ac_tool_warned in
43009 yes:)
43010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43011 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43012 ac_tool_warned=yes ;;
43013 esac
43014     NM=$ac_ct_NM
43015   fi
43016 fi
43017 
43018   else
43019     # The variable is set, but is it from the command line or the environment?
43020 
43021     # Try to remove the string !NM! from our list.
43022     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
43023     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43024       # If it failed, the variable was not from the command line. Ignore it,
43025       # but warn the user (except for BASH, which is always set by the calling BASH).
43026       if test "xNM" != xBASH; then
43027         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
43028 $as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
43029       fi
43030       # Try to locate tool using the code snippet
43031       if test -n "$ac_tool_prefix"; then
43032   for ac_prog in nm
43033   do
43034     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43035 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43037 $as_echo_n "checking for $ac_word... " >&6; }
43038 if ${ac_cv_prog_NM+:} false; then :
43039   $as_echo_n "(cached) " >&6
43040 else
43041   if test -n "$NM"; then
43042   ac_cv_prog_NM="$NM" # Let the user override the test.
43043 else
43044 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43045 for as_dir in $PATH
43046 do
43047   IFS=$as_save_IFS
43048   test -z "$as_dir" && as_dir=.
43049     for ac_exec_ext in '' $ac_executable_extensions; do
43050   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43051     ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
43052     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43053     break 2
43054   fi
43055 done
43056   done
43057 IFS=$as_save_IFS
43058 
43059 fi
43060 fi
43061 NM=$ac_cv_prog_NM
43062 if test -n "$NM"; then
43063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43064 $as_echo "$NM" >&6; }
43065 else
43066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43067 $as_echo "no" >&6; }
43068 fi
43069 
43070 
43071     test -n "$NM" && break
43072   done
43073 fi
43074 if test -z "$NM"; then
43075   ac_ct_NM=$NM
43076   for ac_prog in nm
43077 do
43078   # Extract the first word of "$ac_prog", so it can be a program name with args.
43079 set dummy $ac_prog; ac_word=$2
43080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43081 $as_echo_n "checking for $ac_word... " >&6; }
43082 if ${ac_cv_prog_ac_ct_NM+:} false; then :
43083   $as_echo_n "(cached) " >&6
43084 else
43085   if test -n "$ac_ct_NM"; then
43086   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
43087 else
43088 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43089 for as_dir in $PATH
43090 do
43091   IFS=$as_save_IFS
43092   test -z "$as_dir" && as_dir=.
43093     for ac_exec_ext in '' $ac_executable_extensions; do
43094   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43095     ac_cv_prog_ac_ct_NM="$ac_prog"
43096     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43097     break 2
43098   fi
43099 done
43100   done
43101 IFS=$as_save_IFS
43102 
43103 fi
43104 fi
43105 ac_ct_NM=$ac_cv_prog_ac_ct_NM
43106 if test -n "$ac_ct_NM"; then
43107   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
43108 $as_echo "$ac_ct_NM" >&6; }
43109 else
43110   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43111 $as_echo "no" >&6; }
43112 fi
43113 
43114 
43115   test -n "$ac_ct_NM" && break
43116 done
43117 
43118   if test "x$ac_ct_NM" = x; then
43119     NM=""
43120   else
43121     case $cross_compiling:$ac_tool_warned in
43122 yes:)
43123 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43124 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43125 ac_tool_warned=yes ;;
43126 esac
43127     NM=$ac_ct_NM
43128   fi
43129 fi
43130 
43131     else
43132       # If it succeeded, then it was overridden by the user. We will use it
43133       # for the tool.
43134 
43135       # First remove it from the list of overridden variables, so we can test
43136       # for unknown variables in the end.
43137       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43138 
43139       # Check if we try to supply an empty value
43140       if test "x$NM" = x; then
43141         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
43142 $as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
43143         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43144 $as_echo_n "checking for NM... " >&6; }
43145         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43146 $as_echo "disabled" >&6; }
43147       else
43148         # Check if the provided tool contains a complete path.
43149         tool_specified="$NM"
43150         tool_basename="${tool_specified##*/}"
43151         if test "x$tool_basename" = "x$tool_specified"; then
43152           # A command without a complete path is provided, search $PATH.
43153           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
43154 $as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
43155           # Extract the first word of "$tool_basename", so it can be a program name with args.
43156 set dummy $tool_basename; ac_word=$2
43157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43158 $as_echo_n "checking for $ac_word... " >&6; }
43159 if ${ac_cv_path_NM+:} false; then :
43160   $as_echo_n "(cached) " >&6
43161 else
43162   case $NM in
43163   [\\/]* | ?:[\\/]*)
43164   ac_cv_path_NM="$NM" # Let the user override the test with a path.
43165   ;;
43166   *)
43167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43168 for as_dir in $PATH
43169 do
43170   IFS=$as_save_IFS
43171   test -z "$as_dir" && as_dir=.
43172     for ac_exec_ext in '' $ac_executable_extensions; do
43173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43174     ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
43175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43176     break 2
43177   fi
43178 done
43179   done
43180 IFS=$as_save_IFS
43181 
43182   ;;
43183 esac
43184 fi
43185 NM=$ac_cv_path_NM
43186 if test -n "$NM"; then
43187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
43188 $as_echo "$NM" >&6; }
43189 else
43190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43191 $as_echo "no" >&6; }
43192 fi
43193 
43194 
43195           if test "x$NM" = x; then
43196             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43197           fi
43198         else
43199           # Otherwise we believe it is a complete path. Use it as it is.
43200           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
43201 $as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
43202           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
43203 $as_echo_n "checking for NM... " >&6; }
43204           if test ! -x "$tool_specified"; then
43205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43206 $as_echo "not found" >&6; }
43207             as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
43208           fi
43209           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43210 $as_echo "$tool_specified" >&6; }
43211         fi
43212       fi
43213     fi
43214 
43215   fi
43216 
43217 
43218     fi
43219 
43220   # Only process if variable expands to non-empty
43221 
43222   if test "x$NM" != x; then
43223     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43224 
43225   # First separate the path from the arguments. This will split at the first
43226   # space.
43227   complete="$NM"
43228   path="${complete%% *}"
43229   tmp="$complete EOL"
43230   arguments="${tmp#* }"
43231 
43232   # Input might be given as Windows format, start by converting to
43233   # unix format.
43234   new_path=`$CYGPATH -u "$path"`
43235 
43236   # Now try to locate executable using which
43237   new_path=`$WHICH "$new_path" 2> /dev/null`
43238   # bat and cmd files are not always considered executable in cygwin causing which
43239   # to not find them
43240   if test "x$new_path" = x \
43241       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43242       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43243     new_path=`$CYGPATH -u "$path"`
43244   fi
43245   if test "x$new_path" = x; then
43246     # Oops. Which didn't find the executable.
43247     # The splitting of arguments from the executable at a space might have been incorrect,
43248     # since paths with space are more likely in Windows. Give it another try with the whole
43249     # argument.
43250     path="$complete"
43251     arguments="EOL"
43252     new_path=`$CYGPATH -u "$path"`
43253     new_path=`$WHICH "$new_path" 2> /dev/null`
43254     # bat and cmd files are not always considered executable in cygwin causing which
43255     # to not find them
43256     if test "x$new_path" = x \
43257         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43258         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43259       new_path=`$CYGPATH -u "$path"`
43260     fi
43261     if test "x$new_path" = x; then
43262       # It's still not found. Now this is an unrecoverable error.
43263       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43264 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43265       has_space=`$ECHO "$complete" | $GREP " "`
43266       if test "x$has_space" != x; then
43267         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43268 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43269       fi
43270       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43271     fi
43272   fi
43273 
43274   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43275   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43276   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43277   # "foo.exe" is OK but "foo" is an error.
43278   #
43279   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43280   # It is also a way to make sure we got the proper file name for the real test later on.
43281   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43282   if test "x$test_shortpath" = x; then
43283     # Short path failed, file does not exist as specified.
43284     # Try adding .exe or .cmd
43285     if test -f "${new_path}.exe"; then
43286       input_to_shortpath="${new_path}.exe"
43287     elif test -f "${new_path}.cmd"; then
43288       input_to_shortpath="${new_path}.cmd"
43289     else
43290       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
43291 $as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
43292       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43293 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43294       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43295     fi
43296   else
43297     input_to_shortpath="$new_path"
43298   fi
43299 
43300   # Call helper function which possibly converts this using DOS-style short mode.
43301   # If so, the updated path is stored in $new_path.
43302   new_path="$input_to_shortpath"
43303 
43304   input_path="$input_to_shortpath"
43305   # Check if we need to convert this using DOS-style short mode. If the path
43306   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43307   # take no chances and rewrite it.
43308   # Note: m4 eats our [], so we need to use [ and ] instead.
43309   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43310   if test "x$has_forbidden_chars" != x; then
43311     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43312     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43313     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43314     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43315       # Going to short mode and back again did indeed matter. Since short mode is
43316       # case insensitive, let's make it lowercase to improve readability.
43317       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43318       # Now convert it back to Unix-style (cygpath)
43319       input_path=`$CYGPATH -u "$shortmode_path"`
43320       new_path="$input_path"
43321     fi
43322   fi
43323 
43324   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43325   if test "x$test_cygdrive_prefix" = x; then
43326     # As a simple fix, exclude /usr/bin since it's not a real path.
43327     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43328       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43329       # a path prefixed by /cygdrive for fixpath to work.
43330       new_path="$CYGWIN_ROOT_PATH$input_path"
43331     fi
43332   fi
43333 
43334   # remove trailing .exe if any
43335   new_path="${new_path/%.exe/}"
43336 
43337     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43338 
43339   # First separate the path from the arguments. This will split at the first
43340   # space.
43341   complete="$NM"
43342   path="${complete%% *}"
43343   tmp="$complete EOL"
43344   arguments="${tmp#* }"
43345 
43346   # Input might be given as Windows format, start by converting to
43347   # unix format.
43348   new_path="$path"
43349 
43350   windows_path="$new_path"
43351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43352     unix_path=`$CYGPATH -u "$windows_path"`
43353     new_path="$unix_path"
43354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43356     new_path="$unix_path"
43357   fi
43358 
43359 
43360   # Now try to locate executable using which
43361   new_path=`$WHICH "$new_path" 2> /dev/null`
43362 
43363   if test "x$new_path" = x; then
43364     # Oops. Which didn't find the executable.
43365     # The splitting of arguments from the executable at a space might have been incorrect,
43366     # since paths with space are more likely in Windows. Give it another try with the whole
43367     # argument.
43368     path="$complete"
43369     arguments="EOL"
43370     new_path="$path"
43371 
43372   windows_path="$new_path"
43373   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43374     unix_path=`$CYGPATH -u "$windows_path"`
43375     new_path="$unix_path"
43376   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43377     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43378     new_path="$unix_path"
43379   fi
43380 
43381 
43382     new_path=`$WHICH "$new_path" 2> /dev/null`
43383     # bat and cmd files are not always considered executable in MSYS causing which
43384     # to not find them
43385     if test "x$new_path" = x \
43386         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43387         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43388       new_path="$path"
43389 
43390   windows_path="$new_path"
43391   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43392     unix_path=`$CYGPATH -u "$windows_path"`
43393     new_path="$unix_path"
43394   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43395     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43396     new_path="$unix_path"
43397   fi
43398 
43399     fi
43400 
43401     if test "x$new_path" = x; then
43402       # It's still not found. Now this is an unrecoverable error.
43403       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43404 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43405       has_space=`$ECHO "$complete" | $GREP " "`
43406       if test "x$has_space" != x; then
43407         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43408 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43409       fi
43410       as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43411     fi
43412   fi
43413 
43414   # Now new_path has a complete unix path to the binary
43415   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43416     # Keep paths in /bin as-is, but remove trailing .exe if any
43417     new_path="${new_path/%.exe/}"
43418     # Do not save /bin paths to all_fixpath_prefixes!
43419   else
43420     # Not in mixed or Windows style, start by that.
43421     new_path=`cmd //c echo $new_path`
43422 
43423   input_path="$new_path"
43424   # Check if we need to convert this using DOS-style short mode. If the path
43425   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43426   # take no chances and rewrite it.
43427   # Note: m4 eats our [], so we need to use [ and ] instead.
43428   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43429   if test "x$has_forbidden_chars" != x; then
43430     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43431     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43432   fi
43433 
43434     # Output is in $new_path
43435 
43436   windows_path="$new_path"
43437   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43438     unix_path=`$CYGPATH -u "$windows_path"`
43439     new_path="$unix_path"
43440   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43441     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43442     new_path="$unix_path"
43443   fi
43444 
43445     # remove trailing .exe if any
43446     new_path="${new_path/%.exe/}"
43447 
43448     # Save the first 10 bytes of this path to the storage, so fixpath can work.
43449     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43450   fi
43451 
43452     else
43453       # We're on a unix platform. Hooray! :)
43454       # First separate the path from the arguments. This will split at the first
43455       # space.
43456       complete="$NM"
43457       path="${complete%% *}"
43458       tmp="$complete EOL"
43459       arguments="${tmp#* }"
43460 
43461       # Cannot rely on the command "which" here since it doesn't always work.
43462       is_absolute_path=`$ECHO "$path" | $GREP ^/`
43463       if test -z "$is_absolute_path"; then
43464         # Path to executable is not absolute. Find it.
43465         IFS_save="$IFS"
43466         IFS=:
43467         for p in $PATH; do
43468           if test -f "$p/$path" && test -x "$p/$path"; then
43469             new_path="$p/$path"
43470             break
43471           fi
43472         done
43473         IFS="$IFS_save"
43474       else
43475         # This is an absolute path, we can use it without further modifications.
43476         new_path="$path"
43477       fi
43478 
43479       if test "x$new_path" = x; then
43480         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
43481 $as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
43482         has_space=`$ECHO "$complete" | $GREP " "`
43483         if test "x$has_space" != x; then
43484           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43485 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43486         fi
43487         as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
43488       fi
43489     fi
43490 
43491     # Now join together the path and the arguments once again
43492     if test "x$arguments" != xEOL; then
43493       new_complete="$new_path ${arguments% *}"
43494     else
43495       new_complete="$new_path"
43496     fi
43497 
43498     if test "x$complete" != "x$new_complete"; then
43499       NM="$new_complete"
43500       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
43501 $as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
43502     fi
43503   fi
43504 
43505     GNM="$NM"
43506 
43507   fi
43508 
43509   # objcopy is used for moving debug symbols to separate files when
43510   # full debug symbols are enabled.
43511   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
43512 
43513 
43514   # Publish this variable in the help.
43515 
43516 
43517   if [ -z "${OBJCOPY+x}" ]; then
43518     # The variable is not set by user, try to locate tool using the code snippet
43519     if test -n "$ac_tool_prefix"; then
43520   for ac_prog in gobjcopy objcopy
43521   do
43522     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43523 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43525 $as_echo_n "checking for $ac_word... " >&6; }
43526 if ${ac_cv_prog_OBJCOPY+:} false; then :
43527   $as_echo_n "(cached) " >&6
43528 else
43529   if test -n "$OBJCOPY"; then
43530   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43531 else
43532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43533 for as_dir in $PATH
43534 do
43535   IFS=$as_save_IFS
43536   test -z "$as_dir" && as_dir=.
43537     for ac_exec_ext in '' $ac_executable_extensions; do
43538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43539     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43541     break 2
43542   fi
43543 done
43544   done
43545 IFS=$as_save_IFS
43546 
43547 fi
43548 fi
43549 OBJCOPY=$ac_cv_prog_OBJCOPY
43550 if test -n "$OBJCOPY"; then
43551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43552 $as_echo "$OBJCOPY" >&6; }
43553 else
43554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43555 $as_echo "no" >&6; }
43556 fi
43557 
43558 
43559     test -n "$OBJCOPY" && break
43560   done
43561 fi
43562 if test -z "$OBJCOPY"; then
43563   ac_ct_OBJCOPY=$OBJCOPY
43564   for ac_prog in gobjcopy objcopy
43565 do
43566   # Extract the first word of "$ac_prog", so it can be a program name with args.
43567 set dummy $ac_prog; ac_word=$2
43568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43569 $as_echo_n "checking for $ac_word... " >&6; }
43570 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43571   $as_echo_n "(cached) " >&6
43572 else
43573   if test -n "$ac_ct_OBJCOPY"; then
43574   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43575 else
43576 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43577 for as_dir in $PATH
43578 do
43579   IFS=$as_save_IFS
43580   test -z "$as_dir" && as_dir=.
43581     for ac_exec_ext in '' $ac_executable_extensions; do
43582   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43583     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43584     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43585     break 2
43586   fi
43587 done
43588   done
43589 IFS=$as_save_IFS
43590 
43591 fi
43592 fi
43593 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43594 if test -n "$ac_ct_OBJCOPY"; then
43595   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43596 $as_echo "$ac_ct_OBJCOPY" >&6; }
43597 else
43598   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43599 $as_echo "no" >&6; }
43600 fi
43601 
43602 
43603   test -n "$ac_ct_OBJCOPY" && break
43604 done
43605 
43606   if test "x$ac_ct_OBJCOPY" = x; then
43607     OBJCOPY=""
43608   else
43609     case $cross_compiling:$ac_tool_warned in
43610 yes:)
43611 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43612 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43613 ac_tool_warned=yes ;;
43614 esac
43615     OBJCOPY=$ac_ct_OBJCOPY
43616   fi
43617 fi
43618 
43619   else
43620     # The variable is set, but is it from the command line or the environment?
43621 
43622     # Try to remove the string !OBJCOPY! from our list.
43623     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43624     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43625       # If it failed, the variable was not from the command line. Ignore it,
43626       # but warn the user (except for BASH, which is always set by the calling BASH).
43627       if test "xOBJCOPY" != xBASH; then
43628         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43629 $as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43630       fi
43631       # Try to locate tool using the code snippet
43632       if test -n "$ac_tool_prefix"; then
43633   for ac_prog in gobjcopy objcopy
43634   do
43635     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43636 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43638 $as_echo_n "checking for $ac_word... " >&6; }
43639 if ${ac_cv_prog_OBJCOPY+:} false; then :
43640   $as_echo_n "(cached) " >&6
43641 else
43642   if test -n "$OBJCOPY"; then
43643   ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43644 else
43645 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43646 for as_dir in $PATH
43647 do
43648   IFS=$as_save_IFS
43649   test -z "$as_dir" && as_dir=.
43650     for ac_exec_ext in '' $ac_executable_extensions; do
43651   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43652     ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43653     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43654     break 2
43655   fi
43656 done
43657   done
43658 IFS=$as_save_IFS
43659 
43660 fi
43661 fi
43662 OBJCOPY=$ac_cv_prog_OBJCOPY
43663 if test -n "$OBJCOPY"; then
43664   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43665 $as_echo "$OBJCOPY" >&6; }
43666 else
43667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43668 $as_echo "no" >&6; }
43669 fi
43670 
43671 
43672     test -n "$OBJCOPY" && break
43673   done
43674 fi
43675 if test -z "$OBJCOPY"; then
43676   ac_ct_OBJCOPY=$OBJCOPY
43677   for ac_prog in gobjcopy objcopy
43678 do
43679   # Extract the first word of "$ac_prog", so it can be a program name with args.
43680 set dummy $ac_prog; ac_word=$2
43681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43682 $as_echo_n "checking for $ac_word... " >&6; }
43683 if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43684   $as_echo_n "(cached) " >&6
43685 else
43686   if test -n "$ac_ct_OBJCOPY"; then
43687   ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43688 else
43689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43690 for as_dir in $PATH
43691 do
43692   IFS=$as_save_IFS
43693   test -z "$as_dir" && as_dir=.
43694     for ac_exec_ext in '' $ac_executable_extensions; do
43695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43696     ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43698     break 2
43699   fi
43700 done
43701   done
43702 IFS=$as_save_IFS
43703 
43704 fi
43705 fi
43706 ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43707 if test -n "$ac_ct_OBJCOPY"; then
43708   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43709 $as_echo "$ac_ct_OBJCOPY" >&6; }
43710 else
43711   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43712 $as_echo "no" >&6; }
43713 fi
43714 
43715 
43716   test -n "$ac_ct_OBJCOPY" && break
43717 done
43718 
43719   if test "x$ac_ct_OBJCOPY" = x; then
43720     OBJCOPY=""
43721   else
43722     case $cross_compiling:$ac_tool_warned in
43723 yes:)
43724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43725 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43726 ac_tool_warned=yes ;;
43727 esac
43728     OBJCOPY=$ac_ct_OBJCOPY
43729   fi
43730 fi
43731 
43732     else
43733       # If it succeeded, then it was overridden by the user. We will use it
43734       # for the tool.
43735 
43736       # First remove it from the list of overridden variables, so we can test
43737       # for unknown variables in the end.
43738       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43739 
43740       # Check if we try to supply an empty value
43741       if test "x$OBJCOPY" = x; then
43742         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43743 $as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43744         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43745 $as_echo_n "checking for OBJCOPY... " >&6; }
43746         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43747 $as_echo "disabled" >&6; }
43748       else
43749         # Check if the provided tool contains a complete path.
43750         tool_specified="$OBJCOPY"
43751         tool_basename="${tool_specified##*/}"
43752         if test "x$tool_basename" = "x$tool_specified"; then
43753           # A command without a complete path is provided, search $PATH.
43754           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43755 $as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43756           # Extract the first word of "$tool_basename", so it can be a program name with args.
43757 set dummy $tool_basename; ac_word=$2
43758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43759 $as_echo_n "checking for $ac_word... " >&6; }
43760 if ${ac_cv_path_OBJCOPY+:} false; then :
43761   $as_echo_n "(cached) " >&6
43762 else
43763   case $OBJCOPY in
43764   [\\/]* | ?:[\\/]*)
43765   ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43766   ;;
43767   *)
43768   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43769 for as_dir in $PATH
43770 do
43771   IFS=$as_save_IFS
43772   test -z "$as_dir" && as_dir=.
43773     for ac_exec_ext in '' $ac_executable_extensions; do
43774   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43775     ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43776     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43777     break 2
43778   fi
43779 done
43780   done
43781 IFS=$as_save_IFS
43782 
43783   ;;
43784 esac
43785 fi
43786 OBJCOPY=$ac_cv_path_OBJCOPY
43787 if test -n "$OBJCOPY"; then
43788   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43789 $as_echo "$OBJCOPY" >&6; }
43790 else
43791   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43792 $as_echo "no" >&6; }
43793 fi
43794 
43795 
43796           if test "x$OBJCOPY" = x; then
43797             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43798           fi
43799         else
43800           # Otherwise we believe it is a complete path. Use it as it is.
43801           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43802 $as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43803           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43804 $as_echo_n "checking for OBJCOPY... " >&6; }
43805           if test ! -x "$tool_specified"; then
43806             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43807 $as_echo "not found" >&6; }
43808             as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43809           fi
43810           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43811 $as_echo "$tool_specified" >&6; }
43812         fi
43813       fi
43814     fi
43815 
43816   fi
43817 
43818 
43819     # Only call fixup if objcopy was found.
43820     if test -n "$OBJCOPY"; then
43821 
43822   # Only process if variable expands to non-empty
43823 
43824   if test "x$OBJCOPY" != x; then
43825     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43826 
43827   # First separate the path from the arguments. This will split at the first
43828   # space.
43829   complete="$OBJCOPY"
43830   path="${complete%% *}"
43831   tmp="$complete EOL"
43832   arguments="${tmp#* }"
43833 
43834   # Input might be given as Windows format, start by converting to
43835   # unix format.
43836   new_path=`$CYGPATH -u "$path"`
43837 
43838   # Now try to locate executable using which
43839   new_path=`$WHICH "$new_path" 2> /dev/null`
43840   # bat and cmd files are not always considered executable in cygwin causing which
43841   # to not find them
43842   if test "x$new_path" = x \
43843       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43844       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43845     new_path=`$CYGPATH -u "$path"`
43846   fi
43847   if test "x$new_path" = x; then
43848     # Oops. Which didn't find the executable.
43849     # The splitting of arguments from the executable at a space might have been incorrect,
43850     # since paths with space are more likely in Windows. Give it another try with the whole
43851     # argument.
43852     path="$complete"
43853     arguments="EOL"
43854     new_path=`$CYGPATH -u "$path"`
43855     new_path=`$WHICH "$new_path" 2> /dev/null`
43856     # bat and cmd files are not always considered executable in cygwin causing which
43857     # to not find them
43858     if test "x$new_path" = x \
43859         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43860         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43861       new_path=`$CYGPATH -u "$path"`
43862     fi
43863     if test "x$new_path" = x; then
43864       # It's still not found. Now this is an unrecoverable error.
43865       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43866 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43867       has_space=`$ECHO "$complete" | $GREP " "`
43868       if test "x$has_space" != x; then
43869         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43870 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43871       fi
43872       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43873     fi
43874   fi
43875 
43876   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43877   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43878   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43879   # "foo.exe" is OK but "foo" is an error.
43880   #
43881   # This test is therefore slightly more accurate than "test -f" to check for file presence.
43882   # It is also a way to make sure we got the proper file name for the real test later on.
43883   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43884   if test "x$test_shortpath" = x; then
43885     # Short path failed, file does not exist as specified.
43886     # Try adding .exe or .cmd
43887     if test -f "${new_path}.exe"; then
43888       input_to_shortpath="${new_path}.exe"
43889     elif test -f "${new_path}.cmd"; then
43890       input_to_shortpath="${new_path}.cmd"
43891     else
43892       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43893 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43894       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43895 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43896       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43897     fi
43898   else
43899     input_to_shortpath="$new_path"
43900   fi
43901 
43902   # Call helper function which possibly converts this using DOS-style short mode.
43903   # If so, the updated path is stored in $new_path.
43904   new_path="$input_to_shortpath"
43905 
43906   input_path="$input_to_shortpath"
43907   # Check if we need to convert this using DOS-style short mode. If the path
43908   # contains just simple characters, use it. Otherwise (spaces, weird characters),
43909   # take no chances and rewrite it.
43910   # Note: m4 eats our [], so we need to use [ and ] instead.
43911   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43912   if test "x$has_forbidden_chars" != x; then
43913     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43914     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43915     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43916     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43917       # Going to short mode and back again did indeed matter. Since short mode is
43918       # case insensitive, let's make it lowercase to improve readability.
43919       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43920       # Now convert it back to Unix-style (cygpath)
43921       input_path=`$CYGPATH -u "$shortmode_path"`
43922       new_path="$input_path"
43923     fi
43924   fi
43925 
43926   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43927   if test "x$test_cygdrive_prefix" = x; then
43928     # As a simple fix, exclude /usr/bin since it's not a real path.
43929     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43930       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43931       # a path prefixed by /cygdrive for fixpath to work.
43932       new_path="$CYGWIN_ROOT_PATH$input_path"
43933     fi
43934   fi
43935 
43936   # remove trailing .exe if any
43937   new_path="${new_path/%.exe/}"
43938 
43939     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43940 
43941   # First separate the path from the arguments. This will split at the first
43942   # space.
43943   complete="$OBJCOPY"
43944   path="${complete%% *}"
43945   tmp="$complete EOL"
43946   arguments="${tmp#* }"
43947 
43948   # Input might be given as Windows format, start by converting to
43949   # unix format.
43950   new_path="$path"
43951 
43952   windows_path="$new_path"
43953   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43954     unix_path=`$CYGPATH -u "$windows_path"`
43955     new_path="$unix_path"
43956   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43957     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43958     new_path="$unix_path"
43959   fi
43960 
43961 
43962   # Now try to locate executable using which
43963   new_path=`$WHICH "$new_path" 2> /dev/null`
43964 
43965   if test "x$new_path" = x; then
43966     # Oops. Which didn't find the executable.
43967     # The splitting of arguments from the executable at a space might have been incorrect,
43968     # since paths with space are more likely in Windows. Give it another try with the whole
43969     # argument.
43970     path="$complete"
43971     arguments="EOL"
43972     new_path="$path"
43973 
43974   windows_path="$new_path"
43975   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43976     unix_path=`$CYGPATH -u "$windows_path"`
43977     new_path="$unix_path"
43978   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43979     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43980     new_path="$unix_path"
43981   fi
43982 
43983 
43984     new_path=`$WHICH "$new_path" 2> /dev/null`
43985     # bat and cmd files are not always considered executable in MSYS causing which
43986     # to not find them
43987     if test "x$new_path" = x \
43988         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43989         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43990       new_path="$path"
43991 
43992   windows_path="$new_path"
43993   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43994     unix_path=`$CYGPATH -u "$windows_path"`
43995     new_path="$unix_path"
43996   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43997     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43998     new_path="$unix_path"
43999   fi
44000 
44001     fi
44002 
44003     if test "x$new_path" = x; then
44004       # It's still not found. Now this is an unrecoverable error.
44005       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44006 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44007       has_space=`$ECHO "$complete" | $GREP " "`
44008       if test "x$has_space" != x; then
44009         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44010 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44011       fi
44012       as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44013     fi
44014   fi
44015 
44016   # Now new_path has a complete unix path to the binary
44017   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44018     # Keep paths in /bin as-is, but remove trailing .exe if any
44019     new_path="${new_path/%.exe/}"
44020     # Do not save /bin paths to all_fixpath_prefixes!
44021   else
44022     # Not in mixed or Windows style, start by that.
44023     new_path=`cmd //c echo $new_path`
44024 
44025   input_path="$new_path"
44026   # Check if we need to convert this using DOS-style short mode. If the path
44027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44028   # take no chances and rewrite it.
44029   # Note: m4 eats our [], so we need to use [ and ] instead.
44030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44031   if test "x$has_forbidden_chars" != x; then
44032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44033     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44034   fi
44035 
44036     # Output is in $new_path
44037 
44038   windows_path="$new_path"
44039   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44040     unix_path=`$CYGPATH -u "$windows_path"`
44041     new_path="$unix_path"
44042   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44043     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44044     new_path="$unix_path"
44045   fi
44046 
44047     # remove trailing .exe if any
44048     new_path="${new_path/%.exe/}"
44049 
44050     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44051     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44052   fi
44053 
44054     else
44055       # We're on a unix platform. Hooray! :)
44056       # First separate the path from the arguments. This will split at the first
44057       # space.
44058       complete="$OBJCOPY"
44059       path="${complete%% *}"
44060       tmp="$complete EOL"
44061       arguments="${tmp#* }"
44062 
44063       # Cannot rely on the command "which" here since it doesn't always work.
44064       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44065       if test -z "$is_absolute_path"; then
44066         # Path to executable is not absolute. Find it.
44067         IFS_save="$IFS"
44068         IFS=:
44069         for p in $PATH; do
44070           if test -f "$p/$path" && test -x "$p/$path"; then
44071             new_path="$p/$path"
44072             break
44073           fi
44074         done
44075         IFS="$IFS_save"
44076       else
44077         # This is an absolute path, we can use it without further modifications.
44078         new_path="$path"
44079       fi
44080 
44081       if test "x$new_path" = x; then
44082         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
44083 $as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
44084         has_space=`$ECHO "$complete" | $GREP " "`
44085         if test "x$has_space" != x; then
44086           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44087 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44088         fi
44089         as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
44090       fi
44091     fi
44092 
44093     # Now join together the path and the arguments once again
44094     if test "x$arguments" != xEOL; then
44095       new_complete="$new_path ${arguments% *}"
44096     else
44097       new_complete="$new_path"
44098     fi
44099 
44100     if test "x$complete" != "x$new_complete"; then
44101       OBJCOPY="$new_complete"
44102       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
44103 $as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
44104     fi
44105   fi
44106 
44107       if test "x$OPENJDK_BUILD_OS" = xsolaris; then
44108         # objcopy prior to 2.21.1 on solaris is broken and is not usable.
44109         # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
44110         # - version number is last blank separate word on first line
44111         # - version number formats that have been seen:
44112         #   - <major>.<minor>
44113         #   - <major>.<minor>.<micro>
44114         OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
44115         # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
44116          OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
44117               -e 's/.* //' \
44118               -e '/^[01]\./b bad' \
44119               -e '/^2\./{' \
44120               -e '  s/^2\.//' \
44121               -e '  /^[0-9]$/b bad' \
44122               -e '  /^[0-9]\./b bad' \
44123               -e '  /^1[0-9]$/b bad' \
44124               -e '  /^1[0-9]\./b bad' \
44125               -e '  /^20\./b bad' \
44126               -e '  /^21\.0$/b bad' \
44127               -e '  /^21\.0\./b bad' \
44128               -e '}' \
44129               -e ':good' \
44130               -e 's/.*/VALID_VERSION/p' \
44131               -e 'q' \
44132               -e ':bad' \
44133               -e 's/.*/BAD_VERSION/p' \
44134               -e 'q'`
44135         if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
44136           OBJCOPY=
44137           { $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
44138 $as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
44139           { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
44140 $as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
44141           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
44142 $as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
44143           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
44144 $as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
44145           { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
44146 $as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
44147         fi
44148       fi
44149     fi
44150   fi
44151 
44152 
44153 
44154   # Publish this variable in the help.
44155 
44156 
44157   if [ -z "${OBJDUMP+x}" ]; then
44158     # The variable is not set by user, try to locate tool using the code snippet
44159     if test -n "$ac_tool_prefix"; then
44160   for ac_prog in gobjdump objdump
44161   do
44162     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44163 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44165 $as_echo_n "checking for $ac_word... " >&6; }
44166 if ${ac_cv_prog_OBJDUMP+:} false; then :
44167   $as_echo_n "(cached) " >&6
44168 else
44169   if test -n "$OBJDUMP"; then
44170   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44171 else
44172 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44173 for as_dir in $PATH
44174 do
44175   IFS=$as_save_IFS
44176   test -z "$as_dir" && as_dir=.
44177     for ac_exec_ext in '' $ac_executable_extensions; do
44178   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44179     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44180     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44181     break 2
44182   fi
44183 done
44184   done
44185 IFS=$as_save_IFS
44186 
44187 fi
44188 fi
44189 OBJDUMP=$ac_cv_prog_OBJDUMP
44190 if test -n "$OBJDUMP"; then
44191   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44192 $as_echo "$OBJDUMP" >&6; }
44193 else
44194   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44195 $as_echo "no" >&6; }
44196 fi
44197 
44198 
44199     test -n "$OBJDUMP" && break
44200   done
44201 fi
44202 if test -z "$OBJDUMP"; then
44203   ac_ct_OBJDUMP=$OBJDUMP
44204   for ac_prog in gobjdump objdump
44205 do
44206   # Extract the first word of "$ac_prog", so it can be a program name with args.
44207 set dummy $ac_prog; ac_word=$2
44208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44209 $as_echo_n "checking for $ac_word... " >&6; }
44210 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44211   $as_echo_n "(cached) " >&6
44212 else
44213   if test -n "$ac_ct_OBJDUMP"; then
44214   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44215 else
44216 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44217 for as_dir in $PATH
44218 do
44219   IFS=$as_save_IFS
44220   test -z "$as_dir" && as_dir=.
44221     for ac_exec_ext in '' $ac_executable_extensions; do
44222   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44223     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44224     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44225     break 2
44226   fi
44227 done
44228   done
44229 IFS=$as_save_IFS
44230 
44231 fi
44232 fi
44233 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44234 if test -n "$ac_ct_OBJDUMP"; then
44235   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44236 $as_echo "$ac_ct_OBJDUMP" >&6; }
44237 else
44238   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44239 $as_echo "no" >&6; }
44240 fi
44241 
44242 
44243   test -n "$ac_ct_OBJDUMP" && break
44244 done
44245 
44246   if test "x$ac_ct_OBJDUMP" = x; then
44247     OBJDUMP=""
44248   else
44249     case $cross_compiling:$ac_tool_warned in
44250 yes:)
44251 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44252 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44253 ac_tool_warned=yes ;;
44254 esac
44255     OBJDUMP=$ac_ct_OBJDUMP
44256   fi
44257 fi
44258 
44259   else
44260     # The variable is set, but is it from the command line or the environment?
44261 
44262     # Try to remove the string !OBJDUMP! from our list.
44263     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
44264     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44265       # If it failed, the variable was not from the command line. Ignore it,
44266       # but warn the user (except for BASH, which is always set by the calling BASH).
44267       if test "xOBJDUMP" != xBASH; then
44268         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
44269 $as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
44270       fi
44271       # Try to locate tool using the code snippet
44272       if test -n "$ac_tool_prefix"; then
44273   for ac_prog in gobjdump objdump
44274   do
44275     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
44276 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
44277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44278 $as_echo_n "checking for $ac_word... " >&6; }
44279 if ${ac_cv_prog_OBJDUMP+:} false; then :
44280   $as_echo_n "(cached) " >&6
44281 else
44282   if test -n "$OBJDUMP"; then
44283   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
44284 else
44285 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44286 for as_dir in $PATH
44287 do
44288   IFS=$as_save_IFS
44289   test -z "$as_dir" && as_dir=.
44290     for ac_exec_ext in '' $ac_executable_extensions; do
44291   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44292     ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
44293     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44294     break 2
44295   fi
44296 done
44297   done
44298 IFS=$as_save_IFS
44299 
44300 fi
44301 fi
44302 OBJDUMP=$ac_cv_prog_OBJDUMP
44303 if test -n "$OBJDUMP"; then
44304   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44305 $as_echo "$OBJDUMP" >&6; }
44306 else
44307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44308 $as_echo "no" >&6; }
44309 fi
44310 
44311 
44312     test -n "$OBJDUMP" && break
44313   done
44314 fi
44315 if test -z "$OBJDUMP"; then
44316   ac_ct_OBJDUMP=$OBJDUMP
44317   for ac_prog in gobjdump objdump
44318 do
44319   # Extract the first word of "$ac_prog", so it can be a program name with args.
44320 set dummy $ac_prog; ac_word=$2
44321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44322 $as_echo_n "checking for $ac_word... " >&6; }
44323 if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
44324   $as_echo_n "(cached) " >&6
44325 else
44326   if test -n "$ac_ct_OBJDUMP"; then
44327   ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
44328 else
44329 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44330 for as_dir in $PATH
44331 do
44332   IFS=$as_save_IFS
44333   test -z "$as_dir" && as_dir=.
44334     for ac_exec_ext in '' $ac_executable_extensions; do
44335   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44336     ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
44337     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44338     break 2
44339   fi
44340 done
44341   done
44342 IFS=$as_save_IFS
44343 
44344 fi
44345 fi
44346 ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
44347 if test -n "$ac_ct_OBJDUMP"; then
44348   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
44349 $as_echo "$ac_ct_OBJDUMP" >&6; }
44350 else
44351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44352 $as_echo "no" >&6; }
44353 fi
44354 
44355 
44356   test -n "$ac_ct_OBJDUMP" && break
44357 done
44358 
44359   if test "x$ac_ct_OBJDUMP" = x; then
44360     OBJDUMP=""
44361   else
44362     case $cross_compiling:$ac_tool_warned in
44363 yes:)
44364 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
44365 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
44366 ac_tool_warned=yes ;;
44367 esac
44368     OBJDUMP=$ac_ct_OBJDUMP
44369   fi
44370 fi
44371 
44372     else
44373       # If it succeeded, then it was overridden by the user. We will use it
44374       # for the tool.
44375 
44376       # First remove it from the list of overridden variables, so we can test
44377       # for unknown variables in the end.
44378       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44379 
44380       # Check if we try to supply an empty value
44381       if test "x$OBJDUMP" = x; then
44382         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
44383 $as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
44384         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44385 $as_echo_n "checking for OBJDUMP... " >&6; }
44386         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44387 $as_echo "disabled" >&6; }
44388       else
44389         # Check if the provided tool contains a complete path.
44390         tool_specified="$OBJDUMP"
44391         tool_basename="${tool_specified##*/}"
44392         if test "x$tool_basename" = "x$tool_specified"; then
44393           # A command without a complete path is provided, search $PATH.
44394           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
44395 $as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
44396           # Extract the first word of "$tool_basename", so it can be a program name with args.
44397 set dummy $tool_basename; ac_word=$2
44398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44399 $as_echo_n "checking for $ac_word... " >&6; }
44400 if ${ac_cv_path_OBJDUMP+:} false; then :
44401   $as_echo_n "(cached) " >&6
44402 else
44403   case $OBJDUMP in
44404   [\\/]* | ?:[\\/]*)
44405   ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
44406   ;;
44407   *)
44408   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44409 for as_dir in $PATH
44410 do
44411   IFS=$as_save_IFS
44412   test -z "$as_dir" && as_dir=.
44413     for ac_exec_ext in '' $ac_executable_extensions; do
44414   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44415     ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
44416     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44417     break 2
44418   fi
44419 done
44420   done
44421 IFS=$as_save_IFS
44422 
44423   ;;
44424 esac
44425 fi
44426 OBJDUMP=$ac_cv_path_OBJDUMP
44427 if test -n "$OBJDUMP"; then
44428   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
44429 $as_echo "$OBJDUMP" >&6; }
44430 else
44431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44432 $as_echo "no" >&6; }
44433 fi
44434 
44435 
44436           if test "x$OBJDUMP" = x; then
44437             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44438           fi
44439         else
44440           # Otherwise we believe it is a complete path. Use it as it is.
44441           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
44442 $as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
44443           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
44444 $as_echo_n "checking for OBJDUMP... " >&6; }
44445           if test ! -x "$tool_specified"; then
44446             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44447 $as_echo "not found" >&6; }
44448             as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
44449           fi
44450           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44451 $as_echo "$tool_specified" >&6; }
44452         fi
44453       fi
44454     fi
44455 
44456   fi
44457 
44458 
44459   if test "x$OBJDUMP" != x; then
44460     # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
44461     # bails if argument is missing.
44462 
44463   # Only process if variable expands to non-empty
44464 
44465   if test "x$OBJDUMP" != x; then
44466     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44467 
44468   # First separate the path from the arguments. This will split at the first
44469   # space.
44470   complete="$OBJDUMP"
44471   path="${complete%% *}"
44472   tmp="$complete EOL"
44473   arguments="${tmp#* }"
44474 
44475   # Input might be given as Windows format, start by converting to
44476   # unix format.
44477   new_path=`$CYGPATH -u "$path"`
44478 
44479   # Now try to locate executable using which
44480   new_path=`$WHICH "$new_path" 2> /dev/null`
44481   # bat and cmd files are not always considered executable in cygwin causing which
44482   # to not find them
44483   if test "x$new_path" = x \
44484       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44485       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44486     new_path=`$CYGPATH -u "$path"`
44487   fi
44488   if test "x$new_path" = x; then
44489     # Oops. Which didn't find the executable.
44490     # The splitting of arguments from the executable at a space might have been incorrect,
44491     # since paths with space are more likely in Windows. Give it another try with the whole
44492     # argument.
44493     path="$complete"
44494     arguments="EOL"
44495     new_path=`$CYGPATH -u "$path"`
44496     new_path=`$WHICH "$new_path" 2> /dev/null`
44497     # bat and cmd files are not always considered executable in cygwin causing which
44498     # to not find them
44499     if test "x$new_path" = x \
44500         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44501         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44502       new_path=`$CYGPATH -u "$path"`
44503     fi
44504     if test "x$new_path" = x; then
44505       # It's still not found. Now this is an unrecoverable error.
44506       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44507 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44508       has_space=`$ECHO "$complete" | $GREP " "`
44509       if test "x$has_space" != x; then
44510         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44511 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44512       fi
44513       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44514     fi
44515   fi
44516 
44517   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44518   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44519   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44520   # "foo.exe" is OK but "foo" is an error.
44521   #
44522   # This test is therefore slightly more accurate than "test -f" to check for file presence.
44523   # It is also a way to make sure we got the proper file name for the real test later on.
44524   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44525   if test "x$test_shortpath" = x; then
44526     # Short path failed, file does not exist as specified.
44527     # Try adding .exe or .cmd
44528     if test -f "${new_path}.exe"; then
44529       input_to_shortpath="${new_path}.exe"
44530     elif test -f "${new_path}.cmd"; then
44531       input_to_shortpath="${new_path}.cmd"
44532     else
44533       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
44534 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
44535       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44536 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44537       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44538     fi
44539   else
44540     input_to_shortpath="$new_path"
44541   fi
44542 
44543   # Call helper function which possibly converts this using DOS-style short mode.
44544   # If so, the updated path is stored in $new_path.
44545   new_path="$input_to_shortpath"
44546 
44547   input_path="$input_to_shortpath"
44548   # Check if we need to convert this using DOS-style short mode. If the path
44549   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44550   # take no chances and rewrite it.
44551   # Note: m4 eats our [], so we need to use [ and ] instead.
44552   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44553   if test "x$has_forbidden_chars" != x; then
44554     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44555     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44556     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44557     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44558       # Going to short mode and back again did indeed matter. Since short mode is
44559       # case insensitive, let's make it lowercase to improve readability.
44560       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44561       # Now convert it back to Unix-style (cygpath)
44562       input_path=`$CYGPATH -u "$shortmode_path"`
44563       new_path="$input_path"
44564     fi
44565   fi
44566 
44567   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44568   if test "x$test_cygdrive_prefix" = x; then
44569     # As a simple fix, exclude /usr/bin since it's not a real path.
44570     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44571       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44572       # a path prefixed by /cygdrive for fixpath to work.
44573       new_path="$CYGWIN_ROOT_PATH$input_path"
44574     fi
44575   fi
44576 
44577   # remove trailing .exe if any
44578   new_path="${new_path/%.exe/}"
44579 
44580     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44581 
44582   # First separate the path from the arguments. This will split at the first
44583   # space.
44584   complete="$OBJDUMP"
44585   path="${complete%% *}"
44586   tmp="$complete EOL"
44587   arguments="${tmp#* }"
44588 
44589   # Input might be given as Windows format, start by converting to
44590   # unix format.
44591   new_path="$path"
44592 
44593   windows_path="$new_path"
44594   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44595     unix_path=`$CYGPATH -u "$windows_path"`
44596     new_path="$unix_path"
44597   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44598     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44599     new_path="$unix_path"
44600   fi
44601 
44602 
44603   # Now try to locate executable using which
44604   new_path=`$WHICH "$new_path" 2> /dev/null`
44605 
44606   if test "x$new_path" = x; then
44607     # Oops. Which didn't find the executable.
44608     # The splitting of arguments from the executable at a space might have been incorrect,
44609     # since paths with space are more likely in Windows. Give it another try with the whole
44610     # argument.
44611     path="$complete"
44612     arguments="EOL"
44613     new_path="$path"
44614 
44615   windows_path="$new_path"
44616   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44617     unix_path=`$CYGPATH -u "$windows_path"`
44618     new_path="$unix_path"
44619   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44620     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44621     new_path="$unix_path"
44622   fi
44623 
44624 
44625     new_path=`$WHICH "$new_path" 2> /dev/null`
44626     # bat and cmd files are not always considered executable in MSYS causing which
44627     # to not find them
44628     if test "x$new_path" = x \
44629         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44630         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44631       new_path="$path"
44632 
44633   windows_path="$new_path"
44634   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44635     unix_path=`$CYGPATH -u "$windows_path"`
44636     new_path="$unix_path"
44637   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44638     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44639     new_path="$unix_path"
44640   fi
44641 
44642     fi
44643 
44644     if test "x$new_path" = x; then
44645       # It's still not found. Now this is an unrecoverable error.
44646       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44647 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44648       has_space=`$ECHO "$complete" | $GREP " "`
44649       if test "x$has_space" != x; then
44650         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44651 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44652       fi
44653       as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44654     fi
44655   fi
44656 
44657   # Now new_path has a complete unix path to the binary
44658   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44659     # Keep paths in /bin as-is, but remove trailing .exe if any
44660     new_path="${new_path/%.exe/}"
44661     # Do not save /bin paths to all_fixpath_prefixes!
44662   else
44663     # Not in mixed or Windows style, start by that.
44664     new_path=`cmd //c echo $new_path`
44665 
44666   input_path="$new_path"
44667   # Check if we need to convert this using DOS-style short mode. If the path
44668   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44669   # take no chances and rewrite it.
44670   # Note: m4 eats our [], so we need to use [ and ] instead.
44671   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44672   if test "x$has_forbidden_chars" != x; then
44673     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44674     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44675   fi
44676 
44677     # Output is in $new_path
44678 
44679   windows_path="$new_path"
44680   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44681     unix_path=`$CYGPATH -u "$windows_path"`
44682     new_path="$unix_path"
44683   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44684     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44685     new_path="$unix_path"
44686   fi
44687 
44688     # remove trailing .exe if any
44689     new_path="${new_path/%.exe/}"
44690 
44691     # Save the first 10 bytes of this path to the storage, so fixpath can work.
44692     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44693   fi
44694 
44695     else
44696       # We're on a unix platform. Hooray! :)
44697       # First separate the path from the arguments. This will split at the first
44698       # space.
44699       complete="$OBJDUMP"
44700       path="${complete%% *}"
44701       tmp="$complete EOL"
44702       arguments="${tmp#* }"
44703 
44704       # Cannot rely on the command "which" here since it doesn't always work.
44705       is_absolute_path=`$ECHO "$path" | $GREP ^/`
44706       if test -z "$is_absolute_path"; then
44707         # Path to executable is not absolute. Find it.
44708         IFS_save="$IFS"
44709         IFS=:
44710         for p in $PATH; do
44711           if test -f "$p/$path" && test -x "$p/$path"; then
44712             new_path="$p/$path"
44713             break
44714           fi
44715         done
44716         IFS="$IFS_save"
44717       else
44718         # This is an absolute path, we can use it without further modifications.
44719         new_path="$path"
44720       fi
44721 
44722       if test "x$new_path" = x; then
44723         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44724 $as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44725         has_space=`$ECHO "$complete" | $GREP " "`
44726         if test "x$has_space" != x; then
44727           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44728 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44729         fi
44730         as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44731       fi
44732     fi
44733 
44734     # Now join together the path and the arguments once again
44735     if test "x$arguments" != xEOL; then
44736       new_complete="$new_path ${arguments% *}"
44737     else
44738       new_complete="$new_path"
44739     fi
44740 
44741     if test "x$complete" != "x$new_complete"; then
44742       OBJDUMP="$new_complete"
44743       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44744 $as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44745     fi
44746   fi
44747 
44748   fi
44749 
44750 
44751   # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44752   # to remain in place. Otherwise the compiler will not work in some siutations
44753   # in later configure checks.
44754   if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44755     PATH="$OLD_PATH"
44756   fi
44757 
44758   # Restore the flags to the user specified values.
44759   # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44760   CFLAGS="$ORG_CFLAGS"
44761   CXXFLAGS="$ORG_CXXFLAGS"
44762 
44763 
44764 # Finally do some processing after the detection phase
44765 
44766   if test "x$COMPILE_TYPE" = "xcross"; then
44767     # Now we need to find a C/C++ compiler that can build executables for the
44768     # build platform. We can't use the AC_PROG_CC macro, since it can only be
44769     # used once. Also, we need to do this without adding a tools dir to the
44770     # path, otherwise we might pick up cross-compilers which don't use standard
44771     # naming.
44772 
44773     OLDPATH="$PATH"
44774 
44775 
44776 # Check whether --with-build-devkit was given.
44777 if test "${with_build_devkit+set}" = set; then :
44778   withval=$with_build_devkit;
44779 fi
44780 
44781     if test "x$with_build_devkit" = "xyes"; then
44782       as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44783     elif test -n "$with_build_devkit"; then
44784       if test ! -d "$with_build_devkit"; then
44785         as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44786       else
44787 
44788   # Only process if variable expands to non-empty
44789 
44790   if test "x$with_build_devkit" != x; then
44791     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44792 
44793   # Input might be given as Windows format, start by converting to
44794   # unix format.
44795   path="$with_build_devkit"
44796   new_path=`$CYGPATH -u "$path"`
44797 
44798   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44799   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44800   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44801   # "foo.exe" is OK but "foo" is an error.
44802   #
44803   # This test is therefore slightly more accurate than "test -f" to check for file precense.
44804   # It is also a way to make sure we got the proper file name for the real test later on.
44805   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44806   if test "x$test_shortpath" = x; then
44807     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44808 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44809     as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44810   fi
44811 
44812   # Call helper function which possibly converts this using DOS-style short mode.
44813   # If so, the updated path is stored in $new_path.
44814 
44815   input_path="$new_path"
44816   # Check if we need to convert this using DOS-style short mode. If the path
44817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44818   # take no chances and rewrite it.
44819   # Note: m4 eats our [], so we need to use [ and ] instead.
44820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44821   if test "x$has_forbidden_chars" != x; then
44822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44826       # Going to short mode and back again did indeed matter. Since short mode is
44827       # case insensitive, let's make it lowercase to improve readability.
44828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44829       # Now convert it back to Unix-style (cygpath)
44830       input_path=`$CYGPATH -u "$shortmode_path"`
44831       new_path="$input_path"
44832     fi
44833   fi
44834 
44835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44836   if test "x$test_cygdrive_prefix" = x; then
44837     # As a simple fix, exclude /usr/bin since it's not a real path.
44838     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44840       # a path prefixed by /cygdrive for fixpath to work.
44841       new_path="$CYGWIN_ROOT_PATH$input_path"
44842     fi
44843   fi
44844 
44845 
44846   if test "x$path" != "x$new_path"; then
44847     with_build_devkit="$new_path"
44848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44849 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44850   fi
44851 
44852     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44853 
44854   path="$with_build_devkit"
44855   has_colon=`$ECHO $path | $GREP ^.:`
44856   new_path="$path"
44857   if test "x$has_colon" = x; then
44858     # Not in mixed or Windows style, start by that.
44859     new_path=`cmd //c echo $path`
44860   fi
44861 
44862 
44863   input_path="$new_path"
44864   # Check if we need to convert this using DOS-style short mode. If the path
44865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
44866   # take no chances and rewrite it.
44867   # Note: m4 eats our [], so we need to use [ and ] instead.
44868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44869   if test "x$has_forbidden_chars" != x; then
44870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44871     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44872   fi
44873 
44874 
44875   windows_path="$new_path"
44876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44877     unix_path=`$CYGPATH -u "$windows_path"`
44878     new_path="$unix_path"
44879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44881     new_path="$unix_path"
44882   fi
44883 
44884   if test "x$path" != "x$new_path"; then
44885     with_build_devkit="$new_path"
44886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44887 $as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44888   fi
44889 
44890   # Save the first 10 bytes of this path to the storage, so fixpath can work.
44891   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44892 
44893     else
44894       # We're on a unix platform. Hooray! :)
44895       path="$with_build_devkit"
44896       has_space=`$ECHO "$path" | $GREP " "`
44897       if test "x$has_space" != x; then
44898         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44899 $as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44900         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44901       fi
44902 
44903       # Use eval to expand a potential ~
44904       eval path="$path"
44905       if test ! -f "$path" && test ! -d "$path"; then
44906         as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44907       fi
44908 
44909       if test -d "$path"; then
44910         with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44911       else
44912         dir="`$DIRNAME "$path"`"
44913         base="`$BASENAME "$path"`"
44914         with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44915       fi
44916     fi
44917   fi
44918 
44919         BUILD_DEVKIT_ROOT="$with_build_devkit"
44920         # Check for a meta data info file in the root of the devkit
44921         if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44922           # Process devkit.info so that existing devkit variables are not
44923           # modified by this
44924           $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44925               -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44926               -e "s/\$host/\$build/g" \
44927               $BUILD_DEVKIT_ROOT/devkit.info \
44928               > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44929           . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44930           # This potentially sets the following:
44931           # A descriptive name of the devkit
44932 
44933   if test "x$BUILD_DEVKIT_NAME" = x; then
44934     eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44935   fi
44936 
44937           # Corresponds to --with-extra-path
44938 
44939   if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44940     eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44941   fi
44942 
44943           # Corresponds to --with-toolchain-path
44944 
44945   if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44946     eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44947   fi
44948 
44949           # Corresponds to --with-sysroot
44950 
44951   if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44952     eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44953   fi
44954 
44955           # Skip the Window specific parts
44956         fi
44957 
44958         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44959 $as_echo_n "checking for build platform devkit... " >&6; }
44960         if test "x$BUILD_DEVKIT_NAME" != x; then
44961           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44962 $as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44963         else
44964           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44965 $as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44966         fi
44967 
44968         BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44969 
44970   if test "x$BUILD_SYSROOT" != "x"; then
44971     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44972       if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44973         # Solaris Studio does not have a concept of sysroot. Instead we must
44974         # make sure the default include and lib dirs are appended to each
44975         # compile and link command line. Must also add -I-xbuiltin to enable
44976         # inlining of system functions and intrinsics.
44977         BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44978         BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44979             -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44980       fi
44981     elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44982       BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44983       BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44984     elif test "x$TOOLCHAIN_TYPE" = xclang; then
44985       BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44986       BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44987     fi
44988     # The global CFLAGS and LDFLAGS variables need these for configure to function
44989     BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44990     BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44991     BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44992     BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44993   fi
44994 
44995   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44996     # We also need -iframework<path>/System/Library/Frameworks
44997     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44998     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44999     # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
45000     # set this here so it doesn't have to be peppered throughout the forest
45001     BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45002     BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
45003   fi
45004 
45005 
45006 
45007 
45008 
45009          # Fallback default of just /bin if DEVKIT_PATH is not defined
45010         if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
45011           BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
45012         fi
45013         PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
45014       fi
45015     fi
45016 
45017     # FIXME: we should list the discovered compilers as an exclude pattern!
45018     # If we do that, we can do this detection before POST_DETECTION, and still
45019     # find the build compilers in the tools dir, if needed.
45020 
45021 
45022 
45023   # Publish this variable in the help.
45024 
45025 
45026   if [ -z "${BUILD_CC+x}" ]; then
45027     # The variable is not set by user, try to locate tool using the code snippet
45028     for ac_prog in cl cc gcc
45029 do
45030   # Extract the first word of "$ac_prog", so it can be a program name with args.
45031 set dummy $ac_prog; ac_word=$2
45032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45033 $as_echo_n "checking for $ac_word... " >&6; }
45034 if ${ac_cv_path_BUILD_CC+:} false; then :
45035   $as_echo_n "(cached) " >&6
45036 else
45037   case $BUILD_CC in
45038   [\\/]* | ?:[\\/]*)
45039   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45040   ;;
45041   *)
45042   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45043 for as_dir in $PATH
45044 do
45045   IFS=$as_save_IFS
45046   test -z "$as_dir" && as_dir=.
45047     for ac_exec_ext in '' $ac_executable_extensions; do
45048   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45049     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45050     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45051     break 2
45052   fi
45053 done
45054   done
45055 IFS=$as_save_IFS
45056 
45057   ;;
45058 esac
45059 fi
45060 BUILD_CC=$ac_cv_path_BUILD_CC
45061 if test -n "$BUILD_CC"; then
45062   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45063 $as_echo "$BUILD_CC" >&6; }
45064 else
45065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45066 $as_echo "no" >&6; }
45067 fi
45068 
45069 
45070   test -n "$BUILD_CC" && break
45071 done
45072 
45073   else
45074     # The variable is set, but is it from the command line or the environment?
45075 
45076     # Try to remove the string !BUILD_CC! from our list.
45077     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
45078     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45079       # If it failed, the variable was not from the command line. Ignore it,
45080       # but warn the user (except for BASH, which is always set by the calling BASH).
45081       if test "xBUILD_CC" != xBASH; then
45082         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
45083 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
45084       fi
45085       # Try to locate tool using the code snippet
45086       for ac_prog in cl cc gcc
45087 do
45088   # Extract the first word of "$ac_prog", so it can be a program name with args.
45089 set dummy $ac_prog; ac_word=$2
45090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45091 $as_echo_n "checking for $ac_word... " >&6; }
45092 if ${ac_cv_path_BUILD_CC+:} false; then :
45093   $as_echo_n "(cached) " >&6
45094 else
45095   case $BUILD_CC in
45096   [\\/]* | ?:[\\/]*)
45097   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45098   ;;
45099   *)
45100   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45101 for as_dir in $PATH
45102 do
45103   IFS=$as_save_IFS
45104   test -z "$as_dir" && as_dir=.
45105     for ac_exec_ext in '' $ac_executable_extensions; do
45106   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45107     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45108     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45109     break 2
45110   fi
45111 done
45112   done
45113 IFS=$as_save_IFS
45114 
45115   ;;
45116 esac
45117 fi
45118 BUILD_CC=$ac_cv_path_BUILD_CC
45119 if test -n "$BUILD_CC"; then
45120   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45121 $as_echo "$BUILD_CC" >&6; }
45122 else
45123   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45124 $as_echo "no" >&6; }
45125 fi
45126 
45127 
45128   test -n "$BUILD_CC" && break
45129 done
45130 
45131     else
45132       # If it succeeded, then it was overridden by the user. We will use it
45133       # for the tool.
45134 
45135       # First remove it from the list of overridden variables, so we can test
45136       # for unknown variables in the end.
45137       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45138 
45139       # Check if we try to supply an empty value
45140       if test "x$BUILD_CC" = x; then
45141         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
45142 $as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
45143         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45144 $as_echo_n "checking for BUILD_CC... " >&6; }
45145         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45146 $as_echo "disabled" >&6; }
45147       else
45148         # Check if the provided tool contains a complete path.
45149         tool_specified="$BUILD_CC"
45150         tool_basename="${tool_specified##*/}"
45151         if test "x$tool_basename" = "x$tool_specified"; then
45152           # A command without a complete path is provided, search $PATH.
45153           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
45154 $as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
45155           # Extract the first word of "$tool_basename", so it can be a program name with args.
45156 set dummy $tool_basename; ac_word=$2
45157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45158 $as_echo_n "checking for $ac_word... " >&6; }
45159 if ${ac_cv_path_BUILD_CC+:} false; then :
45160   $as_echo_n "(cached) " >&6
45161 else
45162   case $BUILD_CC in
45163   [\\/]* | ?:[\\/]*)
45164   ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
45165   ;;
45166   *)
45167   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45168 for as_dir in $PATH
45169 do
45170   IFS=$as_save_IFS
45171   test -z "$as_dir" && as_dir=.
45172     for ac_exec_ext in '' $ac_executable_extensions; do
45173   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45174     ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
45175     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45176     break 2
45177   fi
45178 done
45179   done
45180 IFS=$as_save_IFS
45181 
45182   ;;
45183 esac
45184 fi
45185 BUILD_CC=$ac_cv_path_BUILD_CC
45186 if test -n "$BUILD_CC"; then
45187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
45188 $as_echo "$BUILD_CC" >&6; }
45189 else
45190   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45191 $as_echo "no" >&6; }
45192 fi
45193 
45194 
45195           if test "x$BUILD_CC" = x; then
45196             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45197           fi
45198         else
45199           # Otherwise we believe it is a complete path. Use it as it is.
45200           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
45201 $as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
45202           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
45203 $as_echo_n "checking for BUILD_CC... " >&6; }
45204           if test ! -x "$tool_specified"; then
45205             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45206 $as_echo "not found" >&6; }
45207             as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
45208           fi
45209           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45210 $as_echo "$tool_specified" >&6; }
45211         fi
45212       fi
45213     fi
45214 
45215   fi
45216 
45217 
45218 
45219   if test "x$BUILD_CC" = x; then
45220     as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
45221   fi
45222 
45223 
45224 
45225   # Only process if variable expands to non-empty
45226 
45227   if test "x$BUILD_CC" != x; then
45228     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45229 
45230   # First separate the path from the arguments. This will split at the first
45231   # space.
45232   complete="$BUILD_CC"
45233   path="${complete%% *}"
45234   tmp="$complete EOL"
45235   arguments="${tmp#* }"
45236 
45237   # Input might be given as Windows format, start by converting to
45238   # unix format.
45239   new_path=`$CYGPATH -u "$path"`
45240 
45241   # Now try to locate executable using which
45242   new_path=`$WHICH "$new_path" 2> /dev/null`
45243   # bat and cmd files are not always considered executable in cygwin causing which
45244   # to not find them
45245   if test "x$new_path" = x \
45246       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45247       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45248     new_path=`$CYGPATH -u "$path"`
45249   fi
45250   if test "x$new_path" = x; then
45251     # Oops. Which didn't find the executable.
45252     # The splitting of arguments from the executable at a space might have been incorrect,
45253     # since paths with space are more likely in Windows. Give it another try with the whole
45254     # argument.
45255     path="$complete"
45256     arguments="EOL"
45257     new_path=`$CYGPATH -u "$path"`
45258     new_path=`$WHICH "$new_path" 2> /dev/null`
45259     # bat and cmd files are not always considered executable in cygwin causing which
45260     # to not find them
45261     if test "x$new_path" = x \
45262         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45263         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45264       new_path=`$CYGPATH -u "$path"`
45265     fi
45266     if test "x$new_path" = x; then
45267       # It's still not found. Now this is an unrecoverable error.
45268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45269 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45270       has_space=`$ECHO "$complete" | $GREP " "`
45271       if test "x$has_space" != x; then
45272         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45273 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45274       fi
45275       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45276     fi
45277   fi
45278 
45279   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45280   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45281   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45282   # "foo.exe" is OK but "foo" is an error.
45283   #
45284   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45285   # It is also a way to make sure we got the proper file name for the real test later on.
45286   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45287   if test "x$test_shortpath" = x; then
45288     # Short path failed, file does not exist as specified.
45289     # Try adding .exe or .cmd
45290     if test -f "${new_path}.exe"; then
45291       input_to_shortpath="${new_path}.exe"
45292     elif test -f "${new_path}.cmd"; then
45293       input_to_shortpath="${new_path}.cmd"
45294     else
45295       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
45296 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
45297       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45298 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45299       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45300     fi
45301   else
45302     input_to_shortpath="$new_path"
45303   fi
45304 
45305   # Call helper function which possibly converts this using DOS-style short mode.
45306   # If so, the updated path is stored in $new_path.
45307   new_path="$input_to_shortpath"
45308 
45309   input_path="$input_to_shortpath"
45310   # Check if we need to convert this using DOS-style short mode. If the path
45311   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45312   # take no chances and rewrite it.
45313   # Note: m4 eats our [], so we need to use [ and ] instead.
45314   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45315   if test "x$has_forbidden_chars" != x; then
45316     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45317     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45318     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45319     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45320       # Going to short mode and back again did indeed matter. Since short mode is
45321       # case insensitive, let's make it lowercase to improve readability.
45322       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45323       # Now convert it back to Unix-style (cygpath)
45324       input_path=`$CYGPATH -u "$shortmode_path"`
45325       new_path="$input_path"
45326     fi
45327   fi
45328 
45329   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45330   if test "x$test_cygdrive_prefix" = x; then
45331     # As a simple fix, exclude /usr/bin since it's not a real path.
45332     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45333       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45334       # a path prefixed by /cygdrive for fixpath to work.
45335       new_path="$CYGWIN_ROOT_PATH$input_path"
45336     fi
45337   fi
45338 
45339   # remove trailing .exe if any
45340   new_path="${new_path/%.exe/}"
45341 
45342     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45343 
45344   # First separate the path from the arguments. This will split at the first
45345   # space.
45346   complete="$BUILD_CC"
45347   path="${complete%% *}"
45348   tmp="$complete EOL"
45349   arguments="${tmp#* }"
45350 
45351   # Input might be given as Windows format, start by converting to
45352   # unix format.
45353   new_path="$path"
45354 
45355   windows_path="$new_path"
45356   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45357     unix_path=`$CYGPATH -u "$windows_path"`
45358     new_path="$unix_path"
45359   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45360     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45361     new_path="$unix_path"
45362   fi
45363 
45364 
45365   # Now try to locate executable using which
45366   new_path=`$WHICH "$new_path" 2> /dev/null`
45367 
45368   if test "x$new_path" = x; then
45369     # Oops. Which didn't find the executable.
45370     # The splitting of arguments from the executable at a space might have been incorrect,
45371     # since paths with space are more likely in Windows. Give it another try with the whole
45372     # argument.
45373     path="$complete"
45374     arguments="EOL"
45375     new_path="$path"
45376 
45377   windows_path="$new_path"
45378   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45379     unix_path=`$CYGPATH -u "$windows_path"`
45380     new_path="$unix_path"
45381   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45382     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45383     new_path="$unix_path"
45384   fi
45385 
45386 
45387     new_path=`$WHICH "$new_path" 2> /dev/null`
45388     # bat and cmd files are not always considered executable in MSYS causing which
45389     # to not find them
45390     if test "x$new_path" = x \
45391         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45392         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45393       new_path="$path"
45394 
45395   windows_path="$new_path"
45396   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45397     unix_path=`$CYGPATH -u "$windows_path"`
45398     new_path="$unix_path"
45399   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45400     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45401     new_path="$unix_path"
45402   fi
45403 
45404     fi
45405 
45406     if test "x$new_path" = x; then
45407       # It's still not found. Now this is an unrecoverable error.
45408       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45409 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45410       has_space=`$ECHO "$complete" | $GREP " "`
45411       if test "x$has_space" != x; then
45412         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45413 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45414       fi
45415       as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45416     fi
45417   fi
45418 
45419   # Now new_path has a complete unix path to the binary
45420   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45421     # Keep paths in /bin as-is, but remove trailing .exe if any
45422     new_path="${new_path/%.exe/}"
45423     # Do not save /bin paths to all_fixpath_prefixes!
45424   else
45425     # Not in mixed or Windows style, start by that.
45426     new_path=`cmd //c echo $new_path`
45427 
45428   input_path="$new_path"
45429   # Check if we need to convert this using DOS-style short mode. If the path
45430   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45431   # take no chances and rewrite it.
45432   # Note: m4 eats our [], so we need to use [ and ] instead.
45433   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45434   if test "x$has_forbidden_chars" != x; then
45435     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45436     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45437   fi
45438 
45439     # Output is in $new_path
45440 
45441   windows_path="$new_path"
45442   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45443     unix_path=`$CYGPATH -u "$windows_path"`
45444     new_path="$unix_path"
45445   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45446     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45447     new_path="$unix_path"
45448   fi
45449 
45450     # remove trailing .exe if any
45451     new_path="${new_path/%.exe/}"
45452 
45453     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45454     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45455   fi
45456 
45457     else
45458       # We're on a unix platform. Hooray! :)
45459       # First separate the path from the arguments. This will split at the first
45460       # space.
45461       complete="$BUILD_CC"
45462       path="${complete%% *}"
45463       tmp="$complete EOL"
45464       arguments="${tmp#* }"
45465 
45466       # Cannot rely on the command "which" here since it doesn't always work.
45467       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45468       if test -z "$is_absolute_path"; then
45469         # Path to executable is not absolute. Find it.
45470         IFS_save="$IFS"
45471         IFS=:
45472         for p in $PATH; do
45473           if test -f "$p/$path" && test -x "$p/$path"; then
45474             new_path="$p/$path"
45475             break
45476           fi
45477         done
45478         IFS="$IFS_save"
45479       else
45480         # This is an absolute path, we can use it without further modifications.
45481         new_path="$path"
45482       fi
45483 
45484       if test "x$new_path" = x; then
45485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
45486 $as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
45487         has_space=`$ECHO "$complete" | $GREP " "`
45488         if test "x$has_space" != x; then
45489           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45490 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45491         fi
45492         as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
45493       fi
45494     fi
45495 
45496     # Now join together the path and the arguments once again
45497     if test "x$arguments" != xEOL; then
45498       new_complete="$new_path ${arguments% *}"
45499     else
45500       new_complete="$new_path"
45501     fi
45502 
45503     if test "x$complete" != "x$new_complete"; then
45504       BUILD_CC="$new_complete"
45505       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
45506 $as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
45507     fi
45508   fi
45509 
45510 
45511 
45512 
45513   # Publish this variable in the help.
45514 
45515 
45516   if [ -z "${BUILD_CXX+x}" ]; then
45517     # The variable is not set by user, try to locate tool using the code snippet
45518     for ac_prog in cl CC g++
45519 do
45520   # Extract the first word of "$ac_prog", so it can be a program name with args.
45521 set dummy $ac_prog; ac_word=$2
45522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45523 $as_echo_n "checking for $ac_word... " >&6; }
45524 if ${ac_cv_path_BUILD_CXX+:} false; then :
45525   $as_echo_n "(cached) " >&6
45526 else
45527   case $BUILD_CXX in
45528   [\\/]* | ?:[\\/]*)
45529   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45530   ;;
45531   *)
45532   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45533 for as_dir in $PATH
45534 do
45535   IFS=$as_save_IFS
45536   test -z "$as_dir" && as_dir=.
45537     for ac_exec_ext in '' $ac_executable_extensions; do
45538   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45539     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45540     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45541     break 2
45542   fi
45543 done
45544   done
45545 IFS=$as_save_IFS
45546 
45547   ;;
45548 esac
45549 fi
45550 BUILD_CXX=$ac_cv_path_BUILD_CXX
45551 if test -n "$BUILD_CXX"; then
45552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45553 $as_echo "$BUILD_CXX" >&6; }
45554 else
45555   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45556 $as_echo "no" >&6; }
45557 fi
45558 
45559 
45560   test -n "$BUILD_CXX" && break
45561 done
45562 
45563   else
45564     # The variable is set, but is it from the command line or the environment?
45565 
45566     # Try to remove the string !BUILD_CXX! from our list.
45567     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45568     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45569       # If it failed, the variable was not from the command line. Ignore it,
45570       # but warn the user (except for BASH, which is always set by the calling BASH).
45571       if test "xBUILD_CXX" != xBASH; then
45572         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45573 $as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45574       fi
45575       # Try to locate tool using the code snippet
45576       for ac_prog in cl CC g++
45577 do
45578   # Extract the first word of "$ac_prog", so it can be a program name with args.
45579 set dummy $ac_prog; ac_word=$2
45580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45581 $as_echo_n "checking for $ac_word... " >&6; }
45582 if ${ac_cv_path_BUILD_CXX+:} false; then :
45583   $as_echo_n "(cached) " >&6
45584 else
45585   case $BUILD_CXX in
45586   [\\/]* | ?:[\\/]*)
45587   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45588   ;;
45589   *)
45590   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45591 for as_dir in $PATH
45592 do
45593   IFS=$as_save_IFS
45594   test -z "$as_dir" && as_dir=.
45595     for ac_exec_ext in '' $ac_executable_extensions; do
45596   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45597     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45598     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45599     break 2
45600   fi
45601 done
45602   done
45603 IFS=$as_save_IFS
45604 
45605   ;;
45606 esac
45607 fi
45608 BUILD_CXX=$ac_cv_path_BUILD_CXX
45609 if test -n "$BUILD_CXX"; then
45610   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45611 $as_echo "$BUILD_CXX" >&6; }
45612 else
45613   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45614 $as_echo "no" >&6; }
45615 fi
45616 
45617 
45618   test -n "$BUILD_CXX" && break
45619 done
45620 
45621     else
45622       # If it succeeded, then it was overridden by the user. We will use it
45623       # for the tool.
45624 
45625       # First remove it from the list of overridden variables, so we can test
45626       # for unknown variables in the end.
45627       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45628 
45629       # Check if we try to supply an empty value
45630       if test "x$BUILD_CXX" = x; then
45631         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45632 $as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45633         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45634 $as_echo_n "checking for BUILD_CXX... " >&6; }
45635         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45636 $as_echo "disabled" >&6; }
45637       else
45638         # Check if the provided tool contains a complete path.
45639         tool_specified="$BUILD_CXX"
45640         tool_basename="${tool_specified##*/}"
45641         if test "x$tool_basename" = "x$tool_specified"; then
45642           # A command without a complete path is provided, search $PATH.
45643           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45644 $as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45645           # Extract the first word of "$tool_basename", so it can be a program name with args.
45646 set dummy $tool_basename; ac_word=$2
45647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45648 $as_echo_n "checking for $ac_word... " >&6; }
45649 if ${ac_cv_path_BUILD_CXX+:} false; then :
45650   $as_echo_n "(cached) " >&6
45651 else
45652   case $BUILD_CXX in
45653   [\\/]* | ?:[\\/]*)
45654   ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45655   ;;
45656   *)
45657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45658 for as_dir in $PATH
45659 do
45660   IFS=$as_save_IFS
45661   test -z "$as_dir" && as_dir=.
45662     for ac_exec_ext in '' $ac_executable_extensions; do
45663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45664     ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45666     break 2
45667   fi
45668 done
45669   done
45670 IFS=$as_save_IFS
45671 
45672   ;;
45673 esac
45674 fi
45675 BUILD_CXX=$ac_cv_path_BUILD_CXX
45676 if test -n "$BUILD_CXX"; then
45677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45678 $as_echo "$BUILD_CXX" >&6; }
45679 else
45680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45681 $as_echo "no" >&6; }
45682 fi
45683 
45684 
45685           if test "x$BUILD_CXX" = x; then
45686             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45687           fi
45688         else
45689           # Otherwise we believe it is a complete path. Use it as it is.
45690           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45691 $as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45692           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45693 $as_echo_n "checking for BUILD_CXX... " >&6; }
45694           if test ! -x "$tool_specified"; then
45695             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45696 $as_echo "not found" >&6; }
45697             as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45698           fi
45699           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45700 $as_echo "$tool_specified" >&6; }
45701         fi
45702       fi
45703     fi
45704 
45705   fi
45706 
45707 
45708 
45709   if test "x$BUILD_CXX" = x; then
45710     as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45711   fi
45712 
45713 
45714 
45715   # Only process if variable expands to non-empty
45716 
45717   if test "x$BUILD_CXX" != x; then
45718     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45719 
45720   # First separate the path from the arguments. This will split at the first
45721   # space.
45722   complete="$BUILD_CXX"
45723   path="${complete%% *}"
45724   tmp="$complete EOL"
45725   arguments="${tmp#* }"
45726 
45727   # Input might be given as Windows format, start by converting to
45728   # unix format.
45729   new_path=`$CYGPATH -u "$path"`
45730 
45731   # Now try to locate executable using which
45732   new_path=`$WHICH "$new_path" 2> /dev/null`
45733   # bat and cmd files are not always considered executable in cygwin causing which
45734   # to not find them
45735   if test "x$new_path" = x \
45736       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45737       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45738     new_path=`$CYGPATH -u "$path"`
45739   fi
45740   if test "x$new_path" = x; then
45741     # Oops. Which didn't find the executable.
45742     # The splitting of arguments from the executable at a space might have been incorrect,
45743     # since paths with space are more likely in Windows. Give it another try with the whole
45744     # argument.
45745     path="$complete"
45746     arguments="EOL"
45747     new_path=`$CYGPATH -u "$path"`
45748     new_path=`$WHICH "$new_path" 2> /dev/null`
45749     # bat and cmd files are not always considered executable in cygwin causing which
45750     # to not find them
45751     if test "x$new_path" = x \
45752         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45753         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45754       new_path=`$CYGPATH -u "$path"`
45755     fi
45756     if test "x$new_path" = x; then
45757       # It's still not found. Now this is an unrecoverable error.
45758       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45759 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45760       has_space=`$ECHO "$complete" | $GREP " "`
45761       if test "x$has_space" != x; then
45762         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45763 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45764       fi
45765       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45766     fi
45767   fi
45768 
45769   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45770   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45771   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45772   # "foo.exe" is OK but "foo" is an error.
45773   #
45774   # This test is therefore slightly more accurate than "test -f" to check for file presence.
45775   # It is also a way to make sure we got the proper file name for the real test later on.
45776   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45777   if test "x$test_shortpath" = x; then
45778     # Short path failed, file does not exist as specified.
45779     # Try adding .exe or .cmd
45780     if test -f "${new_path}.exe"; then
45781       input_to_shortpath="${new_path}.exe"
45782     elif test -f "${new_path}.cmd"; then
45783       input_to_shortpath="${new_path}.cmd"
45784     else
45785       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45786 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45787       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45788 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45789       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45790     fi
45791   else
45792     input_to_shortpath="$new_path"
45793   fi
45794 
45795   # Call helper function which possibly converts this using DOS-style short mode.
45796   # If so, the updated path is stored in $new_path.
45797   new_path="$input_to_shortpath"
45798 
45799   input_path="$input_to_shortpath"
45800   # Check if we need to convert this using DOS-style short mode. If the path
45801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45802   # take no chances and rewrite it.
45803   # Note: m4 eats our [], so we need to use [ and ] instead.
45804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45805   if test "x$has_forbidden_chars" != x; then
45806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45807     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45808     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45809     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45810       # Going to short mode and back again did indeed matter. Since short mode is
45811       # case insensitive, let's make it lowercase to improve readability.
45812       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45813       # Now convert it back to Unix-style (cygpath)
45814       input_path=`$CYGPATH -u "$shortmode_path"`
45815       new_path="$input_path"
45816     fi
45817   fi
45818 
45819   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45820   if test "x$test_cygdrive_prefix" = x; then
45821     # As a simple fix, exclude /usr/bin since it's not a real path.
45822     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45823       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45824       # a path prefixed by /cygdrive for fixpath to work.
45825       new_path="$CYGWIN_ROOT_PATH$input_path"
45826     fi
45827   fi
45828 
45829   # remove trailing .exe if any
45830   new_path="${new_path/%.exe/}"
45831 
45832     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45833 
45834   # First separate the path from the arguments. This will split at the first
45835   # space.
45836   complete="$BUILD_CXX"
45837   path="${complete%% *}"
45838   tmp="$complete EOL"
45839   arguments="${tmp#* }"
45840 
45841   # Input might be given as Windows format, start by converting to
45842   # unix format.
45843   new_path="$path"
45844 
45845   windows_path="$new_path"
45846   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847     unix_path=`$CYGPATH -u "$windows_path"`
45848     new_path="$unix_path"
45849   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851     new_path="$unix_path"
45852   fi
45853 
45854 
45855   # Now try to locate executable using which
45856   new_path=`$WHICH "$new_path" 2> /dev/null`
45857 
45858   if test "x$new_path" = x; then
45859     # Oops. Which didn't find the executable.
45860     # The splitting of arguments from the executable at a space might have been incorrect,
45861     # since paths with space are more likely in Windows. Give it another try with the whole
45862     # argument.
45863     path="$complete"
45864     arguments="EOL"
45865     new_path="$path"
45866 
45867   windows_path="$new_path"
45868   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45869     unix_path=`$CYGPATH -u "$windows_path"`
45870     new_path="$unix_path"
45871   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45872     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45873     new_path="$unix_path"
45874   fi
45875 
45876 
45877     new_path=`$WHICH "$new_path" 2> /dev/null`
45878     # bat and cmd files are not always considered executable in MSYS causing which
45879     # to not find them
45880     if test "x$new_path" = x \
45881         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45882         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45883       new_path="$path"
45884 
45885   windows_path="$new_path"
45886   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45887     unix_path=`$CYGPATH -u "$windows_path"`
45888     new_path="$unix_path"
45889   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45890     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45891     new_path="$unix_path"
45892   fi
45893 
45894     fi
45895 
45896     if test "x$new_path" = x; then
45897       # It's still not found. Now this is an unrecoverable error.
45898       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45899 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45900       has_space=`$ECHO "$complete" | $GREP " "`
45901       if test "x$has_space" != x; then
45902         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45903 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45904       fi
45905       as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45906     fi
45907   fi
45908 
45909   # Now new_path has a complete unix path to the binary
45910   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45911     # Keep paths in /bin as-is, but remove trailing .exe if any
45912     new_path="${new_path/%.exe/}"
45913     # Do not save /bin paths to all_fixpath_prefixes!
45914   else
45915     # Not in mixed or Windows style, start by that.
45916     new_path=`cmd //c echo $new_path`
45917 
45918   input_path="$new_path"
45919   # Check if we need to convert this using DOS-style short mode. If the path
45920   # contains just simple characters, use it. Otherwise (spaces, weird characters),
45921   # take no chances and rewrite it.
45922   # Note: m4 eats our [], so we need to use [ and ] instead.
45923   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45924   if test "x$has_forbidden_chars" != x; then
45925     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45926     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45927   fi
45928 
45929     # Output is in $new_path
45930 
45931   windows_path="$new_path"
45932   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45933     unix_path=`$CYGPATH -u "$windows_path"`
45934     new_path="$unix_path"
45935   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45936     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45937     new_path="$unix_path"
45938   fi
45939 
45940     # remove trailing .exe if any
45941     new_path="${new_path/%.exe/}"
45942 
45943     # Save the first 10 bytes of this path to the storage, so fixpath can work.
45944     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45945   fi
45946 
45947     else
45948       # We're on a unix platform. Hooray! :)
45949       # First separate the path from the arguments. This will split at the first
45950       # space.
45951       complete="$BUILD_CXX"
45952       path="${complete%% *}"
45953       tmp="$complete EOL"
45954       arguments="${tmp#* }"
45955 
45956       # Cannot rely on the command "which" here since it doesn't always work.
45957       is_absolute_path=`$ECHO "$path" | $GREP ^/`
45958       if test -z "$is_absolute_path"; then
45959         # Path to executable is not absolute. Find it.
45960         IFS_save="$IFS"
45961         IFS=:
45962         for p in $PATH; do
45963           if test -f "$p/$path" && test -x "$p/$path"; then
45964             new_path="$p/$path"
45965             break
45966           fi
45967         done
45968         IFS="$IFS_save"
45969       else
45970         # This is an absolute path, we can use it without further modifications.
45971         new_path="$path"
45972       fi
45973 
45974       if test "x$new_path" = x; then
45975         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45976 $as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45977         has_space=`$ECHO "$complete" | $GREP " "`
45978         if test "x$has_space" != x; then
45979           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45980 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45981         fi
45982         as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45983       fi
45984     fi
45985 
45986     # Now join together the path and the arguments once again
45987     if test "x$arguments" != xEOL; then
45988       new_complete="$new_path ${arguments% *}"
45989     else
45990       new_complete="$new_path"
45991     fi
45992 
45993     if test "x$complete" != "x$new_complete"; then
45994       BUILD_CXX="$new_complete"
45995       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45996 $as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45997     fi
45998   fi
45999 
46000 
46001 
46002   # Publish this variable in the help.
46003 
46004 
46005   if [ -z "${BUILD_NM+x}" ]; then
46006     # The variable is not set by user, try to locate tool using the code snippet
46007     for ac_prog in nm gcc-nm
46008 do
46009   # Extract the first word of "$ac_prog", so it can be a program name with args.
46010 set dummy $ac_prog; ac_word=$2
46011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46012 $as_echo_n "checking for $ac_word... " >&6; }
46013 if ${ac_cv_path_BUILD_NM+:} false; then :
46014   $as_echo_n "(cached) " >&6
46015 else
46016   case $BUILD_NM in
46017   [\\/]* | ?:[\\/]*)
46018   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46019   ;;
46020   *)
46021   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46022 for as_dir in $PATH
46023 do
46024   IFS=$as_save_IFS
46025   test -z "$as_dir" && as_dir=.
46026     for ac_exec_ext in '' $ac_executable_extensions; do
46027   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46028     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46029     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46030     break 2
46031   fi
46032 done
46033   done
46034 IFS=$as_save_IFS
46035 
46036   ;;
46037 esac
46038 fi
46039 BUILD_NM=$ac_cv_path_BUILD_NM
46040 if test -n "$BUILD_NM"; then
46041   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46042 $as_echo "$BUILD_NM" >&6; }
46043 else
46044   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46045 $as_echo "no" >&6; }
46046 fi
46047 
46048 
46049   test -n "$BUILD_NM" && break
46050 done
46051 
46052   else
46053     # The variable is set, but is it from the command line or the environment?
46054 
46055     # Try to remove the string !BUILD_NM! from our list.
46056     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
46057     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46058       # If it failed, the variable was not from the command line. Ignore it,
46059       # but warn the user (except for BASH, which is always set by the calling BASH).
46060       if test "xBUILD_NM" != xBASH; then
46061         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
46062 $as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
46063       fi
46064       # Try to locate tool using the code snippet
46065       for ac_prog in nm gcc-nm
46066 do
46067   # Extract the first word of "$ac_prog", so it can be a program name with args.
46068 set dummy $ac_prog; ac_word=$2
46069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46070 $as_echo_n "checking for $ac_word... " >&6; }
46071 if ${ac_cv_path_BUILD_NM+:} false; then :
46072   $as_echo_n "(cached) " >&6
46073 else
46074   case $BUILD_NM in
46075   [\\/]* | ?:[\\/]*)
46076   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46077   ;;
46078   *)
46079   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46080 for as_dir in $PATH
46081 do
46082   IFS=$as_save_IFS
46083   test -z "$as_dir" && as_dir=.
46084     for ac_exec_ext in '' $ac_executable_extensions; do
46085   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46086     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46087     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46088     break 2
46089   fi
46090 done
46091   done
46092 IFS=$as_save_IFS
46093 
46094   ;;
46095 esac
46096 fi
46097 BUILD_NM=$ac_cv_path_BUILD_NM
46098 if test -n "$BUILD_NM"; then
46099   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46100 $as_echo "$BUILD_NM" >&6; }
46101 else
46102   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46103 $as_echo "no" >&6; }
46104 fi
46105 
46106 
46107   test -n "$BUILD_NM" && break
46108 done
46109 
46110     else
46111       # If it succeeded, then it was overridden by the user. We will use it
46112       # for the tool.
46113 
46114       # First remove it from the list of overridden variables, so we can test
46115       # for unknown variables in the end.
46116       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46117 
46118       # Check if we try to supply an empty value
46119       if test "x$BUILD_NM" = x; then
46120         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
46121 $as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
46122         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46123 $as_echo_n "checking for BUILD_NM... " >&6; }
46124         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46125 $as_echo "disabled" >&6; }
46126       else
46127         # Check if the provided tool contains a complete path.
46128         tool_specified="$BUILD_NM"
46129         tool_basename="${tool_specified##*/}"
46130         if test "x$tool_basename" = "x$tool_specified"; then
46131           # A command without a complete path is provided, search $PATH.
46132           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
46133 $as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
46134           # Extract the first word of "$tool_basename", so it can be a program name with args.
46135 set dummy $tool_basename; ac_word=$2
46136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46137 $as_echo_n "checking for $ac_word... " >&6; }
46138 if ${ac_cv_path_BUILD_NM+:} false; then :
46139   $as_echo_n "(cached) " >&6
46140 else
46141   case $BUILD_NM in
46142   [\\/]* | ?:[\\/]*)
46143   ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
46144   ;;
46145   *)
46146   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46147 for as_dir in $PATH
46148 do
46149   IFS=$as_save_IFS
46150   test -z "$as_dir" && as_dir=.
46151     for ac_exec_ext in '' $ac_executable_extensions; do
46152   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46153     ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
46154     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46155     break 2
46156   fi
46157 done
46158   done
46159 IFS=$as_save_IFS
46160 
46161   ;;
46162 esac
46163 fi
46164 BUILD_NM=$ac_cv_path_BUILD_NM
46165 if test -n "$BUILD_NM"; then
46166   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
46167 $as_echo "$BUILD_NM" >&6; }
46168 else
46169   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46170 $as_echo "no" >&6; }
46171 fi
46172 
46173 
46174           if test "x$BUILD_NM" = x; then
46175             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46176           fi
46177         else
46178           # Otherwise we believe it is a complete path. Use it as it is.
46179           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
46180 $as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
46181           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
46182 $as_echo_n "checking for BUILD_NM... " >&6; }
46183           if test ! -x "$tool_specified"; then
46184             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46185 $as_echo "not found" >&6; }
46186             as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
46187           fi
46188           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46189 $as_echo "$tool_specified" >&6; }
46190         fi
46191       fi
46192     fi
46193 
46194   fi
46195 
46196 
46197 
46198   # Only process if variable expands to non-empty
46199 
46200   if test "x$BUILD_NM" != x; then
46201     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46202 
46203   # First separate the path from the arguments. This will split at the first
46204   # space.
46205   complete="$BUILD_NM"
46206   path="${complete%% *}"
46207   tmp="$complete EOL"
46208   arguments="${tmp#* }"
46209 
46210   # Input might be given as Windows format, start by converting to
46211   # unix format.
46212   new_path=`$CYGPATH -u "$path"`
46213 
46214   # Now try to locate executable using which
46215   new_path=`$WHICH "$new_path" 2> /dev/null`
46216   # bat and cmd files are not always considered executable in cygwin causing which
46217   # to not find them
46218   if test "x$new_path" = x \
46219       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46220       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46221     new_path=`$CYGPATH -u "$path"`
46222   fi
46223   if test "x$new_path" = x; then
46224     # Oops. Which didn't find the executable.
46225     # The splitting of arguments from the executable at a space might have been incorrect,
46226     # since paths with space are more likely in Windows. Give it another try with the whole
46227     # argument.
46228     path="$complete"
46229     arguments="EOL"
46230     new_path=`$CYGPATH -u "$path"`
46231     new_path=`$WHICH "$new_path" 2> /dev/null`
46232     # bat and cmd files are not always considered executable in cygwin causing which
46233     # to not find them
46234     if test "x$new_path" = x \
46235         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46236         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46237       new_path=`$CYGPATH -u "$path"`
46238     fi
46239     if test "x$new_path" = x; then
46240       # It's still not found. Now this is an unrecoverable error.
46241       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46242 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46243       has_space=`$ECHO "$complete" | $GREP " "`
46244       if test "x$has_space" != x; then
46245         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46246 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46247       fi
46248       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46249     fi
46250   fi
46251 
46252   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46253   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46254   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46255   # "foo.exe" is OK but "foo" is an error.
46256   #
46257   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46258   # It is also a way to make sure we got the proper file name for the real test later on.
46259   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46260   if test "x$test_shortpath" = x; then
46261     # Short path failed, file does not exist as specified.
46262     # Try adding .exe or .cmd
46263     if test -f "${new_path}.exe"; then
46264       input_to_shortpath="${new_path}.exe"
46265     elif test -f "${new_path}.cmd"; then
46266       input_to_shortpath="${new_path}.cmd"
46267     else
46268       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
46269 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
46270       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46271 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46272       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46273     fi
46274   else
46275     input_to_shortpath="$new_path"
46276   fi
46277 
46278   # Call helper function which possibly converts this using DOS-style short mode.
46279   # If so, the updated path is stored in $new_path.
46280   new_path="$input_to_shortpath"
46281 
46282   input_path="$input_to_shortpath"
46283   # Check if we need to convert this using DOS-style short mode. If the path
46284   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46285   # take no chances and rewrite it.
46286   # Note: m4 eats our [], so we need to use [ and ] instead.
46287   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46288   if test "x$has_forbidden_chars" != x; then
46289     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46290     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46291     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46292     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46293       # Going to short mode and back again did indeed matter. Since short mode is
46294       # case insensitive, let's make it lowercase to improve readability.
46295       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46296       # Now convert it back to Unix-style (cygpath)
46297       input_path=`$CYGPATH -u "$shortmode_path"`
46298       new_path="$input_path"
46299     fi
46300   fi
46301 
46302   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46303   if test "x$test_cygdrive_prefix" = x; then
46304     # As a simple fix, exclude /usr/bin since it's not a real path.
46305     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46306       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46307       # a path prefixed by /cygdrive for fixpath to work.
46308       new_path="$CYGWIN_ROOT_PATH$input_path"
46309     fi
46310   fi
46311 
46312   # remove trailing .exe if any
46313   new_path="${new_path/%.exe/}"
46314 
46315     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46316 
46317   # First separate the path from the arguments. This will split at the first
46318   # space.
46319   complete="$BUILD_NM"
46320   path="${complete%% *}"
46321   tmp="$complete EOL"
46322   arguments="${tmp#* }"
46323 
46324   # Input might be given as Windows format, start by converting to
46325   # unix format.
46326   new_path="$path"
46327 
46328   windows_path="$new_path"
46329   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46330     unix_path=`$CYGPATH -u "$windows_path"`
46331     new_path="$unix_path"
46332   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46334     new_path="$unix_path"
46335   fi
46336 
46337 
46338   # Now try to locate executable using which
46339   new_path=`$WHICH "$new_path" 2> /dev/null`
46340 
46341   if test "x$new_path" = x; then
46342     # Oops. Which didn't find the executable.
46343     # The splitting of arguments from the executable at a space might have been incorrect,
46344     # since paths with space are more likely in Windows. Give it another try with the whole
46345     # argument.
46346     path="$complete"
46347     arguments="EOL"
46348     new_path="$path"
46349 
46350   windows_path="$new_path"
46351   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46352     unix_path=`$CYGPATH -u "$windows_path"`
46353     new_path="$unix_path"
46354   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46355     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46356     new_path="$unix_path"
46357   fi
46358 
46359 
46360     new_path=`$WHICH "$new_path" 2> /dev/null`
46361     # bat and cmd files are not always considered executable in MSYS causing which
46362     # to not find them
46363     if test "x$new_path" = x \
46364         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46365         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46366       new_path="$path"
46367 
46368   windows_path="$new_path"
46369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46370     unix_path=`$CYGPATH -u "$windows_path"`
46371     new_path="$unix_path"
46372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46374     new_path="$unix_path"
46375   fi
46376 
46377     fi
46378 
46379     if test "x$new_path" = x; then
46380       # It's still not found. Now this is an unrecoverable error.
46381       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46382 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46383       has_space=`$ECHO "$complete" | $GREP " "`
46384       if test "x$has_space" != x; then
46385         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46386 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46387       fi
46388       as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46389     fi
46390   fi
46391 
46392   # Now new_path has a complete unix path to the binary
46393   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46394     # Keep paths in /bin as-is, but remove trailing .exe if any
46395     new_path="${new_path/%.exe/}"
46396     # Do not save /bin paths to all_fixpath_prefixes!
46397   else
46398     # Not in mixed or Windows style, start by that.
46399     new_path=`cmd //c echo $new_path`
46400 
46401   input_path="$new_path"
46402   # Check if we need to convert this using DOS-style short mode. If the path
46403   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46404   # take no chances and rewrite it.
46405   # Note: m4 eats our [], so we need to use [ and ] instead.
46406   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46407   if test "x$has_forbidden_chars" != x; then
46408     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46409     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46410   fi
46411 
46412     # Output is in $new_path
46413 
46414   windows_path="$new_path"
46415   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46416     unix_path=`$CYGPATH -u "$windows_path"`
46417     new_path="$unix_path"
46418   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46419     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46420     new_path="$unix_path"
46421   fi
46422 
46423     # remove trailing .exe if any
46424     new_path="${new_path/%.exe/}"
46425 
46426     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46427     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46428   fi
46429 
46430     else
46431       # We're on a unix platform. Hooray! :)
46432       # First separate the path from the arguments. This will split at the first
46433       # space.
46434       complete="$BUILD_NM"
46435       path="${complete%% *}"
46436       tmp="$complete EOL"
46437       arguments="${tmp#* }"
46438 
46439       # Cannot rely on the command "which" here since it doesn't always work.
46440       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46441       if test -z "$is_absolute_path"; then
46442         # Path to executable is not absolute. Find it.
46443         IFS_save="$IFS"
46444         IFS=:
46445         for p in $PATH; do
46446           if test -f "$p/$path" && test -x "$p/$path"; then
46447             new_path="$p/$path"
46448             break
46449           fi
46450         done
46451         IFS="$IFS_save"
46452       else
46453         # This is an absolute path, we can use it without further modifications.
46454         new_path="$path"
46455       fi
46456 
46457       if test "x$new_path" = x; then
46458         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
46459 $as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
46460         has_space=`$ECHO "$complete" | $GREP " "`
46461         if test "x$has_space" != x; then
46462           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46463 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46464         fi
46465         as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
46466       fi
46467     fi
46468 
46469     # Now join together the path and the arguments once again
46470     if test "x$arguments" != xEOL; then
46471       new_complete="$new_path ${arguments% *}"
46472     else
46473       new_complete="$new_path"
46474     fi
46475 
46476     if test "x$complete" != "x$new_complete"; then
46477       BUILD_NM="$new_complete"
46478       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
46479 $as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
46480     fi
46481   fi
46482 
46483 
46484 
46485   # Publish this variable in the help.
46486 
46487 
46488   if [ -z "${BUILD_AR+x}" ]; then
46489     # The variable is not set by user, try to locate tool using the code snippet
46490     for ac_prog in ar gcc-ar
46491 do
46492   # Extract the first word of "$ac_prog", so it can be a program name with args.
46493 set dummy $ac_prog; ac_word=$2
46494 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46495 $as_echo_n "checking for $ac_word... " >&6; }
46496 if ${ac_cv_path_BUILD_AR+:} false; then :
46497   $as_echo_n "(cached) " >&6
46498 else
46499   case $BUILD_AR in
46500   [\\/]* | ?:[\\/]*)
46501   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46502   ;;
46503   *)
46504   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46505 for as_dir in $PATH
46506 do
46507   IFS=$as_save_IFS
46508   test -z "$as_dir" && as_dir=.
46509     for ac_exec_ext in '' $ac_executable_extensions; do
46510   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46511     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46512     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46513     break 2
46514   fi
46515 done
46516   done
46517 IFS=$as_save_IFS
46518 
46519   ;;
46520 esac
46521 fi
46522 BUILD_AR=$ac_cv_path_BUILD_AR
46523 if test -n "$BUILD_AR"; then
46524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46525 $as_echo "$BUILD_AR" >&6; }
46526 else
46527   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46528 $as_echo "no" >&6; }
46529 fi
46530 
46531 
46532   test -n "$BUILD_AR" && break
46533 done
46534 
46535   else
46536     # The variable is set, but is it from the command line or the environment?
46537 
46538     # Try to remove the string !BUILD_AR! from our list.
46539     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
46540     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46541       # If it failed, the variable was not from the command line. Ignore it,
46542       # but warn the user (except for BASH, which is always set by the calling BASH).
46543       if test "xBUILD_AR" != xBASH; then
46544         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
46545 $as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
46546       fi
46547       # Try to locate tool using the code snippet
46548       for ac_prog in ar gcc-ar
46549 do
46550   # Extract the first word of "$ac_prog", so it can be a program name with args.
46551 set dummy $ac_prog; ac_word=$2
46552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46553 $as_echo_n "checking for $ac_word... " >&6; }
46554 if ${ac_cv_path_BUILD_AR+:} false; then :
46555   $as_echo_n "(cached) " >&6
46556 else
46557   case $BUILD_AR in
46558   [\\/]* | ?:[\\/]*)
46559   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46560   ;;
46561   *)
46562   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46563 for as_dir in $PATH
46564 do
46565   IFS=$as_save_IFS
46566   test -z "$as_dir" && as_dir=.
46567     for ac_exec_ext in '' $ac_executable_extensions; do
46568   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46569     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46570     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46571     break 2
46572   fi
46573 done
46574   done
46575 IFS=$as_save_IFS
46576 
46577   ;;
46578 esac
46579 fi
46580 BUILD_AR=$ac_cv_path_BUILD_AR
46581 if test -n "$BUILD_AR"; then
46582   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46583 $as_echo "$BUILD_AR" >&6; }
46584 else
46585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46586 $as_echo "no" >&6; }
46587 fi
46588 
46589 
46590   test -n "$BUILD_AR" && break
46591 done
46592 
46593     else
46594       # If it succeeded, then it was overridden by the user. We will use it
46595       # for the tool.
46596 
46597       # First remove it from the list of overridden variables, so we can test
46598       # for unknown variables in the end.
46599       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46600 
46601       # Check if we try to supply an empty value
46602       if test "x$BUILD_AR" = x; then
46603         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46604 $as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46605         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46606 $as_echo_n "checking for BUILD_AR... " >&6; }
46607         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46608 $as_echo "disabled" >&6; }
46609       else
46610         # Check if the provided tool contains a complete path.
46611         tool_specified="$BUILD_AR"
46612         tool_basename="${tool_specified##*/}"
46613         if test "x$tool_basename" = "x$tool_specified"; then
46614           # A command without a complete path is provided, search $PATH.
46615           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46616 $as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46617           # Extract the first word of "$tool_basename", so it can be a program name with args.
46618 set dummy $tool_basename; ac_word=$2
46619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46620 $as_echo_n "checking for $ac_word... " >&6; }
46621 if ${ac_cv_path_BUILD_AR+:} false; then :
46622   $as_echo_n "(cached) " >&6
46623 else
46624   case $BUILD_AR in
46625   [\\/]* | ?:[\\/]*)
46626   ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46627   ;;
46628   *)
46629   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46630 for as_dir in $PATH
46631 do
46632   IFS=$as_save_IFS
46633   test -z "$as_dir" && as_dir=.
46634     for ac_exec_ext in '' $ac_executable_extensions; do
46635   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46636     ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46637     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46638     break 2
46639   fi
46640 done
46641   done
46642 IFS=$as_save_IFS
46643 
46644   ;;
46645 esac
46646 fi
46647 BUILD_AR=$ac_cv_path_BUILD_AR
46648 if test -n "$BUILD_AR"; then
46649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46650 $as_echo "$BUILD_AR" >&6; }
46651 else
46652   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46653 $as_echo "no" >&6; }
46654 fi
46655 
46656 
46657           if test "x$BUILD_AR" = x; then
46658             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46659           fi
46660         else
46661           # Otherwise we believe it is a complete path. Use it as it is.
46662           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46663 $as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46664           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46665 $as_echo_n "checking for BUILD_AR... " >&6; }
46666           if test ! -x "$tool_specified"; then
46667             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46668 $as_echo "not found" >&6; }
46669             as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46670           fi
46671           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46672 $as_echo "$tool_specified" >&6; }
46673         fi
46674       fi
46675     fi
46676 
46677   fi
46678 
46679 
46680 
46681   # Only process if variable expands to non-empty
46682 
46683   if test "x$BUILD_AR" != x; then
46684     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46685 
46686   # First separate the path from the arguments. This will split at the first
46687   # space.
46688   complete="$BUILD_AR"
46689   path="${complete%% *}"
46690   tmp="$complete EOL"
46691   arguments="${tmp#* }"
46692 
46693   # Input might be given as Windows format, start by converting to
46694   # unix format.
46695   new_path=`$CYGPATH -u "$path"`
46696 
46697   # Now try to locate executable using which
46698   new_path=`$WHICH "$new_path" 2> /dev/null`
46699   # bat and cmd files are not always considered executable in cygwin causing which
46700   # to not find them
46701   if test "x$new_path" = x \
46702       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46703       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46704     new_path=`$CYGPATH -u "$path"`
46705   fi
46706   if test "x$new_path" = x; then
46707     # Oops. Which didn't find the executable.
46708     # The splitting of arguments from the executable at a space might have been incorrect,
46709     # since paths with space are more likely in Windows. Give it another try with the whole
46710     # argument.
46711     path="$complete"
46712     arguments="EOL"
46713     new_path=`$CYGPATH -u "$path"`
46714     new_path=`$WHICH "$new_path" 2> /dev/null`
46715     # bat and cmd files are not always considered executable in cygwin causing which
46716     # to not find them
46717     if test "x$new_path" = x \
46718         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46719         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46720       new_path=`$CYGPATH -u "$path"`
46721     fi
46722     if test "x$new_path" = x; then
46723       # It's still not found. Now this is an unrecoverable error.
46724       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46725 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46726       has_space=`$ECHO "$complete" | $GREP " "`
46727       if test "x$has_space" != x; then
46728         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46729 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46730       fi
46731       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46732     fi
46733   fi
46734 
46735   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46736   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46737   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46738   # "foo.exe" is OK but "foo" is an error.
46739   #
46740   # This test is therefore slightly more accurate than "test -f" to check for file presence.
46741   # It is also a way to make sure we got the proper file name for the real test later on.
46742   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46743   if test "x$test_shortpath" = x; then
46744     # Short path failed, file does not exist as specified.
46745     # Try adding .exe or .cmd
46746     if test -f "${new_path}.exe"; then
46747       input_to_shortpath="${new_path}.exe"
46748     elif test -f "${new_path}.cmd"; then
46749       input_to_shortpath="${new_path}.cmd"
46750     else
46751       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46752 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46753       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46754 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46755       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46756     fi
46757   else
46758     input_to_shortpath="$new_path"
46759   fi
46760 
46761   # Call helper function which possibly converts this using DOS-style short mode.
46762   # If so, the updated path is stored in $new_path.
46763   new_path="$input_to_shortpath"
46764 
46765   input_path="$input_to_shortpath"
46766   # Check if we need to convert this using DOS-style short mode. If the path
46767   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46768   # take no chances and rewrite it.
46769   # Note: m4 eats our [], so we need to use [ and ] instead.
46770   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46771   if test "x$has_forbidden_chars" != x; then
46772     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46773     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46774     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46775     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46776       # Going to short mode and back again did indeed matter. Since short mode is
46777       # case insensitive, let's make it lowercase to improve readability.
46778       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46779       # Now convert it back to Unix-style (cygpath)
46780       input_path=`$CYGPATH -u "$shortmode_path"`
46781       new_path="$input_path"
46782     fi
46783   fi
46784 
46785   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46786   if test "x$test_cygdrive_prefix" = x; then
46787     # As a simple fix, exclude /usr/bin since it's not a real path.
46788     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46789       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46790       # a path prefixed by /cygdrive for fixpath to work.
46791       new_path="$CYGWIN_ROOT_PATH$input_path"
46792     fi
46793   fi
46794 
46795   # remove trailing .exe if any
46796   new_path="${new_path/%.exe/}"
46797 
46798     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46799 
46800   # First separate the path from the arguments. This will split at the first
46801   # space.
46802   complete="$BUILD_AR"
46803   path="${complete%% *}"
46804   tmp="$complete EOL"
46805   arguments="${tmp#* }"
46806 
46807   # Input might be given as Windows format, start by converting to
46808   # unix format.
46809   new_path="$path"
46810 
46811   windows_path="$new_path"
46812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46813     unix_path=`$CYGPATH -u "$windows_path"`
46814     new_path="$unix_path"
46815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46817     new_path="$unix_path"
46818   fi
46819 
46820 
46821   # Now try to locate executable using which
46822   new_path=`$WHICH "$new_path" 2> /dev/null`
46823 
46824   if test "x$new_path" = x; then
46825     # Oops. Which didn't find the executable.
46826     # The splitting of arguments from the executable at a space might have been incorrect,
46827     # since paths with space are more likely in Windows. Give it another try with the whole
46828     # argument.
46829     path="$complete"
46830     arguments="EOL"
46831     new_path="$path"
46832 
46833   windows_path="$new_path"
46834   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46835     unix_path=`$CYGPATH -u "$windows_path"`
46836     new_path="$unix_path"
46837   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46838     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46839     new_path="$unix_path"
46840   fi
46841 
46842 
46843     new_path=`$WHICH "$new_path" 2> /dev/null`
46844     # bat and cmd files are not always considered executable in MSYS causing which
46845     # to not find them
46846     if test "x$new_path" = x \
46847         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46848         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46849       new_path="$path"
46850 
46851   windows_path="$new_path"
46852   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46853     unix_path=`$CYGPATH -u "$windows_path"`
46854     new_path="$unix_path"
46855   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46856     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46857     new_path="$unix_path"
46858   fi
46859 
46860     fi
46861 
46862     if test "x$new_path" = x; then
46863       # It's still not found. Now this is an unrecoverable error.
46864       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46865 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46866       has_space=`$ECHO "$complete" | $GREP " "`
46867       if test "x$has_space" != x; then
46868         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46869 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46870       fi
46871       as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46872     fi
46873   fi
46874 
46875   # Now new_path has a complete unix path to the binary
46876   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46877     # Keep paths in /bin as-is, but remove trailing .exe if any
46878     new_path="${new_path/%.exe/}"
46879     # Do not save /bin paths to all_fixpath_prefixes!
46880   else
46881     # Not in mixed or Windows style, start by that.
46882     new_path=`cmd //c echo $new_path`
46883 
46884   input_path="$new_path"
46885   # Check if we need to convert this using DOS-style short mode. If the path
46886   # contains just simple characters, use it. Otherwise (spaces, weird characters),
46887   # take no chances and rewrite it.
46888   # Note: m4 eats our [], so we need to use [ and ] instead.
46889   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46890   if test "x$has_forbidden_chars" != x; then
46891     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46892     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46893   fi
46894 
46895     # Output is in $new_path
46896 
46897   windows_path="$new_path"
46898   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46899     unix_path=`$CYGPATH -u "$windows_path"`
46900     new_path="$unix_path"
46901   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46902     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46903     new_path="$unix_path"
46904   fi
46905 
46906     # remove trailing .exe if any
46907     new_path="${new_path/%.exe/}"
46908 
46909     # Save the first 10 bytes of this path to the storage, so fixpath can work.
46910     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46911   fi
46912 
46913     else
46914       # We're on a unix platform. Hooray! :)
46915       # First separate the path from the arguments. This will split at the first
46916       # space.
46917       complete="$BUILD_AR"
46918       path="${complete%% *}"
46919       tmp="$complete EOL"
46920       arguments="${tmp#* }"
46921 
46922       # Cannot rely on the command "which" here since it doesn't always work.
46923       is_absolute_path=`$ECHO "$path" | $GREP ^/`
46924       if test -z "$is_absolute_path"; then
46925         # Path to executable is not absolute. Find it.
46926         IFS_save="$IFS"
46927         IFS=:
46928         for p in $PATH; do
46929           if test -f "$p/$path" && test -x "$p/$path"; then
46930             new_path="$p/$path"
46931             break
46932           fi
46933         done
46934         IFS="$IFS_save"
46935       else
46936         # This is an absolute path, we can use it without further modifications.
46937         new_path="$path"
46938       fi
46939 
46940       if test "x$new_path" = x; then
46941         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46942 $as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46943         has_space=`$ECHO "$complete" | $GREP " "`
46944         if test "x$has_space" != x; then
46945           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46946 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46947         fi
46948         as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46949       fi
46950     fi
46951 
46952     # Now join together the path and the arguments once again
46953     if test "x$arguments" != xEOL; then
46954       new_complete="$new_path ${arguments% *}"
46955     else
46956       new_complete="$new_path"
46957     fi
46958 
46959     if test "x$complete" != "x$new_complete"; then
46960       BUILD_AR="$new_complete"
46961       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46962 $as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46963     fi
46964   fi
46965 
46966 
46967 
46968   # Publish this variable in the help.
46969 
46970 
46971   if [ -z "${BUILD_OBJCOPY+x}" ]; then
46972     # The variable is not set by user, try to locate tool using the code snippet
46973     for ac_prog in objcopy
46974 do
46975   # Extract the first word of "$ac_prog", so it can be a program name with args.
46976 set dummy $ac_prog; ac_word=$2
46977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46978 $as_echo_n "checking for $ac_word... " >&6; }
46979 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46980   $as_echo_n "(cached) " >&6
46981 else
46982   case $BUILD_OBJCOPY in
46983   [\\/]* | ?:[\\/]*)
46984   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46985   ;;
46986   *)
46987   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46988 for as_dir in $PATH
46989 do
46990   IFS=$as_save_IFS
46991   test -z "$as_dir" && as_dir=.
46992     for ac_exec_ext in '' $ac_executable_extensions; do
46993   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46994     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46995     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46996     break 2
46997   fi
46998 done
46999   done
47000 IFS=$as_save_IFS
47001 
47002   ;;
47003 esac
47004 fi
47005 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47006 if test -n "$BUILD_OBJCOPY"; then
47007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47008 $as_echo "$BUILD_OBJCOPY" >&6; }
47009 else
47010   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47011 $as_echo "no" >&6; }
47012 fi
47013 
47014 
47015   test -n "$BUILD_OBJCOPY" && break
47016 done
47017 
47018   else
47019     # The variable is set, but is it from the command line or the environment?
47020 
47021     # Try to remove the string !BUILD_OBJCOPY! from our list.
47022     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
47023     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47024       # If it failed, the variable was not from the command line. Ignore it,
47025       # but warn the user (except for BASH, which is always set by the calling BASH).
47026       if test "xBUILD_OBJCOPY" != xBASH; then
47027         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
47028 $as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
47029       fi
47030       # Try to locate tool using the code snippet
47031       for ac_prog in objcopy
47032 do
47033   # Extract the first word of "$ac_prog", so it can be a program name with args.
47034 set dummy $ac_prog; ac_word=$2
47035 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47036 $as_echo_n "checking for $ac_word... " >&6; }
47037 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47038   $as_echo_n "(cached) " >&6
47039 else
47040   case $BUILD_OBJCOPY in
47041   [\\/]* | ?:[\\/]*)
47042   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47043   ;;
47044   *)
47045   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47046 for as_dir in $PATH
47047 do
47048   IFS=$as_save_IFS
47049   test -z "$as_dir" && as_dir=.
47050     for ac_exec_ext in '' $ac_executable_extensions; do
47051   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47052     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47053     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47054     break 2
47055   fi
47056 done
47057   done
47058 IFS=$as_save_IFS
47059 
47060   ;;
47061 esac
47062 fi
47063 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47064 if test -n "$BUILD_OBJCOPY"; then
47065   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47066 $as_echo "$BUILD_OBJCOPY" >&6; }
47067 else
47068   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47069 $as_echo "no" >&6; }
47070 fi
47071 
47072 
47073   test -n "$BUILD_OBJCOPY" && break
47074 done
47075 
47076     else
47077       # If it succeeded, then it was overridden by the user. We will use it
47078       # for the tool.
47079 
47080       # First remove it from the list of overridden variables, so we can test
47081       # for unknown variables in the end.
47082       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47083 
47084       # Check if we try to supply an empty value
47085       if test "x$BUILD_OBJCOPY" = x; then
47086         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
47087 $as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
47088         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47089 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47090         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47091 $as_echo "disabled" >&6; }
47092       else
47093         # Check if the provided tool contains a complete path.
47094         tool_specified="$BUILD_OBJCOPY"
47095         tool_basename="${tool_specified##*/}"
47096         if test "x$tool_basename" = "x$tool_specified"; then
47097           # A command without a complete path is provided, search $PATH.
47098           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
47099 $as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
47100           # Extract the first word of "$tool_basename", so it can be a program name with args.
47101 set dummy $tool_basename; ac_word=$2
47102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47103 $as_echo_n "checking for $ac_word... " >&6; }
47104 if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
47105   $as_echo_n "(cached) " >&6
47106 else
47107   case $BUILD_OBJCOPY in
47108   [\\/]* | ?:[\\/]*)
47109   ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
47110   ;;
47111   *)
47112   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47113 for as_dir in $PATH
47114 do
47115   IFS=$as_save_IFS
47116   test -z "$as_dir" && as_dir=.
47117     for ac_exec_ext in '' $ac_executable_extensions; do
47118   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47119     ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
47120     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47121     break 2
47122   fi
47123 done
47124   done
47125 IFS=$as_save_IFS
47126 
47127   ;;
47128 esac
47129 fi
47130 BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
47131 if test -n "$BUILD_OBJCOPY"; then
47132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
47133 $as_echo "$BUILD_OBJCOPY" >&6; }
47134 else
47135   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47136 $as_echo "no" >&6; }
47137 fi
47138 
47139 
47140           if test "x$BUILD_OBJCOPY" = x; then
47141             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47142           fi
47143         else
47144           # Otherwise we believe it is a complete path. Use it as it is.
47145           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
47146 $as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
47147           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
47148 $as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
47149           if test ! -x "$tool_specified"; then
47150             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47151 $as_echo "not found" >&6; }
47152             as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
47153           fi
47154           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47155 $as_echo "$tool_specified" >&6; }
47156         fi
47157       fi
47158     fi
47159 
47160   fi
47161 
47162 
47163 
47164   # Only process if variable expands to non-empty
47165 
47166   if test "x$BUILD_OBJCOPY" != x; then
47167     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47168 
47169   # First separate the path from the arguments. This will split at the first
47170   # space.
47171   complete="$BUILD_OBJCOPY"
47172   path="${complete%% *}"
47173   tmp="$complete EOL"
47174   arguments="${tmp#* }"
47175 
47176   # Input might be given as Windows format, start by converting to
47177   # unix format.
47178   new_path=`$CYGPATH -u "$path"`
47179 
47180   # Now try to locate executable using which
47181   new_path=`$WHICH "$new_path" 2> /dev/null`
47182   # bat and cmd files are not always considered executable in cygwin causing which
47183   # to not find them
47184   if test "x$new_path" = x \
47185       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47186       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47187     new_path=`$CYGPATH -u "$path"`
47188   fi
47189   if test "x$new_path" = x; then
47190     # Oops. Which didn't find the executable.
47191     # The splitting of arguments from the executable at a space might have been incorrect,
47192     # since paths with space are more likely in Windows. Give it another try with the whole
47193     # argument.
47194     path="$complete"
47195     arguments="EOL"
47196     new_path=`$CYGPATH -u "$path"`
47197     new_path=`$WHICH "$new_path" 2> /dev/null`
47198     # bat and cmd files are not always considered executable in cygwin causing which
47199     # to not find them
47200     if test "x$new_path" = x \
47201         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47202         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47203       new_path=`$CYGPATH -u "$path"`
47204     fi
47205     if test "x$new_path" = x; then
47206       # It's still not found. Now this is an unrecoverable error.
47207       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47208 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47209       has_space=`$ECHO "$complete" | $GREP " "`
47210       if test "x$has_space" != x; then
47211         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47212 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47213       fi
47214       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47215     fi
47216   fi
47217 
47218   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47219   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47220   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47221   # "foo.exe" is OK but "foo" is an error.
47222   #
47223   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47224   # It is also a way to make sure we got the proper file name for the real test later on.
47225   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47226   if test "x$test_shortpath" = x; then
47227     # Short path failed, file does not exist as specified.
47228     # Try adding .exe or .cmd
47229     if test -f "${new_path}.exe"; then
47230       input_to_shortpath="${new_path}.exe"
47231     elif test -f "${new_path}.cmd"; then
47232       input_to_shortpath="${new_path}.cmd"
47233     else
47234       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
47235 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
47236       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47237 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47238       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47239     fi
47240   else
47241     input_to_shortpath="$new_path"
47242   fi
47243 
47244   # Call helper function which possibly converts this using DOS-style short mode.
47245   # If so, the updated path is stored in $new_path.
47246   new_path="$input_to_shortpath"
47247 
47248   input_path="$input_to_shortpath"
47249   # Check if we need to convert this using DOS-style short mode. If the path
47250   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47251   # take no chances and rewrite it.
47252   # Note: m4 eats our [], so we need to use [ and ] instead.
47253   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47254   if test "x$has_forbidden_chars" != x; then
47255     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47256     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47257     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47258     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47259       # Going to short mode and back again did indeed matter. Since short mode is
47260       # case insensitive, let's make it lowercase to improve readability.
47261       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47262       # Now convert it back to Unix-style (cygpath)
47263       input_path=`$CYGPATH -u "$shortmode_path"`
47264       new_path="$input_path"
47265     fi
47266   fi
47267 
47268   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47269   if test "x$test_cygdrive_prefix" = x; then
47270     # As a simple fix, exclude /usr/bin since it's not a real path.
47271     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47272       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47273       # a path prefixed by /cygdrive for fixpath to work.
47274       new_path="$CYGWIN_ROOT_PATH$input_path"
47275     fi
47276   fi
47277 
47278   # remove trailing .exe if any
47279   new_path="${new_path/%.exe/}"
47280 
47281     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47282 
47283   # First separate the path from the arguments. This will split at the first
47284   # space.
47285   complete="$BUILD_OBJCOPY"
47286   path="${complete%% *}"
47287   tmp="$complete EOL"
47288   arguments="${tmp#* }"
47289 
47290   # Input might be given as Windows format, start by converting to
47291   # unix format.
47292   new_path="$path"
47293 
47294   windows_path="$new_path"
47295   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47296     unix_path=`$CYGPATH -u "$windows_path"`
47297     new_path="$unix_path"
47298   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47299     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47300     new_path="$unix_path"
47301   fi
47302 
47303 
47304   # Now try to locate executable using which
47305   new_path=`$WHICH "$new_path" 2> /dev/null`
47306 
47307   if test "x$new_path" = x; then
47308     # Oops. Which didn't find the executable.
47309     # The splitting of arguments from the executable at a space might have been incorrect,
47310     # since paths with space are more likely in Windows. Give it another try with the whole
47311     # argument.
47312     path="$complete"
47313     arguments="EOL"
47314     new_path="$path"
47315 
47316   windows_path="$new_path"
47317   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47318     unix_path=`$CYGPATH -u "$windows_path"`
47319     new_path="$unix_path"
47320   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47321     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47322     new_path="$unix_path"
47323   fi
47324 
47325 
47326     new_path=`$WHICH "$new_path" 2> /dev/null`
47327     # bat and cmd files are not always considered executable in MSYS causing which
47328     # to not find them
47329     if test "x$new_path" = x \
47330         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47331         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47332       new_path="$path"
47333 
47334   windows_path="$new_path"
47335   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47336     unix_path=`$CYGPATH -u "$windows_path"`
47337     new_path="$unix_path"
47338   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47339     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47340     new_path="$unix_path"
47341   fi
47342 
47343     fi
47344 
47345     if test "x$new_path" = x; then
47346       # It's still not found. Now this is an unrecoverable error.
47347       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47348 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47349       has_space=`$ECHO "$complete" | $GREP " "`
47350       if test "x$has_space" != x; then
47351         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47352 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47353       fi
47354       as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47355     fi
47356   fi
47357 
47358   # Now new_path has a complete unix path to the binary
47359   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47360     # Keep paths in /bin as-is, but remove trailing .exe if any
47361     new_path="${new_path/%.exe/}"
47362     # Do not save /bin paths to all_fixpath_prefixes!
47363   else
47364     # Not in mixed or Windows style, start by that.
47365     new_path=`cmd //c echo $new_path`
47366 
47367   input_path="$new_path"
47368   # Check if we need to convert this using DOS-style short mode. If the path
47369   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47370   # take no chances and rewrite it.
47371   # Note: m4 eats our [], so we need to use [ and ] instead.
47372   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47373   if test "x$has_forbidden_chars" != x; then
47374     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47375     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47376   fi
47377 
47378     # Output is in $new_path
47379 
47380   windows_path="$new_path"
47381   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47382     unix_path=`$CYGPATH -u "$windows_path"`
47383     new_path="$unix_path"
47384   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47385     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47386     new_path="$unix_path"
47387   fi
47388 
47389     # remove trailing .exe if any
47390     new_path="${new_path/%.exe/}"
47391 
47392     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47393     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47394   fi
47395 
47396     else
47397       # We're on a unix platform. Hooray! :)
47398       # First separate the path from the arguments. This will split at the first
47399       # space.
47400       complete="$BUILD_OBJCOPY"
47401       path="${complete%% *}"
47402       tmp="$complete EOL"
47403       arguments="${tmp#* }"
47404 
47405       # Cannot rely on the command "which" here since it doesn't always work.
47406       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47407       if test -z "$is_absolute_path"; then
47408         # Path to executable is not absolute. Find it.
47409         IFS_save="$IFS"
47410         IFS=:
47411         for p in $PATH; do
47412           if test -f "$p/$path" && test -x "$p/$path"; then
47413             new_path="$p/$path"
47414             break
47415           fi
47416         done
47417         IFS="$IFS_save"
47418       else
47419         # This is an absolute path, we can use it without further modifications.
47420         new_path="$path"
47421       fi
47422 
47423       if test "x$new_path" = x; then
47424         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
47425 $as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
47426         has_space=`$ECHO "$complete" | $GREP " "`
47427         if test "x$has_space" != x; then
47428           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47429 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47430         fi
47431         as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
47432       fi
47433     fi
47434 
47435     # Now join together the path and the arguments once again
47436     if test "x$arguments" != xEOL; then
47437       new_complete="$new_path ${arguments% *}"
47438     else
47439       new_complete="$new_path"
47440     fi
47441 
47442     if test "x$complete" != "x$new_complete"; then
47443       BUILD_OBJCOPY="$new_complete"
47444       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
47445 $as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
47446     fi
47447   fi
47448 
47449 
47450 
47451   # Publish this variable in the help.
47452 
47453 
47454   if [ -z "${BUILD_STRIP+x}" ]; then
47455     # The variable is not set by user, try to locate tool using the code snippet
47456     for ac_prog in strip
47457 do
47458   # Extract the first word of "$ac_prog", so it can be a program name with args.
47459 set dummy $ac_prog; ac_word=$2
47460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47461 $as_echo_n "checking for $ac_word... " >&6; }
47462 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47463   $as_echo_n "(cached) " >&6
47464 else
47465   case $BUILD_STRIP in
47466   [\\/]* | ?:[\\/]*)
47467   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47468   ;;
47469   *)
47470   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47471 for as_dir in $PATH
47472 do
47473   IFS=$as_save_IFS
47474   test -z "$as_dir" && as_dir=.
47475     for ac_exec_ext in '' $ac_executable_extensions; do
47476   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47477     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47478     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47479     break 2
47480   fi
47481 done
47482   done
47483 IFS=$as_save_IFS
47484 
47485   ;;
47486 esac
47487 fi
47488 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47489 if test -n "$BUILD_STRIP"; then
47490   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47491 $as_echo "$BUILD_STRIP" >&6; }
47492 else
47493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47494 $as_echo "no" >&6; }
47495 fi
47496 
47497 
47498   test -n "$BUILD_STRIP" && break
47499 done
47500 
47501   else
47502     # The variable is set, but is it from the command line or the environment?
47503 
47504     # Try to remove the string !BUILD_STRIP! from our list.
47505     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
47506     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47507       # If it failed, the variable was not from the command line. Ignore it,
47508       # but warn the user (except for BASH, which is always set by the calling BASH).
47509       if test "xBUILD_STRIP" != xBASH; then
47510         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
47511 $as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
47512       fi
47513       # Try to locate tool using the code snippet
47514       for ac_prog in strip
47515 do
47516   # Extract the first word of "$ac_prog", so it can be a program name with args.
47517 set dummy $ac_prog; ac_word=$2
47518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47519 $as_echo_n "checking for $ac_word... " >&6; }
47520 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47521   $as_echo_n "(cached) " >&6
47522 else
47523   case $BUILD_STRIP in
47524   [\\/]* | ?:[\\/]*)
47525   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47526   ;;
47527   *)
47528   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47529 for as_dir in $PATH
47530 do
47531   IFS=$as_save_IFS
47532   test -z "$as_dir" && as_dir=.
47533     for ac_exec_ext in '' $ac_executable_extensions; do
47534   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47535     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47536     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47537     break 2
47538   fi
47539 done
47540   done
47541 IFS=$as_save_IFS
47542 
47543   ;;
47544 esac
47545 fi
47546 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47547 if test -n "$BUILD_STRIP"; then
47548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47549 $as_echo "$BUILD_STRIP" >&6; }
47550 else
47551   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47552 $as_echo "no" >&6; }
47553 fi
47554 
47555 
47556   test -n "$BUILD_STRIP" && break
47557 done
47558 
47559     else
47560       # If it succeeded, then it was overridden by the user. We will use it
47561       # for the tool.
47562 
47563       # First remove it from the list of overridden variables, so we can test
47564       # for unknown variables in the end.
47565       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47566 
47567       # Check if we try to supply an empty value
47568       if test "x$BUILD_STRIP" = x; then
47569         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47570 $as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47571         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47572 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47573         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47574 $as_echo "disabled" >&6; }
47575       else
47576         # Check if the provided tool contains a complete path.
47577         tool_specified="$BUILD_STRIP"
47578         tool_basename="${tool_specified##*/}"
47579         if test "x$tool_basename" = "x$tool_specified"; then
47580           # A command without a complete path is provided, search $PATH.
47581           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47582 $as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47583           # Extract the first word of "$tool_basename", so it can be a program name with args.
47584 set dummy $tool_basename; ac_word=$2
47585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47586 $as_echo_n "checking for $ac_word... " >&6; }
47587 if ${ac_cv_path_BUILD_STRIP+:} false; then :
47588   $as_echo_n "(cached) " >&6
47589 else
47590   case $BUILD_STRIP in
47591   [\\/]* | ?:[\\/]*)
47592   ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47593   ;;
47594   *)
47595   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47596 for as_dir in $PATH
47597 do
47598   IFS=$as_save_IFS
47599   test -z "$as_dir" && as_dir=.
47600     for ac_exec_ext in '' $ac_executable_extensions; do
47601   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47602     ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47603     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47604     break 2
47605   fi
47606 done
47607   done
47608 IFS=$as_save_IFS
47609 
47610   ;;
47611 esac
47612 fi
47613 BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47614 if test -n "$BUILD_STRIP"; then
47615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47616 $as_echo "$BUILD_STRIP" >&6; }
47617 else
47618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47619 $as_echo "no" >&6; }
47620 fi
47621 
47622 
47623           if test "x$BUILD_STRIP" = x; then
47624             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47625           fi
47626         else
47627           # Otherwise we believe it is a complete path. Use it as it is.
47628           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47629 $as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47630           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47631 $as_echo_n "checking for BUILD_STRIP... " >&6; }
47632           if test ! -x "$tool_specified"; then
47633             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47634 $as_echo "not found" >&6; }
47635             as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47636           fi
47637           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47638 $as_echo "$tool_specified" >&6; }
47639         fi
47640       fi
47641     fi
47642 
47643   fi
47644 
47645 
47646 
47647   # Only process if variable expands to non-empty
47648 
47649   if test "x$BUILD_STRIP" != x; then
47650     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47651 
47652   # First separate the path from the arguments. This will split at the first
47653   # space.
47654   complete="$BUILD_STRIP"
47655   path="${complete%% *}"
47656   tmp="$complete EOL"
47657   arguments="${tmp#* }"
47658 
47659   # Input might be given as Windows format, start by converting to
47660   # unix format.
47661   new_path=`$CYGPATH -u "$path"`
47662 
47663   # Now try to locate executable using which
47664   new_path=`$WHICH "$new_path" 2> /dev/null`
47665   # bat and cmd files are not always considered executable in cygwin causing which
47666   # to not find them
47667   if test "x$new_path" = x \
47668       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47669       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47670     new_path=`$CYGPATH -u "$path"`
47671   fi
47672   if test "x$new_path" = x; then
47673     # Oops. Which didn't find the executable.
47674     # The splitting of arguments from the executable at a space might have been incorrect,
47675     # since paths with space are more likely in Windows. Give it another try with the whole
47676     # argument.
47677     path="$complete"
47678     arguments="EOL"
47679     new_path=`$CYGPATH -u "$path"`
47680     new_path=`$WHICH "$new_path" 2> /dev/null`
47681     # bat and cmd files are not always considered executable in cygwin causing which
47682     # to not find them
47683     if test "x$new_path" = x \
47684         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47685         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47686       new_path=`$CYGPATH -u "$path"`
47687     fi
47688     if test "x$new_path" = x; then
47689       # It's still not found. Now this is an unrecoverable error.
47690       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47691 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47692       has_space=`$ECHO "$complete" | $GREP " "`
47693       if test "x$has_space" != x; then
47694         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47695 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47696       fi
47697       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47698     fi
47699   fi
47700 
47701   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47702   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47703   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47704   # "foo.exe" is OK but "foo" is an error.
47705   #
47706   # This test is therefore slightly more accurate than "test -f" to check for file presence.
47707   # It is also a way to make sure we got the proper file name for the real test later on.
47708   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47709   if test "x$test_shortpath" = x; then
47710     # Short path failed, file does not exist as specified.
47711     # Try adding .exe or .cmd
47712     if test -f "${new_path}.exe"; then
47713       input_to_shortpath="${new_path}.exe"
47714     elif test -f "${new_path}.cmd"; then
47715       input_to_shortpath="${new_path}.cmd"
47716     else
47717       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47718 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47719       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47720 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47721       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47722     fi
47723   else
47724     input_to_shortpath="$new_path"
47725   fi
47726 
47727   # Call helper function which possibly converts this using DOS-style short mode.
47728   # If so, the updated path is stored in $new_path.
47729   new_path="$input_to_shortpath"
47730 
47731   input_path="$input_to_shortpath"
47732   # Check if we need to convert this using DOS-style short mode. If the path
47733   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47734   # take no chances and rewrite it.
47735   # Note: m4 eats our [], so we need to use [ and ] instead.
47736   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47737   if test "x$has_forbidden_chars" != x; then
47738     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47739     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47740     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47741     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47742       # Going to short mode and back again did indeed matter. Since short mode is
47743       # case insensitive, let's make it lowercase to improve readability.
47744       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47745       # Now convert it back to Unix-style (cygpath)
47746       input_path=`$CYGPATH -u "$shortmode_path"`
47747       new_path="$input_path"
47748     fi
47749   fi
47750 
47751   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47752   if test "x$test_cygdrive_prefix" = x; then
47753     # As a simple fix, exclude /usr/bin since it's not a real path.
47754     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47755       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47756       # a path prefixed by /cygdrive for fixpath to work.
47757       new_path="$CYGWIN_ROOT_PATH$input_path"
47758     fi
47759   fi
47760 
47761   # remove trailing .exe if any
47762   new_path="${new_path/%.exe/}"
47763 
47764     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47765 
47766   # First separate the path from the arguments. This will split at the first
47767   # space.
47768   complete="$BUILD_STRIP"
47769   path="${complete%% *}"
47770   tmp="$complete EOL"
47771   arguments="${tmp#* }"
47772 
47773   # Input might be given as Windows format, start by converting to
47774   # unix format.
47775   new_path="$path"
47776 
47777   windows_path="$new_path"
47778   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47779     unix_path=`$CYGPATH -u "$windows_path"`
47780     new_path="$unix_path"
47781   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47782     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47783     new_path="$unix_path"
47784   fi
47785 
47786 
47787   # Now try to locate executable using which
47788   new_path=`$WHICH "$new_path" 2> /dev/null`
47789 
47790   if test "x$new_path" = x; then
47791     # Oops. Which didn't find the executable.
47792     # The splitting of arguments from the executable at a space might have been incorrect,
47793     # since paths with space are more likely in Windows. Give it another try with the whole
47794     # argument.
47795     path="$complete"
47796     arguments="EOL"
47797     new_path="$path"
47798 
47799   windows_path="$new_path"
47800   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47801     unix_path=`$CYGPATH -u "$windows_path"`
47802     new_path="$unix_path"
47803   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47804     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47805     new_path="$unix_path"
47806   fi
47807 
47808 
47809     new_path=`$WHICH "$new_path" 2> /dev/null`
47810     # bat and cmd files are not always considered executable in MSYS causing which
47811     # to not find them
47812     if test "x$new_path" = x \
47813         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47814         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47815       new_path="$path"
47816 
47817   windows_path="$new_path"
47818   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47819     unix_path=`$CYGPATH -u "$windows_path"`
47820     new_path="$unix_path"
47821   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47822     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47823     new_path="$unix_path"
47824   fi
47825 
47826     fi
47827 
47828     if test "x$new_path" = x; then
47829       # It's still not found. Now this is an unrecoverable error.
47830       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47831 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47832       has_space=`$ECHO "$complete" | $GREP " "`
47833       if test "x$has_space" != x; then
47834         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47835 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47836       fi
47837       as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47838     fi
47839   fi
47840 
47841   # Now new_path has a complete unix path to the binary
47842   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47843     # Keep paths in /bin as-is, but remove trailing .exe if any
47844     new_path="${new_path/%.exe/}"
47845     # Do not save /bin paths to all_fixpath_prefixes!
47846   else
47847     # Not in mixed or Windows style, start by that.
47848     new_path=`cmd //c echo $new_path`
47849 
47850   input_path="$new_path"
47851   # Check if we need to convert this using DOS-style short mode. If the path
47852   # contains just simple characters, use it. Otherwise (spaces, weird characters),
47853   # take no chances and rewrite it.
47854   # Note: m4 eats our [], so we need to use [ and ] instead.
47855   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47856   if test "x$has_forbidden_chars" != x; then
47857     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47858     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47859   fi
47860 
47861     # Output is in $new_path
47862 
47863   windows_path="$new_path"
47864   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47865     unix_path=`$CYGPATH -u "$windows_path"`
47866     new_path="$unix_path"
47867   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47868     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47869     new_path="$unix_path"
47870   fi
47871 
47872     # remove trailing .exe if any
47873     new_path="${new_path/%.exe/}"
47874 
47875     # Save the first 10 bytes of this path to the storage, so fixpath can work.
47876     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47877   fi
47878 
47879     else
47880       # We're on a unix platform. Hooray! :)
47881       # First separate the path from the arguments. This will split at the first
47882       # space.
47883       complete="$BUILD_STRIP"
47884       path="${complete%% *}"
47885       tmp="$complete EOL"
47886       arguments="${tmp#* }"
47887 
47888       # Cannot rely on the command "which" here since it doesn't always work.
47889       is_absolute_path=`$ECHO "$path" | $GREP ^/`
47890       if test -z "$is_absolute_path"; then
47891         # Path to executable is not absolute. Find it.
47892         IFS_save="$IFS"
47893         IFS=:
47894         for p in $PATH; do
47895           if test -f "$p/$path" && test -x "$p/$path"; then
47896             new_path="$p/$path"
47897             break
47898           fi
47899         done
47900         IFS="$IFS_save"
47901       else
47902         # This is an absolute path, we can use it without further modifications.
47903         new_path="$path"
47904       fi
47905 
47906       if test "x$new_path" = x; then
47907         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47908 $as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47909         has_space=`$ECHO "$complete" | $GREP " "`
47910         if test "x$has_space" != x; then
47911           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47912 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47913         fi
47914         as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47915       fi
47916     fi
47917 
47918     # Now join together the path and the arguments once again
47919     if test "x$arguments" != xEOL; then
47920       new_complete="$new_path ${arguments% *}"
47921     else
47922       new_complete="$new_path"
47923     fi
47924 
47925     if test "x$complete" != "x$new_complete"; then
47926       BUILD_STRIP="$new_complete"
47927       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47928 $as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47929     fi
47930   fi
47931 
47932     # Assume the C compiler is the assembler
47933     BUILD_AS="$BUILD_CC -c"
47934     # Just like for the target compiler, use the compiler as linker
47935     BUILD_LD="$BUILD_CC"
47936     BUILD_LDCXX="$BUILD_CXX"
47937 
47938     PATH="$OLDPATH"
47939 
47940 
47941   COMPILER=$BUILD_CC
47942   COMPILER_NAME=BuildC
47943 
47944   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47945     # cc -V output typically looks like
47946     #     cc: Sun C 5.12 Linux_i386 2011/11/16
47947     # or
47948     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47949     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47950     # Check that this is likely to be the Solaris Studio cc.
47951     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47952     if test $? -ne 0; then
47953       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47954       { $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
47955 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47956       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47957 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47958       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47959 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47960       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47961     fi
47962     # Remove usage instructions (if present), and
47963     # collapse compiler output into a single line
47964     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47965         $SED -e 's/ *[Uu]sage:.*//'`
47966     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47967         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47968   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47969     # xlc -qversion output typically looks like
47970     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47971     #     Version: 11.01.0000.0015
47972     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47973     # Check that this is likely to be the IBM XL C compiler.
47974     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47975     if test $? -ne 0; then
47976       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47977       { $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
47978 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47979       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47980 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47981       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47982 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47983       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47984     fi
47985     # Collapse compiler output into a single line
47986     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47987     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47988         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47989   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47990     # There is no specific version flag, but all output starts with a version string.
47991     # First line typically looks something like:
47992     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47993     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47994     # Check that this is likely to be Microsoft CL.EXE.
47995     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47996     if test $? -ne 0; then
47997       { $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
47998 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47999       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48000 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48001       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48002     fi
48003     # Collapse compiler output into a single line
48004     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48005     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48006         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48007   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48008     # gcc --version output typically looks like
48009     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48010     #     Copyright (C) 2013 Free Software Foundation, Inc.
48011     #     This is free software; see the source for copying conditions.  There is NO
48012     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48013     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48014     # Check that this is likely to be GCC.
48015     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48016     if test $? -ne 0; then
48017       { $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
48018 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48019       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48020 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48021       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48022     fi
48023     # Remove Copyright and legalese from version string, and
48024     # collapse into a single line
48025     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48026         $SED -e 's/ *Copyright .*//'`
48027     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48028         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48029   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48030     # clang --version output typically looks like
48031     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48032     #    clang version 3.3 (tags/RELEASE_33/final)
48033     # or
48034     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48035     #    Target: x86_64-pc-linux-gnu
48036     #    Thread model: posix
48037     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48038     # Check that this is likely to be clang
48039     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48040     if test $? -ne 0; then
48041       { $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
48042 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48043       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48044 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48045       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48046     fi
48047     # Collapse compiler output into a single line
48048     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48049     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48050         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48051   else
48052       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48053   fi
48054   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48055   BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48056   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48057   BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
48058 
48059   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48060 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48061 
48062 
48063   COMPILER=$BUILD_CXX
48064   COMPILER_NAME=BuildC++
48065 
48066   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48067     # cc -V output typically looks like
48068     #     cc: Sun C 5.12 Linux_i386 2011/11/16
48069     # or
48070     #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
48071     COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
48072     # Check that this is likely to be the Solaris Studio cc.
48073     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
48074     if test $? -ne 0; then
48075       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48076       { $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
48077 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48078       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48079 $as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48080       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48081 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48082       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48083     fi
48084     # Remove usage instructions (if present), and
48085     # collapse compiler output into a single line
48086     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48087         $SED -e 's/ *[Uu]sage:.*//'`
48088     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48089         $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
48090   elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
48091     # xlc -qversion output typically looks like
48092     #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
48093     #     Version: 11.01.0000.0015
48094     COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
48095     # Check that this is likely to be the IBM XL C compiler.
48096     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
48097     if test $? -ne 0; then
48098       ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48099       { $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
48100 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48101       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48102 $as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48103       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
48104 $as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
48105       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48106     fi
48107     # Collapse compiler output into a single line
48108     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48109     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48110         $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
48111   elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48112     # There is no specific version flag, but all output starts with a version string.
48113     # First line typically looks something like:
48114     # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
48115     COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48116     # Check that this is likely to be Microsoft CL.EXE.
48117     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
48118     if test $? -ne 0; then
48119       { $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
48120 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48121       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48122 $as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48123       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48124     fi
48125     # Collapse compiler output into a single line
48126     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48127     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48128         $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
48129   elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
48130     # gcc --version output typically looks like
48131     #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
48132     #     Copyright (C) 2013 Free Software Foundation, Inc.
48133     #     This is free software; see the source for copying conditions.  There is NO
48134     #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
48135     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48136     # Check that this is likely to be GCC.
48137     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
48138     if test $? -ne 0; then
48139       { $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
48140 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48141       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
48142 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
48143       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48144     fi
48145     # Remove Copyright and legalese from version string, and
48146     # collapse into a single line
48147     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
48148         $SED -e 's/ *Copyright .*//'`
48149     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48150         $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
48151   elif test  "x$TOOLCHAIN_TYPE" = xclang; then
48152     # clang --version output typically looks like
48153     #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
48154     #    clang version 3.3 (tags/RELEASE_33/final)
48155     # or
48156     #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
48157     #    Target: x86_64-pc-linux-gnu
48158     #    Thread model: posix
48159     COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
48160     # Check that this is likely to be clang
48161     $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
48162     if test $? -ne 0; then
48163       { $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
48164 $as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
48165       { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
48166 $as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
48167       as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
48168     fi
48169     # Collapse compiler output into a single line
48170     COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
48171     COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
48172         $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
48173   else
48174       as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
48175   fi
48176   # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
48177   BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
48178   # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
48179   BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
48180 
48181   { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
48182 $as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
48183 
48184 
48185   if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
48186     { $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
48187 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
48188     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48189 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48190   fi
48191 
48192   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48193   if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48194     { $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
48195 $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;}
48196   fi
48197 
48198   if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48199     { $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
48200 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48201   fi
48202 
48203   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
48204 
48205   else
48206     # If we are not cross compiling, use the normal target compilers for
48207     # building the build platform executables.
48208     BUILD_CC="$CC"
48209     BUILD_CXX="$CXX"
48210     BUILD_LD="$LD"
48211     BUILD_LDCXX="$LDCXX"
48212     BUILD_NM="$NM"
48213     BUILD_AS="$AS"
48214     BUILD_OBJCOPY="$OBJCOPY"
48215     BUILD_STRIP="$STRIP"
48216     BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
48217     BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
48218     BUILD_AR="$AR"
48219 
48220 
48221   if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
48222     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
48223 $as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
48224     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
48225 $as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
48226   fi
48227 
48228   # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
48229   if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
48230     { $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
48231 $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;}
48232   fi
48233 
48234   if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
48235     { $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
48236 $as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
48237   fi
48238 
48239   OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
48240 
48241   fi
48242 
48243 
48244 
48245 
48246 
48247 
48248 
48249 
48250 
48251 
48252 
48253 
48254 
48255 
48256   # The package path is used only on macosx?
48257   # FIXME: clean this up, and/or move it elsewhere.
48258   PACKAGE_PATH=/opt/local
48259 
48260 
48261   # Check for extra potential brokenness.
48262   if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48263     # On Windows, double-check that we got the right compiler.
48264     CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
48265     COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
48266     if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
48267       if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
48268         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
48269       fi
48270     elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
48271       if test "x$COMPILER_CPU_TEST" != "xx64"; then
48272         as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
48273       fi
48274     fi
48275   fi
48276 
48277   if test "x$TOOLCHAIN_TYPE" = xgcc; then
48278     # If this is a --hash-style=gnu system, use --hash-style=both, why?
48279     HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
48280     # This is later checked when setting flags.
48281 
48282     # "-Og" suppported for GCC 4.8 and later
48283     CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
48284 
48285 
48286 
48287 
48288 
48289 
48290 
48291 
48292 
48293 
48294 
48295 
48296 
48297 
48298 
48299 
48300 
48301 
48302 
48303 
48304 
48305 
48306 
48307 
48308 
48309 
48310 
48311 
48312 
48313 
48314 
48315 
48316 
48317 
48318 
48319 
48320 
48321 
48322 
48323 
48324 
48325 
48326 
48327 
48328 
48329 
48330 
48331     # Execute function body
48332 
48333 
48334 
48335 
48336 
48337 
48338 
48339 
48340 
48341 
48342 
48343 
48344 
48345 
48346 
48347 
48348 
48349 
48350 
48351 
48352 
48353 
48354 
48355 
48356 
48357 
48358 
48359 
48360 
48361 
48362 
48363 
48364 
48365 
48366 
48367 
48368 
48369 
48370 
48371 
48372 
48373 
48374 
48375 
48376 
48377 
48378 
48379 
48380     # Execute function body
48381 
48382   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48383 $as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48384   supports=yes
48385 
48386   saved_cflags="$CFLAGS"
48387   CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
48388   ac_ext=c
48389 ac_cpp='$CPP $CPPFLAGS'
48390 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48391 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48393 
48394   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48395 /* end confdefs.h.  */
48396 int i;
48397 _ACEOF
48398 if ac_fn_c_try_compile "$LINENO"; then :
48399 
48400 else
48401   supports=no
48402 fi
48403 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48404   ac_ext=cpp
48405 ac_cpp='$CXXCPP $CPPFLAGS'
48406 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48407 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48408 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48409 
48410   CFLAGS="$saved_cflags"
48411 
48412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48413 $as_echo "$supports" >&6; }
48414   if test "x$supports" = "xyes" ; then
48415     :
48416     C_COMP_SUPPORTS="yes"
48417   else
48418     :
48419     C_COMP_SUPPORTS="no"
48420   fi
48421 
48422 
48423 
48424 
48425 
48426 
48427 
48428 
48429 
48430 
48431 
48432 
48433 
48434 
48435 
48436 
48437 
48438 
48439 
48440 
48441 
48442 
48443 
48444 
48445 
48446 
48447 
48448 
48449 
48450 
48451 
48452 
48453 
48454 
48455 
48456 
48457 
48458 
48459 
48460 
48461 
48462 
48463 
48464 
48465 
48466 
48467 
48468 
48469 
48470 
48471 
48472 
48473 
48474 
48475 
48476 
48477 
48478 
48479 
48480     # Execute function body
48481 
48482   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48483 $as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48484   supports=yes
48485 
48486   saved_cxxflags="$CXXFLAGS"
48487   CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
48488   ac_ext=cpp
48489 ac_cpp='$CXXCPP $CPPFLAGS'
48490 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48491 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48492 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48493 
48494   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48495 /* end confdefs.h.  */
48496 int i;
48497 _ACEOF
48498 if ac_fn_cxx_try_compile "$LINENO"; then :
48499 
48500 else
48501   supports=no
48502 fi
48503 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48504   ac_ext=cpp
48505 ac_cpp='$CXXCPP $CPPFLAGS'
48506 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48507 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48508 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48509 
48510   CXXFLAGS="$saved_cxxflags"
48511 
48512   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48513 $as_echo "$supports" >&6; }
48514   if test "x$supports" = "xyes" ; then
48515     :
48516     CXX_COMP_SUPPORTS="yes"
48517   else
48518     :
48519     CXX_COMP_SUPPORTS="no"
48520   fi
48521 
48522 
48523 
48524 
48525 
48526 
48527 
48528 
48529 
48530 
48531 
48532 
48533 
48534   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
48535 $as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
48536   supports=no
48537   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
48538 
48539   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48540 $as_echo "$supports" >&6; }
48541   if test "x$supports" = "xyes" ; then
48542     :
48543     HAS_CFLAG_OPTIMIZE_DEBUG=true
48544   else
48545     :
48546     HAS_CFLAG_OPTIMIZE_DEBUG=false
48547   fi
48548 
48549 
48550 
48551 
48552 
48553 
48554 
48555     # "-z relro" supported in GNU binutils 2.17 and later
48556     LINKER_RELRO_FLAG="-Wl,-z,relro"
48557 
48558 
48559 
48560 
48561 
48562 
48563 
48564 
48565 
48566 
48567 
48568 
48569 
48570 
48571 
48572 
48573 
48574 
48575 
48576 
48577 
48578 
48579 
48580 
48581 
48582 
48583 
48584 
48585 
48586 
48587 
48588 
48589 
48590 
48591 
48592 
48593 
48594 
48595 
48596 
48597 
48598 
48599 
48600 
48601 
48602 
48603 
48604     # Execute function body
48605 
48606   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48607 $as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48608   supports=yes
48609 
48610   saved_ldflags="$LDFLAGS"
48611   LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48612   ac_ext=c
48613 ac_cpp='$CPP $CPPFLAGS'
48614 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48615 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48616 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48617 
48618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48619 /* end confdefs.h.  */
48620 
48621 int
48622 main ()
48623 {
48624 
48625   ;
48626   return 0;
48627 }
48628 _ACEOF
48629 if ac_fn_c_try_link "$LINENO"; then :
48630 
48631 else
48632   supports=no
48633 fi
48634 rm -f core conftest.err conftest.$ac_objext \
48635     conftest$ac_exeext conftest.$ac_ext
48636   ac_ext=cpp
48637 ac_cpp='$CXXCPP $CPPFLAGS'
48638 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48639 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48640 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48641 
48642   LDFLAGS="$saved_ldflags"
48643 
48644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48645 $as_echo "$supports" >&6; }
48646   if test "x$supports" = "xyes" ; then
48647     :
48648     HAS_LINKER_RELRO=true
48649   else
48650     :
48651     HAS_LINKER_RELRO=false
48652   fi
48653 
48654 
48655 
48656 
48657 
48658 
48659 
48660 
48661 
48662 
48663 
48664 
48665 
48666     # "-z now" supported in GNU binutils 2.11 and later
48667     LINKER_NOW_FLAG="-Wl,-z,now"
48668 
48669 
48670 
48671 
48672 
48673 
48674 
48675 
48676 
48677 
48678 
48679 
48680 
48681 
48682 
48683 
48684 
48685 
48686 
48687 
48688 
48689 
48690 
48691 
48692 
48693 
48694 
48695 
48696 
48697 
48698 
48699 
48700 
48701 
48702 
48703 
48704 
48705 
48706 
48707 
48708 
48709 
48710 
48711 
48712 
48713 
48714 
48715     # Execute function body
48716 
48717   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48718 $as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48719   supports=yes
48720 
48721   saved_ldflags="$LDFLAGS"
48722   LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48723   ac_ext=c
48724 ac_cpp='$CPP $CPPFLAGS'
48725 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48726 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48727 ac_compiler_gnu=$ac_cv_c_compiler_gnu
48728 
48729   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48730 /* end confdefs.h.  */
48731 
48732 int
48733 main ()
48734 {
48735 
48736   ;
48737   return 0;
48738 }
48739 _ACEOF
48740 if ac_fn_c_try_link "$LINENO"; then :
48741 
48742 else
48743   supports=no
48744 fi
48745 rm -f core conftest.err conftest.$ac_objext \
48746     conftest$ac_exeext conftest.$ac_ext
48747   ac_ext=cpp
48748 ac_cpp='$CXXCPP $CPPFLAGS'
48749 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48750 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48751 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48752 
48753   LDFLAGS="$saved_ldflags"
48754 
48755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48756 $as_echo "$supports" >&6; }
48757   if test "x$supports" = "xyes" ; then
48758     :
48759     HAS_LINKER_NOW=true
48760   else
48761     :
48762     HAS_LINKER_NOW=false
48763   fi
48764 
48765 
48766 
48767 
48768 
48769 
48770 
48771 
48772 
48773 
48774 
48775 
48776   fi
48777 
48778   # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48779   # in executable.'
48780   USING_BROKEN_SUSE_LD=no
48781   if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48782     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48783 $as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48784     $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48785     $ECHO "int main() { }" > main.c
48786     if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48787       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48788 $as_echo "no" >&6; }
48789       USING_BROKEN_SUSE_LD=no
48790     else
48791       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48792 $as_echo "yes" >&6; }
48793       USING_BROKEN_SUSE_LD=yes
48794     fi
48795     $RM version-script.map main.c a.out
48796   fi
48797 
48798 
48799   # Setup hotspot lecagy names for toolchains
48800   HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48801   if test "x$TOOLCHAIN_TYPE" = xclang; then
48802     HOTSPOT_TOOLCHAIN_TYPE=gcc
48803   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48804     HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48805   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48806     HOTSPOT_TOOLCHAIN_TYPE=visCPP
48807   fi
48808 
48809 
48810 
48811 # Setup the JTReg Regression Test Harness.
48812 
48813 
48814 # Check whether --with-jtreg was given.
48815 if test "${with_jtreg+set}" = set; then :
48816   withval=$with_jtreg;
48817 fi
48818 
48819 
48820   if test "x$with_jtreg" = xno; then
48821     # jtreg disabled
48822     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48823 $as_echo_n "checking for jtreg test harness... " >&6; }
48824     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabled" >&5
48825 $as_echo "no, disabled" >&6; }
48826   elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
48827     # An explicit path is specified, use it.
48828     JT_HOME="$with_jtreg"
48829     if test ! -d "$JT_HOME"; then
48830       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not exist" "$LINENO" 5
48831     fi
48832 
48833     if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48834       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home" "$LINENO" 5
48835     fi
48836 
48837     JTREGEXE="$JT_HOME/bin/jtreg"
48838     if test ! -x "$JTREGEXE"; then
48839       as_fn_error $? "jtreg home directory from --with-jtreg=$with_jtreg does not contain valid jtreg executable" "$LINENO" 5
48840     fi
48841 
48842     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
48843 $as_echo_n "checking for jtreg test harness... " >&6; }
48844     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
48845 $as_echo "$JT_HOME" >&6; }
48846   else
48847     # Try to locate jtreg
48848     if test "x$JT_HOME" != x; then
48849       # JT_HOME set in environment, use it
48850       if test ! -d "$JT_HOME"; then
48851         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&5
48852 $as_echo "$as_me: WARNING: Ignoring JT_HOME pointing to invalid directory: $JT_HOME" >&2;}
48853         JT_HOME=
48854       else
48855         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
48856           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&5
48857 $as_echo "$as_me: WARNING: Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME" >&2;}
48858           JT_HOME=
48859         elif test ! -x "$JT_HOME/bin/jtreg"; then
48860           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&5
48861 $as_echo "$as_me: WARNING: Ignoring JT_HOME which does not contain valid jtreg executable: $JT_HOME" >&2;}
48862           JT_HOME=
48863         else
48864           JTREGEXE="$JT_HOME/bin/jtreg"
48865           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using JT_HOME from environment" >&5
48866 $as_echo "$as_me: Located jtreg using JT_HOME from environment" >&6;}
48867         fi
48868       fi
48869     fi
48870 
48871     if test "x$JT_HOME" = x; then
48872       # JT_HOME is not set in environment, or was deemed invalid.
48873       # Try to find jtreg on path
48874 
48875 
48876   # Publish this variable in the help.
48877 
48878 
48879   if [ -z "${JTREGEXE+x}" ]; then
48880     # The variable is not set by user, try to locate tool using the code snippet
48881     for ac_prog in jtreg
48882 do
48883   # Extract the first word of "$ac_prog", so it can be a program name with args.
48884 set dummy $ac_prog; ac_word=$2
48885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48886 $as_echo_n "checking for $ac_word... " >&6; }
48887 if ${ac_cv_path_JTREGEXE+:} false; then :
48888   $as_echo_n "(cached) " >&6
48889 else
48890   case $JTREGEXE in
48891   [\\/]* | ?:[\\/]*)
48892   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48893   ;;
48894   *)
48895   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48896 for as_dir in $PATH
48897 do
48898   IFS=$as_save_IFS
48899   test -z "$as_dir" && as_dir=.
48900     for ac_exec_ext in '' $ac_executable_extensions; do
48901   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48902     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48903     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48904     break 2
48905   fi
48906 done
48907   done
48908 IFS=$as_save_IFS
48909 
48910   ;;
48911 esac
48912 fi
48913 JTREGEXE=$ac_cv_path_JTREGEXE
48914 if test -n "$JTREGEXE"; then
48915   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48916 $as_echo "$JTREGEXE" >&6; }
48917 else
48918   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48919 $as_echo "no" >&6; }
48920 fi
48921 
48922 
48923   test -n "$JTREGEXE" && break
48924 done
48925 
48926   else
48927     # The variable is set, but is it from the command line or the environment?
48928 
48929     # Try to remove the string !JTREGEXE! from our list.
48930     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48931     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48932       # If it failed, the variable was not from the command line. Ignore it,
48933       # but warn the user (except for BASH, which is always set by the calling BASH).
48934       if test "xJTREGEXE" != xBASH; then
48935         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48936 $as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48937       fi
48938       # Try to locate tool using the code snippet
48939       for ac_prog in jtreg
48940 do
48941   # Extract the first word of "$ac_prog", so it can be a program name with args.
48942 set dummy $ac_prog; ac_word=$2
48943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48944 $as_echo_n "checking for $ac_word... " >&6; }
48945 if ${ac_cv_path_JTREGEXE+:} false; then :
48946   $as_echo_n "(cached) " >&6
48947 else
48948   case $JTREGEXE in
48949   [\\/]* | ?:[\\/]*)
48950   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48951   ;;
48952   *)
48953   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48954 for as_dir in $PATH
48955 do
48956   IFS=$as_save_IFS
48957   test -z "$as_dir" && as_dir=.
48958     for ac_exec_ext in '' $ac_executable_extensions; do
48959   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48960     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48961     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48962     break 2
48963   fi
48964 done
48965   done
48966 IFS=$as_save_IFS
48967 
48968   ;;
48969 esac
48970 fi
48971 JTREGEXE=$ac_cv_path_JTREGEXE
48972 if test -n "$JTREGEXE"; then
48973   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48974 $as_echo "$JTREGEXE" >&6; }
48975 else
48976   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48977 $as_echo "no" >&6; }
48978 fi
48979 
48980 
48981   test -n "$JTREGEXE" && break
48982 done
48983 
48984     else
48985       # If it succeeded, then it was overridden by the user. We will use it
48986       # for the tool.
48987 
48988       # First remove it from the list of overridden variables, so we can test
48989       # for unknown variables in the end.
48990       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48991 
48992       # Check if we try to supply an empty value
48993       if test "x$JTREGEXE" = x; then
48994         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48995 $as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48996         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48997 $as_echo_n "checking for JTREGEXE... " >&6; }
48998         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48999 $as_echo "disabled" >&6; }
49000       else
49001         # Check if the provided tool contains a complete path.
49002         tool_specified="$JTREGEXE"
49003         tool_basename="${tool_specified##*/}"
49004         if test "x$tool_basename" = "x$tool_specified"; then
49005           # A command without a complete path is provided, search $PATH.
49006           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
49007 $as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
49008           # Extract the first word of "$tool_basename", so it can be a program name with args.
49009 set dummy $tool_basename; ac_word=$2
49010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49011 $as_echo_n "checking for $ac_word... " >&6; }
49012 if ${ac_cv_path_JTREGEXE+:} false; then :
49013   $as_echo_n "(cached) " >&6
49014 else
49015   case $JTREGEXE in
49016   [\\/]* | ?:[\\/]*)
49017   ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
49018   ;;
49019   *)
49020   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49021 for as_dir in $PATH
49022 do
49023   IFS=$as_save_IFS
49024   test -z "$as_dir" && as_dir=.
49025     for ac_exec_ext in '' $ac_executable_extensions; do
49026   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49027     ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
49028     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49029     break 2
49030   fi
49031 done
49032   done
49033 IFS=$as_save_IFS
49034 
49035   ;;
49036 esac
49037 fi
49038 JTREGEXE=$ac_cv_path_JTREGEXE
49039 if test -n "$JTREGEXE"; then
49040   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
49041 $as_echo "$JTREGEXE" >&6; }
49042 else
49043   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49044 $as_echo "no" >&6; }
49045 fi
49046 
49047 
49048           if test "x$JTREGEXE" = x; then
49049             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49050           fi
49051         else
49052           # Otherwise we believe it is a complete path. Use it as it is.
49053           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
49054 $as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
49055           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
49056 $as_echo_n "checking for JTREGEXE... " >&6; }
49057           if test ! -x "$tool_specified"; then
49058             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49059 $as_echo "not found" >&6; }
49060             as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
49061           fi
49062           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49063 $as_echo "$tool_specified" >&6; }
49064         fi
49065       fi
49066     fi
49067 
49068   fi
49069 
49070 
49071       if test "x$JTREGEXE" != x; then
49072         # That's good, now try to derive JT_HOME
49073         JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
49074         if test ! -e "$JT_HOME/lib/jtreg.jar"; then
49075           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&5
49076 $as_echo "$as_me: WARNING: Ignoring jtreg from path since a valid jtreg home cannot be found" >&2;}
49077           JT_HOME=
49078           JTREGEXE=
49079         else
49080           { $as_echo "$as_me:${as_lineno-$LINENO}: Located jtreg using jtreg executable in path" >&5
49081 $as_echo "$as_me: Located jtreg using jtreg executable in path" >&6;}
49082         fi
49083       fi
49084     fi
49085 
49086     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg test harness" >&5
49087 $as_echo_n "checking for jtreg test harness... " >&6; }
49088     if test "x$JT_HOME" != x; then
49089       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JT_HOME" >&5
49090 $as_echo "$JT_HOME" >&6; }
49091     else
49092       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found" >&5
49093 $as_echo "no, not found" >&6; }
49094 
49095       if test "x$with_jtreg" = xyes; then
49096         as_fn_error $? "--with-jtreg was specified, but no jtreg found." "$LINENO" 5
49097       fi
49098     fi
49099   fi
49100 
49101 
49102   # Only process if variable expands to non-empty
49103 
49104   if test "x$JTREGEXE" != x; then
49105     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49106 
49107   # First separate the path from the arguments. This will split at the first
49108   # space.
49109   complete="$JTREGEXE"
49110   path="${complete%% *}"
49111   tmp="$complete EOL"
49112   arguments="${tmp#* }"
49113 
49114   # Input might be given as Windows format, start by converting to
49115   # unix format.
49116   new_path=`$CYGPATH -u "$path"`
49117 
49118   # Now try to locate executable using which
49119   new_path=`$WHICH "$new_path" 2> /dev/null`
49120   # bat and cmd files are not always considered executable in cygwin causing which
49121   # to not find them
49122   if test "x$new_path" = x \
49123       && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49124       && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49125     new_path=`$CYGPATH -u "$path"`
49126   fi
49127   if test "x$new_path" = x; then
49128     # Oops. Which didn't find the executable.
49129     # The splitting of arguments from the executable at a space might have been incorrect,
49130     # since paths with space are more likely in Windows. Give it another try with the whole
49131     # argument.
49132     path="$complete"
49133     arguments="EOL"
49134     new_path=`$CYGPATH -u "$path"`
49135     new_path=`$WHICH "$new_path" 2> /dev/null`
49136     # bat and cmd files are not always considered executable in cygwin causing which
49137     # to not find them
49138     if test "x$new_path" = x \
49139         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49140         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49141       new_path=`$CYGPATH -u "$path"`
49142     fi
49143     if test "x$new_path" = x; then
49144       # It's still not found. Now this is an unrecoverable error.
49145       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49146 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49147       has_space=`$ECHO "$complete" | $GREP " "`
49148       if test "x$has_space" != x; then
49149         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49150 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49151       fi
49152       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49153     fi
49154   fi
49155 
49156   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49157   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49158   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49159   # "foo.exe" is OK but "foo" is an error.
49160   #
49161   # This test is therefore slightly more accurate than "test -f" to check for file presence.
49162   # It is also a way to make sure we got the proper file name for the real test later on.
49163   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49164   if test "x$test_shortpath" = x; then
49165     # Short path failed, file does not exist as specified.
49166     # Try adding .exe or .cmd
49167     if test -f "${new_path}.exe"; then
49168       input_to_shortpath="${new_path}.exe"
49169     elif test -f "${new_path}.cmd"; then
49170       input_to_shortpath="${new_path}.cmd"
49171     else
49172       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&5
49173 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$new_path\", is invalid." >&6;}
49174       { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
49175 $as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
49176       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49177     fi
49178   else
49179     input_to_shortpath="$new_path"
49180   fi
49181 
49182   # Call helper function which possibly converts this using DOS-style short mode.
49183   # If so, the updated path is stored in $new_path.
49184   new_path="$input_to_shortpath"
49185 
49186   input_path="$input_to_shortpath"
49187   # Check if we need to convert this using DOS-style short mode. If the path
49188   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49189   # take no chances and rewrite it.
49190   # Note: m4 eats our [], so we need to use [ and ] instead.
49191   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49192   if test "x$has_forbidden_chars" != x; then
49193     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49194     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49195     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49196     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49197       # Going to short mode and back again did indeed matter. Since short mode is
49198       # case insensitive, let's make it lowercase to improve readability.
49199       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49200       # Now convert it back to Unix-style (cygpath)
49201       input_path=`$CYGPATH -u "$shortmode_path"`
49202       new_path="$input_path"
49203     fi
49204   fi
49205 
49206   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49207   if test "x$test_cygdrive_prefix" = x; then
49208     # As a simple fix, exclude /usr/bin since it's not a real path.
49209     if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
49210       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49211       # a path prefixed by /cygdrive for fixpath to work.
49212       new_path="$CYGWIN_ROOT_PATH$input_path"
49213     fi
49214   fi
49215 
49216   # remove trailing .exe if any
49217   new_path="${new_path/%.exe/}"
49218 
49219     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49220 
49221   # First separate the path from the arguments. This will split at the first
49222   # space.
49223   complete="$JTREGEXE"
49224   path="${complete%% *}"
49225   tmp="$complete EOL"
49226   arguments="${tmp#* }"
49227 
49228   # Input might be given as Windows format, start by converting to
49229   # unix format.
49230   new_path="$path"
49231 
49232   windows_path="$new_path"
49233   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49234     unix_path=`$CYGPATH -u "$windows_path"`
49235     new_path="$unix_path"
49236   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49237     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49238     new_path="$unix_path"
49239   fi
49240 
49241 
49242   # Now try to locate executable using which
49243   new_path=`$WHICH "$new_path" 2> /dev/null`
49244 
49245   if test "x$new_path" = x; then
49246     # Oops. Which didn't find the executable.
49247     # The splitting of arguments from the executable at a space might have been incorrect,
49248     # since paths with space are more likely in Windows. Give it another try with the whole
49249     # argument.
49250     path="$complete"
49251     arguments="EOL"
49252     new_path="$path"
49253 
49254   windows_path="$new_path"
49255   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49256     unix_path=`$CYGPATH -u "$windows_path"`
49257     new_path="$unix_path"
49258   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49259     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49260     new_path="$unix_path"
49261   fi
49262 
49263 
49264     new_path=`$WHICH "$new_path" 2> /dev/null`
49265     # bat and cmd files are not always considered executable in MSYS causing which
49266     # to not find them
49267     if test "x$new_path" = x \
49268         && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
49269         && test "x`$LS \"$path\" 2>/dev/null`" != x; then
49270       new_path="$path"
49271 
49272   windows_path="$new_path"
49273   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49274     unix_path=`$CYGPATH -u "$windows_path"`
49275     new_path="$unix_path"
49276   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49277     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49278     new_path="$unix_path"
49279   fi
49280 
49281     fi
49282 
49283     if test "x$new_path" = x; then
49284       # It's still not found. Now this is an unrecoverable error.
49285       { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49286 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49287       has_space=`$ECHO "$complete" | $GREP " "`
49288       if test "x$has_space" != x; then
49289         { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
49290 $as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
49291       fi
49292       as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49293     fi
49294   fi
49295 
49296   # Now new_path has a complete unix path to the binary
49297   if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
49298     # Keep paths in /bin as-is, but remove trailing .exe if any
49299     new_path="${new_path/%.exe/}"
49300     # Do not save /bin paths to all_fixpath_prefixes!
49301   else
49302     # Not in mixed or Windows style, start by that.
49303     new_path=`cmd //c echo $new_path`
49304 
49305   input_path="$new_path"
49306   # Check if we need to convert this using DOS-style short mode. If the path
49307   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49308   # take no chances and rewrite it.
49309   # Note: m4 eats our [], so we need to use [ and ] instead.
49310   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49311   if test "x$has_forbidden_chars" != x; then
49312     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49313     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49314   fi
49315 
49316     # Output is in $new_path
49317 
49318   windows_path="$new_path"
49319   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49320     unix_path=`$CYGPATH -u "$windows_path"`
49321     new_path="$unix_path"
49322   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49323     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49324     new_path="$unix_path"
49325   fi
49326 
49327     # remove trailing .exe if any
49328     new_path="${new_path/%.exe/}"
49329 
49330     # Save the first 10 bytes of this path to the storage, so fixpath can work.
49331     all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49332   fi
49333 
49334     else
49335       # We're on a unix platform. Hooray! :)
49336       # First separate the path from the arguments. This will split at the first
49337       # space.
49338       complete="$JTREGEXE"
49339       path="${complete%% *}"
49340       tmp="$complete EOL"
49341       arguments="${tmp#* }"
49342 
49343       # Cannot rely on the command "which" here since it doesn't always work.
49344       is_absolute_path=`$ECHO "$path" | $GREP ^/`
49345       if test -z "$is_absolute_path"; then
49346         # Path to executable is not absolute. Find it.
49347         IFS_save="$IFS"
49348         IFS=:
49349         for p in $PATH; do
49350           if test -f "$p/$path" && test -x "$p/$path"; then
49351             new_path="$p/$path"
49352             break
49353           fi
49354         done
49355         IFS="$IFS_save"
49356       else
49357         # This is an absolute path, we can use it without further modifications.
49358         new_path="$path"
49359       fi
49360 
49361       if test "x$new_path" = x; then
49362         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&5
49363 $as_echo "$as_me: The path of JTREGEXE, which resolves as \"$complete\", is not found." >&6;}
49364         has_space=`$ECHO "$complete" | $GREP " "`
49365         if test "x$has_space" != x; then
49366           { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
49367 $as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
49368         fi
49369         as_fn_error $? "Cannot locate the the path of JTREGEXE" "$LINENO" 5
49370       fi
49371     fi
49372 
49373     # Now join together the path and the arguments once again
49374     if test "x$arguments" != xEOL; then
49375       new_complete="$new_path ${arguments% *}"
49376     else
49377       new_complete="$new_path"
49378     fi
49379 
49380     if test "x$complete" != "x$new_complete"; then
49381       JTREGEXE="$new_complete"
49382       { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JTREGEXE to \"$new_complete\"" >&5
49383 $as_echo "$as_me: Rewriting JTREGEXE to \"$new_complete\"" >&6;}
49384     fi
49385   fi
49386 
49387 
49388   # Only process if variable expands to non-empty
49389 
49390   if test "x$JT_HOME" != x; then
49391     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49392 
49393   # Input might be given as Windows format, start by converting to
49394   # unix format.
49395   path="$JT_HOME"
49396   new_path=`$CYGPATH -u "$path"`
49397 
49398   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
49399   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
49400   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
49401   # "foo.exe" is OK but "foo" is an error.
49402   #
49403   # This test is therefore slightly more accurate than "test -f" to check for file precense.
49404   # It is also a way to make sure we got the proper file name for the real test later on.
49405   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
49406   if test "x$test_shortpath" = x; then
49407     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49408 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49409     as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
49410   fi
49411 
49412   # Call helper function which possibly converts this using DOS-style short mode.
49413   # If so, the updated path is stored in $new_path.
49414 
49415   input_path="$new_path"
49416   # Check if we need to convert this using DOS-style short mode. If the path
49417   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49418   # take no chances and rewrite it.
49419   # Note: m4 eats our [], so we need to use [ and ] instead.
49420   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
49421   if test "x$has_forbidden_chars" != x; then
49422     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49423     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
49424     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
49425     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
49426       # Going to short mode and back again did indeed matter. Since short mode is
49427       # case insensitive, let's make it lowercase to improve readability.
49428       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49429       # Now convert it back to Unix-style (cygpath)
49430       input_path=`$CYGPATH -u "$shortmode_path"`
49431       new_path="$input_path"
49432     fi
49433   fi
49434 
49435   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
49436   if test "x$test_cygdrive_prefix" = x; then
49437     # As a simple fix, exclude /usr/bin since it's not a real path.
49438     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49439       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49440       # a path prefixed by /cygdrive for fixpath to work.
49441       new_path="$CYGWIN_ROOT_PATH$input_path"
49442     fi
49443   fi
49444 
49445 
49446   if test "x$path" != "x$new_path"; then
49447     JT_HOME="$new_path"
49448     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49449 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49450   fi
49451 
49452     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49453 
49454   path="$JT_HOME"
49455   has_colon=`$ECHO $path | $GREP ^.:`
49456   new_path="$path"
49457   if test "x$has_colon" = x; then
49458     # Not in mixed or Windows style, start by that.
49459     new_path=`cmd //c echo $path`
49460   fi
49461 
49462 
49463   input_path="$new_path"
49464   # Check if we need to convert this using DOS-style short mode. If the path
49465   # contains just simple characters, use it. Otherwise (spaces, weird characters),
49466   # take no chances and rewrite it.
49467   # Note: m4 eats our [], so we need to use [ and ] instead.
49468   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49469   if test "x$has_forbidden_chars" != x; then
49470     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49471     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49472   fi
49473 
49474 
49475   windows_path="$new_path"
49476   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49477     unix_path=`$CYGPATH -u "$windows_path"`
49478     new_path="$unix_path"
49479   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49480     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49481     new_path="$unix_path"
49482   fi
49483 
49484   if test "x$path" != "x$new_path"; then
49485     JT_HOME="$new_path"
49486     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
49487 $as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
49488   fi
49489 
49490   # Save the first 10 bytes of this path to the storage, so fixpath can work.
49491   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49492 
49493     else
49494       # We're on a unix platform. Hooray! :)
49495       path="$JT_HOME"
49496       has_space=`$ECHO "$path" | $GREP " "`
49497       if test "x$has_space" != x; then
49498         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
49499 $as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
49500         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49501       fi
49502 
49503       # Use eval to expand a potential ~
49504       eval path="$path"
49505       if test ! -f "$path" && test ! -d "$path"; then
49506         as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
49507       fi
49508 
49509       if test -d "$path"; then
49510         JT_HOME="`cd "$path"; $THEPWDCMD -L`"
49511       else
49512         dir="`$DIRNAME "$path"`"
49513         base="`$BASENAME "$path"`"
49514         JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
49515       fi
49516     fi
49517   fi
49518 
49519 
49520 
49521 
49522 
49523 
49524   # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
49525   # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
49526   # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
49527   #                              commands produced by the link step (currently AIX only)
49528   if test "x$TOOLCHAIN_TYPE" = xxlc; then
49529     COMPILER_TARGET_BITS_FLAG="-q"
49530     COMPILER_COMMAND_FILE_FLAG="-f"
49531     COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
49532   else
49533     COMPILER_TARGET_BITS_FLAG="-m"
49534     COMPILER_COMMAND_FILE_FLAG="@"
49535     COMPILER_BINDCMD_FILE_FLAG=""
49536 
49537     # The solstudio linker does not support @-files.
49538     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49539       COMPILER_COMMAND_FILE_FLAG=
49540     fi
49541 
49542     # Check if @file is supported by gcc
49543     if test "x$TOOLCHAIN_TYPE" = xgcc; then
49544       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
49545 $as_echo_n "checking if @file is supported by gcc... " >&6; }
49546       # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
49547       $ECHO "" "--version" > command.file
49548       if $CXX @command.file 2>&5 >&5; then
49549         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49550 $as_echo "yes" >&6; }
49551         COMPILER_COMMAND_FILE_FLAG="@"
49552       else
49553         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49554 $as_echo "no" >&6; }
49555         COMPILER_COMMAND_FILE_FLAG=
49556       fi
49557       $RM command.file
49558     fi
49559   fi
49560 
49561 
49562 
49563 
49564   # FIXME: figure out if we should select AR flags depending on OS or toolchain.
49565   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49566     ARFLAGS="-r"
49567   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49568     ARFLAGS="-X64"
49569   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
49570     # lib.exe is used as AR to create static libraries.
49571     ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
49572   else
49573     ARFLAGS=""
49574   fi
49575 
49576 
49577   ## Setup strip.
49578   # FIXME: should this really be per platform, or should it be per toolchain type?
49579   # strip is not provided by clang or solstudio; so guessing platform makes most sense.
49580   # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
49581   if test "x$OPENJDK_TARGET_OS" = xlinux; then
49582     STRIPFLAGS="-g"
49583   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
49584     STRIPFLAGS="-x"
49585   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
49586     STRIPFLAGS="-S"
49587   elif test "x$OPENJDK_TARGET_OS" = xaix; then
49588     STRIPFLAGS="-X32_64"
49589   fi
49590 
49591 
49592 
49593   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49594     CC_OUT_OPTION=-Fo
49595     EXE_OUT_OPTION=-out:
49596     LD_OUT_OPTION=-out:
49597     AR_OUT_OPTION=-out:
49598   else
49599     # The option used to specify the target .o,.a or .so file.
49600     # When compiling, how to specify the to be created object file.
49601     CC_OUT_OPTION='-o$(SPACE)'
49602     # When linking, how to specify the to be created executable.
49603     EXE_OUT_OPTION='-o$(SPACE)'
49604     # When linking, how to specify the to be created dynamically linkable library.
49605     LD_OUT_OPTION='-o$(SPACE)'
49606     # When archiving, how to specify the to be create static archive for object files.
49607     AR_OUT_OPTION='rcs$(SPACE)'
49608   fi
49609 
49610 
49611 
49612 
49613 
49614   # On Windows, we need to set RC flags.
49615   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49616     RC_FLAGS="-nologo -l0x409"
49617     JVM_RCFLAGS="-nologo"
49618     if test "x$DEBUG_LEVEL" = xrelease; then
49619       RC_FLAGS="$RC_FLAGS -DNDEBUG"
49620       JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
49621     fi
49622 
49623     # The version variables used to create RC_FLAGS may be overridden
49624     # in a custom configure script, or possibly the command line.
49625     # Let those variables be expanded at make time in spec.gmk.
49626     # The \$ are escaped to the shell, and the $(...) variables
49627     # are evaluated by make.
49628     RC_FLAGS="$RC_FLAGS \
49629         -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
49630         -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
49631         -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
49632         -D\"JDK_VER=\$(VERSION_NUMBER)\" \
49633         -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
49634         -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
49635         -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
49636 
49637     JVM_RCFLAGS="$JVM_RCFLAGS \
49638         -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
49639         -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
49640         -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
49641         -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
49642         -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
49643         -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
49644         -D\"HS_FNAME=jvm.dll\" \
49645         -D\"HS_INTERNAL_NAME=jvm\""
49646   fi
49647 
49648 
49649 
49650   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49651     # silence copyright notice and other headers.
49652     COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
49653   fi
49654 
49655 
49656 # Now we can test some aspects on the target using configure macros.
49657 
49658 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
49659 $as_echo_n "checking for ANSI C header files... " >&6; }
49660 if ${ac_cv_header_stdc+:} false; then :
49661   $as_echo_n "(cached) " >&6
49662 else
49663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49664 /* end confdefs.h.  */
49665 #include <stdlib.h>
49666 #include <stdarg.h>
49667 #include <string.h>
49668 #include <float.h>
49669 
49670 int
49671 main ()
49672 {
49673 
49674   ;
49675   return 0;
49676 }
49677 _ACEOF
49678 if ac_fn_cxx_try_compile "$LINENO"; then :
49679   ac_cv_header_stdc=yes
49680 else
49681   ac_cv_header_stdc=no
49682 fi
49683 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49684 
49685 if test $ac_cv_header_stdc = yes; then
49686   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
49687   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49688 /* end confdefs.h.  */
49689 #include <string.h>
49690 
49691 _ACEOF
49692 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49693   $EGREP "memchr" >/dev/null 2>&1; then :
49694 
49695 else
49696   ac_cv_header_stdc=no
49697 fi
49698 rm -f conftest*
49699 
49700 fi
49701 
49702 if test $ac_cv_header_stdc = yes; then
49703   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
49704   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49705 /* end confdefs.h.  */
49706 #include <stdlib.h>
49707 
49708 _ACEOF
49709 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
49710   $EGREP "free" >/dev/null 2>&1; then :
49711 
49712 else
49713   ac_cv_header_stdc=no
49714 fi
49715 rm -f conftest*
49716 
49717 fi
49718 
49719 if test $ac_cv_header_stdc = yes; then
49720   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
49721   if test "$cross_compiling" = yes; then :
49722   :
49723 else
49724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49725 /* end confdefs.h.  */
49726 #include <ctype.h>
49727 #include <stdlib.h>
49728 #if ((' ' & 0x0FF) == 0x020)
49729 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
49730 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
49731 #else
49732 # define ISLOWER(c) \
49733                    (('a' <= (c) && (c) <= 'i') \
49734                      || ('j' <= (c) && (c) <= 'r') \
49735                      || ('s' <= (c) && (c) <= 'z'))
49736 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
49737 #endif
49738 
49739 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
49740 int
49741 main ()
49742 {
49743   int i;
49744   for (i = 0; i < 256; i++)
49745     if (XOR (islower (i), ISLOWER (i))
49746         || toupper (i) != TOUPPER (i))
49747       return 2;
49748   return 0;
49749 }
49750 _ACEOF
49751 if ac_fn_cxx_try_run "$LINENO"; then :
49752 
49753 else
49754   ac_cv_header_stdc=no
49755 fi
49756 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49757   conftest.$ac_objext conftest.beam conftest.$ac_ext
49758 fi
49759 
49760 fi
49761 fi
49762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
49763 $as_echo "$ac_cv_header_stdc" >&6; }
49764 if test $ac_cv_header_stdc = yes; then
49765 
49766 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
49767 
49768 fi
49769 
49770 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
49771 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
49772                   inttypes.h stdint.h unistd.h
49773 do :
49774   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
49775 ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
49776 "
49777 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
49778   cat >>confdefs.h <<_ACEOF
49779 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
49780 _ACEOF
49781 
49782 fi
49783 
49784 done
49785 
49786 
49787 
49788   ###############################################################################
49789   #
49790   # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
49791   # (The JVM can use 32 or 64 bit Java pointers but that decision
49792   # is made at runtime.)
49793   #
49794 
49795   if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
49796     # Always specify -m flag on Solaris
49797     # And -q on AIX because otherwise the compiler produces 32-bit objects by default
49798 
49799   # When we add flags to the "official" CFLAGS etc, we need to
49800   # keep track of these additions in ADDED_CFLAGS etc. These
49801   # will later be checked to make sure only controlled additions
49802   # have been made to CFLAGS etc.
49803   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49804   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49805   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49806 
49807   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49808   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49809   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49810 
49811   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49812   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49813   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49814 
49815   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49816   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49817   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49818 
49819   elif test "x$COMPILE_TYPE" = xreduced; then
49820     if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
49821       # Specify -m if running reduced on unix platforms
49822 
49823   # When we add flags to the "official" CFLAGS etc, we need to
49824   # keep track of these additions in ADDED_CFLAGS etc. These
49825   # will later be checked to make sure only controlled additions
49826   # have been made to CFLAGS etc.
49827   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49828   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49829   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49830 
49831   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49832   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49833   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49834 
49835   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49836   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49837   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49838 
49839   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49840   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49841   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49842 
49843     fi
49844   fi
49845   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49846     JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49847     JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49848     JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49849   fi
49850 
49851   # Make compilation sanity check
49852   for ac_header in stdio.h
49853 do :
49854   ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49855 if test "x$ac_cv_header_stdio_h" = xyes; then :
49856   cat >>confdefs.h <<_ACEOF
49857 #define HAVE_STDIO_H 1
49858 _ACEOF
49859 
49860 else
49861 
49862     { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49863 $as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49864     if test "x$COMPILE_TYPE" = xreduced; then
49865 
49866   # Print a helpful message on how to acquire the necessary build dependency.
49867   # reduced is the help tag: freetype, cups, alsa etc
49868   MISSING_DEPENDENCY=reduced
49869 
49870   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49871     cygwin_help $MISSING_DEPENDENCY
49872   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49873     msys_help $MISSING_DEPENDENCY
49874   else
49875     PKGHANDLER_COMMAND=
49876 
49877     case $PKGHANDLER in
49878       apt-get)
49879         apt_help     $MISSING_DEPENDENCY ;;
49880       yum)
49881         yum_help     $MISSING_DEPENDENCY ;;
49882       brew)
49883         brew_help    $MISSING_DEPENDENCY ;;
49884       port)
49885         port_help    $MISSING_DEPENDENCY ;;
49886       pkgutil)
49887         pkgutil_help $MISSING_DEPENDENCY ;;
49888       pkgadd)
49889         pkgadd_help  $MISSING_DEPENDENCY ;;
49890     esac
49891 
49892     if test "x$PKGHANDLER_COMMAND" != x; then
49893       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49894     fi
49895   fi
49896 
49897       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49898 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49899     elif test "x$COMPILE_TYPE" = xcross; then
49900       { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49901 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49902     fi
49903     as_fn_error $? "Cannot continue." "$LINENO" 5
49904 
49905 fi
49906 
49907 done
49908 
49909 
49910   # The cast to long int works around a bug in the HP C Compiler
49911 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49912 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49913 # This bug is HP SR number 8606223364.
49914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49915 $as_echo_n "checking size of int *... " >&6; }
49916 if ${ac_cv_sizeof_int_p+:} false; then :
49917   $as_echo_n "(cached) " >&6
49918 else
49919   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49920 
49921 else
49922   if test "$ac_cv_type_int_p" = yes; then
49923      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49924 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49925 as_fn_error 77 "cannot compute sizeof (int *)
49926 See \`config.log' for more details" "$LINENO" 5; }
49927    else
49928      ac_cv_sizeof_int_p=0
49929    fi
49930 fi
49931 
49932 fi
49933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49934 $as_echo "$ac_cv_sizeof_int_p" >&6; }
49935 
49936 
49937 
49938 cat >>confdefs.h <<_ACEOF
49939 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
49940 _ACEOF
49941 
49942 
49943 
49944   # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49945   if test "x$ac_cv_sizeof_int_p" = x; then
49946     # The test failed, lets stick to the assumed value.
49947     { $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
49948 $as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49949   else
49950     TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49951 
49952     if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49953       # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49954       # Let's try to implicitely set the compilers target architecture and retry the test
49955       { $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
49956 $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;}
49957       { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49958 $as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49959 
49960   # When we add flags to the "official" CFLAGS etc, we need to
49961   # keep track of these additions in ADDED_CFLAGS etc. These
49962   # will later be checked to make sure only controlled additions
49963   # have been made to CFLAGS etc.
49964   ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49965   ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49966   ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49967 
49968   CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49969   CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49970   LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49971 
49972   CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49973   CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49974   LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49975 
49976   JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49977   JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49978   JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49979 
49980 
49981       # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49982       unset ac_cv_sizeof_int_p
49983       # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49984       cat >>confdefs.h <<_ACEOF
49985 #undef SIZEOF_INT_P
49986 _ACEOF
49987 
49988       # The cast to long int works around a bug in the HP C Compiler
49989 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49990 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49991 # This bug is HP SR number 8606223364.
49992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49993 $as_echo_n "checking size of int *... " >&6; }
49994 if ${ac_cv_sizeof_int_p+:} false; then :
49995   $as_echo_n "(cached) " >&6
49996 else
49997   if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49998 
49999 else
50000   if test "$ac_cv_type_int_p" = yes; then
50001      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
50002 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
50003 as_fn_error 77 "cannot compute sizeof (int *)
50004 See \`config.log' for more details" "$LINENO" 5; }
50005    else
50006      ac_cv_sizeof_int_p=0
50007    fi
50008 fi
50009 
50010 fi
50011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
50012 $as_echo "$ac_cv_sizeof_int_p" >&6; }
50013 
50014 
50015 
50016 cat >>confdefs.h <<_ACEOF
50017 #define SIZEOF_INT_P $ac_cv_sizeof_int_p
50018 _ACEOF
50019 
50020 
50021 
50022       TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
50023 
50024       if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
50025         { $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
50026 $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;}
50027         if test "x$COMPILE_TYPE" = xreduced; then
50028 
50029   # Print a helpful message on how to acquire the necessary build dependency.
50030   # reduced is the help tag: freetype, cups, alsa etc
50031   MISSING_DEPENDENCY=reduced
50032 
50033   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50034     cygwin_help $MISSING_DEPENDENCY
50035   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50036     msys_help $MISSING_DEPENDENCY
50037   else
50038     PKGHANDLER_COMMAND=
50039 
50040     case $PKGHANDLER in
50041       apt-get)
50042         apt_help     $MISSING_DEPENDENCY ;;
50043       yum)
50044         yum_help     $MISSING_DEPENDENCY ;;
50045       brew)
50046         brew_help    $MISSING_DEPENDENCY ;;
50047       port)
50048         port_help    $MISSING_DEPENDENCY ;;
50049       pkgutil)
50050         pkgutil_help $MISSING_DEPENDENCY ;;
50051       pkgadd)
50052         pkgadd_help  $MISSING_DEPENDENCY ;;
50053     esac
50054 
50055     if test "x$PKGHANDLER_COMMAND" != x; then
50056       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
50057     fi
50058   fi
50059 
50060           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
50061 $as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
50062         elif test "x$COMPILE_TYPE" = xcross; then
50063           { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
50064 $as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
50065         fi
50066         as_fn_error $? "Cannot continue." "$LINENO" 5
50067       fi
50068     fi
50069   fi
50070 
50071   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
50072 $as_echo_n "checking for target address size... " >&6; }
50073   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
50074 $as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
50075 
50076 
50077   ###############################################################################
50078   #
50079   # Is the target little of big endian?
50080   #
50081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
50082 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
50083 if ${ac_cv_c_bigendian+:} false; then :
50084   $as_echo_n "(cached) " >&6
50085 else
50086   ac_cv_c_bigendian=unknown
50087     # See if we're dealing with a universal compiler.
50088     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50089 /* end confdefs.h.  */
50090 #ifndef __APPLE_CC__
50091                not a universal capable compiler
50092              #endif
50093              typedef int dummy;
50094 
50095 _ACEOF
50096 if ac_fn_cxx_try_compile "$LINENO"; then :
50097 
50098         # Check for potential -arch flags.  It is not universal unless
50099         # there are at least two -arch flags with different values.
50100         ac_arch=
50101         ac_prev=
50102         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
50103          if test -n "$ac_prev"; then
50104            case $ac_word in
50105              i?86 | x86_64 | ppc | ppc64)
50106                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
50107                  ac_arch=$ac_word
50108                else
50109                  ac_cv_c_bigendian=universal
50110                  break
50111                fi
50112                ;;
50113            esac
50114            ac_prev=
50115          elif test "x$ac_word" = "x-arch"; then
50116            ac_prev=arch
50117          fi
50118        done
50119 fi
50120 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50121     if test $ac_cv_c_bigendian = unknown; then
50122       # See if sys/param.h defines the BYTE_ORDER macro.
50123       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50124 /* end confdefs.h.  */
50125 #include <sys/types.h>
50126              #include <sys/param.h>
50127 
50128 int
50129 main ()
50130 {
50131 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
50132                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
50133                      && LITTLE_ENDIAN)
50134               bogus endian macros
50135              #endif
50136 
50137   ;
50138   return 0;
50139 }
50140 _ACEOF
50141 if ac_fn_cxx_try_compile "$LINENO"; then :
50142   # It does; now see whether it defined to BIG_ENDIAN or not.
50143          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50144 /* end confdefs.h.  */
50145 #include <sys/types.h>
50146                 #include <sys/param.h>
50147 
50148 int
50149 main ()
50150 {
50151 #if BYTE_ORDER != BIG_ENDIAN
50152                  not big endian
50153                 #endif
50154 
50155   ;
50156   return 0;
50157 }
50158 _ACEOF
50159 if ac_fn_cxx_try_compile "$LINENO"; then :
50160   ac_cv_c_bigendian=yes
50161 else
50162   ac_cv_c_bigendian=no
50163 fi
50164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50165 fi
50166 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50167     fi
50168     if test $ac_cv_c_bigendian = unknown; then
50169       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
50170       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50171 /* end confdefs.h.  */
50172 #include <limits.h>
50173 
50174 int
50175 main ()
50176 {
50177 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
50178               bogus endian macros
50179              #endif
50180 
50181   ;
50182   return 0;
50183 }
50184 _ACEOF
50185 if ac_fn_cxx_try_compile "$LINENO"; then :
50186   # It does; now see whether it defined to _BIG_ENDIAN or not.
50187          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50188 /* end confdefs.h.  */
50189 #include <limits.h>
50190 
50191 int
50192 main ()
50193 {
50194 #ifndef _BIG_ENDIAN
50195                  not big endian
50196                 #endif
50197 
50198   ;
50199   return 0;
50200 }
50201 _ACEOF
50202 if ac_fn_cxx_try_compile "$LINENO"; then :
50203   ac_cv_c_bigendian=yes
50204 else
50205   ac_cv_c_bigendian=no
50206 fi
50207 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50208 fi
50209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50210     fi
50211     if test $ac_cv_c_bigendian = unknown; then
50212       # Compile a test program.
50213       if test "$cross_compiling" = yes; then :
50214   # Try to guess by grepping values from an object file.
50215          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50216 /* end confdefs.h.  */
50217 short int ascii_mm[] =
50218                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
50219                 short int ascii_ii[] =
50220                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
50221                 int use_ascii (int i) {
50222                   return ascii_mm[i] + ascii_ii[i];
50223                 }
50224                 short int ebcdic_ii[] =
50225                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
50226                 short int ebcdic_mm[] =
50227                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
50228                 int use_ebcdic (int i) {
50229                   return ebcdic_mm[i] + ebcdic_ii[i];
50230                 }
50231                 extern int foo;
50232 
50233 int
50234 main ()
50235 {
50236 return use_ascii (foo) == use_ebcdic (foo);
50237   ;
50238   return 0;
50239 }
50240 _ACEOF
50241 if ac_fn_cxx_try_compile "$LINENO"; then :
50242   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
50243               ac_cv_c_bigendian=yes
50244             fi
50245             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
50246               if test "$ac_cv_c_bigendian" = unknown; then
50247                 ac_cv_c_bigendian=no
50248               else
50249                 # finding both strings is unlikely to happen, but who knows?
50250                 ac_cv_c_bigendian=unknown
50251               fi
50252             fi
50253 fi
50254 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50255 else
50256   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50257 /* end confdefs.h.  */
50258 $ac_includes_default
50259 int
50260 main ()
50261 {
50262 
50263              /* Are we little or big endian?  From Harbison&Steele.  */
50264              union
50265              {
50266                long int l;
50267                char c[sizeof (long int)];
50268              } u;
50269              u.l = 1;
50270              return u.c[sizeof (long int) - 1] == 1;
50271 
50272   ;
50273   return 0;
50274 }
50275 _ACEOF
50276 if ac_fn_cxx_try_run "$LINENO"; then :
50277   ac_cv_c_bigendian=no
50278 else
50279   ac_cv_c_bigendian=yes
50280 fi
50281 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
50282   conftest.$ac_objext conftest.beam conftest.$ac_ext
50283 fi
50284 
50285     fi
50286 fi
50287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
50288 $as_echo "$ac_cv_c_bigendian" >&6; }
50289  case $ac_cv_c_bigendian in #(
50290    yes)
50291      ENDIAN="big";; #(
50292    no)
50293      ENDIAN="little" ;; #(
50294    universal)
50295      ENDIAN="universal_endianness"
50296      ;; #(
50297    *)
50298      ENDIAN="unknown" ;;
50299  esac
50300 
50301 
50302   if test "x$ENDIAN" = xuniversal_endianness; then
50303     as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
50304   fi
50305   if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
50306     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
50307   fi
50308 
50309 
50310 # Configure flags for the tools
50311 
50312   ###############################################################################
50313   #
50314   # How to compile shared libraries.
50315   #
50316 
50317   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50318     PICFLAG="-fPIC"
50319     C_FLAG_REORDER=''
50320     CXX_FLAG_REORDER=''
50321 
50322     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50323       # Linking is different on MacOSX
50324       if test "x$STATIC_BUILD" = xtrue; then
50325         SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
50326       else
50327         SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50328         JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50329       fi
50330       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50331       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50332       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50333       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50334     else
50335       # Default works for linux, might work on other platforms as well.
50336       SHARED_LIBRARY_FLAGS='-shared'
50337       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50338       SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50339       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50340       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50341     fi
50342   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50343     C_FLAG_REORDER=''
50344     CXX_FLAG_REORDER=''
50345 
50346     if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50347       # Linking is different on MacOSX
50348       PICFLAG=''
50349       SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
50350       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$(or $1,/.)'
50351       SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50352       SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
50353       SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
50354 
50355       if test "x$STATIC_BUILD" = xfalse; then
50356         JVM_CFLAGS="$JVM_CFLAGS -fPIC"
50357       fi
50358     else
50359       # Default works for linux, might work on other platforms as well.
50360       PICFLAG='-fPIC'
50361       SHARED_LIBRARY_FLAGS='-shared'
50362       SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
50363       SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
50364       SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
50365 
50366       # arm specific settings
50367       if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
50368         # '-Wl,-z,origin' isn't used on arm.
50369         SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
50370       else
50371         SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
50372       fi
50373 
50374     fi
50375   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50376     if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50377       PICFLAG="-xcode=pic32"
50378     else
50379       PICFLAG="-KPIC"
50380     fi
50381     C_FLAG_REORDER='-xF'
50382     CXX_FLAG_REORDER='-xF'
50383     SHARED_LIBRARY_FLAGS="-G"
50384     SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
50385     SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
50386     SET_SHARED_LIBRARY_NAME='-h $1'
50387     SET_SHARED_LIBRARY_MAPFILE='-M$1'
50388   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50389     # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
50390     # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
50391     # will have to patch this single instruction with a call to some out-of-order code which
50392     # does the load from the TOC. This is of course slow. But in that case we also would have
50393     # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
50394     # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
50395     # can be patched directly by the linker and does not require a jump to out-of-order code.
50396     # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
50397     # instead. This creates a distinct TOC for every compilation unit (and thus requires two
50398     # loads for accessing a global variable). But there are rumors that this may be seen as a
50399     # 'performance feature' because of improved code locality of the symbols used in a
50400     # compilation unit.
50401     PICFLAG="-qpic"
50402     JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
50403     C_FLAG_REORDER=''
50404     CXX_FLAG_REORDER=''
50405     SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
50406     SET_EXECUTABLE_ORIGIN=""
50407     SET_SHARED_LIBRARY_ORIGIN=''
50408     SET_SHARED_LIBRARY_NAME=''
50409     SET_SHARED_LIBRARY_MAPFILE=''
50410   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50411     PICFLAG=""
50412     C_FLAG_REORDER=''
50413     CXX_FLAG_REORDER=''
50414     SHARED_LIBRARY_FLAGS="-dll"
50415     SET_EXECUTABLE_ORIGIN=''
50416     SET_SHARED_LIBRARY_ORIGIN=''
50417     SET_SHARED_LIBRARY_NAME=''
50418     SET_SHARED_LIBRARY_MAPFILE='-def:$1'
50419   fi
50420 
50421 
50422 
50423 
50424 
50425 
50426 
50427 
50428 
50429   # The (cross) compiler is now configured, we can now test capabilities
50430   # of the target platform.
50431 
50432 
50433 
50434   ###############################################################################
50435   #
50436   # Setup the opt flags for different compilers
50437   # and different operating systems.
50438   #
50439 
50440   # FIXME: this was indirectly the old default, but just inherited.
50441   # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50442   #   C_FLAG_DEPS="-MMD -MF"
50443   # fi
50444 
50445   # Generate make dependency files
50446   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50447     C_FLAG_DEPS="-MMD -MF"
50448   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50449     C_FLAG_DEPS="-MMD -MF"
50450   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50451     C_FLAG_DEPS="-xMMD -xMF"
50452   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50453     C_FLAG_DEPS="-qmakedep=gcc -MF"
50454   fi
50455   CXX_FLAG_DEPS="$C_FLAG_DEPS"
50456 
50457 
50458 
50459   # Debug symbols
50460   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50461     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
50462       # reduce from default "-g2" option to save space
50463       CFLAGS_DEBUG_SYMBOLS="-g1"
50464       CXXFLAGS_DEBUG_SYMBOLS="-g1"
50465     else
50466       CFLAGS_DEBUG_SYMBOLS="-g"
50467       CXXFLAGS_DEBUG_SYMBOLS="-g"
50468     fi
50469   elif test "x$TOOLCHAIN_TYPE" = xclang; then
50470     CFLAGS_DEBUG_SYMBOLS="-g"
50471     CXXFLAGS_DEBUG_SYMBOLS="-g"
50472   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50473     CFLAGS_DEBUG_SYMBOLS="-g -xs"
50474     # -g0 enables debug symbols without disabling inlining.
50475     CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
50476   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50477     CFLAGS_DEBUG_SYMBOLS="-g"
50478     CXXFLAGS_DEBUG_SYMBOLS="-g"
50479   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50480     CFLAGS_DEBUG_SYMBOLS="-Zi"
50481     CXXFLAGS_DEBUG_SYMBOLS="-Zi"
50482   fi
50483 
50484 
50485 
50486   # Debug symbols for JVM_CFLAGS
50487   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50488     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
50489     if test "x$DEBUG_LEVEL" = xslowdebug; then
50490       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50491     else
50492       # -g0 does not disable inlining, which -g does.
50493       JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
50494     fi
50495   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50496     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
50497   else
50498     JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
50499   fi
50500 
50501 
50502   # bounds, memory and behavior checking options
50503   if test "x$TOOLCHAIN_TYPE" = xgcc; then
50504     case $DEBUG_LEVEL in
50505     release )
50506       # no adjustment
50507       ;;
50508     fastdebug )
50509       # no adjustment
50510       ;;
50511     slowdebug )
50512       # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
50513       # get's added conditionally on whether we produce debug symbols or not.
50514       # This is most likely not really correct.
50515 
50516       # Add runtime stack smashing and undefined behavior checks.
50517       # Not all versions of gcc support -fstack-protector
50518       STACK_PROTECTOR_CFLAG="-fstack-protector-all"
50519 
50520 
50521 
50522 
50523 
50524 
50525 
50526 
50527 
50528 
50529 
50530 
50531 
50532 
50533 
50534 
50535 
50536 
50537 
50538 
50539 
50540 
50541 
50542 
50543 
50544 
50545 
50546 
50547 
50548 
50549 
50550 
50551 
50552 
50553 
50554 
50555 
50556 
50557 
50558 
50559 
50560 
50561     # Execute function body
50562 
50563 
50564 
50565 
50566 
50567 
50568 
50569 
50570 
50571 
50572 
50573 
50574 
50575 
50576 
50577 
50578 
50579 
50580 
50581 
50582 
50583 
50584 
50585 
50586 
50587 
50588 
50589 
50590 
50591 
50592 
50593 
50594 
50595 
50596 
50597 
50598 
50599 
50600 
50601 
50602 
50603 
50604 
50605 
50606 
50607 
50608 
50609 
50610     # Execute function body
50611 
50612   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50613 $as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50614   supports=yes
50615 
50616   saved_cflags="$CFLAGS"
50617   CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
50618   ac_ext=c
50619 ac_cpp='$CPP $CPPFLAGS'
50620 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50621 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50622 ac_compiler_gnu=$ac_cv_c_compiler_gnu
50623 
50624   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50625 /* end confdefs.h.  */
50626 int i;
50627 _ACEOF
50628 if ac_fn_c_try_compile "$LINENO"; then :
50629 
50630 else
50631   supports=no
50632 fi
50633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50634   ac_ext=cpp
50635 ac_cpp='$CXXCPP $CPPFLAGS'
50636 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50637 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50638 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50639 
50640   CFLAGS="$saved_cflags"
50641 
50642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50643 $as_echo "$supports" >&6; }
50644   if test "x$supports" = "xyes" ; then
50645     :
50646     C_COMP_SUPPORTS="yes"
50647   else
50648     :
50649     C_COMP_SUPPORTS="no"
50650   fi
50651 
50652 
50653 
50654 
50655 
50656 
50657 
50658 
50659 
50660 
50661 
50662 
50663 
50664 
50665 
50666 
50667 
50668 
50669 
50670 
50671 
50672 
50673 
50674 
50675 
50676 
50677 
50678 
50679 
50680 
50681 
50682 
50683 
50684 
50685 
50686 
50687 
50688 
50689 
50690 
50691 
50692 
50693 
50694 
50695 
50696 
50697 
50698 
50699 
50700 
50701 
50702 
50703 
50704 
50705 
50706 
50707 
50708 
50709 
50710     # Execute function body
50711 
50712   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50713 $as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50714   supports=yes
50715 
50716   saved_cxxflags="$CXXFLAGS"
50717   CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
50718   ac_ext=cpp
50719 ac_cpp='$CXXCPP $CPPFLAGS'
50720 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50721 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50722 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50723 
50724   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50725 /* end confdefs.h.  */
50726 int i;
50727 _ACEOF
50728 if ac_fn_cxx_try_compile "$LINENO"; then :
50729 
50730 else
50731   supports=no
50732 fi
50733 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50734   ac_ext=cpp
50735 ac_cpp='$CXXCPP $CPPFLAGS'
50736 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50737 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50738 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50739 
50740   CXXFLAGS="$saved_cxxflags"
50741 
50742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50743 $as_echo "$supports" >&6; }
50744   if test "x$supports" = "xyes" ; then
50745     :
50746     CXX_COMP_SUPPORTS="yes"
50747   else
50748     :
50749     CXX_COMP_SUPPORTS="no"
50750   fi
50751 
50752 
50753 
50754 
50755 
50756 
50757 
50758 
50759 
50760 
50761 
50762 
50763 
50764   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
50765 $as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
50766   supports=no
50767   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50768 
50769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50770 $as_echo "$supports" >&6; }
50771   if test "x$supports" = "xyes" ; then
50772     :
50773 
50774   else
50775     :
50776     STACK_PROTECTOR_CFLAG=""
50777   fi
50778 
50779 
50780 
50781 
50782 
50783 
50784 
50785       CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50786       CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50787       if test "x$STACK_PROTECTOR_CFLAG" != x; then
50788         JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
50789       fi
50790       ;;
50791     esac
50792   fi
50793 
50794   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50795     if test "x$DEBUG_LEVEL" != xrelease; then
50796       if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50797         JVM_CFLAGS="$JVM_CFLAGS -homeparams"
50798       fi
50799     fi
50800   fi
50801 
50802   # Optimization levels
50803   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50804     CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
50805 
50806     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
50807       # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
50808       C_O_FLAG_HIGHEST_JVM="-xO4"
50809       C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
50810       C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
50811       C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
50812       C_O_FLAG_DEBUG="-xregs=no%frameptr"
50813       C_O_FLAG_DEBUG_JVM=""
50814       C_O_FLAG_NONE="-xregs=no%frameptr"
50815       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50816       CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
50817       CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
50818       CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
50819       CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
50820       CXX_O_FLAG_DEBUG_JVM=""
50821       CXX_O_FLAG_NONE="-xregs=no%frameptr"
50822       if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50823         C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
50824         CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
50825       fi
50826     elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50827       C_O_FLAG_HIGHEST_JVM="-xO4"
50828       C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
50829       C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50830       C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
50831       C_O_FLAG_DEBUG=""
50832       C_O_FLAG_DEBUG_JVM=""
50833       C_O_FLAG_NONE=""
50834       CXX_O_FLAG_HIGHEST_JVM="-xO4"
50835       CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
50836       CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50837       CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
50838       CXX_O_FLAG_DEBUG=""
50839       CXX_O_FLAG_DEBUG_JVM=""
50840       CXX_O_FLAG_NONE=""
50841     fi
50842   else
50843     # The remaining toolchains share opt flags between CC and CXX;
50844     # setup for C and duplicate afterwards.
50845     if test "x$TOOLCHAIN_TYPE" = xgcc; then
50846       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50847         # On MacOSX we optimize for size, something
50848         # we should do for all platforms?
50849         C_O_FLAG_HIGHEST_JVM="-Os"
50850         C_O_FLAG_HIGHEST="-Os"
50851         C_O_FLAG_HI="-Os"
50852         C_O_FLAG_NORM="-Os"
50853         C_O_FLAG_SIZE="-Os"
50854       else
50855         C_O_FLAG_HIGHEST_JVM="-O3"
50856         C_O_FLAG_HIGHEST="-O3"
50857         C_O_FLAG_HI="-O3"
50858         C_O_FLAG_NORM="-O2"
50859         C_O_FLAG_SIZE="-Os"
50860       fi
50861       C_O_FLAG_DEBUG="-O0"
50862       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50863         C_O_FLAG_DEBUG_JVM=""
50864       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50865         C_O_FLAG_DEBUG_JVM="-O0"
50866       fi
50867       C_O_FLAG_NONE="-O0"
50868     elif test "x$TOOLCHAIN_TYPE" = xclang; then
50869       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50870         # On MacOSX we optimize for size, something
50871         # we should do for all platforms?
50872         C_O_FLAG_HIGHEST_JVM="-Os"
50873         C_O_FLAG_HIGHEST="-Os"
50874         C_O_FLAG_HI="-Os"
50875         C_O_FLAG_NORM="-Os"
50876         C_O_FLAG_SIZE="-Os"
50877       else
50878         C_O_FLAG_HIGHEST_JVM="-O3"
50879         C_O_FLAG_HIGHEST="-O3"
50880         C_O_FLAG_HI="-O3"
50881         C_O_FLAG_NORM="-O2"
50882         C_O_FLAG_SIZE="-Os"
50883       fi
50884       C_O_FLAG_DEBUG="-O0"
50885       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50886         C_O_FLAG_DEBUG_JVM=""
50887       elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50888         C_O_FLAG_DEBUG_JVM="-O0"
50889       fi
50890       C_O_FLAG_NONE="-O0"
50891     elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50892       C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50893       C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50894       C_O_FLAG_HI="-O3 -qinline -qinlglue"
50895       C_O_FLAG_NORM="-O2"
50896       C_O_FLAG_DEBUG="-qnoopt"
50897       # FIXME: Value below not verified.
50898       C_O_FLAG_DEBUG_JVM=""
50899       C_O_FLAG_NONE="-qnoopt"
50900     elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50901       C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50902       C_O_FLAG_HIGHEST="-O2"
50903       C_O_FLAG_HI="-O1"
50904       C_O_FLAG_NORM="-O1"
50905       C_O_FLAG_DEBUG="-Od"
50906       C_O_FLAG_DEBUG_JVM=""
50907       C_O_FLAG_NONE="-Od"
50908       C_O_FLAG_SIZE="-Os"
50909     fi
50910     CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50911     CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50912     CXX_O_FLAG_HI="$C_O_FLAG_HI"
50913     CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50914     CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50915     CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50916     CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50917     CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50918   fi
50919 
50920   # Adjust optimization flags according to debug level.
50921   case $DEBUG_LEVEL in
50922     release )
50923       # no adjustment
50924       ;;
50925     fastdebug )
50926       # Not quite so much optimization
50927       C_O_FLAG_HI="$C_O_FLAG_NORM"
50928       CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50929       ;;
50930     slowdebug )
50931       # Disable optimization
50932       C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50933       C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50934       C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50935       C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50936       C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50937       CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50938       CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50939       CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50940       CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50941       CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50942       ;;
50943   esac
50944 
50945 
50946 
50947 
50948 
50949 
50950 
50951 
50952 
50953 
50954 
50955 
50956 
50957 
50958 
50959 
50960 
50961 
50962 
50963 
50964 # Check whether --with-abi-profile was given.
50965 if test "${with_abi_profile+set}" = set; then :
50966   withval=$with_abi_profile;
50967 fi
50968 
50969 
50970   if test "x$with_abi_profile" != x; then
50971     if test "x$OPENJDK_TARGET_CPU" != xarm && \
50972         test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50973       as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50974     fi
50975 
50976     OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50977     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50978 $as_echo_n "checking for ABI profle... " >&6; }
50979     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50980 $as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50981 
50982     if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50983       ARM_FLOAT_TYPE=vfp-sflt
50984       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50985     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50986       ARM_FLOAT_TYPE=vfp-hflt
50987       ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50988     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50989       ARM_FLOAT_TYPE=sflt
50990       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50991     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50992       ARM_FLOAT_TYPE=vfp-sflt
50993       ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50994     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50995       ARM_FLOAT_TYPE=vfp-hflt
50996       ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50997     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50998       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50999       ARM_FLOAT_TYPE=
51000       ARM_ARCH_TYPE_FLAGS=
51001     elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
51002       # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
51003       ARM_FLOAT_TYPE=
51004       ARM_ARCH_TYPE_FLAGS=
51005     else
51006       as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
51007     fi
51008 
51009     if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
51010       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
51011     elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
51012       ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
51013     elif test "x$ARM_FLOAT_TYPE" = xsflt; then
51014       ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
51015     fi
51016     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
51017 $as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
51018     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
51019 $as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
51020 
51021     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
51022 $as_echo_n "checking for arch type flags... " >&6; }
51023     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
51024 $as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
51025 
51026     # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
51027     # autoconf target triplet.
51028      JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
51029     # Sanity check that it is a known ABI.
51030     if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
51031         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
51032         test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
51033           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
51034 $as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
51035     fi
51036     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
51037 $as_echo_n "checking for ABI property name... " >&6; }
51038     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
51039 $as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
51040 
51041 
51042     # Pass these on to the open part of configure as if they were set using
51043     # --with-extra-c[xx]flags.
51044     EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51045     EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51046     # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
51047     # FIXME: This should not really be set using extra_cflags.
51048     if test "x$OPENJDK_TARGET_CPU" = xarm; then
51049         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
51050         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
51051     fi
51052     # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
51053     EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
51054     # And pass the architecture flags to the linker as well
51055     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
51056   fi
51057 
51058   # When building with an abi profile, the name of that profile is appended on the
51059   # bundle platform, which is used in bundle names.
51060   if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
51061     OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
51062   fi
51063 
51064 
51065   # Special extras...
51066   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51067     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51068       CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51069       CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51070     fi
51071     CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51072     CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51073   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51074     CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51075     CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51076   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51077     CXXSTD_CXXFLAG="-std=gnu++98"
51078 
51079 
51080 
51081 
51082 
51083 
51084 
51085 
51086 
51087 
51088 
51089 
51090 
51091 
51092 
51093 
51094 
51095 
51096 
51097 
51098 
51099 
51100 
51101 
51102 
51103 
51104 
51105 
51106 
51107 
51108 
51109 
51110 
51111 
51112 
51113 
51114 
51115 
51116 
51117 
51118 
51119 
51120     # Execute function body
51121 
51122   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
51123 $as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
51124   supports=yes
51125 
51126   saved_cxxflags="$CXXFLAGS"
51127   CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
51128   ac_ext=cpp
51129 ac_cpp='$CXXCPP $CPPFLAGS'
51130 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51131 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51132 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51133 
51134   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51135 /* end confdefs.h.  */
51136 int i;
51137 _ACEOF
51138 if ac_fn_cxx_try_compile "$LINENO"; then :
51139 
51140 else
51141   supports=no
51142 fi
51143 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51144   ac_ext=cpp
51145 ac_cpp='$CXXCPP $CPPFLAGS'
51146 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51147 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51148 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51149 
51150   CXXFLAGS="$saved_cxxflags"
51151 
51152   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51153 $as_echo "$supports" >&6; }
51154   if test "x$supports" = "xyes" ; then
51155     :
51156 
51157   else
51158     :
51159     CXXSTD_CXXFLAG=""
51160   fi
51161 
51162 
51163 
51164 
51165 
51166 
51167 
51168 
51169 
51170 
51171 
51172 
51173     CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
51174     JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
51175 
51176   fi
51177   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51178     CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
51179     CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
51180   fi
51181 
51182   CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
51183   CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
51184   LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
51185 
51186   ###############################################################################
51187   #
51188   # Now setup the CFLAGS and LDFLAGS for the JDK build.
51189   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51190   #
51191 
51192   # Setup compiler/platform specific flags into
51193   #    CFLAGS_JDK    - C Compiler flags
51194   #    CXXFLAGS_JDK  - C++ Compiler flags
51195   #    COMMON_CCXXFLAGS_JDK - common to C and C++
51196   if test "x$TOOLCHAIN_TYPE" = xgcc; then
51197     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51198     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
51199     JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
51200     if test "x$OPENJDK_TARGET_CPU" = xx86; then
51201       # Force compatibility with i586 on 32 bit intel platforms.
51202       COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51203       JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51204     fi
51205     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51206         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51207     case $OPENJDK_TARGET_CPU_ARCH in
51208       arm )
51209         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51210         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51211         COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
51212         ;;
51213       ppc )
51214         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51215         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51216         ;;
51217       s390 )
51218         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51219         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51220         ;;
51221       * )
51222         COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51223         CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51224         ;;
51225     esac
51226 
51227 
51228 
51229 
51230 
51231 
51232 
51233 
51234 
51235 
51236 
51237 
51238 
51239 
51240 
51241 
51242 
51243 
51244 
51245 
51246 
51247 
51248 
51249 
51250 
51251 
51252 
51253 
51254 
51255 
51256 
51257 
51258 
51259 
51260 
51261 
51262 
51263 
51264 
51265 
51266 
51267 
51268 
51269 
51270 
51271 
51272 
51273 
51274 
51275 
51276 
51277 
51278 
51279 
51280     # Execute function body
51281 
51282   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51283   REFERENCE_VERSION=6
51284 
51285   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51286     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51287   fi
51288 
51289   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51290     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51291   fi
51292 
51293   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51294   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51295 
51296   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51297     :
51298 
51299   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51300   # runs afoul of the more aggressive versions of these optimisations.
51301   # Notably, value range propagation now assumes that the this pointer of C++
51302   # member functions is non-null.
51303   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51304         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51305         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51306 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51307   CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51308   JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51309 
51310   else
51311     :
51312 
51313   fi
51314 
51315 
51316 
51317 
51318 
51319 
51320 
51321 
51322 
51323 
51324 
51325 
51326 
51327 
51328   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51329     JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
51330 
51331     # Restrict the debug information created by Clang to avoid
51332     # too big object files and speed the build up a little bit
51333     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51334     JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
51335     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51336       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51337         # Force compatibility with i586 on 32 bit intel platforms.
51338         COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
51339         JVM_CFLAGS="$JVM_CFLAGS -march=i586"
51340       fi
51341       JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
51342       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51343           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51344       case $OPENJDK_TARGET_CPU_ARCH in
51345         ppc )
51346           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51347           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51348           ;;
51349         * )
51350           COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51351           CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
51352           ;;
51353       esac
51354     fi
51355   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51356     JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
51357     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51358     if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
51359       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
51360     fi
51361 
51362     CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51363     CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51364   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51365     JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51366     CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51367     CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51368   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51369     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
51370         -MD -Zc:wchar_t- -W3 -wd4800 \
51371         -DWIN32_LEAN_AND_MEAN \
51372         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51373         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51374         -DWIN32 -DIAL"
51375     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51376       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51377     else
51378       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51379     fi
51380     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51381     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51382     # studio.
51383     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51384       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51385       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51386       JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51387     fi
51388   fi
51389 
51390   ###############################################################################
51391 
51392   # Adjust flags according to debug level.
51393   case $DEBUG_LEVEL in
51394     fastdebug | slowdebug )
51395       CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51396       CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51397       ;;
51398     release )
51399       ;;
51400     * )
51401       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51402       ;;
51403   esac
51404 
51405   # Set some common defines. These works for all compilers, but assume
51406   # -D is universally accepted.
51407 
51408   # Setup endianness
51409   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51410     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51411     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51412     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51413     #   Note: -Dmacro         is the same as    #define macro 1
51414     #         -Dmacro=        is the same as    #define macro
51415     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51416       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51417     else
51418       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51419     fi
51420   else
51421     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51422     # are defined in the system?
51423     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51424       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51425     else
51426       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51427     fi
51428   fi
51429 
51430   # Setup target OS define. Use OS target name but in upper case.
51431   OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51432   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
51433 
51434   # Setup target CPU
51435   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51436       $OPENJDK_TARGET_ADD_LP64 \
51437       -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
51438 
51439   # Setup debug/release defines
51440   if test "x$DEBUG_LEVEL" = xrelease; then
51441     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
51442     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51443       COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
51444     fi
51445   else
51446     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
51447   fi
51448 
51449   # Set some additional per-OS defines.
51450   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51451     JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
51452     JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51453         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51454   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51455     JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
51456     JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
51457         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51458   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51459     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51460     JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
51461     JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51462     JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51463         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51464         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51465         -fno-omit-frame-pointer"
51466   elif test "x$OPENJDK_TARGET_OS" = xaix; then
51467     JVM_CFLAGS="$JVM_CFLAGS -DAIX"
51468     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51469     JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
51470         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51471         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51472   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51473     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51474   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51475     JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51476     JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
51477   fi
51478 
51479   # Set some additional per-CPU defines.
51480   if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
51481     JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
51482   elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51483     JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
51484   elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
51485     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51486       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51487       # fixes `relocation truncated to fit' error for gcc 4.1.
51488       JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
51489       # Use ppc64 instructions, but schedule for power5
51490       JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51491     elif test "x$OPENJDK_TARGET_OS" = xaix; then
51492       JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
51493     fi
51494   elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
51495     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51496       JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51497       # Little endian machine uses ELFv2 ABI.
51498       JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
51499       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51500       JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
51501     fi
51502   elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
51503     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51504       JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
51505     fi
51506   fi
51507 
51508   if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
51509     JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51510   fi
51511 
51512   if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
51513     if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
51514       # Solaris does not have _LP64=1 in the old build.
51515       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51516       JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
51517     fi
51518   fi
51519 
51520   # Set JVM_CFLAGS warning handling
51521   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51522     JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51523         -Wunused-value -Woverloaded-virtual"
51524 
51525     if test "x$TOOLCHAIN_TYPE" = xgcc; then
51526 
51527 
51528 
51529 
51530 
51531 
51532 
51533 
51534 
51535 
51536 
51537 
51538 
51539 
51540 
51541 
51542 
51543 
51544 
51545 
51546 
51547 
51548 
51549 
51550 
51551 
51552 
51553 
51554 
51555 
51556 
51557 
51558 
51559 
51560 
51561 
51562 
51563 
51564 
51565 
51566 
51567 
51568 
51569 
51570 
51571 
51572 
51573 
51574 
51575 
51576 
51577 
51578 
51579 
51580     # Execute function body
51581 
51582   # Need to assign to a variable since m4 is blocked from modifying parts in [].
51583   REFERENCE_VERSION=4.8
51584 
51585   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51586     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51587   fi
51588 
51589   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51590     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51591   fi
51592 
51593   # Version comparison method inspired by http://stackoverflow.com/a/24067243
51594   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51595 
51596   if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51597     :
51598 
51599             # These flags either do not work or give spurious warnings prior to gcc 4.8.
51600             JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51601 
51602 
51603   else
51604     :
51605 
51606   fi
51607 
51608 
51609 
51610 
51611 
51612 
51613 
51614 
51615 
51616 
51617 
51618 
51619 
51620 
51621     fi
51622     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51623       # Non-zero builds have stricter warnings
51624       JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51625     else
51626       if test "x$TOOLCHAIN_TYPE" = xclang; then
51627         # Some versions of llvm do not like -Wundef
51628         JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
51629       fi
51630     fi
51631   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51632     JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51633         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51634   fi
51635 
51636   # Additional macosx handling
51637   if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51638     # Setting these parameters makes it an error to link to macosx APIs that are
51639     # newer than the given OS version and makes the linked binaries compatible
51640     # even if built on a newer version of the OS.
51641     # The expected format is X.Y.Z
51642     MACOSX_VERSION_MIN=10.7.0
51643 
51644 
51645     # The macro takes the version with no dots, ex: 1070
51646     # Let the flags variables get resolved in make for easier override on make
51647     # command line.
51648     COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51649     LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51650   fi
51651 
51652   # Setup some hard coded includes
51653   COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
51654       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51655       -I${JDK_TOPDIR}/src/java.base/share/native/include \
51656       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
51657       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
51658       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51659       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
51660 
51661   # The shared libraries are compiled using the picflag.
51662   CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51663       $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51664   CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
51665       $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51666 
51667   # Executable flags
51668   CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
51669   CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
51670 
51671 
51672 
51673 
51674 
51675 
51676   # Setup LDFLAGS et al.
51677   #
51678 
51679   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51680     LDFLAGS_MICROSOFT="-nologo -opt:ref"
51681     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51682     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51683     if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
51684       LDFLAGS_SAFESH="-safeseh"
51685       LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
51686       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
51687       # NOTE: Old build added -machine. Probably not needed.
51688       JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
51689     else
51690       JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
51691     fi
51692   elif test "x$TOOLCHAIN_TYPE" = xclang; then
51693       JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51694       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51695         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51696         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51697     fi
51698   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51699     # If this is a --hash-style=gnu system, use --hash-style=both, why?
51700     # We have previously set HAS_GNU_HASH if this is the case
51701     if test -n "$HAS_GNU_HASH"; then
51702       LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51703       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
51704       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
51705     fi
51706       if test "x$OPENJDK_TARGET_OS" = xmacosx; then
51707         JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51708     fi
51709     if test "x$OPENJDK_TARGET_OS" = xlinux; then
51710       # And since we now know that the linker is gnu, then add -z defs, to forbid
51711       # undefined symbols in object files.
51712       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51713       LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51714       JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51715       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51716       JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51717       if test "x$OPENJDK_TARGET_CPU" = xx86; then
51718         JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
51719       fi
51720       case $DEBUG_LEVEL in
51721         release )
51722           # tell linker to optimize libraries.
51723           # Should this be supplied to the OSS linker as well?
51724           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51725           LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51726           JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51727           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51728             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51729           fi
51730           ;;
51731         slowdebug )
51732           # Hotspot always let the linker optimize
51733           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51734           if test "x$HAS_LINKER_NOW" = "xtrue"; then
51735             # do relocations at load
51736             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
51737             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51738             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
51739           fi
51740           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51741             # mark relocations read only
51742             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51743             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51744             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51745           fi
51746           ;;
51747         fastdebug )
51748           # Hotspot always let the linker optimize
51749           JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
51750           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51751             # mark relocations read only
51752             LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
51753             LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51754             JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
51755           fi
51756           ;;
51757         * )
51758           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51759           ;;
51760         esac
51761     fi
51762   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51763     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51764     LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51765     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51766     LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51767     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51768     if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
51769       JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
51770     fi
51771   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51772     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51773     LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
51774     JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
51775   fi
51776 
51777   # Customize LDFLAGS for executables
51778 
51779   LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
51780 
51781   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51782     if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
51783       LDFLAGS_STACK_SIZE=1048576
51784     else
51785       LDFLAGS_STACK_SIZE=327680
51786     fi
51787     LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51788   elif test "x$OPENJDK_TARGET_OS" = xlinux; then
51789     LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51790   fi
51791 
51792   LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
51793 
51794   # Customize LDFLAGS for libs
51795   LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
51796 
51797   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51798   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51799     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51800         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51801     JDKLIB_LIBS=""
51802   else
51803     JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51804         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51805 
51806     if test "xTARGET" = "xTARGET"; then
51807       # On some platforms (mac) the linker warns about non existing -L dirs.
51808       # For any of the variants server, client or minimal, the dir matches the
51809       # variant name. The "main" variant should be used for linking. For the
51810       # rest, the dir is just server.
51811       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51812           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51813         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51814             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51815       else
51816         JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51817             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51818       fi
51819     elif test "xTARGET" = "xBUILD"; then
51820       # When building a buildjdk, it's always only the server variant
51821       JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
51822           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51823     fi
51824 
51825     JDKLIB_LIBS="-ljava -ljvm"
51826     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51827       JDKLIB_LIBS="$JDKLIB_LIBS -lc"
51828     fi
51829 
51830   fi
51831 
51832 LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
51833 
51834   # Set JVM_LIBS (per os)
51835   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51836     JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
51837   elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
51838     # FIXME: This hard-coded path is not really proper.
51839     if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51840       SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51841     elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51842       SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51843     fi
51844     JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51845         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51846   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51847     JVM_LIBS="$JVM_LIBS -lm"
51848   elif test "x$OPENJDK_TARGET_OS" = xaix; then
51849     JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51850   elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51851     JVM_LIBS="$JVM_LIBS -lm"
51852   elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51853     JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51854         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51855         wsock32.lib winmm.lib version.lib psapi.lib"
51856     fi
51857 
51858   # Set JVM_ASFLAGS
51859   if test "x$OPENJDK_TARGET_OS" = xlinux; then
51860     if test "x$OPENJDK_TARGET_CPU" = xx86; then
51861       JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51862     fi
51863   elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51864     JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51865   fi
51866 
51867   LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51868 
51869 
51870 
51871 
51872 
51873 
51874 
51875 
51876 
51877 
51878 
51879 
51880 
51881 
51882 
51883   # Special extras...
51884   if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51885     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51886       OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51887       OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51888     fi
51889     OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51890     OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51891   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51892     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51893     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51894   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51895     OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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 \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51941 $as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51942   supports=yes
51943 
51944   saved_cxxflags="$CXXFLAGS"
51945   CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -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 
51975   else
51976     :
51977     OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51978   fi
51979 
51980 
51981 
51982 
51983 
51984 
51985 
51986 
51987 
51988 
51989 
51990 
51991     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51992     OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51993 
51994   fi
51995   if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51996     OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51997     OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51998   fi
51999 
52000   OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
52001   OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
52002   OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
52003 
52004   ###############################################################################
52005   #
52006   # Now setup the CFLAGS and LDFLAGS for the JDK build.
52007   # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
52008   #
52009 
52010   # Setup compiler/platform specific flags into
52011   #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
52012   #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
52013   #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
52014   if test "x$TOOLCHAIN_TYPE" = xgcc; then
52015     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52016     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
52017     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
52018     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52019       # Force compatibility with i586 on 32 bit intel platforms.
52020       OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52021       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52022     fi
52023     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52024         -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52025     case $OPENJDK_BUILD_CPU_ARCH in
52026       arm )
52027         # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52028         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52029         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
52030         ;;
52031       ppc )
52032         # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52033         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52034         ;;
52035       s390 )
52036         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
52037         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52038         ;;
52039       * )
52040         OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52041         OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52042         ;;
52043     esac
52044 
52045 
52046 
52047 
52048 
52049 
52050 
52051 
52052 
52053 
52054 
52055 
52056 
52057 
52058 
52059 
52060 
52061 
52062 
52063 
52064 
52065 
52066 
52067 
52068 
52069 
52070 
52071 
52072 
52073 
52074 
52075 
52076 
52077 
52078 
52079 
52080 
52081 
52082 
52083 
52084 
52085 
52086 
52087 
52088 
52089 
52090 
52091 
52092 
52093 
52094 
52095 
52096 
52097 
52098     # Execute function body
52099 
52100   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52101   REFERENCE_VERSION=6
52102 
52103   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52104     as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52105   fi
52106 
52107   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52108     as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
52109   fi
52110 
52111   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52112   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52113 
52114   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52115     :
52116 
52117   # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
52118   # runs afoul of the more aggressive versions of these optimisations.
52119   # Notably, value range propagation now assumes that the this pointer of C++
52120   # member functions is non-null.
52121   NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
52122         NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
52123         { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
52124 $as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
52125   OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52126   OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
52127 
52128   else
52129     :
52130 
52131   fi
52132 
52133 
52134 
52135 
52136 
52137 
52138 
52139 
52140 
52141 
52142 
52143 
52144 
52145 
52146   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52147     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
52148 
52149     # Restrict the debug information created by Clang to avoid
52150     # too big object files and speed the build up a little bit
52151     # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
52152     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
52153     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52154       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52155         # Force compatibility with i586 on 32 bit intel platforms.
52156         OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
52157         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
52158       fi
52159       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
52160       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
52161           -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
52162       case $OPENJDK_BUILD_CPU_ARCH in
52163         ppc )
52164           # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
52165           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52166           ;;
52167         * )
52168           OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
52169           OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
52170           ;;
52171       esac
52172     fi
52173   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52174     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
52175     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
52176     if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
52177       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
52178     fi
52179 
52180     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
52181     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
52182   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52183     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
52184     OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52185     OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
52186   elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52187     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52188         -MD -Zc:wchar_t- -W3 -wd4800 \
52189         -DWIN32_LEAN_AND_MEAN \
52190         -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
52191         -D_WINSOCK_DEPRECATED_NO_WARNINGS \
52192         -DWIN32 -DIAL"
52193     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52194       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
52195     else
52196       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
52197     fi
52198     # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
52199     # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
52200     # studio.
52201     if test "x$TOOLCHAIN_VERSION" = "x2010"; then
52202       STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
52203       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
52204       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
52205     fi
52206   fi
52207 
52208   ###############################################################################
52209 
52210   # Adjust flags according to debug level.
52211   case $DEBUG_LEVEL in
52212     fastdebug | slowdebug )
52213       OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
52214       OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
52215       ;;
52216     release )
52217       ;;
52218     * )
52219       as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52220       ;;
52221   esac
52222 
52223   # Set some common defines. These works for all compilers, but assume
52224   # -D is universally accepted.
52225 
52226   # Setup endianness
52227   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52228     # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
52229     #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
52230     #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
52231     #   Note: -Dmacro         is the same as    #define macro 1
52232     #         -Dmacro=        is the same as    #define macro
52233     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52234       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
52235     else
52236       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
52237     fi
52238   else
52239     # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
52240     # are defined in the system?
52241     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52242       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
52243     else
52244       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
52245     fi
52246   fi
52247 
52248   # Setup target OS define. Use OS target name but in upper case.
52249   OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
52250   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
52251 
52252   # Setup target CPU
52253   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52254       $OPENJDK_BUILD_ADD_LP64 \
52255       -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
52256 
52257   # Setup debug/release defines
52258   if test "x$DEBUG_LEVEL" = xrelease; then
52259     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
52260     if test "x$OPENJDK_BUILD_OS" = xsolaris; then
52261       OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
52262     fi
52263   else
52264     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
52265   fi
52266 
52267   # Set some additional per-OS defines.
52268   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52269     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
52270     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
52271         -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
52272   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52273     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
52274     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
52275         -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
52276   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52277     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
52278     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
52279     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
52280     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
52281         -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
52282         -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
52283         -fno-omit-frame-pointer"
52284   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52285     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
52286     # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
52287     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
52288         -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
52289         -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
52290   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52291     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
52292   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52293     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
52294     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
52295   fi
52296 
52297   # Set some additional per-CPU defines.
52298   if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
52299     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
52300   elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52301     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
52302   elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
52303     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52304       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52305       # fixes `relocation truncated to fit' error for gcc 4.1.
52306       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
52307       # Use ppc64 instructions, but schedule for power5
52308       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
52309     elif test "x$OPENJDK_BUILD_OS" = xaix; then
52310       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
52311     fi
52312   elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
52313     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52314       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
52315       # Little endian machine uses ELFv2 ABI.
52316       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
52317       # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
52318       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
52319     fi
52320   elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
52321     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52322       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
52323     fi
52324   fi
52325 
52326   if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
52327     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
52328   fi
52329 
52330   if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
52331     if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
52332       # Solaris does not have _LP64=1 in the old build.
52333       # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
52334       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
52335     fi
52336   fi
52337 
52338   # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
52339   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52340     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
52341         -Wunused-value -Woverloaded-virtual"
52342 
52343     if test "x$TOOLCHAIN_TYPE" = xgcc; then
52344 
52345 
52346 
52347 
52348 
52349 
52350 
52351 
52352 
52353 
52354 
52355 
52356 
52357 
52358 
52359 
52360 
52361 
52362 
52363 
52364 
52365 
52366 
52367 
52368 
52369 
52370 
52371 
52372 
52373 
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     # Execute function body
52399 
52400   # Need to assign to a variable since m4 is blocked from modifying parts in [].
52401   REFERENCE_VERSION=4.8
52402 
52403   if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
52404     as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
52405   fi
52406 
52407   if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
52408     as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
52409   fi
52410 
52411   # Version comparison method inspired by http://stackoverflow.com/a/24067243
52412   COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
52413 
52414   if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
52415     :
52416 
52417             # These flags either do not work or give spurious warnings prior to gcc 4.8.
52418             OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
52419 
52420 
52421   else
52422     :
52423 
52424   fi
52425 
52426 
52427 
52428 
52429 
52430 
52431 
52432 
52433 
52434 
52435 
52436 
52437 
52438 
52439     fi
52440     if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52441       # Non-zero builds have stricter warnings
52442       OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
52443     else
52444       if test "x$TOOLCHAIN_TYPE" = xclang; then
52445         # Some versions of llvm do not like -Wundef
52446         OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
52447       fi
52448     fi
52449   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52450     OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
52451         -Wsign-compare -Wundef -Wunused-function -Wformat=2"
52452   fi
52453 
52454   # Additional macosx handling
52455   if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52456     # Setting these parameters makes it an error to link to macosx APIs that are
52457     # newer than the given OS version and makes the linked binaries compatible
52458     # even if built on a newer version of the OS.
52459     # The expected format is X.Y.Z
52460     MACOSX_VERSION_MIN=10.7.0
52461 
52462 
52463     # The macro takes the version with no dots, ex: 1070
52464     # Let the flags variables get resolved in make for easier override on make
52465     # command line.
52466     OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52467     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
52468   fi
52469 
52470   # Setup some hard coded includes
52471   OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52472       -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
52473       -I${JDK_TOPDIR}/src/java.base/share/native/include \
52474       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
52475       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
52476       -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
52477       -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
52478 
52479   # The shared libraries are compiled using the picflag.
52480   OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52481       $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
52482   OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
52483       $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
52484 
52485   # Executable flags
52486   OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
52487   OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
52488 
52489 
52490 
52491 
52492 
52493 
52494   # Setup LDFLAGS et al.
52495   #
52496 
52497   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52498     LDFLAGS_MICROSOFT="-nologo -opt:ref"
52499     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
52500     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
52501     if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
52502       LDFLAGS_SAFESH="-safeseh"
52503       OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
52504       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
52505       # NOTE: Old build added -machine. Probably not needed.
52506       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
52507     else
52508       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
52509     fi
52510   elif test "x$TOOLCHAIN_TYPE" = xclang; then
52511       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
52512       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52513         # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
52514         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52515     fi
52516   elif test "x$TOOLCHAIN_TYPE" = xgcc; then
52517     # If this is a --hash-style=gnu system, use --hash-style=both, why?
52518     # We have previously set HAS_GNU_HASH if this is the case
52519     if test -n "$HAS_GNU_HASH"; then
52520       OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
52521       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52522       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
52523     fi
52524       if test "x$OPENJDK_BUILD_OS" = xmacosx; then
52525         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
52526     fi
52527     if test "x$OPENJDK_BUILD_OS" = xlinux; then
52528       # And since we now know that the linker is gnu, then add -z defs, to forbid
52529       # undefined symbols in object files.
52530       LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
52531       OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
52532       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
52533       LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
52534       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
52535       if test "x$OPENJDK_BUILD_CPU" = xx86; then
52536         OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
52537       fi
52538       case $DEBUG_LEVEL in
52539         release )
52540           # tell linker to optimize libraries.
52541           # Should this be supplied to the OSS linker as well?
52542           LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
52543           OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
52544           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
52545           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52546             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52547           fi
52548           ;;
52549         slowdebug )
52550           # Hotspot always let the linker optimize
52551           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52552           if test "x$HAS_LINKER_NOW" = "xtrue"; then
52553             # do relocations at load
52554             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
52555             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
52556             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
52557           fi
52558           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52559             # mark relocations read only
52560             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52561             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52562             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52563           fi
52564           ;;
52565         fastdebug )
52566           # Hotspot always let the linker optimize
52567           OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
52568           if test "x$HAS_LINKER_RELRO" = "xtrue"; then
52569             # mark relocations read only
52570             OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
52571             OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
52572             OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
52573           fi
52574           ;;
52575         * )
52576           as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
52577           ;;
52578         esac
52579     fi
52580   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52581     LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
52582     OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
52583     LDFLAGS_CXX_SOLSTUDIO="-norunpath"
52584     OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
52585     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
52586     if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
52587       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
52588     fi
52589   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
52590     LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
52591     OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
52592     OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
52593   fi
52594 
52595   # Customize LDFLAGS for executables
52596 
52597   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
52598 
52599   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52600     if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
52601       LDFLAGS_STACK_SIZE=1048576
52602     else
52603       LDFLAGS_STACK_SIZE=327680
52604     fi
52605     OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
52606   elif test "x$OPENJDK_BUILD_OS" = xlinux; then
52607     OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
52608   fi
52609 
52610   OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52611 
52612   # Customize LDFLAGS for libs
52613   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
52614 
52615   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
52616   if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
52617     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52618         -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
52619     OPENJDK_BUILD_JDKLIB_LIBS=""
52620   else
52621     OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52622         -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
52623 
52624     if test "xBUILD" = "xTARGET"; then
52625       # On some platforms (mac) the linker warns about non existing -L dirs.
52626       # For any of the variants server, client or minimal, the dir matches the
52627       # variant name. The "main" variant should be used for linking. For the
52628       # rest, the dir is just server.
52629       if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
52630           ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
52631         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52632             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
52633       else
52634         OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52635             -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52636       fi
52637     elif test "xBUILD" = "xBUILD"; then
52638       # When building a buildjdk, it's always only the server variant
52639       OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
52640           -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
52641     fi
52642 
52643     OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
52644     if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
52645       OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
52646     fi
52647 
52648   fi
52649 
52650 OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
52651 
52652   # Set OPENJDK_BUILD_JVM_LIBS (per os)
52653   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52654     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
52655   elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
52656     # FIXME: This hard-coded path is not really proper.
52657     if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
52658       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
52659     elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
52660       OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
52661     fi
52662     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
52663         -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
52664   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52665     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52666   elif test "x$OPENJDK_BUILD_OS" = xaix; then
52667     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
52668   elif test "x$OPENJDK_BUILD_OS" = xbsd; then
52669     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
52670   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
52671     OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
52672         comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
52673         wsock32.lib winmm.lib version.lib psapi.lib"
52674     fi
52675 
52676   # Set OPENJDK_BUILD_JVM_ASFLAGS
52677   if test "x$OPENJDK_BUILD_OS" = xlinux; then
52678     if test "x$OPENJDK_BUILD_CPU" = xx86; then
52679       OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
52680     fi
52681   elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
52682     OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
52683   fi
52684 
52685   OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
52686 
52687 
52688 
52689 
52690 
52691 
52692 
52693 
52694 
52695 
52696 
52697 
52698 
52699 
52700 
52701   # Tests are only ever compiled for TARGET
52702   # Flags for compiling test libraries
52703   CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
52704   CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
52705 
52706   # Flags for compiling test executables
52707   CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
52708   CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
52709 
52710 
52711 
52712 
52713 
52714 
52715   LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
52716   LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
52717 
52718 
52719 
52720 
52721 
52722 
52723   # Check that the compiler supports -mX (or -qX on AIX) flags
52724   # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52725 
52726 
52727 
52728 
52729 
52730 
52731 
52732 
52733 
52734 
52735 
52736 
52737 
52738 
52739 
52740 
52741 
52742 
52743 
52744 
52745 
52746 
52747 
52748 
52749 
52750 
52751 
52752 
52753 
52754 
52755 
52756 
52757 
52758 
52759 
52760 
52761 
52762 
52763 
52764 
52765 
52766 
52767 
52768 
52769 
52770 
52771 
52772     # Execute function body
52773 
52774 
52775 
52776 
52777 
52778 
52779 
52780 
52781 
52782 
52783 
52784 
52785 
52786 
52787 
52788 
52789 
52790 
52791 
52792 
52793 
52794 
52795 
52796 
52797 
52798 
52799 
52800 
52801 
52802 
52803 
52804 
52805 
52806 
52807 
52808 
52809 
52810 
52811 
52812 
52813 
52814 
52815 
52816 
52817 
52818 
52819 
52820 
52821     # Execute function body
52822 
52823   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52824 $as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52825   supports=yes
52826 
52827   saved_cflags="$CFLAGS"
52828   CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52829   ac_ext=c
52830 ac_cpp='$CPP $CPPFLAGS'
52831 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52832 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52833 ac_compiler_gnu=$ac_cv_c_compiler_gnu
52834 
52835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52836 /* end confdefs.h.  */
52837 int i;
52838 _ACEOF
52839 if ac_fn_c_try_compile "$LINENO"; then :
52840 
52841 else
52842   supports=no
52843 fi
52844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52845   ac_ext=cpp
52846 ac_cpp='$CXXCPP $CPPFLAGS'
52847 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52848 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52849 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52850 
52851   CFLAGS="$saved_cflags"
52852 
52853   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52854 $as_echo "$supports" >&6; }
52855   if test "x$supports" = "xyes" ; then
52856     :
52857     C_COMP_SUPPORTS="yes"
52858   else
52859     :
52860     C_COMP_SUPPORTS="no"
52861   fi
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 
52896 
52897 
52898 
52899 
52900 
52901 
52902 
52903 
52904 
52905 
52906 
52907 
52908 
52909 
52910 
52911 
52912 
52913 
52914 
52915 
52916 
52917 
52918 
52919 
52920 
52921     # Execute function body
52922 
52923   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52924 $as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52925   supports=yes
52926 
52927   saved_cxxflags="$CXXFLAGS"
52928   CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52929   ac_ext=cpp
52930 ac_cpp='$CXXCPP $CPPFLAGS'
52931 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52932 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52933 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52934 
52935   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52936 /* end confdefs.h.  */
52937 int i;
52938 _ACEOF
52939 if ac_fn_cxx_try_compile "$LINENO"; then :
52940 
52941 else
52942   supports=no
52943 fi
52944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52945   ac_ext=cpp
52946 ac_cpp='$CXXCPP $CPPFLAGS'
52947 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52948 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52949 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52950 
52951   CXXFLAGS="$saved_cxxflags"
52952 
52953   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52954 $as_echo "$supports" >&6; }
52955   if test "x$supports" = "xyes" ; then
52956     :
52957     CXX_COMP_SUPPORTS="yes"
52958   else
52959     :
52960     CXX_COMP_SUPPORTS="no"
52961   fi
52962 
52963 
52964 
52965 
52966 
52967 
52968 
52969 
52970 
52971 
52972 
52973 
52974 
52975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52976 $as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52977   supports=no
52978   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52979 
52980   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52981 $as_echo "$supports" >&6; }
52982   if test "x$supports" = "xyes" ; then
52983     :
52984     COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52985   else
52986     :
52987     COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52988   fi
52989 
52990 
52991 
52992 
52993 
52994 
52995 
52996 
52997   # Check whether --enable-warnings-as-errors was given.
52998 if test "${enable_warnings_as_errors+set}" = set; then :
52999   enableval=$enable_warnings_as_errors;
53000 fi
53001 
53002 
53003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
53004 $as_echo_n "checking if native warnings are errors... " >&6; }
53005   if test "x$enable_warnings_as_errors" = "xyes"; then
53006     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
53007 $as_echo "yes (explicitly set)" >&6; }
53008     WARNINGS_AS_ERRORS=true
53009   elif test "x$enable_warnings_as_errors" = "xno"; then
53010     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53011 $as_echo "no" >&6; }
53012     WARNINGS_AS_ERRORS=false
53013   elif test "x$enable_warnings_as_errors" = "x"; then
53014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
53015 $as_echo "yes (default)" >&6; }
53016     WARNINGS_AS_ERRORS=true
53017   else
53018     as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
53019   fi
53020 
53021 
53022 
53023   case "${TOOLCHAIN_TYPE}" in
53024     microsoft)
53025       DISABLE_WARNING_PREFIX="-wd"
53026       CFLAGS_WARNINGS_ARE_ERRORS="-WX"
53027       ;;
53028     solstudio)
53029       DISABLE_WARNING_PREFIX="-erroff="
53030       CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
53031       ;;
53032     gcc)
53033       # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
53034 
53035 
53036 
53037 
53038 
53039 
53040 
53041 
53042 
53043 
53044 
53045 
53046 
53047 
53048 
53049 
53050 
53051 
53052 
53053 
53054 
53055 
53056 
53057 
53058 
53059 
53060 
53061 
53062 
53063 
53064 
53065 
53066 
53067 
53068 
53069 
53070 
53071 
53072 
53073 
53074 
53075 
53076 
53077 
53078 
53079 
53080 
53081     # Execute function body
53082 
53083 
53084 
53085 
53086 
53087 
53088 
53089 
53090 
53091 
53092 
53093 
53094 
53095 
53096 
53097 
53098 
53099 
53100 
53101 
53102 
53103 
53104 
53105 
53106 
53107 
53108 
53109 
53110 
53111 
53112 
53113 
53114 
53115 
53116 
53117 
53118 
53119 
53120 
53121 
53122 
53123 
53124 
53125 
53126 
53127 
53128 
53129 
53130     # Execute function body
53131 
53132   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53133 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53134   supports=yes
53135 
53136   saved_cflags="$CFLAGS"
53137   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53138   ac_ext=c
53139 ac_cpp='$CPP $CPPFLAGS'
53140 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53141 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53142 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53143 
53144   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53145 /* end confdefs.h.  */
53146 int i;
53147 _ACEOF
53148 if ac_fn_c_try_compile "$LINENO"; then :
53149 
53150 else
53151   supports=no
53152 fi
53153 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53154   ac_ext=cpp
53155 ac_cpp='$CXXCPP $CPPFLAGS'
53156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53157 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53159 
53160   CFLAGS="$saved_cflags"
53161 
53162   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53163 $as_echo "$supports" >&6; }
53164   if test "x$supports" = "xyes" ; then
53165     :
53166     C_COMP_SUPPORTS="yes"
53167   else
53168     :
53169     C_COMP_SUPPORTS="no"
53170   fi
53171 
53172 
53173 
53174 
53175 
53176 
53177 
53178 
53179 
53180 
53181 
53182 
53183 
53184 
53185 
53186 
53187 
53188 
53189 
53190 
53191 
53192 
53193 
53194 
53195 
53196 
53197 
53198 
53199 
53200 
53201 
53202 
53203 
53204 
53205 
53206 
53207 
53208 
53209 
53210 
53211 
53212 
53213 
53214 
53215 
53216 
53217 
53218 
53219 
53220 
53221 
53222 
53223 
53224 
53225 
53226 
53227 
53228 
53229 
53230     # Execute function body
53231 
53232   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53233 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53234   supports=yes
53235 
53236   saved_cxxflags="$CXXFLAGS"
53237   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53238   ac_ext=cpp
53239 ac_cpp='$CXXCPP $CPPFLAGS'
53240 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53241 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53242 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53243 
53244   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53245 /* end confdefs.h.  */
53246 int i;
53247 _ACEOF
53248 if ac_fn_cxx_try_compile "$LINENO"; then :
53249 
53250 else
53251   supports=no
53252 fi
53253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53254   ac_ext=cpp
53255 ac_cpp='$CXXCPP $CPPFLAGS'
53256 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53257 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53258 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53259 
53260   CXXFLAGS="$saved_cxxflags"
53261 
53262   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53263 $as_echo "$supports" >&6; }
53264   if test "x$supports" = "xyes" ; then
53265     :
53266     CXX_COMP_SUPPORTS="yes"
53267   else
53268     :
53269     CXX_COMP_SUPPORTS="no"
53270   fi
53271 
53272 
53273 
53274 
53275 
53276 
53277 
53278 
53279 
53280 
53281 
53282 
53283 
53284   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53285 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53286   supports=no
53287   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53288 
53289   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53290 $as_echo "$supports" >&6; }
53291   if test "x$supports" = "xyes" ; then
53292     :
53293     GCC_CAN_DISABLE_WARNINGS=true
53294   else
53295     :
53296     GCC_CAN_DISABLE_WARNINGS=false
53297 
53298   fi
53299 
53300 
53301 
53302 
53303 
53304 
53305       if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53306         DISABLE_WARNING_PREFIX="-Wno-"
53307       else
53308         DISABLE_WARNING_PREFIX=
53309       fi
53310       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53311       # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
53312       # CFLAGS since any target specific flags will likely not work with the
53313       # build compiler
53314       CC_OLD="$CC"
53315       CXX_OLD="$CXX"
53316       CC="$BUILD_CC"
53317       CXX="$BUILD_CXX"
53318       CFLAGS_OLD="$CFLAGS"
53319       CFLAGS=""
53320 
53321 
53322 
53323 
53324 
53325 
53326 
53327 
53328 
53329 
53330 
53331 
53332 
53333 
53334 
53335 
53336 
53337 
53338 
53339 
53340 
53341 
53342 
53343 
53344 
53345 
53346 
53347 
53348 
53349 
53350 
53351 
53352 
53353 
53354 
53355 
53356 
53357 
53358 
53359 
53360 
53361 
53362 
53363 
53364 
53365 
53366 
53367     # Execute function body
53368 
53369 
53370 
53371 
53372 
53373 
53374 
53375 
53376 
53377 
53378 
53379 
53380 
53381 
53382 
53383 
53384 
53385 
53386 
53387 
53388 
53389 
53390 
53391 
53392 
53393 
53394 
53395 
53396 
53397 
53398 
53399 
53400 
53401 
53402 
53403 
53404 
53405 
53406 
53407 
53408 
53409 
53410 
53411 
53412 
53413 
53414 
53415 
53416     # Execute function body
53417 
53418   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53419 $as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53420   supports=yes
53421 
53422   saved_cflags="$CFLAGS"
53423   CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
53424   ac_ext=c
53425 ac_cpp='$CPP $CPPFLAGS'
53426 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53427 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53428 ac_compiler_gnu=$ac_cv_c_compiler_gnu
53429 
53430   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53431 /* end confdefs.h.  */
53432 int i;
53433 _ACEOF
53434 if ac_fn_c_try_compile "$LINENO"; then :
53435 
53436 else
53437   supports=no
53438 fi
53439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53440   ac_ext=cpp
53441 ac_cpp='$CXXCPP $CPPFLAGS'
53442 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53443 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53444 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53445 
53446   CFLAGS="$saved_cflags"
53447 
53448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53449 $as_echo "$supports" >&6; }
53450   if test "x$supports" = "xyes" ; then
53451     :
53452     C_COMP_SUPPORTS="yes"
53453   else
53454     :
53455     C_COMP_SUPPORTS="no"
53456   fi
53457 
53458 
53459 
53460 
53461 
53462 
53463 
53464 
53465 
53466 
53467 
53468 
53469 
53470 
53471 
53472 
53473 
53474 
53475 
53476 
53477 
53478 
53479 
53480 
53481 
53482 
53483 
53484 
53485 
53486 
53487 
53488 
53489 
53490 
53491 
53492 
53493 
53494 
53495 
53496 
53497 
53498 
53499 
53500 
53501 
53502 
53503 
53504 
53505 
53506 
53507 
53508 
53509 
53510 
53511 
53512 
53513 
53514 
53515 
53516     # Execute function body
53517 
53518   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53519 $as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53520   supports=yes
53521 
53522   saved_cxxflags="$CXXFLAGS"
53523   CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
53524   ac_ext=cpp
53525 ac_cpp='$CXXCPP $CPPFLAGS'
53526 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53527 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53528 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53529 
53530   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53531 /* end confdefs.h.  */
53532 int i;
53533 _ACEOF
53534 if ac_fn_cxx_try_compile "$LINENO"; then :
53535 
53536 else
53537   supports=no
53538 fi
53539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
53540   ac_ext=cpp
53541 ac_cpp='$CXXCPP $CPPFLAGS'
53542 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53543 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53544 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53545 
53546   CXXFLAGS="$saved_cxxflags"
53547 
53548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53549 $as_echo "$supports" >&6; }
53550   if test "x$supports" = "xyes" ; then
53551     :
53552     CXX_COMP_SUPPORTS="yes"
53553   else
53554     :
53555     CXX_COMP_SUPPORTS="no"
53556   fi
53557 
53558 
53559 
53560 
53561 
53562 
53563 
53564 
53565 
53566 
53567 
53568 
53569 
53570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53571 $as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53572   supports=no
53573   if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53574 
53575   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53576 $as_echo "$supports" >&6; }
53577   if test "x$supports" = "xyes" ; then
53578     :
53579     BUILD_CC_CAN_DISABLE_WARNINGS=true
53580   else
53581     :
53582     BUILD_CC_CAN_DISABLE_WARNINGS=false
53583 
53584   fi
53585 
53586 
53587 
53588 
53589 
53590 
53591       if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53592         BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53593       else
53594         BUILD_CC_DISABLE_WARNING_PREFIX=
53595       fi
53596       CC="$CC_OLD"
53597       CXX="$CXX_OLD"
53598       CFLAGS="$CFLAGS_OLD"
53599       ;;
53600     clang)
53601       DISABLE_WARNING_PREFIX="-Wno-"
53602       CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53603       ;;
53604     xlc)
53605       DISABLE_WARNING_PREFIX="-qsuppress="
53606       CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53607       ;;
53608   esac
53609 
53610 
53611 
53612 
53613 
53614 # Setup debug symbols (need objcopy from the toolchain for that)
53615 
53616   #
53617   # NATIVE_DEBUG_SYMBOLS
53618   # This must be done after the toolchain is setup, since we're looking at objcopy.
53619   #
53620   { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53621 $as_echo_n "checking what type of native debug symbols to use... " >&6; }
53622 
53623 # Check whether --with-native-debug-symbols was given.
53624 if test "${with_native_debug_symbols+set}" = set; then :
53625   withval=$with_native_debug_symbols;
53626         if test "x$OPENJDK_TARGET_OS" = xaix; then
53627           if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53628             as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53629           fi
53630         fi
53631 
53632 else
53633 
53634         if test "x$OPENJDK_TARGET_OS" = xaix; then
53635           # AIX doesn't support 'zipped' so use 'internal' as default
53636           with_native_debug_symbols="internal"
53637         else
53638           if test "x$STATIC_BUILD" = xtrue; then
53639             with_native_debug_symbols="none"
53640           else
53641             with_native_debug_symbols="zipped"
53642           fi
53643         fi
53644 
53645 fi
53646 
53647   NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53648   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53649 $as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53650 
53651   if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53652 
53653     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53654       if test "x$OBJCOPY" = x; then
53655         # enabling of enable-debug-symbols and can't find objcopy
53656         # this is an error
53657         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53658       fi
53659     fi
53660 
53661     COMPILE_WITH_DEBUG_SYMBOLS=true
53662     COPY_DEBUG_SYMBOLS=true
53663     ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53664   elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53665     COMPILE_WITH_DEBUG_SYMBOLS=false
53666     COPY_DEBUG_SYMBOLS=false
53667     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53668   elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53669     COMPILE_WITH_DEBUG_SYMBOLS=true
53670     COPY_DEBUG_SYMBOLS=false
53671     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53672   elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53673 
53674     if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53675       if test "x$OBJCOPY" = x; then
53676         # enabling of enable-debug-symbols and can't find objcopy
53677         # this is an error
53678         as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53679       fi
53680     fi
53681 
53682     COMPILE_WITH_DEBUG_SYMBOLS=true
53683     COPY_DEBUG_SYMBOLS=true
53684     ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53685   else
53686     as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53687   fi
53688 
53689   # --enable-debug-symbols is deprecated.
53690   # Please use --with-native-debug-symbols=[internal,external,zipped] .
53691 
53692   # Check whether --enable-debug-symbols was given.
53693 if test "${enable_debug_symbols+set}" = set; then :
53694   enableval=$enable_debug_symbols;
53695 fi
53696 
53697   if test "x$enable_debug_symbols" != x; then
53698     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53699 $as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53700 
53701     if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53702       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53703 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53704     fi
53705 
53706   fi
53707 
53708 
53709   # --enable-zip-debug-info is deprecated.
53710   # Please use --with-native-debug-symbols=zipped .
53711 
53712   # Check whether --enable-zip-debug-info was given.
53713 if test "${enable_zip_debug_info+set}" = set; then :
53714   enableval=$enable_zip_debug_info;
53715 fi
53716 
53717   if test "x$enable_zip_debug_info" != x; then
53718     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53719 $as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53720 
53721     if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53722       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53723 $as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53724     fi
53725 
53726   fi
53727 
53728 
53729 
53730 
53731 
53732 
53733 
53734   # Check whether --enable-native-coverage was given.
53735 if test "${enable_native_coverage+set}" = set; then :
53736   enableval=$enable_native_coverage;
53737 fi
53738 
53739   GCOV_ENABLED="false"
53740   if test "x$enable_native_coverage" = "xyes"; then
53741     if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53742       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53743 $as_echo_n "checking if native coverage is enabled... " >&6; }
53744       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53745 $as_echo "yes" >&6; }
53746       GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53747       GCOV_LDFLAGS="-fprofile-arcs"
53748       JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
53749       JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
53750       CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53751       CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53752       CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53753       CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53754       LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53755       LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53756       GCOV_ENABLED="true"
53757     else
53758       as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53759     fi
53760   elif test "x$enable_native_coverage" = "xno"; then
53761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53762 $as_echo_n "checking if native coverage is enabled... " >&6; }
53763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53764 $as_echo "no" >&6; }
53765   elif test "x$enable_native_coverage" != "x"; then
53766     as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53767   fi
53768 
53769 
53770 
53771 
53772 # Need toolchain to setup dtrace
53773 
53774   # Test for dtrace dependencies
53775   # Check whether --enable-dtrace was given.
53776 if test "${enable_dtrace+set}" = set; then :
53777   enableval=$enable_dtrace;
53778 fi
53779 
53780 
53781   DTRACE_DEP_MISSING=false
53782 
53783   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53784 $as_echo_n "checking for dtrace tool... " >&6; }
53785   if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53786     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53787 $as_echo "$DTRACE" >&6; }
53788   else
53789     { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53790 $as_echo "not found, cannot build dtrace" >&6; }
53791     DTRACE_DEP_MISSING=true
53792   fi
53793 
53794   for ac_header in sys/sdt.h
53795 do :
53796   ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53797 if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53798   cat >>confdefs.h <<_ACEOF
53799 #define HAVE_SYS_SDT_H 1
53800 _ACEOF
53801  DTRACE_HEADERS_OK=yes
53802 else
53803   DTRACE_HEADERS_OK=no
53804 fi
53805 
53806 done
53807 
53808   if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53809     DTRACE_DEP_MISSING=true
53810   fi
53811 
53812   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53813 $as_echo_n "checking if dtrace should be built... " >&6; }
53814   if test "x$enable_dtrace" = "xyes"; then
53815     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53816       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53817 $as_echo "no, missing dependencies" >&6; }
53818 
53819   # Print a helpful message on how to acquire the necessary build dependency.
53820   # dtrace is the help tag: freetype, cups, alsa etc
53821   MISSING_DEPENDENCY=dtrace
53822 
53823   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53824     cygwin_help $MISSING_DEPENDENCY
53825   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53826     msys_help $MISSING_DEPENDENCY
53827   else
53828     PKGHANDLER_COMMAND=
53829 
53830     case $PKGHANDLER in
53831       apt-get)
53832         apt_help     $MISSING_DEPENDENCY ;;
53833       yum)
53834         yum_help     $MISSING_DEPENDENCY ;;
53835       brew)
53836         brew_help    $MISSING_DEPENDENCY ;;
53837       port)
53838         port_help    $MISSING_DEPENDENCY ;;
53839       pkgutil)
53840         pkgutil_help $MISSING_DEPENDENCY ;;
53841       pkgadd)
53842         pkgadd_help  $MISSING_DEPENDENCY ;;
53843     esac
53844 
53845     if test "x$PKGHANDLER_COMMAND" != x; then
53846       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53847     fi
53848   fi
53849 
53850       as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53851     else
53852       INCLUDE_DTRACE=true
53853       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53854 $as_echo "yes, forced" >&6; }
53855     fi
53856   elif test "x$enable_dtrace" = "xno"; then
53857     INCLUDE_DTRACE=false
53858     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53859 $as_echo "no, forced" >&6; }
53860   elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53861     if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53862       INCLUDE_DTRACE=false
53863       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53864 $as_echo "no, missing dependencies" >&6; }
53865     else
53866       INCLUDE_DTRACE=true
53867       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53868 $as_echo "yes, dependencies present" >&6; }
53869     fi
53870   else
53871     as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53872   fi
53873 
53874 
53875   # Check whether --enable-aot was given.
53876 if test "${enable_aot+set}" = set; then :
53877   enableval=$enable_aot;
53878 fi
53879 
53880 
53881   if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53882     ENABLE_AOT="true"
53883   elif test "x$enable_aot" = "xyes"; then
53884     ENABLE_AOT="true"
53885   elif test "x$enable_aot" = "xno"; then
53886     ENABLE_AOT="false"
53887     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53888 $as_echo_n "checking if aot should be enabled... " >&6; }
53889     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53890 $as_echo "no, forced" >&6; }
53891   else
53892     as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53893   fi
53894 
53895   if test "x$ENABLE_AOT" = "xtrue"; then
53896     # Only enable AOT on linux-X64.
53897     if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = "xlinux-x86_64"; then
53898       if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53899         if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53900           ENABLE_AOT="true"
53901         else
53902           ENABLE_AOT="false"
53903           if test "x$enable_aot" = "xyes"; then
53904             as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53905           fi
53906         fi
53907       else
53908         ENABLE_AOT="false"
53909         if test "x$enable_aot" = "xyes"; then
53910           as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53911         fi
53912       fi
53913     else
53914       ENABLE_AOT="false"
53915       if test "x$enable_aot" = "xyes"; then
53916         as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53917       fi
53918     fi
53919   fi
53920 
53921 
53922 
53923 
53924   # Check whether --enable-hotspot-gtest was given.
53925 if test "${enable_hotspot_gtest+set}" = set; then :
53926   enableval=$enable_hotspot_gtest;
53927 fi
53928 
53929 
53930   if test -e "$HOTSPOT_TOPDIR/test/native"; then
53931     GTEST_DIR_EXISTS="true"
53932   else
53933     GTEST_DIR_EXISTS="false"
53934   fi
53935 
53936   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53937 $as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53938   if test "x$enable_hotspot_gtest" = "xyes"; then
53939     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53940       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53941 $as_echo "yes, forced" >&6; }
53942       BUILD_GTEST="true"
53943     else
53944       as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53945     fi
53946   elif test "x$enable_hotspot_gtest" = "xno"; then
53947     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53948 $as_echo "no, forced" >&6; }
53949     BUILD_GTEST="false"
53950   elif test "x$enable_hotspot_gtest" = "x"; then
53951     if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53952       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53953 $as_echo "yes" >&6; }
53954       BUILD_GTEST="true"
53955     else
53956       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53957 $as_echo "no" >&6; }
53958       BUILD_GTEST="false"
53959     fi
53960   else
53961     as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53962   fi
53963 
53964 
53965 
53966 
53967 ###############################################################################
53968 #
53969 # Check dependencies for external and internal libraries.
53970 #
53971 ###############################################################################
53972 
53973 # After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53974 
53975   # When using cygwin or msys, we need a wrapper binary that renames
53976   # /cygdrive/c/ arguments into c:/ arguments and peeks into
53977   # @files and rewrites these too! This wrapper binary is
53978   # called fixpath.
53979   FIXPATH=
53980   if test "x$OPENJDK_BUILD_OS" = xwindows; then
53981     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53982 $as_echo_n "checking if fixpath can be created... " >&6; }
53983     FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53984     FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53985     FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53986     if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53987       # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53988       FIXPATH="$FIXPATH_BIN -c"
53989     elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53990       # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53991       # @ was chosen as separator to minimize risk of other tools messing around with it
53992       all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53993           | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53994       fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53995       FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53996     fi
53997     FIXPATH_SRC_W="$FIXPATH_SRC"
53998     FIXPATH_BIN_W="$FIXPATH_BIN"
53999 
54000   unix_path="$FIXPATH_SRC_W"
54001   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54002     windows_path=`$CYGPATH -m "$unix_path"`
54003     FIXPATH_SRC_W="$windows_path"
54004   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54005     windows_path=`cmd //c echo $unix_path`
54006     FIXPATH_SRC_W="$windows_path"
54007   fi
54008 
54009 
54010   unix_path="$FIXPATH_BIN_W"
54011   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54012     windows_path=`$CYGPATH -m "$unix_path"`
54013     FIXPATH_BIN_W="$windows_path"
54014   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54015     windows_path=`cmd //c echo $unix_path`
54016     FIXPATH_BIN_W="$windows_path"
54017   fi
54018 
54019     $RM -rf $FIXPATH_BIN $FIXPATH_DIR
54020     $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
54021     cd $FIXPATH_DIR
54022     $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
54023     cd $CURDIR
54024 
54025     if test ! -x $FIXPATH_BIN; then
54026       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54027 $as_echo "no" >&6; }
54028       cat $FIXPATH_DIR/fixpath1.log
54029       as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
54030     fi
54031     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54032 $as_echo "yes" >&6; }
54033     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
54034 $as_echo_n "checking if fixpath.exe works... " >&6; }
54035     cd $FIXPATH_DIR
54036     $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
54037         > $FIXPATH_DIR/fixpath2.log 2>&1
54038     cd $CURDIR
54039     if test ! -x $FIXPATH_DIR/fixpath2.exe; then
54040       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54041 $as_echo "no" >&6; }
54042       cat $FIXPATH_DIR/fixpath2.log
54043       as_fn_error $? "fixpath did not work!" "$LINENO" 5
54044     fi
54045     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
54046 $as_echo "yes" >&6; }
54047 
54048     FIXPATH_DETACH_FLAG="--detach"
54049   fi
54050 
54051 
54052 
54053 
54054 
54055 
54056   # Check if X11 is needed
54057   if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
54058     # No X11 support on windows or macosx
54059     NEEDS_LIB_X11=false
54060   else
54061     # All other instances need X11, even if building headless only, libawt still
54062     # needs X11 headers.
54063     NEEDS_LIB_X11=true
54064   fi
54065 
54066   # Check if cups is needed
54067   if test "x$OPENJDK_TARGET_OS" = xwindows; then
54068     # Windows have a separate print system
54069     NEEDS_LIB_CUPS=false
54070   else
54071     NEEDS_LIB_CUPS=true
54072   fi
54073 
54074   # A custom hook may have set this already
54075   if test "x$NEEDS_LIB_FREETYPE" = "x"; then
54076     NEEDS_LIB_FREETYPE=true
54077   fi
54078 
54079   # Check if alsa is needed
54080   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54081     NEEDS_LIB_ALSA=true
54082   else
54083     NEEDS_LIB_ALSA=false
54084   fi
54085 
54086   # Check if ffi is needed
54087   if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54088     NEEDS_LIB_FFI=true
54089   else
54090     NEEDS_LIB_FFI=false
54091   fi
54092 
54093 
54094   # statically link libstdc++ before C++ ABI is stablized on Linux unless
54095   # dynamic build is configured on command line.
54096 
54097 # Check whether --with-stdc++lib was given.
54098 if test "${with_stdc__lib+set}" = set; then :
54099   withval=$with_stdc__lib;
54100         if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
54101                 && test "x$with_stdc__lib" != xdefault; then
54102           as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
54103         fi
54104 
54105 else
54106   with_stdc__lib=default
54107 
54108 fi
54109 
54110 
54111   if test "x$OPENJDK_TARGET_OS" = xlinux; then
54112     # Test if stdc++ can be linked statically.
54113     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
54114 $as_echo_n "checking if static link of stdc++ is possible... " >&6; }
54115     STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
54116     ac_ext=cpp
54117 ac_cpp='$CXXCPP $CPPFLAGS'
54118 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54119 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54120 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54121 
54122     OLD_LIBS="$LIBS"
54123     LIBS="$STATIC_STDCXX_FLAGS"
54124     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
54125 /* end confdefs.h.  */
54126 
54127 int
54128 main ()
54129 {
54130 return 0;
54131   ;
54132   return 0;
54133 }
54134 _ACEOF
54135 if ac_fn_cxx_try_link "$LINENO"; then :
54136   has_static_libstdcxx=yes
54137 else
54138   has_static_libstdcxx=no
54139 fi
54140 rm -f core conftest.err conftest.$ac_objext \
54141     conftest$ac_exeext conftest.$ac_ext
54142     LIBS="$OLD_LIBS"
54143     ac_ext=cpp
54144 ac_cpp='$CXXCPP $CPPFLAGS'
54145 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
54146 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
54147 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
54148 
54149     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
54150 $as_echo "$has_static_libstdcxx" >&6; }
54151 
54152     if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
54153       as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
54154     fi
54155 
54156     # If dynamic was requested, it's available since it would fail above otherwise.
54157     # If dynamic wasn't requested, go with static unless it isn't available.
54158     { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
54159 $as_echo_n "checking how to link with libstdc++... " >&6; }
54160     if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
54161         ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
54162       { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
54163 $as_echo "dynamic" >&6; }
54164     else
54165       LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
54166       JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54167       # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
54168       # just use the same setting as for the TARGET toolchain.
54169       OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
54170       { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
54171 $as_echo "static" >&6; }
54172     fi
54173   fi
54174 
54175   # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
54176   if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
54177     LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
54178   fi
54179 
54180 
54181 
54182   # Setup Windows runtime dlls
54183   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
54184 
54185 
54186 # Check whether --with-msvcr-dll was given.
54187 if test "${with_msvcr_dll+set}" = set; then :
54188   withval=$with_msvcr_dll;
54189 fi
54190 
54191 
54192   if test "x$with_msvcr_dll" != x; then
54193     # If given explicitly by user, do not probe. If not present, fail directly.
54194 
54195   DLL_NAME="$MSVCR_NAME"
54196   POSSIBLE_MSVC_DLL="$with_msvcr_dll"
54197   METHOD="--with-msvcr-dll"
54198   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54199     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54200 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54201 
54202     # Need to check if the found msvcr is correct architecture
54203     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54204 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54205     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54206     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54207       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54208       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54209       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54210         CORRECT_MSVCR_ARCH="PE32 executable"
54211       else
54212         CORRECT_MSVCR_ARCH="PE32+ executable"
54213       fi
54214     else
54215       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54216         CORRECT_MSVCR_ARCH=386
54217       else
54218         CORRECT_MSVCR_ARCH=x86-64
54219       fi
54220     fi
54221     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54222       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54223 $as_echo "ok" >&6; }
54224       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54225 
54226   # Only process if variable expands to non-empty
54227 
54228   if test "x$MSVC_DLL" != x; then
54229     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54230 
54231   # Input might be given as Windows format, start by converting to
54232   # unix format.
54233   path="$MSVC_DLL"
54234   new_path=`$CYGPATH -u "$path"`
54235 
54236   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54237   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54238   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54239   # "foo.exe" is OK but "foo" is an error.
54240   #
54241   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54242   # It is also a way to make sure we got the proper file name for the real test later on.
54243   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54244   if test "x$test_shortpath" = x; then
54245     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54246 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54247     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54248   fi
54249 
54250   # Call helper function which possibly converts this using DOS-style short mode.
54251   # If so, the updated path is stored in $new_path.
54252 
54253   input_path="$new_path"
54254   # Check if we need to convert this using DOS-style short mode. If the path
54255   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54256   # take no chances and rewrite it.
54257   # Note: m4 eats our [], so we need to use [ and ] instead.
54258   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54259   if test "x$has_forbidden_chars" != x; then
54260     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54261     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54262     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54263     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54264       # Going to short mode and back again did indeed matter. Since short mode is
54265       # case insensitive, let's make it lowercase to improve readability.
54266       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54267       # Now convert it back to Unix-style (cygpath)
54268       input_path=`$CYGPATH -u "$shortmode_path"`
54269       new_path="$input_path"
54270     fi
54271   fi
54272 
54273   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54274   if test "x$test_cygdrive_prefix" = x; then
54275     # As a simple fix, exclude /usr/bin since it's not a real path.
54276     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54277       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54278       # a path prefixed by /cygdrive for fixpath to work.
54279       new_path="$CYGWIN_ROOT_PATH$input_path"
54280     fi
54281   fi
54282 
54283 
54284   if test "x$path" != "x$new_path"; then
54285     MSVC_DLL="$new_path"
54286     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54287 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54288   fi
54289 
54290     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54291 
54292   path="$MSVC_DLL"
54293   has_colon=`$ECHO $path | $GREP ^.:`
54294   new_path="$path"
54295   if test "x$has_colon" = x; then
54296     # Not in mixed or Windows style, start by that.
54297     new_path=`cmd //c echo $path`
54298   fi
54299 
54300 
54301   input_path="$new_path"
54302   # Check if we need to convert this using DOS-style short mode. If the path
54303   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54304   # take no chances and rewrite it.
54305   # Note: m4 eats our [], so we need to use [ and ] instead.
54306   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54307   if test "x$has_forbidden_chars" != x; then
54308     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54309     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54310   fi
54311 
54312 
54313   windows_path="$new_path"
54314   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54315     unix_path=`$CYGPATH -u "$windows_path"`
54316     new_path="$unix_path"
54317   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54318     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54319     new_path="$unix_path"
54320   fi
54321 
54322   if test "x$path" != "x$new_path"; then
54323     MSVC_DLL="$new_path"
54324     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54325 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54326   fi
54327 
54328   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54329   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54330 
54331     else
54332       # We're on a unix platform. Hooray! :)
54333       path="$MSVC_DLL"
54334       has_space=`$ECHO "$path" | $GREP " "`
54335       if test "x$has_space" != x; then
54336         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54337 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54338         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54339       fi
54340 
54341       # Use eval to expand a potential ~
54342       eval path="$path"
54343       if test ! -f "$path" && test ! -d "$path"; then
54344         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54345       fi
54346 
54347       if test -d "$path"; then
54348         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54349       else
54350         dir="`$DIRNAME "$path"`"
54351         base="`$BASENAME "$path"`"
54352         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54353       fi
54354     fi
54355   fi
54356 
54357       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54358 $as_echo_n "checking for $DLL_NAME... " >&6; }
54359       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54360 $as_echo "$MSVC_DLL" >&6; }
54361     else
54362       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54363 $as_echo "incorrect, ignoring" >&6; }
54364       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54365 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54366     fi
54367   fi
54368 
54369     if test "x$MSVC_DLL" = x; then
54370       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
54371     fi
54372     MSVCR_DLL="$MSVC_DLL"
54373   elif test "x$DEVKIT_MSVCR_DLL" != x; then
54374 
54375   DLL_NAME="$MSVCR_NAME"
54376   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
54377   METHOD="devkit"
54378   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54379     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54380 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54381 
54382     # Need to check if the found msvcr is correct architecture
54383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54384 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54385     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54386     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54387       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54388       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54389       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54390         CORRECT_MSVCR_ARCH="PE32 executable"
54391       else
54392         CORRECT_MSVCR_ARCH="PE32+ executable"
54393       fi
54394     else
54395       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54396         CORRECT_MSVCR_ARCH=386
54397       else
54398         CORRECT_MSVCR_ARCH=x86-64
54399       fi
54400     fi
54401     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54402       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54403 $as_echo "ok" >&6; }
54404       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54405 
54406   # Only process if variable expands to non-empty
54407 
54408   if test "x$MSVC_DLL" != x; then
54409     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54410 
54411   # Input might be given as Windows format, start by converting to
54412   # unix format.
54413   path="$MSVC_DLL"
54414   new_path=`$CYGPATH -u "$path"`
54415 
54416   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54417   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54418   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54419   # "foo.exe" is OK but "foo" is an error.
54420   #
54421   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54422   # It is also a way to make sure we got the proper file name for the real test later on.
54423   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54424   if test "x$test_shortpath" = x; then
54425     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54426 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54427     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54428   fi
54429 
54430   # Call helper function which possibly converts this using DOS-style short mode.
54431   # If so, the updated path is stored in $new_path.
54432 
54433   input_path="$new_path"
54434   # Check if we need to convert this using DOS-style short mode. If the path
54435   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54436   # take no chances and rewrite it.
54437   # Note: m4 eats our [], so we need to use [ and ] instead.
54438   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54439   if test "x$has_forbidden_chars" != x; then
54440     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54441     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54442     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54443     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54444       # Going to short mode and back again did indeed matter. Since short mode is
54445       # case insensitive, let's make it lowercase to improve readability.
54446       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54447       # Now convert it back to Unix-style (cygpath)
54448       input_path=`$CYGPATH -u "$shortmode_path"`
54449       new_path="$input_path"
54450     fi
54451   fi
54452 
54453   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54454   if test "x$test_cygdrive_prefix" = x; then
54455     # As a simple fix, exclude /usr/bin since it's not a real path.
54456     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54457       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54458       # a path prefixed by /cygdrive for fixpath to work.
54459       new_path="$CYGWIN_ROOT_PATH$input_path"
54460     fi
54461   fi
54462 
54463 
54464   if test "x$path" != "x$new_path"; then
54465     MSVC_DLL="$new_path"
54466     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54467 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54468   fi
54469 
54470     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54471 
54472   path="$MSVC_DLL"
54473   has_colon=`$ECHO $path | $GREP ^.:`
54474   new_path="$path"
54475   if test "x$has_colon" = x; then
54476     # Not in mixed or Windows style, start by that.
54477     new_path=`cmd //c echo $path`
54478   fi
54479 
54480 
54481   input_path="$new_path"
54482   # Check if we need to convert this using DOS-style short mode. If the path
54483   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54484   # take no chances and rewrite it.
54485   # Note: m4 eats our [], so we need to use [ and ] instead.
54486   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54487   if test "x$has_forbidden_chars" != x; then
54488     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54489     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54490   fi
54491 
54492 
54493   windows_path="$new_path"
54494   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54495     unix_path=`$CYGPATH -u "$windows_path"`
54496     new_path="$unix_path"
54497   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54498     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54499     new_path="$unix_path"
54500   fi
54501 
54502   if test "x$path" != "x$new_path"; then
54503     MSVC_DLL="$new_path"
54504     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54505 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54506   fi
54507 
54508   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54509   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54510 
54511     else
54512       # We're on a unix platform. Hooray! :)
54513       path="$MSVC_DLL"
54514       has_space=`$ECHO "$path" | $GREP " "`
54515       if test "x$has_space" != x; then
54516         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54517 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54518         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54519       fi
54520 
54521       # Use eval to expand a potential ~
54522       eval path="$path"
54523       if test ! -f "$path" && test ! -d "$path"; then
54524         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54525       fi
54526 
54527       if test -d "$path"; then
54528         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54529       else
54530         dir="`$DIRNAME "$path"`"
54531         base="`$BASENAME "$path"`"
54532         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54533       fi
54534     fi
54535   fi
54536 
54537       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54538 $as_echo_n "checking for $DLL_NAME... " >&6; }
54539       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54540 $as_echo "$MSVC_DLL" >&6; }
54541     else
54542       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54543 $as_echo "incorrect, ignoring" >&6; }
54544       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54545 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54546     fi
54547   fi
54548 
54549     if test "x$MSVC_DLL" = x; then
54550       as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54551     fi
54552     MSVCR_DLL="$MSVC_DLL"
54553   else
54554 
54555   DLL_NAME="${MSVCR_NAME}"
54556   MSVC_DLL=
54557 
54558   if test "x$MSVC_DLL" = x; then
54559     # Probe: Using well-known location from Visual Studio 10.0
54560     if test "x$VCINSTALLDIR" != x; then
54561       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54562 
54563   windows_path="$CYGWIN_VC_INSTALL_DIR"
54564   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54565     unix_path=`$CYGPATH -u "$windows_path"`
54566     CYGWIN_VC_INSTALL_DIR="$unix_path"
54567   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54568     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54569     CYGWIN_VC_INSTALL_DIR="$unix_path"
54570   fi
54571 
54572       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54573         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54574       else
54575         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54576       fi
54577       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54578 
54579   DLL_NAME="$DLL_NAME"
54580   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54581   METHOD="well-known location in VCINSTALLDIR"
54582   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54583     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54584 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54585 
54586     # Need to check if the found msvcr is correct architecture
54587     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54588 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54589     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54590     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54591       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54592       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54593       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54594         CORRECT_MSVCR_ARCH="PE32 executable"
54595       else
54596         CORRECT_MSVCR_ARCH="PE32+ executable"
54597       fi
54598     else
54599       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54600         CORRECT_MSVCR_ARCH=386
54601       else
54602         CORRECT_MSVCR_ARCH=x86-64
54603       fi
54604     fi
54605     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54606       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54607 $as_echo "ok" >&6; }
54608       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54609 
54610   # Only process if variable expands to non-empty
54611 
54612   if test "x$MSVC_DLL" != x; then
54613     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54614 
54615   # Input might be given as Windows format, start by converting to
54616   # unix format.
54617   path="$MSVC_DLL"
54618   new_path=`$CYGPATH -u "$path"`
54619 
54620   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54621   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54622   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54623   # "foo.exe" is OK but "foo" is an error.
54624   #
54625   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54626   # It is also a way to make sure we got the proper file name for the real test later on.
54627   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54628   if test "x$test_shortpath" = x; then
54629     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54630 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54631     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54632   fi
54633 
54634   # Call helper function which possibly converts this using DOS-style short mode.
54635   # If so, the updated path is stored in $new_path.
54636 
54637   input_path="$new_path"
54638   # Check if we need to convert this using DOS-style short mode. If the path
54639   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54640   # take no chances and rewrite it.
54641   # Note: m4 eats our [], so we need to use [ and ] instead.
54642   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54643   if test "x$has_forbidden_chars" != x; then
54644     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54645     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54646     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54647     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54648       # Going to short mode and back again did indeed matter. Since short mode is
54649       # case insensitive, let's make it lowercase to improve readability.
54650       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54651       # Now convert it back to Unix-style (cygpath)
54652       input_path=`$CYGPATH -u "$shortmode_path"`
54653       new_path="$input_path"
54654     fi
54655   fi
54656 
54657   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54658   if test "x$test_cygdrive_prefix" = x; then
54659     # As a simple fix, exclude /usr/bin since it's not a real path.
54660     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54661       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54662       # a path prefixed by /cygdrive for fixpath to work.
54663       new_path="$CYGWIN_ROOT_PATH$input_path"
54664     fi
54665   fi
54666 
54667 
54668   if test "x$path" != "x$new_path"; then
54669     MSVC_DLL="$new_path"
54670     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54671 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54672   fi
54673 
54674     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54675 
54676   path="$MSVC_DLL"
54677   has_colon=`$ECHO $path | $GREP ^.:`
54678   new_path="$path"
54679   if test "x$has_colon" = x; then
54680     # Not in mixed or Windows style, start by that.
54681     new_path=`cmd //c echo $path`
54682   fi
54683 
54684 
54685   input_path="$new_path"
54686   # Check if we need to convert this using DOS-style short mode. If the path
54687   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54688   # take no chances and rewrite it.
54689   # Note: m4 eats our [], so we need to use [ and ] instead.
54690   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54691   if test "x$has_forbidden_chars" != x; then
54692     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54693     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54694   fi
54695 
54696 
54697   windows_path="$new_path"
54698   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54699     unix_path=`$CYGPATH -u "$windows_path"`
54700     new_path="$unix_path"
54701   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54702     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54703     new_path="$unix_path"
54704   fi
54705 
54706   if test "x$path" != "x$new_path"; then
54707     MSVC_DLL="$new_path"
54708     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54709 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54710   fi
54711 
54712   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54713   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54714 
54715     else
54716       # We're on a unix platform. Hooray! :)
54717       path="$MSVC_DLL"
54718       has_space=`$ECHO "$path" | $GREP " "`
54719       if test "x$has_space" != x; then
54720         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54721 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54722         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54723       fi
54724 
54725       # Use eval to expand a potential ~
54726       eval path="$path"
54727       if test ! -f "$path" && test ! -d "$path"; then
54728         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54729       fi
54730 
54731       if test -d "$path"; then
54732         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54733       else
54734         dir="`$DIRNAME "$path"`"
54735         base="`$BASENAME "$path"`"
54736         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54737       fi
54738     fi
54739   fi
54740 
54741       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54742 $as_echo_n "checking for $DLL_NAME... " >&6; }
54743       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54744 $as_echo "$MSVC_DLL" >&6; }
54745     else
54746       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54747 $as_echo "incorrect, ignoring" >&6; }
54748       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54749 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54750     fi
54751   fi
54752 
54753     fi
54754   fi
54755 
54756   if test "x$MSVC_DLL" = x; then
54757     # Probe: Check in the Boot JDK directory.
54758     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54759 
54760   DLL_NAME="$DLL_NAME"
54761   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54762   METHOD="well-known location in Boot JDK"
54763   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54764     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54765 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54766 
54767     # Need to check if the found msvcr is correct architecture
54768     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54769 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54770     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54771     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54772       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54773       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54774       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54775         CORRECT_MSVCR_ARCH="PE32 executable"
54776       else
54777         CORRECT_MSVCR_ARCH="PE32+ executable"
54778       fi
54779     else
54780       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54781         CORRECT_MSVCR_ARCH=386
54782       else
54783         CORRECT_MSVCR_ARCH=x86-64
54784       fi
54785     fi
54786     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54787       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54788 $as_echo "ok" >&6; }
54789       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54790 
54791   # Only process if variable expands to non-empty
54792 
54793   if test "x$MSVC_DLL" != x; then
54794     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54795 
54796   # Input might be given as Windows format, start by converting to
54797   # unix format.
54798   path="$MSVC_DLL"
54799   new_path=`$CYGPATH -u "$path"`
54800 
54801   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54802   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54803   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54804   # "foo.exe" is OK but "foo" is an error.
54805   #
54806   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54807   # It is also a way to make sure we got the proper file name for the real test later on.
54808   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54809   if test "x$test_shortpath" = x; then
54810     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54811 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54812     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54813   fi
54814 
54815   # Call helper function which possibly converts this using DOS-style short mode.
54816   # If so, the updated path is stored in $new_path.
54817 
54818   input_path="$new_path"
54819   # Check if we need to convert this using DOS-style short mode. If the path
54820   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54821   # take no chances and rewrite it.
54822   # Note: m4 eats our [], so we need to use [ and ] instead.
54823   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54824   if test "x$has_forbidden_chars" != x; then
54825     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54826     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54827     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54828     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54829       # Going to short mode and back again did indeed matter. Since short mode is
54830       # case insensitive, let's make it lowercase to improve readability.
54831       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54832       # Now convert it back to Unix-style (cygpath)
54833       input_path=`$CYGPATH -u "$shortmode_path"`
54834       new_path="$input_path"
54835     fi
54836   fi
54837 
54838   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54839   if test "x$test_cygdrive_prefix" = x; then
54840     # As a simple fix, exclude /usr/bin since it's not a real path.
54841     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54842       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54843       # a path prefixed by /cygdrive for fixpath to work.
54844       new_path="$CYGWIN_ROOT_PATH$input_path"
54845     fi
54846   fi
54847 
54848 
54849   if test "x$path" != "x$new_path"; then
54850     MSVC_DLL="$new_path"
54851     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54852 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54853   fi
54854 
54855     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54856 
54857   path="$MSVC_DLL"
54858   has_colon=`$ECHO $path | $GREP ^.:`
54859   new_path="$path"
54860   if test "x$has_colon" = x; then
54861     # Not in mixed or Windows style, start by that.
54862     new_path=`cmd //c echo $path`
54863   fi
54864 
54865 
54866   input_path="$new_path"
54867   # Check if we need to convert this using DOS-style short mode. If the path
54868   # contains just simple characters, use it. Otherwise (spaces, weird characters),
54869   # take no chances and rewrite it.
54870   # Note: m4 eats our [], so we need to use [ and ] instead.
54871   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54872   if test "x$has_forbidden_chars" != x; then
54873     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54874     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54875   fi
54876 
54877 
54878   windows_path="$new_path"
54879   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54880     unix_path=`$CYGPATH -u "$windows_path"`
54881     new_path="$unix_path"
54882   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54883     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54884     new_path="$unix_path"
54885   fi
54886 
54887   if test "x$path" != "x$new_path"; then
54888     MSVC_DLL="$new_path"
54889     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54890 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54891   fi
54892 
54893   # Save the first 10 bytes of this path to the storage, so fixpath can work.
54894   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54895 
54896     else
54897       # We're on a unix platform. Hooray! :)
54898       path="$MSVC_DLL"
54899       has_space=`$ECHO "$path" | $GREP " "`
54900       if test "x$has_space" != x; then
54901         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54902 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54903         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54904       fi
54905 
54906       # Use eval to expand a potential ~
54907       eval path="$path"
54908       if test ! -f "$path" && test ! -d "$path"; then
54909         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54910       fi
54911 
54912       if test -d "$path"; then
54913         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54914       else
54915         dir="`$DIRNAME "$path"`"
54916         base="`$BASENAME "$path"`"
54917         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54918       fi
54919     fi
54920   fi
54921 
54922       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54923 $as_echo_n "checking for $DLL_NAME... " >&6; }
54924       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54925 $as_echo "$MSVC_DLL" >&6; }
54926     else
54927       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54928 $as_echo "incorrect, ignoring" >&6; }
54929       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54930 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54931     fi
54932   fi
54933 
54934   fi
54935 
54936   if test "x$MSVC_DLL" = x; then
54937     # Probe: Look in the Windows system32 directory
54938     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54939 
54940   windows_path="$CYGWIN_SYSTEMROOT"
54941   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54942     unix_path=`$CYGPATH -u "$windows_path"`
54943     CYGWIN_SYSTEMROOT="$unix_path"
54944   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54945     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54946     CYGWIN_SYSTEMROOT="$unix_path"
54947   fi
54948 
54949     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54950 
54951   DLL_NAME="$DLL_NAME"
54952   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54953   METHOD="well-known location in SYSTEMROOT"
54954   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54955     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54956 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54957 
54958     # Need to check if the found msvcr is correct architecture
54959     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54960 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54961     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54962     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54963       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54964       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54965       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54966         CORRECT_MSVCR_ARCH="PE32 executable"
54967       else
54968         CORRECT_MSVCR_ARCH="PE32+ executable"
54969       fi
54970     else
54971       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54972         CORRECT_MSVCR_ARCH=386
54973       else
54974         CORRECT_MSVCR_ARCH=x86-64
54975       fi
54976     fi
54977     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54978       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54979 $as_echo "ok" >&6; }
54980       MSVC_DLL="$POSSIBLE_MSVC_DLL"
54981 
54982   # Only process if variable expands to non-empty
54983 
54984   if test "x$MSVC_DLL" != x; then
54985     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54986 
54987   # Input might be given as Windows format, start by converting to
54988   # unix format.
54989   path="$MSVC_DLL"
54990   new_path=`$CYGPATH -u "$path"`
54991 
54992   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54993   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54994   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54995   # "foo.exe" is OK but "foo" is an error.
54996   #
54997   # This test is therefore slightly more accurate than "test -f" to check for file precense.
54998   # It is also a way to make sure we got the proper file name for the real test later on.
54999   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55000   if test "x$test_shortpath" = x; then
55001     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55002 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55003     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55004   fi
55005 
55006   # Call helper function which possibly converts this using DOS-style short mode.
55007   # If so, the updated path is stored in $new_path.
55008 
55009   input_path="$new_path"
55010   # Check if we need to convert this using DOS-style short mode. If the path
55011   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55012   # take no chances and rewrite it.
55013   # Note: m4 eats our [], so we need to use [ and ] instead.
55014   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55015   if test "x$has_forbidden_chars" != x; then
55016     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55017     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55018     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55019     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55020       # Going to short mode and back again did indeed matter. Since short mode is
55021       # case insensitive, let's make it lowercase to improve readability.
55022       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55023       # Now convert it back to Unix-style (cygpath)
55024       input_path=`$CYGPATH -u "$shortmode_path"`
55025       new_path="$input_path"
55026     fi
55027   fi
55028 
55029   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55030   if test "x$test_cygdrive_prefix" = x; then
55031     # As a simple fix, exclude /usr/bin since it's not a real path.
55032     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55033       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55034       # a path prefixed by /cygdrive for fixpath to work.
55035       new_path="$CYGWIN_ROOT_PATH$input_path"
55036     fi
55037   fi
55038 
55039 
55040   if test "x$path" != "x$new_path"; then
55041     MSVC_DLL="$new_path"
55042     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55043 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55044   fi
55045 
55046     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55047 
55048   path="$MSVC_DLL"
55049   has_colon=`$ECHO $path | $GREP ^.:`
55050   new_path="$path"
55051   if test "x$has_colon" = x; then
55052     # Not in mixed or Windows style, start by that.
55053     new_path=`cmd //c echo $path`
55054   fi
55055 
55056 
55057   input_path="$new_path"
55058   # Check if we need to convert this using DOS-style short mode. If the path
55059   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55060   # take no chances and rewrite it.
55061   # Note: m4 eats our [], so we need to use [ and ] instead.
55062   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55063   if test "x$has_forbidden_chars" != x; then
55064     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55065     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55066   fi
55067 
55068 
55069   windows_path="$new_path"
55070   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55071     unix_path=`$CYGPATH -u "$windows_path"`
55072     new_path="$unix_path"
55073   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55074     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55075     new_path="$unix_path"
55076   fi
55077 
55078   if test "x$path" != "x$new_path"; then
55079     MSVC_DLL="$new_path"
55080     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55081 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55082   fi
55083 
55084   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55085   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55086 
55087     else
55088       # We're on a unix platform. Hooray! :)
55089       path="$MSVC_DLL"
55090       has_space=`$ECHO "$path" | $GREP " "`
55091       if test "x$has_space" != x; then
55092         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55093 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55094         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55095       fi
55096 
55097       # Use eval to expand a potential ~
55098       eval path="$path"
55099       if test ! -f "$path" && test ! -d "$path"; then
55100         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55101       fi
55102 
55103       if test -d "$path"; then
55104         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55105       else
55106         dir="`$DIRNAME "$path"`"
55107         base="`$BASENAME "$path"`"
55108         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55109       fi
55110     fi
55111   fi
55112 
55113       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55114 $as_echo_n "checking for $DLL_NAME... " >&6; }
55115       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55116 $as_echo "$MSVC_DLL" >&6; }
55117     else
55118       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55119 $as_echo "incorrect, ignoring" >&6; }
55120       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55121 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55122     fi
55123   fi
55124 
55125   fi
55126 
55127   if test "x$MSVC_DLL" = x; then
55128     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55129     if test "x$VS100COMNTOOLS" != x; then
55130       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55131 
55132   windows_path="$CYGWIN_VS_TOOLS_DIR"
55133   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55134     unix_path=`$CYGPATH -u "$windows_path"`
55135     CYGWIN_VS_TOOLS_DIR="$unix_path"
55136   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55137     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55138     CYGWIN_VS_TOOLS_DIR="$unix_path"
55139   fi
55140 
55141       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55142         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55143             | $GREP -i /x64/ | $HEAD --lines 1`
55144       else
55145         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55146             | $GREP -i /x86/ | $HEAD --lines 1`
55147       fi
55148 
55149   DLL_NAME="$DLL_NAME"
55150   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55151   METHOD="search of VS100COMNTOOLS"
55152   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55153     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55154 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55155 
55156     # Need to check if the found msvcr is correct architecture
55157     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55158 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55159     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55160     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55161       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55162       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55163       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55164         CORRECT_MSVCR_ARCH="PE32 executable"
55165       else
55166         CORRECT_MSVCR_ARCH="PE32+ executable"
55167       fi
55168     else
55169       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55170         CORRECT_MSVCR_ARCH=386
55171       else
55172         CORRECT_MSVCR_ARCH=x86-64
55173       fi
55174     fi
55175     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55176       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55177 $as_echo "ok" >&6; }
55178       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55179 
55180   # Only process if variable expands to non-empty
55181 
55182   if test "x$MSVC_DLL" != x; then
55183     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55184 
55185   # Input might be given as Windows format, start by converting to
55186   # unix format.
55187   path="$MSVC_DLL"
55188   new_path=`$CYGPATH -u "$path"`
55189 
55190   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55191   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55192   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55193   # "foo.exe" is OK but "foo" is an error.
55194   #
55195   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55196   # It is also a way to make sure we got the proper file name for the real test later on.
55197   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55198   if test "x$test_shortpath" = x; then
55199     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55200 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55201     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55202   fi
55203 
55204   # Call helper function which possibly converts this using DOS-style short mode.
55205   # If so, the updated path is stored in $new_path.
55206 
55207   input_path="$new_path"
55208   # Check if we need to convert this using DOS-style short mode. If the path
55209   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55210   # take no chances and rewrite it.
55211   # Note: m4 eats our [], so we need to use [ and ] instead.
55212   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55213   if test "x$has_forbidden_chars" != x; then
55214     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55215     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55216     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55217     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55218       # Going to short mode and back again did indeed matter. Since short mode is
55219       # case insensitive, let's make it lowercase to improve readability.
55220       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55221       # Now convert it back to Unix-style (cygpath)
55222       input_path=`$CYGPATH -u "$shortmode_path"`
55223       new_path="$input_path"
55224     fi
55225   fi
55226 
55227   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55228   if test "x$test_cygdrive_prefix" = x; then
55229     # As a simple fix, exclude /usr/bin since it's not a real path.
55230     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55231       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55232       # a path prefixed by /cygdrive for fixpath to work.
55233       new_path="$CYGWIN_ROOT_PATH$input_path"
55234     fi
55235   fi
55236 
55237 
55238   if test "x$path" != "x$new_path"; then
55239     MSVC_DLL="$new_path"
55240     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55241 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55242   fi
55243 
55244     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55245 
55246   path="$MSVC_DLL"
55247   has_colon=`$ECHO $path | $GREP ^.:`
55248   new_path="$path"
55249   if test "x$has_colon" = x; then
55250     # Not in mixed or Windows style, start by that.
55251     new_path=`cmd //c echo $path`
55252   fi
55253 
55254 
55255   input_path="$new_path"
55256   # Check if we need to convert this using DOS-style short mode. If the path
55257   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55258   # take no chances and rewrite it.
55259   # Note: m4 eats our [], so we need to use [ and ] instead.
55260   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55261   if test "x$has_forbidden_chars" != x; then
55262     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55263     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55264   fi
55265 
55266 
55267   windows_path="$new_path"
55268   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55269     unix_path=`$CYGPATH -u "$windows_path"`
55270     new_path="$unix_path"
55271   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55272     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55273     new_path="$unix_path"
55274   fi
55275 
55276   if test "x$path" != "x$new_path"; then
55277     MSVC_DLL="$new_path"
55278     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55279 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55280   fi
55281 
55282   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55283   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55284 
55285     else
55286       # We're on a unix platform. Hooray! :)
55287       path="$MSVC_DLL"
55288       has_space=`$ECHO "$path" | $GREP " "`
55289       if test "x$has_space" != x; then
55290         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55291 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55292         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55293       fi
55294 
55295       # Use eval to expand a potential ~
55296       eval path="$path"
55297       if test ! -f "$path" && test ! -d "$path"; then
55298         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55299       fi
55300 
55301       if test -d "$path"; then
55302         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55303       else
55304         dir="`$DIRNAME "$path"`"
55305         base="`$BASENAME "$path"`"
55306         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55307       fi
55308     fi
55309   fi
55310 
55311       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55312 $as_echo_n "checking for $DLL_NAME... " >&6; }
55313       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55314 $as_echo "$MSVC_DLL" >&6; }
55315     else
55316       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55317 $as_echo "incorrect, ignoring" >&6; }
55318       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55319 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55320     fi
55321   fi
55322 
55323     fi
55324   fi
55325 
55326   if test "x$MSVC_DLL" = x; then
55327     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55328     # (This was the original behaviour; kept since it might turn something up)
55329     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55330       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55331         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55332             | $GREP x64 | $HEAD --lines 1`
55333       else
55334         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55335             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55336         if test "x$POSSIBLE_MSVC_DLL" = x; then
55337           # We're grasping at straws now...
55338           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55339               | $HEAD --lines 1`
55340         fi
55341       fi
55342 
55343 
55344   DLL_NAME="$DLL_NAME"
55345   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55346   METHOD="search of VCINSTALLDIR"
55347   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55348     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55349 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55350 
55351     # Need to check if the found msvcr is correct architecture
55352     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55353 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55354     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55355     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55356       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55357       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55358       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55359         CORRECT_MSVCR_ARCH="PE32 executable"
55360       else
55361         CORRECT_MSVCR_ARCH="PE32+ executable"
55362       fi
55363     else
55364       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55365         CORRECT_MSVCR_ARCH=386
55366       else
55367         CORRECT_MSVCR_ARCH=x86-64
55368       fi
55369     fi
55370     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55371       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55372 $as_echo "ok" >&6; }
55373       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55374 
55375   # Only process if variable expands to non-empty
55376 
55377   if test "x$MSVC_DLL" != x; then
55378     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55379 
55380   # Input might be given as Windows format, start by converting to
55381   # unix format.
55382   path="$MSVC_DLL"
55383   new_path=`$CYGPATH -u "$path"`
55384 
55385   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55386   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55387   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55388   # "foo.exe" is OK but "foo" is an error.
55389   #
55390   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55391   # It is also a way to make sure we got the proper file name for the real test later on.
55392   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55393   if test "x$test_shortpath" = x; then
55394     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55395 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55396     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55397   fi
55398 
55399   # Call helper function which possibly converts this using DOS-style short mode.
55400   # If so, the updated path is stored in $new_path.
55401 
55402   input_path="$new_path"
55403   # Check if we need to convert this using DOS-style short mode. If the path
55404   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55405   # take no chances and rewrite it.
55406   # Note: m4 eats our [], so we need to use [ and ] instead.
55407   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55408   if test "x$has_forbidden_chars" != x; then
55409     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55410     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55411     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55412     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55413       # Going to short mode and back again did indeed matter. Since short mode is
55414       # case insensitive, let's make it lowercase to improve readability.
55415       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55416       # Now convert it back to Unix-style (cygpath)
55417       input_path=`$CYGPATH -u "$shortmode_path"`
55418       new_path="$input_path"
55419     fi
55420   fi
55421 
55422   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55423   if test "x$test_cygdrive_prefix" = x; then
55424     # As a simple fix, exclude /usr/bin since it's not a real path.
55425     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55426       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55427       # a path prefixed by /cygdrive for fixpath to work.
55428       new_path="$CYGWIN_ROOT_PATH$input_path"
55429     fi
55430   fi
55431 
55432 
55433   if test "x$path" != "x$new_path"; then
55434     MSVC_DLL="$new_path"
55435     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55436 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55437   fi
55438 
55439     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55440 
55441   path="$MSVC_DLL"
55442   has_colon=`$ECHO $path | $GREP ^.:`
55443   new_path="$path"
55444   if test "x$has_colon" = x; then
55445     # Not in mixed or Windows style, start by that.
55446     new_path=`cmd //c echo $path`
55447   fi
55448 
55449 
55450   input_path="$new_path"
55451   # Check if we need to convert this using DOS-style short mode. If the path
55452   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55453   # take no chances and rewrite it.
55454   # Note: m4 eats our [], so we need to use [ and ] instead.
55455   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55456   if test "x$has_forbidden_chars" != x; then
55457     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55458     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55459   fi
55460 
55461 
55462   windows_path="$new_path"
55463   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55464     unix_path=`$CYGPATH -u "$windows_path"`
55465     new_path="$unix_path"
55466   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55467     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55468     new_path="$unix_path"
55469   fi
55470 
55471   if test "x$path" != "x$new_path"; then
55472     MSVC_DLL="$new_path"
55473     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55474 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55475   fi
55476 
55477   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55478   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55479 
55480     else
55481       # We're on a unix platform. Hooray! :)
55482       path="$MSVC_DLL"
55483       has_space=`$ECHO "$path" | $GREP " "`
55484       if test "x$has_space" != x; then
55485         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55486 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55487         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55488       fi
55489 
55490       # Use eval to expand a potential ~
55491       eval path="$path"
55492       if test ! -f "$path" && test ! -d "$path"; then
55493         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55494       fi
55495 
55496       if test -d "$path"; then
55497         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55498       else
55499         dir="`$DIRNAME "$path"`"
55500         base="`$BASENAME "$path"`"
55501         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55502       fi
55503     fi
55504   fi
55505 
55506       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55507 $as_echo_n "checking for $DLL_NAME... " >&6; }
55508       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55509 $as_echo "$MSVC_DLL" >&6; }
55510     else
55511       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55512 $as_echo "incorrect, ignoring" >&6; }
55513       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55514 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55515     fi
55516   fi
55517 
55518     fi
55519   fi
55520 
55521   if test "x$MSVC_DLL" = x; then
55522     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55523 $as_echo_n "checking for $DLL_NAME... " >&6; }
55524     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55525 $as_echo "no" >&6; }
55526     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55527   fi
55528 
55529     MSVCR_DLL="$MSVC_DLL"
55530   fi
55531 
55532 
55533 
55534 # Check whether --with-msvcp-dll was given.
55535 if test "${with_msvcp_dll+set}" = set; then :
55536   withval=$with_msvcp_dll;
55537 fi
55538 
55539 
55540   if test "x$MSVCP_NAME" != "x"; then
55541     if test "x$with_msvcp_dll" != x; then
55542       # If given explicitly by user, do not probe. If not present, fail directly.
55543 
55544   DLL_NAME="$MSVCP_NAME"
55545   POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55546   METHOD="--with-msvcp-dll"
55547   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55548     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55549 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55550 
55551     # Need to check if the found msvcr is correct architecture
55552     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55553 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55554     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55555     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55556       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55557       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55558       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55559         CORRECT_MSVCR_ARCH="PE32 executable"
55560       else
55561         CORRECT_MSVCR_ARCH="PE32+ executable"
55562       fi
55563     else
55564       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55565         CORRECT_MSVCR_ARCH=386
55566       else
55567         CORRECT_MSVCR_ARCH=x86-64
55568       fi
55569     fi
55570     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55571       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55572 $as_echo "ok" >&6; }
55573       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55574 
55575   # Only process if variable expands to non-empty
55576 
55577   if test "x$MSVC_DLL" != x; then
55578     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55579 
55580   # Input might be given as Windows format, start by converting to
55581   # unix format.
55582   path="$MSVC_DLL"
55583   new_path=`$CYGPATH -u "$path"`
55584 
55585   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55586   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55587   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55588   # "foo.exe" is OK but "foo" is an error.
55589   #
55590   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55591   # It is also a way to make sure we got the proper file name for the real test later on.
55592   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55593   if test "x$test_shortpath" = x; then
55594     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55595 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55596     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55597   fi
55598 
55599   # Call helper function which possibly converts this using DOS-style short mode.
55600   # If so, the updated path is stored in $new_path.
55601 
55602   input_path="$new_path"
55603   # Check if we need to convert this using DOS-style short mode. If the path
55604   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55605   # take no chances and rewrite it.
55606   # Note: m4 eats our [], so we need to use [ and ] instead.
55607   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55608   if test "x$has_forbidden_chars" != x; then
55609     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55610     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55611     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55612     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55613       # Going to short mode and back again did indeed matter. Since short mode is
55614       # case insensitive, let's make it lowercase to improve readability.
55615       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55616       # Now convert it back to Unix-style (cygpath)
55617       input_path=`$CYGPATH -u "$shortmode_path"`
55618       new_path="$input_path"
55619     fi
55620   fi
55621 
55622   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55623   if test "x$test_cygdrive_prefix" = x; then
55624     # As a simple fix, exclude /usr/bin since it's not a real path.
55625     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55626       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55627       # a path prefixed by /cygdrive for fixpath to work.
55628       new_path="$CYGWIN_ROOT_PATH$input_path"
55629     fi
55630   fi
55631 
55632 
55633   if test "x$path" != "x$new_path"; then
55634     MSVC_DLL="$new_path"
55635     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55636 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55637   fi
55638 
55639     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55640 
55641   path="$MSVC_DLL"
55642   has_colon=`$ECHO $path | $GREP ^.:`
55643   new_path="$path"
55644   if test "x$has_colon" = x; then
55645     # Not in mixed or Windows style, start by that.
55646     new_path=`cmd //c echo $path`
55647   fi
55648 
55649 
55650   input_path="$new_path"
55651   # Check if we need to convert this using DOS-style short mode. If the path
55652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55653   # take no chances and rewrite it.
55654   # Note: m4 eats our [], so we need to use [ and ] instead.
55655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55656   if test "x$has_forbidden_chars" != x; then
55657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55658     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55659   fi
55660 
55661 
55662   windows_path="$new_path"
55663   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55664     unix_path=`$CYGPATH -u "$windows_path"`
55665     new_path="$unix_path"
55666   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55667     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55668     new_path="$unix_path"
55669   fi
55670 
55671   if test "x$path" != "x$new_path"; then
55672     MSVC_DLL="$new_path"
55673     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55674 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55675   fi
55676 
55677   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55678   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55679 
55680     else
55681       # We're on a unix platform. Hooray! :)
55682       path="$MSVC_DLL"
55683       has_space=`$ECHO "$path" | $GREP " "`
55684       if test "x$has_space" != x; then
55685         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55686 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55687         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55688       fi
55689 
55690       # Use eval to expand a potential ~
55691       eval path="$path"
55692       if test ! -f "$path" && test ! -d "$path"; then
55693         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55694       fi
55695 
55696       if test -d "$path"; then
55697         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55698       else
55699         dir="`$DIRNAME "$path"`"
55700         base="`$BASENAME "$path"`"
55701         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55702       fi
55703     fi
55704   fi
55705 
55706       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55707 $as_echo_n "checking for $DLL_NAME... " >&6; }
55708       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55709 $as_echo "$MSVC_DLL" >&6; }
55710     else
55711       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55712 $as_echo "incorrect, ignoring" >&6; }
55713       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55714 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55715     fi
55716   fi
55717 
55718       if test "x$MSVC_DLL" = x; then
55719         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55720       fi
55721       MSVCP_DLL="$MSVC_DLL"
55722     elif test "x$DEVKIT_MSVCP_DLL" != x; then
55723 
55724   DLL_NAME="$MSVCP_NAME"
55725   POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55726   METHOD="devkit"
55727   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55728     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55729 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55730 
55731     # Need to check if the found msvcr is correct architecture
55732     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55733 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55734     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55735     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55736       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55737       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55738       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55739         CORRECT_MSVCR_ARCH="PE32 executable"
55740       else
55741         CORRECT_MSVCR_ARCH="PE32+ executable"
55742       fi
55743     else
55744       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55745         CORRECT_MSVCR_ARCH=386
55746       else
55747         CORRECT_MSVCR_ARCH=x86-64
55748       fi
55749     fi
55750     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55751       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55752 $as_echo "ok" >&6; }
55753       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55754 
55755   # Only process if variable expands to non-empty
55756 
55757   if test "x$MSVC_DLL" != x; then
55758     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55759 
55760   # Input might be given as Windows format, start by converting to
55761   # unix format.
55762   path="$MSVC_DLL"
55763   new_path=`$CYGPATH -u "$path"`
55764 
55765   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55766   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55767   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55768   # "foo.exe" is OK but "foo" is an error.
55769   #
55770   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55771   # It is also a way to make sure we got the proper file name for the real test later on.
55772   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55773   if test "x$test_shortpath" = x; then
55774     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55775 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55776     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55777   fi
55778 
55779   # Call helper function which possibly converts this using DOS-style short mode.
55780   # If so, the updated path is stored in $new_path.
55781 
55782   input_path="$new_path"
55783   # Check if we need to convert this using DOS-style short mode. If the path
55784   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55785   # take no chances and rewrite it.
55786   # Note: m4 eats our [], so we need to use [ and ] instead.
55787   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55788   if test "x$has_forbidden_chars" != x; then
55789     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55790     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55791     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55792     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55793       # Going to short mode and back again did indeed matter. Since short mode is
55794       # case insensitive, let's make it lowercase to improve readability.
55795       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55796       # Now convert it back to Unix-style (cygpath)
55797       input_path=`$CYGPATH -u "$shortmode_path"`
55798       new_path="$input_path"
55799     fi
55800   fi
55801 
55802   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55803   if test "x$test_cygdrive_prefix" = x; then
55804     # As a simple fix, exclude /usr/bin since it's not a real path.
55805     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55806       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55807       # a path prefixed by /cygdrive for fixpath to work.
55808       new_path="$CYGWIN_ROOT_PATH$input_path"
55809     fi
55810   fi
55811 
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     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55820 
55821   path="$MSVC_DLL"
55822   has_colon=`$ECHO $path | $GREP ^.:`
55823   new_path="$path"
55824   if test "x$has_colon" = x; then
55825     # Not in mixed or Windows style, start by that.
55826     new_path=`cmd //c echo $path`
55827   fi
55828 
55829 
55830   input_path="$new_path"
55831   # Check if we need to convert this using DOS-style short mode. If the path
55832   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55833   # take no chances and rewrite it.
55834   # Note: m4 eats our [], so we need to use [ and ] instead.
55835   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55836   if test "x$has_forbidden_chars" != x; then
55837     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55838     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55839   fi
55840 
55841 
55842   windows_path="$new_path"
55843   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55844     unix_path=`$CYGPATH -u "$windows_path"`
55845     new_path="$unix_path"
55846   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55847     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55848     new_path="$unix_path"
55849   fi
55850 
55851   if test "x$path" != "x$new_path"; then
55852     MSVC_DLL="$new_path"
55853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55854 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55855   fi
55856 
55857   # Save the first 10 bytes of this path to the storage, so fixpath can work.
55858   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55859 
55860     else
55861       # We're on a unix platform. Hooray! :)
55862       path="$MSVC_DLL"
55863       has_space=`$ECHO "$path" | $GREP " "`
55864       if test "x$has_space" != x; then
55865         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55866 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55867         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55868       fi
55869 
55870       # Use eval to expand a potential ~
55871       eval path="$path"
55872       if test ! -f "$path" && test ! -d "$path"; then
55873         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55874       fi
55875 
55876       if test -d "$path"; then
55877         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55878       else
55879         dir="`$DIRNAME "$path"`"
55880         base="`$BASENAME "$path"`"
55881         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55882       fi
55883     fi
55884   fi
55885 
55886       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55887 $as_echo_n "checking for $DLL_NAME... " >&6; }
55888       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55889 $as_echo "$MSVC_DLL" >&6; }
55890     else
55891       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55892 $as_echo "incorrect, ignoring" >&6; }
55893       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55894 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55895     fi
55896   fi
55897 
55898       if test "x$MSVC_DLL" = x; then
55899         as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55900       fi
55901       MSVCP_DLL="$MSVC_DLL"
55902     else
55903 
55904   DLL_NAME="${MSVCP_NAME}"
55905   MSVC_DLL=
55906 
55907   if test "x$MSVC_DLL" = x; then
55908     # Probe: Using well-known location from Visual Studio 10.0
55909     if test "x$VCINSTALLDIR" != x; then
55910       CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55911 
55912   windows_path="$CYGWIN_VC_INSTALL_DIR"
55913   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55914     unix_path=`$CYGPATH -u "$windows_path"`
55915     CYGWIN_VC_INSTALL_DIR="$unix_path"
55916   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55917     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55918     CYGWIN_VC_INSTALL_DIR="$unix_path"
55919   fi
55920 
55921       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55922         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55923       else
55924         POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55925       fi
55926       $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55927 
55928   DLL_NAME="$DLL_NAME"
55929   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55930   METHOD="well-known location in VCINSTALLDIR"
55931   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55932     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55933 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55934 
55935     # Need to check if the found msvcr is correct architecture
55936     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55937 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55938     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55939     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55940       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55941       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55942       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55943         CORRECT_MSVCR_ARCH="PE32 executable"
55944       else
55945         CORRECT_MSVCR_ARCH="PE32+ executable"
55946       fi
55947     else
55948       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55949         CORRECT_MSVCR_ARCH=386
55950       else
55951         CORRECT_MSVCR_ARCH=x86-64
55952       fi
55953     fi
55954     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55955       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55956 $as_echo "ok" >&6; }
55957       MSVC_DLL="$POSSIBLE_MSVC_DLL"
55958 
55959   # Only process if variable expands to non-empty
55960 
55961   if test "x$MSVC_DLL" != x; then
55962     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55963 
55964   # Input might be given as Windows format, start by converting to
55965   # unix format.
55966   path="$MSVC_DLL"
55967   new_path=`$CYGPATH -u "$path"`
55968 
55969   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55970   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55971   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55972   # "foo.exe" is OK but "foo" is an error.
55973   #
55974   # This test is therefore slightly more accurate than "test -f" to check for file precense.
55975   # It is also a way to make sure we got the proper file name for the real test later on.
55976   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55977   if test "x$test_shortpath" = x; then
55978     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55979 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55980     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55981   fi
55982 
55983   # Call helper function which possibly converts this using DOS-style short mode.
55984   # If so, the updated path is stored in $new_path.
55985 
55986   input_path="$new_path"
55987   # Check if we need to convert this using DOS-style short mode. If the path
55988   # contains just simple characters, use it. Otherwise (spaces, weird characters),
55989   # take no chances and rewrite it.
55990   # Note: m4 eats our [], so we need to use [ and ] instead.
55991   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55992   if test "x$has_forbidden_chars" != x; then
55993     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55994     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55995     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55996     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55997       # Going to short mode and back again did indeed matter. Since short mode is
55998       # case insensitive, let's make it lowercase to improve readability.
55999       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56000       # Now convert it back to Unix-style (cygpath)
56001       input_path=`$CYGPATH -u "$shortmode_path"`
56002       new_path="$input_path"
56003     fi
56004   fi
56005 
56006   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56007   if test "x$test_cygdrive_prefix" = x; then
56008     # As a simple fix, exclude /usr/bin since it's not a real path.
56009     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56010       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56011       # a path prefixed by /cygdrive for fixpath to work.
56012       new_path="$CYGWIN_ROOT_PATH$input_path"
56013     fi
56014   fi
56015 
56016 
56017   if test "x$path" != "x$new_path"; then
56018     MSVC_DLL="$new_path"
56019     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56020 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56021   fi
56022 
56023     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56024 
56025   path="$MSVC_DLL"
56026   has_colon=`$ECHO $path | $GREP ^.:`
56027   new_path="$path"
56028   if test "x$has_colon" = x; then
56029     # Not in mixed or Windows style, start by that.
56030     new_path=`cmd //c echo $path`
56031   fi
56032 
56033 
56034   input_path="$new_path"
56035   # Check if we need to convert this using DOS-style short mode. If the path
56036   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56037   # take no chances and rewrite it.
56038   # Note: m4 eats our [], so we need to use [ and ] instead.
56039   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56040   if test "x$has_forbidden_chars" != x; then
56041     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56042     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56043   fi
56044 
56045 
56046   windows_path="$new_path"
56047   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56048     unix_path=`$CYGPATH -u "$windows_path"`
56049     new_path="$unix_path"
56050   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56051     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56052     new_path="$unix_path"
56053   fi
56054 
56055   if test "x$path" != "x$new_path"; then
56056     MSVC_DLL="$new_path"
56057     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56058 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56059   fi
56060 
56061   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56062   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56063 
56064     else
56065       # We're on a unix platform. Hooray! :)
56066       path="$MSVC_DLL"
56067       has_space=`$ECHO "$path" | $GREP " "`
56068       if test "x$has_space" != x; then
56069         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56070 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56071         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56072       fi
56073 
56074       # Use eval to expand a potential ~
56075       eval path="$path"
56076       if test ! -f "$path" && test ! -d "$path"; then
56077         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56078       fi
56079 
56080       if test -d "$path"; then
56081         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56082       else
56083         dir="`$DIRNAME "$path"`"
56084         base="`$BASENAME "$path"`"
56085         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56086       fi
56087     fi
56088   fi
56089 
56090       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56091 $as_echo_n "checking for $DLL_NAME... " >&6; }
56092       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56093 $as_echo "$MSVC_DLL" >&6; }
56094     else
56095       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56096 $as_echo "incorrect, ignoring" >&6; }
56097       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56098 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56099     fi
56100   fi
56101 
56102     fi
56103   fi
56104 
56105   if test "x$MSVC_DLL" = x; then
56106     # Probe: Check in the Boot JDK directory.
56107     POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
56108 
56109   DLL_NAME="$DLL_NAME"
56110   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56111   METHOD="well-known location in Boot JDK"
56112   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56113     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56114 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56115 
56116     # Need to check if the found msvcr is correct architecture
56117     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56118 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56119     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56120     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56121       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56122       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56123       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56124         CORRECT_MSVCR_ARCH="PE32 executable"
56125       else
56126         CORRECT_MSVCR_ARCH="PE32+ executable"
56127       fi
56128     else
56129       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56130         CORRECT_MSVCR_ARCH=386
56131       else
56132         CORRECT_MSVCR_ARCH=x86-64
56133       fi
56134     fi
56135     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56136       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56137 $as_echo "ok" >&6; }
56138       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56139 
56140   # Only process if variable expands to non-empty
56141 
56142   if test "x$MSVC_DLL" != x; then
56143     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56144 
56145   # Input might be given as Windows format, start by converting to
56146   # unix format.
56147   path="$MSVC_DLL"
56148   new_path=`$CYGPATH -u "$path"`
56149 
56150   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56151   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56152   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56153   # "foo.exe" is OK but "foo" is an error.
56154   #
56155   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56156   # It is also a way to make sure we got the proper file name for the real test later on.
56157   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56158   if test "x$test_shortpath" = x; then
56159     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56160 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56161     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56162   fi
56163 
56164   # Call helper function which possibly converts this using DOS-style short mode.
56165   # If so, the updated path is stored in $new_path.
56166 
56167   input_path="$new_path"
56168   # Check if we need to convert this using DOS-style short mode. If the path
56169   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56170   # take no chances and rewrite it.
56171   # Note: m4 eats our [], so we need to use [ and ] instead.
56172   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56173   if test "x$has_forbidden_chars" != x; then
56174     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56175     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56176     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56177     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56178       # Going to short mode and back again did indeed matter. Since short mode is
56179       # case insensitive, let's make it lowercase to improve readability.
56180       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56181       # Now convert it back to Unix-style (cygpath)
56182       input_path=`$CYGPATH -u "$shortmode_path"`
56183       new_path="$input_path"
56184     fi
56185   fi
56186 
56187   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56188   if test "x$test_cygdrive_prefix" = x; then
56189     # As a simple fix, exclude /usr/bin since it's not a real path.
56190     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56191       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56192       # a path prefixed by /cygdrive for fixpath to work.
56193       new_path="$CYGWIN_ROOT_PATH$input_path"
56194     fi
56195   fi
56196 
56197 
56198   if test "x$path" != "x$new_path"; then
56199     MSVC_DLL="$new_path"
56200     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56201 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56202   fi
56203 
56204     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56205 
56206   path="$MSVC_DLL"
56207   has_colon=`$ECHO $path | $GREP ^.:`
56208   new_path="$path"
56209   if test "x$has_colon" = x; then
56210     # Not in mixed or Windows style, start by that.
56211     new_path=`cmd //c echo $path`
56212   fi
56213 
56214 
56215   input_path="$new_path"
56216   # Check if we need to convert this using DOS-style short mode. If the path
56217   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56218   # take no chances and rewrite it.
56219   # Note: m4 eats our [], so we need to use [ and ] instead.
56220   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56221   if test "x$has_forbidden_chars" != x; then
56222     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56223     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56224   fi
56225 
56226 
56227   windows_path="$new_path"
56228   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56229     unix_path=`$CYGPATH -u "$windows_path"`
56230     new_path="$unix_path"
56231   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56232     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56233     new_path="$unix_path"
56234   fi
56235 
56236   if test "x$path" != "x$new_path"; then
56237     MSVC_DLL="$new_path"
56238     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56239 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56240   fi
56241 
56242   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56243   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56244 
56245     else
56246       # We're on a unix platform. Hooray! :)
56247       path="$MSVC_DLL"
56248       has_space=`$ECHO "$path" | $GREP " "`
56249       if test "x$has_space" != x; then
56250         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56251 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56252         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56253       fi
56254 
56255       # Use eval to expand a potential ~
56256       eval path="$path"
56257       if test ! -f "$path" && test ! -d "$path"; then
56258         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56259       fi
56260 
56261       if test -d "$path"; then
56262         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56263       else
56264         dir="`$DIRNAME "$path"`"
56265         base="`$BASENAME "$path"`"
56266         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56267       fi
56268     fi
56269   fi
56270 
56271       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56272 $as_echo_n "checking for $DLL_NAME... " >&6; }
56273       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56274 $as_echo "$MSVC_DLL" >&6; }
56275     else
56276       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56277 $as_echo "incorrect, ignoring" >&6; }
56278       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56279 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56280     fi
56281   fi
56282 
56283   fi
56284 
56285   if test "x$MSVC_DLL" = x; then
56286     # Probe: Look in the Windows system32 directory
56287     CYGWIN_SYSTEMROOT="$SYSTEMROOT"
56288 
56289   windows_path="$CYGWIN_SYSTEMROOT"
56290   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56291     unix_path=`$CYGPATH -u "$windows_path"`
56292     CYGWIN_SYSTEMROOT="$unix_path"
56293   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56294     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56295     CYGWIN_SYSTEMROOT="$unix_path"
56296   fi
56297 
56298     POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
56299 
56300   DLL_NAME="$DLL_NAME"
56301   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56302   METHOD="well-known location in SYSTEMROOT"
56303   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56304     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56305 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56306 
56307     # Need to check if the found msvcr is correct architecture
56308     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56309 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56310     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56311     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56312       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56313       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56314       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56315         CORRECT_MSVCR_ARCH="PE32 executable"
56316       else
56317         CORRECT_MSVCR_ARCH="PE32+ executable"
56318       fi
56319     else
56320       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56321         CORRECT_MSVCR_ARCH=386
56322       else
56323         CORRECT_MSVCR_ARCH=x86-64
56324       fi
56325     fi
56326     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56327       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56328 $as_echo "ok" >&6; }
56329       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56330 
56331   # Only process if variable expands to non-empty
56332 
56333   if test "x$MSVC_DLL" != x; then
56334     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56335 
56336   # Input might be given as Windows format, start by converting to
56337   # unix format.
56338   path="$MSVC_DLL"
56339   new_path=`$CYGPATH -u "$path"`
56340 
56341   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56342   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56343   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56344   # "foo.exe" is OK but "foo" is an error.
56345   #
56346   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56347   # It is also a way to make sure we got the proper file name for the real test later on.
56348   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56349   if test "x$test_shortpath" = x; then
56350     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56351 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56352     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56353   fi
56354 
56355   # Call helper function which possibly converts this using DOS-style short mode.
56356   # If so, the updated path is stored in $new_path.
56357 
56358   input_path="$new_path"
56359   # Check if we need to convert this using DOS-style short mode. If the path
56360   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56361   # take no chances and rewrite it.
56362   # Note: m4 eats our [], so we need to use [ and ] instead.
56363   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56364   if test "x$has_forbidden_chars" != x; then
56365     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56366     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56367     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56368     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56369       # Going to short mode and back again did indeed matter. Since short mode is
56370       # case insensitive, let's make it lowercase to improve readability.
56371       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56372       # Now convert it back to Unix-style (cygpath)
56373       input_path=`$CYGPATH -u "$shortmode_path"`
56374       new_path="$input_path"
56375     fi
56376   fi
56377 
56378   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56379   if test "x$test_cygdrive_prefix" = x; then
56380     # As a simple fix, exclude /usr/bin since it's not a real path.
56381     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56382       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56383       # a path prefixed by /cygdrive for fixpath to work.
56384       new_path="$CYGWIN_ROOT_PATH$input_path"
56385     fi
56386   fi
56387 
56388 
56389   if test "x$path" != "x$new_path"; then
56390     MSVC_DLL="$new_path"
56391     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56392 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56393   fi
56394 
56395     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56396 
56397   path="$MSVC_DLL"
56398   has_colon=`$ECHO $path | $GREP ^.:`
56399   new_path="$path"
56400   if test "x$has_colon" = x; then
56401     # Not in mixed or Windows style, start by that.
56402     new_path=`cmd //c echo $path`
56403   fi
56404 
56405 
56406   input_path="$new_path"
56407   # Check if we need to convert this using DOS-style short mode. If the path
56408   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56409   # take no chances and rewrite it.
56410   # Note: m4 eats our [], so we need to use [ and ] instead.
56411   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56412   if test "x$has_forbidden_chars" != x; then
56413     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56414     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56415   fi
56416 
56417 
56418   windows_path="$new_path"
56419   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56420     unix_path=`$CYGPATH -u "$windows_path"`
56421     new_path="$unix_path"
56422   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56423     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56424     new_path="$unix_path"
56425   fi
56426 
56427   if test "x$path" != "x$new_path"; then
56428     MSVC_DLL="$new_path"
56429     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56430 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56431   fi
56432 
56433   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56434   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56435 
56436     else
56437       # We're on a unix platform. Hooray! :)
56438       path="$MSVC_DLL"
56439       has_space=`$ECHO "$path" | $GREP " "`
56440       if test "x$has_space" != x; then
56441         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56442 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56443         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56444       fi
56445 
56446       # Use eval to expand a potential ~
56447       eval path="$path"
56448       if test ! -f "$path" && test ! -d "$path"; then
56449         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56450       fi
56451 
56452       if test -d "$path"; then
56453         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56454       else
56455         dir="`$DIRNAME "$path"`"
56456         base="`$BASENAME "$path"`"
56457         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56458       fi
56459     fi
56460   fi
56461 
56462       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56463 $as_echo_n "checking for $DLL_NAME... " >&6; }
56464       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56465 $as_echo "$MSVC_DLL" >&6; }
56466     else
56467       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56468 $as_echo "incorrect, ignoring" >&6; }
56469       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56470 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56471     fi
56472   fi
56473 
56474   fi
56475 
56476   if test "x$MSVC_DLL" = x; then
56477     # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56478     if test "x$VS100COMNTOOLS" != x; then
56479       CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56480 
56481   windows_path="$CYGWIN_VS_TOOLS_DIR"
56482   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56483     unix_path=`$CYGPATH -u "$windows_path"`
56484     CYGWIN_VS_TOOLS_DIR="$unix_path"
56485   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56486     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56487     CYGWIN_VS_TOOLS_DIR="$unix_path"
56488   fi
56489 
56490       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56491         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56492             | $GREP -i /x64/ | $HEAD --lines 1`
56493       else
56494         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56495             | $GREP -i /x86/ | $HEAD --lines 1`
56496       fi
56497 
56498   DLL_NAME="$DLL_NAME"
56499   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56500   METHOD="search of VS100COMNTOOLS"
56501   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56502     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56503 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56504 
56505     # Need to check if the found msvcr is correct architecture
56506     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56507 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56508     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56509     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56510       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56511       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56512       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56513         CORRECT_MSVCR_ARCH="PE32 executable"
56514       else
56515         CORRECT_MSVCR_ARCH="PE32+ executable"
56516       fi
56517     else
56518       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56519         CORRECT_MSVCR_ARCH=386
56520       else
56521         CORRECT_MSVCR_ARCH=x86-64
56522       fi
56523     fi
56524     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56525       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56526 $as_echo "ok" >&6; }
56527       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56528 
56529   # Only process if variable expands to non-empty
56530 
56531   if test "x$MSVC_DLL" != x; then
56532     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56533 
56534   # Input might be given as Windows format, start by converting to
56535   # unix format.
56536   path="$MSVC_DLL"
56537   new_path=`$CYGPATH -u "$path"`
56538 
56539   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56540   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56541   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56542   # "foo.exe" is OK but "foo" is an error.
56543   #
56544   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56545   # It is also a way to make sure we got the proper file name for the real test later on.
56546   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56547   if test "x$test_shortpath" = x; then
56548     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56549 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56550     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56551   fi
56552 
56553   # Call helper function which possibly converts this using DOS-style short mode.
56554   # If so, the updated path is stored in $new_path.
56555 
56556   input_path="$new_path"
56557   # Check if we need to convert this using DOS-style short mode. If the path
56558   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56559   # take no chances and rewrite it.
56560   # Note: m4 eats our [], so we need to use [ and ] instead.
56561   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56562   if test "x$has_forbidden_chars" != x; then
56563     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56564     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56565     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56566     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56567       # Going to short mode and back again did indeed matter. Since short mode is
56568       # case insensitive, let's make it lowercase to improve readability.
56569       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56570       # Now convert it back to Unix-style (cygpath)
56571       input_path=`$CYGPATH -u "$shortmode_path"`
56572       new_path="$input_path"
56573     fi
56574   fi
56575 
56576   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56577   if test "x$test_cygdrive_prefix" = x; then
56578     # As a simple fix, exclude /usr/bin since it's not a real path.
56579     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56580       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56581       # a path prefixed by /cygdrive for fixpath to work.
56582       new_path="$CYGWIN_ROOT_PATH$input_path"
56583     fi
56584   fi
56585 
56586 
56587   if test "x$path" != "x$new_path"; then
56588     MSVC_DLL="$new_path"
56589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56590 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56591   fi
56592 
56593     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56594 
56595   path="$MSVC_DLL"
56596   has_colon=`$ECHO $path | $GREP ^.:`
56597   new_path="$path"
56598   if test "x$has_colon" = x; then
56599     # Not in mixed or Windows style, start by that.
56600     new_path=`cmd //c echo $path`
56601   fi
56602 
56603 
56604   input_path="$new_path"
56605   # Check if we need to convert this using DOS-style short mode. If the path
56606   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56607   # take no chances and rewrite it.
56608   # Note: m4 eats our [], so we need to use [ and ] instead.
56609   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56610   if test "x$has_forbidden_chars" != x; then
56611     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56612     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56613   fi
56614 
56615 
56616   windows_path="$new_path"
56617   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56618     unix_path=`$CYGPATH -u "$windows_path"`
56619     new_path="$unix_path"
56620   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56621     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56622     new_path="$unix_path"
56623   fi
56624 
56625   if test "x$path" != "x$new_path"; then
56626     MSVC_DLL="$new_path"
56627     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56628 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56629   fi
56630 
56631   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56632   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56633 
56634     else
56635       # We're on a unix platform. Hooray! :)
56636       path="$MSVC_DLL"
56637       has_space=`$ECHO "$path" | $GREP " "`
56638       if test "x$has_space" != x; then
56639         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56640 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56641         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56642       fi
56643 
56644       # Use eval to expand a potential ~
56645       eval path="$path"
56646       if test ! -f "$path" && test ! -d "$path"; then
56647         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56648       fi
56649 
56650       if test -d "$path"; then
56651         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56652       else
56653         dir="`$DIRNAME "$path"`"
56654         base="`$BASENAME "$path"`"
56655         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56656       fi
56657     fi
56658   fi
56659 
56660       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56661 $as_echo_n "checking for $DLL_NAME... " >&6; }
56662       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56663 $as_echo "$MSVC_DLL" >&6; }
56664     else
56665       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56666 $as_echo "incorrect, ignoring" >&6; }
56667       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56668 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56669     fi
56670   fi
56671 
56672     fi
56673   fi
56674 
56675   if test "x$MSVC_DLL" = x; then
56676     # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56677     # (This was the original behaviour; kept since it might turn something up)
56678     if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56679       if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56680         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56681             | $GREP x64 | $HEAD --lines 1`
56682       else
56683         POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56684             | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56685         if test "x$POSSIBLE_MSVC_DLL" = x; then
56686           # We're grasping at straws now...
56687           POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56688               | $HEAD --lines 1`
56689         fi
56690       fi
56691 
56692 
56693   DLL_NAME="$DLL_NAME"
56694   POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56695   METHOD="search of VCINSTALLDIR"
56696   if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56697     { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56698 $as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56699 
56700     # Need to check if the found msvcr is correct architecture
56701     { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56702 $as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56703     MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56704     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56705       # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56706       # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56707       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56708         CORRECT_MSVCR_ARCH="PE32 executable"
56709       else
56710         CORRECT_MSVCR_ARCH="PE32+ executable"
56711       fi
56712     else
56713       if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56714         CORRECT_MSVCR_ARCH=386
56715       else
56716         CORRECT_MSVCR_ARCH=x86-64
56717       fi
56718     fi
56719     if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56720       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56721 $as_echo "ok" >&6; }
56722       MSVC_DLL="$POSSIBLE_MSVC_DLL"
56723 
56724   # Only process if variable expands to non-empty
56725 
56726   if test "x$MSVC_DLL" != x; then
56727     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56728 
56729   # Input might be given as Windows format, start by converting to
56730   # unix format.
56731   path="$MSVC_DLL"
56732   new_path=`$CYGPATH -u "$path"`
56733 
56734   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56735   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56736   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56737   # "foo.exe" is OK but "foo" is an error.
56738   #
56739   # This test is therefore slightly more accurate than "test -f" to check for file precense.
56740   # It is also a way to make sure we got the proper file name for the real test later on.
56741   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56742   if test "x$test_shortpath" = x; then
56743     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56744 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56745     as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56746   fi
56747 
56748   # Call helper function which possibly converts this using DOS-style short mode.
56749   # If so, the updated path is stored in $new_path.
56750 
56751   input_path="$new_path"
56752   # Check if we need to convert this using DOS-style short mode. If the path
56753   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56754   # take no chances and rewrite it.
56755   # Note: m4 eats our [], so we need to use [ and ] instead.
56756   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56757   if test "x$has_forbidden_chars" != x; then
56758     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56759     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56760     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56761     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56762       # Going to short mode and back again did indeed matter. Since short mode is
56763       # case insensitive, let's make it lowercase to improve readability.
56764       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56765       # Now convert it back to Unix-style (cygpath)
56766       input_path=`$CYGPATH -u "$shortmode_path"`
56767       new_path="$input_path"
56768     fi
56769   fi
56770 
56771   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56772   if test "x$test_cygdrive_prefix" = x; then
56773     # As a simple fix, exclude /usr/bin since it's not a real path.
56774     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56775       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56776       # a path prefixed by /cygdrive for fixpath to work.
56777       new_path="$CYGWIN_ROOT_PATH$input_path"
56778     fi
56779   fi
56780 
56781 
56782   if test "x$path" != "x$new_path"; then
56783     MSVC_DLL="$new_path"
56784     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56785 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56786   fi
56787 
56788     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56789 
56790   path="$MSVC_DLL"
56791   has_colon=`$ECHO $path | $GREP ^.:`
56792   new_path="$path"
56793   if test "x$has_colon" = x; then
56794     # Not in mixed or Windows style, start by that.
56795     new_path=`cmd //c echo $path`
56796   fi
56797 
56798 
56799   input_path="$new_path"
56800   # Check if we need to convert this using DOS-style short mode. If the path
56801   # contains just simple characters, use it. Otherwise (spaces, weird characters),
56802   # take no chances and rewrite it.
56803   # Note: m4 eats our [], so we need to use [ and ] instead.
56804   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56805   if test "x$has_forbidden_chars" != x; then
56806     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56807     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56808   fi
56809 
56810 
56811   windows_path="$new_path"
56812   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56813     unix_path=`$CYGPATH -u "$windows_path"`
56814     new_path="$unix_path"
56815   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56816     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56817     new_path="$unix_path"
56818   fi
56819 
56820   if test "x$path" != "x$new_path"; then
56821     MSVC_DLL="$new_path"
56822     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56823 $as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56824   fi
56825 
56826   # Save the first 10 bytes of this path to the storage, so fixpath can work.
56827   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56828 
56829     else
56830       # We're on a unix platform. Hooray! :)
56831       path="$MSVC_DLL"
56832       has_space=`$ECHO "$path" | $GREP " "`
56833       if test "x$has_space" != x; then
56834         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56835 $as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56836         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56837       fi
56838 
56839       # Use eval to expand a potential ~
56840       eval path="$path"
56841       if test ! -f "$path" && test ! -d "$path"; then
56842         as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56843       fi
56844 
56845       if test -d "$path"; then
56846         MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56847       else
56848         dir="`$DIRNAME "$path"`"
56849         base="`$BASENAME "$path"`"
56850         MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56851       fi
56852     fi
56853   fi
56854 
56855       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56856 $as_echo_n "checking for $DLL_NAME... " >&6; }
56857       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56858 $as_echo "$MSVC_DLL" >&6; }
56859     else
56860       { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56861 $as_echo "incorrect, ignoring" >&6; }
56862       { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56863 $as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56864     fi
56865   fi
56866 
56867     fi
56868   fi
56869 
56870   if test "x$MSVC_DLL" = x; then
56871     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56872 $as_echo_n "checking for $DLL_NAME... " >&6; }
56873     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56874 $as_echo "no" >&6; }
56875     as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56876   fi
56877 
56878       MSVCP_DLL="$MSVC_DLL"
56879     fi
56880 
56881   fi
56882 
56883   fi
56884 
56885 
56886   if test "x$NEEDS_LIB_X11" = xfalse; then
56887     if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56888       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56889 $as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56890     fi
56891     X_CFLAGS=
56892     X_LIBS=
56893   else
56894 
56895     if test "x${with_x}" = xno; then
56896       as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56897     fi
56898 
56899     if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56900       # The user has specified a X11 base directory. Use it for includes and
56901       # libraries, unless explicitly overridden.
56902       if test "x$x_includes" = xNONE; then
56903         x_includes="${with_x}/include"
56904       fi
56905       if test "x$x_libraries" = xNONE; then
56906         x_libraries="${with_x}/lib"
56907       fi
56908     else
56909       # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56910       # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56911       # --x-libraries for the sysroot, if that seems to be correct.
56912       if test "x$SYSROOT" != "x"; then
56913         if test "x$x_includes" = xNONE; then
56914           if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56915             x_includes="$SYSROOT/usr/X11R6/include"
56916           elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56917             x_includes="$SYSROOT/usr/include"
56918           fi
56919         fi
56920         if test "x$x_libraries" = xNONE; then
56921           if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56922             x_libraries="$SYSROOT/usr/X11R6/lib"
56923           elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56924             x_libraries="$SYSROOT/usr/lib64"
56925           elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56926             x_libraries="$SYSROOT/usr/lib"
56927           fi
56928         fi
56929       fi
56930     fi
56931 
56932     # Now let autoconf do it's magic
56933     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56934 $as_echo_n "checking for X... " >&6; }
56935 
56936 
56937 # Check whether --with-x was given.
56938 if test "${with_x+set}" = set; then :
56939   withval=$with_x;
56940 fi
56941 
56942 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56943 if test "x$with_x" = xno; then
56944   # The user explicitly disabled X.
56945   have_x=disabled
56946 else
56947   case $x_includes,$x_libraries in #(
56948     *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56949     *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56950   $as_echo_n "(cached) " >&6
56951 else
56952   # One or both of the vars are not set, and there is no cached value.
56953 ac_x_includes=no ac_x_libraries=no
56954 rm -f -r conftest.dir
56955 if mkdir conftest.dir; then
56956   cd conftest.dir
56957   cat >Imakefile <<'_ACEOF'
56958 incroot:
56959         @echo incroot='${INCROOT}'
56960 usrlibdir:
56961         @echo usrlibdir='${USRLIBDIR}'
56962 libdir:
56963         @echo libdir='${LIBDIR}'
56964 _ACEOF
56965   if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56966     # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56967     for ac_var in incroot usrlibdir libdir; do
56968       eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56969     done
56970     # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56971     for ac_extension in a so sl dylib la dll; do
56972       if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56973          test -f "$ac_im_libdir/libX11.$ac_extension"; then
56974         ac_im_usrlibdir=$ac_im_libdir; break
56975       fi
56976     done
56977     # Screen out bogus values from the imake configuration.  They are
56978     # bogus both because they are the default anyway, and because
56979     # using them would break gcc on systems where it needs fixed includes.
56980     case $ac_im_incroot in
56981         /usr/include) ac_x_includes= ;;
56982         *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56983     esac
56984     case $ac_im_usrlibdir in
56985         /usr/lib | /usr/lib64 | /lib | /lib64) ;;
56986         *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56987     esac
56988   fi
56989   cd ..
56990   rm -f -r conftest.dir
56991 fi
56992 
56993 # Standard set of common directories for X headers.
56994 # Check X11 before X11Rn because it is often a symlink to the current release.
56995 ac_x_header_dirs='
56996 /usr/X11/include
56997 /usr/X11R7/include
56998 /usr/X11R6/include
56999 /usr/X11R5/include
57000 /usr/X11R4/include
57001 
57002 /usr/include/X11
57003 /usr/include/X11R7
57004 /usr/include/X11R6
57005 /usr/include/X11R5
57006 /usr/include/X11R4
57007 
57008 /usr/local/X11/include
57009 /usr/local/X11R7/include
57010 /usr/local/X11R6/include
57011 /usr/local/X11R5/include
57012 /usr/local/X11R4/include
57013 
57014 /usr/local/include/X11
57015 /usr/local/include/X11R7
57016 /usr/local/include/X11R6
57017 /usr/local/include/X11R5
57018 /usr/local/include/X11R4
57019 
57020 /usr/X386/include
57021 /usr/x386/include
57022 /usr/XFree86/include/X11
57023 
57024 /usr/include
57025 /usr/local/include
57026 /usr/unsupported/include
57027 /usr/athena/include
57028 /usr/local/x11r5/include
57029 /usr/lpp/Xamples/include
57030 
57031 /usr/openwin/include
57032 /usr/openwin/share/include'
57033 
57034 if test "$ac_x_includes" = no; then
57035   # Guess where to find include files, by looking for Xlib.h.
57036   # First, try using that file with no special directory specified.
57037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57038 /* end confdefs.h.  */
57039 #include <X11/Xlib.h>
57040 _ACEOF
57041 if ac_fn_cxx_try_cpp "$LINENO"; then :
57042   # We can compile using X headers with no special include directory.
57043 ac_x_includes=
57044 else
57045   for ac_dir in $ac_x_header_dirs; do
57046   if test -r "$ac_dir/X11/Xlib.h"; then
57047     ac_x_includes=$ac_dir
57048     break
57049   fi
57050 done
57051 fi
57052 rm -f conftest.err conftest.i conftest.$ac_ext
57053 fi # $ac_x_includes = no
57054 
57055 if test "$ac_x_libraries" = no; then
57056   # Check for the libraries.
57057   # See if we find them without any special options.
57058   # Don't add to $LIBS permanently.
57059   ac_save_LIBS=$LIBS
57060   LIBS="-lX11 $LIBS"
57061   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57062 /* end confdefs.h.  */
57063 #include <X11/Xlib.h>
57064 int
57065 main ()
57066 {
57067 XrmInitialize ()
57068   ;
57069   return 0;
57070 }
57071 _ACEOF
57072 if ac_fn_cxx_try_link "$LINENO"; then :
57073   LIBS=$ac_save_LIBS
57074 # We can link X programs with no special library path.
57075 ac_x_libraries=
57076 else
57077   LIBS=$ac_save_LIBS
57078 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
57079 do
57080   # Don't even attempt the hair of trying to link an X program!
57081   for ac_extension in a so sl dylib la dll; do
57082     if test -r "$ac_dir/libX11.$ac_extension"; then
57083       ac_x_libraries=$ac_dir
57084       break 2
57085     fi
57086   done
57087 done
57088 fi
57089 rm -f core conftest.err conftest.$ac_objext \
57090     conftest$ac_exeext conftest.$ac_ext
57091 fi # $ac_x_libraries = no
57092 
57093 case $ac_x_includes,$ac_x_libraries in #(
57094   no,* | *,no | *\'*)
57095     # Didn't find X, or a directory has "'" in its name.
57096     ac_cv_have_x="have_x=no";; #(
57097   *)
57098     # Record where we found X for the cache.
57099     ac_cv_have_x="have_x=yes\
57100         ac_x_includes='$ac_x_includes'\
57101         ac_x_libraries='$ac_x_libraries'"
57102 esac
57103 fi
57104 ;; #(
57105     *) have_x=yes;;
57106   esac
57107   eval "$ac_cv_have_x"
57108 fi # $with_x != no
57109 
57110 if test "$have_x" != yes; then
57111   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
57112 $as_echo "$have_x" >&6; }
57113   no_x=yes
57114 else
57115   # If each of the values was on the command line, it overrides each guess.
57116   test "x$x_includes" = xNONE && x_includes=$ac_x_includes
57117   test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
57118   # Update the cache value to reflect the command line values.
57119   ac_cv_have_x="have_x=yes\
57120         ac_x_includes='$x_includes'\
57121         ac_x_libraries='$x_libraries'"
57122   { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
57123 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
57124 fi
57125 
57126     if test "$no_x" = yes; then
57127   # Not all programs may use this symbol, but it does not hurt to define it.
57128 
57129 $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
57130 
57131   X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
57132 else
57133   if test -n "$x_includes"; then
57134     X_CFLAGS="$X_CFLAGS -I$x_includes"
57135   fi
57136 
57137   # It would also be nice to do this for all -L options, not just this one.
57138   if test -n "$x_libraries"; then
57139     X_LIBS="$X_LIBS -L$x_libraries"
57140     # For Solaris; some versions of Sun CC require a space after -R and
57141     # others require no space.  Words are not sufficient . . . .
57142     { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
57143 $as_echo_n "checking whether -R must be followed by a space... " >&6; }
57144     ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
57145     ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
57146     ac_cxx_werror_flag=yes
57147     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57148 /* end confdefs.h.  */
57149 
57150 int
57151 main ()
57152 {
57153 
57154   ;
57155   return 0;
57156 }
57157 _ACEOF
57158 if ac_fn_cxx_try_link "$LINENO"; then :
57159   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57160 $as_echo "no" >&6; }
57161        X_LIBS="$X_LIBS -R$x_libraries"
57162 else
57163   LIBS="$ac_xsave_LIBS -R $x_libraries"
57164        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57165 /* end confdefs.h.  */
57166 
57167 int
57168 main ()
57169 {
57170 
57171   ;
57172   return 0;
57173 }
57174 _ACEOF
57175 if ac_fn_cxx_try_link "$LINENO"; then :
57176   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57177 $as_echo "yes" >&6; }
57178           X_LIBS="$X_LIBS -R $x_libraries"
57179 else
57180   { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
57181 $as_echo "neither works" >&6; }
57182 fi
57183 rm -f core conftest.err conftest.$ac_objext \
57184     conftest$ac_exeext conftest.$ac_ext
57185 fi
57186 rm -f core conftest.err conftest.$ac_objext \
57187     conftest$ac_exeext conftest.$ac_ext
57188     ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
57189     LIBS=$ac_xsave_LIBS
57190   fi
57191 
57192   # Check for system-dependent libraries X programs must link with.
57193   # Do this before checking for the system-independent R6 libraries
57194   # (-lICE), since we may need -lsocket or whatever for X linking.
57195 
57196   if test "$ISC" = yes; then
57197     X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
57198   else
57199     # Martyn Johnson says this is needed for Ultrix, if the X
57200     # libraries were built with DECnet support.  And Karl Berry says
57201     # the Alpha needs dnet_stub (dnet does not exist).
57202     ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
57203     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57204 /* end confdefs.h.  */
57205 
57206 /* Override any GCC internal prototype to avoid an error.
57207    Use char because int might match the return type of a GCC
57208    builtin and then its argument prototype would still apply.  */
57209 #ifdef __cplusplus
57210 extern "C"
57211 #endif
57212 char XOpenDisplay ();
57213 int
57214 main ()
57215 {
57216 return XOpenDisplay ();
57217   ;
57218   return 0;
57219 }
57220 _ACEOF
57221 if ac_fn_cxx_try_link "$LINENO"; then :
57222 
57223 else
57224   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
57225 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
57226 if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
57227   $as_echo_n "(cached) " >&6
57228 else
57229   ac_check_lib_save_LIBS=$LIBS
57230 LIBS="-ldnet  $LIBS"
57231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57232 /* end confdefs.h.  */
57233 
57234 /* Override any GCC internal prototype to avoid an error.
57235    Use char because int might match the return type of a GCC
57236    builtin and then its argument prototype would still apply.  */
57237 #ifdef __cplusplus
57238 extern "C"
57239 #endif
57240 char dnet_ntoa ();
57241 int
57242 main ()
57243 {
57244 return dnet_ntoa ();
57245   ;
57246   return 0;
57247 }
57248 _ACEOF
57249 if ac_fn_cxx_try_link "$LINENO"; then :
57250   ac_cv_lib_dnet_dnet_ntoa=yes
57251 else
57252   ac_cv_lib_dnet_dnet_ntoa=no
57253 fi
57254 rm -f core conftest.err conftest.$ac_objext \
57255     conftest$ac_exeext conftest.$ac_ext
57256 LIBS=$ac_check_lib_save_LIBS
57257 fi
57258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
57259 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
57260 if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
57261   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
57262 fi
57263 
57264     if test $ac_cv_lib_dnet_dnet_ntoa = no; then
57265       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
57266 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
57267 if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
57268   $as_echo_n "(cached) " >&6
57269 else
57270   ac_check_lib_save_LIBS=$LIBS
57271 LIBS="-ldnet_stub  $LIBS"
57272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57273 /* end confdefs.h.  */
57274 
57275 /* Override any GCC internal prototype to avoid an error.
57276    Use char because int might match the return type of a GCC
57277    builtin and then its argument prototype would still apply.  */
57278 #ifdef __cplusplus
57279 extern "C"
57280 #endif
57281 char dnet_ntoa ();
57282 int
57283 main ()
57284 {
57285 return dnet_ntoa ();
57286   ;
57287   return 0;
57288 }
57289 _ACEOF
57290 if ac_fn_cxx_try_link "$LINENO"; then :
57291   ac_cv_lib_dnet_stub_dnet_ntoa=yes
57292 else
57293   ac_cv_lib_dnet_stub_dnet_ntoa=no
57294 fi
57295 rm -f core conftest.err conftest.$ac_objext \
57296     conftest$ac_exeext conftest.$ac_ext
57297 LIBS=$ac_check_lib_save_LIBS
57298 fi
57299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
57300 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
57301 if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
57302   X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
57303 fi
57304 
57305     fi
57306 fi
57307 rm -f core conftest.err conftest.$ac_objext \
57308     conftest$ac_exeext conftest.$ac_ext
57309     LIBS="$ac_xsave_LIBS"
57310 
57311     # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
57312     # to get the SysV transport functions.
57313     # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
57314     # needs -lnsl.
57315     # The nsl library prevents programs from opening the X display
57316     # on Irix 5.2, according to T.E. Dickey.
57317     # The functions gethostbyname, getservbyname, and inet_addr are
57318     # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
57319     ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
57320 if test "x$ac_cv_func_gethostbyname" = xyes; then :
57321 
57322 fi
57323 
57324     if test $ac_cv_func_gethostbyname = no; then
57325       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
57326 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
57327 if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
57328   $as_echo_n "(cached) " >&6
57329 else
57330   ac_check_lib_save_LIBS=$LIBS
57331 LIBS="-lnsl  $LIBS"
57332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57333 /* end confdefs.h.  */
57334 
57335 /* Override any GCC internal prototype to avoid an error.
57336    Use char because int might match the return type of a GCC
57337    builtin and then its argument prototype would still apply.  */
57338 #ifdef __cplusplus
57339 extern "C"
57340 #endif
57341 char gethostbyname ();
57342 int
57343 main ()
57344 {
57345 return gethostbyname ();
57346   ;
57347   return 0;
57348 }
57349 _ACEOF
57350 if ac_fn_cxx_try_link "$LINENO"; then :
57351   ac_cv_lib_nsl_gethostbyname=yes
57352 else
57353   ac_cv_lib_nsl_gethostbyname=no
57354 fi
57355 rm -f core conftest.err conftest.$ac_objext \
57356     conftest$ac_exeext conftest.$ac_ext
57357 LIBS=$ac_check_lib_save_LIBS
57358 fi
57359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
57360 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
57361 if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
57362   X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
57363 fi
57364 
57365       if test $ac_cv_lib_nsl_gethostbyname = no; then
57366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
57367 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
57368 if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
57369   $as_echo_n "(cached) " >&6
57370 else
57371   ac_check_lib_save_LIBS=$LIBS
57372 LIBS="-lbsd  $LIBS"
57373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57374 /* end confdefs.h.  */
57375 
57376 /* Override any GCC internal prototype to avoid an error.
57377    Use char because int might match the return type of a GCC
57378    builtin and then its argument prototype would still apply.  */
57379 #ifdef __cplusplus
57380 extern "C"
57381 #endif
57382 char gethostbyname ();
57383 int
57384 main ()
57385 {
57386 return gethostbyname ();
57387   ;
57388   return 0;
57389 }
57390 _ACEOF
57391 if ac_fn_cxx_try_link "$LINENO"; then :
57392   ac_cv_lib_bsd_gethostbyname=yes
57393 else
57394   ac_cv_lib_bsd_gethostbyname=no
57395 fi
57396 rm -f core conftest.err conftest.$ac_objext \
57397     conftest$ac_exeext conftest.$ac_ext
57398 LIBS=$ac_check_lib_save_LIBS
57399 fi
57400 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
57401 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
57402 if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
57403   X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
57404 fi
57405 
57406       fi
57407     fi
57408 
57409     # lieder@skyler.mavd.honeywell.com says without -lsocket,
57410     # socket/setsockopt and other routines are undefined under SCO ODT
57411     # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57412     # on later versions), says Simon Leinen: it contains gethostby*
57413     # variants that don't use the name server (or something).  -lsocket
57414     # must be given before -lnsl if both are needed.  We assume that
57415     # if connect needs -lnsl, so does gethostbyname.
57416     ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57417 if test "x$ac_cv_func_connect" = xyes; then :
57418 
57419 fi
57420 
57421     if test $ac_cv_func_connect = no; then
57422       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57423 $as_echo_n "checking for connect in -lsocket... " >&6; }
57424 if ${ac_cv_lib_socket_connect+:} false; then :
57425   $as_echo_n "(cached) " >&6
57426 else
57427   ac_check_lib_save_LIBS=$LIBS
57428 LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57430 /* end confdefs.h.  */
57431 
57432 /* Override any GCC internal prototype to avoid an error.
57433    Use char because int might match the return type of a GCC
57434    builtin and then its argument prototype would still apply.  */
57435 #ifdef __cplusplus
57436 extern "C"
57437 #endif
57438 char connect ();
57439 int
57440 main ()
57441 {
57442 return connect ();
57443   ;
57444   return 0;
57445 }
57446 _ACEOF
57447 if ac_fn_cxx_try_link "$LINENO"; then :
57448   ac_cv_lib_socket_connect=yes
57449 else
57450   ac_cv_lib_socket_connect=no
57451 fi
57452 rm -f core conftest.err conftest.$ac_objext \
57453     conftest$ac_exeext conftest.$ac_ext
57454 LIBS=$ac_check_lib_save_LIBS
57455 fi
57456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57457 $as_echo "$ac_cv_lib_socket_connect" >&6; }
57458 if test "x$ac_cv_lib_socket_connect" = xyes; then :
57459   X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57460 fi
57461 
57462     fi
57463 
57464     # Guillermo Gomez says -lposix is necessary on A/UX.
57465     ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57466 if test "x$ac_cv_func_remove" = xyes; then :
57467 
57468 fi
57469 
57470     if test $ac_cv_func_remove = no; then
57471       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57472 $as_echo_n "checking for remove in -lposix... " >&6; }
57473 if ${ac_cv_lib_posix_remove+:} false; then :
57474   $as_echo_n "(cached) " >&6
57475 else
57476   ac_check_lib_save_LIBS=$LIBS
57477 LIBS="-lposix  $LIBS"
57478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57479 /* end confdefs.h.  */
57480 
57481 /* Override any GCC internal prototype to avoid an error.
57482    Use char because int might match the return type of a GCC
57483    builtin and then its argument prototype would still apply.  */
57484 #ifdef __cplusplus
57485 extern "C"
57486 #endif
57487 char remove ();
57488 int
57489 main ()
57490 {
57491 return remove ();
57492   ;
57493   return 0;
57494 }
57495 _ACEOF
57496 if ac_fn_cxx_try_link "$LINENO"; then :
57497   ac_cv_lib_posix_remove=yes
57498 else
57499   ac_cv_lib_posix_remove=no
57500 fi
57501 rm -f core conftest.err conftest.$ac_objext \
57502     conftest$ac_exeext conftest.$ac_ext
57503 LIBS=$ac_check_lib_save_LIBS
57504 fi
57505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57506 $as_echo "$ac_cv_lib_posix_remove" >&6; }
57507 if test "x$ac_cv_lib_posix_remove" = xyes; then :
57508   X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57509 fi
57510 
57511     fi
57512 
57513     # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57514     ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57515 if test "x$ac_cv_func_shmat" = xyes; then :
57516 
57517 fi
57518 
57519     if test $ac_cv_func_shmat = no; then
57520       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57521 $as_echo_n "checking for shmat in -lipc... " >&6; }
57522 if ${ac_cv_lib_ipc_shmat+:} false; then :
57523   $as_echo_n "(cached) " >&6
57524 else
57525   ac_check_lib_save_LIBS=$LIBS
57526 LIBS="-lipc  $LIBS"
57527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57528 /* end confdefs.h.  */
57529 
57530 /* Override any GCC internal prototype to avoid an error.
57531    Use char because int might match the return type of a GCC
57532    builtin and then its argument prototype would still apply.  */
57533 #ifdef __cplusplus
57534 extern "C"
57535 #endif
57536 char shmat ();
57537 int
57538 main ()
57539 {
57540 return shmat ();
57541   ;
57542   return 0;
57543 }
57544 _ACEOF
57545 if ac_fn_cxx_try_link "$LINENO"; then :
57546   ac_cv_lib_ipc_shmat=yes
57547 else
57548   ac_cv_lib_ipc_shmat=no
57549 fi
57550 rm -f core conftest.err conftest.$ac_objext \
57551     conftest$ac_exeext conftest.$ac_ext
57552 LIBS=$ac_check_lib_save_LIBS
57553 fi
57554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57555 $as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57556 if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57557   X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57558 fi
57559 
57560     fi
57561   fi
57562 
57563   # Check for libraries that X11R6 Xt/Xaw programs need.
57564   ac_save_LDFLAGS=$LDFLAGS
57565   test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57566   # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57567   # check for ICE first), but we must link in the order -lSM -lICE or
57568   # we get undefined symbols.  So assume we have SM if we have ICE.
57569   # These have to be linked with before -lX11, unlike the other
57570   # libraries we check for below, so use a different variable.
57571   # John Interrante, Karl Berry
57572   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57573 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57574 if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57575   $as_echo_n "(cached) " >&6
57576 else
57577   ac_check_lib_save_LIBS=$LIBS
57578 LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57580 /* end confdefs.h.  */
57581 
57582 /* Override any GCC internal prototype to avoid an error.
57583    Use char because int might match the return type of a GCC
57584    builtin and then its argument prototype would still apply.  */
57585 #ifdef __cplusplus
57586 extern "C"
57587 #endif
57588 char IceConnectionNumber ();
57589 int
57590 main ()
57591 {
57592 return IceConnectionNumber ();
57593   ;
57594   return 0;
57595 }
57596 _ACEOF
57597 if ac_fn_cxx_try_link "$LINENO"; then :
57598   ac_cv_lib_ICE_IceConnectionNumber=yes
57599 else
57600   ac_cv_lib_ICE_IceConnectionNumber=no
57601 fi
57602 rm -f core conftest.err conftest.$ac_objext \
57603     conftest$ac_exeext conftest.$ac_ext
57604 LIBS=$ac_check_lib_save_LIBS
57605 fi
57606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57607 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57608 if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57609   X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57610 fi
57611 
57612   LDFLAGS=$ac_save_LDFLAGS
57613 
57614 fi
57615 
57616 
57617     # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57618     # this doesn't make sense so we remove it.
57619     if test "x$COMPILE_TYPE" = xcross; then
57620       X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57621     fi
57622 
57623     if test "x$no_x" = xyes; then
57624 
57625   # Print a helpful message on how to acquire the necessary build dependency.
57626   # x11 is the help tag: freetype, cups, alsa etc
57627   MISSING_DEPENDENCY=x11
57628 
57629   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57630     cygwin_help $MISSING_DEPENDENCY
57631   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57632     msys_help $MISSING_DEPENDENCY
57633   else
57634     PKGHANDLER_COMMAND=
57635 
57636     case $PKGHANDLER in
57637       apt-get)
57638         apt_help     $MISSING_DEPENDENCY ;;
57639       yum)
57640         yum_help     $MISSING_DEPENDENCY ;;
57641       brew)
57642         brew_help    $MISSING_DEPENDENCY ;;
57643       port)
57644         port_help    $MISSING_DEPENDENCY ;;
57645       pkgutil)
57646         pkgutil_help $MISSING_DEPENDENCY ;;
57647       pkgadd)
57648         pkgadd_help  $MISSING_DEPENDENCY ;;
57649     esac
57650 
57651     if test "x$PKGHANDLER_COMMAND" != x; then
57652       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57653     fi
57654   fi
57655 
57656       as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57657     fi
57658 
57659     if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57660       OPENWIN_HOME="/usr/openwin"
57661       X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57662       X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57663           -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57664     fi
57665 
57666     ac_ext=c
57667 ac_cpp='$CPP $CPPFLAGS'
57668 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57669 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57670 ac_compiler_gnu=$ac_cv_c_compiler_gnu
57671 
57672     OLD_CFLAGS="$CFLAGS"
57673     CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57674 
57675     # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57676     for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57677 do :
57678   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57679 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57680           # include <X11/Xlib.h>
57681           # include <X11/Xutil.h>
57682 
57683 
57684 "
57685 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57686   cat >>confdefs.h <<_ACEOF
57687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57688 _ACEOF
57689  X11_HEADERS_OK=yes
57690 else
57691   X11_HEADERS_OK=no; break
57692 fi
57693 
57694 done
57695 
57696 
57697     if test "x$X11_HEADERS_OK" = xno; then
57698 
57699   # Print a helpful message on how to acquire the necessary build dependency.
57700   # x11 is the help tag: freetype, cups, alsa etc
57701   MISSING_DEPENDENCY=x11
57702 
57703   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57704     cygwin_help $MISSING_DEPENDENCY
57705   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57706     msys_help $MISSING_DEPENDENCY
57707   else
57708     PKGHANDLER_COMMAND=
57709 
57710     case $PKGHANDLER in
57711       apt-get)
57712         apt_help     $MISSING_DEPENDENCY ;;
57713       yum)
57714         yum_help     $MISSING_DEPENDENCY ;;
57715       brew)
57716         brew_help    $MISSING_DEPENDENCY ;;
57717       port)
57718         port_help    $MISSING_DEPENDENCY ;;
57719       pkgutil)
57720         pkgutil_help $MISSING_DEPENDENCY ;;
57721       pkgadd)
57722         pkgadd_help  $MISSING_DEPENDENCY ;;
57723     esac
57724 
57725     if test "x$PKGHANDLER_COMMAND" != x; then
57726       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57727     fi
57728   fi
57729 
57730       as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57731     fi
57732 
57733     # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57734     # defined in libawt_xawt.
57735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57736 $as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57737     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57738 /* end confdefs.h.  */
57739 #include <X11/extensions/Xrender.h>
57740 int
57741 main ()
57742 {
57743 XLinearGradient x;
57744   ;
57745   return 0;
57746 }
57747 _ACEOF
57748 if ac_fn_c_try_compile "$LINENO"; then :
57749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57750 $as_echo "yes" >&6; }
57751 else
57752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57753 $as_echo "no" >&6; }
57754          X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57755 fi
57756 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57757 
57758     CFLAGS="$OLD_CFLAGS"
57759     ac_ext=cpp
57760 ac_cpp='$CXXCPP $CPPFLAGS'
57761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57764 
57765   fi # NEEDS_LIB_X11
57766 
57767 
57768 
57769 
57770 
57771 
57772 # Check whether --with-cups was given.
57773 if test "${with_cups+set}" = set; then :
57774   withval=$with_cups;
57775 fi
57776 
57777 
57778 # Check whether --with-cups-include was given.
57779 if test "${with_cups_include+set}" = set; then :
57780   withval=$with_cups_include;
57781 fi
57782 
57783 
57784   if test "x$NEEDS_LIB_CUPS" = xfalse; then
57785     if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57786         (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57787       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57788 $as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57789     fi
57790     CUPS_CFLAGS=
57791   else
57792     CUPS_FOUND=no
57793 
57794     if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57795       as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57796     fi
57797 
57798     if test "x${with_cups}" != x; then
57799       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57800 $as_echo_n "checking for cups headers... " >&6; }
57801       if test -s "${with_cups}/include/cups/cups.h"; then
57802         CUPS_CFLAGS="-I${with_cups}/include"
57803         CUPS_FOUND=yes
57804         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57805 $as_echo "$CUPS_FOUND" >&6; }
57806       else
57807         as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57808       fi
57809     fi
57810     if test "x${with_cups_include}" != x; then
57811       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57812 $as_echo_n "checking for cups headers... " >&6; }
57813       if test -s "${with_cups_include}/cups/cups.h"; then
57814         CUPS_CFLAGS="-I${with_cups_include}"
57815         CUPS_FOUND=yes
57816         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57817 $as_echo "$CUPS_FOUND" >&6; }
57818       else
57819         as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57820       fi
57821     fi
57822     if test "x$CUPS_FOUND" = xno; then
57823       # Are the cups headers installed in the default /usr/include location?
57824       for ac_header in cups/cups.h cups/ppd.h
57825 do :
57826   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57827 ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57828 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57829   cat >>confdefs.h <<_ACEOF
57830 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57831 _ACEOF
57832 
57833           CUPS_FOUND=yes
57834           CUPS_CFLAGS=
57835           DEFAULT_CUPS=yes
57836 
57837 fi
57838 
57839 done
57840 
57841     fi
57842     if test "x$CUPS_FOUND" = xno; then
57843 
57844   # Print a helpful message on how to acquire the necessary build dependency.
57845   # cups is the help tag: freetype, cups, alsa etc
57846   MISSING_DEPENDENCY=cups
57847 
57848   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57849     cygwin_help $MISSING_DEPENDENCY
57850   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57851     msys_help $MISSING_DEPENDENCY
57852   else
57853     PKGHANDLER_COMMAND=
57854 
57855     case $PKGHANDLER in
57856       apt-get)
57857         apt_help     $MISSING_DEPENDENCY ;;
57858       yum)
57859         yum_help     $MISSING_DEPENDENCY ;;
57860       brew)
57861         brew_help    $MISSING_DEPENDENCY ;;
57862       port)
57863         port_help    $MISSING_DEPENDENCY ;;
57864       pkgutil)
57865         pkgutil_help $MISSING_DEPENDENCY ;;
57866       pkgadd)
57867         pkgadd_help  $MISSING_DEPENDENCY ;;
57868     esac
57869 
57870     if test "x$PKGHANDLER_COMMAND" != x; then
57871       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57872     fi
57873   fi
57874 
57875       as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57876     fi
57877   fi
57878 
57879 
57880 
57881 
57882 
57883 # Check whether --with-freetype was given.
57884 if test "${with_freetype+set}" = set; then :
57885   withval=$with_freetype;
57886 fi
57887 
57888 
57889 # Check whether --with-freetype-include was given.
57890 if test "${with_freetype_include+set}" = set; then :
57891   withval=$with_freetype_include;
57892 fi
57893 
57894 
57895 # Check whether --with-freetype-lib was given.
57896 if test "${with_freetype_lib+set}" = set; then :
57897   withval=$with_freetype_lib;
57898 fi
57899 
57900 
57901 # Check whether --with-freetype-src was given.
57902 if test "${with_freetype_src+set}" = set; then :
57903   withval=$with_freetype_src;
57904 fi
57905 
57906   # Check whether --enable-freetype-bundling was given.
57907 if test "${enable_freetype_bundling+set}" = set; then :
57908   enableval=$enable_freetype_bundling;
57909 fi
57910 
57911 
57912 # Check whether --with-freetype-license was given.
57913 if test "${with_freetype_license+set}" = set; then :
57914   withval=$with_freetype_license;
57915 fi
57916 
57917 
57918   # Need to specify explicitly since it needs to be overridden on some versions of macosx
57919   FREETYPE_BASE_NAME=freetype
57920   FREETYPE_CFLAGS=
57921   FREETYPE_LIBS=
57922   FREETYPE_BUNDLE_LIB_PATH=
57923 
57924   if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57925     if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57926         (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57927         (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57928         (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57929       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57930 $as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57931     fi
57932     if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57933       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57934 $as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57935     fi
57936   else
57937     # freetype is needed to build; go get it!
57938 
57939     BUNDLE_FREETYPE="$enable_freetype_bundling"
57940 
57941     if  test "x$with_freetype_src" != x; then
57942       if test "x$OPENJDK_TARGET_OS" = xwindows; then
57943         # Try to build freetype if --with-freetype-src was given on Windows
57944 
57945   FREETYPE_SRC_PATH="$with_freetype_src"
57946   BUILD_FREETYPE=yes
57947 
57948   # Check if the freetype sources are acessible..
57949   if ! test -d $FREETYPE_SRC_PATH; then
57950     { $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
57951 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57952     BUILD_FREETYPE=no
57953   fi
57954   # ..and contain a vc2010 project file
57955   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57956   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57957     { $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
57958 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57959     BUILD_FREETYPE=no
57960   fi
57961   # Now check if configure found a version of 'msbuild.exe'
57962   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57963     { $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
57964 $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;}
57965     BUILD_FREETYPE=no
57966   fi
57967 
57968   # Ready to go..
57969   if test "x$BUILD_FREETYPE" = xyes; then
57970     # msbuild requires trailing slashes for output directories
57971     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57972     freetype_lib_path_unix="$freetype_lib_path"
57973     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57974 
57975   unix_path="$vcxproj_path"
57976   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57977     windows_path=`$CYGPATH -m "$unix_path"`
57978     vcxproj_path="$windows_path"
57979   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57980     windows_path=`cmd //c echo $unix_path`
57981     vcxproj_path="$windows_path"
57982   fi
57983 
57984 
57985   unix_path="$freetype_lib_path"
57986   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57987     windows_path=`$CYGPATH -m "$unix_path"`
57988     freetype_lib_path="$windows_path"
57989   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57990     windows_path=`cmd //c echo $unix_path`
57991     freetype_lib_path="$windows_path"
57992   fi
57993 
57994 
57995   unix_path="$freetype_obj_path"
57996   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57997     windows_path=`$CYGPATH -m "$unix_path"`
57998     freetype_obj_path="$windows_path"
57999   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58000     windows_path=`cmd //c echo $unix_path`
58001     freetype_obj_path="$windows_path"
58002   fi
58003 
58004     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58005       freetype_platform=x64
58006     else
58007       freetype_platform=win32
58008     fi
58009 
58010     # The original freetype project file is for VS 2010 (i.e. 'v100'),
58011     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
58012     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
58013     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
58014     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
58015 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
58016 
58017     # First we try to build the freetype.dll
58018     $ECHO -e "@echo off\n"\
58019         "$MSBUILD $vcxproj_path "\
58020         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58021         "/p:Configuration=\"Release Multithreaded\" "\
58022         "/p:Platform=$freetype_platform "\
58023         "/p:ConfigurationType=DynamicLibrary "\
58024         "/p:TargetName=freetype "\
58025         "/p:OutDir=\"$freetype_lib_path\" "\
58026         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
58027     cmd /c freetype.bat
58028 
58029     if test -s "$freetype_lib_path_unix/freetype.dll"; then
58030       # If that succeeds we also build freetype.lib
58031       $ECHO -e "@echo off\n"\
58032           "$MSBUILD $vcxproj_path "\
58033           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
58034           "/p:Configuration=\"Release Multithreaded\" "\
58035           "/p:Platform=$freetype_platform "\
58036           "/p:ConfigurationType=StaticLibrary "\
58037           "/p:TargetName=freetype "\
58038           "/p:OutDir=\"$freetype_lib_path\" "\
58039           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
58040       cmd /c freetype.bat
58041 
58042       if test -s "$freetype_lib_path_unix/freetype.lib"; then
58043         # Once we build both, lib and dll, set freetype lib and include path appropriately
58044         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
58045         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
58046         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
58047 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
58048       else
58049         BUILD_FREETYPE=no
58050       fi
58051     else
58052       BUILD_FREETYPE=no
58053     fi
58054   fi
58055 
58056         if test "x$BUILD_FREETYPE" = xyes; then
58057           # Okay, we built it. Check that it works.
58058 
58059   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58060   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58061   METHOD="--with-freetype-src"
58062 
58063   # Let's start with an optimistic view of the world :-)
58064   FOUND_FREETYPE=yes
58065 
58066   # First look for the canonical freetype main include file ft2build.h.
58067   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58068     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58069     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58070     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58071       # Fail.
58072       FOUND_FREETYPE=no
58073     fi
58074   fi
58075 
58076   if test "x$FOUND_FREETYPE" = xyes; then
58077     # Include file found, let's continue the sanity check.
58078     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58079 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58080 
58081     # Reset to default value
58082     FREETYPE_BASE_NAME=freetype
58083     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58084     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58085       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58086           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58087         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58088         # for the .6 version explicitly.
58089         FREETYPE_BASE_NAME=freetype.6
58090         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58091         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58092 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58093       else
58094         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58095 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58096         FOUND_FREETYPE=no
58097       fi
58098     else
58099       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58100         # On Windows, we will need both .lib and .dll file.
58101         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58102           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58103 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58104           FOUND_FREETYPE=no
58105         fi
58106       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58107           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58108         # Found lib in isa dir, use that instead.
58109         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58110         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58111 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58112       fi
58113     fi
58114   fi
58115 
58116   if test "x$FOUND_FREETYPE" = xyes; then
58117 
58118   # Only process if variable expands to non-empty
58119 
58120   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58121     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58122 
58123   # Input might be given as Windows format, start by converting to
58124   # unix format.
58125   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58126   new_path=`$CYGPATH -u "$path"`
58127 
58128   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58129   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58130   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58131   # "foo.exe" is OK but "foo" is an error.
58132   #
58133   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58134   # It is also a way to make sure we got the proper file name for the real test later on.
58135   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58136   if test "x$test_shortpath" = x; then
58137     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58138 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58139     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58140   fi
58141 
58142   # Call helper function which possibly converts this using DOS-style short mode.
58143   # If so, the updated path is stored in $new_path.
58144 
58145   input_path="$new_path"
58146   # Check if we need to convert this using DOS-style short mode. If the path
58147   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58148   # take no chances and rewrite it.
58149   # Note: m4 eats our [], so we need to use [ and ] instead.
58150   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58151   if test "x$has_forbidden_chars" != x; then
58152     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58153     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58154     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58155     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58156       # Going to short mode and back again did indeed matter. Since short mode is
58157       # case insensitive, let's make it lowercase to improve readability.
58158       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58159       # Now convert it back to Unix-style (cygpath)
58160       input_path=`$CYGPATH -u "$shortmode_path"`
58161       new_path="$input_path"
58162     fi
58163   fi
58164 
58165   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58166   if test "x$test_cygdrive_prefix" = x; then
58167     # As a simple fix, exclude /usr/bin since it's not a real path.
58168     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58169       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58170       # a path prefixed by /cygdrive for fixpath to work.
58171       new_path="$CYGWIN_ROOT_PATH$input_path"
58172     fi
58173   fi
58174 
58175 
58176   if test "x$path" != "x$new_path"; then
58177     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58178     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58179 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58180   fi
58181 
58182     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58183 
58184   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58185   has_colon=`$ECHO $path | $GREP ^.:`
58186   new_path="$path"
58187   if test "x$has_colon" = x; then
58188     # Not in mixed or Windows style, start by that.
58189     new_path=`cmd //c echo $path`
58190   fi
58191 
58192 
58193   input_path="$new_path"
58194   # Check if we need to convert this using DOS-style short mode. If the path
58195   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58196   # take no chances and rewrite it.
58197   # Note: m4 eats our [], so we need to use [ and ] instead.
58198   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58199   if test "x$has_forbidden_chars" != x; then
58200     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58201     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58202   fi
58203 
58204 
58205   windows_path="$new_path"
58206   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58207     unix_path=`$CYGPATH -u "$windows_path"`
58208     new_path="$unix_path"
58209   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58210     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58211     new_path="$unix_path"
58212   fi
58213 
58214   if test "x$path" != "x$new_path"; then
58215     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58216     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58217 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58218   fi
58219 
58220   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58221   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58222 
58223     else
58224       # We're on a unix platform. Hooray! :)
58225       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58226       has_space=`$ECHO "$path" | $GREP " "`
58227       if test "x$has_space" != x; then
58228         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58229 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58230         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58231       fi
58232 
58233       # Use eval to expand a potential ~
58234       eval path="$path"
58235       if test ! -f "$path" && test ! -d "$path"; then
58236         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58237       fi
58238 
58239       if test -d "$path"; then
58240         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58241       else
58242         dir="`$DIRNAME "$path"`"
58243         base="`$BASENAME "$path"`"
58244         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58245       fi
58246     fi
58247   fi
58248 
58249 
58250   # Only process if variable expands to non-empty
58251 
58252   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58253     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58254 
58255   # Input might be given as Windows format, start by converting to
58256   # unix format.
58257   path="$POTENTIAL_FREETYPE_LIB_PATH"
58258   new_path=`$CYGPATH -u "$path"`
58259 
58260   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58261   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58262   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58263   # "foo.exe" is OK but "foo" is an error.
58264   #
58265   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58266   # It is also a way to make sure we got the proper file name for the real test later on.
58267   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58268   if test "x$test_shortpath" = x; then
58269     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58270 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58271     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58272   fi
58273 
58274   # Call helper function which possibly converts this using DOS-style short mode.
58275   # If so, the updated path is stored in $new_path.
58276 
58277   input_path="$new_path"
58278   # Check if we need to convert this using DOS-style short mode. If the path
58279   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58280   # take no chances and rewrite it.
58281   # Note: m4 eats our [], so we need to use [ and ] instead.
58282   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58283   if test "x$has_forbidden_chars" != x; then
58284     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58285     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58286     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58287     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58288       # Going to short mode and back again did indeed matter. Since short mode is
58289       # case insensitive, let's make it lowercase to improve readability.
58290       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58291       # Now convert it back to Unix-style (cygpath)
58292       input_path=`$CYGPATH -u "$shortmode_path"`
58293       new_path="$input_path"
58294     fi
58295   fi
58296 
58297   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58298   if test "x$test_cygdrive_prefix" = x; then
58299     # As a simple fix, exclude /usr/bin since it's not a real path.
58300     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58301       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58302       # a path prefixed by /cygdrive for fixpath to work.
58303       new_path="$CYGWIN_ROOT_PATH$input_path"
58304     fi
58305   fi
58306 
58307 
58308   if test "x$path" != "x$new_path"; then
58309     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58310     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58311 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58312   fi
58313 
58314     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58315 
58316   path="$POTENTIAL_FREETYPE_LIB_PATH"
58317   has_colon=`$ECHO $path | $GREP ^.:`
58318   new_path="$path"
58319   if test "x$has_colon" = x; then
58320     # Not in mixed or Windows style, start by that.
58321     new_path=`cmd //c echo $path`
58322   fi
58323 
58324 
58325   input_path="$new_path"
58326   # Check if we need to convert this using DOS-style short mode. If the path
58327   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58328   # take no chances and rewrite it.
58329   # Note: m4 eats our [], so we need to use [ and ] instead.
58330   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58331   if test "x$has_forbidden_chars" != x; then
58332     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58333     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58334   fi
58335 
58336 
58337   windows_path="$new_path"
58338   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58339     unix_path=`$CYGPATH -u "$windows_path"`
58340     new_path="$unix_path"
58341   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58342     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58343     new_path="$unix_path"
58344   fi
58345 
58346   if test "x$path" != "x$new_path"; then
58347     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58348     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58349 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58350   fi
58351 
58352   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58353   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58354 
58355     else
58356       # We're on a unix platform. Hooray! :)
58357       path="$POTENTIAL_FREETYPE_LIB_PATH"
58358       has_space=`$ECHO "$path" | $GREP " "`
58359       if test "x$has_space" != x; then
58360         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58361 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58362         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58363       fi
58364 
58365       # Use eval to expand a potential ~
58366       eval path="$path"
58367       if test ! -f "$path" && test ! -d "$path"; then
58368         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58369       fi
58370 
58371       if test -d "$path"; then
58372         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58373       else
58374         dir="`$DIRNAME "$path"`"
58375         base="`$BASENAME "$path"`"
58376         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58377       fi
58378     fi
58379   fi
58380 
58381 
58382     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58383     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58384 $as_echo_n "checking for freetype includes... " >&6; }
58385     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58386 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58387     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58388     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58389 $as_echo_n "checking for freetype libraries... " >&6; }
58390     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58391 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58392   fi
58393 
58394           if test "x$FOUND_FREETYPE" != xyes; then
58395             as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
58396           fi
58397         else
58398           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
58399 $as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
58400           as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
58401         fi
58402       else
58403         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58404 $as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58405       fi
58406     fi
58407 
58408     if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58409       # User has specified settings
58410 
58411       if test "x$BUNDLE_FREETYPE" = x; then
58412         # If not specified, default is to bundle freetype
58413         BUNDLE_FREETYPE=yes
58414       fi
58415 
58416       if test "x$with_freetype" != x; then
58417         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58418         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58419       fi
58420 
58421       # Allow --with-freetype-lib and --with-freetype-include to override
58422       if test "x$with_freetype_include" != x; then
58423         POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58424       fi
58425       if test "x$with_freetype_lib" != x; then
58426         POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58427       fi
58428 
58429       if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58430         # Okay, we got it. Check that it works.
58431 
58432   POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58433   POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58434   METHOD="--with-freetype"
58435 
58436   # Let's start with an optimistic view of the world :-)
58437   FOUND_FREETYPE=yes
58438 
58439   # First look for the canonical freetype main include file ft2build.h.
58440   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58441     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58442     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58443     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58444       # Fail.
58445       FOUND_FREETYPE=no
58446     fi
58447   fi
58448 
58449   if test "x$FOUND_FREETYPE" = xyes; then
58450     # Include file found, let's continue the sanity check.
58451     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58452 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58453 
58454     # Reset to default value
58455     FREETYPE_BASE_NAME=freetype
58456     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58457     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58458       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58459           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58460         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58461         # for the .6 version explicitly.
58462         FREETYPE_BASE_NAME=freetype.6
58463         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58464         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58465 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58466       else
58467         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58468 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58469         FOUND_FREETYPE=no
58470       fi
58471     else
58472       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58473         # On Windows, we will need both .lib and .dll file.
58474         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58475           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58476 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58477           FOUND_FREETYPE=no
58478         fi
58479       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58480           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58481         # Found lib in isa dir, use that instead.
58482         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58483         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58484 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58485       fi
58486     fi
58487   fi
58488 
58489   if test "x$FOUND_FREETYPE" = xyes; then
58490 
58491   # Only process if variable expands to non-empty
58492 
58493   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58494     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58495 
58496   # Input might be given as Windows format, start by converting to
58497   # unix format.
58498   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58499   new_path=`$CYGPATH -u "$path"`
58500 
58501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58504   # "foo.exe" is OK but "foo" is an error.
58505   #
58506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58507   # It is also a way to make sure we got the proper file name for the real test later on.
58508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58509   if test "x$test_shortpath" = x; then
58510     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58511 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58512     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58513   fi
58514 
58515   # Call helper function which possibly converts this using DOS-style short mode.
58516   # If so, the updated path is stored in $new_path.
58517 
58518   input_path="$new_path"
58519   # Check if we need to convert this using DOS-style short mode. If the path
58520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58521   # take no chances and rewrite it.
58522   # Note: m4 eats our [], so we need to use [ and ] instead.
58523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58524   if test "x$has_forbidden_chars" != x; then
58525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58529       # Going to short mode and back again did indeed matter. Since short mode is
58530       # case insensitive, let's make it lowercase to improve readability.
58531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58532       # Now convert it back to Unix-style (cygpath)
58533       input_path=`$CYGPATH -u "$shortmode_path"`
58534       new_path="$input_path"
58535     fi
58536   fi
58537 
58538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58539   if test "x$test_cygdrive_prefix" = x; then
58540     # As a simple fix, exclude /usr/bin since it's not a real path.
58541     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58543       # a path prefixed by /cygdrive for fixpath to work.
58544       new_path="$CYGWIN_ROOT_PATH$input_path"
58545     fi
58546   fi
58547 
58548 
58549   if test "x$path" != "x$new_path"; then
58550     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58552 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58553   fi
58554 
58555     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58556 
58557   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58558   has_colon=`$ECHO $path | $GREP ^.:`
58559   new_path="$path"
58560   if test "x$has_colon" = x; then
58561     # Not in mixed or Windows style, start by that.
58562     new_path=`cmd //c echo $path`
58563   fi
58564 
58565 
58566   input_path="$new_path"
58567   # Check if we need to convert this using DOS-style short mode. If the path
58568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58569   # take no chances and rewrite it.
58570   # Note: m4 eats our [], so we need to use [ and ] instead.
58571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58572   if test "x$has_forbidden_chars" != x; then
58573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58575   fi
58576 
58577 
58578   windows_path="$new_path"
58579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58580     unix_path=`$CYGPATH -u "$windows_path"`
58581     new_path="$unix_path"
58582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58584     new_path="$unix_path"
58585   fi
58586 
58587   if test "x$path" != "x$new_path"; then
58588     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58590 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58591   fi
58592 
58593   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58594   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58595 
58596     else
58597       # We're on a unix platform. Hooray! :)
58598       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58599       has_space=`$ECHO "$path" | $GREP " "`
58600       if test "x$has_space" != x; then
58601         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58602 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58603         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58604       fi
58605 
58606       # Use eval to expand a potential ~
58607       eval path="$path"
58608       if test ! -f "$path" && test ! -d "$path"; then
58609         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58610       fi
58611 
58612       if test -d "$path"; then
58613         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58614       else
58615         dir="`$DIRNAME "$path"`"
58616         base="`$BASENAME "$path"`"
58617         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58618       fi
58619     fi
58620   fi
58621 
58622 
58623   # Only process if variable expands to non-empty
58624 
58625   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58626     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58627 
58628   # Input might be given as Windows format, start by converting to
58629   # unix format.
58630   path="$POTENTIAL_FREETYPE_LIB_PATH"
58631   new_path=`$CYGPATH -u "$path"`
58632 
58633   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58634   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58635   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58636   # "foo.exe" is OK but "foo" is an error.
58637   #
58638   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58639   # It is also a way to make sure we got the proper file name for the real test later on.
58640   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58641   if test "x$test_shortpath" = x; then
58642     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58643 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58644     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58645   fi
58646 
58647   # Call helper function which possibly converts this using DOS-style short mode.
58648   # If so, the updated path is stored in $new_path.
58649 
58650   input_path="$new_path"
58651   # Check if we need to convert this using DOS-style short mode. If the path
58652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58653   # take no chances and rewrite it.
58654   # Note: m4 eats our [], so we need to use [ and ] instead.
58655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58656   if test "x$has_forbidden_chars" != x; then
58657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58658     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58659     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58660     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58661       # Going to short mode and back again did indeed matter. Since short mode is
58662       # case insensitive, let's make it lowercase to improve readability.
58663       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58664       # Now convert it back to Unix-style (cygpath)
58665       input_path=`$CYGPATH -u "$shortmode_path"`
58666       new_path="$input_path"
58667     fi
58668   fi
58669 
58670   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58671   if test "x$test_cygdrive_prefix" = x; then
58672     # As a simple fix, exclude /usr/bin since it's not a real path.
58673     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58674       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58675       # a path prefixed by /cygdrive for fixpath to work.
58676       new_path="$CYGWIN_ROOT_PATH$input_path"
58677     fi
58678   fi
58679 
58680 
58681   if test "x$path" != "x$new_path"; then
58682     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58684 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58685   fi
58686 
58687     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58688 
58689   path="$POTENTIAL_FREETYPE_LIB_PATH"
58690   has_colon=`$ECHO $path | $GREP ^.:`
58691   new_path="$path"
58692   if test "x$has_colon" = x; then
58693     # Not in mixed or Windows style, start by that.
58694     new_path=`cmd //c echo $path`
58695   fi
58696 
58697 
58698   input_path="$new_path"
58699   # Check if we need to convert this using DOS-style short mode. If the path
58700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58701   # take no chances and rewrite it.
58702   # Note: m4 eats our [], so we need to use [ and ] instead.
58703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58704   if test "x$has_forbidden_chars" != x; then
58705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58706     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58707   fi
58708 
58709 
58710   windows_path="$new_path"
58711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58712     unix_path=`$CYGPATH -u "$windows_path"`
58713     new_path="$unix_path"
58714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58716     new_path="$unix_path"
58717   fi
58718 
58719   if test "x$path" != "x$new_path"; then
58720     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58721     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58722 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58723   fi
58724 
58725   # Save the first 10 bytes of this path to the storage, so fixpath can work.
58726   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58727 
58728     else
58729       # We're on a unix platform. Hooray! :)
58730       path="$POTENTIAL_FREETYPE_LIB_PATH"
58731       has_space=`$ECHO "$path" | $GREP " "`
58732       if test "x$has_space" != x; then
58733         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58734 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58735         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58736       fi
58737 
58738       # Use eval to expand a potential ~
58739       eval path="$path"
58740       if test ! -f "$path" && test ! -d "$path"; then
58741         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58742       fi
58743 
58744       if test -d "$path"; then
58745         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58746       else
58747         dir="`$DIRNAME "$path"`"
58748         base="`$BASENAME "$path"`"
58749         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58750       fi
58751     fi
58752   fi
58753 
58754 
58755     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58756     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58757 $as_echo_n "checking for freetype includes... " >&6; }
58758     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58759 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58760     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58762 $as_echo_n "checking for freetype libraries... " >&6; }
58763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58764 $as_echo "$FREETYPE_LIB_PATH" >&6; }
58765   fi
58766 
58767         if test "x$FOUND_FREETYPE" != xyes; then
58768           as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58769         fi
58770       else
58771         # User specified only one of lib or include. This is an error.
58772         if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58773           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58774 $as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58775           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58776         else
58777           { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58778 $as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58779           as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58780         fi
58781       fi
58782     else
58783       # User did not specify settings, but we need freetype. Try to locate it.
58784 
58785       if test "x$BUNDLE_FREETYPE" = x; then
58786         # If not specified, default is to bundle freetype only on windows
58787         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58788           BUNDLE_FREETYPE=yes
58789         else
58790           BUNDLE_FREETYPE=no
58791         fi
58792       fi
58793 
58794       # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58795       if test "x$SYSROOT" = x; then
58796         if test "x$FOUND_FREETYPE" != xyes; then
58797           # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58798           if test "x$PKG_CONFIG" != x; then
58799 
58800 pkg_failed=no
58801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58802 $as_echo_n "checking for FREETYPE... " >&6; }
58803 
58804 if test -n "$FREETYPE_CFLAGS"; then
58805     pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58806  elif test -n "$PKG_CONFIG"; then
58807     if test -n "$PKG_CONFIG" && \
58808     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58809   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58810   ac_status=$?
58811   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58812   test $ac_status = 0; }; then
58813   pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58814 else
58815   pkg_failed=yes
58816 fi
58817  else
58818     pkg_failed=untried
58819 fi
58820 if test -n "$FREETYPE_LIBS"; then
58821     pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58822  elif test -n "$PKG_CONFIG"; then
58823     if test -n "$PKG_CONFIG" && \
58824     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58825   ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58826   ac_status=$?
58827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58828   test $ac_status = 0; }; then
58829   pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58830 else
58831   pkg_failed=yes
58832 fi
58833  else
58834     pkg_failed=untried
58835 fi
58836 
58837 
58838 
58839 if test $pkg_failed = yes; then
58840 
58841 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58842         _pkg_short_errors_supported=yes
58843 else
58844         _pkg_short_errors_supported=no
58845 fi
58846         if test $_pkg_short_errors_supported = yes; then
58847                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58848         else
58849                 FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58850         fi
58851         # Put the nasty error message in config.log where it belongs
58852         echo "$FREETYPE_PKG_ERRORS" >&5
58853 
58854         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58855 $as_echo "no" >&6; }
58856                 FOUND_FREETYPE=no
58857 elif test $pkg_failed = untried; then
58858         FOUND_FREETYPE=no
58859 else
58860         FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58861         FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58862         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58863 $as_echo "yes" >&6; }
58864         FOUND_FREETYPE=yes
58865 fi
58866             if test "x$FOUND_FREETYPE" = xyes; then
58867               # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58868               FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58869               # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58870               if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58871                 FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58872               fi
58873               # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58874               if test "x$BUNDLE_FREETYPE" = xyes; then
58875                 { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58876 $as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58877                 FOUND_FREETYPE=no
58878               else
58879                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58880 $as_echo_n "checking for freetype... " >&6; }
58881                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58882 $as_echo "yes (using pkg-config)" >&6; }
58883               fi
58884             fi
58885           fi
58886         fi
58887       fi
58888 
58889       if test "x$FOUND_FREETYPE" != xyes; then
58890         # Check in well-known locations
58891         if test "x$OPENJDK_TARGET_OS" = xwindows; then
58892           FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58893 
58894   windows_path="$FREETYPE_BASE_DIR"
58895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58896     unix_path=`$CYGPATH -u "$windows_path"`
58897     FREETYPE_BASE_DIR="$unix_path"
58898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58900     FREETYPE_BASE_DIR="$unix_path"
58901   fi
58902 
58903 
58904   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58905   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58906   METHOD="well-known location"
58907 
58908   # Let's start with an optimistic view of the world :-)
58909   FOUND_FREETYPE=yes
58910 
58911   # First look for the canonical freetype main include file ft2build.h.
58912   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58913     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58914     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58915     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58916       # Fail.
58917       FOUND_FREETYPE=no
58918     fi
58919   fi
58920 
58921   if test "x$FOUND_FREETYPE" = xyes; then
58922     # Include file found, let's continue the sanity check.
58923     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58924 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58925 
58926     # Reset to default value
58927     FREETYPE_BASE_NAME=freetype
58928     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58929     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58930       if test "x$OPENJDK_TARGET_OS" = xmacosx \
58931           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58932         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58933         # for the .6 version explicitly.
58934         FREETYPE_BASE_NAME=freetype.6
58935         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58936         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58937 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58938       else
58939         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58940 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58941         FOUND_FREETYPE=no
58942       fi
58943     else
58944       if test "x$OPENJDK_TARGET_OS" = xwindows; then
58945         # On Windows, we will need both .lib and .dll file.
58946         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58947           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58948 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58949           FOUND_FREETYPE=no
58950         fi
58951       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58952           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58953         # Found lib in isa dir, use that instead.
58954         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58955         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58956 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58957       fi
58958     fi
58959   fi
58960 
58961   if test "x$FOUND_FREETYPE" = xyes; then
58962 
58963   # Only process if variable expands to non-empty
58964 
58965   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58966     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58967 
58968   # Input might be given as Windows format, start by converting to
58969   # unix format.
58970   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58971   new_path=`$CYGPATH -u "$path"`
58972 
58973   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58974   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58975   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58976   # "foo.exe" is OK but "foo" is an error.
58977   #
58978   # This test is therefore slightly more accurate than "test -f" to check for file precense.
58979   # It is also a way to make sure we got the proper file name for the real test later on.
58980   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58981   if test "x$test_shortpath" = x; then
58982     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58983 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58984     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58985   fi
58986 
58987   # Call helper function which possibly converts this using DOS-style short mode.
58988   # If so, the updated path is stored in $new_path.
58989 
58990   input_path="$new_path"
58991   # Check if we need to convert this using DOS-style short mode. If the path
58992   # contains just simple characters, use it. Otherwise (spaces, weird characters),
58993   # take no chances and rewrite it.
58994   # Note: m4 eats our [], so we need to use [ and ] instead.
58995   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58996   if test "x$has_forbidden_chars" != x; then
58997     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58998     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58999     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59000     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59001       # Going to short mode and back again did indeed matter. Since short mode is
59002       # case insensitive, let's make it lowercase to improve readability.
59003       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59004       # Now convert it back to Unix-style (cygpath)
59005       input_path=`$CYGPATH -u "$shortmode_path"`
59006       new_path="$input_path"
59007     fi
59008   fi
59009 
59010   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59011   if test "x$test_cygdrive_prefix" = x; then
59012     # As a simple fix, exclude /usr/bin since it's not a real path.
59013     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59014       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59015       # a path prefixed by /cygdrive for fixpath to work.
59016       new_path="$CYGWIN_ROOT_PATH$input_path"
59017     fi
59018   fi
59019 
59020 
59021   if test "x$path" != "x$new_path"; then
59022     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59023     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59024 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59025   fi
59026 
59027     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59028 
59029   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59030   has_colon=`$ECHO $path | $GREP ^.:`
59031   new_path="$path"
59032   if test "x$has_colon" = x; then
59033     # Not in mixed or Windows style, start by that.
59034     new_path=`cmd //c echo $path`
59035   fi
59036 
59037 
59038   input_path="$new_path"
59039   # Check if we need to convert this using DOS-style short mode. If the path
59040   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59041   # take no chances and rewrite it.
59042   # Note: m4 eats our [], so we need to use [ and ] instead.
59043   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59044   if test "x$has_forbidden_chars" != x; then
59045     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59046     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59047   fi
59048 
59049 
59050   windows_path="$new_path"
59051   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59052     unix_path=`$CYGPATH -u "$windows_path"`
59053     new_path="$unix_path"
59054   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59055     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59056     new_path="$unix_path"
59057   fi
59058 
59059   if test "x$path" != "x$new_path"; then
59060     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59061     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59062 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59063   fi
59064 
59065   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59066   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59067 
59068     else
59069       # We're on a unix platform. Hooray! :)
59070       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59071       has_space=`$ECHO "$path" | $GREP " "`
59072       if test "x$has_space" != x; then
59073         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59074 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59075         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59076       fi
59077 
59078       # Use eval to expand a potential ~
59079       eval path="$path"
59080       if test ! -f "$path" && test ! -d "$path"; then
59081         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59082       fi
59083 
59084       if test -d "$path"; then
59085         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59086       else
59087         dir="`$DIRNAME "$path"`"
59088         base="`$BASENAME "$path"`"
59089         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59090       fi
59091     fi
59092   fi
59093 
59094 
59095   # Only process if variable expands to non-empty
59096 
59097   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59098     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59099 
59100   # Input might be given as Windows format, start by converting to
59101   # unix format.
59102   path="$POTENTIAL_FREETYPE_LIB_PATH"
59103   new_path=`$CYGPATH -u "$path"`
59104 
59105   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59106   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59107   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59108   # "foo.exe" is OK but "foo" is an error.
59109   #
59110   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59111   # It is also a way to make sure we got the proper file name for the real test later on.
59112   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59113   if test "x$test_shortpath" = x; then
59114     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59115 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59116     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59117   fi
59118 
59119   # Call helper function which possibly converts this using DOS-style short mode.
59120   # If so, the updated path is stored in $new_path.
59121 
59122   input_path="$new_path"
59123   # Check if we need to convert this using DOS-style short mode. If the path
59124   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59125   # take no chances and rewrite it.
59126   # Note: m4 eats our [], so we need to use [ and ] instead.
59127   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59128   if test "x$has_forbidden_chars" != x; then
59129     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59130     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59131     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59132     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59133       # Going to short mode and back again did indeed matter. Since short mode is
59134       # case insensitive, let's make it lowercase to improve readability.
59135       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59136       # Now convert it back to Unix-style (cygpath)
59137       input_path=`$CYGPATH -u "$shortmode_path"`
59138       new_path="$input_path"
59139     fi
59140   fi
59141 
59142   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59143   if test "x$test_cygdrive_prefix" = x; then
59144     # As a simple fix, exclude /usr/bin since it's not a real path.
59145     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59146       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59147       # a path prefixed by /cygdrive for fixpath to work.
59148       new_path="$CYGWIN_ROOT_PATH$input_path"
59149     fi
59150   fi
59151 
59152 
59153   if test "x$path" != "x$new_path"; then
59154     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59155     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59156 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59157   fi
59158 
59159     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59160 
59161   path="$POTENTIAL_FREETYPE_LIB_PATH"
59162   has_colon=`$ECHO $path | $GREP ^.:`
59163   new_path="$path"
59164   if test "x$has_colon" = x; then
59165     # Not in mixed or Windows style, start by that.
59166     new_path=`cmd //c echo $path`
59167   fi
59168 
59169 
59170   input_path="$new_path"
59171   # Check if we need to convert this using DOS-style short mode. If the path
59172   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59173   # take no chances and rewrite it.
59174   # Note: m4 eats our [], so we need to use [ and ] instead.
59175   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59176   if test "x$has_forbidden_chars" != x; then
59177     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59178     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59179   fi
59180 
59181 
59182   windows_path="$new_path"
59183   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59184     unix_path=`$CYGPATH -u "$windows_path"`
59185     new_path="$unix_path"
59186   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59187     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59188     new_path="$unix_path"
59189   fi
59190 
59191   if test "x$path" != "x$new_path"; then
59192     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59193     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59194 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59195   fi
59196 
59197   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59198   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59199 
59200     else
59201       # We're on a unix platform. Hooray! :)
59202       path="$POTENTIAL_FREETYPE_LIB_PATH"
59203       has_space=`$ECHO "$path" | $GREP " "`
59204       if test "x$has_space" != x; then
59205         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59206 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59207         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59208       fi
59209 
59210       # Use eval to expand a potential ~
59211       eval path="$path"
59212       if test ! -f "$path" && test ! -d "$path"; then
59213         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59214       fi
59215 
59216       if test -d "$path"; then
59217         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59218       else
59219         dir="`$DIRNAME "$path"`"
59220         base="`$BASENAME "$path"`"
59221         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59222       fi
59223     fi
59224   fi
59225 
59226 
59227     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59229 $as_echo_n "checking for freetype includes... " >&6; }
59230     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59231 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59232     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59233     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59234 $as_echo_n "checking for freetype libraries... " >&6; }
59235     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59236 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59237   fi
59238 
59239           if test "x$FOUND_FREETYPE" != xyes; then
59240             FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
59241 
59242   windows_path="$FREETYPE_BASE_DIR"
59243   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59244     unix_path=`$CYGPATH -u "$windows_path"`
59245     FREETYPE_BASE_DIR="$unix_path"
59246   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59247     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59248     FREETYPE_BASE_DIR="$unix_path"
59249   fi
59250 
59251 
59252   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59253   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
59254   METHOD="well-known location"
59255 
59256   # Let's start with an optimistic view of the world :-)
59257   FOUND_FREETYPE=yes
59258 
59259   # First look for the canonical freetype main include file ft2build.h.
59260   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59261     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59262     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59263     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59264       # Fail.
59265       FOUND_FREETYPE=no
59266     fi
59267   fi
59268 
59269   if test "x$FOUND_FREETYPE" = xyes; then
59270     # Include file found, let's continue the sanity check.
59271     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59272 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59273 
59274     # Reset to default value
59275     FREETYPE_BASE_NAME=freetype
59276     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59277     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59278       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59279           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59280         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59281         # for the .6 version explicitly.
59282         FREETYPE_BASE_NAME=freetype.6
59283         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59284         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59285 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59286       else
59287         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59288 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59289         FOUND_FREETYPE=no
59290       fi
59291     else
59292       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59293         # On Windows, we will need both .lib and .dll file.
59294         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59295           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59296 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59297           FOUND_FREETYPE=no
59298         fi
59299       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59300           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59301         # Found lib in isa dir, use that instead.
59302         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59303         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59304 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59305       fi
59306     fi
59307   fi
59308 
59309   if test "x$FOUND_FREETYPE" = xyes; then
59310 
59311   # Only process if variable expands to non-empty
59312 
59313   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59314     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59315 
59316   # Input might be given as Windows format, start by converting to
59317   # unix format.
59318   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59319   new_path=`$CYGPATH -u "$path"`
59320 
59321   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59322   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59323   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59324   # "foo.exe" is OK but "foo" is an error.
59325   #
59326   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59327   # It is also a way to make sure we got the proper file name for the real test later on.
59328   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59329   if test "x$test_shortpath" = x; then
59330     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59331 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59332     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59333   fi
59334 
59335   # Call helper function which possibly converts this using DOS-style short mode.
59336   # If so, the updated path is stored in $new_path.
59337 
59338   input_path="$new_path"
59339   # Check if we need to convert this using DOS-style short mode. If the path
59340   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59341   # take no chances and rewrite it.
59342   # Note: m4 eats our [], so we need to use [ and ] instead.
59343   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59344   if test "x$has_forbidden_chars" != x; then
59345     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59346     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59347     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59348     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59349       # Going to short mode and back again did indeed matter. Since short mode is
59350       # case insensitive, let's make it lowercase to improve readability.
59351       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59352       # Now convert it back to Unix-style (cygpath)
59353       input_path=`$CYGPATH -u "$shortmode_path"`
59354       new_path="$input_path"
59355     fi
59356   fi
59357 
59358   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59359   if test "x$test_cygdrive_prefix" = x; then
59360     # As a simple fix, exclude /usr/bin since it's not a real path.
59361     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59362       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59363       # a path prefixed by /cygdrive for fixpath to work.
59364       new_path="$CYGWIN_ROOT_PATH$input_path"
59365     fi
59366   fi
59367 
59368 
59369   if test "x$path" != "x$new_path"; then
59370     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59371     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59372 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59373   fi
59374 
59375     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59376 
59377   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59378   has_colon=`$ECHO $path | $GREP ^.:`
59379   new_path="$path"
59380   if test "x$has_colon" = x; then
59381     # Not in mixed or Windows style, start by that.
59382     new_path=`cmd //c echo $path`
59383   fi
59384 
59385 
59386   input_path="$new_path"
59387   # Check if we need to convert this using DOS-style short mode. If the path
59388   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59389   # take no chances and rewrite it.
59390   # Note: m4 eats our [], so we need to use [ and ] instead.
59391   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59392   if test "x$has_forbidden_chars" != x; then
59393     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59394     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59395   fi
59396 
59397 
59398   windows_path="$new_path"
59399   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59400     unix_path=`$CYGPATH -u "$windows_path"`
59401     new_path="$unix_path"
59402   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59403     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59404     new_path="$unix_path"
59405   fi
59406 
59407   if test "x$path" != "x$new_path"; then
59408     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59409     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59410 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59411   fi
59412 
59413   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59414   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59415 
59416     else
59417       # We're on a unix platform. Hooray! :)
59418       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59419       has_space=`$ECHO "$path" | $GREP " "`
59420       if test "x$has_space" != x; then
59421         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59422 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59423         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59424       fi
59425 
59426       # Use eval to expand a potential ~
59427       eval path="$path"
59428       if test ! -f "$path" && test ! -d "$path"; then
59429         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59430       fi
59431 
59432       if test -d "$path"; then
59433         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59434       else
59435         dir="`$DIRNAME "$path"`"
59436         base="`$BASENAME "$path"`"
59437         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59438       fi
59439     fi
59440   fi
59441 
59442 
59443   # Only process if variable expands to non-empty
59444 
59445   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59446     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59447 
59448   # Input might be given as Windows format, start by converting to
59449   # unix format.
59450   path="$POTENTIAL_FREETYPE_LIB_PATH"
59451   new_path=`$CYGPATH -u "$path"`
59452 
59453   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59454   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59455   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59456   # "foo.exe" is OK but "foo" is an error.
59457   #
59458   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59459   # It is also a way to make sure we got the proper file name for the real test later on.
59460   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59461   if test "x$test_shortpath" = x; then
59462     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59463 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59464     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59465   fi
59466 
59467   # Call helper function which possibly converts this using DOS-style short mode.
59468   # If so, the updated path is stored in $new_path.
59469 
59470   input_path="$new_path"
59471   # Check if we need to convert this using DOS-style short mode. If the path
59472   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59473   # take no chances and rewrite it.
59474   # Note: m4 eats our [], so we need to use [ and ] instead.
59475   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59476   if test "x$has_forbidden_chars" != x; then
59477     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59478     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59479     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59480     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59481       # Going to short mode and back again did indeed matter. Since short mode is
59482       # case insensitive, let's make it lowercase to improve readability.
59483       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59484       # Now convert it back to Unix-style (cygpath)
59485       input_path=`$CYGPATH -u "$shortmode_path"`
59486       new_path="$input_path"
59487     fi
59488   fi
59489 
59490   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59491   if test "x$test_cygdrive_prefix" = x; then
59492     # As a simple fix, exclude /usr/bin since it's not a real path.
59493     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59494       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59495       # a path prefixed by /cygdrive for fixpath to work.
59496       new_path="$CYGWIN_ROOT_PATH$input_path"
59497     fi
59498   fi
59499 
59500 
59501   if test "x$path" != "x$new_path"; then
59502     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59503     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59504 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59505   fi
59506 
59507     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59508 
59509   path="$POTENTIAL_FREETYPE_LIB_PATH"
59510   has_colon=`$ECHO $path | $GREP ^.:`
59511   new_path="$path"
59512   if test "x$has_colon" = x; then
59513     # Not in mixed or Windows style, start by that.
59514     new_path=`cmd //c echo $path`
59515   fi
59516 
59517 
59518   input_path="$new_path"
59519   # Check if we need to convert this using DOS-style short mode. If the path
59520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59521   # take no chances and rewrite it.
59522   # Note: m4 eats our [], so we need to use [ and ] instead.
59523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59524   if test "x$has_forbidden_chars" != x; then
59525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59526     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59527   fi
59528 
59529 
59530   windows_path="$new_path"
59531   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59532     unix_path=`$CYGPATH -u "$windows_path"`
59533     new_path="$unix_path"
59534   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59535     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59536     new_path="$unix_path"
59537   fi
59538 
59539   if test "x$path" != "x$new_path"; then
59540     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59541     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59542 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59543   fi
59544 
59545   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59546   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59547 
59548     else
59549       # We're on a unix platform. Hooray! :)
59550       path="$POTENTIAL_FREETYPE_LIB_PATH"
59551       has_space=`$ECHO "$path" | $GREP " "`
59552       if test "x$has_space" != x; then
59553         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59554 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59555         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59556       fi
59557 
59558       # Use eval to expand a potential ~
59559       eval path="$path"
59560       if test ! -f "$path" && test ! -d "$path"; then
59561         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59562       fi
59563 
59564       if test -d "$path"; then
59565         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59566       else
59567         dir="`$DIRNAME "$path"`"
59568         base="`$BASENAME "$path"`"
59569         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59570       fi
59571     fi
59572   fi
59573 
59574 
59575     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59576     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59577 $as_echo_n "checking for freetype includes... " >&6; }
59578     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59579 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59580     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59581     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59582 $as_echo_n "checking for freetype libraries... " >&6; }
59583     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59584 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59585   fi
59586 
59587           fi
59588           if test "x$FOUND_FREETYPE" != xyes; then
59589             FREETYPE_BASE_DIR="$HOME/freetype"
59590 
59591   windows_path="$FREETYPE_BASE_DIR"
59592   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59593     unix_path=`$CYGPATH -u "$windows_path"`
59594     FREETYPE_BASE_DIR="$unix_path"
59595   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59596     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59597     FREETYPE_BASE_DIR="$unix_path"
59598   fi
59599 
59600             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59601 
59602   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59603   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59604   METHOD="well-known location"
59605 
59606   # Let's start with an optimistic view of the world :-)
59607   FOUND_FREETYPE=yes
59608 
59609   # First look for the canonical freetype main include file ft2build.h.
59610   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59611     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59612     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59613     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59614       # Fail.
59615       FOUND_FREETYPE=no
59616     fi
59617   fi
59618 
59619   if test "x$FOUND_FREETYPE" = xyes; then
59620     # Include file found, let's continue the sanity check.
59621     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59622 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59623 
59624     # Reset to default value
59625     FREETYPE_BASE_NAME=freetype
59626     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59627     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59628       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59629           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59630         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59631         # for the .6 version explicitly.
59632         FREETYPE_BASE_NAME=freetype.6
59633         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59634         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59635 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59636       else
59637         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59638 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59639         FOUND_FREETYPE=no
59640       fi
59641     else
59642       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59643         # On Windows, we will need both .lib and .dll file.
59644         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59645           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59646 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59647           FOUND_FREETYPE=no
59648         fi
59649       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59650           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59651         # Found lib in isa dir, use that instead.
59652         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59653         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59654 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59655       fi
59656     fi
59657   fi
59658 
59659   if test "x$FOUND_FREETYPE" = xyes; then
59660 
59661   # Only process if variable expands to non-empty
59662 
59663   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59664     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59665 
59666   # Input might be given as Windows format, start by converting to
59667   # unix format.
59668   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59669   new_path=`$CYGPATH -u "$path"`
59670 
59671   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59672   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59673   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59674   # "foo.exe" is OK but "foo" is an error.
59675   #
59676   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59677   # It is also a way to make sure we got the proper file name for the real test later on.
59678   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59679   if test "x$test_shortpath" = x; then
59680     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59681 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59682     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59683   fi
59684 
59685   # Call helper function which possibly converts this using DOS-style short mode.
59686   # If so, the updated path is stored in $new_path.
59687 
59688   input_path="$new_path"
59689   # Check if we need to convert this using DOS-style short mode. If the path
59690   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59691   # take no chances and rewrite it.
59692   # Note: m4 eats our [], so we need to use [ and ] instead.
59693   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59694   if test "x$has_forbidden_chars" != x; then
59695     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59696     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59697     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59698     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59699       # Going to short mode and back again did indeed matter. Since short mode is
59700       # case insensitive, let's make it lowercase to improve readability.
59701       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59702       # Now convert it back to Unix-style (cygpath)
59703       input_path=`$CYGPATH -u "$shortmode_path"`
59704       new_path="$input_path"
59705     fi
59706   fi
59707 
59708   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59709   if test "x$test_cygdrive_prefix" = x; then
59710     # As a simple fix, exclude /usr/bin since it's not a real path.
59711     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59712       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59713       # a path prefixed by /cygdrive for fixpath to work.
59714       new_path="$CYGWIN_ROOT_PATH$input_path"
59715     fi
59716   fi
59717 
59718 
59719   if test "x$path" != "x$new_path"; then
59720     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59721     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59722 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59723   fi
59724 
59725     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59726 
59727   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59728   has_colon=`$ECHO $path | $GREP ^.:`
59729   new_path="$path"
59730   if test "x$has_colon" = x; then
59731     # Not in mixed or Windows style, start by that.
59732     new_path=`cmd //c echo $path`
59733   fi
59734 
59735 
59736   input_path="$new_path"
59737   # Check if we need to convert this using DOS-style short mode. If the path
59738   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59739   # take no chances and rewrite it.
59740   # Note: m4 eats our [], so we need to use [ and ] instead.
59741   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59742   if test "x$has_forbidden_chars" != x; then
59743     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59744     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59745   fi
59746 
59747 
59748   windows_path="$new_path"
59749   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59750     unix_path=`$CYGPATH -u "$windows_path"`
59751     new_path="$unix_path"
59752   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59753     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59754     new_path="$unix_path"
59755   fi
59756 
59757   if test "x$path" != "x$new_path"; then
59758     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59759     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59760 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59761   fi
59762 
59763   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59764   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59765 
59766     else
59767       # We're on a unix platform. Hooray! :)
59768       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59769       has_space=`$ECHO "$path" | $GREP " "`
59770       if test "x$has_space" != x; then
59771         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59772 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59773         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59774       fi
59775 
59776       # Use eval to expand a potential ~
59777       eval path="$path"
59778       if test ! -f "$path" && test ! -d "$path"; then
59779         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59780       fi
59781 
59782       if test -d "$path"; then
59783         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59784       else
59785         dir="`$DIRNAME "$path"`"
59786         base="`$BASENAME "$path"`"
59787         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59788       fi
59789     fi
59790   fi
59791 
59792 
59793   # Only process if variable expands to non-empty
59794 
59795   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59796     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59797 
59798   # Input might be given as Windows format, start by converting to
59799   # unix format.
59800   path="$POTENTIAL_FREETYPE_LIB_PATH"
59801   new_path=`$CYGPATH -u "$path"`
59802 
59803   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59804   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59805   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59806   # "foo.exe" is OK but "foo" is an error.
59807   #
59808   # This test is therefore slightly more accurate than "test -f" to check for file precense.
59809   # It is also a way to make sure we got the proper file name for the real test later on.
59810   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59811   if test "x$test_shortpath" = x; then
59812     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59813 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59814     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59815   fi
59816 
59817   # Call helper function which possibly converts this using DOS-style short mode.
59818   # If so, the updated path is stored in $new_path.
59819 
59820   input_path="$new_path"
59821   # Check if we need to convert this using DOS-style short mode. If the path
59822   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59823   # take no chances and rewrite it.
59824   # Note: m4 eats our [], so we need to use [ and ] instead.
59825   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59826   if test "x$has_forbidden_chars" != x; then
59827     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59828     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59829     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59830     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59831       # Going to short mode and back again did indeed matter. Since short mode is
59832       # case insensitive, let's make it lowercase to improve readability.
59833       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59834       # Now convert it back to Unix-style (cygpath)
59835       input_path=`$CYGPATH -u "$shortmode_path"`
59836       new_path="$input_path"
59837     fi
59838   fi
59839 
59840   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59841   if test "x$test_cygdrive_prefix" = x; then
59842     # As a simple fix, exclude /usr/bin since it's not a real path.
59843     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59844       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59845       # a path prefixed by /cygdrive for fixpath to work.
59846       new_path="$CYGWIN_ROOT_PATH$input_path"
59847     fi
59848   fi
59849 
59850 
59851   if test "x$path" != "x$new_path"; then
59852     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59853     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59854 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59855   fi
59856 
59857     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59858 
59859   path="$POTENTIAL_FREETYPE_LIB_PATH"
59860   has_colon=`$ECHO $path | $GREP ^.:`
59861   new_path="$path"
59862   if test "x$has_colon" = x; then
59863     # Not in mixed or Windows style, start by that.
59864     new_path=`cmd //c echo $path`
59865   fi
59866 
59867 
59868   input_path="$new_path"
59869   # Check if we need to convert this using DOS-style short mode. If the path
59870   # contains just simple characters, use it. Otherwise (spaces, weird characters),
59871   # take no chances and rewrite it.
59872   # Note: m4 eats our [], so we need to use [ and ] instead.
59873   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59874   if test "x$has_forbidden_chars" != x; then
59875     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59876     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59877   fi
59878 
59879 
59880   windows_path="$new_path"
59881   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59882     unix_path=`$CYGPATH -u "$windows_path"`
59883     new_path="$unix_path"
59884   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59885     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59886     new_path="$unix_path"
59887   fi
59888 
59889   if test "x$path" != "x$new_path"; then
59890     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59891     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59892 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59893   fi
59894 
59895   # Save the first 10 bytes of this path to the storage, so fixpath can work.
59896   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59897 
59898     else
59899       # We're on a unix platform. Hooray! :)
59900       path="$POTENTIAL_FREETYPE_LIB_PATH"
59901       has_space=`$ECHO "$path" | $GREP " "`
59902       if test "x$has_space" != x; then
59903         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59904 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59905         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59906       fi
59907 
59908       # Use eval to expand a potential ~
59909       eval path="$path"
59910       if test ! -f "$path" && test ! -d "$path"; then
59911         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59912       fi
59913 
59914       if test -d "$path"; then
59915         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59916       else
59917         dir="`$DIRNAME "$path"`"
59918         base="`$BASENAME "$path"`"
59919         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59920       fi
59921     fi
59922   fi
59923 
59924 
59925     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59926     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59927 $as_echo_n "checking for freetype includes... " >&6; }
59928     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59929 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59930     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59931     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59932 $as_echo_n "checking for freetype libraries... " >&6; }
59933     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59934 $as_echo "$FREETYPE_LIB_PATH" >&6; }
59935   fi
59936 
59937             else
59938 
59939   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59940   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59941   METHOD="well-known location"
59942 
59943   # Let's start with an optimistic view of the world :-)
59944   FOUND_FREETYPE=yes
59945 
59946   # First look for the canonical freetype main include file ft2build.h.
59947   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59948     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59949     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59950     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59951       # Fail.
59952       FOUND_FREETYPE=no
59953     fi
59954   fi
59955 
59956   if test "x$FOUND_FREETYPE" = xyes; then
59957     # Include file found, let's continue the sanity check.
59958     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59959 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59960 
59961     # Reset to default value
59962     FREETYPE_BASE_NAME=freetype
59963     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59964     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59965       if test "x$OPENJDK_TARGET_OS" = xmacosx \
59966           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59967         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59968         # for the .6 version explicitly.
59969         FREETYPE_BASE_NAME=freetype.6
59970         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59971         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59972 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59973       else
59974         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59975 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59976         FOUND_FREETYPE=no
59977       fi
59978     else
59979       if test "x$OPENJDK_TARGET_OS" = xwindows; then
59980         # On Windows, we will need both .lib and .dll file.
59981         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59982           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59983 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59984           FOUND_FREETYPE=no
59985         fi
59986       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59987           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59988         # Found lib in isa dir, use that instead.
59989         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59990         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59991 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59992       fi
59993     fi
59994   fi
59995 
59996   if test "x$FOUND_FREETYPE" = xyes; then
59997 
59998   # Only process if variable expands to non-empty
59999 
60000   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60001     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60002 
60003   # Input might be given as Windows format, start by converting to
60004   # unix format.
60005   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60006   new_path=`$CYGPATH -u "$path"`
60007 
60008   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60009   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60010   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60011   # "foo.exe" is OK but "foo" is an error.
60012   #
60013   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60014   # It is also a way to make sure we got the proper file name for the real test later on.
60015   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60016   if test "x$test_shortpath" = x; then
60017     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60018 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60019     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60020   fi
60021 
60022   # Call helper function which possibly converts this using DOS-style short mode.
60023   # If so, the updated path is stored in $new_path.
60024 
60025   input_path="$new_path"
60026   # Check if we need to convert this using DOS-style short mode. If the path
60027   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60028   # take no chances and rewrite it.
60029   # Note: m4 eats our [], so we need to use [ and ] instead.
60030   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60031   if test "x$has_forbidden_chars" != x; then
60032     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60033     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60034     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60035     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60036       # Going to short mode and back again did indeed matter. Since short mode is
60037       # case insensitive, let's make it lowercase to improve readability.
60038       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60039       # Now convert it back to Unix-style (cygpath)
60040       input_path=`$CYGPATH -u "$shortmode_path"`
60041       new_path="$input_path"
60042     fi
60043   fi
60044 
60045   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60046   if test "x$test_cygdrive_prefix" = x; then
60047     # As a simple fix, exclude /usr/bin since it's not a real path.
60048     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60049       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60050       # a path prefixed by /cygdrive for fixpath to work.
60051       new_path="$CYGWIN_ROOT_PATH$input_path"
60052     fi
60053   fi
60054 
60055 
60056   if test "x$path" != "x$new_path"; then
60057     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60059 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60060   fi
60061 
60062     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60063 
60064   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60065   has_colon=`$ECHO $path | $GREP ^.:`
60066   new_path="$path"
60067   if test "x$has_colon" = x; then
60068     # Not in mixed or Windows style, start by that.
60069     new_path=`cmd //c echo $path`
60070   fi
60071 
60072 
60073   input_path="$new_path"
60074   # Check if we need to convert this using DOS-style short mode. If the path
60075   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60076   # take no chances and rewrite it.
60077   # Note: m4 eats our [], so we need to use [ and ] instead.
60078   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60079   if test "x$has_forbidden_chars" != x; then
60080     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60081     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60082   fi
60083 
60084 
60085   windows_path="$new_path"
60086   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60087     unix_path=`$CYGPATH -u "$windows_path"`
60088     new_path="$unix_path"
60089   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60090     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60091     new_path="$unix_path"
60092   fi
60093 
60094   if test "x$path" != "x$new_path"; then
60095     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60096     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60097 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60098   fi
60099 
60100   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60101   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60102 
60103     else
60104       # We're on a unix platform. Hooray! :)
60105       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60106       has_space=`$ECHO "$path" | $GREP " "`
60107       if test "x$has_space" != x; then
60108         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60109 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60110         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60111       fi
60112 
60113       # Use eval to expand a potential ~
60114       eval path="$path"
60115       if test ! -f "$path" && test ! -d "$path"; then
60116         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60117       fi
60118 
60119       if test -d "$path"; then
60120         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60121       else
60122         dir="`$DIRNAME "$path"`"
60123         base="`$BASENAME "$path"`"
60124         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60125       fi
60126     fi
60127   fi
60128 
60129 
60130   # Only process if variable expands to non-empty
60131 
60132   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60133     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60134 
60135   # Input might be given as Windows format, start by converting to
60136   # unix format.
60137   path="$POTENTIAL_FREETYPE_LIB_PATH"
60138   new_path=`$CYGPATH -u "$path"`
60139 
60140   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60141   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60142   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60143   # "foo.exe" is OK but "foo" is an error.
60144   #
60145   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60146   # It is also a way to make sure we got the proper file name for the real test later on.
60147   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60148   if test "x$test_shortpath" = x; then
60149     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60150 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60151     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60152   fi
60153 
60154   # Call helper function which possibly converts this using DOS-style short mode.
60155   # If so, the updated path is stored in $new_path.
60156 
60157   input_path="$new_path"
60158   # Check if we need to convert this using DOS-style short mode. If the path
60159   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60160   # take no chances and rewrite it.
60161   # Note: m4 eats our [], so we need to use [ and ] instead.
60162   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60163   if test "x$has_forbidden_chars" != x; then
60164     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60165     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60166     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60167     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60168       # Going to short mode and back again did indeed matter. Since short mode is
60169       # case insensitive, let's make it lowercase to improve readability.
60170       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60171       # Now convert it back to Unix-style (cygpath)
60172       input_path=`$CYGPATH -u "$shortmode_path"`
60173       new_path="$input_path"
60174     fi
60175   fi
60176 
60177   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60178   if test "x$test_cygdrive_prefix" = x; then
60179     # As a simple fix, exclude /usr/bin since it's not a real path.
60180     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60181       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60182       # a path prefixed by /cygdrive for fixpath to work.
60183       new_path="$CYGWIN_ROOT_PATH$input_path"
60184     fi
60185   fi
60186 
60187 
60188   if test "x$path" != "x$new_path"; then
60189     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60190     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60191 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60192   fi
60193 
60194     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60195 
60196   path="$POTENTIAL_FREETYPE_LIB_PATH"
60197   has_colon=`$ECHO $path | $GREP ^.:`
60198   new_path="$path"
60199   if test "x$has_colon" = x; then
60200     # Not in mixed or Windows style, start by that.
60201     new_path=`cmd //c echo $path`
60202   fi
60203 
60204 
60205   input_path="$new_path"
60206   # Check if we need to convert this using DOS-style short mode. If the path
60207   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60208   # take no chances and rewrite it.
60209   # Note: m4 eats our [], so we need to use [ and ] instead.
60210   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60211   if test "x$has_forbidden_chars" != x; then
60212     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60213     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60214   fi
60215 
60216 
60217   windows_path="$new_path"
60218   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60219     unix_path=`$CYGPATH -u "$windows_path"`
60220     new_path="$unix_path"
60221   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60222     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60223     new_path="$unix_path"
60224   fi
60225 
60226   if test "x$path" != "x$new_path"; then
60227     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60228     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60229 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60230   fi
60231 
60232   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60233   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60234 
60235     else
60236       # We're on a unix platform. Hooray! :)
60237       path="$POTENTIAL_FREETYPE_LIB_PATH"
60238       has_space=`$ECHO "$path" | $GREP " "`
60239       if test "x$has_space" != x; then
60240         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60241 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60242         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60243       fi
60244 
60245       # Use eval to expand a potential ~
60246       eval path="$path"
60247       if test ! -f "$path" && test ! -d "$path"; then
60248         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60249       fi
60250 
60251       if test -d "$path"; then
60252         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60253       else
60254         dir="`$DIRNAME "$path"`"
60255         base="`$BASENAME "$path"`"
60256         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60257       fi
60258     fi
60259   fi
60260 
60261 
60262     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60264 $as_echo_n "checking for freetype includes... " >&6; }
60265     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60266 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60267     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60268     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60269 $as_echo_n "checking for freetype libraries... " >&6; }
60270     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60271 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60272   fi
60273 
60274             fi
60275             if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
60276                 && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
60277               # Source is available, as a last resort try to build freetype in default location
60278 
60279   FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
60280   BUILD_FREETYPE=yes
60281 
60282   # Check if the freetype sources are acessible..
60283   if ! test -d $FREETYPE_SRC_PATH; then
60284     { $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
60285 $as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
60286     BUILD_FREETYPE=no
60287   fi
60288   # ..and contain a vc2010 project file
60289   vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
60290   if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
60291     { $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
60292 $as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
60293     BUILD_FREETYPE=no
60294   fi
60295   # Now check if configure found a version of 'msbuild.exe'
60296   if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
60297     { $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
60298 $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;}
60299     BUILD_FREETYPE=no
60300   fi
60301 
60302   # Ready to go..
60303   if test "x$BUILD_FREETYPE" = xyes; then
60304     # msbuild requires trailing slashes for output directories
60305     freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
60306     freetype_lib_path_unix="$freetype_lib_path"
60307     freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
60308 
60309   unix_path="$vcxproj_path"
60310   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60311     windows_path=`$CYGPATH -m "$unix_path"`
60312     vcxproj_path="$windows_path"
60313   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60314     windows_path=`cmd //c echo $unix_path`
60315     vcxproj_path="$windows_path"
60316   fi
60317 
60318 
60319   unix_path="$freetype_lib_path"
60320   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60321     windows_path=`$CYGPATH -m "$unix_path"`
60322     freetype_lib_path="$windows_path"
60323   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60324     windows_path=`cmd //c echo $unix_path`
60325     freetype_lib_path="$windows_path"
60326   fi
60327 
60328 
60329   unix_path="$freetype_obj_path"
60330   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60331     windows_path=`$CYGPATH -m "$unix_path"`
60332     freetype_obj_path="$windows_path"
60333   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60334     windows_path=`cmd //c echo $unix_path`
60335     freetype_obj_path="$windows_path"
60336   fi
60337 
60338     if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60339       freetype_platform=x64
60340     else
60341       freetype_platform=win32
60342     fi
60343 
60344     # The original freetype project file is for VS 2010 (i.e. 'v100'),
60345     # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
60346     # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
60347     # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
60348     { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
60349 $as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
60350 
60351     # First we try to build the freetype.dll
60352     $ECHO -e "@echo off\n"\
60353         "$MSBUILD $vcxproj_path "\
60354         "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60355         "/p:Configuration=\"Release Multithreaded\" "\
60356         "/p:Platform=$freetype_platform "\
60357         "/p:ConfigurationType=DynamicLibrary "\
60358         "/p:TargetName=freetype "\
60359         "/p:OutDir=\"$freetype_lib_path\" "\
60360         "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
60361     cmd /c freetype.bat
60362 
60363     if test -s "$freetype_lib_path_unix/freetype.dll"; then
60364       # If that succeeds we also build freetype.lib
60365       $ECHO -e "@echo off\n"\
60366           "$MSBUILD $vcxproj_path "\
60367           "/p:PlatformToolset=$PLATFORM_TOOLSET "\
60368           "/p:Configuration=\"Release Multithreaded\" "\
60369           "/p:Platform=$freetype_platform "\
60370           "/p:ConfigurationType=StaticLibrary "\
60371           "/p:TargetName=freetype "\
60372           "/p:OutDir=\"$freetype_lib_path\" "\
60373           "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
60374       cmd /c freetype.bat
60375 
60376       if test -s "$freetype_lib_path_unix/freetype.lib"; then
60377         # Once we build both, lib and dll, set freetype lib and include path appropriately
60378         POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
60379         POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
60380         { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
60381 $as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
60382       else
60383         BUILD_FREETYPE=no
60384       fi
60385     else
60386       BUILD_FREETYPE=no
60387     fi
60388   fi
60389 
60390               if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
60391 
60392   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60393   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
60394   METHOD="well-known location"
60395 
60396   # Let's start with an optimistic view of the world :-)
60397   FOUND_FREETYPE=yes
60398 
60399   # First look for the canonical freetype main include file ft2build.h.
60400   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60401     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60402     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60403     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60404       # Fail.
60405       FOUND_FREETYPE=no
60406     fi
60407   fi
60408 
60409   if test "x$FOUND_FREETYPE" = xyes; then
60410     # Include file found, let's continue the sanity check.
60411     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60412 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60413 
60414     # Reset to default value
60415     FREETYPE_BASE_NAME=freetype
60416     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60417     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60418       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60419           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60420         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60421         # for the .6 version explicitly.
60422         FREETYPE_BASE_NAME=freetype.6
60423         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60424         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60425 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60426       else
60427         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60428 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60429         FOUND_FREETYPE=no
60430       fi
60431     else
60432       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60433         # On Windows, we will need both .lib and .dll file.
60434         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60435           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60436 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60437           FOUND_FREETYPE=no
60438         fi
60439       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60440           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60441         # Found lib in isa dir, use that instead.
60442         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60443         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60444 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60445       fi
60446     fi
60447   fi
60448 
60449   if test "x$FOUND_FREETYPE" = xyes; then
60450 
60451   # Only process if variable expands to non-empty
60452 
60453   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60454     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60455 
60456   # Input might be given as Windows format, start by converting to
60457   # unix format.
60458   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60459   new_path=`$CYGPATH -u "$path"`
60460 
60461   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60462   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60463   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60464   # "foo.exe" is OK but "foo" is an error.
60465   #
60466   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60467   # It is also a way to make sure we got the proper file name for the real test later on.
60468   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60469   if test "x$test_shortpath" = x; then
60470     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60471 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60472     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60473   fi
60474 
60475   # Call helper function which possibly converts this using DOS-style short mode.
60476   # If so, the updated path is stored in $new_path.
60477 
60478   input_path="$new_path"
60479   # Check if we need to convert this using DOS-style short mode. If the path
60480   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60481   # take no chances and rewrite it.
60482   # Note: m4 eats our [], so we need to use [ and ] instead.
60483   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60484   if test "x$has_forbidden_chars" != x; then
60485     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60486     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60487     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60488     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60489       # Going to short mode and back again did indeed matter. Since short mode is
60490       # case insensitive, let's make it lowercase to improve readability.
60491       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60492       # Now convert it back to Unix-style (cygpath)
60493       input_path=`$CYGPATH -u "$shortmode_path"`
60494       new_path="$input_path"
60495     fi
60496   fi
60497 
60498   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60499   if test "x$test_cygdrive_prefix" = x; then
60500     # As a simple fix, exclude /usr/bin since it's not a real path.
60501     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60502       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60503       # a path prefixed by /cygdrive for fixpath to work.
60504       new_path="$CYGWIN_ROOT_PATH$input_path"
60505     fi
60506   fi
60507 
60508 
60509   if test "x$path" != "x$new_path"; then
60510     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60511     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60512 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60513   fi
60514 
60515     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60516 
60517   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60518   has_colon=`$ECHO $path | $GREP ^.:`
60519   new_path="$path"
60520   if test "x$has_colon" = x; then
60521     # Not in mixed or Windows style, start by that.
60522     new_path=`cmd //c echo $path`
60523   fi
60524 
60525 
60526   input_path="$new_path"
60527   # Check if we need to convert this using DOS-style short mode. If the path
60528   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60529   # take no chances and rewrite it.
60530   # Note: m4 eats our [], so we need to use [ and ] instead.
60531   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60532   if test "x$has_forbidden_chars" != x; then
60533     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60534     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60535   fi
60536 
60537 
60538   windows_path="$new_path"
60539   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60540     unix_path=`$CYGPATH -u "$windows_path"`
60541     new_path="$unix_path"
60542   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60543     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60544     new_path="$unix_path"
60545   fi
60546 
60547   if test "x$path" != "x$new_path"; then
60548     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60549     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60550 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60551   fi
60552 
60553   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60554   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60555 
60556     else
60557       # We're on a unix platform. Hooray! :)
60558       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60559       has_space=`$ECHO "$path" | $GREP " "`
60560       if test "x$has_space" != x; then
60561         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60562 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60563         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60564       fi
60565 
60566       # Use eval to expand a potential ~
60567       eval path="$path"
60568       if test ! -f "$path" && test ! -d "$path"; then
60569         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60570       fi
60571 
60572       if test -d "$path"; then
60573         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60574       else
60575         dir="`$DIRNAME "$path"`"
60576         base="`$BASENAME "$path"`"
60577         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60578       fi
60579     fi
60580   fi
60581 
60582 
60583   # Only process if variable expands to non-empty
60584 
60585   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60586     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60587 
60588   # Input might be given as Windows format, start by converting to
60589   # unix format.
60590   path="$POTENTIAL_FREETYPE_LIB_PATH"
60591   new_path=`$CYGPATH -u "$path"`
60592 
60593   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60594   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60595   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60596   # "foo.exe" is OK but "foo" is an error.
60597   #
60598   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60599   # It is also a way to make sure we got the proper file name for the real test later on.
60600   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60601   if test "x$test_shortpath" = x; then
60602     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60603 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60604     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60605   fi
60606 
60607   # Call helper function which possibly converts this using DOS-style short mode.
60608   # If so, the updated path is stored in $new_path.
60609 
60610   input_path="$new_path"
60611   # Check if we need to convert this using DOS-style short mode. If the path
60612   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60613   # take no chances and rewrite it.
60614   # Note: m4 eats our [], so we need to use [ and ] instead.
60615   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60616   if test "x$has_forbidden_chars" != x; then
60617     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60618     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60619     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60620     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60621       # Going to short mode and back again did indeed matter. Since short mode is
60622       # case insensitive, let's make it lowercase to improve readability.
60623       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60624       # Now convert it back to Unix-style (cygpath)
60625       input_path=`$CYGPATH -u "$shortmode_path"`
60626       new_path="$input_path"
60627     fi
60628   fi
60629 
60630   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60631   if test "x$test_cygdrive_prefix" = x; then
60632     # As a simple fix, exclude /usr/bin since it's not a real path.
60633     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60634       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60635       # a path prefixed by /cygdrive for fixpath to work.
60636       new_path="$CYGWIN_ROOT_PATH$input_path"
60637     fi
60638   fi
60639 
60640 
60641   if test "x$path" != "x$new_path"; then
60642     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60643     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60644 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60645   fi
60646 
60647     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60648 
60649   path="$POTENTIAL_FREETYPE_LIB_PATH"
60650   has_colon=`$ECHO $path | $GREP ^.:`
60651   new_path="$path"
60652   if test "x$has_colon" = x; then
60653     # Not in mixed or Windows style, start by that.
60654     new_path=`cmd //c echo $path`
60655   fi
60656 
60657 
60658   input_path="$new_path"
60659   # Check if we need to convert this using DOS-style short mode. If the path
60660   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60661   # take no chances and rewrite it.
60662   # Note: m4 eats our [], so we need to use [ and ] instead.
60663   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60664   if test "x$has_forbidden_chars" != x; then
60665     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60666     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60667   fi
60668 
60669 
60670   windows_path="$new_path"
60671   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60672     unix_path=`$CYGPATH -u "$windows_path"`
60673     new_path="$unix_path"
60674   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60675     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60676     new_path="$unix_path"
60677   fi
60678 
60679   if test "x$path" != "x$new_path"; then
60680     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60681     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60682 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60683   fi
60684 
60685   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60686   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60687 
60688     else
60689       # We're on a unix platform. Hooray! :)
60690       path="$POTENTIAL_FREETYPE_LIB_PATH"
60691       has_space=`$ECHO "$path" | $GREP " "`
60692       if test "x$has_space" != x; then
60693         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60694 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60695         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60696       fi
60697 
60698       # Use eval to expand a potential ~
60699       eval path="$path"
60700       if test ! -f "$path" && test ! -d "$path"; then
60701         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60702       fi
60703 
60704       if test -d "$path"; then
60705         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60706       else
60707         dir="`$DIRNAME "$path"`"
60708         base="`$BASENAME "$path"`"
60709         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60710       fi
60711     fi
60712   fi
60713 
60714 
60715     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60716     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60717 $as_echo_n "checking for freetype includes... " >&6; }
60718     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60719 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60720     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60721     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60722 $as_echo_n "checking for freetype libraries... " >&6; }
60723     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60724 $as_echo "$FREETYPE_LIB_PATH" >&6; }
60725   fi
60726 
60727               else
60728 
60729   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60730   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60731   METHOD="well-known location"
60732 
60733   # Let's start with an optimistic view of the world :-)
60734   FOUND_FREETYPE=yes
60735 
60736   # First look for the canonical freetype main include file ft2build.h.
60737   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60738     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60739     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60740     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60741       # Fail.
60742       FOUND_FREETYPE=no
60743     fi
60744   fi
60745 
60746   if test "x$FOUND_FREETYPE" = xyes; then
60747     # Include file found, let's continue the sanity check.
60748     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60749 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60750 
60751     # Reset to default value
60752     FREETYPE_BASE_NAME=freetype
60753     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60754     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60755       if test "x$OPENJDK_TARGET_OS" = xmacosx \
60756           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60757         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60758         # for the .6 version explicitly.
60759         FREETYPE_BASE_NAME=freetype.6
60760         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60761         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60762 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60763       else
60764         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60765 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60766         FOUND_FREETYPE=no
60767       fi
60768     else
60769       if test "x$OPENJDK_TARGET_OS" = xwindows; then
60770         # On Windows, we will need both .lib and .dll file.
60771         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60772           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60773 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60774           FOUND_FREETYPE=no
60775         fi
60776       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60777           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60778         # Found lib in isa dir, use that instead.
60779         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60780         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60781 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60782       fi
60783     fi
60784   fi
60785 
60786   if test "x$FOUND_FREETYPE" = xyes; then
60787 
60788   # Only process if variable expands to non-empty
60789 
60790   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60791     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60792 
60793   # Input might be given as Windows format, start by converting to
60794   # unix format.
60795   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60796   new_path=`$CYGPATH -u "$path"`
60797 
60798   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60799   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60800   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60801   # "foo.exe" is OK but "foo" is an error.
60802   #
60803   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60804   # It is also a way to make sure we got the proper file name for the real test later on.
60805   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60806   if test "x$test_shortpath" = x; then
60807     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60808 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60809     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60810   fi
60811 
60812   # Call helper function which possibly converts this using DOS-style short mode.
60813   # If so, the updated path is stored in $new_path.
60814 
60815   input_path="$new_path"
60816   # Check if we need to convert this using DOS-style short mode. If the path
60817   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60818   # take no chances and rewrite it.
60819   # Note: m4 eats our [], so we need to use [ and ] instead.
60820   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60821   if test "x$has_forbidden_chars" != x; then
60822     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60823     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60824     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60825     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60826       # Going to short mode and back again did indeed matter. Since short mode is
60827       # case insensitive, let's make it lowercase to improve readability.
60828       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60829       # Now convert it back to Unix-style (cygpath)
60830       input_path=`$CYGPATH -u "$shortmode_path"`
60831       new_path="$input_path"
60832     fi
60833   fi
60834 
60835   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60836   if test "x$test_cygdrive_prefix" = x; then
60837     # As a simple fix, exclude /usr/bin since it's not a real path.
60838     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60839       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60840       # a path prefixed by /cygdrive for fixpath to work.
60841       new_path="$CYGWIN_ROOT_PATH$input_path"
60842     fi
60843   fi
60844 
60845 
60846   if test "x$path" != "x$new_path"; then
60847     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60848     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60849 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60850   fi
60851 
60852     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60853 
60854   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60855   has_colon=`$ECHO $path | $GREP ^.:`
60856   new_path="$path"
60857   if test "x$has_colon" = x; then
60858     # Not in mixed or Windows style, start by that.
60859     new_path=`cmd //c echo $path`
60860   fi
60861 
60862 
60863   input_path="$new_path"
60864   # Check if we need to convert this using DOS-style short mode. If the path
60865   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60866   # take no chances and rewrite it.
60867   # Note: m4 eats our [], so we need to use [ and ] instead.
60868   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60869   if test "x$has_forbidden_chars" != x; then
60870     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60871     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60872   fi
60873 
60874 
60875   windows_path="$new_path"
60876   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60877     unix_path=`$CYGPATH -u "$windows_path"`
60878     new_path="$unix_path"
60879   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60880     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60881     new_path="$unix_path"
60882   fi
60883 
60884   if test "x$path" != "x$new_path"; then
60885     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60886     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60887 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60888   fi
60889 
60890   # Save the first 10 bytes of this path to the storage, so fixpath can work.
60891   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60892 
60893     else
60894       # We're on a unix platform. Hooray! :)
60895       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60896       has_space=`$ECHO "$path" | $GREP " "`
60897       if test "x$has_space" != x; then
60898         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60899 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60900         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60901       fi
60902 
60903       # Use eval to expand a potential ~
60904       eval path="$path"
60905       if test ! -f "$path" && test ! -d "$path"; then
60906         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60907       fi
60908 
60909       if test -d "$path"; then
60910         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60911       else
60912         dir="`$DIRNAME "$path"`"
60913         base="`$BASENAME "$path"`"
60914         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60915       fi
60916     fi
60917   fi
60918 
60919 
60920   # Only process if variable expands to non-empty
60921 
60922   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60923     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60924 
60925   # Input might be given as Windows format, start by converting to
60926   # unix format.
60927   path="$POTENTIAL_FREETYPE_LIB_PATH"
60928   new_path=`$CYGPATH -u "$path"`
60929 
60930   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60931   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60932   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60933   # "foo.exe" is OK but "foo" is an error.
60934   #
60935   # This test is therefore slightly more accurate than "test -f" to check for file precense.
60936   # It is also a way to make sure we got the proper file name for the real test later on.
60937   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60938   if test "x$test_shortpath" = x; then
60939     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60940 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60941     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60942   fi
60943 
60944   # Call helper function which possibly converts this using DOS-style short mode.
60945   # If so, the updated path is stored in $new_path.
60946 
60947   input_path="$new_path"
60948   # Check if we need to convert this using DOS-style short mode. If the path
60949   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60950   # take no chances and rewrite it.
60951   # Note: m4 eats our [], so we need to use [ and ] instead.
60952   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60953   if test "x$has_forbidden_chars" != x; then
60954     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60955     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60956     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60957     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60958       # Going to short mode and back again did indeed matter. Since short mode is
60959       # case insensitive, let's make it lowercase to improve readability.
60960       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60961       # Now convert it back to Unix-style (cygpath)
60962       input_path=`$CYGPATH -u "$shortmode_path"`
60963       new_path="$input_path"
60964     fi
60965   fi
60966 
60967   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60968   if test "x$test_cygdrive_prefix" = x; then
60969     # As a simple fix, exclude /usr/bin since it's not a real path.
60970     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60971       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60972       # a path prefixed by /cygdrive for fixpath to work.
60973       new_path="$CYGWIN_ROOT_PATH$input_path"
60974     fi
60975   fi
60976 
60977 
60978   if test "x$path" != "x$new_path"; then
60979     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60980     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60981 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60982   fi
60983 
60984     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60985 
60986   path="$POTENTIAL_FREETYPE_LIB_PATH"
60987   has_colon=`$ECHO $path | $GREP ^.:`
60988   new_path="$path"
60989   if test "x$has_colon" = x; then
60990     # Not in mixed or Windows style, start by that.
60991     new_path=`cmd //c echo $path`
60992   fi
60993 
60994 
60995   input_path="$new_path"
60996   # Check if we need to convert this using DOS-style short mode. If the path
60997   # contains just simple characters, use it. Otherwise (spaces, weird characters),
60998   # take no chances and rewrite it.
60999   # Note: m4 eats our [], so we need to use [ and ] instead.
61000   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61001   if test "x$has_forbidden_chars" != x; then
61002     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61003     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61004   fi
61005 
61006 
61007   windows_path="$new_path"
61008   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61009     unix_path=`$CYGPATH -u "$windows_path"`
61010     new_path="$unix_path"
61011   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61012     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61013     new_path="$unix_path"
61014   fi
61015 
61016   if test "x$path" != "x$new_path"; then
61017     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61018     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61019 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61020   fi
61021 
61022   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61023   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61024 
61025     else
61026       # We're on a unix platform. Hooray! :)
61027       path="$POTENTIAL_FREETYPE_LIB_PATH"
61028       has_space=`$ECHO "$path" | $GREP " "`
61029       if test "x$has_space" != x; then
61030         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61031 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61032         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61033       fi
61034 
61035       # Use eval to expand a potential ~
61036       eval path="$path"
61037       if test ! -f "$path" && test ! -d "$path"; then
61038         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61039       fi
61040 
61041       if test -d "$path"; then
61042         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61043       else
61044         dir="`$DIRNAME "$path"`"
61045         base="`$BASENAME "$path"`"
61046         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61047       fi
61048     fi
61049   fi
61050 
61051 
61052     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61054 $as_echo_n "checking for freetype includes... " >&6; }
61055     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61056 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61057     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61058     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61059 $as_echo_n "checking for freetype libraries... " >&6; }
61060     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61061 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61062   fi
61063 
61064               fi
61065             fi
61066           fi
61067         else
61068           FREETYPE_BASE_DIR="$SYSROOT/usr"
61069 
61070   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61071   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61072   METHOD="well-known location"
61073 
61074   # Let's start with an optimistic view of the world :-)
61075   FOUND_FREETYPE=yes
61076 
61077   # First look for the canonical freetype main include file ft2build.h.
61078   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61079     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61080     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61081     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61082       # Fail.
61083       FOUND_FREETYPE=no
61084     fi
61085   fi
61086 
61087   if test "x$FOUND_FREETYPE" = xyes; then
61088     # Include file found, let's continue the sanity check.
61089     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61090 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61091 
61092     # Reset to default value
61093     FREETYPE_BASE_NAME=freetype
61094     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61095     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61096       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61097           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61098         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61099         # for the .6 version explicitly.
61100         FREETYPE_BASE_NAME=freetype.6
61101         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61102         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61103 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61104       else
61105         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61106 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61107         FOUND_FREETYPE=no
61108       fi
61109     else
61110       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61111         # On Windows, we will need both .lib and .dll file.
61112         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61113           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61114 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61115           FOUND_FREETYPE=no
61116         fi
61117       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61118           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61119         # Found lib in isa dir, use that instead.
61120         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61121         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61122 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61123       fi
61124     fi
61125   fi
61126 
61127   if test "x$FOUND_FREETYPE" = xyes; then
61128 
61129   # Only process if variable expands to non-empty
61130 
61131   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61132     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61133 
61134   # Input might be given as Windows format, start by converting to
61135   # unix format.
61136   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61137   new_path=`$CYGPATH -u "$path"`
61138 
61139   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61140   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61141   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61142   # "foo.exe" is OK but "foo" is an error.
61143   #
61144   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61145   # It is also a way to make sure we got the proper file name for the real test later on.
61146   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61147   if test "x$test_shortpath" = x; then
61148     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61149 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61150     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61151   fi
61152 
61153   # Call helper function which possibly converts this using DOS-style short mode.
61154   # If so, the updated path is stored in $new_path.
61155 
61156   input_path="$new_path"
61157   # Check if we need to convert this using DOS-style short mode. If the path
61158   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61159   # take no chances and rewrite it.
61160   # Note: m4 eats our [], so we need to use [ and ] instead.
61161   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61162   if test "x$has_forbidden_chars" != x; then
61163     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61164     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61165     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61166     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61167       # Going to short mode and back again did indeed matter. Since short mode is
61168       # case insensitive, let's make it lowercase to improve readability.
61169       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61170       # Now convert it back to Unix-style (cygpath)
61171       input_path=`$CYGPATH -u "$shortmode_path"`
61172       new_path="$input_path"
61173     fi
61174   fi
61175 
61176   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61177   if test "x$test_cygdrive_prefix" = x; then
61178     # As a simple fix, exclude /usr/bin since it's not a real path.
61179     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61180       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61181       # a path prefixed by /cygdrive for fixpath to work.
61182       new_path="$CYGWIN_ROOT_PATH$input_path"
61183     fi
61184   fi
61185 
61186 
61187   if test "x$path" != "x$new_path"; then
61188     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61189     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61190 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61191   fi
61192 
61193     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61194 
61195   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61196   has_colon=`$ECHO $path | $GREP ^.:`
61197   new_path="$path"
61198   if test "x$has_colon" = x; then
61199     # Not in mixed or Windows style, start by that.
61200     new_path=`cmd //c echo $path`
61201   fi
61202 
61203 
61204   input_path="$new_path"
61205   # Check if we need to convert this using DOS-style short mode. If the path
61206   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61207   # take no chances and rewrite it.
61208   # Note: m4 eats our [], so we need to use [ and ] instead.
61209   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61210   if test "x$has_forbidden_chars" != x; then
61211     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61212     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61213   fi
61214 
61215 
61216   windows_path="$new_path"
61217   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61218     unix_path=`$CYGPATH -u "$windows_path"`
61219     new_path="$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     new_path="$unix_path"
61223   fi
61224 
61225   if test "x$path" != "x$new_path"; then
61226     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61227     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61228 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61229   fi
61230 
61231   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61232   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61233 
61234     else
61235       # We're on a unix platform. Hooray! :)
61236       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61237       has_space=`$ECHO "$path" | $GREP " "`
61238       if test "x$has_space" != x; then
61239         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61240 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61241         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61242       fi
61243 
61244       # Use eval to expand a potential ~
61245       eval path="$path"
61246       if test ! -f "$path" && test ! -d "$path"; then
61247         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61248       fi
61249 
61250       if test -d "$path"; then
61251         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61252       else
61253         dir="`$DIRNAME "$path"`"
61254         base="`$BASENAME "$path"`"
61255         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61256       fi
61257     fi
61258   fi
61259 
61260 
61261   # Only process if variable expands to non-empty
61262 
61263   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61264     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61265 
61266   # Input might be given as Windows format, start by converting to
61267   # unix format.
61268   path="$POTENTIAL_FREETYPE_LIB_PATH"
61269   new_path=`$CYGPATH -u "$path"`
61270 
61271   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61272   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61273   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61274   # "foo.exe" is OK but "foo" is an error.
61275   #
61276   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61277   # It is also a way to make sure we got the proper file name for the real test later on.
61278   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61279   if test "x$test_shortpath" = x; then
61280     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61281 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61282     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61283   fi
61284 
61285   # Call helper function which possibly converts this using DOS-style short mode.
61286   # If so, the updated path is stored in $new_path.
61287 
61288   input_path="$new_path"
61289   # Check if we need to convert this using DOS-style short mode. If the path
61290   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61291   # take no chances and rewrite it.
61292   # Note: m4 eats our [], so we need to use [ and ] instead.
61293   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61294   if test "x$has_forbidden_chars" != x; then
61295     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61296     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61297     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61298     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61299       # Going to short mode and back again did indeed matter. Since short mode is
61300       # case insensitive, let's make it lowercase to improve readability.
61301       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61302       # Now convert it back to Unix-style (cygpath)
61303       input_path=`$CYGPATH -u "$shortmode_path"`
61304       new_path="$input_path"
61305     fi
61306   fi
61307 
61308   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61309   if test "x$test_cygdrive_prefix" = x; then
61310     # As a simple fix, exclude /usr/bin since it's not a real path.
61311     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61312       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61313       # a path prefixed by /cygdrive for fixpath to work.
61314       new_path="$CYGWIN_ROOT_PATH$input_path"
61315     fi
61316   fi
61317 
61318 
61319   if test "x$path" != "x$new_path"; then
61320     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61321     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61322 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61323   fi
61324 
61325     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61326 
61327   path="$POTENTIAL_FREETYPE_LIB_PATH"
61328   has_colon=`$ECHO $path | $GREP ^.:`
61329   new_path="$path"
61330   if test "x$has_colon" = x; then
61331     # Not in mixed or Windows style, start by that.
61332     new_path=`cmd //c echo $path`
61333   fi
61334 
61335 
61336   input_path="$new_path"
61337   # Check if we need to convert this using DOS-style short mode. If the path
61338   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61339   # take no chances and rewrite it.
61340   # Note: m4 eats our [], so we need to use [ and ] instead.
61341   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61342   if test "x$has_forbidden_chars" != x; then
61343     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61344     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61345   fi
61346 
61347 
61348   windows_path="$new_path"
61349   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61350     unix_path=`$CYGPATH -u "$windows_path"`
61351     new_path="$unix_path"
61352   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61353     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61354     new_path="$unix_path"
61355   fi
61356 
61357   if test "x$path" != "x$new_path"; then
61358     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61359     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61360 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61361   fi
61362 
61363   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61364   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61365 
61366     else
61367       # We're on a unix platform. Hooray! :)
61368       path="$POTENTIAL_FREETYPE_LIB_PATH"
61369       has_space=`$ECHO "$path" | $GREP " "`
61370       if test "x$has_space" != x; then
61371         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61372 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61373         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61374       fi
61375 
61376       # Use eval to expand a potential ~
61377       eval path="$path"
61378       if test ! -f "$path" && test ! -d "$path"; then
61379         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61380       fi
61381 
61382       if test -d "$path"; then
61383         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61384       else
61385         dir="`$DIRNAME "$path"`"
61386         base="`$BASENAME "$path"`"
61387         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61388       fi
61389     fi
61390   fi
61391 
61392 
61393     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61394     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61395 $as_echo_n "checking for freetype includes... " >&6; }
61396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61397 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61398     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61399     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61400 $as_echo_n "checking for freetype libraries... " >&6; }
61401     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61402 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61403   fi
61404 
61405 
61406           if test "x$FOUND_FREETYPE" != xyes; then
61407             FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61408 
61409   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61410   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61411   METHOD="well-known location"
61412 
61413   # Let's start with an optimistic view of the world :-)
61414   FOUND_FREETYPE=yes
61415 
61416   # First look for the canonical freetype main include file ft2build.h.
61417   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61418     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61419     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61420     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61421       # Fail.
61422       FOUND_FREETYPE=no
61423     fi
61424   fi
61425 
61426   if test "x$FOUND_FREETYPE" = xyes; then
61427     # Include file found, let's continue the sanity check.
61428     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61429 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61430 
61431     # Reset to default value
61432     FREETYPE_BASE_NAME=freetype
61433     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61434     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61435       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61436           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61437         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61438         # for the .6 version explicitly.
61439         FREETYPE_BASE_NAME=freetype.6
61440         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61441         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61442 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61443       else
61444         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61445 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61446         FOUND_FREETYPE=no
61447       fi
61448     else
61449       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61450         # On Windows, we will need both .lib and .dll file.
61451         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61452           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61453 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61454           FOUND_FREETYPE=no
61455         fi
61456       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61457           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61458         # Found lib in isa dir, use that instead.
61459         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61460         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61461 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61462       fi
61463     fi
61464   fi
61465 
61466   if test "x$FOUND_FREETYPE" = xyes; then
61467 
61468   # Only process if variable expands to non-empty
61469 
61470   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61471     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61472 
61473   # Input might be given as Windows format, start by converting to
61474   # unix format.
61475   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61476   new_path=`$CYGPATH -u "$path"`
61477 
61478   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61479   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61480   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61481   # "foo.exe" is OK but "foo" is an error.
61482   #
61483   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61484   # It is also a way to make sure we got the proper file name for the real test later on.
61485   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61486   if test "x$test_shortpath" = x; then
61487     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61488 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61489     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61490   fi
61491 
61492   # Call helper function which possibly converts this using DOS-style short mode.
61493   # If so, the updated path is stored in $new_path.
61494 
61495   input_path="$new_path"
61496   # Check if we need to convert this using DOS-style short mode. If the path
61497   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61498   # take no chances and rewrite it.
61499   # Note: m4 eats our [], so we need to use [ and ] instead.
61500   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61501   if test "x$has_forbidden_chars" != x; then
61502     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61503     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61504     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61505     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61506       # Going to short mode and back again did indeed matter. Since short mode is
61507       # case insensitive, let's make it lowercase to improve readability.
61508       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61509       # Now convert it back to Unix-style (cygpath)
61510       input_path=`$CYGPATH -u "$shortmode_path"`
61511       new_path="$input_path"
61512     fi
61513   fi
61514 
61515   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61516   if test "x$test_cygdrive_prefix" = x; then
61517     # As a simple fix, exclude /usr/bin since it's not a real path.
61518     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61519       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61520       # a path prefixed by /cygdrive for fixpath to work.
61521       new_path="$CYGWIN_ROOT_PATH$input_path"
61522     fi
61523   fi
61524 
61525 
61526   if test "x$path" != "x$new_path"; then
61527     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61528     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61529 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61530   fi
61531 
61532     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61533 
61534   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61535   has_colon=`$ECHO $path | $GREP ^.:`
61536   new_path="$path"
61537   if test "x$has_colon" = x; then
61538     # Not in mixed or Windows style, start by that.
61539     new_path=`cmd //c echo $path`
61540   fi
61541 
61542 
61543   input_path="$new_path"
61544   # Check if we need to convert this using DOS-style short mode. If the path
61545   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61546   # take no chances and rewrite it.
61547   # Note: m4 eats our [], so we need to use [ and ] instead.
61548   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61549   if test "x$has_forbidden_chars" != x; then
61550     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61551     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61552   fi
61553 
61554 
61555   windows_path="$new_path"
61556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61557     unix_path=`$CYGPATH -u "$windows_path"`
61558     new_path="$unix_path"
61559   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61560     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61561     new_path="$unix_path"
61562   fi
61563 
61564   if test "x$path" != "x$new_path"; then
61565     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61566     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61567 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61568   fi
61569 
61570   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61571   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61572 
61573     else
61574       # We're on a unix platform. Hooray! :)
61575       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61576       has_space=`$ECHO "$path" | $GREP " "`
61577       if test "x$has_space" != x; then
61578         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61579 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61580         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61581       fi
61582 
61583       # Use eval to expand a potential ~
61584       eval path="$path"
61585       if test ! -f "$path" && test ! -d "$path"; then
61586         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61587       fi
61588 
61589       if test -d "$path"; then
61590         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61591       else
61592         dir="`$DIRNAME "$path"`"
61593         base="`$BASENAME "$path"`"
61594         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61595       fi
61596     fi
61597   fi
61598 
61599 
61600   # Only process if variable expands to non-empty
61601 
61602   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61603     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61604 
61605   # Input might be given as Windows format, start by converting to
61606   # unix format.
61607   path="$POTENTIAL_FREETYPE_LIB_PATH"
61608   new_path=`$CYGPATH -u "$path"`
61609 
61610   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61611   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61612   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61613   # "foo.exe" is OK but "foo" is an error.
61614   #
61615   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61616   # It is also a way to make sure we got the proper file name for the real test later on.
61617   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61618   if test "x$test_shortpath" = x; then
61619     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61620 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61621     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61622   fi
61623 
61624   # Call helper function which possibly converts this using DOS-style short mode.
61625   # If so, the updated path is stored in $new_path.
61626 
61627   input_path="$new_path"
61628   # Check if we need to convert this using DOS-style short mode. If the path
61629   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61630   # take no chances and rewrite it.
61631   # Note: m4 eats our [], so we need to use [ and ] instead.
61632   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61633   if test "x$has_forbidden_chars" != x; then
61634     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61635     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61636     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61637     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61638       # Going to short mode and back again did indeed matter. Since short mode is
61639       # case insensitive, let's make it lowercase to improve readability.
61640       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61641       # Now convert it back to Unix-style (cygpath)
61642       input_path=`$CYGPATH -u "$shortmode_path"`
61643       new_path="$input_path"
61644     fi
61645   fi
61646 
61647   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61648   if test "x$test_cygdrive_prefix" = x; then
61649     # As a simple fix, exclude /usr/bin since it's not a real path.
61650     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61651       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61652       # a path prefixed by /cygdrive for fixpath to work.
61653       new_path="$CYGWIN_ROOT_PATH$input_path"
61654     fi
61655   fi
61656 
61657 
61658   if test "x$path" != "x$new_path"; then
61659     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61660     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61661 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61662   fi
61663 
61664     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61665 
61666   path="$POTENTIAL_FREETYPE_LIB_PATH"
61667   has_colon=`$ECHO $path | $GREP ^.:`
61668   new_path="$path"
61669   if test "x$has_colon" = x; then
61670     # Not in mixed or Windows style, start by that.
61671     new_path=`cmd //c echo $path`
61672   fi
61673 
61674 
61675   input_path="$new_path"
61676   # Check if we need to convert this using DOS-style short mode. If the path
61677   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61678   # take no chances and rewrite it.
61679   # Note: m4 eats our [], so we need to use [ and ] instead.
61680   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61681   if test "x$has_forbidden_chars" != x; then
61682     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61683     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61684   fi
61685 
61686 
61687   windows_path="$new_path"
61688   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61689     unix_path=`$CYGPATH -u "$windows_path"`
61690     new_path="$unix_path"
61691   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61692     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61693     new_path="$unix_path"
61694   fi
61695 
61696   if test "x$path" != "x$new_path"; then
61697     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61698     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61699 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61700   fi
61701 
61702   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61703   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61704 
61705     else
61706       # We're on a unix platform. Hooray! :)
61707       path="$POTENTIAL_FREETYPE_LIB_PATH"
61708       has_space=`$ECHO "$path" | $GREP " "`
61709       if test "x$has_space" != x; then
61710         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61711 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61712         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61713       fi
61714 
61715       # Use eval to expand a potential ~
61716       eval path="$path"
61717       if test ! -f "$path" && test ! -d "$path"; then
61718         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61719       fi
61720 
61721       if test -d "$path"; then
61722         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61723       else
61724         dir="`$DIRNAME "$path"`"
61725         base="`$BASENAME "$path"`"
61726         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61727       fi
61728     fi
61729   fi
61730 
61731 
61732     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61733     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61734 $as_echo_n "checking for freetype includes... " >&6; }
61735     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61736 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61737     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61738     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61739 $as_echo_n "checking for freetype libraries... " >&6; }
61740     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61741 $as_echo "$FREETYPE_LIB_PATH" >&6; }
61742   fi
61743 
61744           fi
61745           if test "x$FOUND_FREETYPE" != xyes; then
61746             FREETYPE_BASE_DIR="$SYSROOT/usr/local"
61747 
61748   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61749   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61750   METHOD="well-known location"
61751 
61752   # Let's start with an optimistic view of the world :-)
61753   FOUND_FREETYPE=yes
61754 
61755   # First look for the canonical freetype main include file ft2build.h.
61756   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61757     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61758     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61759     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61760       # Fail.
61761       FOUND_FREETYPE=no
61762     fi
61763   fi
61764 
61765   if test "x$FOUND_FREETYPE" = xyes; then
61766     # Include file found, let's continue the sanity check.
61767     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61768 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61769 
61770     # Reset to default value
61771     FREETYPE_BASE_NAME=freetype
61772     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61773     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61774       if test "x$OPENJDK_TARGET_OS" = xmacosx \
61775           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61776         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61777         # for the .6 version explicitly.
61778         FREETYPE_BASE_NAME=freetype.6
61779         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61780         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61781 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61782       else
61783         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61784 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61785         FOUND_FREETYPE=no
61786       fi
61787     else
61788       if test "x$OPENJDK_TARGET_OS" = xwindows; then
61789         # On Windows, we will need both .lib and .dll file.
61790         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61791           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61792 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61793           FOUND_FREETYPE=no
61794         fi
61795       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61796           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61797         # Found lib in isa dir, use that instead.
61798         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61799         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61800 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61801       fi
61802     fi
61803   fi
61804 
61805   if test "x$FOUND_FREETYPE" = xyes; then
61806 
61807   # Only process if variable expands to non-empty
61808 
61809   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61810     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61811 
61812   # Input might be given as Windows format, start by converting to
61813   # unix format.
61814   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61815   new_path=`$CYGPATH -u "$path"`
61816 
61817   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61818   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61819   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61820   # "foo.exe" is OK but "foo" is an error.
61821   #
61822   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61823   # It is also a way to make sure we got the proper file name for the real test later on.
61824   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61825   if test "x$test_shortpath" = x; then
61826     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61827 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61828     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61829   fi
61830 
61831   # Call helper function which possibly converts this using DOS-style short mode.
61832   # If so, the updated path is stored in $new_path.
61833 
61834   input_path="$new_path"
61835   # Check if we need to convert this using DOS-style short mode. If the path
61836   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61837   # take no chances and rewrite it.
61838   # Note: m4 eats our [], so we need to use [ and ] instead.
61839   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61840   if test "x$has_forbidden_chars" != x; then
61841     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61842     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61843     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61844     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61845       # Going to short mode and back again did indeed matter. Since short mode is
61846       # case insensitive, let's make it lowercase to improve readability.
61847       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61848       # Now convert it back to Unix-style (cygpath)
61849       input_path=`$CYGPATH -u "$shortmode_path"`
61850       new_path="$input_path"
61851     fi
61852   fi
61853 
61854   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61855   if test "x$test_cygdrive_prefix" = x; then
61856     # As a simple fix, exclude /usr/bin since it's not a real path.
61857     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61858       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61859       # a path prefixed by /cygdrive for fixpath to work.
61860       new_path="$CYGWIN_ROOT_PATH$input_path"
61861     fi
61862   fi
61863 
61864 
61865   if test "x$path" != "x$new_path"; then
61866     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61867     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61868 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61869   fi
61870 
61871     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61872 
61873   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61874   has_colon=`$ECHO $path | $GREP ^.:`
61875   new_path="$path"
61876   if test "x$has_colon" = x; then
61877     # Not in mixed or Windows style, start by that.
61878     new_path=`cmd //c echo $path`
61879   fi
61880 
61881 
61882   input_path="$new_path"
61883   # Check if we need to convert this using DOS-style short mode. If the path
61884   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61885   # take no chances and rewrite it.
61886   # Note: m4 eats our [], so we need to use [ and ] instead.
61887   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61888   if test "x$has_forbidden_chars" != x; then
61889     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61890     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61891   fi
61892 
61893 
61894   windows_path="$new_path"
61895   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61896     unix_path=`$CYGPATH -u "$windows_path"`
61897     new_path="$unix_path"
61898   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61899     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61900     new_path="$unix_path"
61901   fi
61902 
61903   if test "x$path" != "x$new_path"; then
61904     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61905     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61906 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61907   fi
61908 
61909   # Save the first 10 bytes of this path to the storage, so fixpath can work.
61910   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61911 
61912     else
61913       # We're on a unix platform. Hooray! :)
61914       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61915       has_space=`$ECHO "$path" | $GREP " "`
61916       if test "x$has_space" != x; then
61917         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61918 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61919         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61920       fi
61921 
61922       # Use eval to expand a potential ~
61923       eval path="$path"
61924       if test ! -f "$path" && test ! -d "$path"; then
61925         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61926       fi
61927 
61928       if test -d "$path"; then
61929         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61930       else
61931         dir="`$DIRNAME "$path"`"
61932         base="`$BASENAME "$path"`"
61933         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61934       fi
61935     fi
61936   fi
61937 
61938 
61939   # Only process if variable expands to non-empty
61940 
61941   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61942     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61943 
61944   # Input might be given as Windows format, start by converting to
61945   # unix format.
61946   path="$POTENTIAL_FREETYPE_LIB_PATH"
61947   new_path=`$CYGPATH -u "$path"`
61948 
61949   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61950   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61951   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61952   # "foo.exe" is OK but "foo" is an error.
61953   #
61954   # This test is therefore slightly more accurate than "test -f" to check for file precense.
61955   # It is also a way to make sure we got the proper file name for the real test later on.
61956   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61957   if test "x$test_shortpath" = x; then
61958     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61959 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61960     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61961   fi
61962 
61963   # Call helper function which possibly converts this using DOS-style short mode.
61964   # If so, the updated path is stored in $new_path.
61965 
61966   input_path="$new_path"
61967   # Check if we need to convert this using DOS-style short mode. If the path
61968   # contains just simple characters, use it. Otherwise (spaces, weird characters),
61969   # take no chances and rewrite it.
61970   # Note: m4 eats our [], so we need to use [ and ] instead.
61971   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61972   if test "x$has_forbidden_chars" != x; then
61973     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61974     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61975     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61976     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61977       # Going to short mode and back again did indeed matter. Since short mode is
61978       # case insensitive, let's make it lowercase to improve readability.
61979       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61980       # Now convert it back to Unix-style (cygpath)
61981       input_path=`$CYGPATH -u "$shortmode_path"`
61982       new_path="$input_path"
61983     fi
61984   fi
61985 
61986   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61987   if test "x$test_cygdrive_prefix" = x; then
61988     # As a simple fix, exclude /usr/bin since it's not a real path.
61989     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61990       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61991       # a path prefixed by /cygdrive for fixpath to work.
61992       new_path="$CYGWIN_ROOT_PATH$input_path"
61993     fi
61994   fi
61995 
61996 
61997   if test "x$path" != "x$new_path"; then
61998     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61999     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62000 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62001   fi
62002 
62003     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62004 
62005   path="$POTENTIAL_FREETYPE_LIB_PATH"
62006   has_colon=`$ECHO $path | $GREP ^.:`
62007   new_path="$path"
62008   if test "x$has_colon" = x; then
62009     # Not in mixed or Windows style, start by that.
62010     new_path=`cmd //c echo $path`
62011   fi
62012 
62013 
62014   input_path="$new_path"
62015   # Check if we need to convert this using DOS-style short mode. If the path
62016   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62017   # take no chances and rewrite it.
62018   # Note: m4 eats our [], so we need to use [ and ] instead.
62019   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62020   if test "x$has_forbidden_chars" != x; then
62021     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62022     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62023   fi
62024 
62025 
62026   windows_path="$new_path"
62027   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62028     unix_path=`$CYGPATH -u "$windows_path"`
62029     new_path="$unix_path"
62030   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62031     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62032     new_path="$unix_path"
62033   fi
62034 
62035   if test "x$path" != "x$new_path"; then
62036     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62037     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62038 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62039   fi
62040 
62041   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62042   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62043 
62044     else
62045       # We're on a unix platform. Hooray! :)
62046       path="$POTENTIAL_FREETYPE_LIB_PATH"
62047       has_space=`$ECHO "$path" | $GREP " "`
62048       if test "x$has_space" != x; then
62049         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62050 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62051         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62052       fi
62053 
62054       # Use eval to expand a potential ~
62055       eval path="$path"
62056       if test ! -f "$path" && test ! -d "$path"; then
62057         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62058       fi
62059 
62060       if test -d "$path"; then
62061         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62062       else
62063         dir="`$DIRNAME "$path"`"
62064         base="`$BASENAME "$path"`"
62065         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62066       fi
62067     fi
62068   fi
62069 
62070 
62071     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62072     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62073 $as_echo_n "checking for freetype includes... " >&6; }
62074     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62075 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62076     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62077     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62078 $as_echo_n "checking for freetype libraries... " >&6; }
62079     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62080 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62081   fi
62082 
62083           fi
62084 
62085           if test "x$OPENJDK_TARGET_OS" = xmacosx; then
62086             if test "x$FOUND_FREETYPE" != xyes; then
62087               # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
62088               FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
62089 
62090   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62091   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
62092   METHOD="well-known location"
62093 
62094   # Let's start with an optimistic view of the world :-)
62095   FOUND_FREETYPE=yes
62096 
62097   # First look for the canonical freetype main include file ft2build.h.
62098   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62099     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62100     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62101     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62102       # Fail.
62103       FOUND_FREETYPE=no
62104     fi
62105   fi
62106 
62107   if test "x$FOUND_FREETYPE" = xyes; then
62108     # Include file found, let's continue the sanity check.
62109     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62110 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62111 
62112     # Reset to default value
62113     FREETYPE_BASE_NAME=freetype
62114     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62115     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62116       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62117           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62118         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62119         # for the .6 version explicitly.
62120         FREETYPE_BASE_NAME=freetype.6
62121         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62122         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62123 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62124       else
62125         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62126 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62127         FOUND_FREETYPE=no
62128       fi
62129     else
62130       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62131         # On Windows, we will need both .lib and .dll file.
62132         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62133           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62134 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62135           FOUND_FREETYPE=no
62136         fi
62137       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62138           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62139         # Found lib in isa dir, use that instead.
62140         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62141         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62142 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62143       fi
62144     fi
62145   fi
62146 
62147   if test "x$FOUND_FREETYPE" = xyes; then
62148 
62149   # Only process if variable expands to non-empty
62150 
62151   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62152     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62153 
62154   # Input might be given as Windows format, start by converting to
62155   # unix format.
62156   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62157   new_path=`$CYGPATH -u "$path"`
62158 
62159   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62160   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62161   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62162   # "foo.exe" is OK but "foo" is an error.
62163   #
62164   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62165   # It is also a way to make sure we got the proper file name for the real test later on.
62166   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62167   if test "x$test_shortpath" = x; then
62168     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62169 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62170     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62171   fi
62172 
62173   # Call helper function which possibly converts this using DOS-style short mode.
62174   # If so, the updated path is stored in $new_path.
62175 
62176   input_path="$new_path"
62177   # Check if we need to convert this using DOS-style short mode. If the path
62178   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62179   # take no chances and rewrite it.
62180   # Note: m4 eats our [], so we need to use [ and ] instead.
62181   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62182   if test "x$has_forbidden_chars" != x; then
62183     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62184     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62185     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62186     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62187       # Going to short mode and back again did indeed matter. Since short mode is
62188       # case insensitive, let's make it lowercase to improve readability.
62189       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62190       # Now convert it back to Unix-style (cygpath)
62191       input_path=`$CYGPATH -u "$shortmode_path"`
62192       new_path="$input_path"
62193     fi
62194   fi
62195 
62196   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62197   if test "x$test_cygdrive_prefix" = x; then
62198     # As a simple fix, exclude /usr/bin since it's not a real path.
62199     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62200       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62201       # a path prefixed by /cygdrive for fixpath to work.
62202       new_path="$CYGWIN_ROOT_PATH$input_path"
62203     fi
62204   fi
62205 
62206 
62207   if test "x$path" != "x$new_path"; then
62208     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62209     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62210 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62211   fi
62212 
62213     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62214 
62215   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62216   has_colon=`$ECHO $path | $GREP ^.:`
62217   new_path="$path"
62218   if test "x$has_colon" = x; then
62219     # Not in mixed or Windows style, start by that.
62220     new_path=`cmd //c echo $path`
62221   fi
62222 
62223 
62224   input_path="$new_path"
62225   # Check if we need to convert this using DOS-style short mode. If the path
62226   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62227   # take no chances and rewrite it.
62228   # Note: m4 eats our [], so we need to use [ and ] instead.
62229   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62230   if test "x$has_forbidden_chars" != x; then
62231     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62232     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62233   fi
62234 
62235 
62236   windows_path="$new_path"
62237   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62238     unix_path=`$CYGPATH -u "$windows_path"`
62239     new_path="$unix_path"
62240   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62241     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62242     new_path="$unix_path"
62243   fi
62244 
62245   if test "x$path" != "x$new_path"; then
62246     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62247     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62248 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62249   fi
62250 
62251   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62252   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62253 
62254     else
62255       # We're on a unix platform. Hooray! :)
62256       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62257       has_space=`$ECHO "$path" | $GREP " "`
62258       if test "x$has_space" != x; then
62259         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62260 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62261         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62262       fi
62263 
62264       # Use eval to expand a potential ~
62265       eval path="$path"
62266       if test ! -f "$path" && test ! -d "$path"; then
62267         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62268       fi
62269 
62270       if test -d "$path"; then
62271         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62272       else
62273         dir="`$DIRNAME "$path"`"
62274         base="`$BASENAME "$path"`"
62275         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62276       fi
62277     fi
62278   fi
62279 
62280 
62281   # Only process if variable expands to non-empty
62282 
62283   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62284     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62285 
62286   # Input might be given as Windows format, start by converting to
62287   # unix format.
62288   path="$POTENTIAL_FREETYPE_LIB_PATH"
62289   new_path=`$CYGPATH -u "$path"`
62290 
62291   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62292   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62293   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62294   # "foo.exe" is OK but "foo" is an error.
62295   #
62296   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62297   # It is also a way to make sure we got the proper file name for the real test later on.
62298   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62299   if test "x$test_shortpath" = x; then
62300     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62301 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62302     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62303   fi
62304 
62305   # Call helper function which possibly converts this using DOS-style short mode.
62306   # If so, the updated path is stored in $new_path.
62307 
62308   input_path="$new_path"
62309   # Check if we need to convert this using DOS-style short mode. If the path
62310   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62311   # take no chances and rewrite it.
62312   # Note: m4 eats our [], so we need to use [ and ] instead.
62313   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62314   if test "x$has_forbidden_chars" != x; then
62315     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62316     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62317     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62318     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62319       # Going to short mode and back again did indeed matter. Since short mode is
62320       # case insensitive, let's make it lowercase to improve readability.
62321       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62322       # Now convert it back to Unix-style (cygpath)
62323       input_path=`$CYGPATH -u "$shortmode_path"`
62324       new_path="$input_path"
62325     fi
62326   fi
62327 
62328   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62329   if test "x$test_cygdrive_prefix" = x; then
62330     # As a simple fix, exclude /usr/bin since it's not a real path.
62331     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62332       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62333       # a path prefixed by /cygdrive for fixpath to work.
62334       new_path="$CYGWIN_ROOT_PATH$input_path"
62335     fi
62336   fi
62337 
62338 
62339   if test "x$path" != "x$new_path"; then
62340     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62341     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62342 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62343   fi
62344 
62345     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62346 
62347   path="$POTENTIAL_FREETYPE_LIB_PATH"
62348   has_colon=`$ECHO $path | $GREP ^.:`
62349   new_path="$path"
62350   if test "x$has_colon" = x; then
62351     # Not in mixed or Windows style, start by that.
62352     new_path=`cmd //c echo $path`
62353   fi
62354 
62355 
62356   input_path="$new_path"
62357   # Check if we need to convert this using DOS-style short mode. If the path
62358   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62359   # take no chances and rewrite it.
62360   # Note: m4 eats our [], so we need to use [ and ] instead.
62361   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62362   if test "x$has_forbidden_chars" != x; then
62363     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62364     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62365   fi
62366 
62367 
62368   windows_path="$new_path"
62369   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62370     unix_path=`$CYGPATH -u "$windows_path"`
62371     new_path="$unix_path"
62372   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62373     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62374     new_path="$unix_path"
62375   fi
62376 
62377   if test "x$path" != "x$new_path"; then
62378     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62379     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62380 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62381   fi
62382 
62383   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62384   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62385 
62386     else
62387       # We're on a unix platform. Hooray! :)
62388       path="$POTENTIAL_FREETYPE_LIB_PATH"
62389       has_space=`$ECHO "$path" | $GREP " "`
62390       if test "x$has_space" != x; then
62391         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62392 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62393         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62394       fi
62395 
62396       # Use eval to expand a potential ~
62397       eval path="$path"
62398       if test ! -f "$path" && test ! -d "$path"; then
62399         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62400       fi
62401 
62402       if test -d "$path"; then
62403         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62404       else
62405         dir="`$DIRNAME "$path"`"
62406         base="`$BASENAME "$path"`"
62407         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62408       fi
62409     fi
62410   fi
62411 
62412 
62413     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62414     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62415 $as_echo_n "checking for freetype includes... " >&6; }
62416     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62417 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62418     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62419     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62420 $as_echo_n "checking for freetype libraries... " >&6; }
62421     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62422 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62423   fi
62424 
62425             fi
62426           fi
62427 
62428           if test "x$FOUND_FREETYPE" != xyes; then
62429             FREETYPE_BASE_DIR="$SYSROOT/usr"
62430             if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62431 
62432   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62433   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62434   METHOD="well-known location"
62435 
62436   # Let's start with an optimistic view of the world :-)
62437   FOUND_FREETYPE=yes
62438 
62439   # First look for the canonical freetype main include file ft2build.h.
62440   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62441     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62442     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62443     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62444       # Fail.
62445       FOUND_FREETYPE=no
62446     fi
62447   fi
62448 
62449   if test "x$FOUND_FREETYPE" = xyes; then
62450     # Include file found, let's continue the sanity check.
62451     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62452 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62453 
62454     # Reset to default value
62455     FREETYPE_BASE_NAME=freetype
62456     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62457     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62458       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62459           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62460         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62461         # for the .6 version explicitly.
62462         FREETYPE_BASE_NAME=freetype.6
62463         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62464         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62465 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62466       else
62467         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62468 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62469         FOUND_FREETYPE=no
62470       fi
62471     else
62472       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62473         # On Windows, we will need both .lib and .dll file.
62474         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62475           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62476 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62477           FOUND_FREETYPE=no
62478         fi
62479       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62480           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62481         # Found lib in isa dir, use that instead.
62482         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62483         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62484 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62485       fi
62486     fi
62487   fi
62488 
62489   if test "x$FOUND_FREETYPE" = xyes; then
62490 
62491   # Only process if variable expands to non-empty
62492 
62493   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62494     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62495 
62496   # Input might be given as Windows format, start by converting to
62497   # unix format.
62498   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62499   new_path=`$CYGPATH -u "$path"`
62500 
62501   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62502   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62503   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62504   # "foo.exe" is OK but "foo" is an error.
62505   #
62506   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62507   # It is also a way to make sure we got the proper file name for the real test later on.
62508   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62509   if test "x$test_shortpath" = x; then
62510     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62511 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62512     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62513   fi
62514 
62515   # Call helper function which possibly converts this using DOS-style short mode.
62516   # If so, the updated path is stored in $new_path.
62517 
62518   input_path="$new_path"
62519   # Check if we need to convert this using DOS-style short mode. If the path
62520   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62521   # take no chances and rewrite it.
62522   # Note: m4 eats our [], so we need to use [ and ] instead.
62523   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62524   if test "x$has_forbidden_chars" != x; then
62525     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62526     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62527     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62528     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62529       # Going to short mode and back again did indeed matter. Since short mode is
62530       # case insensitive, let's make it lowercase to improve readability.
62531       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62532       # Now convert it back to Unix-style (cygpath)
62533       input_path=`$CYGPATH -u "$shortmode_path"`
62534       new_path="$input_path"
62535     fi
62536   fi
62537 
62538   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62539   if test "x$test_cygdrive_prefix" = x; then
62540     # As a simple fix, exclude /usr/bin since it's not a real path.
62541     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62542       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62543       # a path prefixed by /cygdrive for fixpath to work.
62544       new_path="$CYGWIN_ROOT_PATH$input_path"
62545     fi
62546   fi
62547 
62548 
62549   if test "x$path" != "x$new_path"; then
62550     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62551     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62552 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62553   fi
62554 
62555     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62556 
62557   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62558   has_colon=`$ECHO $path | $GREP ^.:`
62559   new_path="$path"
62560   if test "x$has_colon" = x; then
62561     # Not in mixed or Windows style, start by that.
62562     new_path=`cmd //c echo $path`
62563   fi
62564 
62565 
62566   input_path="$new_path"
62567   # Check if we need to convert this using DOS-style short mode. If the path
62568   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62569   # take no chances and rewrite it.
62570   # Note: m4 eats our [], so we need to use [ and ] instead.
62571   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62572   if test "x$has_forbidden_chars" != x; then
62573     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62574     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62575   fi
62576 
62577 
62578   windows_path="$new_path"
62579   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62580     unix_path=`$CYGPATH -u "$windows_path"`
62581     new_path="$unix_path"
62582   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62583     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62584     new_path="$unix_path"
62585   fi
62586 
62587   if test "x$path" != "x$new_path"; then
62588     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62589     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62590 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62591   fi
62592 
62593   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62594   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62595 
62596     else
62597       # We're on a unix platform. Hooray! :)
62598       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62599       has_space=`$ECHO "$path" | $GREP " "`
62600       if test "x$has_space" != x; then
62601         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62602 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62603         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62604       fi
62605 
62606       # Use eval to expand a potential ~
62607       eval path="$path"
62608       if test ! -f "$path" && test ! -d "$path"; then
62609         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62610       fi
62611 
62612       if test -d "$path"; then
62613         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62614       else
62615         dir="`$DIRNAME "$path"`"
62616         base="`$BASENAME "$path"`"
62617         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62618       fi
62619     fi
62620   fi
62621 
62622 
62623   # Only process if variable expands to non-empty
62624 
62625   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62626     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62627 
62628   # Input might be given as Windows format, start by converting to
62629   # unix format.
62630   path="$POTENTIAL_FREETYPE_LIB_PATH"
62631   new_path=`$CYGPATH -u "$path"`
62632 
62633   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62634   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62635   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62636   # "foo.exe" is OK but "foo" is an error.
62637   #
62638   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62639   # It is also a way to make sure we got the proper file name for the real test later on.
62640   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62641   if test "x$test_shortpath" = x; then
62642     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62643 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62644     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62645   fi
62646 
62647   # Call helper function which possibly converts this using DOS-style short mode.
62648   # If so, the updated path is stored in $new_path.
62649 
62650   input_path="$new_path"
62651   # Check if we need to convert this using DOS-style short mode. If the path
62652   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62653   # take no chances and rewrite it.
62654   # Note: m4 eats our [], so we need to use [ and ] instead.
62655   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62656   if test "x$has_forbidden_chars" != x; then
62657     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62658     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62659     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62660     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62661       # Going to short mode and back again did indeed matter. Since short mode is
62662       # case insensitive, let's make it lowercase to improve readability.
62663       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62664       # Now convert it back to Unix-style (cygpath)
62665       input_path=`$CYGPATH -u "$shortmode_path"`
62666       new_path="$input_path"
62667     fi
62668   fi
62669 
62670   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62671   if test "x$test_cygdrive_prefix" = x; then
62672     # As a simple fix, exclude /usr/bin since it's not a real path.
62673     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62674       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62675       # a path prefixed by /cygdrive for fixpath to work.
62676       new_path="$CYGWIN_ROOT_PATH$input_path"
62677     fi
62678   fi
62679 
62680 
62681   if test "x$path" != "x$new_path"; then
62682     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62683     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62684 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62685   fi
62686 
62687     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62688 
62689   path="$POTENTIAL_FREETYPE_LIB_PATH"
62690   has_colon=`$ECHO $path | $GREP ^.:`
62691   new_path="$path"
62692   if test "x$has_colon" = x; then
62693     # Not in mixed or Windows style, start by that.
62694     new_path=`cmd //c echo $path`
62695   fi
62696 
62697 
62698   input_path="$new_path"
62699   # Check if we need to convert this using DOS-style short mode. If the path
62700   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62701   # take no chances and rewrite it.
62702   # Note: m4 eats our [], so we need to use [ and ] instead.
62703   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62704   if test "x$has_forbidden_chars" != x; then
62705     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62706     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62707   fi
62708 
62709 
62710   windows_path="$new_path"
62711   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62712     unix_path=`$CYGPATH -u "$windows_path"`
62713     new_path="$unix_path"
62714   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62715     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62716     new_path="$unix_path"
62717   fi
62718 
62719   if test "x$path" != "x$new_path"; then
62720     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62721     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62722 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62723   fi
62724 
62725   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62726   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62727 
62728     else
62729       # We're on a unix platform. Hooray! :)
62730       path="$POTENTIAL_FREETYPE_LIB_PATH"
62731       has_space=`$ECHO "$path" | $GREP " "`
62732       if test "x$has_space" != x; then
62733         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62734 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62735         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62736       fi
62737 
62738       # Use eval to expand a potential ~
62739       eval path="$path"
62740       if test ! -f "$path" && test ! -d "$path"; then
62741         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62742       fi
62743 
62744       if test -d "$path"; then
62745         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62746       else
62747         dir="`$DIRNAME "$path"`"
62748         base="`$BASENAME "$path"`"
62749         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62750       fi
62751     fi
62752   fi
62753 
62754 
62755     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62756     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62757 $as_echo_n "checking for freetype includes... " >&6; }
62758     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62759 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62760     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62761     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62762 $as_echo_n "checking for freetype libraries... " >&6; }
62763     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62764 $as_echo "$FREETYPE_LIB_PATH" >&6; }
62765   fi
62766 
62767             else
62768 
62769   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62770   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62771   METHOD="well-known location"
62772 
62773   # Let's start with an optimistic view of the world :-)
62774   FOUND_FREETYPE=yes
62775 
62776   # First look for the canonical freetype main include file ft2build.h.
62777   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62778     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62779     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62780     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62781       # Fail.
62782       FOUND_FREETYPE=no
62783     fi
62784   fi
62785 
62786   if test "x$FOUND_FREETYPE" = xyes; then
62787     # Include file found, let's continue the sanity check.
62788     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62789 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62790 
62791     # Reset to default value
62792     FREETYPE_BASE_NAME=freetype
62793     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62794     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62795       if test "x$OPENJDK_TARGET_OS" = xmacosx \
62796           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62797         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62798         # for the .6 version explicitly.
62799         FREETYPE_BASE_NAME=freetype.6
62800         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62801         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62802 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62803       else
62804         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62805 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62806         FOUND_FREETYPE=no
62807       fi
62808     else
62809       if test "x$OPENJDK_TARGET_OS" = xwindows; then
62810         # On Windows, we will need both .lib and .dll file.
62811         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62812           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62813 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62814           FOUND_FREETYPE=no
62815         fi
62816       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62817           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62818         # Found lib in isa dir, use that instead.
62819         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62820         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62821 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62822       fi
62823     fi
62824   fi
62825 
62826   if test "x$FOUND_FREETYPE" = xyes; then
62827 
62828   # Only process if variable expands to non-empty
62829 
62830   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62831     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62832 
62833   # Input might be given as Windows format, start by converting to
62834   # unix format.
62835   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62836   new_path=`$CYGPATH -u "$path"`
62837 
62838   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62839   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62840   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62841   # "foo.exe" is OK but "foo" is an error.
62842   #
62843   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62844   # It is also a way to make sure we got the proper file name for the real test later on.
62845   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62846   if test "x$test_shortpath" = x; then
62847     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62848 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62849     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62850   fi
62851 
62852   # Call helper function which possibly converts this using DOS-style short mode.
62853   # If so, the updated path is stored in $new_path.
62854 
62855   input_path="$new_path"
62856   # Check if we need to convert this using DOS-style short mode. If the path
62857   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62858   # take no chances and rewrite it.
62859   # Note: m4 eats our [], so we need to use [ and ] instead.
62860   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62861   if test "x$has_forbidden_chars" != x; then
62862     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62863     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62864     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62865     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62866       # Going to short mode and back again did indeed matter. Since short mode is
62867       # case insensitive, let's make it lowercase to improve readability.
62868       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62869       # Now convert it back to Unix-style (cygpath)
62870       input_path=`$CYGPATH -u "$shortmode_path"`
62871       new_path="$input_path"
62872     fi
62873   fi
62874 
62875   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62876   if test "x$test_cygdrive_prefix" = x; then
62877     # As a simple fix, exclude /usr/bin since it's not a real path.
62878     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62879       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62880       # a path prefixed by /cygdrive for fixpath to work.
62881       new_path="$CYGWIN_ROOT_PATH$input_path"
62882     fi
62883   fi
62884 
62885 
62886   if test "x$path" != "x$new_path"; then
62887     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62888     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62889 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62890   fi
62891 
62892     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62893 
62894   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62895   has_colon=`$ECHO $path | $GREP ^.:`
62896   new_path="$path"
62897   if test "x$has_colon" = x; then
62898     # Not in mixed or Windows style, start by that.
62899     new_path=`cmd //c echo $path`
62900   fi
62901 
62902 
62903   input_path="$new_path"
62904   # Check if we need to convert this using DOS-style short mode. If the path
62905   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62906   # take no chances and rewrite it.
62907   # Note: m4 eats our [], so we need to use [ and ] instead.
62908   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62909   if test "x$has_forbidden_chars" != x; then
62910     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62911     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62912   fi
62913 
62914 
62915   windows_path="$new_path"
62916   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62917     unix_path=`$CYGPATH -u "$windows_path"`
62918     new_path="$unix_path"
62919   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62920     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62921     new_path="$unix_path"
62922   fi
62923 
62924   if test "x$path" != "x$new_path"; then
62925     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62926     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62927 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62928   fi
62929 
62930   # Save the first 10 bytes of this path to the storage, so fixpath can work.
62931   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62932 
62933     else
62934       # We're on a unix platform. Hooray! :)
62935       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62936       has_space=`$ECHO "$path" | $GREP " "`
62937       if test "x$has_space" != x; then
62938         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62939 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62940         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62941       fi
62942 
62943       # Use eval to expand a potential ~
62944       eval path="$path"
62945       if test ! -f "$path" && test ! -d "$path"; then
62946         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62947       fi
62948 
62949       if test -d "$path"; then
62950         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62951       else
62952         dir="`$DIRNAME "$path"`"
62953         base="`$BASENAME "$path"`"
62954         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62955       fi
62956     fi
62957   fi
62958 
62959 
62960   # Only process if variable expands to non-empty
62961 
62962   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62963     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62964 
62965   # Input might be given as Windows format, start by converting to
62966   # unix format.
62967   path="$POTENTIAL_FREETYPE_LIB_PATH"
62968   new_path=`$CYGPATH -u "$path"`
62969 
62970   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62971   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62972   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62973   # "foo.exe" is OK but "foo" is an error.
62974   #
62975   # This test is therefore slightly more accurate than "test -f" to check for file precense.
62976   # It is also a way to make sure we got the proper file name for the real test later on.
62977   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62978   if test "x$test_shortpath" = x; then
62979     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62980 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62981     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62982   fi
62983 
62984   # Call helper function which possibly converts this using DOS-style short mode.
62985   # If so, the updated path is stored in $new_path.
62986 
62987   input_path="$new_path"
62988   # Check if we need to convert this using DOS-style short mode. If the path
62989   # contains just simple characters, use it. Otherwise (spaces, weird characters),
62990   # take no chances and rewrite it.
62991   # Note: m4 eats our [], so we need to use [ and ] instead.
62992   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62993   if test "x$has_forbidden_chars" != x; then
62994     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62995     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62996     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62997     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62998       # Going to short mode and back again did indeed matter. Since short mode is
62999       # case insensitive, let's make it lowercase to improve readability.
63000       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63001       # Now convert it back to Unix-style (cygpath)
63002       input_path=`$CYGPATH -u "$shortmode_path"`
63003       new_path="$input_path"
63004     fi
63005   fi
63006 
63007   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63008   if test "x$test_cygdrive_prefix" = x; then
63009     # As a simple fix, exclude /usr/bin since it's not a real path.
63010     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63011       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63012       # a path prefixed by /cygdrive for fixpath to work.
63013       new_path="$CYGWIN_ROOT_PATH$input_path"
63014     fi
63015   fi
63016 
63017 
63018   if test "x$path" != "x$new_path"; then
63019     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63020     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63021 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63022   fi
63023 
63024     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63025 
63026   path="$POTENTIAL_FREETYPE_LIB_PATH"
63027   has_colon=`$ECHO $path | $GREP ^.:`
63028   new_path="$path"
63029   if test "x$has_colon" = x; then
63030     # Not in mixed or Windows style, start by that.
63031     new_path=`cmd //c echo $path`
63032   fi
63033 
63034 
63035   input_path="$new_path"
63036   # Check if we need to convert this using DOS-style short mode. If the path
63037   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63038   # take no chances and rewrite it.
63039   # Note: m4 eats our [], so we need to use [ and ] instead.
63040   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63041   if test "x$has_forbidden_chars" != x; then
63042     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63043     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63044   fi
63045 
63046 
63047   windows_path="$new_path"
63048   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63049     unix_path=`$CYGPATH -u "$windows_path"`
63050     new_path="$unix_path"
63051   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63052     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63053     new_path="$unix_path"
63054   fi
63055 
63056   if test "x$path" != "x$new_path"; then
63057     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63058     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63059 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63060   fi
63061 
63062   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63063   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63064 
63065     else
63066       # We're on a unix platform. Hooray! :)
63067       path="$POTENTIAL_FREETYPE_LIB_PATH"
63068       has_space=`$ECHO "$path" | $GREP " "`
63069       if test "x$has_space" != x; then
63070         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63071 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63072         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63073       fi
63074 
63075       # Use eval to expand a potential ~
63076       eval path="$path"
63077       if test ! -f "$path" && test ! -d "$path"; then
63078         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63079       fi
63080 
63081       if test -d "$path"; then
63082         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63083       else
63084         dir="`$DIRNAME "$path"`"
63085         base="`$BASENAME "$path"`"
63086         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63087       fi
63088     fi
63089   fi
63090 
63091 
63092     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63093     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63094 $as_echo_n "checking for freetype includes... " >&6; }
63095     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63096 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63097     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63098     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63099 $as_echo_n "checking for freetype libraries... " >&6; }
63100     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63101 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63102   fi
63103 
63104               if test "x$FOUND_FREETYPE" != xyes; then
63105 
63106   POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
63107   POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
63108   METHOD="well-known location"
63109 
63110   # Let's start with an optimistic view of the world :-)
63111   FOUND_FREETYPE=yes
63112 
63113   # First look for the canonical freetype main include file ft2build.h.
63114   if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63115     # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
63116     POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
63117     if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
63118       # Fail.
63119       FOUND_FREETYPE=no
63120     fi
63121   fi
63122 
63123   if test "x$FOUND_FREETYPE" = xyes; then
63124     # Include file found, let's continue the sanity check.
63125     { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
63126 $as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
63127 
63128     # Reset to default value
63129     FREETYPE_BASE_NAME=freetype
63130     FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63131     if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
63132       if test "x$OPENJDK_TARGET_OS" = xmacosx \
63133           && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
63134         # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
63135         # for the .6 version explicitly.
63136         FREETYPE_BASE_NAME=freetype.6
63137         FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
63138         { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
63139 $as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
63140       else
63141         { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
63142 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
63143         FOUND_FREETYPE=no
63144       fi
63145     else
63146       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63147         # On Windows, we will need both .lib and .dll file.
63148         if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
63149           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
63150 $as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
63151           FOUND_FREETYPE=no
63152         fi
63153       elif test "x$OPENJDK_TARGET_OS" = xsolaris \
63154           && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
63155         # Found lib in isa dir, use that instead.
63156         POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
63157         { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
63158 $as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
63159       fi
63160     fi
63161   fi
63162 
63163   if test "x$FOUND_FREETYPE" = xyes; then
63164 
63165   # Only process if variable expands to non-empty
63166 
63167   if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
63168     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63169 
63170   # Input might be given as Windows format, start by converting to
63171   # unix format.
63172   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63173   new_path=`$CYGPATH -u "$path"`
63174 
63175   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63176   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63177   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63178   # "foo.exe" is OK but "foo" is an error.
63179   #
63180   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63181   # It is also a way to make sure we got the proper file name for the real test later on.
63182   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63183   if test "x$test_shortpath" = x; then
63184     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63185 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63186     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
63187   fi
63188 
63189   # Call helper function which possibly converts this using DOS-style short mode.
63190   # If so, the updated path is stored in $new_path.
63191 
63192   input_path="$new_path"
63193   # Check if we need to convert this using DOS-style short mode. If the path
63194   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63195   # take no chances and rewrite it.
63196   # Note: m4 eats our [], so we need to use [ and ] instead.
63197   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63198   if test "x$has_forbidden_chars" != x; then
63199     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63200     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63201     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63202     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63203       # Going to short mode and back again did indeed matter. Since short mode is
63204       # case insensitive, let's make it lowercase to improve readability.
63205       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63206       # Now convert it back to Unix-style (cygpath)
63207       input_path=`$CYGPATH -u "$shortmode_path"`
63208       new_path="$input_path"
63209     fi
63210   fi
63211 
63212   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63213   if test "x$test_cygdrive_prefix" = x; then
63214     # As a simple fix, exclude /usr/bin since it's not a real path.
63215     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63216       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63217       # a path prefixed by /cygdrive for fixpath to work.
63218       new_path="$CYGWIN_ROOT_PATH$input_path"
63219     fi
63220   fi
63221 
63222 
63223   if test "x$path" != "x$new_path"; then
63224     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63225     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63226 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63227   fi
63228 
63229     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63230 
63231   path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63232   has_colon=`$ECHO $path | $GREP ^.:`
63233   new_path="$path"
63234   if test "x$has_colon" = x; then
63235     # Not in mixed or Windows style, start by that.
63236     new_path=`cmd //c echo $path`
63237   fi
63238 
63239 
63240   input_path="$new_path"
63241   # Check if we need to convert this using DOS-style short mode. If the path
63242   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63243   # take no chances and rewrite it.
63244   # Note: m4 eats our [], so we need to use [ and ] instead.
63245   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63246   if test "x$has_forbidden_chars" != x; then
63247     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63248     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63249   fi
63250 
63251 
63252   windows_path="$new_path"
63253   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63254     unix_path=`$CYGPATH -u "$windows_path"`
63255     new_path="$unix_path"
63256   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63257     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63258     new_path="$unix_path"
63259   fi
63260 
63261   if test "x$path" != "x$new_path"; then
63262     POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
63263     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63264 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63265   fi
63266 
63267   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63268   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63269 
63270     else
63271       # We're on a unix platform. Hooray! :)
63272       path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63273       has_space=`$ECHO "$path" | $GREP " "`
63274       if test "x$has_space" != x; then
63275         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63276 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63277         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63278       fi
63279 
63280       # Use eval to expand a potential ~
63281       eval path="$path"
63282       if test ! -f "$path" && test ! -d "$path"; then
63283         as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63284       fi
63285 
63286       if test -d "$path"; then
63287         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63288       else
63289         dir="`$DIRNAME "$path"`"
63290         base="`$BASENAME "$path"`"
63291         POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63292       fi
63293     fi
63294   fi
63295 
63296 
63297   # Only process if variable expands to non-empty
63298 
63299   if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
63300     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63301 
63302   # Input might be given as Windows format, start by converting to
63303   # unix format.
63304   path="$POTENTIAL_FREETYPE_LIB_PATH"
63305   new_path=`$CYGPATH -u "$path"`
63306 
63307   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63308   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63309   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63310   # "foo.exe" is OK but "foo" is an error.
63311   #
63312   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63313   # It is also a way to make sure we got the proper file name for the real test later on.
63314   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63315   if test "x$test_shortpath" = x; then
63316     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63317 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63318     as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
63319   fi
63320 
63321   # Call helper function which possibly converts this using DOS-style short mode.
63322   # If so, the updated path is stored in $new_path.
63323 
63324   input_path="$new_path"
63325   # Check if we need to convert this using DOS-style short mode. If the path
63326   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63327   # take no chances and rewrite it.
63328   # Note: m4 eats our [], so we need to use [ and ] instead.
63329   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63330   if test "x$has_forbidden_chars" != x; then
63331     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63332     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63333     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63334     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63335       # Going to short mode and back again did indeed matter. Since short mode is
63336       # case insensitive, let's make it lowercase to improve readability.
63337       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63338       # Now convert it back to Unix-style (cygpath)
63339       input_path=`$CYGPATH -u "$shortmode_path"`
63340       new_path="$input_path"
63341     fi
63342   fi
63343 
63344   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63345   if test "x$test_cygdrive_prefix" = x; then
63346     # As a simple fix, exclude /usr/bin since it's not a real path.
63347     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63348       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63349       # a path prefixed by /cygdrive for fixpath to work.
63350       new_path="$CYGWIN_ROOT_PATH$input_path"
63351     fi
63352   fi
63353 
63354 
63355   if test "x$path" != "x$new_path"; then
63356     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63357     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63358 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63359   fi
63360 
63361     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63362 
63363   path="$POTENTIAL_FREETYPE_LIB_PATH"
63364   has_colon=`$ECHO $path | $GREP ^.:`
63365   new_path="$path"
63366   if test "x$has_colon" = x; then
63367     # Not in mixed or Windows style, start by that.
63368     new_path=`cmd //c echo $path`
63369   fi
63370 
63371 
63372   input_path="$new_path"
63373   # Check if we need to convert this using DOS-style short mode. If the path
63374   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63375   # take no chances and rewrite it.
63376   # Note: m4 eats our [], so we need to use [ and ] instead.
63377   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63378   if test "x$has_forbidden_chars" != x; then
63379     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63380     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63381   fi
63382 
63383 
63384   windows_path="$new_path"
63385   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63386     unix_path=`$CYGPATH -u "$windows_path"`
63387     new_path="$unix_path"
63388   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63389     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63390     new_path="$unix_path"
63391   fi
63392 
63393   if test "x$path" != "x$new_path"; then
63394     POTENTIAL_FREETYPE_LIB_PATH="$new_path"
63395     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
63396 $as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63397   fi
63398 
63399   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63400   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63401 
63402     else
63403       # We're on a unix platform. Hooray! :)
63404       path="$POTENTIAL_FREETYPE_LIB_PATH"
63405       has_space=`$ECHO "$path" | $GREP " "`
63406       if test "x$has_space" != x; then
63407         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63408 $as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63409         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63410       fi
63411 
63412       # Use eval to expand a potential ~
63413       eval path="$path"
63414       if test ! -f "$path" && test ! -d "$path"; then
63415         as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63416       fi
63417 
63418       if test -d "$path"; then
63419         POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63420       else
63421         dir="`$DIRNAME "$path"`"
63422         base="`$BASENAME "$path"`"
63423         POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63424       fi
63425     fi
63426   fi
63427 
63428 
63429     FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63430     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63431 $as_echo_n "checking for freetype includes... " >&6; }
63432     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63433 $as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63434     FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63435     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63436 $as_echo_n "checking for freetype libraries... " >&6; }
63437     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63438 $as_echo "$FREETYPE_LIB_PATH" >&6; }
63439   fi
63440 
63441               fi
63442             fi
63443           fi
63444         fi
63445       fi # end check in well-known locations
63446 
63447       if test "x$FOUND_FREETYPE" != xyes; then
63448 
63449   # Print a helpful message on how to acquire the necessary build dependency.
63450   # freetype is the help tag: freetype, cups, alsa etc
63451   MISSING_DEPENDENCY=freetype
63452 
63453   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63454     cygwin_help $MISSING_DEPENDENCY
63455   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63456     msys_help $MISSING_DEPENDENCY
63457   else
63458     PKGHANDLER_COMMAND=
63459 
63460     case $PKGHANDLER in
63461       apt-get)
63462         apt_help     $MISSING_DEPENDENCY ;;
63463       yum)
63464         yum_help     $MISSING_DEPENDENCY ;;
63465       brew)
63466         brew_help    $MISSING_DEPENDENCY ;;
63467       port)
63468         port_help    $MISSING_DEPENDENCY ;;
63469       pkgutil)
63470         pkgutil_help $MISSING_DEPENDENCY ;;
63471       pkgadd)
63472         pkgadd_help  $MISSING_DEPENDENCY ;;
63473     esac
63474 
63475     if test "x$PKGHANDLER_COMMAND" != x; then
63476       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63477     fi
63478   fi
63479 
63480         as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63481       fi
63482     fi # end user specified settings
63483 
63484     # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63485     if test "x$FREETYPE_CFLAGS" = x; then
63486 
63487   # Only process if variable expands to non-empty
63488 
63489   if test "x$FREETYPE_INCLUDE_PATH" != x; then
63490     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63491 
63492   # Input might be given as Windows format, start by converting to
63493   # unix format.
63494   path="$FREETYPE_INCLUDE_PATH"
63495   new_path=`$CYGPATH -u "$path"`
63496 
63497   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63498   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63499   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63500   # "foo.exe" is OK but "foo" is an error.
63501   #
63502   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63503   # It is also a way to make sure we got the proper file name for the real test later on.
63504   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63505   if test "x$test_shortpath" = x; then
63506     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63507 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63508     as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63509   fi
63510 
63511   # Call helper function which possibly converts this using DOS-style short mode.
63512   # If so, the updated path is stored in $new_path.
63513 
63514   input_path="$new_path"
63515   # Check if we need to convert this using DOS-style short mode. If the path
63516   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63517   # take no chances and rewrite it.
63518   # Note: m4 eats our [], so we need to use [ and ] instead.
63519   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63520   if test "x$has_forbidden_chars" != x; then
63521     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63522     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63523     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63524     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63525       # Going to short mode and back again did indeed matter. Since short mode is
63526       # case insensitive, let's make it lowercase to improve readability.
63527       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63528       # Now convert it back to Unix-style (cygpath)
63529       input_path=`$CYGPATH -u "$shortmode_path"`
63530       new_path="$input_path"
63531     fi
63532   fi
63533 
63534   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63535   if test "x$test_cygdrive_prefix" = x; then
63536     # As a simple fix, exclude /usr/bin since it's not a real path.
63537     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63538       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63539       # a path prefixed by /cygdrive for fixpath to work.
63540       new_path="$CYGWIN_ROOT_PATH$input_path"
63541     fi
63542   fi
63543 
63544 
63545   if test "x$path" != "x$new_path"; then
63546     FREETYPE_INCLUDE_PATH="$new_path"
63547     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63548 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63549   fi
63550 
63551     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63552 
63553   path="$FREETYPE_INCLUDE_PATH"
63554   has_colon=`$ECHO $path | $GREP ^.:`
63555   new_path="$path"
63556   if test "x$has_colon" = x; then
63557     # Not in mixed or Windows style, start by that.
63558     new_path=`cmd //c echo $path`
63559   fi
63560 
63561 
63562   input_path="$new_path"
63563   # Check if we need to convert this using DOS-style short mode. If the path
63564   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63565   # take no chances and rewrite it.
63566   # Note: m4 eats our [], so we need to use [ and ] instead.
63567   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63568   if test "x$has_forbidden_chars" != x; then
63569     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63570     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63571   fi
63572 
63573 
63574   windows_path="$new_path"
63575   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63576     unix_path=`$CYGPATH -u "$windows_path"`
63577     new_path="$unix_path"
63578   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63579     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63580     new_path="$unix_path"
63581   fi
63582 
63583   if test "x$path" != "x$new_path"; then
63584     FREETYPE_INCLUDE_PATH="$new_path"
63585     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63586 $as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63587   fi
63588 
63589   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63590   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63591 
63592     else
63593       # We're on a unix platform. Hooray! :)
63594       path="$FREETYPE_INCLUDE_PATH"
63595       has_space=`$ECHO "$path" | $GREP " "`
63596       if test "x$has_space" != x; then
63597         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63598 $as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63599         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63600       fi
63601 
63602       # Use eval to expand a potential ~
63603       eval path="$path"
63604       if test ! -f "$path" && test ! -d "$path"; then
63605         as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63606       fi
63607 
63608       if test -d "$path"; then
63609         FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63610       else
63611         dir="`$DIRNAME "$path"`"
63612         base="`$BASENAME "$path"`"
63613         FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63614       fi
63615     fi
63616   fi
63617 
63618       if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63619         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63620       else
63621         FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63622       fi
63623     fi
63624 
63625     if test "x$FREETYPE_LIBS" = x; then
63626 
63627   # Only process if variable expands to non-empty
63628 
63629   if test "x$FREETYPE_LIB_PATH" != x; then
63630     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63631 
63632   # Input might be given as Windows format, start by converting to
63633   # unix format.
63634   path="$FREETYPE_LIB_PATH"
63635   new_path=`$CYGPATH -u "$path"`
63636 
63637   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63638   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63639   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63640   # "foo.exe" is OK but "foo" is an error.
63641   #
63642   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63643   # It is also a way to make sure we got the proper file name for the real test later on.
63644   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63645   if test "x$test_shortpath" = x; then
63646     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63647 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63648     as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63649   fi
63650 
63651   # Call helper function which possibly converts this using DOS-style short mode.
63652   # If so, the updated path is stored in $new_path.
63653 
63654   input_path="$new_path"
63655   # Check if we need to convert this using DOS-style short mode. If the path
63656   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63657   # take no chances and rewrite it.
63658   # Note: m4 eats our [], so we need to use [ and ] instead.
63659   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63660   if test "x$has_forbidden_chars" != x; then
63661     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63662     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63663     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63664     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63665       # Going to short mode and back again did indeed matter. Since short mode is
63666       # case insensitive, let's make it lowercase to improve readability.
63667       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63668       # Now convert it back to Unix-style (cygpath)
63669       input_path=`$CYGPATH -u "$shortmode_path"`
63670       new_path="$input_path"
63671     fi
63672   fi
63673 
63674   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63675   if test "x$test_cygdrive_prefix" = x; then
63676     # As a simple fix, exclude /usr/bin since it's not a real path.
63677     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63678       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63679       # a path prefixed by /cygdrive for fixpath to work.
63680       new_path="$CYGWIN_ROOT_PATH$input_path"
63681     fi
63682   fi
63683 
63684 
63685   if test "x$path" != "x$new_path"; then
63686     FREETYPE_LIB_PATH="$new_path"
63687     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63688 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63689   fi
63690 
63691     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63692 
63693   path="$FREETYPE_LIB_PATH"
63694   has_colon=`$ECHO $path | $GREP ^.:`
63695   new_path="$path"
63696   if test "x$has_colon" = x; then
63697     # Not in mixed or Windows style, start by that.
63698     new_path=`cmd //c echo $path`
63699   fi
63700 
63701 
63702   input_path="$new_path"
63703   # Check if we need to convert this using DOS-style short mode. If the path
63704   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63705   # take no chances and rewrite it.
63706   # Note: m4 eats our [], so we need to use [ and ] instead.
63707   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63708   if test "x$has_forbidden_chars" != x; then
63709     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63710     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63711   fi
63712 
63713 
63714   windows_path="$new_path"
63715   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63716     unix_path=`$CYGPATH -u "$windows_path"`
63717     new_path="$unix_path"
63718   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63719     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63720     new_path="$unix_path"
63721   fi
63722 
63723   if test "x$path" != "x$new_path"; then
63724     FREETYPE_LIB_PATH="$new_path"
63725     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63726 $as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63727   fi
63728 
63729   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63730   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63731 
63732     else
63733       # We're on a unix platform. Hooray! :)
63734       path="$FREETYPE_LIB_PATH"
63735       has_space=`$ECHO "$path" | $GREP " "`
63736       if test "x$has_space" != x; then
63737         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63738 $as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63739         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63740       fi
63741 
63742       # Use eval to expand a potential ~
63743       eval path="$path"
63744       if test ! -f "$path" && test ! -d "$path"; then
63745         as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63746       fi
63747 
63748       if test -d "$path"; then
63749         FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63750       else
63751         dir="`$DIRNAME "$path"`"
63752         base="`$BASENAME "$path"`"
63753         FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63754       fi
63755     fi
63756   fi
63757 
63758       if test "x$OPENJDK_TARGET_OS" = xwindows; then
63759         FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63760       else
63761         FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63762       fi
63763     fi
63764 
63765     # Try to compile it
63766     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63767 $as_echo_n "checking if we can compile and link with freetype... " >&6; }
63768     ac_ext=cpp
63769 ac_cpp='$CXXCPP $CPPFLAGS'
63770 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63771 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63772 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63773 
63774     PREV_CXXCFLAGS="$CXXFLAGS"
63775     PREV_LIBS="$LIBS"
63776     PREV_CXX="$CXX"
63777     CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63778     LIBS="$LIBS $FREETYPE_LIBS"
63779     CXX="$FIXPATH $CXX"
63780     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63781 /* end confdefs.h.  */
63782 
63783           #include<ft2build.h>
63784           #include FT_FREETYPE_H
63785           int main () {
63786             FT_Init_FreeType(NULL);
63787             return 0;
63788           }
63789 
63790 _ACEOF
63791 if ac_fn_cxx_try_link "$LINENO"; then :
63792 
63793           { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63794 $as_echo "yes" >&6; }
63795 
63796 else
63797 
63798           { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63799 $as_echo "no" >&6; }
63800           { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63801 $as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63802           { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63803 $as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63804 
63805 
63806   # Print a helpful message on how to acquire the necessary build dependency.
63807   # freetype is the help tag: freetype, cups, alsa etc
63808   MISSING_DEPENDENCY=freetype
63809 
63810   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63811     cygwin_help $MISSING_DEPENDENCY
63812   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63813     msys_help $MISSING_DEPENDENCY
63814   else
63815     PKGHANDLER_COMMAND=
63816 
63817     case $PKGHANDLER in
63818       apt-get)
63819         apt_help     $MISSING_DEPENDENCY ;;
63820       yum)
63821         yum_help     $MISSING_DEPENDENCY ;;
63822       brew)
63823         brew_help    $MISSING_DEPENDENCY ;;
63824       port)
63825         port_help    $MISSING_DEPENDENCY ;;
63826       pkgutil)
63827         pkgutil_help $MISSING_DEPENDENCY ;;
63828       pkgadd)
63829         pkgadd_help  $MISSING_DEPENDENCY ;;
63830     esac
63831 
63832     if test "x$PKGHANDLER_COMMAND" != x; then
63833       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63834     fi
63835   fi
63836 
63837 
63838           as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63839 
63840 
63841 fi
63842 rm -f core conftest.err conftest.$ac_objext \
63843     conftest$ac_exeext conftest.$ac_ext
63844     CXXCFLAGS="$PREV_CXXFLAGS"
63845     LIBS="$PREV_LIBS"
63846     CXX="$PREV_CXX"
63847     ac_ext=cpp
63848 ac_cpp='$CXXCPP $CPPFLAGS'
63849 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63850 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63851 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63852 
63853 
63854     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63855 $as_echo_n "checking if we should bundle freetype... " >&6; }
63856     if test "x$BUNDLE_FREETYPE" = xyes; then
63857       FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63858     fi
63859     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63860 $as_echo "$BUNDLE_FREETYPE" >&6; }
63861 
63862   fi # end freetype needed
63863 
63864   FREETYPE_LICENSE=""
63865   if test "x$with_freetype_license" = "xyes"; then
63866     as_fn_error $? "--with-freetype-license must have a value" "$LINENO" 5
63867   elif test "x$with_freetype_license" != "x"; then
63868     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype license" >&5
63869 $as_echo_n "checking for freetype license... " >&6; }
63870     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_freetype_license" >&5
63871 $as_echo "$with_freetype_license" >&6; }
63872     FREETYPE_LICENSE="$with_freetype_license"
63873 
63874   # Only process if variable expands to non-empty
63875 
63876   if test "x$FREETYPE_LICENSE" != x; then
63877     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63878 
63879   # Input might be given as Windows format, start by converting to
63880   # unix format.
63881   path="$FREETYPE_LICENSE"
63882   new_path=`$CYGPATH -u "$path"`
63883 
63884   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63885   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63886   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63887   # "foo.exe" is OK but "foo" is an error.
63888   #
63889   # This test is therefore slightly more accurate than "test -f" to check for file precense.
63890   # It is also a way to make sure we got the proper file name for the real test later on.
63891   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63892   if test "x$test_shortpath" = x; then
63893     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
63894 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
63895     as_fn_error $? "Cannot locate the the path of FREETYPE_LICENSE" "$LINENO" 5
63896   fi
63897 
63898   # Call helper function which possibly converts this using DOS-style short mode.
63899   # If so, the updated path is stored in $new_path.
63900 
63901   input_path="$new_path"
63902   # Check if we need to convert this using DOS-style short mode. If the path
63903   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63904   # take no chances and rewrite it.
63905   # Note: m4 eats our [], so we need to use [ and ] instead.
63906   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63907   if test "x$has_forbidden_chars" != x; then
63908     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63909     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63910     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63911     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63912       # Going to short mode and back again did indeed matter. Since short mode is
63913       # case insensitive, let's make it lowercase to improve readability.
63914       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63915       # Now convert it back to Unix-style (cygpath)
63916       input_path=`$CYGPATH -u "$shortmode_path"`
63917       new_path="$input_path"
63918     fi
63919   fi
63920 
63921   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63922   if test "x$test_cygdrive_prefix" = x; then
63923     # As a simple fix, exclude /usr/bin since it's not a real path.
63924     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63925       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63926       # a path prefixed by /cygdrive for fixpath to work.
63927       new_path="$CYGWIN_ROOT_PATH$input_path"
63928     fi
63929   fi
63930 
63931 
63932   if test "x$path" != "x$new_path"; then
63933     FREETYPE_LICENSE="$new_path"
63934     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
63935 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
63936   fi
63937 
63938     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63939 
63940   path="$FREETYPE_LICENSE"
63941   has_colon=`$ECHO $path | $GREP ^.:`
63942   new_path="$path"
63943   if test "x$has_colon" = x; then
63944     # Not in mixed or Windows style, start by that.
63945     new_path=`cmd //c echo $path`
63946   fi
63947 
63948 
63949   input_path="$new_path"
63950   # Check if we need to convert this using DOS-style short mode. If the path
63951   # contains just simple characters, use it. Otherwise (spaces, weird characters),
63952   # take no chances and rewrite it.
63953   # Note: m4 eats our [], so we need to use [ and ] instead.
63954   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63955   if test "x$has_forbidden_chars" != x; then
63956     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63957     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63958   fi
63959 
63960 
63961   windows_path="$new_path"
63962   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63963     unix_path=`$CYGPATH -u "$windows_path"`
63964     new_path="$unix_path"
63965   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63966     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63967     new_path="$unix_path"
63968   fi
63969 
63970   if test "x$path" != "x$new_path"; then
63971     FREETYPE_LICENSE="$new_path"
63972     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&5
63973 $as_echo "$as_me: Rewriting FREETYPE_LICENSE to \"$new_path\"" >&6;}
63974   fi
63975 
63976   # Save the first 10 bytes of this path to the storage, so fixpath can work.
63977   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63978 
63979     else
63980       # We're on a unix platform. Hooray! :)
63981       path="$FREETYPE_LICENSE"
63982       has_space=`$ECHO "$path" | $GREP " "`
63983       if test "x$has_space" != x; then
63984         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&5
63985 $as_echo "$as_me: The path of FREETYPE_LICENSE, which resolves as \"$path\", is invalid." >&6;}
63986         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63987       fi
63988 
63989       # Use eval to expand a potential ~
63990       eval path="$path"
63991       if test ! -f "$path" && test ! -d "$path"; then
63992         as_fn_error $? "The path of FREETYPE_LICENSE, which resolves as \"$path\", is not found." "$LINENO" 5
63993       fi
63994 
63995       if test -d "$path"; then
63996         FREETYPE_LICENSE="`cd "$path"; $THEPWDCMD -L`"
63997       else
63998         dir="`$DIRNAME "$path"`"
63999         base="`$BASENAME "$path"`"
64000         FREETYPE_LICENSE="`cd "$dir"; $THEPWDCMD -L`/$base"
64001       fi
64002     fi
64003   fi
64004 
64005     if test ! -f "$FREETYPE_LICENSE"; then
64006       as_fn_error $? "$FREETYPE_LICENSE cannot be found" "$LINENO" 5
64007     fi
64008   fi
64009 
64010 
64011 
64012 
64013 
64014 
64015 
64016 
64017 # Check whether --with-alsa was given.
64018 if test "${with_alsa+set}" = set; then :
64019   withval=$with_alsa;
64020 fi
64021 
64022 
64023 # Check whether --with-alsa-include was given.
64024 if test "${with_alsa_include+set}" = set; then :
64025   withval=$with_alsa_include;
64026 fi
64027 
64028 
64029 # Check whether --with-alsa-lib was given.
64030 if test "${with_alsa_lib+set}" = set; then :
64031   withval=$with_alsa_lib;
64032 fi
64033 
64034 
64035   if test "x$NEEDS_LIB_ALSA" = xfalse; then
64036     if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
64037         (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
64038         (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
64039       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
64040 $as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
64041     fi
64042     ALSA_CFLAGS=
64043     ALSA_LIBS=
64044   else
64045     ALSA_FOUND=no
64046 
64047     if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
64048       as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
64049     fi
64050 
64051     if test "x${with_alsa}" != x; then
64052       ALSA_LIBS="-L${with_alsa}/lib -lasound"
64053       ALSA_CFLAGS="-I${with_alsa}/include"
64054       ALSA_FOUND=yes
64055     fi
64056     if test "x${with_alsa_include}" != x; then
64057       ALSA_CFLAGS="-I${with_alsa_include}"
64058       ALSA_FOUND=yes
64059     fi
64060     if test "x${with_alsa_lib}" != x; then
64061       ALSA_LIBS="-L${with_alsa_lib} -lasound"
64062       ALSA_FOUND=yes
64063     fi
64064     # Do not try pkg-config if we have a sysroot set.
64065     if test "x$SYSROOT" = x; then
64066       if test "x$ALSA_FOUND" = xno; then
64067 
64068 pkg_failed=no
64069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
64070 $as_echo_n "checking for ALSA... " >&6; }
64071 
64072 if test -n "$ALSA_CFLAGS"; then
64073     pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
64074  elif test -n "$PKG_CONFIG"; then
64075     if test -n "$PKG_CONFIG" && \
64076     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64077   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64078   ac_status=$?
64079   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64080   test $ac_status = 0; }; then
64081   pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
64082 else
64083   pkg_failed=yes
64084 fi
64085  else
64086     pkg_failed=untried
64087 fi
64088 if test -n "$ALSA_LIBS"; then
64089     pkg_cv_ALSA_LIBS="$ALSA_LIBS"
64090  elif test -n "$PKG_CONFIG"; then
64091     if test -n "$PKG_CONFIG" && \
64092     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
64093   ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
64094   ac_status=$?
64095   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64096   test $ac_status = 0; }; then
64097   pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
64098 else
64099   pkg_failed=yes
64100 fi
64101  else
64102     pkg_failed=untried
64103 fi
64104 
64105 
64106 
64107 if test $pkg_failed = yes; then
64108 
64109 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64110         _pkg_short_errors_supported=yes
64111 else
64112         _pkg_short_errors_supported=no
64113 fi
64114         if test $_pkg_short_errors_supported = yes; then
64115                 ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
64116         else
64117                 ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
64118         fi
64119         # Put the nasty error message in config.log where it belongs
64120         echo "$ALSA_PKG_ERRORS" >&5
64121 
64122         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64123 $as_echo "no" >&6; }
64124                 ALSA_FOUND=no
64125 elif test $pkg_failed = untried; then
64126         ALSA_FOUND=no
64127 else
64128         ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
64129         ALSA_LIBS=$pkg_cv_ALSA_LIBS
64130         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64131 $as_echo "yes" >&6; }
64132         ALSA_FOUND=yes
64133 fi
64134       fi
64135     fi
64136     if test "x$ALSA_FOUND" = xno; then
64137       for ac_header in alsa/asoundlib.h
64138 do :
64139   ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
64140 if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
64141   cat >>confdefs.h <<_ACEOF
64142 #define HAVE_ALSA_ASOUNDLIB_H 1
64143 _ACEOF
64144 
64145             ALSA_FOUND=yes
64146             ALSA_CFLAGS=-Iignoreme
64147             ALSA_LIBS=-lasound
64148             DEFAULT_ALSA=yes
64149 
64150 else
64151   ALSA_FOUND=no
64152 
64153 fi
64154 
64155 done
64156 
64157     fi
64158     if test "x$ALSA_FOUND" = xno; then
64159 
64160   # Print a helpful message on how to acquire the necessary build dependency.
64161   # alsa is the help tag: freetype, cups, alsa etc
64162   MISSING_DEPENDENCY=alsa
64163 
64164   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64165     cygwin_help $MISSING_DEPENDENCY
64166   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64167     msys_help $MISSING_DEPENDENCY
64168   else
64169     PKGHANDLER_COMMAND=
64170 
64171     case $PKGHANDLER in
64172       apt-get)
64173         apt_help     $MISSING_DEPENDENCY ;;
64174       yum)
64175         yum_help     $MISSING_DEPENDENCY ;;
64176       brew)
64177         brew_help    $MISSING_DEPENDENCY ;;
64178       port)
64179         port_help    $MISSING_DEPENDENCY ;;
64180       pkgutil)
64181         pkgutil_help $MISSING_DEPENDENCY ;;
64182       pkgadd)
64183         pkgadd_help  $MISSING_DEPENDENCY ;;
64184     esac
64185 
64186     if test "x$PKGHANDLER_COMMAND" != x; then
64187       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64188     fi
64189   fi
64190 
64191       as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
64192     fi
64193   fi
64194 
64195 
64196 
64197 
64198 
64199 
64200 # Check whether --with-libffi was given.
64201 if test "${with_libffi+set}" = set; then :
64202   withval=$with_libffi;
64203 fi
64204 
64205 
64206 # Check whether --with-libffi-include was given.
64207 if test "${with_libffi_include+set}" = set; then :
64208   withval=$with_libffi_include;
64209 fi
64210 
64211 
64212 # Check whether --with-libffi-lib was given.
64213 if test "${with_libffi_lib+set}" = set; then :
64214   withval=$with_libffi_lib;
64215 fi
64216 
64217   # Check whether --enable-libffi-bundling was given.
64218 if test "${enable_libffi_bundling+set}" = set; then :
64219   enableval=$enable_libffi_bundling;
64220 fi
64221 
64222 
64223   if test "x$NEEDS_LIB_FFI" = xfalse; then
64224     if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
64225         (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
64226         (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
64227       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
64228 $as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
64229     fi
64230     LIBFFI_CFLAGS=
64231     LIBFFI_LIBS=
64232   else
64233     LIBFFI_FOUND=no
64234 
64235     if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
64236       as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
64237     fi
64238 
64239     if test "x${with_libffi}" != x; then
64240       LIBFFI_LIB_PATH="${with_libffi}/lib"
64241       LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
64242       LIBFFI_CFLAGS="-I${with_libffi}/include"
64243       LIBFFI_FOUND=yes
64244     fi
64245     if test "x${with_libffi_include}" != x; then
64246       LIBFFI_CFLAGS="-I${with_libffi_include}"
64247       LIBFFI_FOUND=yes
64248     fi
64249     if test "x${with_libffi_lib}" != x; then
64250       LIBFFI_LIB_PATH="${with_libffi_lib}"
64251       LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
64252       LIBFFI_FOUND=yes
64253     fi
64254     # Do not try pkg-config if we have a sysroot set.
64255     if test "x$SYSROOT" = x; then
64256       if test "x$LIBFFI_FOUND" = xno; then
64257         # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
64258 
64259 pkg_failed=no
64260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
64261 $as_echo_n "checking for LIBFFI... " >&6; }
64262 
64263 if test -n "$LIBFFI_CFLAGS"; then
64264     pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
64265  elif test -n "$PKG_CONFIG"; then
64266     if test -n "$PKG_CONFIG" && \
64267     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64268   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64269   ac_status=$?
64270   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64271   test $ac_status = 0; }; then
64272   pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
64273 else
64274   pkg_failed=yes
64275 fi
64276  else
64277     pkg_failed=untried
64278 fi
64279 if test -n "$LIBFFI_LIBS"; then
64280     pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
64281  elif test -n "$PKG_CONFIG"; then
64282     if test -n "$PKG_CONFIG" && \
64283     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
64284   ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
64285   ac_status=$?
64286   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64287   test $ac_status = 0; }; then
64288   pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
64289 else
64290   pkg_failed=yes
64291 fi
64292  else
64293     pkg_failed=untried
64294 fi
64295 
64296 
64297 
64298 if test $pkg_failed = yes; then
64299 
64300 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64301         _pkg_short_errors_supported=yes
64302 else
64303         _pkg_short_errors_supported=no
64304 fi
64305         if test $_pkg_short_errors_supported = yes; then
64306                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
64307         else
64308                 LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
64309         fi
64310         # Put the nasty error message in config.log where it belongs
64311         echo "$LIBFFI_PKG_ERRORS" >&5
64312 
64313         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64314 $as_echo "no" >&6; }
64315                 LIBFFI_FOUND=no
64316 elif test $pkg_failed = untried; then
64317         LIBFFI_FOUND=no
64318 else
64319         LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
64320         LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
64321         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64322 $as_echo "yes" >&6; }
64323         LIBFFI_FOUND=yes
64324 fi
64325       fi
64326     fi
64327     if test "x$LIBFFI_FOUND" = xno; then
64328       for ac_header in ffi.h
64329 do :
64330   ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
64331 if test "x$ac_cv_header_ffi_h" = xyes; then :
64332   cat >>confdefs.h <<_ACEOF
64333 #define HAVE_FFI_H 1
64334 _ACEOF
64335 
64336             LIBFFI_FOUND=yes
64337             LIBFFI_CFLAGS=
64338             LIBFFI_LIBS=-lffi
64339 
64340 else
64341   LIBFFI_FOUND=no
64342 
64343 fi
64344 
64345 done
64346 
64347     fi
64348     if test "x$LIBFFI_FOUND" = xno; then
64349 
64350   # Print a helpful message on how to acquire the necessary build dependency.
64351   # ffi is the help tag: freetype, cups, alsa etc
64352   MISSING_DEPENDENCY=ffi
64353 
64354   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64355     cygwin_help $MISSING_DEPENDENCY
64356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64357     msys_help $MISSING_DEPENDENCY
64358   else
64359     PKGHANDLER_COMMAND=
64360 
64361     case $PKGHANDLER in
64362       apt-get)
64363         apt_help     $MISSING_DEPENDENCY ;;
64364       yum)
64365         yum_help     $MISSING_DEPENDENCY ;;
64366       brew)
64367         brew_help    $MISSING_DEPENDENCY ;;
64368       port)
64369         port_help    $MISSING_DEPENDENCY ;;
64370       pkgutil)
64371         pkgutil_help $MISSING_DEPENDENCY ;;
64372       pkgadd)
64373         pkgadd_help  $MISSING_DEPENDENCY ;;
64374     esac
64375 
64376     if test "x$PKGHANDLER_COMMAND" != x; then
64377       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64378     fi
64379   fi
64380 
64381       as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
64382     fi
64383 
64384     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
64385 $as_echo_n "checking if libffi works... " >&6; }
64386     ac_ext=c
64387 ac_cpp='$CPP $CPPFLAGS'
64388 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64389 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64390 ac_compiler_gnu=$ac_cv_c_compiler_gnu
64391 
64392     OLD_CFLAGS="$CFLAGS"
64393     CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
64394     OLD_LIBS="$LIBS"
64395     LIBS="$LIBS $LIBFFI_LIBS"
64396     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64397 /* end confdefs.h.  */
64398 #include <ffi.h>
64399 int
64400 main ()
64401 {
64402 
64403           ffi_call(NULL, NULL, NULL, NULL);
64404           return 0;
64405 
64406   ;
64407   return 0;
64408 }
64409 _ACEOF
64410 if ac_fn_c_try_link "$LINENO"; then :
64411   LIBFFI_WORKS=yes
64412 else
64413   LIBFFI_WORKS=no
64414 
64415 fi
64416 rm -f core conftest.err conftest.$ac_objext \
64417     conftest$ac_exeext conftest.$ac_ext
64418     CFLAGS="$OLD_CFLAGS"
64419     LIBS="$OLD_LIBS"
64420     ac_ext=cpp
64421 ac_cpp='$CXXCPP $CPPFLAGS'
64422 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
64423 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
64424 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
64425 
64426     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
64427 $as_echo "$LIBFFI_WORKS" >&6; }
64428 
64429     if test "x$LIBFFI_WORKS" = xno; then
64430 
64431   # Print a helpful message on how to acquire the necessary build dependency.
64432   # ffi is the help tag: freetype, cups, alsa etc
64433   MISSING_DEPENDENCY=ffi
64434 
64435   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64436     cygwin_help $MISSING_DEPENDENCY
64437   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64438     msys_help $MISSING_DEPENDENCY
64439   else
64440     PKGHANDLER_COMMAND=
64441 
64442     case $PKGHANDLER in
64443       apt-get)
64444         apt_help     $MISSING_DEPENDENCY ;;
64445       yum)
64446         yum_help     $MISSING_DEPENDENCY ;;
64447       brew)
64448         brew_help    $MISSING_DEPENDENCY ;;
64449       port)
64450         port_help    $MISSING_DEPENDENCY ;;
64451       pkgutil)
64452         pkgutil_help $MISSING_DEPENDENCY ;;
64453       pkgadd)
64454         pkgadd_help  $MISSING_DEPENDENCY ;;
64455     esac
64456 
64457     if test "x$PKGHANDLER_COMMAND" != x; then
64458       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
64459     fi
64460   fi
64461 
64462       as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
64463     fi
64464 
64465     { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
64466 $as_echo_n "checking if libffi should be bundled... " >&6; }
64467     if test "x$enable_libffi_bundling" = "x"; then
64468       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64469 $as_echo "no" >&6; }
64470       ENABLE_LIBFFI_BUNDLING=false
64471     elif  test "x$enable_libffi_bundling" = "xno"; then
64472       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64473 $as_echo "no, forced" >&6; }
64474       ENABLE_LIBFFI_BUNDLING=false
64475     elif  test "x$enable_libffi_bundling" = "xyes"; then
64476       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64477 $as_echo "yes, forced" >&6; }
64478       ENABLE_LIBFFI_BUNDLING=true
64479     else
64480       as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
64481     fi
64482 
64483     # Find the libffi.so.X to bundle
64484     if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
64485       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
64486 $as_echo_n "checking for libffi lib file location... " >&6; }
64487       if test "x${LIBFFI_LIB_PATH}" != x; then
64488         if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
64489           LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
64490         else
64491           as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
64492         fi
64493       else
64494         # If we don't have an explicit path, look in a few obvious places
64495         if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
64496           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64497             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64498           elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
64499             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
64500           else
64501             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64502           fi
64503         elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
64504           if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
64505             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
64506           elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
64507             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
64508           else
64509             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64510           fi
64511         else
64512           # Fallback on the default /usr/lib dir
64513           if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
64514             LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
64515           else
64516             as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
64517           fi
64518         fi
64519       fi
64520       # Make sure the wildcard is evaluated
64521       LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
64522       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
64523 $as_echo "${LIBFFI_LIB_FILE}" >&6; }
64524     fi
64525   fi
64526 
64527 
64528 
64529 
64530 
64531 
64532 
64533   if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64534     # Extract the first word of "llvm-config", so it can be a program name with args.
64535 set dummy llvm-config; ac_word=$2
64536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64537 $as_echo_n "checking for $ac_word... " >&6; }
64538 if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
64539   $as_echo_n "(cached) " >&6
64540 else
64541   if test -n "$LLVM_CONFIG"; then
64542   ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
64543 else
64544 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64545 for as_dir in $PATH
64546 do
64547   IFS=$as_save_IFS
64548   test -z "$as_dir" && as_dir=.
64549     for ac_exec_ext in '' $ac_executable_extensions; do
64550   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64551     ac_cv_prog_LLVM_CONFIG="llvm-config"
64552     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64553     break 2
64554   fi
64555 done
64556   done
64557 IFS=$as_save_IFS
64558 
64559 fi
64560 fi
64561 LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
64562 if test -n "$LLVM_CONFIG"; then
64563   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
64564 $as_echo "$LLVM_CONFIG" >&6; }
64565 else
64566   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64567 $as_echo "no" >&6; }
64568 fi
64569 
64570 
64571 
64572     if test "x$LLVM_CONFIG" != xllvm-config; then
64573       as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
64574     fi
64575 
64576     llvm_components="jit mcjit engine nativecodegen native"
64577     unset LLVM_CFLAGS
64578     for flag in $("$LLVM_CONFIG" --cxxflags); do
64579       if echo "${flag}" | grep -q '^-[ID]'; then
64580         if test "${flag}" != "-D_DEBUG" ; then
64581           if test "${LLVM_CFLAGS}" != "" ; then
64582             LLVM_CFLAGS="${LLVM_CFLAGS} "
64583           fi
64584           LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
64585         fi
64586       fi
64587     done
64588     llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
64589     LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
64590 
64591     unset LLVM_LDFLAGS
64592     for flag in $("${LLVM_CONFIG}" --ldflags); do
64593       if echo "${flag}" | grep -q '^-L'; then
64594         if test "${LLVM_LDFLAGS}" != ""; then
64595           LLVM_LDFLAGS="${LLVM_LDFLAGS} "
64596         fi
64597         LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
64598       fi
64599     done
64600 
64601     unset LLVM_LIBS
64602     for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
64603       if echo "${flag}" | grep -q '^-l'; then
64604         if test "${LLVM_LIBS}" != ""; then
64605           LLVM_LIBS="${LLVM_LIBS} "
64606         fi
64607         LLVM_LIBS="${LLVM_LIBS}${flag}"
64608       fi
64609     done
64610 
64611     # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
64612     # always properly detect -ltinfo
64613     LLVM_LIBS="${LLVM_LIBS} -ltinfo"
64614 
64615 
64616 
64617 
64618   fi
64619 
64620 
64621 
64622 # Check whether --with-libjpeg was given.
64623 if test "${with_libjpeg+set}" = set; then :
64624   withval=$with_libjpeg;
64625 fi
64626 
64627 
64628   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64629 $as_echo_n "checking for which libjpeg to use... " >&6; }
64630   # default is bundled
64631   DEFAULT_LIBJPEG=bundled
64632   # if user didn't specify, use DEFAULT_LIBJPEG
64633   if test "x${with_libjpeg}" = "x"; then
64634     with_libjpeg=${DEFAULT_LIBJPEG}
64635   fi
64636   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64637 $as_echo "${with_libjpeg}" >&6; }
64638 
64639   if test "x${with_libjpeg}" = "xbundled"; then
64640     USE_EXTERNAL_LIBJPEG=false
64641   elif test "x${with_libjpeg}" = "xsystem"; then
64642     ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64643 if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64644 
64645 else
64646    as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64647 fi
64648 
64649 
64650     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64651 $as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64652 if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64653   $as_echo_n "(cached) " >&6
64654 else
64655   ac_check_lib_save_LIBS=$LIBS
64656 LIBS="-ljpeg  $LIBS"
64657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64658 /* end confdefs.h.  */
64659 
64660 /* Override any GCC internal prototype to avoid an error.
64661    Use char because int might match the return type of a GCC
64662    builtin and then its argument prototype would still apply.  */
64663 #ifdef __cplusplus
64664 extern "C"
64665 #endif
64666 char jpeg_CreateDecompress ();
64667 int
64668 main ()
64669 {
64670 return jpeg_CreateDecompress ();
64671   ;
64672   return 0;
64673 }
64674 _ACEOF
64675 if ac_fn_cxx_try_link "$LINENO"; then :
64676   ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64677 else
64678   ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64679 fi
64680 rm -f core conftest.err conftest.$ac_objext \
64681     conftest$ac_exeext conftest.$ac_ext
64682 LIBS=$ac_check_lib_save_LIBS
64683 fi
64684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64685 $as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64686 if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64687   cat >>confdefs.h <<_ACEOF
64688 #define HAVE_LIBJPEG 1
64689 _ACEOF
64690 
64691   LIBS="-ljpeg $LIBS"
64692 
64693 else
64694    as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64695 fi
64696 
64697 
64698     USE_EXTERNAL_LIBJPEG=true
64699   else
64700     as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64701   fi
64702 
64703 
64704 
64705 
64706 
64707 # Check whether --with-giflib was given.
64708 if test "${with_giflib+set}" = set; then :
64709   withval=$with_giflib;
64710 fi
64711 
64712 
64713   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64714 $as_echo_n "checking for which giflib to use... " >&6; }
64715   # default is bundled
64716   DEFAULT_GIFLIB=bundled
64717   # if user didn't specify, use DEFAULT_GIFLIB
64718   if test "x${with_giflib}" = "x"; then
64719     with_giflib=${DEFAULT_GIFLIB}
64720   fi
64721   { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64722 $as_echo "${with_giflib}" >&6; }
64723 
64724   if test "x${with_giflib}" = "xbundled"; then
64725     USE_EXTERNAL_LIBGIF=false
64726   elif test "x${with_giflib}" = "xsystem"; then
64727     ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64728 if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64729 
64730 else
64731    as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64732 fi
64733 
64734 
64735     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64736 $as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64737 if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64738   $as_echo_n "(cached) " >&6
64739 else
64740   ac_check_lib_save_LIBS=$LIBS
64741 LIBS="-lgif  $LIBS"
64742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64743 /* end confdefs.h.  */
64744 
64745 /* Override any GCC internal prototype to avoid an error.
64746    Use char because int might match the return type of a GCC
64747    builtin and then its argument prototype would still apply.  */
64748 #ifdef __cplusplus
64749 extern "C"
64750 #endif
64751 char DGifGetCode ();
64752 int
64753 main ()
64754 {
64755 return DGifGetCode ();
64756   ;
64757   return 0;
64758 }
64759 _ACEOF
64760 if ac_fn_cxx_try_link "$LINENO"; then :
64761   ac_cv_lib_gif_DGifGetCode=yes
64762 else
64763   ac_cv_lib_gif_DGifGetCode=no
64764 fi
64765 rm -f core conftest.err conftest.$ac_objext \
64766     conftest$ac_exeext conftest.$ac_ext
64767 LIBS=$ac_check_lib_save_LIBS
64768 fi
64769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64770 $as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64771 if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64772   cat >>confdefs.h <<_ACEOF
64773 #define HAVE_LIBGIF 1
64774 _ACEOF
64775 
64776   LIBS="-lgif $LIBS"
64777 
64778 else
64779    as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64780 fi
64781 
64782 
64783     USE_EXTERNAL_LIBGIF=true
64784   else
64785     as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64786   fi
64787 
64788 
64789 
64790 
64791 
64792 # Check whether --with-libpng was given.
64793 if test "${with_libpng+set}" = set; then :
64794   withval=$with_libpng;
64795 fi
64796 
64797 
64798   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64799 $as_echo_n "checking for which libpng to use... " >&6; }
64800 
64801   # default is bundled
64802   DEFAULT_LIBPNG=bundled
64803   # if user didn't specify, use DEFAULT_LIBPNG
64804   if test "x${with_libpng}" = "x"; then
64805     with_libpng=${DEFAULT_LIBPNG}
64806   fi
64807 
64808   if test "x${with_libpng}" = "xbundled"; then
64809     USE_EXTERNAL_LIBPNG=false
64810     PNG_CFLAGS=""
64811     PNG_LIBS=""
64812     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64813 $as_echo "bundled" >&6; }
64814   elif test "x${with_libpng}" = "xsystem"; then
64815 
64816 pkg_failed=no
64817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64818 $as_echo_n "checking for PNG... " >&6; }
64819 
64820 if test -n "$PNG_CFLAGS"; then
64821     pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64822  elif test -n "$PKG_CONFIG"; then
64823     if test -n "$PKG_CONFIG" && \
64824     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64825   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64826   ac_status=$?
64827   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64828   test $ac_status = 0; }; then
64829   pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64830 else
64831   pkg_failed=yes
64832 fi
64833  else
64834     pkg_failed=untried
64835 fi
64836 if test -n "$PNG_LIBS"; then
64837     pkg_cv_PNG_LIBS="$PNG_LIBS"
64838  elif test -n "$PKG_CONFIG"; then
64839     if test -n "$PKG_CONFIG" && \
64840     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64841   ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64842   ac_status=$?
64843   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64844   test $ac_status = 0; }; then
64845   pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64846 else
64847   pkg_failed=yes
64848 fi
64849  else
64850     pkg_failed=untried
64851 fi
64852 
64853 
64854 
64855 if test $pkg_failed = yes; then
64856 
64857 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64858         _pkg_short_errors_supported=yes
64859 else
64860         _pkg_short_errors_supported=no
64861 fi
64862         if test $_pkg_short_errors_supported = yes; then
64863                 PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64864         else
64865                 PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64866         fi
64867         # Put the nasty error message in config.log where it belongs
64868         echo "$PNG_PKG_ERRORS" >&5
64869 
64870         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64871 $as_echo "no" >&6; }
64872                 LIBPNG_FOUND=no
64873 elif test $pkg_failed = untried; then
64874         LIBPNG_FOUND=no
64875 else
64876         PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64877         PNG_LIBS=$pkg_cv_PNG_LIBS
64878         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64879 $as_echo "yes" >&6; }
64880         LIBPNG_FOUND=yes
64881 fi
64882     if test "x${LIBPNG_FOUND}" = "xyes"; then
64883       # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
64884       USE_EXTERNAL_LIBPNG=true
64885       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64886 $as_echo "system" >&6; }
64887     else
64888       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64889 $as_echo "system not found" >&6; }
64890       as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64891     fi
64892   else
64893     as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64894   fi
64895 
64896 
64897 
64898 
64899 
64900 
64901 
64902 # Check whether --with-zlib was given.
64903 if test "${with_zlib+set}" = set; then :
64904   withval=$with_zlib;
64905 fi
64906 
64907 
64908   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64909 $as_echo_n "checking for compress in -lz... " >&6; }
64910 if ${ac_cv_lib_z_compress+:} false; then :
64911   $as_echo_n "(cached) " >&6
64912 else
64913   ac_check_lib_save_LIBS=$LIBS
64914 LIBS="-lz  $LIBS"
64915 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64916 /* end confdefs.h.  */
64917 
64918 /* Override any GCC internal prototype to avoid an error.
64919    Use char because int might match the return type of a GCC
64920    builtin and then its argument prototype would still apply.  */
64921 #ifdef __cplusplus
64922 extern "C"
64923 #endif
64924 char compress ();
64925 int
64926 main ()
64927 {
64928 return compress ();
64929   ;
64930   return 0;
64931 }
64932 _ACEOF
64933 if ac_fn_cxx_try_link "$LINENO"; then :
64934   ac_cv_lib_z_compress=yes
64935 else
64936   ac_cv_lib_z_compress=no
64937 fi
64938 rm -f core conftest.err conftest.$ac_objext \
64939     conftest$ac_exeext conftest.$ac_ext
64940 LIBS=$ac_check_lib_save_LIBS
64941 fi
64942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64943 $as_echo "$ac_cv_lib_z_compress" >&6; }
64944 if test "x$ac_cv_lib_z_compress" = xyes; then :
64945    ZLIB_FOUND=yes
64946 else
64947    ZLIB_FOUND=no
64948 fi
64949 
64950 
64951   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64952 $as_echo_n "checking for which zlib to use... " >&6; }
64953 
64954   DEFAULT_ZLIB=system
64955   if test "x$OPENJDK_TARGET_OS" = xwindows; then
64956     # On windows default is bundled...on others default is system
64957     DEFAULT_ZLIB=bundled
64958   fi
64959 
64960   if test "x${ZLIB_FOUND}" != "xyes"; then
64961     # If we don't find any system...set default to bundled
64962     DEFAULT_ZLIB=bundled
64963   fi
64964 
64965   # If user didn't specify, use DEFAULT_ZLIB
64966   if test "x${with_zlib}" = "x"; then
64967     with_zlib=${DEFAULT_ZLIB}
64968   fi
64969 
64970   if test "x${with_zlib}" = "xbundled"; then
64971     USE_EXTERNAL_LIBZ=false
64972     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64973 $as_echo "bundled" >&6; }
64974   elif test "x${with_zlib}" = "xsystem"; then
64975     if test "x${ZLIB_FOUND}" = "xyes"; then
64976       USE_EXTERNAL_LIBZ=true
64977       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64978 $as_echo "system" >&6; }
64979     else
64980       { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64981 $as_echo "system not found" >&6; }
64982       as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64983     fi
64984   else
64985     as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64986   fi
64987 
64988 
64989 
64990 
64991 
64992 # Check whether --with-lcms was given.
64993 if test "${with_lcms+set}" = set; then :
64994   withval=$with_lcms;
64995 fi
64996 
64997 
64998   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64999 $as_echo_n "checking for which lcms to use... " >&6; }
65000 
65001   DEFAULT_LCMS=bundled
65002   # If user didn't specify, use DEFAULT_LCMS
65003   if test "x${with_lcms}" = "x"; then
65004     with_lcms=${DEFAULT_LCMS}
65005   fi
65006 
65007   if test "x${with_lcms}" = "xbundled"; then
65008     USE_EXTERNAL_LCMS=false
65009     LCMS_CFLAGS=""
65010     LCMS_LIBS=""
65011     { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
65012 $as_echo "bundled" >&6; }
65013   elif test "x${with_lcms}" = "xsystem"; then
65014     { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
65015 $as_echo "system" >&6; }
65016 
65017 pkg_failed=no
65018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
65019 $as_echo_n "checking for LCMS... " >&6; }
65020 
65021 if test -n "$LCMS_CFLAGS"; then
65022     pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
65023  elif test -n "$PKG_CONFIG"; then
65024     if test -n "$PKG_CONFIG" && \
65025     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65026   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65027   ac_status=$?
65028   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65029   test $ac_status = 0; }; then
65030   pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
65031 else
65032   pkg_failed=yes
65033 fi
65034  else
65035     pkg_failed=untried
65036 fi
65037 if test -n "$LCMS_LIBS"; then
65038     pkg_cv_LCMS_LIBS="$LCMS_LIBS"
65039  elif test -n "$PKG_CONFIG"; then
65040     if test -n "$PKG_CONFIG" && \
65041     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
65042   ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
65043   ac_status=$?
65044   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65045   test $ac_status = 0; }; then
65046   pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
65047 else
65048   pkg_failed=yes
65049 fi
65050  else
65051     pkg_failed=untried
65052 fi
65053 
65054 
65055 
65056 if test $pkg_failed = yes; then
65057 
65058 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65059         _pkg_short_errors_supported=yes
65060 else
65061         _pkg_short_errors_supported=no
65062 fi
65063         if test $_pkg_short_errors_supported = yes; then
65064                 LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
65065         else
65066                 LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
65067         fi
65068         # Put the nasty error message in config.log where it belongs
65069         echo "$LCMS_PKG_ERRORS" >&5
65070 
65071         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65072 $as_echo "no" >&6; }
65073                 LCMS_FOUND=no
65074 elif test $pkg_failed = untried; then
65075         LCMS_FOUND=no
65076 else
65077         LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
65078         LCMS_LIBS=$pkg_cv_LCMS_LIBS
65079         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65080 $as_echo "yes" >&6; }
65081         LCMS_FOUND=yes
65082 fi
65083     if test "x${LCMS_FOUND}" = "xyes"; then
65084       # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
65085       USE_EXTERNAL_LCMS=true
65086     else
65087       as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
65088     fi
65089   else
65090     as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
65091   fi
65092 
65093 
65094 
65095 
65096 
65097 
65098 
65099 
65100 
65101 
65102 
65103 
65104 
65105   # Setup libm (the maths library)
65106   if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
65107     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
65108 $as_echo_n "checking for cos in -lm... " >&6; }
65109 if ${ac_cv_lib_m_cos+:} false; then :
65110   $as_echo_n "(cached) " >&6
65111 else
65112   ac_check_lib_save_LIBS=$LIBS
65113 LIBS="-lm  $LIBS"
65114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65115 /* end confdefs.h.  */
65116 
65117 /* Override any GCC internal prototype to avoid an error.
65118    Use char because int might match the return type of a GCC
65119    builtin and then its argument prototype would still apply.  */
65120 #ifdef __cplusplus
65121 extern "C"
65122 #endif
65123 char cos ();
65124 int
65125 main ()
65126 {
65127 return cos ();
65128   ;
65129   return 0;
65130 }
65131 _ACEOF
65132 if ac_fn_cxx_try_link "$LINENO"; then :
65133   ac_cv_lib_m_cos=yes
65134 else
65135   ac_cv_lib_m_cos=no
65136 fi
65137 rm -f core conftest.err conftest.$ac_objext \
65138     conftest$ac_exeext conftest.$ac_ext
65139 LIBS=$ac_check_lib_save_LIBS
65140 fi
65141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
65142 $as_echo "$ac_cv_lib_m_cos" >&6; }
65143 if test "x$ac_cv_lib_m_cos" = xyes; then :
65144   cat >>confdefs.h <<_ACEOF
65145 #define HAVE_LIBM 1
65146 _ACEOF
65147 
65148   LIBS="-lm $LIBS"
65149 
65150 else
65151 
65152         { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
65153 $as_echo "$as_me: Maths library was not found" >&6;}
65154 
65155 fi
65156 
65157     LIBM="-lm"
65158   else
65159     LIBM=""
65160   fi
65161 
65162 
65163   # Setup libdl (for dynamic library loading)
65164   save_LIBS="$LIBS"
65165   LIBS=""
65166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
65167 $as_echo_n "checking for dlopen in -ldl... " >&6; }
65168 if ${ac_cv_lib_dl_dlopen+:} false; then :
65169   $as_echo_n "(cached) " >&6
65170 else
65171   ac_check_lib_save_LIBS=$LIBS
65172 LIBS="-ldl  $LIBS"
65173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65174 /* end confdefs.h.  */
65175 
65176 /* Override any GCC internal prototype to avoid an error.
65177    Use char because int might match the return type of a GCC
65178    builtin and then its argument prototype would still apply.  */
65179 #ifdef __cplusplus
65180 extern "C"
65181 #endif
65182 char dlopen ();
65183 int
65184 main ()
65185 {
65186 return dlopen ();
65187   ;
65188   return 0;
65189 }
65190 _ACEOF
65191 if ac_fn_cxx_try_link "$LINENO"; then :
65192   ac_cv_lib_dl_dlopen=yes
65193 else
65194   ac_cv_lib_dl_dlopen=no
65195 fi
65196 rm -f core conftest.err conftest.$ac_objext \
65197     conftest$ac_exeext conftest.$ac_ext
65198 LIBS=$ac_check_lib_save_LIBS
65199 fi
65200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
65201 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
65202 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
65203   cat >>confdefs.h <<_ACEOF
65204 #define HAVE_LIBDL 1
65205 _ACEOF
65206 
65207   LIBS="-ldl $LIBS"
65208 
65209 fi
65210 
65211   LIBDL="$LIBS"
65212 
65213   LIBS="$save_LIBS"
65214 
65215   # Deprecated libraries, keep the flags for backwards compatibility
65216   if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
65217 
65218 
65219 # Check whether --with-dxsdk was given.
65220 if test "${with_dxsdk+set}" = set; then :
65221   withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
65222 $as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
65223 fi
65224 
65225 
65226 
65227 
65228 # Check whether --with-dxsdk-lib was given.
65229 if test "${with_dxsdk_lib+set}" = set; then :
65230   withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
65231 $as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
65232 fi
65233 
65234 
65235 
65236 
65237 # Check whether --with-dxsdk-include was given.
65238 if test "${with_dxsdk_include+set}" = set; then :
65239   withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
65240 $as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
65241 fi
65242 
65243 
65244   fi
65245 
65246   # Control if libzip can use mmap. Available for purposes of overriding.
65247   LIBZIP_CAN_USE_MMAP=true
65248 
65249 
65250 
65251   if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
65252     # Find the root of the Solaris Studio installation from the compiler path
65253     SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
65254     STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
65255     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
65256 $as_echo_n "checking for libstlport.so.1... " >&6; }
65257     if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
65258       # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
65259       STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
65260     fi
65261     if test -f "$STLPORT_LIB"; then
65262       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
65263 $as_echo "yes, $STLPORT_LIB" >&6; }
65264 
65265   # Only process if variable expands to non-empty
65266 
65267   if test "x$STLPORT_LIB" != x; then
65268     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65269 
65270   # Input might be given as Windows format, start by converting to
65271   # unix format.
65272   path="$STLPORT_LIB"
65273   new_path=`$CYGPATH -u "$path"`
65274 
65275   # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
65276   # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
65277   # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
65278   # "foo.exe" is OK but "foo" is an error.
65279   #
65280   # This test is therefore slightly more accurate than "test -f" to check for file precense.
65281   # It is also a way to make sure we got the proper file name for the real test later on.
65282   test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
65283   if test "x$test_shortpath" = x; then
65284     { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65285 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65286     as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
65287   fi
65288 
65289   # Call helper function which possibly converts this using DOS-style short mode.
65290   # If so, the updated path is stored in $new_path.
65291 
65292   input_path="$new_path"
65293   # Check if we need to convert this using DOS-style short mode. If the path
65294   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65295   # take no chances and rewrite it.
65296   # Note: m4 eats our [], so we need to use [ and ] instead.
65297   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
65298   if test "x$has_forbidden_chars" != x; then
65299     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65300     shortmode_path=`$CYGPATH -s -m -a "$input_path"`
65301     path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
65302     if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
65303       # Going to short mode and back again did indeed matter. Since short mode is
65304       # case insensitive, let's make it lowercase to improve readability.
65305       shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65306       # Now convert it back to Unix-style (cygpath)
65307       input_path=`$CYGPATH -u "$shortmode_path"`
65308       new_path="$input_path"
65309     fi
65310   fi
65311 
65312   test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
65313   if test "x$test_cygdrive_prefix" = x; then
65314     # As a simple fix, exclude /usr/bin since it's not a real path.
65315     if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
65316       # The path is in a Cygwin special directory (e.g. /home). We need this converted to
65317       # a path prefixed by /cygdrive for fixpath to work.
65318       new_path="$CYGWIN_ROOT_PATH$input_path"
65319     fi
65320   fi
65321 
65322 
65323   if test "x$path" != "x$new_path"; then
65324     STLPORT_LIB="$new_path"
65325     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65326 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65327   fi
65328 
65329     elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65330 
65331   path="$STLPORT_LIB"
65332   has_colon=`$ECHO $path | $GREP ^.:`
65333   new_path="$path"
65334   if test "x$has_colon" = x; then
65335     # Not in mixed or Windows style, start by that.
65336     new_path=`cmd //c echo $path`
65337   fi
65338 
65339 
65340   input_path="$new_path"
65341   # Check if we need to convert this using DOS-style short mode. If the path
65342   # contains just simple characters, use it. Otherwise (spaces, weird characters),
65343   # take no chances and rewrite it.
65344   # Note: m4 eats our [], so we need to use [ and ] instead.
65345   has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
65346   if test "x$has_forbidden_chars" != x; then
65347     # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
65348     new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
65349   fi
65350 
65351 
65352   windows_path="$new_path"
65353   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65354     unix_path=`$CYGPATH -u "$windows_path"`
65355     new_path="$unix_path"
65356   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65357     unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
65358     new_path="$unix_path"
65359   fi
65360 
65361   if test "x$path" != "x$new_path"; then
65362     STLPORT_LIB="$new_path"
65363     { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
65364 $as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
65365   fi
65366 
65367   # Save the first 10 bytes of this path to the storage, so fixpath can work.
65368   all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
65369 
65370     else
65371       # We're on a unix platform. Hooray! :)
65372       path="$STLPORT_LIB"
65373       has_space=`$ECHO "$path" | $GREP " "`
65374       if test "x$has_space" != x; then
65375         { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
65376 $as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
65377         as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
65378       fi
65379 
65380       # Use eval to expand a potential ~
65381       eval path="$path"
65382       if test ! -f "$path" && test ! -d "$path"; then
65383         as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
65384       fi
65385 
65386       if test -d "$path"; then
65387         STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
65388       else
65389         dir="`$DIRNAME "$path"`"
65390         base="`$BASENAME "$path"`"
65391         STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
65392       fi
65393     fi
65394   fi
65395 
65396     else
65397       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
65398 $as_echo "no, not found at $STLPORT_LIB" >&6; }
65399       as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
65400     fi
65401 
65402   fi
65403 
65404 
65405 
65406 # Check whether --with-libelf was given.
65407 if test "${with_libelf+set}" = set; then :
65408   withval=$with_libelf;
65409 fi
65410 
65411 
65412 # Check whether --with-libelf-include was given.
65413 if test "${with_libelf_include+set}" = set; then :
65414   withval=$with_libelf_include;
65415 fi
65416 
65417 
65418 # Check whether --with-libelf-lib was given.
65419 if test "${with_libelf_lib+set}" = set; then :
65420   withval=$with_libelf_lib;
65421 fi
65422 
65423 
65424   if test "x$ENABLE_AOT" = xfalse; then
65425     if (test "x${with_libelf}" != x && test "x${with_libelf}" != xno) || \
65426         (test "x${with_libelf_include}" != x && test "x${with_libelf_include}" != xno) || \
65427         (test "x${with_libelf_lib}" != x && test "x${with_libelf_lib}" != xno); then
65428       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&5
65429 $as_echo "$as_me: WARNING: libelf is not used, so --with-libelf[-*] is ignored" >&2;}
65430     fi
65431     LIBELF_CFLAGS=
65432     LIBELF_LIBS=
65433   else
65434     LIBELF_FOUND=no
65435 
65436     if test "x${with_libelf}" = xno || test "x${with_libelf_include}" = xno || test "x${with_libelf_lib}" = xno; then
65437       ENABLE_AOT="false"
65438       if test "x${enable_aot}" = xyes; then
65439         as_fn_error $? "libelf is explicitly disabled, cannot build AOT. Enable libelf or remove --enable-aot to disable AOT." "$LINENO" 5
65440       fi
65441     else
65442       if test "x${with_libelf}" != x; then
65443         ELF_LIBS="-L${with_libelf}/lib -lelf"
65444         ELF_CFLAGS="-I${with_libelf}/include"
65445         LIBELF_FOUND=yes
65446       fi
65447       if test "x${with_libelf_include}" != x; then
65448         ELF_CFLAGS="-I${with_libelf_include}"
65449         LIBELF_FOUND=yes
65450       fi
65451       if test "x${with_libelf_lib}" != x; then
65452         ELF_LIBS="-L${with_libelf_lib} -lelf"
65453         LIBELF_FOUND=yes
65454       fi
65455       # Do not try pkg-config if we have a sysroot set.
65456       if test "x$SYSROOT" = x; then
65457         if test "x$LIBELF_FOUND" = xno; then
65458           # Figure out ELF_CFLAGS and ELF_LIBS
65459 
65460 pkg_failed=no
65461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF" >&5
65462 $as_echo_n "checking for ELF... " >&6; }
65463 
65464 if test -n "$ELF_CFLAGS"; then
65465     pkg_cv_ELF_CFLAGS="$ELF_CFLAGS"
65466  elif test -n "$PKG_CONFIG"; then
65467     if test -n "$PKG_CONFIG" && \
65468     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65469   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65470   ac_status=$?
65471   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65472   test $ac_status = 0; }; then
65473   pkg_cv_ELF_CFLAGS=`$PKG_CONFIG --cflags "libelf" 2>/dev/null`
65474 else
65475   pkg_failed=yes
65476 fi
65477  else
65478     pkg_failed=untried
65479 fi
65480 if test -n "$ELF_LIBS"; then
65481     pkg_cv_ELF_LIBS="$ELF_LIBS"
65482  elif test -n "$PKG_CONFIG"; then
65483     if test -n "$PKG_CONFIG" && \
65484     { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libelf\""; } >&5
65485   ($PKG_CONFIG --exists --print-errors "libelf") 2>&5
65486   ac_status=$?
65487   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
65488   test $ac_status = 0; }; then
65489   pkg_cv_ELF_LIBS=`$PKG_CONFIG --libs "libelf" 2>/dev/null`
65490 else
65491   pkg_failed=yes
65492 fi
65493  else
65494     pkg_failed=untried
65495 fi
65496 
65497 
65498 
65499 if test $pkg_failed = yes; then
65500 
65501 if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
65502         _pkg_short_errors_supported=yes
65503 else
65504         _pkg_short_errors_supported=no
65505 fi
65506         if test $_pkg_short_errors_supported = yes; then
65507                 ELF_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libelf" 2>&1`
65508         else
65509                 ELF_PKG_ERRORS=`$PKG_CONFIG --print-errors "libelf" 2>&1`
65510         fi
65511         # Put the nasty error message in config.log where it belongs
65512         echo "$ELF_PKG_ERRORS" >&5
65513 
65514         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65515 $as_echo "no" >&6; }
65516                 LIBELF_FOUND=no
65517 elif test $pkg_failed = untried; then
65518         LIBELF_FOUND=no
65519 else
65520         ELF_CFLAGS=$pkg_cv_ELF_CFLAGS
65521         ELF_LIBS=$pkg_cv_ELF_LIBS
65522         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65523 $as_echo "yes" >&6; }
65524         LIBELF_FOUND=yes
65525 fi
65526         fi
65527       fi
65528       if test "x$LIBELF_FOUND" = xno; then
65529         for ac_header in libelf.h
65530 do :
65531   ac_fn_cxx_check_header_mongrel "$LINENO" "libelf.h" "ac_cv_header_libelf_h" "$ac_includes_default"
65532 if test "x$ac_cv_header_libelf_h" = xyes; then :
65533   cat >>confdefs.h <<_ACEOF
65534 #define HAVE_LIBELF_H 1
65535 _ACEOF
65536 
65537               LIBELF_FOUND=yes
65538               ELF_CFLAGS=
65539               ELF_LIBS=-lelf
65540 
65541 else
65542   LIBELF_FOUND=no
65543 
65544 fi
65545 
65546 done
65547 
65548       fi
65549       if test "x$LIBELF_FOUND" = xno; then
65550         ENABLE_AOT="false"
65551 
65552   # Print a helpful message on how to acquire the necessary build dependency.
65553   # elf is the help tag: freetype, cups, alsa etc
65554   MISSING_DEPENDENCY=elf
65555 
65556   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65557     cygwin_help $MISSING_DEPENDENCY
65558   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65559     msys_help $MISSING_DEPENDENCY
65560   else
65561     PKGHANDLER_COMMAND=
65562 
65563     case $PKGHANDLER in
65564       apt-get)
65565         apt_help     $MISSING_DEPENDENCY ;;
65566       yum)
65567         yum_help     $MISSING_DEPENDENCY ;;
65568       brew)
65569         brew_help    $MISSING_DEPENDENCY ;;
65570       port)
65571         port_help    $MISSING_DEPENDENCY ;;
65572       pkgutil)
65573         pkgutil_help $MISSING_DEPENDENCY ;;
65574       pkgadd)
65575         pkgadd_help  $MISSING_DEPENDENCY ;;
65576     esac
65577 
65578     if test "x$PKGHANDLER_COMMAND" != x; then
65579       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65580     fi
65581   fi
65582 
65583         if test "x${enable_aot}" = xyes; then
65584           as_fn_error $? "libelf not found, cannot build AOT. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65585         else
65586           { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&5
65587 $as_echo "$as_me: WARNING: libelf not found, cannot build AOT. $HELP_MSG" >&2;}
65588         fi
65589       else
65590         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libelf works" >&5
65591 $as_echo_n "checking if libelf works... " >&6; }
65592         ac_ext=c
65593 ac_cpp='$CPP $CPPFLAGS'
65594 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65595 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65596 ac_compiler_gnu=$ac_cv_c_compiler_gnu
65597 
65598         OLD_CFLAGS="$CFLAGS"
65599         CFLAGS="$CFLAGS $ELF_CFLAGS"
65600         OLD_LIBS="$LIBS"
65601         LIBS="$LIBS $ELF_LIBS"
65602         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65603 /* end confdefs.h.  */
65604 #include <libelf.h>
65605 int
65606 main ()
65607 {
65608 
65609               elf_version(0);
65610               return 0;
65611 
65612   ;
65613   return 0;
65614 }
65615 _ACEOF
65616 if ac_fn_c_try_link "$LINENO"; then :
65617   LIBELF_WORKS=yes
65618 else
65619   LIBELF_WORKS=no
65620 
65621 fi
65622 rm -f core conftest.err conftest.$ac_objext \
65623     conftest$ac_exeext conftest.$ac_ext
65624         CFLAGS="$OLD_CFLAGS"
65625         LIBS="$OLD_LIBS"
65626         ac_ext=cpp
65627 ac_cpp='$CXXCPP $CPPFLAGS'
65628 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
65629 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
65630 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
65631 
65632         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBELF_WORKS" >&5
65633 $as_echo "$LIBELF_WORKS" >&6; }
65634 
65635         if test "x$LIBELF_WORKS" = xno; then
65636           ENABLE_AOT="false"
65637 
65638   # Print a helpful message on how to acquire the necessary build dependency.
65639   # elf is the help tag: freetype, cups, alsa etc
65640   MISSING_DEPENDENCY=elf
65641 
65642   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65643     cygwin_help $MISSING_DEPENDENCY
65644   elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65645     msys_help $MISSING_DEPENDENCY
65646   else
65647     PKGHANDLER_COMMAND=
65648 
65649     case $PKGHANDLER in
65650       apt-get)
65651         apt_help     $MISSING_DEPENDENCY ;;
65652       yum)
65653         yum_help     $MISSING_DEPENDENCY ;;
65654       brew)
65655         brew_help    $MISSING_DEPENDENCY ;;
65656       port)
65657         port_help    $MISSING_DEPENDENCY ;;
65658       pkgutil)
65659         pkgutil_help $MISSING_DEPENDENCY ;;
65660       pkgadd)
65661         pkgadd_help  $MISSING_DEPENDENCY ;;
65662     esac
65663 
65664     if test "x$PKGHANDLER_COMMAND" != x; then
65665       HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
65666     fi
65667   fi
65668 
65669           if test "x$enable_aot" = "xyes"; then
65670             as_fn_error $? "Found libelf but could not link and compile with it. Remove --enable-aot to disable AOT or: $HELP_MSG" "$LINENO" 5
65671           else
65672             { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&5
65673 $as_echo "$as_me: WARNING: Found libelf but could not link and compile with it. $HELP_MSG" >&2;}
65674           fi
65675         fi
65676       fi
65677     fi
65678   fi
65679 
65680 
65681 
65682 
65683 
65684 
65685 
65686 
65687 
65688 
65689 
65690 
65691 
65692 
65693 
65694 
65695 
65696 
65697 # Hotspot setup depends on lib checks (AOT needs libelf).
65698 
65699 
65700   # The user can in some cases supply additional jvm features. For the custom
65701   # variant, this defines the entire variant.
65702 
65703 # Check whether --with-jvm-features was given.
65704 if test "${with_jvm_features+set}" = set; then :
65705   withval=$with_jvm_features;
65706 fi
65707 
65708   if test "x$with_jvm_features" != x; then
65709     { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
65710 $as_echo_n "checking additional JVM features... " >&6; }
65711     JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
65712     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
65713 $as_echo "$JVM_FEATURES" >&6; }
65714   fi
65715 
65716   # Override hotspot cpu definitions for ARM platforms
65717   if test "x$OPENJDK_TARGET_CPU" = xarm; then
65718     HOTSPOT_TARGET_CPU=arm_32
65719     HOTSPOT_TARGET_CPU_DEFINE="ARM32"
65720     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65721     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65722   elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
65723     HOTSPOT_TARGET_CPU=arm_64
65724     HOTSPOT_TARGET_CPU_ARCH=arm
65725     JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
65726     JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
65727   fi
65728 
65729   # Verify that dependencies are met for explicitly set features.
65730   if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
65731     as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
65732   fi
65733 
65734   if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
65735     as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
65736   fi
65737 
65738   if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
65739     as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
65740   fi
65741 
65742   if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65743     as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
65744   fi
65745 
65746   if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
65747     as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
65748   fi
65749 
65750   # Turn on additional features based on other parts of configure
65751   if test "x$INCLUDE_DTRACE" = "xtrue"; then
65752     JVM_FEATURES="$JVM_FEATURES dtrace"
65753   else
65754     if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
65755       as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
65756     fi
65757   fi
65758 
65759   if test "x$STATIC_BUILD" = "xtrue"; then
65760     JVM_FEATURES="$JVM_FEATURES static-build"
65761   else
65762     if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
65763       as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
65764     fi
65765   fi
65766 
65767   if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65768     if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
65769       as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
65770     fi
65771   fi
65772 
65773   if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
65774     if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
65775       as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
65776     fi
65777   fi
65778 
65779   # Only enable jvmci on x86_64, sparcv9 and aarch64.
65780   if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
65781      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
65782      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
65783     JVM_FEATURES_jvmci="jvmci"
65784   else
65785     JVM_FEATURES_jvmci=""
65786   fi
65787 
65788   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
65789 $as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
65790   if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
65791     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65792 $as_echo "yes, forced" >&6; }
65793     if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
65794       as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
65795     fi
65796     INCLUDE_GRAAL="true"
65797   else
65798     # By default enable graal build where AOT is available
65799     if test "x$ENABLE_AOT" = "xtrue"; then
65800       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65801 $as_echo "yes" >&6; }
65802       JVM_FEATURES_graal="graal"
65803       INCLUDE_GRAAL="true"
65804     else
65805       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65806 $as_echo "no" >&6; }
65807       JVM_FEATURES_graal=""
65808       INCLUDE_GRAAL="false"
65809     fi
65810   fi
65811 
65812 
65813 
65814   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
65815 $as_echo_n "checking if aot should be enabled... " >&6; }
65816   if test "x$ENABLE_AOT" = "xtrue"; then
65817     if test "x$enable_aot" = "xyes"; then
65818       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65819 $as_echo "yes, forced" >&6; }
65820     else
65821       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65822 $as_echo "yes" >&6; }
65823     fi
65824     JVM_FEATURES_aot="aot"
65825   else
65826     if test "x$enable_aot" = "xno"; then
65827       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65828 $as_echo "no, forced" >&6; }
65829     else
65830       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65831 $as_echo "no" >&6; }
65832     fi
65833     JVM_FEATURES_aot=""
65834   fi
65835 
65836   if test "x$OPENJDK_TARGET_CPU" = xarm ; then
65837     # Default to use link time optimizations on minimal on arm
65838     JVM_FEATURES_link_time_opt="link-time-opt"
65839   else
65840     JVM_FEATURES_link_time_opt=""
65841   fi
65842 
65843   # All variants but minimal (and custom) get these features
65844   NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
65845 
65846   # Enable features depending on variant.
65847   JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
65848   JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
65849   JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
65850   JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
65851   JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
65852   JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
65853   JVM_FEATURES_custom="$JVM_FEATURES"
65854 
65855 
65856 
65857 
65858 
65859 
65860 
65861 
65862 
65863   # Used for verification of Makefiles by check-jvm-feature
65864 
65865 
65866   # We don't support --with-jvm-interpreter anymore, use zero instead.
65867 
65868 
65869 # Check whether --with-jvm-interpreter was given.
65870 if test "${with_jvm_interpreter+set}" = set; then :
65871   withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
65872 $as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
65873 fi
65874 
65875 
65876 
65877 
65878 ###############################################################################
65879 #
65880 # We need to do some final tweaking, when everything else is done.
65881 #
65882 ###############################################################################
65883 
65884 
65885   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
65886 $as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
65887 
65888   if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
65889     ENABLE_INTREE_EC=true
65890     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65891 $as_echo "yes" >&6; }
65892   else
65893     ENABLE_INTREE_EC=false
65894     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65895 $as_echo "no" >&6; }
65896   fi
65897 
65898 
65899 
65900 
65901   # Check whether --enable-jtreg-failure-handler was given.
65902 if test "${enable_jtreg_failure_handler+set}" = set; then :
65903   enableval=$enable_jtreg_failure_handler;
65904 fi
65905 
65906 
65907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
65908 $as_echo_n "checking if jtreg failure handler should be built... " >&6; }
65909 
65910   if test "x$enable_jtreg_failure_handler" = "xyes"; then
65911     if test "x$JT_HOME" = "x"; then
65912       as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
65913     else
65914       BUILD_FAILURE_HANDLER=true
65915       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65916 $as_echo "yes, forced" >&6; }
65917     fi
65918   elif test "x$enable_jtreg_failure_handler" = "xno"; then
65919     BUILD_FAILURE_HANDLER=false
65920     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65921 $as_echo "no, forced" >&6; }
65922   elif test "x$enable_jtreg_failure_handler" = "xauto" \
65923       || test "x$enable_jtreg_failure_handler" = "x"; then
65924     if test "x$JT_HOME" = "x"; then
65925       BUILD_FAILURE_HANDLER=false
65926       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
65927 $as_echo "no, missing jtreg" >&6; }
65928     else
65929       BUILD_FAILURE_HANDLER=true
65930       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
65931 $as_echo "yes, jtreg present" >&6; }
65932     fi
65933   else
65934     as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
65935   fi
65936 
65937 
65938 
65939 
65940   # Check whether --enable-generate-classlist was given.
65941 if test "${enable_generate_classlist+set}" = set; then :
65942   enableval=$enable_generate_classlist;
65943 fi
65944 
65945 
65946   # Check if it's likely that it's possible to generate the classlist. Depending
65947   # on exact jvm configuration it could be possible anyway.
65948   if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
65949     ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
65950   else
65951     ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
65952   fi
65953 
65954   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
65955 $as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
65956   if test "x$enable_generate_classlist" = "xyes"; then
65957     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
65958 $as_echo "yes, forced" >&6; }
65959     ENABLE_GENERATE_CLASSLIST="true"
65960     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
65961       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
65962 $as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
65963     fi
65964   elif test "x$enable_generate_classlist" = "xno"; then
65965     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65966 $as_echo "no, forced" >&6; }
65967     ENABLE_GENERATE_CLASSLIST="false"
65968   elif test "x$enable_generate_classlist" = "x"; then
65969     if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
65970       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65971 $as_echo "yes" >&6; }
65972       ENABLE_GENERATE_CLASSLIST="true"
65973     else
65974       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65975 $as_echo "no" >&6; }
65976       ENABLE_GENERATE_CLASSLIST="false"
65977     fi
65978   else
65979     as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
65980   fi
65981 
65982 
65983 
65984 
65985 ###############################################################################
65986 #
65987 # Configure parts of the build that only affect the build performance,
65988 # not the result.
65989 #
65990 ###############################################################################
65991 
65992 
65993   # How many cores do we have on this build system?
65994 
65995 # Check whether --with-num-cores was given.
65996 if test "${with_num_cores+set}" = set; then :
65997   withval=$with_num_cores;
65998 fi
65999 
66000   if test "x$with_num_cores" = x; then
66001     # The number of cores were not specified, try to probe them.
66002 
66003   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
66004 $as_echo_n "checking for number of cores... " >&6; }
66005   NUM_CORES=1
66006   FOUND_CORES=no
66007 
66008   if test -f /proc/cpuinfo; then
66009     # Looks like a Linux (or cygwin) system
66010     NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
66011     FOUND_CORES=yes
66012   elif test -x /usr/sbin/psrinfo; then
66013     # Looks like a Solaris system
66014     NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
66015     FOUND_CORES=yes
66016   elif test -x /usr/sbin/sysctl; then
66017     # Looks like a MacOSX system
66018     NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
66019     FOUND_CORES=yes
66020   elif test "x$OPENJDK_BUILD_OS" = xaix ; then
66021     NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
66022     FOUND_CORES=yes
66023   elif test -n "$NUMBER_OF_PROCESSORS"; then
66024     # On windows, look in the env
66025     NUM_CORES=$NUMBER_OF_PROCESSORS
66026     FOUND_CORES=yes
66027   fi
66028 
66029   if test "x$FOUND_CORES" = xyes; then
66030     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
66031 $as_echo "$NUM_CORES" >&6; }
66032   else
66033     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
66034 $as_echo "could not detect number of cores, defaulting to 1" >&6; }
66035     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
66036 $as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
66037   fi
66038 
66039   else
66040     NUM_CORES=$with_num_cores
66041   fi
66042 
66043 
66044 
66045   # How much memory do we have on this build system?
66046 
66047 # Check whether --with-memory-size was given.
66048 if test "${with_memory_size+set}" = set; then :
66049   withval=$with_memory_size;
66050 fi
66051 
66052   if test "x$with_memory_size" = x; then
66053     # The memory size was not specified, try to probe it.
66054 
66055   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
66056 $as_echo_n "checking for memory size... " >&6; }
66057   # Default to 1024 MB
66058   MEMORY_SIZE=1024
66059   FOUND_MEM=no
66060 
66061   if test -f /proc/meminfo; then
66062     # Looks like a Linux (or cygwin) system
66063     MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
66064     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
66065     FOUND_MEM=yes
66066   elif test -x /usr/sbin/prtconf; then
66067     # Looks like a Solaris or AIX system
66068     MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
66069     FOUND_MEM=yes
66070   elif test -x /usr/sbin/sysctl; then
66071     # Looks like a MacOSX system
66072     MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
66073     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66074     FOUND_MEM=yes
66075   elif test "x$OPENJDK_BUILD_OS" = xwindows; then
66076     # Windows, but without cygwin
66077     MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
66078     MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
66079     FOUND_MEM=yes
66080   fi
66081 
66082   if test "x$FOUND_MEM" = xyes; then
66083     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
66084 $as_echo "$MEMORY_SIZE MB" >&6; }
66085   else
66086     { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
66087 $as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
66088     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
66089 $as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
66090   fi
66091 
66092   else
66093     MEMORY_SIZE=$with_memory_size
66094   fi
66095 
66096 
66097 
66098   # Provide a decent default number of parallel jobs for make depending on
66099   # number of cores, amount of memory and machine architecture.
66100 
66101 # Check whether --with-jobs was given.
66102 if test "${with_jobs+set}" = set; then :
66103   withval=$with_jobs;
66104 fi
66105 
66106   if test "x$with_jobs" = x; then
66107     # Number of jobs was not specified, calculate.
66108     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
66109 $as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
66110     # Approximate memory in GB.
66111     memory_gb=`expr $MEMORY_SIZE / 1024`
66112     # Pick the lowest of memory in gb and number of cores.
66113     if test "$memory_gb" -lt "$NUM_CORES"; then
66114       JOBS="$memory_gb"
66115     else
66116       JOBS="$NUM_CORES"
66117     fi
66118     if test "$JOBS" -eq "0"; then
66119       JOBS=1
66120     fi
66121     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
66122 $as_echo "$JOBS" >&6; }
66123   else
66124     JOBS=$with_jobs
66125   fi
66126 
66127 
66128 
66129   # The number of test jobs will be chosen automatically if TEST_JOBS is 0
66130 
66131 # Check whether --with-test-jobs was given.
66132 if test "${with_test_jobs+set}" = set; then :
66133   withval=$with_test_jobs;
66134 fi
66135 
66136   if test "x$with_test_jobs" = x; then
66137       TEST_JOBS=0
66138   else
66139       TEST_JOBS=$with_test_jobs
66140   fi
66141 
66142 
66143 
66144 # Setup arguments for the boot jdk (after cores and memory have been setup)
66145 
66146   ##############################################################################
66147   #
66148   # Specify jvm options for anything that is run with the Boot JDK.
66149   # Not all JVM:s accept the same arguments on the command line.
66150   #
66151 
66152 # Check whether --with-boot-jdk-jvmargs was given.
66153 if test "${with_boot_jdk_jvmargs+set}" = set; then :
66154   withval=$with_boot_jdk_jvmargs;
66155 fi
66156 
66157 
66158   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
66159 $as_echo_n "checking flags for boot jdk java command ... " >&6; }
66160 
66161   # Disable special log output when a debug build is used as Boot JDK...
66162 
66163   $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
66164   $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
66165   OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
66166   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66167   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66168   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66169     boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
66170     JVM_ARG_OK=true
66171   else
66172     $ECHO "Arg failed:" >&5
66173     $ECHO "$OUTPUT" >&5
66174     JVM_ARG_OK=false
66175   fi
66176 
66177 
66178   # Force en-US environment
66179 
66180   $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
66181   $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
66182   OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
66183   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66184   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66185   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66186     boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
66187     JVM_ARG_OK=true
66188   else
66189     $ECHO "Arg failed:" >&5
66190     $ECHO "$OUTPUT" >&5
66191     JVM_ARG_OK=false
66192   fi
66193 
66194 
66195   # Apply user provided options.
66196 
66197   $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
66198   $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
66199   OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
66200   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66201   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66202   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66203     boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
66204     JVM_ARG_OK=true
66205   else
66206     $ECHO "Arg failed:" >&5
66207     $ECHO "$OUTPUT" >&5
66208     JVM_ARG_OK=false
66209   fi
66210 
66211 
66212   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
66213 $as_echo "$boot_jdk_jvmargs" >&6; }
66214 
66215   # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
66216   JAVA_FLAGS=$boot_jdk_jvmargs
66217 
66218 
66219 
66220   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
66221 $as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
66222 
66223   # Starting amount of heap memory.
66224 
66225   $ECHO "Check if jvm arg is ok: -Xms64M" >&5
66226   $ECHO "Command: $JAVA -Xms64M -version" >&5
66227   OUTPUT=`$JAVA -Xms64M -version 2>&1`
66228   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66229   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66230   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66231     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
66232     JVM_ARG_OK=true
66233   else
66234     $ECHO "Arg failed:" >&5
66235     $ECHO "$OUTPUT" >&5
66236     JVM_ARG_OK=false
66237   fi
66238 
66239   BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
66240 
66241   # Maximum amount of heap memory and stack size.
66242   JVM_HEAP_LIMIT_32="1024"
66243   # Running a 64 bit JVM allows for and requires a bigger heap
66244   JVM_HEAP_LIMIT_64="1600"
66245   STACK_SIZE_32=768
66246   STACK_SIZE_64=1536
66247   JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
66248   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
66249     JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
66250   fi
66251   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
66252     JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
66253   fi
66254   if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
66255     JVM_HEAP_LIMIT_32=512
66256     JVM_HEAP_LIMIT_64=512
66257   fi
66258 
66259   if test "x$BOOT_JDK_BITS" = "x32"; then
66260     STACK_SIZE=$STACK_SIZE_32
66261     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
66262   else
66263     STACK_SIZE=$STACK_SIZE_64
66264     JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
66265   fi
66266 
66267   $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
66268   $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
66269   OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
66270   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66271   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66272   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66273     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
66274     JVM_ARG_OK=true
66275   else
66276     $ECHO "Arg failed:" >&5
66277     $ECHO "$OUTPUT" >&5
66278     JVM_ARG_OK=false
66279   fi
66280 
66281 
66282   $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
66283   $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
66284   OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
66285   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66286   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66287   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66288     boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
66289     JVM_ARG_OK=true
66290   else
66291     $ECHO "Arg failed:" >&5
66292     $ECHO "$OUTPUT" >&5
66293     JVM_ARG_OK=false
66294   fi
66295 
66296 
66297   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
66298 $as_echo "$boot_jdk_jvmargs_big" >&6; }
66299 
66300   JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
66301 
66302 
66303   if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
66304     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
66305     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
66306   else
66307     BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
66308     BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
66309   fi
66310   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
66311   BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
66312   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
66313 $as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
66314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
66315 $as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
66316 
66317 
66318   # By default, the main javac compilations use big
66319   JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
66320 
66321 
66322   { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
66323 $as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
66324 
66325   # Use serial gc for small short lived tools if possible
66326 
66327   $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
66328   $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
66329   OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
66330   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66331   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66332   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66333     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
66334     JVM_ARG_OK=true
66335   else
66336     $ECHO "Arg failed:" >&5
66337     $ECHO "$OUTPUT" >&5
66338     JVM_ARG_OK=false
66339   fi
66340 
66341 
66342   $ECHO "Check if jvm arg is ok: -Xms32M" >&5
66343   $ECHO "Command: $JAVA -Xms32M -version" >&5
66344   OUTPUT=`$JAVA -Xms32M -version 2>&1`
66345   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66346   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66347   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66348     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
66349     JVM_ARG_OK=true
66350   else
66351     $ECHO "Arg failed:" >&5
66352     $ECHO "$OUTPUT" >&5
66353     JVM_ARG_OK=false
66354   fi
66355 
66356 
66357   $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
66358   $ECHO "Command: $JAVA -Xmx512M -version" >&5
66359   OUTPUT=`$JAVA -Xmx512M -version 2>&1`
66360   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66361   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66362   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66363     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
66364     JVM_ARG_OK=true
66365   else
66366     $ECHO "Arg failed:" >&5
66367     $ECHO "$OUTPUT" >&5
66368     JVM_ARG_OK=false
66369   fi
66370 
66371 
66372   $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
66373   $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
66374   OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
66375   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66376   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66377   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66378     boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
66379     JVM_ARG_OK=true
66380   else
66381     $ECHO "Arg failed:" >&5
66382     $ECHO "$OUTPUT" >&5
66383     JVM_ARG_OK=false
66384   fi
66385 
66386 
66387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
66388 $as_echo "$boot_jdk_jvmargs_small" >&6; }
66389 
66390   JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
66391 
66392 
66393   JAVA_TOOL_FLAGS_SMALL=""
66394   for f in $JAVA_FLAGS_SMALL; do
66395     JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
66396   done
66397 
66398 
66399 
66400 # Setup smart javac (after cores and memory have been setup)
66401 
66402 
66403 # Check whether --with-sjavac-server-java was given.
66404 if test "${with_sjavac_server_java+set}" = set; then :
66405   withval=$with_sjavac_server_java;
66406 fi
66407 
66408 
66409   if test "x$with_sjavac_server_java" != x; then
66410     SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
66411     FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
66412     if test "x$FOUND_VERSION" = x; then
66413       as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
66414     fi
66415   else
66416     SJAVAC_SERVER_JAVA="$JAVA"
66417   fi
66418 
66419 
66420   if test "$MEMORY_SIZE" -gt "3000"; then
66421     if "$JAVA" -version 2>&1 | $GREP -q "64-Bit"; then
66422       JVM_64BIT=true
66423     fi
66424   fi
66425 
66426   MX_VALUE=`expr $MEMORY_SIZE / 2`
66427   if test "$JVM_64BIT" = true; then
66428     # Set ms lower than mx since more than one instance of the server might
66429     # get launched at the same time before they figure out which instance won.
66430     MS_VALUE=512
66431     if test "$MX_VALUE" -gt "2048"; then
66432       MX_VALUE=2048
66433     fi
66434   else
66435     MS_VALUE=256
66436     if test "$MX_VALUE" -gt "1500"; then
66437       MX_VALUE=1500
66438     fi
66439   fi
66440   if test "$MX_VALUE" -lt "512"; then
66441     MX_VALUE=512
66442   fi
66443 
66444   $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
66445   $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
66446   OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
66447   FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
66448   FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
66449   if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
66450     SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
66451     JVM_ARG_OK=true
66452   else
66453     $ECHO "Arg failed:" >&5
66454     $ECHO "$OUTPUT" >&5
66455     JVM_ARG_OK=false
66456   fi
66457 
66458 
66459 
66460   # Check whether --enable-sjavac was given.
66461 if test "${enable_sjavac+set}" = set; then :
66462   enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
66463 else
66464   ENABLE_SJAVAC="no"
66465 fi
66466 
66467   if test "x$JVM_ARG_OK" = "xfalse"; then
66468     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
66469 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
66470     ENABLE_SJAVAC="no"
66471   fi
66472   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
66473 $as_echo_n "checking whether to use sjavac... " >&6; }
66474   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
66475 $as_echo "$ENABLE_SJAVAC" >&6; }
66476 
66477 
66478   # Check whether --enable-javac-server was given.
66479 if test "${enable_javac_server+set}" = set; then :
66480   enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
66481 else
66482   ENABLE_JAVAC_SERVER="yes"
66483 fi
66484 
66485   if test "x$JVM_ARG_OK" = "xfalse"; then
66486     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
66487 $as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
66488     ENABLE_JAVAC_SERVER="no"
66489   fi
66490   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
66491 $as_echo_n "checking whether to use javac server... " >&6; }
66492   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
66493 $as_echo "$ENABLE_JAVAC_SERVER" >&6; }
66494 
66495 
66496   if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
66497     # When using a server javac, the small client instances do not need much
66498     # resources.
66499     JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
66500   fi
66501 
66502 
66503 # Setup use of icecc if requested
66504 
66505   # Check whether --enable-icecc was given.
66506 if test "${enable_icecc+set}" = set; then :
66507   enableval=$enable_icecc;
66508 fi
66509 
66510 
66511   if test "x${enable_icecc}" = "xyes"; then
66512 
66513 
66514 
66515   # Publish this variable in the help.
66516 
66517 
66518   if [ -z "${ICECC_CMD+x}" ]; then
66519     # The variable is not set by user, try to locate tool using the code snippet
66520     for ac_prog in icecc
66521 do
66522   # Extract the first word of "$ac_prog", so it can be a program name with args.
66523 set dummy $ac_prog; ac_word=$2
66524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66525 $as_echo_n "checking for $ac_word... " >&6; }
66526 if ${ac_cv_path_ICECC_CMD+:} false; then :
66527   $as_echo_n "(cached) " >&6
66528 else
66529   case $ICECC_CMD in
66530   [\\/]* | ?:[\\/]*)
66531   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66532   ;;
66533   *)
66534   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66535 for as_dir in $PATH
66536 do
66537   IFS=$as_save_IFS
66538   test -z "$as_dir" && as_dir=.
66539     for ac_exec_ext in '' $ac_executable_extensions; do
66540   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66541     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66542     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66543     break 2
66544   fi
66545 done
66546   done
66547 IFS=$as_save_IFS
66548 
66549   ;;
66550 esac
66551 fi
66552 ICECC_CMD=$ac_cv_path_ICECC_CMD
66553 if test -n "$ICECC_CMD"; then
66554   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66555 $as_echo "$ICECC_CMD" >&6; }
66556 else
66557   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66558 $as_echo "no" >&6; }
66559 fi
66560 
66561 
66562   test -n "$ICECC_CMD" && break
66563 done
66564 
66565   else
66566     # The variable is set, but is it from the command line or the environment?
66567 
66568     # Try to remove the string !ICECC_CMD! from our list.
66569     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
66570     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66571       # If it failed, the variable was not from the command line. Ignore it,
66572       # but warn the user (except for BASH, which is always set by the calling BASH).
66573       if test "xICECC_CMD" != xBASH; then
66574         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
66575 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
66576       fi
66577       # Try to locate tool using the code snippet
66578       for ac_prog in icecc
66579 do
66580   # Extract the first word of "$ac_prog", so it can be a program name with args.
66581 set dummy $ac_prog; ac_word=$2
66582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66583 $as_echo_n "checking for $ac_word... " >&6; }
66584 if ${ac_cv_path_ICECC_CMD+:} false; then :
66585   $as_echo_n "(cached) " >&6
66586 else
66587   case $ICECC_CMD in
66588   [\\/]* | ?:[\\/]*)
66589   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66590   ;;
66591   *)
66592   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66593 for as_dir in $PATH
66594 do
66595   IFS=$as_save_IFS
66596   test -z "$as_dir" && as_dir=.
66597     for ac_exec_ext in '' $ac_executable_extensions; do
66598   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66599     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66600     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66601     break 2
66602   fi
66603 done
66604   done
66605 IFS=$as_save_IFS
66606 
66607   ;;
66608 esac
66609 fi
66610 ICECC_CMD=$ac_cv_path_ICECC_CMD
66611 if test -n "$ICECC_CMD"; then
66612   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66613 $as_echo "$ICECC_CMD" >&6; }
66614 else
66615   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66616 $as_echo "no" >&6; }
66617 fi
66618 
66619 
66620   test -n "$ICECC_CMD" && break
66621 done
66622 
66623     else
66624       # If it succeeded, then it was overridden by the user. We will use it
66625       # for the tool.
66626 
66627       # First remove it from the list of overridden variables, so we can test
66628       # for unknown variables in the end.
66629       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66630 
66631       # Check if we try to supply an empty value
66632       if test "x$ICECC_CMD" = x; then
66633         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
66634 $as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
66635         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66636 $as_echo_n "checking for ICECC_CMD... " >&6; }
66637         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66638 $as_echo "disabled" >&6; }
66639       else
66640         # Check if the provided tool contains a complete path.
66641         tool_specified="$ICECC_CMD"
66642         tool_basename="${tool_specified##*/}"
66643         if test "x$tool_basename" = "x$tool_specified"; then
66644           # A command without a complete path is provided, search $PATH.
66645           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
66646 $as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
66647           # Extract the first word of "$tool_basename", so it can be a program name with args.
66648 set dummy $tool_basename; ac_word=$2
66649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66650 $as_echo_n "checking for $ac_word... " >&6; }
66651 if ${ac_cv_path_ICECC_CMD+:} false; then :
66652   $as_echo_n "(cached) " >&6
66653 else
66654   case $ICECC_CMD in
66655   [\\/]* | ?:[\\/]*)
66656   ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
66657   ;;
66658   *)
66659   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66660 for as_dir in $PATH
66661 do
66662   IFS=$as_save_IFS
66663   test -z "$as_dir" && as_dir=.
66664     for ac_exec_ext in '' $ac_executable_extensions; do
66665   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66666     ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
66667     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66668     break 2
66669   fi
66670 done
66671   done
66672 IFS=$as_save_IFS
66673 
66674   ;;
66675 esac
66676 fi
66677 ICECC_CMD=$ac_cv_path_ICECC_CMD
66678 if test -n "$ICECC_CMD"; then
66679   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
66680 $as_echo "$ICECC_CMD" >&6; }
66681 else
66682   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66683 $as_echo "no" >&6; }
66684 fi
66685 
66686 
66687           if test "x$ICECC_CMD" = x; then
66688             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66689           fi
66690         else
66691           # Otherwise we believe it is a complete path. Use it as it is.
66692           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
66693 $as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
66694           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
66695 $as_echo_n "checking for ICECC_CMD... " >&6; }
66696           if test ! -x "$tool_specified"; then
66697             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66698 $as_echo "not found" >&6; }
66699             as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
66700           fi
66701           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66702 $as_echo "$tool_specified" >&6; }
66703         fi
66704       fi
66705     fi
66706 
66707   fi
66708 
66709 
66710 
66711   if test "x$ICECC_CMD" = x; then
66712     as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
66713   fi
66714 
66715 
66716     old_path="$PATH"
66717 
66718     # Look for icecc-create-env in some known places
66719     PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
66720 
66721 
66722 
66723   # Publish this variable in the help.
66724 
66725 
66726   if [ -z "${ICECC_CREATE_ENV+x}" ]; then
66727     # The variable is not set by user, try to locate tool using the code snippet
66728     for ac_prog in icecc-create-env
66729 do
66730   # Extract the first word of "$ac_prog", so it can be a program name with args.
66731 set dummy $ac_prog; ac_word=$2
66732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66733 $as_echo_n "checking for $ac_word... " >&6; }
66734 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66735   $as_echo_n "(cached) " >&6
66736 else
66737   case $ICECC_CREATE_ENV in
66738   [\\/]* | ?:[\\/]*)
66739   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66740   ;;
66741   *)
66742   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66743 for as_dir in $PATH
66744 do
66745   IFS=$as_save_IFS
66746   test -z "$as_dir" && as_dir=.
66747     for ac_exec_ext in '' $ac_executable_extensions; do
66748   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66749     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66750     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66751     break 2
66752   fi
66753 done
66754   done
66755 IFS=$as_save_IFS
66756 
66757   ;;
66758 esac
66759 fi
66760 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66761 if test -n "$ICECC_CREATE_ENV"; then
66762   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66763 $as_echo "$ICECC_CREATE_ENV" >&6; }
66764 else
66765   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66766 $as_echo "no" >&6; }
66767 fi
66768 
66769 
66770   test -n "$ICECC_CREATE_ENV" && break
66771 done
66772 
66773   else
66774     # The variable is set, but is it from the command line or the environment?
66775 
66776     # Try to remove the string !ICECC_CREATE_ENV! from our list.
66777     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
66778     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66779       # If it failed, the variable was not from the command line. Ignore it,
66780       # but warn the user (except for BASH, which is always set by the calling BASH).
66781       if test "xICECC_CREATE_ENV" != xBASH; then
66782         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
66783 $as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
66784       fi
66785       # Try to locate tool using the code snippet
66786       for ac_prog in icecc-create-env
66787 do
66788   # Extract the first word of "$ac_prog", so it can be a program name with args.
66789 set dummy $ac_prog; ac_word=$2
66790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66791 $as_echo_n "checking for $ac_word... " >&6; }
66792 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66793   $as_echo_n "(cached) " >&6
66794 else
66795   case $ICECC_CREATE_ENV in
66796   [\\/]* | ?:[\\/]*)
66797   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66798   ;;
66799   *)
66800   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66801 for as_dir in $PATH
66802 do
66803   IFS=$as_save_IFS
66804   test -z "$as_dir" && as_dir=.
66805     for ac_exec_ext in '' $ac_executable_extensions; do
66806   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66807     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66808     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66809     break 2
66810   fi
66811 done
66812   done
66813 IFS=$as_save_IFS
66814 
66815   ;;
66816 esac
66817 fi
66818 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66819 if test -n "$ICECC_CREATE_ENV"; then
66820   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66821 $as_echo "$ICECC_CREATE_ENV" >&6; }
66822 else
66823   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66824 $as_echo "no" >&6; }
66825 fi
66826 
66827 
66828   test -n "$ICECC_CREATE_ENV" && break
66829 done
66830 
66831     else
66832       # If it succeeded, then it was overridden by the user. We will use it
66833       # for the tool.
66834 
66835       # First remove it from the list of overridden variables, so we can test
66836       # for unknown variables in the end.
66837       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66838 
66839       # Check if we try to supply an empty value
66840       if test "x$ICECC_CREATE_ENV" = x; then
66841         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
66842 $as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
66843         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66844 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66845         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66846 $as_echo "disabled" >&6; }
66847       else
66848         # Check if the provided tool contains a complete path.
66849         tool_specified="$ICECC_CREATE_ENV"
66850         tool_basename="${tool_specified##*/}"
66851         if test "x$tool_basename" = "x$tool_specified"; then
66852           # A command without a complete path is provided, search $PATH.
66853           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
66854 $as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
66855           # Extract the first word of "$tool_basename", so it can be a program name with args.
66856 set dummy $tool_basename; ac_word=$2
66857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66858 $as_echo_n "checking for $ac_word... " >&6; }
66859 if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
66860   $as_echo_n "(cached) " >&6
66861 else
66862   case $ICECC_CREATE_ENV in
66863   [\\/]* | ?:[\\/]*)
66864   ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
66865   ;;
66866   *)
66867   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66868 for as_dir in $PATH
66869 do
66870   IFS=$as_save_IFS
66871   test -z "$as_dir" && as_dir=.
66872     for ac_exec_ext in '' $ac_executable_extensions; do
66873   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66874     ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
66875     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66876     break 2
66877   fi
66878 done
66879   done
66880 IFS=$as_save_IFS
66881 
66882   ;;
66883 esac
66884 fi
66885 ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
66886 if test -n "$ICECC_CREATE_ENV"; then
66887   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
66888 $as_echo "$ICECC_CREATE_ENV" >&6; }
66889 else
66890   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66891 $as_echo "no" >&6; }
66892 fi
66893 
66894 
66895           if test "x$ICECC_CREATE_ENV" = x; then
66896             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66897           fi
66898         else
66899           # Otherwise we believe it is a complete path. Use it as it is.
66900           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
66901 $as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
66902           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
66903 $as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
66904           if test ! -x "$tool_specified"; then
66905             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66906 $as_echo "not found" >&6; }
66907             as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
66908           fi
66909           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66910 $as_echo "$tool_specified" >&6; }
66911         fi
66912       fi
66913     fi
66914 
66915   fi
66916 
66917 
66918 
66919   if test "x$ICECC_CREATE_ENV" = x; then
66920     as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
66921   fi
66922 
66923 
66924     # Use icecc-create-env to create a minimal compilation environment that can
66925     # be sent to the other hosts in the icecream cluster.
66926     icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
66927     ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
66928     # Older versions of icecc does not have the --gcc parameter
66929     if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
66930       icecc_gcc_arg="--gcc"
66931     fi
66932     if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
66933 
66934   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66935       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
66936           ${icecc_create_env_log} 2>&1 )
66937   if test "$?" != "0"; then
66938     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66939 $as_echo "$as_me: icecc-create-env output:" >&6;}
66940     cat \
66941           ${icecc_create_env_log}
66942     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66943   fi
66944 
66945     elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
66946       # For clang, the icecc compilerwrapper is needed. It usually resides next
66947       # to icecc-create-env.
66948 
66949 
66950 
66951   # Publish this variable in the help.
66952 
66953 
66954   if [ -z "${ICECC_WRAPPER+x}" ]; then
66955     # The variable is not set by user, try to locate tool using the code snippet
66956     for ac_prog in compilerwrapper
66957 do
66958   # Extract the first word of "$ac_prog", so it can be a program name with args.
66959 set dummy $ac_prog; ac_word=$2
66960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66961 $as_echo_n "checking for $ac_word... " >&6; }
66962 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
66963   $as_echo_n "(cached) " >&6
66964 else
66965   case $ICECC_WRAPPER in
66966   [\\/]* | ?:[\\/]*)
66967   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
66968   ;;
66969   *)
66970   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66971 for as_dir in $PATH
66972 do
66973   IFS=$as_save_IFS
66974   test -z "$as_dir" && as_dir=.
66975     for ac_exec_ext in '' $ac_executable_extensions; do
66976   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66977     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
66978     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66979     break 2
66980   fi
66981 done
66982   done
66983 IFS=$as_save_IFS
66984 
66985   ;;
66986 esac
66987 fi
66988 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
66989 if test -n "$ICECC_WRAPPER"; then
66990   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
66991 $as_echo "$ICECC_WRAPPER" >&6; }
66992 else
66993   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66994 $as_echo "no" >&6; }
66995 fi
66996 
66997 
66998   test -n "$ICECC_WRAPPER" && break
66999 done
67000 
67001   else
67002     # The variable is set, but is it from the command line or the environment?
67003 
67004     # Try to remove the string !ICECC_WRAPPER! from our list.
67005     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
67006     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67007       # If it failed, the variable was not from the command line. Ignore it,
67008       # but warn the user (except for BASH, which is always set by the calling BASH).
67009       if test "xICECC_WRAPPER" != xBASH; then
67010         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
67011 $as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
67012       fi
67013       # Try to locate tool using the code snippet
67014       for ac_prog in compilerwrapper
67015 do
67016   # Extract the first word of "$ac_prog", so it can be a program name with args.
67017 set dummy $ac_prog; ac_word=$2
67018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67019 $as_echo_n "checking for $ac_word... " >&6; }
67020 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67021   $as_echo_n "(cached) " >&6
67022 else
67023   case $ICECC_WRAPPER in
67024   [\\/]* | ?:[\\/]*)
67025   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67026   ;;
67027   *)
67028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67029 for as_dir in $PATH
67030 do
67031   IFS=$as_save_IFS
67032   test -z "$as_dir" && as_dir=.
67033     for ac_exec_ext in '' $ac_executable_extensions; do
67034   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67035     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67037     break 2
67038   fi
67039 done
67040   done
67041 IFS=$as_save_IFS
67042 
67043   ;;
67044 esac
67045 fi
67046 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67047 if test -n "$ICECC_WRAPPER"; then
67048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67049 $as_echo "$ICECC_WRAPPER" >&6; }
67050 else
67051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67052 $as_echo "no" >&6; }
67053 fi
67054 
67055 
67056   test -n "$ICECC_WRAPPER" && break
67057 done
67058 
67059     else
67060       # If it succeeded, then it was overridden by the user. We will use it
67061       # for the tool.
67062 
67063       # First remove it from the list of overridden variables, so we can test
67064       # for unknown variables in the end.
67065       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67066 
67067       # Check if we try to supply an empty value
67068       if test "x$ICECC_WRAPPER" = x; then
67069         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
67070 $as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
67071         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67072 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67073         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67074 $as_echo "disabled" >&6; }
67075       else
67076         # Check if the provided tool contains a complete path.
67077         tool_specified="$ICECC_WRAPPER"
67078         tool_basename="${tool_specified##*/}"
67079         if test "x$tool_basename" = "x$tool_specified"; then
67080           # A command without a complete path is provided, search $PATH.
67081           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
67082 $as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
67083           # Extract the first word of "$tool_basename", so it can be a program name with args.
67084 set dummy $tool_basename; ac_word=$2
67085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67086 $as_echo_n "checking for $ac_word... " >&6; }
67087 if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
67088   $as_echo_n "(cached) " >&6
67089 else
67090   case $ICECC_WRAPPER in
67091   [\\/]* | ?:[\\/]*)
67092   ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
67093   ;;
67094   *)
67095   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67096 for as_dir in $PATH
67097 do
67098   IFS=$as_save_IFS
67099   test -z "$as_dir" && as_dir=.
67100     for ac_exec_ext in '' $ac_executable_extensions; do
67101   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67102     ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
67103     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67104     break 2
67105   fi
67106 done
67107   done
67108 IFS=$as_save_IFS
67109 
67110   ;;
67111 esac
67112 fi
67113 ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
67114 if test -n "$ICECC_WRAPPER"; then
67115   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
67116 $as_echo "$ICECC_WRAPPER" >&6; }
67117 else
67118   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67119 $as_echo "no" >&6; }
67120 fi
67121 
67122 
67123           if test "x$ICECC_WRAPPER" = x; then
67124             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67125           fi
67126         else
67127           # Otherwise we believe it is a complete path. Use it as it is.
67128           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
67129 $as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
67130           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
67131 $as_echo_n "checking for ICECC_WRAPPER... " >&6; }
67132           if test ! -x "$tool_specified"; then
67133             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67134 $as_echo "not found" >&6; }
67135             as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
67136           fi
67137           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67138 $as_echo "$tool_specified" >&6; }
67139         fi
67140       fi
67141     fi
67142 
67143   fi
67144 
67145 
67146 
67147   if test "x$ICECC_WRAPPER" = x; then
67148     as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
67149   fi
67150 
67151 
67152 
67153   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67154       && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
67155   if test "$?" != "0"; then
67156     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67157 $as_echo "$as_me: icecc-create-env output:" >&6;}
67158     cat ${icecc_create_env_log}
67159     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67160   fi
67161 
67162     else
67163       as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
67164     fi
67165     PATH="$old_path"
67166     # The bundle with the compiler gets a name based on checksums. Parse log file
67167     # to find it.
67168     ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
67169     ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67170     if test ! -f ${ICECC_ENV_BUNDLE}; then
67171       as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67172     fi
67173     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
67174 $as_echo_n "checking for icecc build environment for target compiler... " >&6; }
67175     { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67176 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67177     ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
67178 
67179     if test "x${COMPILE_TYPE}" = "xcross"; then
67180       # If cross compiling, create a separate env package for the build compiler
67181       # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
67182       icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
67183       if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
67184 
67185   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67186       && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
67187             ${icecc_create_env_log_build} 2>&1 )
67188   if test "$?" != "0"; then
67189     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67190 $as_echo "$as_me: icecc-create-env output:" >&6;}
67191     cat \
67192             ${icecc_create_env_log_build}
67193     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67194   fi
67195 
67196       elif test "x${BUILD_CC##*/}" = "xclang"; then
67197 
67198   ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
67199       && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
67200   if test "$?" != "0"; then
67201     { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
67202 $as_echo "$as_me: icecc-create-env output:" >&6;}
67203     cat ${icecc_create_env_log_build}
67204     as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
67205   fi
67206 
67207       else
67208         as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
67209       fi
67210       ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
67211       ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
67212       if test ! -f ${ICECC_ENV_BUNDLE}; then
67213         as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
67214       fi
67215       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
67216 $as_echo_n "checking for icecc build environment for build compiler... " >&6; }
67217       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
67218 $as_echo "${ICECC_ENV_BUNDLE}" >&6; }
67219       BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
67220           ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
67221     else
67222       BUILD_ICECC="${ICECC}"
67223     fi
67224 
67225 
67226   fi
67227 
67228 
67229 # Can the C/C++ compiler use precompiled headers?
67230 
67231 
67232   ###############################################################################
67233   #
67234   # Can the C/C++ compiler use precompiled headers?
67235   #
67236   # Check whether --enable-precompiled-headers was given.
67237 if test "${enable_precompiled_headers+set}" = set; then :
67238   enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
67239 else
67240   ENABLE_PRECOMPH=yes
67241 fi
67242 
67243 
67244   USE_PRECOMPILED_HEADER=true
67245   { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
67246 $as_echo_n "checking If precompiled header is enabled... " >&6; }
67247   if test "x$ENABLE_PRECOMPH" = xno; then
67248     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
67249 $as_echo "no, forced" >&6; }
67250     USE_PRECOMPILED_HEADER=false
67251   elif test "x$ICECC" != "x"; then
67252     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
67253 $as_echo "no, does not work effectively with icecc" >&6; }
67254     USE_PRECOMPILED_HEADER=false
67255   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
67256     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
67257 $as_echo "no, does not work with Solaris Studio" >&6; }
67258     USE_PRECOMPILED_HEADER=false
67259   elif test "x$TOOLCHAIN_TYPE" = xxlc; then
67260     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
67261 $as_echo "no, does not work with xlc" >&6; }
67262     USE_PRECOMPILED_HEADER=false
67263   else
67264     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67265 $as_echo "yes" >&6; }
67266   fi
67267 
67268   if test "x$ENABLE_PRECOMPH" = xyes; then
67269     # Check that the compiler actually supports precomp headers.
67270     if test "x$TOOLCHAIN_TYPE" = xgcc; then
67271       { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
67272 $as_echo_n "checking that precompiled headers work... " >&6; }
67273       echo "int alfa();" > conftest.h
67274       $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
67275       if test ! -f conftest.hpp.gch; then
67276         USE_PRECOMPILED_HEADER=false
67277         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67278 $as_echo "no" >&6; }
67279       else
67280         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67281 $as_echo "yes" >&6; }
67282       fi
67283       $RM conftest.h conftest.hpp.gch
67284     fi
67285   fi
67286 
67287 
67288 
67289 
67290 # Setup use of ccache, if available
67291 
67292   # Check whether --enable-ccache was given.
67293 if test "${enable_ccache+set}" = set; then :
67294   enableval=$enable_ccache;
67295 fi
67296 
67297 
67298   CCACHE_STATUS=
67299   { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
67300 $as_echo_n "checking is ccache enabled... " >&6; }
67301   if test "x$enable_ccache" = xyes; then
67302     if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
67303       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67304 $as_echo "yes" >&6; }
67305       OLD_PATH="$PATH"
67306       if test "x$TOOLCHAIN_PATH" != x; then
67307         PATH=$TOOLCHAIN_PATH:$PATH
67308       fi
67309 
67310 
67311 
67312   # Publish this variable in the help.
67313 
67314 
67315   if [ -z "${CCACHE+x}" ]; then
67316     # The variable is not set by user, try to locate tool using the code snippet
67317     for ac_prog in ccache
67318 do
67319   # Extract the first word of "$ac_prog", so it can be a program name with args.
67320 set dummy $ac_prog; ac_word=$2
67321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67322 $as_echo_n "checking for $ac_word... " >&6; }
67323 if ${ac_cv_path_CCACHE+:} false; then :
67324   $as_echo_n "(cached) " >&6
67325 else
67326   case $CCACHE in
67327   [\\/]* | ?:[\\/]*)
67328   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67329   ;;
67330   *)
67331   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67332 for as_dir in $PATH
67333 do
67334   IFS=$as_save_IFS
67335   test -z "$as_dir" && as_dir=.
67336     for ac_exec_ext in '' $ac_executable_extensions; do
67337   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67338     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67339     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67340     break 2
67341   fi
67342 done
67343   done
67344 IFS=$as_save_IFS
67345 
67346   ;;
67347 esac
67348 fi
67349 CCACHE=$ac_cv_path_CCACHE
67350 if test -n "$CCACHE"; then
67351   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67352 $as_echo "$CCACHE" >&6; }
67353 else
67354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67355 $as_echo "no" >&6; }
67356 fi
67357 
67358 
67359   test -n "$CCACHE" && break
67360 done
67361 
67362   else
67363     # The variable is set, but is it from the command line or the environment?
67364 
67365     # Try to remove the string !CCACHE! from our list.
67366     try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
67367     if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
67368       # If it failed, the variable was not from the command line. Ignore it,
67369       # but warn the user (except for BASH, which is always set by the calling BASH).
67370       if test "xCCACHE" != xBASH; then
67371         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
67372 $as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
67373       fi
67374       # Try to locate tool using the code snippet
67375       for ac_prog in ccache
67376 do
67377   # Extract the first word of "$ac_prog", so it can be a program name with args.
67378 set dummy $ac_prog; ac_word=$2
67379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67380 $as_echo_n "checking for $ac_word... " >&6; }
67381 if ${ac_cv_path_CCACHE+:} false; then :
67382   $as_echo_n "(cached) " >&6
67383 else
67384   case $CCACHE in
67385   [\\/]* | ?:[\\/]*)
67386   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67387   ;;
67388   *)
67389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67390 for as_dir in $PATH
67391 do
67392   IFS=$as_save_IFS
67393   test -z "$as_dir" && as_dir=.
67394     for ac_exec_ext in '' $ac_executable_extensions; do
67395   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67396     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67397     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67398     break 2
67399   fi
67400 done
67401   done
67402 IFS=$as_save_IFS
67403 
67404   ;;
67405 esac
67406 fi
67407 CCACHE=$ac_cv_path_CCACHE
67408 if test -n "$CCACHE"; then
67409   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67410 $as_echo "$CCACHE" >&6; }
67411 else
67412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67413 $as_echo "no" >&6; }
67414 fi
67415 
67416 
67417   test -n "$CCACHE" && break
67418 done
67419 
67420     else
67421       # If it succeeded, then it was overridden by the user. We will use it
67422       # for the tool.
67423 
67424       # First remove it from the list of overridden variables, so we can test
67425       # for unknown variables in the end.
67426       CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
67427 
67428       # Check if we try to supply an empty value
67429       if test "x$CCACHE" = x; then
67430         { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
67431 $as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
67432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67433 $as_echo_n "checking for CCACHE... " >&6; }
67434         { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
67435 $as_echo "disabled" >&6; }
67436       else
67437         # Check if the provided tool contains a complete path.
67438         tool_specified="$CCACHE"
67439         tool_basename="${tool_specified##*/}"
67440         if test "x$tool_basename" = "x$tool_specified"; then
67441           # A command without a complete path is provided, search $PATH.
67442           { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
67443 $as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
67444           # Extract the first word of "$tool_basename", so it can be a program name with args.
67445 set dummy $tool_basename; ac_word=$2
67446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
67447 $as_echo_n "checking for $ac_word... " >&6; }
67448 if ${ac_cv_path_CCACHE+:} false; then :
67449   $as_echo_n "(cached) " >&6
67450 else
67451   case $CCACHE in
67452   [\\/]* | ?:[\\/]*)
67453   ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
67454   ;;
67455   *)
67456   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67457 for as_dir in $PATH
67458 do
67459   IFS=$as_save_IFS
67460   test -z "$as_dir" && as_dir=.
67461     for ac_exec_ext in '' $ac_executable_extensions; do
67462   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
67463     ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
67464     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
67465     break 2
67466   fi
67467 done
67468   done
67469 IFS=$as_save_IFS
67470 
67471   ;;
67472 esac
67473 fi
67474 CCACHE=$ac_cv_path_CCACHE
67475 if test -n "$CCACHE"; then
67476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
67477 $as_echo "$CCACHE" >&6; }
67478 else
67479   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67480 $as_echo "no" >&6; }
67481 fi
67482 
67483 
67484           if test "x$CCACHE" = x; then
67485             as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
67486           fi
67487         else
67488           # Otherwise we believe it is a complete path. Use it as it is.
67489           { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
67490 $as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
67491           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
67492 $as_echo_n "checking for CCACHE... " >&6; }
67493           if test ! -x "$tool_specified"; then
67494             { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
67495 $as_echo "not found" >&6; }
67496             as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
67497           fi
67498           { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
67499 $as_echo "$tool_specified" >&6; }
67500         fi
67501       fi
67502     fi
67503 
67504   fi
67505 
67506 
67507 
67508   if test "x$CCACHE" = x; then
67509     as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
67510   fi
67511 
67512 
67513       PATH="$OLD_PATH"
67514       CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
67515       CCACHE_STATUS="Active ($CCACHE_VERSION)"
67516     else
67517       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67518 $as_echo "no" >&6; }
67519       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
67520 $as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
67521     fi
67522   elif test "x$enable_ccache" = xno; then
67523     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
67524 $as_echo "no, explicitly disabled" >&6; }
67525     CCACHE_STATUS="Disabled"
67526   elif test "x$enable_ccache" = x; then
67527     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67528 $as_echo "no" >&6; }
67529   else
67530     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
67531 $as_echo "unknown" >&6; }
67532     as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
67533   fi
67534 
67535 
67536 
67537 # Check whether --with-ccache-dir was given.
67538 if test "${with_ccache_dir+set}" = set; then :
67539   withval=$with_ccache_dir;
67540 fi
67541 
67542 
67543   if test "x$with_ccache_dir" != x; then
67544     # When using a non home ccache directory, assume the use is to share ccache files
67545     # with other users. Thus change the umask.
67546     SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
67547     if test "x$CCACHE" = x; then
67548       { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
67549 $as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
67550     fi
67551   fi
67552 
67553   if test "x$CCACHE" != x; then
67554 
67555   if test "x$CCACHE" != x; then
67556     if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
67557       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67558           $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
67559       if test "x$HAS_BAD_CCACHE" != "x"; then
67560         as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
67561       fi
67562     fi
67563     if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
67564       HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
67565           $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
67566       if test "x$HAS_BAD_CCACHE" != "x"; then
67567         as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
67568       fi
67569       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
67570 $as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
67571       CCACHE_PRECOMP_FLAG="-fpch-preprocess"
67572       PUSHED_FLAGS="$CXXFLAGS"
67573       CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
67574       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
67575 /* end confdefs.h.  */
67576 
67577 int
67578 main ()
67579 {
67580 
67581   ;
67582   return 0;
67583 }
67584 _ACEOF
67585 if ac_fn_cxx_try_compile "$LINENO"; then :
67586   CC_KNOWS_CCACHE_TRICK=yes
67587 else
67588   CC_KNOWS_CCACHE_TRICK=no
67589 fi
67590 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
67591       CXXFLAGS="$PUSHED_FLAGS"
67592       if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
67593         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
67594 $as_echo "yes" >&6; }
67595         CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
67596 
67597         CCACHE_SLOPPINESS=pch_defines,time_macros
67598       else
67599         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
67600 $as_echo "no" >&6; }
67601         as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
67602       fi
67603     fi
67604 
67605     CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
67606         CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
67607 
67608     if test "x$SET_CCACHE_DIR" != x; then
67609       mkdir -p $CCACHE_DIR > /dev/null 2>&1
67610       chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
67611     fi
67612   fi
67613 
67614   fi
67615 
67616 
67617 ###############################################################################
67618 #
67619 # And now the finish...
67620 #
67621 ###############################################################################
67622 
67623 # Check for some common pitfalls
67624 
67625   if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
67626     file_to_test="$SRC_ROOT/LICENSE"
67627     if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
67628       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
67629     fi
67630   fi
67631 
67632 
67633   # Did user specify any unknown variables?
67634 
67635   if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
67636     # Replace the separating ! with spaces before presenting for end user.
67637     unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
67638     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
67639 $as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
67640   fi
67641 
67642 
67643   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
67644 $as_echo_n "checking if build directory is on local disk... " >&6; }
67645 
67646   # df -l lists only local disks; if the given directory is not found then
67647   # a non-zero exit code is given
67648   if test "x$DF" = x; then
67649     if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
67650       # msys does not have df; use Windows "net use" instead.
67651       IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
67652       if test "x$IS_NETWORK_DISK" = x; then
67653         OUTPUT_DIR_IS_LOCAL="yes"
67654       else
67655         OUTPUT_DIR_IS_LOCAL="no"
67656       fi
67657     else
67658       # No df here, say it's local
67659       OUTPUT_DIR_IS_LOCAL="yes"
67660     fi
67661   else
67662     if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
67663       OUTPUT_DIR_IS_LOCAL="yes"
67664     else
67665       OUTPUT_DIR_IS_LOCAL="no"
67666     fi
67667   fi
67668 
67669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
67670 $as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
67671 
67672 
67673 
67674   # Check if the user has any old-style ALT_ variables set.
67675   FOUND_ALT_VARIABLES=`env | grep ^ALT_`
67676 
67677   # Before generating output files, test if they exist. If they do, this is a reconfigure.
67678   # Since we can't properly handle the dependencies for this, warn the user about the situation
67679   if test -e $OUTPUT_ROOT/spec.gmk; then
67680     IS_RECONFIGURE=yes
67681   else
67682     IS_RECONFIGURE=no
67683   fi
67684 
67685 
67686 # At the end, call the custom hook. (Dummy macro if no custom sources available)
67687 
67688 
67689 # This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
67690 
67691   # Keep feature lists sorted and free of duplicates
67692   JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
67693   JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
67694   JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
67695   JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
67696   JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
67697   JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
67698   JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
67699 
67700   # Validate features
67701   for variant in $JVM_VARIANTS; do
67702     { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
67703 $as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
67704     features_var_name=JVM_FEATURES_$variant
67705     JVM_FEATURES_TO_TEST=${!features_var_name}
67706     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
67707 $as_echo "$JVM_FEATURES_TO_TEST" >&6; }
67708     NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
67709     STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
67710     INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
67711     if test "x$INVALID_FEATURES" != x; then
67712       as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
67713     fi
67714   done
67715 
67716 
67717 # We're messing a bit with internal autoconf variables to put the config.status
67718 # in the output directory instead of the current directory.
67719 CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
67720 
67721 # Create the actual output files. Now the main work of configure is done.
67722 cat >confcache <<\_ACEOF
67723 # This file is a shell script that caches the results of configure
67724 # tests run on this system so they can be shared between configure
67725 # scripts and configure runs, see configure's option --config-cache.
67726 # It is not useful on other systems.  If it contains results you don't
67727 # want to keep, you may remove or edit it.
67728 #
67729 # config.status only pays attention to the cache file if you give it
67730 # the --recheck option to rerun configure.
67731 #
67732 # `ac_cv_env_foo' variables (set or unset) will be overridden when
67733 # loading this file, other *unset* `ac_cv_foo' will be assigned the
67734 # following values.
67735 
67736 _ACEOF
67737 
67738 # The following way of writing the cache mishandles newlines in values,
67739 # but we know of no workaround that is simple, portable, and efficient.
67740 # So, we kill variables containing newlines.
67741 # Ultrix sh set writes to stderr and can't be redirected directly,
67742 # and sets the high bit in the cache file unless we assign to the vars.
67743 (
67744   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
67745     eval ac_val=\$$ac_var
67746     case $ac_val in #(
67747     *${as_nl}*)
67748       case $ac_var in #(
67749       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
67750 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
67751       esac
67752       case $ac_var in #(
67753       _ | IFS | as_nl) ;; #(
67754       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
67755       *) { eval $ac_var=; unset $ac_var;} ;;
67756       esac ;;
67757     esac
67758   done
67759 
67760   (set) 2>&1 |
67761     case $as_nl`(ac_space=' '; set) 2>&1` in #(
67762     *${as_nl}ac_space=\ *)
67763       # `set' does not quote correctly, so add quotes: double-quote
67764       # substitution turns \\\\ into \\, and sed turns \\ into \.
67765       sed -n \
67766         "s/'/'\\\\''/g;
67767           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
67768       ;; #(
67769     *)
67770       # `set' quotes correctly as required by POSIX, so do not add quotes.
67771       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
67772       ;;
67773     esac |
67774     sort
67775 ) |
67776   sed '
67777      /^ac_cv_env_/b end
67778      t clear
67779      :clear
67780      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
67781      t end
67782      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
67783      :end' >>confcache
67784 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
67785   if test -w "$cache_file"; then
67786     if test "x$cache_file" != "x/dev/null"; then
67787       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
67788 $as_echo "$as_me: updating cache $cache_file" >&6;}
67789       if test ! -f "$cache_file" || test -h "$cache_file"; then
67790         cat confcache >"$cache_file"
67791       else
67792         case $cache_file in #(
67793         */* | ?:*)
67794           mv -f confcache "$cache_file"$$ &&
67795           mv -f "$cache_file"$$ "$cache_file" ;; #(
67796         *)
67797           mv -f confcache "$cache_file" ;;
67798         esac
67799       fi
67800     fi
67801   else
67802     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
67803 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
67804   fi
67805 fi
67806 rm -f confcache
67807 
67808 test "x$prefix" = xNONE && prefix=$ac_default_prefix
67809 # Let make expand exec_prefix.
67810 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
67811 
67812 # Transform confdefs.h into DEFS.
67813 # Protect against shell expansion while executing Makefile rules.
67814 # Protect against Makefile macro expansion.
67815 #
67816 # If the first sed substitution is executed (which looks for macros that
67817 # take arguments), then branch to the quote section.  Otherwise,
67818 # look for a macro that doesn't take arguments.
67819 ac_script='
67820 :mline
67821 /\\$/{
67822  N
67823  s,\\\n,,
67824  b mline
67825 }
67826 t clear
67827 :clear
67828 s/^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*([^)]*)\)[   ]*\(.*\)/-D\1=\2/g
67829 t quote
67830 s/^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)/-D\1=\2/g
67831 t quote
67832 b any
67833 :quote
67834 s/[      `~#$^&*(){}\\|;'\''"<>?]/\\&/g
67835 s/\[/\\&/g
67836 s/\]/\\&/g
67837 s/\$/$$/g
67838 H
67839 :any
67840 ${
67841         g
67842         s/^\n//
67843         s/\n/ /g
67844         p
67845 }
67846 '
67847 DEFS=`sed -n "$ac_script" confdefs.h`
67848 
67849 
67850 ac_libobjs=
67851 ac_ltlibobjs=
67852 U=
67853 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
67854   # 1. Remove the extension, and $U if already installed.
67855   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
67856   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
67857   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
67858   #    will be set to the directory where LIBOBJS objects are built.
67859   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
67860   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
67861 done
67862 LIBOBJS=$ac_libobjs
67863 
67864 LTLIBOBJS=$ac_ltlibobjs
67865 
67866 
67867 
67868 : "${CONFIG_STATUS=./config.status}"
67869 ac_write_fail=0
67870 ac_clean_files_save=$ac_clean_files
67871 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
67872 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
67873 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
67874 as_write_fail=0
67875 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
67876 #! $SHELL
67877 # Generated by $as_me.
67878 # Run this file to recreate the current configuration.
67879 # Compiler output produced by configure, useful for debugging
67880 # configure, is in config.log if it exists.
67881 
67882 debug=false
67883 ac_cs_recheck=false
67884 ac_cs_silent=false
67885 
67886 SHELL=\${CONFIG_SHELL-$SHELL}
67887 export SHELL
67888 _ASEOF
67889 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
67890 ## -------------------- ##
67891 ## M4sh Initialization. ##
67892 ## -------------------- ##
67893 
67894 # Be more Bourne compatible
67895 DUALCASE=1; export DUALCASE # for MKS sh
67896 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
67897   emulate sh
67898   NULLCMD=:
67899   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
67900   # is contrary to our usage.  Disable this feature.
67901   alias -g '${1+"$@"}'='"$@"'
67902   setopt NO_GLOB_SUBST
67903 else
67904   case `(set -o) 2>/dev/null` in #(
67905   *posix*) :
67906     set -o posix ;; #(
67907   *) :
67908      ;;
67909 esac
67910 fi
67911 
67912 
67913 as_nl='
67914 '
67915 export as_nl
67916 # Printing a long string crashes Solaris 7 /usr/bin/printf.
67917 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
67918 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
67919 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
67920 # Prefer a ksh shell builtin over an external printf program on Solaris,
67921 # but without wasting forks for bash or zsh.
67922 if test -z "$BASH_VERSION$ZSH_VERSION" \
67923     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
67924   as_echo='print -r --'
67925   as_echo_n='print -rn --'
67926 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
67927   as_echo='printf %s\n'
67928   as_echo_n='printf %s'
67929 else
67930   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
67931     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
67932     as_echo_n='/usr/ucb/echo -n'
67933   else
67934     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
67935     as_echo_n_body='eval
67936       arg=$1;
67937       case $arg in #(
67938       *"$as_nl"*)
67939         expr "X$arg" : "X\\(.*\\)$as_nl";
67940         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67941       esac;
67942       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67943     '
67944     export as_echo_n_body
67945     as_echo_n='sh -c $as_echo_n_body as_echo'
67946   fi
67947   export as_echo_body
67948   as_echo='sh -c $as_echo_body as_echo'
67949 fi
67950 
67951 # The user is always right.
67952 if test "${PATH_SEPARATOR+set}" != set; then
67953   PATH_SEPARATOR=:
67954   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
67955     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
67956       PATH_SEPARATOR=';'
67957   }
67958 fi
67959 
67960 
67961 # IFS
67962 # We need space, tab and new line, in precisely that order.  Quoting is
67963 # there to prevent editors from complaining about space-tab.
67964 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
67965 # splitting by setting IFS to empty value.)
67966 IFS=" ""        $as_nl"
67967 
67968 # Find who we are.  Look in the path if we contain no directory separator.
67969 as_myself=
67970 case $0 in #((
67971   *[\\/]* ) as_myself=$0 ;;
67972   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
67973 for as_dir in $PATH
67974 do
67975   IFS=$as_save_IFS
67976   test -z "$as_dir" && as_dir=.
67977     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
67978   done
67979 IFS=$as_save_IFS
67980 
67981      ;;
67982 esac
67983 # We did not find ourselves, most probably we were run as `sh COMMAND'
67984 # in which case we are not to be found in the path.
67985 if test "x$as_myself" = x; then
67986   as_myself=$0
67987 fi
67988 if test ! -f "$as_myself"; then
67989   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
67990   exit 1
67991 fi
67992 
67993 # Unset variables that we do not need and which cause bugs (e.g. in
67994 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
67995 # suppresses any "Segmentation fault" message there.  '((' could
67996 # trigger a bug in pdksh 5.2.14.
67997 for as_var in BASH_ENV ENV MAIL MAILPATH
67998 do eval test x\${$as_var+set} = xset \
67999   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
68000 done
68001 PS1='$ '
68002 PS2='> '
68003 PS4='+ '
68004 
68005 # NLS nuisances.
68006 LC_ALL=C
68007 export LC_ALL
68008 LANGUAGE=C
68009 export LANGUAGE
68010 
68011 # CDPATH.
68012 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
68013 
68014 
68015 # as_fn_error STATUS ERROR [LINENO LOG_FD]
68016 # ----------------------------------------
68017 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
68018 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
68019 # script with STATUS, using 1 if that was 0.
68020 as_fn_error ()
68021 {
68022   as_status=$1; test $as_status -eq 0 && as_status=1
68023   if test "$4"; then
68024     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
68025     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
68026   fi
68027   $as_echo "$as_me: error: $2" >&2
68028   as_fn_exit $as_status
68029 } # as_fn_error
68030 
68031 
68032 # as_fn_set_status STATUS
68033 # -----------------------
68034 # Set $? to STATUS, without forking.
68035 as_fn_set_status ()
68036 {
68037   return $1
68038 } # as_fn_set_status
68039 
68040 # as_fn_exit STATUS
68041 # -----------------
68042 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
68043 as_fn_exit ()
68044 {
68045   set +e
68046   as_fn_set_status $1
68047   exit $1
68048 } # as_fn_exit
68049 
68050 # as_fn_unset VAR
68051 # ---------------
68052 # Portably unset VAR.
68053 as_fn_unset ()
68054 {
68055   { eval $1=; unset $1;}
68056 }
68057 as_unset=as_fn_unset
68058 # as_fn_append VAR VALUE
68059 # ----------------------
68060 # Append the text in VALUE to the end of the definition contained in VAR. Take
68061 # advantage of any shell optimizations that allow amortized linear growth over
68062 # repeated appends, instead of the typical quadratic growth present in naive
68063 # implementations.
68064 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
68065   eval 'as_fn_append ()
68066   {
68067     eval $1+=\$2
68068   }'
68069 else
68070   as_fn_append ()
68071   {
68072     eval $1=\$$1\$2
68073   }
68074 fi # as_fn_append
68075 
68076 # as_fn_arith ARG...
68077 # ------------------
68078 # Perform arithmetic evaluation on the ARGs, and store the result in the
68079 # global $as_val. Take advantage of shells that can avoid forks. The arguments
68080 # must be portable across $(()) and expr.
68081 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
68082   eval 'as_fn_arith ()
68083   {
68084     as_val=$(( $* ))
68085   }'
68086 else
68087   as_fn_arith ()
68088   {
68089     as_val=`expr "$@" || test $? -eq 1`
68090   }
68091 fi # as_fn_arith
68092 
68093 
68094 if expr a : '\(a\)' >/dev/null 2>&1 &&
68095    test "X`expr 00001 : '.*\(...\)'`" = X001; then
68096   as_expr=expr
68097 else
68098   as_expr=false
68099 fi
68100 
68101 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
68102   as_basename=basename
68103 else
68104   as_basename=false
68105 fi
68106 
68107 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
68108   as_dirname=dirname
68109 else
68110   as_dirname=false
68111 fi
68112 
68113 as_me=`$as_basename -- "$0" ||
68114 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
68115          X"$0" : 'X\(//\)$' \| \
68116          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
68117 $as_echo X/"$0" |
68118     sed '/^.*\/\([^/][^/]*\)\/*$/{
68119             s//\1/
68120             q
68121           }
68122           /^X\/\(\/\/\)$/{
68123             s//\1/
68124             q
68125           }
68126           /^X\/\(\/\).*/{
68127             s//\1/
68128             q
68129           }
68130           s/.*/./; q'`
68131 
68132 # Avoid depending upon Character Ranges.
68133 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
68134 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
68135 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
68136 as_cr_digits='0123456789'
68137 as_cr_alnum=$as_cr_Letters$as_cr_digits
68138 
68139 ECHO_C= ECHO_N= ECHO_T=
68140 case `echo -n x` in #(((((
68141 -n*)
68142   case `echo 'xy\c'` in
68143   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
68144   xy)  ECHO_C='\c';;
68145   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
68146        ECHO_T=' ';;
68147   esac;;
68148 *)
68149   ECHO_N='-n';;
68150 esac
68151 
68152 rm -f conf$$ conf$$.exe conf$$.file
68153 if test -d conf$$.dir; then
68154   rm -f conf$$.dir/conf$$.file
68155 else
68156   rm -f conf$$.dir
68157   mkdir conf$$.dir 2>/dev/null
68158 fi
68159 if (echo >conf$$.file) 2>/dev/null; then
68160   if ln -s conf$$.file conf$$ 2>/dev/null; then
68161     as_ln_s='ln -s'
68162     # ... but there are two gotchas:
68163     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
68164     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
68165     # In both cases, we have to default to `cp -pR'.
68166     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
68167       as_ln_s='cp -pR'
68168   elif ln conf$$.file conf$$ 2>/dev/null; then
68169     as_ln_s=ln
68170   else
68171     as_ln_s='cp -pR'
68172   fi
68173 else
68174   as_ln_s='cp -pR'
68175 fi
68176 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
68177 rmdir conf$$.dir 2>/dev/null
68178 
68179 
68180 # as_fn_mkdir_p
68181 # -------------
68182 # Create "$as_dir" as a directory, including parents if necessary.
68183 as_fn_mkdir_p ()
68184 {
68185 
68186   case $as_dir in #(
68187   -*) as_dir=./$as_dir;;
68188   esac
68189   test -d "$as_dir" || eval $as_mkdir_p || {
68190     as_dirs=
68191     while :; do
68192       case $as_dir in #(
68193       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
68194       *) as_qdir=$as_dir;;
68195       esac
68196       as_dirs="'$as_qdir' $as_dirs"
68197       as_dir=`$as_dirname -- "$as_dir" ||
68198 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68199          X"$as_dir" : 'X\(//\)[^/]' \| \
68200          X"$as_dir" : 'X\(//\)$' \| \
68201          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
68202 $as_echo X"$as_dir" |
68203     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68204             s//\1/
68205             q
68206           }
68207           /^X\(\/\/\)[^/].*/{
68208             s//\1/
68209             q
68210           }
68211           /^X\(\/\/\)$/{
68212             s//\1/
68213             q
68214           }
68215           /^X\(\/\).*/{
68216             s//\1/
68217             q
68218           }
68219           s/.*/./; q'`
68220       test -d "$as_dir" && break
68221     done
68222     test -z "$as_dirs" || eval "mkdir $as_dirs"
68223   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
68224 
68225 
68226 } # as_fn_mkdir_p
68227 if mkdir -p . 2>/dev/null; then
68228   as_mkdir_p='mkdir -p "$as_dir"'
68229 else
68230   test -d ./-p && rmdir ./-p
68231   as_mkdir_p=false
68232 fi
68233 
68234 
68235 # as_fn_executable_p FILE
68236 # -----------------------
68237 # Test if FILE is an executable regular file.
68238 as_fn_executable_p ()
68239 {
68240   test -f "$1" && test -x "$1"
68241 } # as_fn_executable_p
68242 as_test_x='test -x'
68243 as_executable_p=as_fn_executable_p
68244 
68245 # Sed expression to map a string onto a valid CPP name.
68246 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
68247 
68248 # Sed expression to map a string onto a valid variable name.
68249 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
68250 
68251 
68252 exec 6>&1
68253 ## ----------------------------------- ##
68254 ## Main body of $CONFIG_STATUS script. ##
68255 ## ----------------------------------- ##
68256 _ASEOF
68257 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
68258 
68259 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68260 # Save the log message, to keep $0 and so on meaningful, and to
68261 # report actual input values of CONFIG_FILES etc. instead of their
68262 # values after options handling.
68263 ac_log="
68264 This file was extended by OpenJDK $as_me jdk9, which was
68265 generated by GNU Autoconf 2.69.  Invocation command line was
68266 
68267   CONFIG_FILES    = $CONFIG_FILES
68268   CONFIG_HEADERS  = $CONFIG_HEADERS
68269   CONFIG_LINKS    = $CONFIG_LINKS
68270   CONFIG_COMMANDS = $CONFIG_COMMANDS
68271   $ $0 $@
68272 
68273 on `(hostname || uname -n) 2>/dev/null | sed 1q`
68274 "
68275 
68276 _ACEOF
68277 
68278 case $ac_config_files in *"
68279 "*) set x $ac_config_files; shift; ac_config_files=$*;;
68280 esac
68281 
68282 
68283 
68284 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68285 # Files that config.status was made for.
68286 config_files="$ac_config_files"
68287 
68288 _ACEOF
68289 
68290 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68291 ac_cs_usage="\
68292 \`$as_me' instantiates files and other configuration actions
68293 from templates according to the current configuration.  Unless the files
68294 and actions are specified as TAGs, all are instantiated by default.
68295 
68296 Usage: $0 [OPTION]... [TAG]...
68297 
68298   -h, --help       print this help, then exit
68299   -V, --version    print version number and configuration settings, then exit
68300       --config     print configuration, then exit
68301   -q, --quiet, --silent
68302                    do not print progress messages
68303   -d, --debug      don't remove temporary files
68304       --recheck    update $as_me by reconfiguring in the same conditions
68305       --file=FILE[:TEMPLATE]
68306                    instantiate the configuration file FILE
68307 
68308 Configuration files:
68309 $config_files
68310 
68311 Report bugs to <build-dev@openjdk.java.net>.
68312 OpenJDK home page: <http://openjdk.java.net>."
68313 
68314 _ACEOF
68315 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68316 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
68317 ac_cs_version="\\
68318 OpenJDK config.status jdk9
68319 configured by $0, generated by GNU Autoconf 2.69,
68320   with options \\"\$ac_cs_config\\"
68321 
68322 Copyright (C) 2012 Free Software Foundation, Inc.
68323 This config.status script is free software; the Free Software Foundation
68324 gives unlimited permission to copy, distribute and modify it."
68325 
68326 ac_pwd='$ac_pwd'
68327 srcdir='$srcdir'
68328 AWK='$AWK'
68329 test -n "\$AWK" || AWK=awk
68330 _ACEOF
68331 
68332 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68333 # The default lists apply if the user does not specify any file.
68334 ac_need_defaults=:
68335 while test $# != 0
68336 do
68337   case $1 in
68338   --*=?*)
68339     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68340     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
68341     ac_shift=:
68342     ;;
68343   --*=)
68344     ac_option=`expr "X$1" : 'X\([^=]*\)='`
68345     ac_optarg=
68346     ac_shift=:
68347     ;;
68348   *)
68349     ac_option=$1
68350     ac_optarg=$2
68351     ac_shift=shift
68352     ;;
68353   esac
68354 
68355   case $ac_option in
68356   # Handling of the options.
68357   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
68358     ac_cs_recheck=: ;;
68359   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
68360     $as_echo "$ac_cs_version"; exit ;;
68361   --config | --confi | --conf | --con | --co | --c )
68362     $as_echo "$ac_cs_config"; exit ;;
68363   --debug | --debu | --deb | --de | --d | -d )
68364     debug=: ;;
68365   --file | --fil | --fi | --f )
68366     $ac_shift
68367     case $ac_optarg in
68368     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
68369     '') as_fn_error $? "missing file argument" ;;
68370     esac
68371     as_fn_append CONFIG_FILES " '$ac_optarg'"
68372     ac_need_defaults=false;;
68373   --he | --h |  --help | --hel | -h )
68374     $as_echo "$ac_cs_usage"; exit ;;
68375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
68376   | -silent | --silent | --silen | --sile | --sil | --si | --s)
68377     ac_cs_silent=: ;;
68378 
68379   # This is an error.
68380   -*) as_fn_error $? "unrecognized option: \`$1'
68381 Try \`$0 --help' for more information." ;;
68382 
68383   *) as_fn_append ac_config_targets " $1"
68384      ac_need_defaults=false ;;
68385 
68386   esac
68387   shift
68388 done
68389 
68390 ac_configure_extra_args=
68391 
68392 if $ac_cs_silent; then
68393   exec 6>/dev/null
68394   ac_configure_extra_args="$ac_configure_extra_args --silent"
68395 fi
68396 
68397 _ACEOF
68398 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68399 if \$ac_cs_recheck; then
68400   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
68401   shift
68402   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
68403   CONFIG_SHELL='$SHELL'
68404   export CONFIG_SHELL
68405   exec "\$@"
68406 fi
68407 
68408 _ACEOF
68409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68410 exec 5>>config.log
68411 {
68412   echo
68413   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
68414 ## Running $as_me. ##
68415 _ASBOX
68416   $as_echo "$ac_log"
68417 } >&5
68418 
68419 _ACEOF
68420 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68421 _ACEOF
68422 
68423 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68424 
68425 # Handling of arguments.
68426 for ac_config_target in $ac_config_targets
68427 do
68428   case $ac_config_target in
68429     "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
68430     "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
68431     "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
68432     "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
68433     "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
68434 
68435   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
68436   esac
68437 done
68438 
68439 
68440 # If the user did not use the arguments to specify the items to instantiate,
68441 # then the envvar interface is used.  Set only those that are not.
68442 # We use the long form for the default assignment because of an extremely
68443 # bizarre bug on SunOS 4.1.3.
68444 if $ac_need_defaults; then
68445   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
68446 fi
68447 
68448 # Have a temporary directory for convenience.  Make it in the build tree
68449 # simply because there is no reason against having it here, and in addition,
68450 # creating and moving files from /tmp can sometimes cause problems.
68451 # Hook for its removal unless debugging.
68452 # Note that there is a small window in which the directory will not be cleaned:
68453 # after its creation but before its name has been assigned to `$tmp'.
68454 $debug ||
68455 {
68456   tmp= ac_tmp=
68457   trap 'exit_status=$?
68458   : "${ac_tmp:=$tmp}"
68459   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
68460 ' 0
68461   trap 'as_fn_exit 1' 1 2 13 15
68462 }
68463 # Create a (secure) tmp directory for tmp files.
68464 
68465 {
68466   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
68467   test -d "$tmp"
68468 }  ||
68469 {
68470   tmp=./conf$$-$RANDOM
68471   (umask 077 && mkdir "$tmp")
68472 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
68473 ac_tmp=$tmp
68474 
68475 # Set up the scripts for CONFIG_FILES section.
68476 # No need to generate them if there are no CONFIG_FILES.
68477 # This happens for instance with `./config.status config.h'.
68478 if test -n "$CONFIG_FILES"; then
68479 
68480 
68481 ac_cr=`echo X | tr X '\015'`
68482 # On cygwin, bash can eat \r inside `` if the user requested igncr.
68483 # But we know of no other shell where ac_cr would be empty at this
68484 # point, so we can use a bashism as a fallback.
68485 if test "x$ac_cr" = x; then
68486   eval ac_cr=\$\'\\r\'
68487 fi
68488 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
68489 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
68490   ac_cs_awk_cr='\\r'
68491 else
68492   ac_cs_awk_cr=$ac_cr
68493 fi
68494 
68495 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
68496 _ACEOF
68497 
68498 
68499 {
68500   echo "cat >conf$$subs.awk <<_ACEOF" &&
68501   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
68502   echo "_ACEOF"
68503 } >conf$$subs.sh ||
68504   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68505 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
68506 ac_delim='%!_!# '
68507 for ac_last_try in false false false false false :; do
68508   . ./conf$$subs.sh ||
68509     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68510 
68511   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
68512   if test $ac_delim_n = $ac_delim_num; then
68513     break
68514   elif $ac_last_try; then
68515     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
68516   else
68517     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
68518   fi
68519 done
68520 rm -f conf$$subs.sh
68521 
68522 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68523 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
68524 _ACEOF
68525 sed -n '
68526 h
68527 s/^/S["/; s/!.*/"]=/
68528 p
68529 g
68530 s/^[^!]*!//
68531 :repl
68532 t repl
68533 s/'"$ac_delim"'$//
68534 t delim
68535 :nl
68536 h
68537 s/\(.\{148\}\)..*/\1/
68538 t more1
68539 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
68540 p
68541 n
68542 b repl
68543 :more1
68544 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68545 p
68546 g
68547 s/.\{148\}//
68548 t nl
68549 :delim
68550 h
68551 s/\(.\{148\}\)..*/\1/
68552 t more2
68553 s/["\\]/\\&/g; s/^/"/; s/$/"/
68554 p
68555 b
68556 :more2
68557 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
68558 p
68559 g
68560 s/.\{148\}//
68561 t delim
68562 ' <conf$$subs.awk | sed '
68563 /^[^""]/{
68564   N
68565   s/\n//
68566 }
68567 ' >>$CONFIG_STATUS || ac_write_fail=1
68568 rm -f conf$$subs.awk
68569 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68570 _ACAWK
68571 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
68572   for (key in S) S_is_set[key] = 1
68573   FS = ""
68574 
68575 }
68576 {
68577   line = $ 0
68578   nfields = split(line, field, "@")
68579   substed = 0
68580   len = length(field[1])
68581   for (i = 2; i < nfields; i++) {
68582     key = field[i]
68583     keylen = length(key)
68584     if (S_is_set[key]) {
68585       value = S[key]
68586       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
68587       len += length(value) + length(field[++i])
68588       substed = 1
68589     } else
68590       len += 1 + keylen
68591   }
68592 
68593   print line
68594 }
68595 
68596 _ACAWK
68597 _ACEOF
68598 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68599 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
68600   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
68601 else
68602   cat
68603 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
68604   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
68605 _ACEOF
68606 
68607 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
68608 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
68609 # trailing colons and then remove the whole line if VPATH becomes empty
68610 # (actually we leave an empty line to preserve line numbers).
68611 if test "x$srcdir" = x.; then
68612   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
68613 h
68614 s///
68615 s/^/:/
68616 s/[      ]*$/:/
68617 s/:\$(srcdir):/:/g
68618 s/:\${srcdir}:/:/g
68619 s/:@srcdir@:/:/g
68620 s/^:*//
68621 s/:*$//
68622 x
68623 s/\(=[   ]*\).*/\1/
68624 G
68625 s/\n//
68626 s/^[^=]*=[       ]*$//
68627 }'
68628 fi
68629 
68630 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68631 fi # test -n "$CONFIG_FILES"
68632 
68633 
68634 eval set X "  :F $CONFIG_FILES      "
68635 shift
68636 for ac_tag
68637 do
68638   case $ac_tag in
68639   :[FHLC]) ac_mode=$ac_tag; continue;;
68640   esac
68641   case $ac_mode$ac_tag in
68642   :[FHL]*:*);;
68643   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
68644   :[FH]-) ac_tag=-:-;;
68645   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
68646   esac
68647   ac_save_IFS=$IFS
68648   IFS=:
68649   set x $ac_tag
68650   IFS=$ac_save_IFS
68651   shift
68652   ac_file=$1
68653   shift
68654 
68655   case $ac_mode in
68656   :L) ac_source=$1;;
68657   :[FH])
68658     ac_file_inputs=
68659     for ac_f
68660     do
68661       case $ac_f in
68662       -) ac_f="$ac_tmp/stdin";;
68663       *) # Look for the file first in the build tree, then in the source tree
68664          # (if the path is not absolute).  The absolute path cannot be DOS-style,
68665          # because $ac_f cannot contain `:'.
68666          test -f "$ac_f" ||
68667            case $ac_f in
68668            [\\/$]*) false;;
68669            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
68670            esac ||
68671            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
68672       esac
68673       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
68674       as_fn_append ac_file_inputs " '$ac_f'"
68675     done
68676 
68677     # Let's still pretend it is `configure' which instantiates (i.e., don't
68678     # use $as_me), people would be surprised to read:
68679     #    /* config.h.  Generated by config.status.  */
68680     configure_input='Generated from '`
68681           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
68682         `' by configure.'
68683     if test x"$ac_file" != x-; then
68684       configure_input="$ac_file.  $configure_input"
68685       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
68686 $as_echo "$as_me: creating $ac_file" >&6;}
68687     fi
68688     # Neutralize special characters interpreted by sed in replacement strings.
68689     case $configure_input in #(
68690     *\&* | *\|* | *\\* )
68691        ac_sed_conf_input=`$as_echo "$configure_input" |
68692        sed 's/[\\\\&|]/\\\\&/g'`;; #(
68693     *) ac_sed_conf_input=$configure_input;;
68694     esac
68695 
68696     case $ac_tag in
68697     *:-:* | *:-) cat >"$ac_tmp/stdin" \
68698       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
68699     esac
68700     ;;
68701   esac
68702 
68703   ac_dir=`$as_dirname -- "$ac_file" ||
68704 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
68705          X"$ac_file" : 'X\(//\)[^/]' \| \
68706          X"$ac_file" : 'X\(//\)$' \| \
68707          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
68708 $as_echo X"$ac_file" |
68709     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
68710             s//\1/
68711             q
68712           }
68713           /^X\(\/\/\)[^/].*/{
68714             s//\1/
68715             q
68716           }
68717           /^X\(\/\/\)$/{
68718             s//\1/
68719             q
68720           }
68721           /^X\(\/\).*/{
68722             s//\1/
68723             q
68724           }
68725           s/.*/./; q'`
68726   as_dir="$ac_dir"; as_fn_mkdir_p
68727   ac_builddir=.
68728 
68729 case "$ac_dir" in
68730 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
68731 *)
68732   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
68733   # A ".." for each directory in $ac_dir_suffix.
68734   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
68735   case $ac_top_builddir_sub in
68736   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
68737   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
68738   esac ;;
68739 esac
68740 ac_abs_top_builddir=$ac_pwd
68741 ac_abs_builddir=$ac_pwd$ac_dir_suffix
68742 # for backward compatibility:
68743 ac_top_builddir=$ac_top_build_prefix
68744 
68745 case $srcdir in
68746   .)  # We are building in place.
68747     ac_srcdir=.
68748     ac_top_srcdir=$ac_top_builddir_sub
68749     ac_abs_top_srcdir=$ac_pwd ;;
68750   [\\/]* | ?:[\\/]* )  # Absolute name.
68751     ac_srcdir=$srcdir$ac_dir_suffix;
68752     ac_top_srcdir=$srcdir
68753     ac_abs_top_srcdir=$srcdir ;;
68754   *) # Relative name.
68755     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
68756     ac_top_srcdir=$ac_top_build_prefix$srcdir
68757     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
68758 esac
68759 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
68760 
68761 
68762   case $ac_mode in
68763   :F)
68764   #
68765   # CONFIG_FILE
68766   #
68767 
68768 _ACEOF
68769 
68770 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68771 # If the template does not know about datarootdir, expand it.
68772 # FIXME: This hack should be removed a few years after 2.60.
68773 ac_datarootdir_hack=; ac_datarootdir_seen=
68774 ac_sed_dataroot='
68775 /datarootdir/ {
68776   p
68777   q
68778 }
68779 /@datadir@/p
68780 /@docdir@/p
68781 /@infodir@/p
68782 /@localedir@/p
68783 /@mandir@/p'
68784 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
68785 *datarootdir*) ac_datarootdir_seen=yes;;
68786 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
68787   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
68788 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
68789 _ACEOF
68790 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68791   ac_datarootdir_hack='
68792   s&@datadir@&$datadir&g
68793   s&@docdir@&$docdir&g
68794   s&@infodir@&$infodir&g
68795   s&@localedir@&$localedir&g
68796   s&@mandir@&$mandir&g
68797   s&\\\${datarootdir}&$datarootdir&g' ;;
68798 esac
68799 _ACEOF
68800 
68801 # Neutralize VPATH when `$srcdir' = `.'.
68802 # Shell code in configure.ac might set extrasub.
68803 # FIXME: do we really want to maintain this feature?
68804 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
68805 ac_sed_extra="$ac_vpsub
68806 $extrasub
68807 _ACEOF
68808 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
68809 :t
68810 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
68811 s|@configure_input@|$ac_sed_conf_input|;t t
68812 s&@top_builddir@&$ac_top_builddir_sub&;t t
68813 s&@top_build_prefix@&$ac_top_build_prefix&;t t
68814 s&@srcdir@&$ac_srcdir&;t t
68815 s&@abs_srcdir@&$ac_abs_srcdir&;t t
68816 s&@top_srcdir@&$ac_top_srcdir&;t t
68817 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
68818 s&@builddir@&$ac_builddir&;t t
68819 s&@abs_builddir@&$ac_abs_builddir&;t t
68820 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
68821 $ac_datarootdir_hack
68822 "
68823 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
68824   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68825 
68826 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
68827   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
68828   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
68829       "$ac_tmp/out"`; test -z "$ac_out"; } &&
68830   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68831 which seems to be undefined.  Please make sure it is defined" >&5
68832 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
68833 which seems to be undefined.  Please make sure it is defined" >&2;}
68834 
68835   rm -f "$ac_tmp/stdin"
68836   case $ac_file in
68837   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
68838   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
68839   esac \
68840   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
68841  ;;
68842 
68843 
68844 
68845   esac
68846 
68847 done # for ac_tag
68848 
68849 
68850 as_fn_exit 0
68851 _ACEOF
68852 ac_clean_files=$ac_clean_files_save
68853 
68854 test $ac_write_fail = 0 ||
68855   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
68856 
68857 
68858 # configure is writing to config.log, and then calls config.status.
68859 # config.status does its own redirection, appending to config.log.
68860 # Unfortunately, on DOS this fails, as config.log is still kept open
68861 # by configure, so config.status won't be able to write to it; its
68862 # output is simply discarded.  So we exec the FD to /dev/null,
68863 # effectively closing config.log, so it can be properly (re)opened and
68864 # appended to by config.status.  When coming back to configure, we
68865 # need to make the FD available again.
68866 if test "$no_create" != yes; then
68867   ac_cs_success=:
68868   ac_config_status_args=
68869   test "$silent" = yes &&
68870     ac_config_status_args="$ac_config_status_args --quiet"
68871   exec 5>/dev/null
68872   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
68873   exec 5>>config.log
68874   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
68875   # would make configure fail if this is the last instruction.
68876   $ac_cs_success || as_fn_exit 1
68877 fi
68878 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
68879   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
68880 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
68881 fi
68882 
68883 
68884 # After AC_OUTPUT, we need to do final work
68885 
68886 
68887   # Try to move config.log (generated by autoconf) to the configure-support directory.
68888   if test -e ./config.log; then
68889     $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
68890   fi
68891 
68892   # Rotate our log file (configure.log)
68893   if test -e "$OUTPUT_ROOT/configure.log.old"; then
68894     $RM -f "$OUTPUT_ROOT/configure.log.old"
68895   fi
68896   if test -e "$OUTPUT_ROOT/configure.log"; then
68897     $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
68898   fi
68899 
68900   # Move configure.log from current directory to the build output root
68901   if test -e ./configure.log; then
68902     $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
68903   fi
68904 
68905   # Make the compare script executable
68906   $CHMOD +x $OUTPUT_ROOT/compare.sh
68907 
68908 
68909 # Finally output some useful information to the user
68910 
68911   # Finally output some useful information to the user
68912 
68913   printf "\n"
68914   printf "====================================================\n"
68915   if test "x$no_create" != "xyes"; then
68916     if test "x$IS_RECONFIGURE" != "xyes"; then
68917       printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
68918     else
68919       printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
68920     fi
68921   else
68922     if test "x$IS_RECONFIGURE" != "xyes"; then
68923       printf "A configuration has been successfully checked but not created\n"
68924     else
68925       printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
68926     fi
68927   fi
68928   if test "x$CONFIGURE_COMMAND_LINE" != x; then
68929     printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
68930   else
68931     printf "using default settings.\n"
68932   fi
68933 
68934   printf "\n"
68935   printf "Configuration summary:\n"
68936   printf "* Debug level:    $DEBUG_LEVEL\n"
68937   printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
68938   printf "* JDK variant:    $JDK_VARIANT\n"
68939   printf "* JVM variants:   $JVM_VARIANTS\n"
68940   printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
68941   printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
68942 
68943   printf "\n"
68944   printf "Tools summary:\n"
68945   if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
68946     printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
68947   fi
68948   printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
68949   if test "x$TOOLCHAIN_VERSION" != "x"; then
68950     print_version=" $TOOLCHAIN_VERSION"
68951   fi
68952   printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
68953   printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
68954   printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
68955 
68956   printf "\n"
68957   printf "Build performance summary:\n"
68958   printf "* Cores to use:   $JOBS\n"
68959   printf "* Memory limit:   $MEMORY_SIZE MB\n"
68960   if test "x$CCACHE_STATUS" != "x"; then
68961     printf "* ccache status:  $CCACHE_STATUS\n"
68962   fi
68963   printf "\n"
68964 
68965   if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
68966     printf "NOTE: You have requested to build more than one version of the JVM, which\n"
68967     printf "will result in longer build times.\n"
68968     printf "\n"
68969   fi
68970 
68971   if test "x$FOUND_ALT_VARIABLES" != "x"; then
68972     printf "WARNING: You have old-style ALT_ environment variables set.\n"
68973     printf "These are not respected, and will be ignored. It is recommended\n"
68974     printf "that you clean your environment. The following variables are set:\n"
68975     printf "$FOUND_ALT_VARIABLES\n"
68976     printf "\n"
68977   fi
68978 
68979   if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
68980     printf "WARNING: Your build output directory is not on a local disk.\n"
68981     printf "This will severely degrade build performance!\n"
68982     printf "It is recommended that you create an output directory on a local disk,\n"
68983     printf "and run the configure script again from that directory.\n"
68984     printf "\n"
68985   fi
68986 
68987   if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
68988     printf "WARNING: The result of this configuration has overridden an older\n"
68989     printf "configuration. You *should* run 'make clean' to make sure you get a\n"
68990     printf "proper build. Failure to do so might result in strange build problems.\n"
68991     printf "\n"
68992   fi
68993 
68994   if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
68995     printf "WARNING: The result of this configuration was not saved.\n"
68996     printf "You should run without '--no-create | -n' to create the configuration.\n"
68997     printf "\n"
68998   fi
68999 
69000 
69001 
69002   # Locate config.log.
69003   if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
69004     CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
69005   elif test -e "./config.log"; then
69006     CONFIG_LOG_PATH="."
69007   fi
69008 
69009   if test -e "$CONFIG_LOG_PATH/config.log"; then
69010     $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
69011     if test $? -eq 0; then
69012       printf "The following warnings were produced. Repeated here for convenience:\n"
69013       # We must quote sed expression (using []) to stop m4 from eating the [].
69014       $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
69015       printf "\n"
69016     fi
69017   fi
69018